/* The articles section (Jan 27. 10.), on top of page.css: the game's paper, fonts and colours, type a size up for
   older readers (body 19 px), the game's own blocks (guesses with their temperatures, the try field) and the ways into
   today's game. */

:root {
	--fill-soft: rgba(255, 255, 255, 0.05);
}

:root[data-theme='light'] {
	--fill-soft: rgba(9, 39, 55, 0.04);
}

/* the article reads on the paper itself; the card frame of the legal pages would box a long text in */
.doc:has(.ahead, .hubhead) {
	border: 0;
	background: none;
	padding: 4px 0 0;
}

.doc:has(.ahead, .hubhead) p,
.doc:has(.ahead, .hubhead) li {
	font-size: 1.1875rem;
	line-height: 1.6;
	color: var(--ink);
}

.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	font-size: 0.95rem;
	color: var(--ink-70);
	margin-bottom: 10px;
}

.doc .crumbs a {
	color: var(--ink-70);
	text-decoration: none;
	font-weight: 600;
}

/* ---------- the head of an article and of the section ---------- */

.ahead__art,
.hubhead__art,
.endcard__art {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 720 / 343;
	object-fit: cover;
	border-radius: 16px;
	margin: 0 0 16px;
}

.doc .ahead__kicker {
	margin: 0 0 6px;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 0.875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.doc:has(.ahead, .hubhead) h1 {
	font-family: var(--font-brand);
	font-weight: 700;
	font-size: 2.05rem;
	line-height: 1.15;
	letter-spacing: 0;
	margin: 0 0 12px;
	text-wrap: balance;
}

.doc:has(.ahead, .hubhead) .lead {
	font-size: 1.3125rem;
	line-height: 1.5;
	color: var(--ink);
	margin-bottom: 10px;
}

.doc .ahead__meta {
	font-size: 0.95rem;
	color: var(--ink-70);
	margin: 0 0 4px;
}

.doc:has(.ahead, .hubhead) .cta {
	margin: 16px 0 22px;
}

/* the one thing to do: as big as the game's own buttons */
.doc .btn--play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 56px;
	padding: 12px 26px;
	font-size: 1.1875rem;
	box-shadow: 0 6px 18px rgba(238, 91, 50, 0.28);
}

.doc .btn--play::after {
	content: '→';
	font-size: 1.2em;
	line-height: 1;
}

.btn--wide {
	display: flex;
	width: 100%;
}

/* ---------- the body ---------- */

.prose h2 {
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.55rem;
	line-height: 1.2;
	margin: 34px 0 10px;
	text-wrap: balance;
}

.prose h3 {
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.25rem;
	margin: 22px 0 6px;
	color: var(--ink);
}

.prose p {
	margin: 0 0 14px;
}

.prose ul,
.prose ol:not(.guesses) {
	padding-left: 24px;
	margin: 0 0 16px;
}

.prose li {
	margin: 0 0 8px;
}

.prose blockquote {
	margin: 22px 0;
	padding: 4px 0 4px 18px;
	border-left: 4px solid var(--accent);
	font-family: var(--font-brand);
	font-size: 1.35rem;
	line-height: 1.4;
}

.prose blockquote p {
	font-size: inherit;
	margin: 0;
}

.prose table {
	font-size: 1.05rem;
	margin: 0 0 18px;
}

.prose th:first-child,
.prose td:first-child {
	width: auto;
}

/* a letter grid (word search, crossword) as an article writes it in a ``` block, letters parted by spaces: big even
   letters, centred, scrolling sideways rather than widening the page (3. 11.) */
.prose pre {
	margin: 0 0 18px;
	padding: 14px 10px;
	overflow-x: auto;
	border-radius: 14px;
	background: var(--fill-soft);
	border: 1.5px solid var(--card-line);
	text-align: center;
}

.prose pre code {
	font-family: ui-monospace, 'Cascadia Mono', 'Roboto Mono', Menlo, monospace;
	font-size: clamp(1.05rem, 5.2vw, 1.45rem);
	font-weight: 600;
	line-height: 1.55;
	letter-spacing: 0.1em;
	color: var(--ink);
	/* not the inline code's tinted chip: one calm field for the whole grid */
	background: none;
	padding: 0;
	border-radius: 0;
}

/* a highlighted aside */
.note {
	margin: 22px 0;
	padding: 16px 18px;
	border-radius: 16px;
	background: var(--fill-soft);
	border: 1.5px solid var(--card-line);
}

.note p:last-child {
	margin-bottom: 0;
}

/* ---------- a game's guesses, as the game lists them ---------- */

