/* Generated by web/build.mjs from design/tokens.json. Do not edit. */
:root {
  --paper: #F6F4EF;
  --sheet: #EFEDE5;
  --ink: #181611;
  --graphite: #615D57;
  --rule: #C7C4BC;
  --grid: #CEE5D7;
  --accent: #0B764D;
  --active: #C06325;
  --message: #2E69B2;
  --breaks: #B8402F;
  --night: #110F0D;
  --night-sheet: #1A1815;
  --night-text: #EAE8E0;
  --night-dim: #94928B;
  --night-rule: #3A3833;
  --night-accent: #68D7A1;
  --night-active: #F0995B;
  --night-message: #73B0EE;
  --night-breaks: #EE7B67;
  --leather: #21593F;
  --leather-dark: #103C28;
  --title-label: #521615;
  --brass: #E8BE62;
  --gilt: #F7DC86;
  --gilt-shade: #C9962E;
  --brass-ink: #8A6420;
  --plate-ink: #2B1D08;
  --index-card: #FBF7EC;
  --index-card-edge: #C9BC9A;
  --index-card-rule: #D9E6EE;
  --pages: #EDDCB9;
  --spine-label: #F5ECD7;
  --board: #26332E;
  --board-sheet: #2D3B35;
  --board-frame: #6B4A2E;
  --chalk: #EDEBE3;
  --chalk-dim: #A7B0AA;
  --chalk-rule: #4A5A53;
  --chalk-pen: #F4D77A;
  --chalk-active: #F6A65B;
  --chalk-message: #9CC9F2;
  --chalk-breaks: #FF6B6B;
  --shelf: #6B4A2E;
  --shelf-lip: #8A6240;
  --shelf-face: #4A321F;
  --shelf-back: #24180F;
  --shelf-back-lit: #4A3322;
  --lamp: #F2C77B;
  --oak: #C59A6C;
  --oak-lip: #D8B184;
  --oak-face: #B88A5C;
  --oak-back: #DCC29C;
  --oak-back-lit: #ECDABA;
  --aged-paper: #F2E8D2;
  --aged-paper-edge: #CDBE98;
  --spine-navy: #1F3550;
  --spine-plum: #5B2B4A;
  --spine-slate: #2F4A55;
  --spine-ochre: #6A4A1F;
  --spine-moss: #4A5B3A;
  --size-display: 34px;
  --size-title: 24px;
  --size-body: 17px;
  --size-note: 15px;
  --size-label: 12px;
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 12px;
  --space-l: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --radius-card: 16px;
  --radius-control: 12px;
  --min-touch: 44px;
  --background: #F6F4EF;
  --surface: #EFEDE5;
  --divider: #C7C4BC;
  --text-primary: #181611;
  --text-secondary: #615D57;
  --accent: #0B764D;
  --button: #181611;
  --on-button: #F6F4EF;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #110F0D;
    --surface: #1A1815;
    --divider: #3A3833;
    --text-primary: #EAE8E0;
    --text-secondary: #94928B;
    --accent: #68D7A1;
    --button: #EAE8E0;
    --on-button: #110F0D;
  }
}

/* Pip's site. Colours come from tokens (design/tokens.json → the generated block above this one). */

