/* The Screenwriting Library's one stylesheet: the hub and every article page.
   Taken from the formatting guide (landing/how-to-format-a-screenplay.html),
   which keeps its own copy for its interactive page. Light only, like the rest
   of scriptopus.com. Copied to landing/screenwriting-library/assets/ by
   build.mjs. */

:root {
  --bg: #fafaf9;
  --bg-soft: #f4f4f3;
  --surface: #ffffff;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --line: #e7e7e6;
  --line-soft: #efefee;

  /* Greenlight: MUST stay in sync with DEFAULT_THEME in chrome.js. */
  --accent: #047857;
  --accent-deep: #065f46;
  --accent-bright: #059669;
  --accent-soft: #34d399;
  --accent-wash: #e7f4ee;
  --accent-ring: rgba(4, 120, 87, 0.15);

  --paper-shadow: 0 1px 2px rgba(24,24,27,0.06), 0 14px 34px -18px rgba(24,24,27,0.35);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --script: "Courier Prime", "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ───────────── opening ───────────── */
.top { padding: 52px 0 40px; }
.top-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; align-items: center; }
.top-grid.no-hero { grid-template-columns: minmax(0, 1fr); }
.top-grid.no-hero > div { max-width: 820px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent); margin: 0 0 14px; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.crumbs span { color: var(--faint); font-weight: 500; }
.eyebrow { font-size: 13.5px; font-weight: 600; color: var(--accent); margin: 0 0 14px; }
.top h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 600; letter-spacing: -0.022em; line-height: 1.03;
  margin: 0; text-wrap: balance;
}
.top .lede { font-size: 19.5px; line-height: 1.55; color: var(--ink-2); margin: 22px 0 0; max-width: 58ch; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); margin: 0 18px 3px -9px; vertical-align: middle; }
.top-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-page { position: relative; justify-self: center; width: min(100%, 380px); margin: 0; }
.hero-page.wide { width: min(100%, 460px); }
.hero-page img { width: 100%; height: auto; background: #fff; box-shadow: var(--paper-shadow); border-radius: 2px; }
.hero-page figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; font-family: var(--sans);
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:focus-visible, .dl-card:focus-visible, details.qa summary:focus-visible, .toc a:focus-visible,
.lib-card:focus-visible, .next-card:focus-visible, .journey-steps a:focus-visible, .calc input:focus-visible,
.term-filter input:focus-visible, .crumbs a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ───────────── the article ───────────── */
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 24px; }
.doc.no-toc { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: 96px; font-size: 14px; }
.toc p { margin: 0 0 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11.5px; color: var(--faint); padding-top: 2px; }
.toc a:hover { color: var(--ink); }
.toc a.is-here { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.toc a.is-here::before { color: var(--accent); }

.prose { min-width: 0; }
.prose section > *, .prose .pitch, .prose .onward { max-width: 720px; }
.prose section > .wide, .prose .pitch { max-width: none; }
.prose section { scroll-margin-top: 92px; padding-bottom: 28px; }
.prose section + section { border-top: 1px solid var(--line); padding-top: 56px; }
.prose h2 {
  font-family: var(--serif); font-size: clamp(30px, 3.4vw, 40px); font-weight: 600;
  letter-spacing: -0.018em; line-height: 1.1; margin: 0 0 22px; text-wrap: balance;
}
.prose h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.012em; margin: 44px 0 12px; scroll-margin-top: 92px; }
.prose h3 .aka { font-weight: 500; color: var(--muted); font-size: 16px; margin-left: 6px; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a:not(.btn):not(.dl-card):not(.next-card) { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(4,120,87,0.3); text-underline-offset: 0.18em; }
.prose a:not(.btn):not(.dl-card):not(.next-card):hover { text-decoration-color: currentColor; }
.prose ul.plain, .prose ol.plain { margin: 0 0 20px; padding-left: 22px; }
.prose ul.plain li, .prose ol.plain li { margin: 6px 0; }
.prose ul.plain li::marker, .prose ol.plain li::marker { color: var(--faint); }
.prose ol.plain li::marker { font-weight: 600; color: var(--muted); }
code, .slug { font-family: var(--script); font-size: 0.96em; color: var(--ink); background: var(--bg-soft); border: 1px solid var(--line-soft); padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
kbd { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }

/* A strip of a real page, full page width, with an inch ruler on top. */
.fig { margin: 28px 0 30px; }
.sheet { background: #fff; border-radius: 2px; box-shadow: var(--paper-shadow); overflow: hidden; }
.sheet img { width: 100%; height: auto; }
.ruler { display: block; width: 100%; height: 30px; overflow: visible; }
.ruler .tick { stroke: #c4c4c7; stroke-width: 1; }
.ruler .tick.major { stroke: #8e8e93; }
.ruler .mark line { stroke: var(--accent); stroke-width: 1.5; }
.ruler .mark path { fill: var(--accent); }
.ruler-labels { position: relative; height: 16px; margin-bottom: -2px; font: 600 11px var(--sans); color: var(--faint); }
.ruler-labels span { position: absolute; top: 0; transform: translateX(-50%); }
.ruler-labels span.zero { transform: none; }
.ruler-labels span.m { top: -1px; padding: 0 4px; border-radius: 4px; background: var(--bg); color: var(--accent); font-weight: 700; z-index: 1; }
.fig figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.fig figcaption b { color: var(--ink-2); font-weight: 600; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pair .label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trio .label, .quad .label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 10px 0 0; text-align: center; }
.quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }

/* A real screenshot of the app, framed lightly. */
.shot { margin: 26px 0 30px; }
.shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 18px 40px -26px rgba(24,24,27,0.45); background: var(--surface); }
.shot figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* How Scriptopus handles it: a note, not an advert. */
.app-note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; margin: 26px 0; padding: 18px 20px; border-radius: 14px; background: var(--accent-wash); border: 1px solid #cfe7dc; }
.app-note img { width: 22px; height: 22px; margin-top: 2px; }
.app-note p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.app-note p + p { margin-top: 8px; }
.app-note .who { display: block; font-size: 13px; font-weight: 700; color: var(--accent-deep); margin-bottom: 3px; }

.aside-note { margin: 24px 0; padding: 16px 20px; border-left: 3px solid var(--line); background: var(--surface); border-radius: 0 12px 12px 0; }
.aside-note p { margin: 0; font-size: 15.5px; }
.aside-note p + p { margin-top: 8px; }

/* Worked examples set apart from the prose: a logline, a beat, a paragraph of treatment. */
.example { margin: 22px 0 26px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.example .ex-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.example p { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.55; color: var(--ink); }
.example p + p { margin-top: 12px; }
.example.prose-sample p { font-family: var(--sans); font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.examples { list-style: none; margin: 18px 0 26px; padding: 0; border-top: 1px solid var(--line); }
.examples li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.examples .ex-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.examples .ex-title small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.examples .ex-line { font-family: var(--serif); font-size: 18.5px; line-height: 1.5; color: var(--ink); }
.examples .ex-why { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.formula { margin: 22px 0 26px; padding: 22px 24px; border-radius: 16px; background: var(--ink); color: #f4f4f5; font-family: var(--serif); font-size: 21px; line-height: 1.55; }
.formula b { color: var(--accent-soft); font-weight: 600; }
.formula small { display: block; margin-top: 10px; font-family: var(--sans); font-size: 13px; color: #a1a1aa; }

/* tables */
.measures { width: 100%; border-collapse: collapse; margin: 8px 0 26px; font-size: 15px; }
.measures th, .measures td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.measures th { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.measures td { color: var(--ink-2); }
.measures td:first-child { color: var(--ink); font-weight: 600; }
.measures td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* The beat sheet's page calculator. */
.calc { margin: 22px 0 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.calc-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 22px; margin-bottom: 14px; }
.calc label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.calc input { font: 600 18px var(--sans); width: 120px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-variant-numeric: tabular-nums; }
.calc .presets { display: flex; flex-wrap: wrap; gap: 8px; }
.calc .presets button { font: 600 13px var(--sans); color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.calc .presets button:hover { border-color: var(--ink-2); }
.calc .presets button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.calc th, .calc td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-soft); }
.calc th { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.calc td.num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); font-weight: 600; }
.calc .note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* The running-time estimate on /how-long-is-a-screenplay. */
.calc select { font: 600 16px var(--sans); padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.calc .calc-result { margin: 4px 0 0; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); }
.calc .calc-result small { display: block; margin-top: 6px; font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); line-height: 1.5; }

/* The title page maker. */
.tp-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin: 18px 0 8px; }
.tp-form { display: grid; gap: 14px; }
.tp-form label, .tp-form fieldset { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tp-form fieldset { border: 0; margin: 0; padding: 0; }
.tp-form legend { padding: 0; margin-bottom: 6px; }
.tp-form small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.tp-form input[type="text"], .tp-form select, .tp-form textarea { font: 500 15px var(--sans); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%; }
.tp-form textarea { resize: vertical; line-height: 1.5; }
.tp-form input:focus-visible, .tp-form select:focus-visible, .tp-form textarea:focus-visible, .tp-form .seg-row input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tp-form .pair-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tp-form .seg-row { display: flex; flex-wrap: wrap; gap: 10px 18px; font-weight: 500; }
.tp-form .seg-row label, .tp-form .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.tp-form input[type="radio"], .tp-form input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; }
.tp-preview { position: sticky; top: 96px; display: grid; gap: 14px; }
.tp-sheet { position: relative; width: 100%; aspect-ratio: 8.5 / 11; background: #fff; box-shadow: var(--paper-shadow); border-radius: 2px; container-type: inline-size; overflow: hidden; color: #111; }
.tp-sheet[data-paper="a4"] { aspect-ratio: 210 / 297; }
.tp-sheet .tp-in { position: absolute; inset: 0; font-family: var(--script); font-size: 1.96cqw; line-height: 1; }
.tp-sheet[data-paper="a4"] .tp-in { font-size: 2.015cqw; }
/* Measured in 12-point lines (1em) from the paper's top and left, to land
   where the app's Industry Standard cover prints them (the title page guide's
   four examples): the title on line 19, the contact block ending on line 52. */
.tp-sheet .tp-in p { margin: 0; font-size: inherit; line-height: inherit; color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.tp-sheet .tp-top { position: absolute; left: 9em; right: 6em; top: 19em; text-align: center; }
.tp-sheet .tp-top p + p { margin-top: 0.8em; }
.tp-sheet .tp-top p.gap { margin-top: 2.7em; }
.tp-sheet .tp-top p.tp-title { text-transform: uppercase; }
.tp-sheet .tp-top p.tp-title.big { font-size: 1.667em; }
.tp-sheet .tp-top p.tp-title.bold { font-weight: 700; }
.tp-sheet .tp-top p.tp-title + p { margin-top: 3.2em; }
.tp-sheet .tp-top p.tp-title:not(.big) + p { margin-top: 3.85em; }
.tp-sheet .tp-contact { position: absolute; left: 9em; right: 6em; top: 0; height: 52.35em; display: flex; flex-direction: column; justify-content: flex-end; }
.tp-sheet .tp-contact p + p { margin-top: 0.8em; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.prose .tp-note { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) {
  .tp-tool { grid-template-columns: minmax(0, 1fr); }
  .tp-preview { position: static; }
}
/* Printing the maker's page prints the sheet alone: library.js copies it into
   #tp-print-root before the print dialog opens and removes it afterwards. */
#tp-print-root { display: none; }
@media print {
  body.tp-printing > *:not(#tp-print-root) { display: none; }
  body.tp-printing > #tp-print-root { display: block; }
  #tp-print-root .tp-sheet { width: 8.5in; height: 11in; aspect-ratio: auto; box-shadow: none; border-radius: 0; }
  #tp-print-root .tp-sheet[data-paper="a4"] { width: 210mm; height: 297mm; }
  #tp-print-root .tp-sheet .tp-in { font-size: 12pt; }
}

/* The glossary. */
.term-filter { margin: 4px 0 26px; }
.term-filter input { width: 100%; max-width: 420px; font: 500 16px var(--sans); padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.term-filter .count { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
dl.terms { margin: 6px 0 0; border-top: 1px solid var(--line); }
dl.terms > div { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 4px 22px; padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 92px; }
dl.terms > div:target { background: var(--accent-wash); margin: 0 -12px; padding: 14px 12px; border-radius: 10px; }
dl.terms dt { font-family: var(--script); font-weight: 700; font-size: 16px; color: var(--ink); }
dl.terms dt small { display: block; font-family: var(--sans); font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
dl.terms dd { margin: 0; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
dl.terms dd p { font-size: 16px; margin: 0; }
dl.terms dd p + p { margin-top: 8px; }

/* downloads */
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 10px 0 0; }
.prose section > .downloads { max-width: none; }
.dl-group { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dl-group h3 { margin: 0; font-size: 18px; }
.dl-group p { margin: 0; font-size: 15px; line-height: 1.6; }
.dl-group .files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.dl-card { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); background: var(--bg); }
.dl-card:hover { border-color: var(--ink); }
.dl-card svg { color: var(--accent); flex: none; }
.dl-card small { font-weight: 500; color: var(--muted); }

/* questions */
.qa-list { margin: 8px 0 0; }
details.qa { border-top: 1px solid var(--line); }
details.qa:last-child { border-bottom: 1px solid var(--line); }
details.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; flex: none; font-size: 22px; font-weight: 400; color: var(--muted); transition: transform 0.18s; }
details.qa[open] summary::after { transform: rotate(45deg); }
details.qa .ans { padding: 0 0 20px; }
details.qa .ans p { font-size: 16px; }
details.qa .ans p:last-child { margin-bottom: 0; }

.sources { margin: 6px 0 0; padding-left: 20px; }
.sources li { font-size: 15px; line-height: 1.6; margin: 8px 0; }

/* where to go next */
.onward { margin-top: 56px; display: grid; gap: 22px; }
.next-card { display: grid; gap: 4px; padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.15s; }
.next-card:hover { border-color: var(--accent); }
.next-label { font-size: 13px; font-weight: 600; color: var(--accent); }
.next-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.next-title svg { color: var(--accent); }
.next-text { font-size: 15px; color: var(--muted); line-height: 1.55; }
.prose .related .related-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.related ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.related li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.related li a { font-size: 16px; }
.related li span { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* the close */
.pitch { margin-top: 64px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 46px 44px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.pitch h2 { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.018em; line-height: 1.08; margin: 0; }
.pitch p { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 16px 0 0; max-width: 52ch; }
.pitch .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.pitch ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.pitch li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.pitch li svg { color: var(--accent); margin-top: 2px; }
.pitch li strong { color: var(--ink); font-weight: 600; }

/* ───────────── the hub ───────────── */
.hub-top .lede { max-width: 62ch; }
.hub-top h1 { max-width: 16ch; }
.hub { display: grid; gap: 64px; padding-top: 8px; }
.hub h2 { font-family: var(--serif); font-size: clamp(28px, 3vw, 36px); font-weight: 600; letter-spacing: -0.018em; line-height: 1.1; margin: 0; }
.journey > p { margin: 10px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.journey-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.journey-steps li { counter-increment: step; }
.journey-steps a, .journey-steps li.soon { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.journey-steps a:hover { border-color: var(--accent); }
.journey-steps li.soon { background: transparent; border-style: dashed; }
.j-name { font-family: var(--script); font-weight: 700; font-size: 14px; text-transform: uppercase; color: var(--ink); }
.j-name::before { content: counter(step) ". "; color: var(--faint); font-weight: 400; }
.j-page { font-size: 14px; color: var(--accent); font-weight: 600; line-height: 1.4; }
.soon .j-page { color: var(--faint); font-weight: 500; }
.shelf { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 28px 48px; align-items: start; padding-top: 40px; border-top: 1px solid var(--line); scroll-margin-top: 92px; }
.shelf-head p { margin: 10px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lib-card { display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.15s; }
.lib-card:hover { border-color: var(--accent); }
.lib-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.lib-text { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.lib-formats { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hub-note { max-width: 760px; }
.hub-note p { margin: 12px 0 0; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.hub .prose .pitch { margin-top: 0; }

#site-footer-space { height: 96px; }

/* ───────────── responsive ───────────── */
@media (max-width: 980px) {
  .top-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-page { width: min(100%, 340px); }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; margin: 0 0 40px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
  .toc ol { border-left: 0; columns: 2; column-gap: 20px; }
  .toc a { padding-left: 0; border-left: 0; }
  .pitch { grid-template-columns: minmax(0, 1fr); padding: 36px 28px; }
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .journey-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .top { padding: 36px 0 26px; }
  .top .lede { font-size: 17.5px; }
  .toc ol { columns: 1; }
  .prose p, .prose li { font-size: 16.5px; }
  .prose section + section { padding-top: 44px; }
  .pair, .trio, .quad, .downloads, .lib-grid { grid-template-columns: minmax(0, 1fr); }
  .meta span + span::before { display: none; }
  code, .slug { white-space: normal; overflow-wrap: anywhere; }
  .measures { font-size: 13.5px; }
  .measures td.num { white-space: normal; }
  dl.terms > div { grid-template-columns: minmax(0, 1fr); }
  /* On a phone a whole page width makes Courier too small to read: zoom the
     strips (and their rulers) to the text column, as the guide does. */
  .fig.zoom { overflow: hidden; }
  .fig.zoom .ruler, .fig.zoom .ruler-labels, .fig.zoom .sheet img { width: 130.8%; margin-left: -19.2%; max-width: none; }
  .fig.zoom .ruler-labels span.zero { display: none; }
  .formula { font-size: 18.5px; padding: 18px 18px; }
  .pitch { margin-top: 52px; padding: 30px 22px; border-radius: 20px; }
  .pitch .actions .btn { flex: 1 1 100%; }
  .hub { gap: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, details.qa summary::after, .lib-card, .next-card { transition: none; }
}
