/* thefrappeguy.com: site styles. Comic on a quiet page.
   Tokens mirror the design system's tokens.json. Comic components live in tfg-comic.css. */

@font-face { font-family: "Inter"; src: url("../fonts/Inter-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/Caveat-Variable.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Variable.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

/* Layout: one quiet column of ink and paper; colour only inside panels, series names and series tiles.
   The site is light only (D-105): paper is the comic's own ground, so pages and panels read as one world. */
:root {
  color-scheme: light;
  --paper: #FAF8F2; --surface: #FFFFFF; --ink: #000000; --ink-2: #4E4B45; --ink-3: #6B675F;
  --rule: #E1DFDA; --border-strong: #000000; --focus: #000000;
  --highlight: #E8BE5F; --on-highlight: #000000; --danger: #9A3B2E;
  --comic-paper: #FAF8F2; --comic-ink: #000000; --comic-bubble: #FFFFFF; --comic-table: #E4CAB9;
  --scene-ink: #171717; --scene-blue: #70BBF9; --scene-cyan: #96DFF3; --scene-yellow: #ECCC84; --scene-mint: #8CDAC4;
  --scene-magenta: #F594F3; --scene-violet: #C2A4F8; --scene-grey: #BABCBE; --scene-green: #84B4A5; --scene-orange: #F4BC8E;
  --on-scene: #000000; --dot-pink: #F3AFAD; --dot-blue: #4B93EA;
  --shadow-focus: 0 0 0 2px #FAF8F2, 0 0 0 4px #000000;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --panel-ratio: 4 / 3; --table-height: 8.5%; --scenery-opacity: 0.1;
  --gut: 16px; --section: 64px;
}
@media (min-width: 900px) { :root { --gut: 64px; --section: 96px; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/26px var(--font-sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }

.wrap { max-width: 1312px; margin-inline: auto; padding-left: max(var(--gut), env(safe-area-inset-left, 0px)); padding-right: max(var(--gut), env(safe-area-inset-right, 0px)); }
.narrow { max-width: 888px; }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.stack { display: flex; flex-direction: column; gap: var(--space-6); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type scale (tokens: display, h1, h2, h3, body-lg, body, small, label) */
.display { font-weight: 800; font-size: 44px; line-height: 48px; letter-spacing: -0.02em; }
@media (min-width: 900px) { .display { font-size: 64px; line-height: 68px; } }
.h1 { font-weight: 800; font-size: 36px; line-height: 40px; letter-spacing: -0.02em; }
@media (min-width: 900px) { .h1 { font-size: 44px; line-height: 48px; } }
.h2 { font-weight: 700; font-size: 26px; line-height: 32px; letter-spacing: -0.015em; }
@media (min-width: 900px) { .h2 { font-size: 32px; line-height: 38px; } }
.h3 { font-weight: 700; font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.lede { font-size: 19px; line-height: 30px; color: var(--ink-2); max-width: 46ch; }
.small { font-size: 14px; line-height: 22px; }
.meta { font-size: 14px; line-height: 22px; color: var(--ink-3); }
.label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-3); }
.muted { color: var(--ink-2); }
.label[data-tone] { color: var(--tone); }
.doctype, code { font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-weight: 500; background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; padding: 1px 5px; white-space: nowrap; }
.ph { font-family: var(--font-mono); font-size: 0.875em; font-weight: 500; }
.section-head { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-12); }

/* Buttons: square, ink on paper */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 12px 20px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 16px/22px var(--font-sans); text-decoration: none; border-radius: 0; cursor: pointer; }
.btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--sm { padding: 8px 14px; font-size: 14px; line-height: 20px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Header */
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding-block: var(--space-6); border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.brand { display: block; line-height: 0; }
.site-nav ul { display: flex; align-items: center; gap: var(--space-8); list-style: none; padding: 0; font-weight: 500; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 719px) {
  .site-head .wrap { padding-block: var(--space-4); row-gap: var(--space-3); flex-wrap: nowrap; }
  .site-nav ul { gap: var(--space-6); }
}

/* Hero (from the WebsiteHero template) */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-16); align-items: center; padding-block: var(--space-24) var(--space-16); }
.hero > div { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.hero .display { max-width: 14ch; }
@media (max-width: 899px) { .hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-12); padding-block: var(--space-12); } }