@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-600-italic.woff2) format("woff2"); font-weight: 500 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url(/fonts/Geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/GeistMono.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/fonts/Caveat.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
/* Fallbacks sized close to the real faces, so the swap doesn't move the page. */
@font-face { font-family: "Serif Fallback"; src: local("Georgia"); size-adjust: 96%; ascent-override: 98%; descent-override: 31%; }
@font-face { font-family: "Sans Fallback"; src: local("Helvetica Neue"), local("Arial"); size-adjust: 101%; }

:root {
  --serif: "Source Serif 4", "Serif Fallback", Georgia, serif;
  --sans: "Geist", "Sans Fallback", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;
  --pen: var(--accent);
  --wood-back: #2A1D14;
  --wood-back-2: #1E150F;
  --page-max: 1120px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--background);
  color: var(--text-primary);
  font: 400 var(--size-body)/1.55 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.pen { font-family: var(--hand); color: var(--pen); font-weight: 500; }
.visually-hidden, .trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--button); color: var(--on-button); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--min-touch); padding: 0 20px;
  font: 600 16px/1 var(--sans); letter-spacing: 0.01em;
  color: var(--on-button); background: var(--button);
  border: 1px solid var(--button); border-radius: var(--radius-control);
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--text-primary); border-color: var(--divider); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------------------------------------------------------------- header */

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--divider) 60%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 22px/1 var(--serif); }
.brand img { border-radius: 7px; }
.top nav { display: none; gap: 22px; margin-left: auto; font-size: 15px; color: var(--text-secondary); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--text-primary); }
.top .btn { margin-left: auto; }
@media (min-width: 760px) { .top nav { display: flex; } .top .btn { margin-left: 8px; } }

/* ---------------------------------------------------------------- sections */

main > section { padding: 64px var(--gutter); }
.section-head, .how, .hero, .journal-grid, .short-row, .bookcase { max-width: var(--page-max); margin-inline: auto; }
.section-head { margin-bottom: 28px; }
.section-title { font-size: clamp(28px, 5vw, 40px); }
.section-sub { margin-top: 10px; max-width: 60ch; color: var(--text-secondary); font-family: var(--serif); font-size: 18px; }

/* ---------------------------------------------------------------- hero */

.hero > * { min-width: 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px !important; align-items: center; }
.eyebrow { font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary); }
.hero h1 { margin-top: 14px; font-size: clamp(42px, 10.5vw, 76px); letter-spacing: -0.02em; }
.lede { margin-top: 16px; font: 400 clamp(19px, 2.6vw, 23px)/1.45 var(--serif); color: var(--text-secondary); max-width: 34ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.margin-note { margin-top: 26px; font-size: 24px; line-height: 1.1; transform: rotate(-2deg); max-width: 22ch; }
.margin-note::before { content: "“"; }
.margin-note::after { content: "”"; }

.hero-case { position: relative; padding-bottom: 36px; }
.hero-shelf .index-card { margin-top: 4px; }
.case-back {
  position: relative; overflow: hidden;
  border-radius: 10px;
  padding: 26px 18px 0;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(247, 220, 134, .26), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--wood-back), var(--wood-back-2));
  box-shadow: inset 0 0 0 6px #3a2819, inset 0 0 0 7px rgba(0,0,0,.4), 0 24px 50px -24px rgba(0,0,0,.6);
}
.hero-case .books { justify-content: flex-start; flex-wrap: nowrap; overflow: hidden; overflow: clip; }
.prof {
  pointer-events: none;
  position: absolute; right: 2%; bottom: 0; width: clamp(150px, 42%, 250px); height: auto;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.35));
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 48px; padding-top: 72px !important; padding-bottom: 88px !important; }
  .hero-case { padding-bottom: 48px; }
  .hero-case .books { zoom: 1.22; }
  .case-back { padding-top: 34px; }
  .prof { right: -7%; bottom: 4px; width: 48%; }
}

/* ---------------------------------------------------------------- books and shelves */