.guesses {
	list-style: none;
	padding: 0;
	margin: 18px 0 22px;
	display: grid;
	gap: 6px;
}

.doc .guess {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 2px 12px;
	margin: 0;
	padding: 10px 14px;
	border-radius: 14px;
	background: linear-gradient(90deg, color-mix(in srgb, var(--band) 22%, transparent) calc(var(--heat) * 1%), var(--fill-soft) calc(var(--heat) * 1%));
	border: 1.5px solid color-mix(in srgb, var(--band) 55%, transparent);
}

/* the colours come with each row from the game's own scale (Articles::Arc, ::Ink) */
.guess--found {
	border-width: 2px;
}

.guess__word {
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.25rem;
	color: var(--ink);
	min-width: 0;
}

.guess__temp {
	font-family: var(--font-brand);
	font-weight: 700;
	font-size: 1.15rem;
	/* the arc's own colour reads on the dark page, its deeper tone on the cream one */
	color: var(--band);
	text-align: right;
	white-space: nowrap;
}

:root[data-theme='light'] .guess__temp {
	color: var(--band-ink);
}

/* a short word on why: under the guess, across both columns */
.guess__note {
	grid-column: 1 / -1;
	grid-row: 2;
	font-size: 0.98rem;
	line-height: 1.4;
	color: var(--ink-70);
}

/* ---------- the try field: the reader's first guess, straight into today's game ---------- */

.try {
	margin: 26px 0;
	padding: 18px 16px 14px;
	border-radius: 20px;
	background: var(--fill-soft);
	border: 1.5px solid var(--accent);
}

.doc .try__title {
	margin: 0 0 10px;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1.3;
}

.try__row {
	display: flex;
	gap: 8px;
}

.try__input {
	flex: 1;
	min-width: 0;
	height: 58px;
	padding: 0 16px;
	border-radius: 16px;
	border: 2px solid var(--card-line);
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.4rem;
}

.try__input:focus {
	outline: none;
	border-color: var(--accent);
}

.try__go {
	flex: none;
	min-width: 96px;
	height: 58px;
	padding: 0 18px;
	border: 0;
	border-radius: 16px;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.15rem;
	cursor: pointer;
}

.doc .try__sub {
	margin: 8px 0 0;
	font-size: 0.98rem;
	color: var(--ink-70);
}

/* ---------- the end card and more to read ---------- */

.endcard {
	margin: 34px 0 10px;
	padding: 0 0 6px;
	border-radius: 20px;
	border: 1.5px solid var(--card-line);
	background: var(--fill-soft);
	overflow: hidden;
	text-align: center;
}

.endcard__art {
	border-radius: 0;
	margin: 0 0 14px;
}

.doc .endcard__title {
	margin: 0 18px 6px;
	font-family: var(--font-brand);
	font-weight: 700;
	font-size: 1.55rem;
	line-height: 1.2;
}

.doc .endcard__text {
	margin: 0 18px;
}

.more h2 {
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.4rem;
	margin: 34px 0 12px;
}

/* ---------- article cards (the section and "more to read") ---------- */

.cards {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 14px;
}

.doc .card {
	margin: 0;
	padding: 0;
}

.card__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 0 16px;
	border-radius: 18px;
	border: 1.5px solid var(--card-line);
	background: var(--fill-soft);
	text-decoration: none;
	overflow: hidden;
}

.doc .card__link {
	color: var(--ink);
}

.card__art {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 720 / 343;
	object-fit: cover;
	margin-bottom: 6px;
}

.card__kicker {
	padding: 0 16px;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.card__title {
	padding: 0 16px;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 1.35rem;
	line-height: 1.25;
}

.card__lead {
	padding: 0 16px;
	font-size: 1.06rem;
	line-height: 1.5;
	color: var(--ink-70);
}

.cards--small .card__link {
	padding: 14px 0;
}

.cards--small .card__title {
	font-size: 1.2rem;
}

/* ---------- the bar that follows the reader ---------- */

.stick {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	border-top: 1px solid var(--card-line);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transform: translateY(110%);
	transition: transform 220ms ease;
}

.stick--on {
	transform: none;
}

/* the button sits in the middle on a wide screen too */
.stick {
	display: flex;
	justify-content: center;
}

.stick .btn {
	width: 100%;
	max-width: 520px;
	margin: 0;
}

/* the page's end keeps room for the bar */
.page:has(.stick) {
	padding-bottom: 96px;
}

@media (prefers-reduced-motion: reduce) {
	.stick {
		transition: none;
	}
}

/* the legal pages' list indent is not for the game's own lists */
.doc .guesses,
.doc .cards {
	padding-left: 0;
}