/* Topic index: series names set in their own colour (D-106). No swatches. */
.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--ink); list-style: none; padding: 0; margin: 0; }
.topics li { border-bottom: 1px solid var(--rule); min-width: 0; }
.topics li:nth-child(4n+1) .topic { padding-left: 0; }
.topic { display: flex; flex-direction: column; gap: var(--space-2); height: 100%; padding: var(--space-6) var(--space-6) var(--space-6) var(--space-6); text-decoration: none; color: var(--ink); }
.topic__no { font: 700 13px/18px var(--font-sans); letter-spacing: .08em; color: var(--ink-3); }
.topic__name { font-weight: 800; font-size: 24px; line-height: 28px; letter-spacing: -0.02em; color: var(--tone, var(--ink)); }
.topic__desc { font-size: 14px; line-height: 21px; color: var(--ink-2); }
.topic__status { margin-top: auto; padding-top: var(--space-2); font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); }
.topic__status--soon::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); margin-right: 8px; vertical-align: 1px; }
.topic:hover .topic__name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
@media (max-width: 1099px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .topics li:nth-child(4n+1) .topic { padding-left: var(--space-6); } .topics li:nth-child(2n+1) .topic { padding-left: 0; } }
@media (max-width: 519px) { .topics { grid-template-columns: minmax(0, 1fr); } .topics li .topic { padding-left: 0 !important; padding-right: 0; } }
.topic-links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.topic-links a { font-weight: 700; font-size: 18px; line-height: 26px; text-decoration: none; white-space: nowrap; }
.topic-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Explainer cards: a series tile with Deepak at the corner, then words on paper */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--space-12) var(--space-6); }
.card { display: flex; flex-direction: column; gap: var(--space-3); color: inherit; text-decoration: none; min-width: 0; }
.card__art { aspect-ratio: 16 / 10; max-width: 100%; margin-bottom: var(--space-2); }
.card__art .tfg-char { --fig: 100%; --y: -30%; --x: 6%; }
.card:hover .h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card p { color: var(--ink-2); }
.empty { padding: var(--space-8) 0; border-top: 3px solid var(--border-strong); max-width: 60ch; display: flex; flex-direction: column; gap: var(--space-4); }
.soon { display: inline-flex; align-self: flex-start; font: 700 26px/1 var(--font-hand); background: var(--highlight); padding: 4px 12px 7px; transform: rotate(-1.5deg); }

/* Format beats */
.beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); list-style: none; padding: 0; }
.beats li { border-top: 3px solid var(--border-strong); padding-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.beats li p { color: var(--ink-2); }
@media (max-width: 799px) { .beats { grid-template-columns: minmax(0, 1fr); } }

/* Split: text and a panel */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--space-16); align-items: center; }
.split > div { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
@media (max-width: 899px) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); } }
.panel-col { max-width: 100%; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-12); }
.chip { text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-2); padding: 7px 12px; border: 2px solid var(--rule); background: transparent; color: var(--ink); font: 500 14px/20px var(--font-sans); border-radius: 2px; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[data-tone] { color: var(--tone); }
.chip[data-tone]:hover { border-color: var(--tone); }
.chip[aria-pressed="true"], .chip[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip[data-tone][aria-current="true"] { border-color: var(--tone); background: var(--tint); color: var(--tone); }
.count { margin-bottom: var(--space-6); }

/* Series header block */
.series-hero { position: relative; min-height: 340px; padding: var(--space-12) var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); justify-content: flex-end; }
.series-hero > :not(.tfg-char):not(.tfg-dot) { position: relative; z-index: 2; max-width: min(36ch, 58%); }
.series-hero .tfg-char { --fig: 112%; --y: -34%; --x: 4%; }
.series-hero p { font-size: 19px; line-height: 30px; }
@media (max-width: 699px) {
  .series-hero { min-height: 0; padding: var(--space-8) var(--space-6) 220px; justify-content: flex-start; }
  .series-hero > :not(.tfg-char):not(.tfg-dot) { max-width: 100%; }
  .series-hero .tfg-char { height: 260px; --y: -70px; }
  .series-hero .tfg-dot { display: none; }
}