.shelf-row { position: relative; }
.books { display: flex; align-items: flex-end; gap: 2px; min-height: 226px; padding: 0 6px; }
.book {
  --w: 34px; --h: 170px; --c: var(--leather);
  position: relative; flex: none;
  width: var(--w); height: var(--h);
  padding: 0; border: 0; border-radius: 3px 3px 2px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding-block: 10px 8px;
  color: var(--gilt);
  background:
    linear-gradient(90deg, rgba(0,0,0,.42) 0, rgba(0,0,0,0) 22%, rgba(255,240,210,.13) 44%, rgba(0,0,0,0) 62%, rgba(0,0,0,.45) 100%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18)),
    var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 2px 0 3px rgba(0,0,0,.35);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease;
  font: inherit;
}
button.book { cursor: pointer; }
/* Raised bands, each with a gilt rule above and below. */
.book .band {
  display: block; width: 100%; height: 7px; flex: none;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(255,240,210,.22) 45%, rgba(0,0,0,.5));
  border-block: 1px solid color-mix(in srgb, var(--gilt) 70%, transparent);
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
}
.book .label {
  flex: 1; display: flex; align-items: center; justify-content: center;
  width: calc(100% - 8px); margin-block: 6px; padding: 6px 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--title-label) 92%, white), var(--title-label));
  border: 1px solid var(--gilt-shade);
  box-shadow: inset 0 0 0 2px var(--title-label), inset 0 0 0 3px color-mix(in srgb, var(--gilt) 60%, transparent), 0 1px 1px rgba(0,0,0,.4);
  border-radius: 1px;
  overflow: hidden;
}
.book .label span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 600 10.5px/1.08 var(--serif); letter-spacing: .02em; color: var(--gilt);
  max-height: 100%; max-width: 100%; overflow: hidden; white-space: normal; text-align: center; text-wrap: balance;
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
.book .yr { font: 500 9px/1 var(--mono); color: color-mix(in srgb, var(--gilt) 85%, transparent); margin-block: 4px; }
.book.pamphlet {
  justify-content: center; border-radius: 1px;
  background: linear-gradient(90deg, rgba(0,0,0,.2), rgba(255,255,255,.12) 50%, rgba(0,0,0,.25)), var(--pages);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), 1px 0 2px rgba(0,0,0,.3);
}
.book .p-label { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 8.5px/1 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; max-height: 92%; }
button.book:hover, button.book:focus-visible { transform: translateY(-8px); }
button.book.out { transform: translateY(-26px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 12px 18px rgba(0,0,0,.45); }
button.book:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }
/* A book found from the hero's card glows gilt for a moment. */
button.book.lit { animation: book-lit 2.4s ease-out; }
@keyframes book-lit {
  0%, 35% { box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 0 0 3px var(--gilt), 0 0 26px 6px color-mix(in srgb, var(--gilt) 70%, transparent); }
  100% { box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 12px 18px rgba(0,0,0,.45); }
}
@media (prefers-reduced-motion: reduce) { .book { transition: none; } button.book.lit { animation-duration: 3s; } }

.plank {
  position: relative; height: 26px; margin-inline: -18px;
  background:
    repeating-linear-gradient(178deg, rgba(0,0,0,.08) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #8a6340 0, var(--shelf) 22%, #4f3520 100%);
  box-shadow: 0 10px 14px -6px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,225,170,.25);
  display: flex; align-items: center; justify-content: center;
}
.plate {
  font: 600 9.5px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--brass-ink);
  padding: 4px 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gilt), var(--brass) 45%, var(--gilt-shade));
  box-shadow: inset 0 0 0 1px rgba(90,60,20,.55), 0 1px 1px rgba(0,0,0,.5);
  text-shadow: 0 1px 0 rgba(255,240,200,.5);
  white-space: nowrap;
}