/* Article */
.crumbs { display: flex; gap: var(--space-2); flex-wrap: wrap; font-size: 14px; line-height: 22px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.article-head { display: flex; flex-direction: column; gap: var(--space-4); max-width: 760px; padding-block: var(--space-12) var(--space-8); }
.article-panel { max-width: 760px; }
.prose { max-width: 65ch; display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-12); }
.prose h2 { font-weight: 700; font-size: 22px; line-height: 28px; letter-spacing: -0.01em; margin-top: var(--space-6); }
.prose .first { font-size: 19px; line-height: 30px; }
.article .tfg-takeaway { max-width: 760px; margin-top: var(--space-12); --takeaway-size: 24px; }
.story-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); max-width: 760px; margin-top: var(--space-12); }
.story-nav > * { border-top: 1px solid var(--rule); padding-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); color: inherit; text-decoration: none; }
.story-nav a:hover .h3 { text-decoration: underline; text-underline-offset: 4px; }
.story-nav__next { text-align: right; align-items: flex-end; }
.story-nav__end { text-align: left; align-items: flex-start; }
@media (max-width: 599px) { .story-nav { grid-template-columns: minmax(0, 1fr); } .story-nav__next { text-align: left; align-items: flex-start; } }
/* A topic's parts, read in order */
.parts { list-style: none; margin: 0; padding: 0; max-width: 760px; counter-reset: none; }
.parts li { border-top: 1px solid var(--rule); }
.parts li:last-child { border-bottom: 1px solid var(--rule); }
.part { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-6) 0; color: inherit; text-decoration: none; }
.part__no { font: 700 13px/20px var(--font-sans); letter-spacing: .08em; color: var(--tone); padding-top: 6px; }
.part__body { display: flex; flex-direction: column; gap: var(--space-2); }
.part:hover .h3 { text-decoration: underline; text-underline-offset: 4px; }
.part--soon .part__no, .part--soon .h3 { color: var(--muted); }
@media (max-width: 599px) { .part { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); } }

/* The team in the story */
.cast { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); list-style: none; padding: 0; }
.cast__name { font-weight: 800; font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
.cast .label { margin-top: -4px; }
.cast li { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.cast .tfg-panel .tfg-char { --fig: 78%; left: 50%; right: auto; transform: translateX(-50%); }
@media (max-width: 1099px) { .cast { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.next-topic { margin-top: var(--space-6); font-size: 16px; }
.next-topic a { font-weight: 700; white-space: nowrap; }
.about-head { align-items: flex-start; }
.signoff { margin-top: var(--space-4); padding-top: var(--space-6); border-top: 3px solid var(--ink); display: flex; flex-direction: column; gap: var(--space-1); }
.signoff p { margin: 0; }
.signoff__name { font-weight: 800; font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
.signoff__role { font-size: 14px; line-height: 22px; color: var(--ink-3); }
.signoff__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.signoff__links a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.signoff__links a:hover, .signoff__links a:focus-visible { text-decoration-thickness: 2px; }
.signoff__links svg { flex: none; fill: currentColor; }
.about-head .avatar { border: 3px solid var(--ink); background: var(--comic-paper); }
.social { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--ink); color: var(--ink); background: var(--surface); }
.social svg { fill: currentColor; }
.social a:hover, .social a:focus-visible { background: var(--ink); color: var(--paper); }
.avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.who { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-8); align-items: start; }
@media (max-width: 599px) { .who { grid-template-columns: minmax(0, 1fr); } }
.list-plain { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.handles { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-6); }
.handles dt { font-weight: 600; }
.handles dd { margin: 0; color: var(--ink-2); }

/* Forms */
.form { display: flex; flex-direction: column; gap: var(--space-6); max-width: 560px; }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label, .field legend { font: 600 14px/20px var(--font-sans); }
.field .hint { font-size: 14px; line-height: 22px; color: var(--ink-3); }
.input { width: 100%; padding: 12px 14px; border: 2px solid var(--border-strong); border-radius: 0; background: var(--surface); color: var(--ink); font: 400 16px/24px var(--font-sans); }
textarea.input { min-height: 160px; resize: vertical; }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 16px; line-height: 24px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.error { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--ink); }
.done { border-top: 3px solid var(--border-strong); padding-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); max-width: 560px; }
.note { border-left: 0; padding: var(--space-4); background: var(--surface); border: 1px solid var(--rule); font-size: 14px; line-height: 22px; color: var(--ink-2); }
.steps { padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--space-2); color: var(--ink-2); }