/* The library: one case per region, in warm light. */
.library { background: linear-gradient(180deg, var(--background), var(--surface)); }
.bookcase {
  padding: 22px 18px 18px;
  border-radius: 12px;
  background:
    radial-gradient(90% 40% at 50% 0, rgba(247, 220, 134, .2), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--wood-back), var(--wood-back-2));
  box-shadow: inset 0 0 0 8px #3a2819, inset 0 0 0 9px rgba(0,0,0,.45), 0 30px 60px -30px rgba(0,0,0,.6);
}
.bookcase { display: flex; flex-wrap: wrap; gap: 26px 0; }
.case { flex: 1 1 auto; min-width: min(100%, 220px); position: relative; padding-inline: 8px; display: flex; flex-direction: column; }
.case .shelf-row { flex: 1; display: flex; align-items: flex-end; }
.case .books { width: 100%; }
.case + .case { box-shadow: inset 8px 0 0 -4px #3a2819; }
@media (max-width: 719px) { .case { flex-basis: 100%; } .case + .case { box-shadow: none; } }
.case .plank { margin-inline: -8px; }
.case .books { flex-wrap: nowrap; justify-content: safe center; padding-top: 34px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #5a4330 transparent; }
.case .shelf-row { background: radial-gradient(70% 90% at 50% 0, rgba(247, 220, 134, .08), transparent 70%); }
.index-card {
  position: relative; margin: 16px auto 4px; max-width: 520px;
  padding: 16px 18px 14px;
  color: var(--ink);
  background:
    linear-gradient(transparent 39px, var(--breaks) 39px, var(--breaks) 40px, transparent 40px) no-repeat,
    repeating-linear-gradient(transparent 0 23px, var(--index-card-rule) 23px 24px),
    var(--index-card);
  background-position: 0 0, 0 16px, 0 0;
  border: 1px solid var(--index-card-edge);
  border-radius: 3px;
  box-shadow: 0 10px 22px -10px rgba(0,0,0,.6);
  transform: rotate(-.5deg);
}
.index-card .ic-meta { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.index-card h3 { margin-top: 12px; font-size: 21px; }
.index-card .ic-first { margin-top: 8px; font-family: var(--serif); font-size: 15.5px; color: #3a362f; }
.index-card .ic-first .mono { font-size: 11px; letter-spacing: .06em; color: var(--graphite); }
.index-card .ic-foot { margin-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.index-card .ic-foot .mono { font-size: 12px; color: var(--graphite); }
.index-card .ic-foot .pen { color: var(--accent); font-size: 23px; }
@media (prefers-color-scheme: dark) { .index-card .ic-foot .pen { color: #0B764D; } }
.index-card .ic-link { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--index-card-edge); font-size: 15px; }
.index-card .ic-link a { display: inline-flex; min-height: 32px; align-items: center; color: var(--ink); font-weight: 600; text-decoration-color: #0B764D; text-underline-offset: 3px; }
.index-card .ic-link a:focus-visible { outline-color: #0B764D; }

/* ---------------------------------------------------------------- how it works */

.how .steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 28px; }
@media (min-width: 820px) { .how .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps li { padding: 18px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid color-mix(in srgb, var(--divider) 60%, transparent); }
.step-art { width: 100%; height: auto; aspect-ratio: 220 / 140; margin-bottom: 14px; }
.steps h3 { font-size: 21px; display: flex; gap: 10px; align-items: baseline; }
.steps .num { font-size: 12px; color: var(--text-secondary); border: 1px solid var(--divider); border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; flex: none; transform: translateY(-2px); }
.steps p { margin-top: 8px; color: var(--text-secondary); }
.card-paper { fill: var(--index-card); stroke: var(--index-card-edge); }
.card-rule { stroke: var(--breaks); stroke-width: .8; opacity: .6; }
.card-ink { fill: var(--ink); }
.card-dim { fill: var(--graphite); }
.card-pen { fill: #0B764D; font-family: var(--hand); }
.mini-frame { fill: var(--board-frame); }
.mini-board { fill: var(--board); }
.mini-link { stroke: var(--chalk-rule); stroke-width: 1.5; }
.mini-link.dash { stroke-dasharray: 4 4; stroke: var(--chalk-dim); }
.mini-node { fill: none; stroke-width: 1.5; }
.mini-node.blue { stroke: var(--chalk-message); }
.mini-node.orange { stroke: var(--chalk-active); }
.chalk-blue { fill: var(--chalk-message); }
.chalk-orange { fill: var(--chalk-active); }
.chalk-pen { fill: var(--chalk-pen); font-family: var(--hand); }
.mini-x { stroke: var(--chalk-breaks); stroke-width: 2.5; stroke-linecap: round; }
.journal-paper { fill: var(--pages); stroke: color-mix(in srgb, var(--index-card-edge) 80%, black); }
.journal-band { fill: var(--leather); }
.journal-gilt { fill: var(--gilt); }
.pen-circle { fill: none; stroke: #0B764D; stroke-width: 1.6; stroke-dasharray: 340; transform: rotate(-4deg); transform-origin: 110px 70px; }
text.pen { font-family: var(--hand); }

/* ---------------------------------------------------------------- the board */

.board-section { background: var(--surface); }
.board-frame {
  position: relative; max-width: 860px; margin-inline: auto;
  padding: 12px; border-radius: 14px;
  background: linear-gradient(180deg, #7c5838, var(--board-frame) 40%, #563b24);
  box-shadow: inset 0 1px 0 rgba(255,225,170,.3), 0 30px 60px -28px rgba(0,0,0,.6);
}
.board {
  position: relative; border-radius: 6px; padding: 20px 18px 22px;
  color: var(--chalk);
  background:
    radial-gradient(120% 80% at 30% 0, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(100% 100% at 50% 50%, var(--board-sheet), var(--board));
  box-shadow: inset 0 0 40px rgba(0,0,0,.45);
}
.b-head { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-dim); }
.b-year { color: var(--chalk-pen); margin-right: 10px; }
.b-caption { margin-top: 12px; font-size: clamp(18px, 2.6vw, 22px); line-height: 1.4; font-weight: 600; min-height: 5.6em; color: var(--chalk); }
.b-caption.playing { opacity: .55; transition: opacity .3s; }
.chalkboard { width: 100%; height: auto; aspect-ratio: 400 / 300; margin-top: 8px; }
.chalkboard .link { stroke: var(--chalk-rule); stroke-width: 2; }
.chalkboard .link.slow { stroke-dasharray: 5 6; stroke: var(--chalk-dim); }
.chalkboard .node rect { fill: none; stroke-width: 2.2; }
.chalkboard .mono { font-family: var(--mono); }
.chalkboard .serif { font-family: var(--serif); }
.chalkboard .dim { fill: var(--chalk-dim); }
.chalkboard .pen { fill: var(--chalk-pen); font-family: var(--hand); }
.chalkboard .pen.breaks { fill: var(--chalk-breaks); }
.chalkboard .slow-msg { cursor: pointer; }
.chalkboard .slow-msg circle:first-child { stroke: var(--chalk); stroke-width: 1.5; }
.b-controls { display: grid; gap: 14px; margin-top: 10px; align-items: center; }
@media (min-width: 900px) {
  .board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 28px; grid-template-areas: "head svg" "story svg" "controls svg" "credit svg" "hint svg"; align-content: start; padding: 26px; }
  .b-head { grid-area: head; } .b-story { grid-area: story; } .b-controls { grid-area: controls; align-self: end; }
  .b-credit { grid-area: credit; } .b-hint { grid-area: hint; } .chalkboard { grid-area: svg; align-self: center; margin-top: 0; }
  .board-frame { max-width: 1040px; }
}
.chalk-btn { background: var(--chalk); color: var(--board); border-color: var(--chalk); min-width: 150px; }
.b-slider { display: grid; gap: 6px; font-size: 12px; color: var(--chalk-dim); }
.b-range { display: flex; align-items: center; gap: 10px; }
.b-range output { min-width: 52px; color: var(--chalk-message); font-size: 14px; }
.b-slow { flex: 1; accent-color: var(--chalk-message); height: var(--min-touch); }
.b-rules { display: flex; gap: 8px; }
.chip {
  min-height: var(--min-touch); padding: 0 14px; border-radius: 999px;
  font: 500 14px/1 var(--sans); color: var(--chalk-dim);
  background: transparent; border: 1px solid var(--chalk-rule); cursor: pointer;
}
.chip[aria-pressed="true"] { color: var(--board); background: var(--chalk-pen); border-color: var(--chalk-pen); }
.chip:disabled, .b-slow:disabled { opacity: .5; cursor: default; }
.b-credit { margin-top: 16px; font: italic 400 16px/1.45 var(--serif); color: var(--chalk-dim); }
.b-credit .mono { font-style: normal; color: var(--chalk-pen); font-size: 13px; margin-right: 6px; }
.b-hint { margin-top: 12px; font-size: 20px; color: var(--chalk-pen); opacity: .85; }
.board:not(.live-ready) .b-hint { visibility: hidden; }
.board.live-failed .b-caption::after { content: " (The live board needs JavaScript; the app has the full chapter.)"; color: var(--chalk-dim); font-weight: 400; }
.tray { position: absolute; right: 22px; bottom: -6px; transform: translateY(40%); }
.tray img { width: 78px; height: auto; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
@media (min-width: 720px) { .tray img { width: 92px; } }

/* ---------------------------------------------------------------- journals */

.journal-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.journal {
  position: relative; display: flex; flex-direction: column;
  min-height: 380px; padding: 18px 20px 18px;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(80% 60% at 90% 100%, rgba(120,80,30,.12), transparent 70%),
    var(--pages);
  border-radius: 2px 6px 6px 2px;
  box-shadow: inset 6px 0 0 rgba(0,0,0,.08), inset 7px 0 0 rgba(255,255,255,.35), 0 18px 30px -18px rgba(0,0,0,.55), 0 1px 0 rgba(0,0,0,.1);
}
.masthead { display: flex; justify-content: space-between; font: 600 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #5a4a30; padding-bottom: 8px; border-bottom: 2px solid #5a4a30; }
.j-band {
  display: flex; justify-content: space-between; margin: 6px -20px 0; padding: 7px 20px;
  font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gilt); background: var(--band);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(0,0,0,.3);
}
.journal h3 { margin-top: 22px; font-size: 22px; line-height: 1.2; text-align: center; text-wrap: balance; }
.j-by { margin-top: 10px; text-align: center; font: italic 400 14px/1.4 var(--serif); color: #5a4a30; }
.fleuron { margin: 14px 0 6px; text-align: center; color: #8a6420; font-size: 18px; }
.j-pip { font-family: var(--hand); color: #0B764D; font-size: 20px; line-height: 1.15; text-align: center; }
.j-links { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-top: 1px solid rgba(90,74,48,.35); }
.j-links a { min-height: 32px; display: inline-flex; align-items: center; }
.j-play { font-weight: 600; text-decoration-color: #0B764D; text-underline-offset: 3px; }
.j-orig { color: #5a4a30; text-decoration: none; }

/* ---------------------------------------------------------------- shorts */

.shorts { background: var(--surface); }
.short-row { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.short { margin: 0; flex: none; width: min(68vw, 280px); scroll-snap-align: start; }
.phone {
  position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  background: var(--board); border: 6px solid #15130f;
  box-shadow: 0 20px 40px -22px rgba(0,0,0,.6);
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.sound {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0;
  font: 600 14px/1 var(--sans); color: var(--board); background: var(--chalk); cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.sound[aria-pressed="true"] { background: var(--chalk-pen); }
.short figcaption { margin-top: 10px; font-family: var(--serif); font-size: 16px; }
.short figcaption .mono { font-size: 12px; color: var(--text-secondary); margin-right: 6px; }
.soon .phone { display: grid; place-items: center; background: radial-gradient(100% 100% at 50% 40%, var(--board-sheet), var(--board)); }
.soon-card { display: grid; gap: 10px; text-align: center; padding: 20px; color: var(--chalk); }
.soon-card .mono { color: var(--chalk-pen); font-size: 13px; letter-spacing: .1em; }
.soon-card .serif { font-size: 22px; font-weight: 600; line-height: 1.2; }
.soon-card .pen { color: var(--chalk-pen); font-size: 22px; }
.soon figcaption { color: var(--text-secondary); }

/* The reel strip (hidden for now): three or four shorts side by side, scrolling sideways on a phone. */
.reels { background: var(--surface); padding-top: 0 !important; }
.reel-strip { list-style: none; padding: 0 0 12px; margin: 0 auto; max-width: var(--page-max); display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 240px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
@media (min-width: 1000px) { .reel-strip { grid-auto-columns: 1fr; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); } }
.reel { scroll-snap-align: start; }
.reel-phone { display: block; width: 100%; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.reel-phone:disabled { cursor: default; }
.reel.soon .reel-phone { display: grid; place-items: center; background: radial-gradient(100% 100% at 50% 40%, var(--board-sheet), var(--board)); }
.reel-sound { position: absolute; right: 10px; top: 10px; padding: 5px 9px; border-radius: 999px; font-size: 11px; letter-spacing: .06em; color: var(--chalk); background: rgba(0,0,0,.45); }
.reel.soon .reel-sound { display: none; }
.reel-phone[aria-pressed="true"] .reel-sound { color: var(--board); background: var(--chalk-pen); }
.reel-cap { margin-top: 10px; font-family: var(--serif); font-size: 16px; }
.reel-cap .mono { font-size: 12px; color: var(--text-secondary); margin-right: 6px; }

/* ---------------------------------------------------------------- waitlist */

.waitlist-section { padding-block: 88px !important; }
.letter {
  position: relative; max-width: 620px; margin-inline: auto; padding: 36px 24px 28px;
  border-radius: 4px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--paper);
  background-blend-mode: normal;
  color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.5), 0 0 0 1px var(--rule);
}
@media (prefers-color-scheme: dark) {
  .letter { background: linear-gradient(rgba(206,229,215,.55) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(206,229,215,.55) 1px, transparent 1px) 0 0 / 22px 22px, var(--paper); }
  .letter .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
}
.letter-pip { position: absolute; right: 10px; top: -70px; width: 96px; height: auto; }
.letter > p { margin-top: 12px; font-family: var(--serif); font-size: 18px; color: #3a362f; max-width: 44ch; }
.letter .section-title { color: var(--ink); }
.waitlist { margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 520px) { .field { flex-direction: row; } }
.field input {
  flex: 1; min-height: var(--min-touch); padding: 0 14px;
  font: 400 17px/1 var(--sans); color: var(--ink);
  background: #fffdf8; border: 1px solid var(--rule); border-radius: var(--radius-control);
}
.field input:focus { outline: 2px solid #0B764D; outline-offset: 1px; }
.form-note { min-height: 1.3em; margin-top: 14px; font-size: 25px; line-height: 1.15; color: #0B764D; }
.form-note[data-state="error"] { color: var(--breaks); }
.form-note[data-state="sending"] { color: var(--graphite); }
.waitlist.done .field { display: none; }
.privacy { font-family: var(--sans) !important; font-size: 13px !important; color: var(--graphite) !important; }
.small-page { min-height: 100vh; display: grid; place-items: center; padding: 100px var(--gutter) 40px; }
.small-page .letter-pip { top: -84px; }
.big-pen { font-family: var(--hand) !important; font-size: 28px !important; line-height: 1.15; color: #0B764D !important; margin-block: 14px 24px !important; }

/* ---------------------------------------------------------------- footer */

.foot { padding: 44px var(--gutter) 52px; border-top: 1px solid var(--divider); color: var(--text-secondary); font-size: 14px; }
.foot > * { max-width: var(--page-max); margin-inline: auto; }
.foot-brand .serif { font-size: 22px; font-weight: 600; color: var(--text-primary); margin-right: 8px; }
.foot-brand .mono { font-size: 12px; letter-spacing: .08em; }
.socials { list-style: none; padding: 0; margin-block: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.socials a { display: inline-flex; min-height: 32px; align-items: center; text-decoration: none; color: var(--text-primary); }
.socials a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-small { margin-top: 6px; font-size: 13px; }
.handle { color: var(--text-primary); }