/* Brand book */
.book { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-16); align-items: start; }
.toc { position: sticky; top: max(24px, env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: var(--space-2); font-size: 14px; line-height: 22px; }
.toc a { text-decoration: none; color: var(--ink-2); padding: 2px 0; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.book-body { display: flex; flex-direction: column; gap: var(--space-24); min-width: 0; }
.book-body section { display: flex; flex-direction: column; gap: var(--space-6); scroll-margin-top: 24px; }
.book-body section > p, .book-body section > ul { max-width: 65ch; }
.book-body ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--space-2); }
@media (max-width: 899px) {
  .book { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
}
.table-scroll { overflow-x: auto; max-width: 100%; }
.table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 22px; min-width: 520px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.table th { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-3); border-bottom: 2px solid var(--border-strong); }
.never { color: var(--danger); font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--space-4); }
.swatches figure { display: flex; flex-direction: column; gap: var(--space-2); }
.swatches .chip-colour { aspect-ratio: 3 / 2; border: 1px solid var(--rule); }
.swatches figcaption { font-size: 14px; line-height: 20px; }
.swatches code { font-size: 12px; }
.specimen { display: grid; gap: var(--space-4); border-top: 1px solid var(--rule); padding-top: var(--space-6); }
.specimen .hand { font-family: var(--font-hand); font-weight: 500; font-size: 32px; line-height: 38px; }
.logo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--space-4); }
.logo-tile { display: grid; place-items: center; min-height: 160px; padding: var(--space-8); border: 1px solid var(--rule); }
.logo-tile--paper { background: #FAF8F2; }
.logo-tile--ink { background: #000000; }
.logo-tile--scene { background: var(--scene-blue); }
.kit-note { border-top: 3px solid var(--border-strong); padding-top: var(--space-4); max-width: 65ch; display: flex; flex-direction: column; gap: var(--space-3); }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); margin-top: var(--section); }
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-8); flex-wrap: wrap; padding-block: var(--space-8) var(--space-6); }
.foot-logo { display: inline-flex; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); font-size: 14px; line-height: 22px; }
.foot-links a { text-decoration: none; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-base { display: flex; justify-content: space-between; gap: var(--space-2) var(--space-6); flex-wrap: wrap; padding-block: var(--space-4) var(--space-8); border-top: 1px solid var(--rule); font-size: 13px; line-height: 20px; color: var(--ink-3); }
.foot-base p { margin: 0; }
.foot-base a { color: inherit; }


@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

.print-only { display: none; }

/* Skip link */
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); top: 8px; z-index: 20; background: var(--paper); padding: 8px 12px; }

/* Article body from Markdown */
.prose ul, .prose ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: var(--space-2); }
.prose a { text-decoration-thickness: 1px; }
.prose pre { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); padding: var(--space-4); font: 400 14px/22px var(--font-mono); }
.prose pre code { border: 0; padding: 0; background: none; white-space: pre; }
.prose blockquote { margin: 0; padding-left: var(--space-4); border-left: 3px solid var(--border-strong); color: var(--ink-2); }
.prose img { height: auto; }
.prose h3 { font-weight: 700; font-size: 19px; line-height: 26px; margin-top: var(--space-4); }
.form-error { font-size: 14px; line-height: 22px; font-weight: 600; }

@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body { background: #FAF8F2; color: #000; }
  .site-head, .site-nav, .toc, .no-print, .skip { display: none !important; }
  .print-only { display: block; margin-bottom: 24px; }
  .book { grid-template-columns: minmax(0, 1fr); }
  .book-body { gap: 32px; }
  .book-body section { break-inside: auto; }
  .book-body h2 { break-before: page; }
  .book-body section:first-child h2 { break-before: auto; }
  .table-scroll { overflow: visible; }
  .table { min-width: 0; }
  .tfg-panel, .logo-tile, .swatches figure, tr { break-inside: avoid; }
  .site-foot { margin-top: 24px; break-inside: avoid; }
  .foot-grid { display: none; }
  a { text-decoration: none; }
}

/* Roadmap (Q-36): the twelve releases in reading order. Quiet rows on paper; the release colour lives only in its number and title. */
.roadmap { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.release { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-2) var(--space-6); padding-block: var(--space-8); border-bottom: 1px solid var(--rule); align-items: start; }
.release__no { font: 800 28px/32px var(--font-sans); letter-spacing: -0.02em; color: var(--tone, var(--ink)); font-variant-numeric: tabular-nums; }
.release__body { display: grid; gap: var(--space-3); min-width: 0; max-width: 68ch; }
.release__title { margin: 0; font-weight: 800; font-size: 24px; line-height: 30px; letter-spacing: -0.02em; color: var(--tone, var(--ink)); text-wrap: balance; }
.release__title a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.release__decide { margin: 0; font-size: 17px; line-height: 27px; color: var(--ink); }
.release__decide .label { display: block; margin-bottom: 2px; }
.release__parts { margin: 0; padding-left: 1.4em; display: grid; gap: 2px; font-size: 15px; line-height: 24px; color: var(--ink-2); }
.release__status { padding-top: 2px; }
.soon--sm { font-size: 22px; }
.roadmap__note { margin-top: var(--space-6); }
@media (max-width: 719px) {
  .release { grid-template-columns: 48px minmax(0, 1fr); }
  .release__no { font-size: 22px; line-height: 30px; }
  .release__status { grid-column: 2; }
}

/* Comic-first parts (D-157): panel, text, panel, text. */
.sofar { font-size: 17px; line-height: 28px; color: var(--ink-2); max-width: 65ch; margin: 0; }
.beats { display: flex; flex-direction: column; gap: var(--space-12); }
.beat { display: flex; flex-direction: column; gap: var(--space-4); }
.beat .tfg-panel { width: 100%; max-width: 640px; }
.beat__text { max-width: 65ch; display: flex; flex-direction: column; gap: var(--space-2); }
.beat__text p, .beat__text ul, .beat__text ol { margin: 0; }
.beat__text ul, .beat__text ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: var(--space-2); }
.beat__src { font-size: 13px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.beat__src a { color: inherit; }
.article--beats .tfg-takeaway { margin-top: var(--space-12); max-width: 30ch; }
.draft-note { border: 2px solid var(--ink); padding: var(--space-3) var(--space-4); font-size: 14px; line-height: 22px; max-width: 760px; }

/* Full comic (D-166): one column of panels, rows of three side by side, sources after the last panel */
.comic { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.comic-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .comic-row { grid-template-columns: minmax(0, 1fr); } }
.comic-sources { display: flex; flex-direction: column; gap: var(--space-2); font-size: 13px; line-height: 20px; color: var(--ink-3); }
.comic-sources ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 2px 14px; overflow-wrap: anywhere; }
.comic-sources a { color: var(--ink-3); }
.comic-text { font-size: 14px; color: var(--ink-2); max-width: 65ch; }
.comic-text summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.comic-text .prose { margin-top: var(--space-3); white-space: pre-line; }

/* Newsletter signup (D-186): a quiet block on paper, one per page. */
.subscribe { display: grid; gap: var(--space-4); padding: var(--space-6) 0; margin-top: var(--space-12); border-top: 3px solid var(--border-strong); max-width: 680px; }
.subscribe__text { display: grid; gap: var(--space-2); }
.subscribe__text p { margin: 0; }
.subscribe__form { display: grid; gap: var(--space-3); position: relative; }
.subscribe__row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.subscribe__row .input { flex: 1 1 220px; min-width: 0; }
.subscribe__row .btn { flex: 0 0 auto; }
.subscribe__done { display: grid; gap: var(--space-2); }
.subscribe__done p { margin: 0; }
