/* Timeless Sans, the Grotesk cut, served from fonts/: one family for headings, numbers, body and labels */
@font-face { font-family: "Timeless Grotesk"; src: url("fonts/TimelessSans-GroteskLight.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Grotesk"; src: url("fonts/TimelessSans-GroteskLightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Timeless Grotesk"; src: url("fonts/TimelessSans-GroteskRegular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Grotesk"; src: url("fonts/TimelessSans-GroteskRegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Timeless Grotesk"; src: url("fonts/TimelessSans-GroteskMedium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Grotesk"; src: url("fonts/TimelessSans-GroteskSemibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  /* strong ease-out for entrances (the genres build uses the same curve in wall.js) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --bg: #0c0d0e;
  --raised: #131417;
  --card: #181a1f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: #2e323b;
  --ink: #f4f4f6;
  --ink-2: #9da2af;
  --ink-3: #676c78;
  --p1: #db5d2c; --p2: #4087de; --p3: #239d6a; --p4: #ae5ea8;
  --serif: "Timeless Grotesk", "Helvetica Neue", sans-serif;
  --sans: "Timeless Grotesk", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  /* one margin for the header, the scroll cards, every section and the footer; past 1,440px it grows so everything sits in a centred 1,440px frame */
  --gutter: max(32px, 4vw, calc((100vw - 1440px) / 2 + 57.6px));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h2 { font: 400 clamp(30px, 3.3vw, 46px)/1.06 var(--serif); letter-spacing: -0.015em; margin: 0 0 18px; }
h3 { font: 400 24px/1.2 var(--serif); margin: 0 0 18px; }
p { margin: 0 0 14px; color: var(--ink-2); }
.fine { font-size: 13px; color: var(--ink-3); }
/* even line lengths: balanced headings and labels, no orphaned last words in body text */
h1, h2, h3, .wall-labels > div { text-wrap-style: balance; }
p, li, dd, .wl-hole-cap { text-wrap-style: pretty; }
.wrap { margin: 0 var(--gutter); }

/* ── loading screen: a pulsing tile grid, a line of text and a bar that fills with the thumbnail download ── */
.loader { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--bg); transition: opacity .5s ease, visibility .5s; }
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
html:has(.loader:not(.done)) { overflow: hidden; }
.ld-grid { display: grid; grid-template-columns: repeat(3, 10px); gap: 4px; }
.ld-grid i { width: 10px; height: 10px; border-radius: 2px; background: var(--ink); animation: ldPulse 1.2s ease-in-out infinite; }
/* a wave runs diagonally from the top-left tile to the bottom-right one */
.ld-grid i:nth-child(1) { animation-delay: 0s; }
.ld-grid i:nth-child(2), .ld-grid i:nth-child(4) { animation-delay: .12s; }
.ld-grid i:nth-child(3), .ld-grid i:nth-child(5), .ld-grid i:nth-child(7) { animation-delay: .24s; }
.ld-grid i:nth-child(6), .ld-grid i:nth-child(8) { animation-delay: .36s; }
.ld-grid i:nth-child(9) { animation-delay: .48s; }
@keyframes ldPulse { 0%, 100% { opacity: .12; } 40% { opacity: .9; } }
.ld-text { margin: 0; font-size: 13px; color: var(--ink-3); }
.ld-bar { width: 160px; height: 2px; border-radius: 1px; background: rgba(244,244,246,0.1); overflow: hidden; }
.ld-bar span { display: block; height: 100%; width: 4%; background: var(--ink-2); border-radius: 1px; transition: width .2s ease-out; }
@media (prefers-reduced-motion: reduce) { .ld-grid i { animation: none; opacity: .5; } }

/* ── the wall stage ───────────────────────────── */
.story { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#wall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .8s; opacity: 0;
  background: linear-gradient(90deg, rgba(12,13,14,0.94) 0%, rgba(12,13,14,0.82) 26%, rgba(12,13,14,0) 42%); }
/* the hero text sits in the lower left, so the dark spreads out from that corner as an ellipse:
   dark under the title and description, opening out so the top and the right of the wall keep their colour */
body[data-stage="hero"] .scrim { opacity: 1;
  background: radial-gradient(ellipse 125% 125% at 0% 100%, rgba(12,13,14,0.94) 0%, rgba(12,13,14,0.9) 38%, rgba(12,13,14,0.78) 52%, rgba(12,13,14,0.5) 64%, rgba(12,13,14,0.18) 78%, rgba(12,13,14,0) 94%); }
body:not([data-stage="hero"]) .scrim { opacity: 1; }
.wall-overlay, .wall-labels { position: absolute; inset: 0; pointer-events: none; }
.wall-overlay svg { position: absolute; inset: 0; }
.wall-overlay text { font: 400 12px var(--sans); fill: var(--ink-3); text-anchor: middle; dominant-baseline: middle; }
.wall-overlay path { pointer-events: auto; }
/* labels sit above the scrim, so text placed in its dark band (the phone caption) keeps full contrast; the hit layer still covers them */
.wall-labels { opacity: 0; transition: opacity .5s; z-index: 3; }
.wall-labels.show { opacity: 1; }
.wall-labels > div { position: absolute; }
.wall-hit { position: absolute; inset: 0; z-index: 3; }
/* rabbit-hole spotlight: above the scrim and the hit layer; only its pictures take the pointer */
.wall-spot { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .5s; }
.wall-spot.on { opacity: 1; }
.wall-spot svg { position: absolute; inset: 0; }
.spot-av { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; object-fit: cover; background: var(--raised); box-shadow: 0 0 0 1px rgba(244,244,246,0.16); pointer-events: auto; transition: transform .15s; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 500; color: var(--ink-2); }
.spot-av:hover { transform: translate(-50%, -50%) scale(1.08); }

.wl-count { font: 400 12px var(--sans); color: var(--ink-2); }
/* bubble names: plain text on the tiles, balanced across lines; each fades in once its bubble has grown */
.wl-bubble { transform: translate(-50%, -50%); width: max-content; font: 500 15px/1.2 var(--sans); color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(12,13,14,0.9), 0 0 10px rgba(12,13,14,0.55); }
.wall-labels:not(.settled) .wl-bubble { animation: wlIn .5s var(--ease-out) var(--d, 0ms) both; }
@keyframes wlIn { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } }
/* rabbit-hole frame: a glow runs round the outline in the theme's colour */
.wall-overlay path.hole-run { fill: none; stroke-dasharray: 12 88; stroke-linecap: round; pointer-events: none; animation: holeRun 3.6s linear infinite; animation-delay: var(--d); }
.wall-overlay path.hole-run[filter] { opacity: .75; }
@keyframes holeRun { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.wl-hname { transform: translateY(-50%); text-align: right; padding-right: 10px; border-right: 2px solid var(--c, var(--ink-3)); font: 500 13px/1.25 var(--sans); color: var(--ink); }
.wl-hname em { display: block; font: normal 400 12px var(--sans); color: var(--ink-3); margin-top: 2px; }
.wl-band { transform: translateY(-50%); padding-left: 8px; border-left: 2px solid var(--c); font: 400 12px/1.2 var(--sans); color: var(--ink-2); white-space: nowrap; }
.wl-period { writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg); transform-origin: center; font: 400 12px/1 var(--sans); color: var(--ink-2); white-space: nowrap; text-align: right; padding-bottom: 6px; border-bottom: 2px solid var(--c); }
.wl-flow { transform: translateY(-50%); font: 400 13px/1.2 var(--sans); color: var(--ink); white-space: nowrap; }
.wl-flow em { font-style: normal; color: var(--ink-3); margin-left: 6px; }
.wl-flow.pill { padding: 1px 7px; border-radius: 999px; background: rgba(12,13,14,.82); font-size: 12px; }
.wl-flow.left { transform: translate(-100%, -50%); text-align: right; }
.wall-overlay svg path:hover { fill-opacity: .8; }
.wl-seg { width: max-content; padding-top: calc(var(--h, 10px) + 6px); padding-left: 6px; border-left: 1px solid rgba(244,244,246,0.3); text-wrap-style: balance; }
.wl-seg span { display: block; font: 500 12px/1.3 var(--sans); color: var(--ink); }
.wl-seg em { display: block; font: normal 400 12px/1.3 var(--sans); color: var(--ink-3); margin-top: 1px; }
.wl-seg em + em { margin-top: 1px; }
.wl-seg em { white-space: nowrap; }
.wl-segpct { transform: translateY(-100%); width: max-content; padding: 0 0 calc(var(--h, 10px) + 4px) 6px; border-left: 1px solid rgba(244,244,246,0.3); font: 500 12px/1.3 var(--sans); color: var(--ink); text-wrap-style: balance; }
.wl-segpct span { color: var(--ink-2); font-weight: 400; white-space: nowrap; }
.wl-seg.end { transform: translateX(-100%); text-align: right; padding-left: 0; padding-right: 8px; border-left: 0; border-right: 1px solid rgba(244,244,246,0.3); }
/* vertical length bar: a separator of fixed length on the left of each section's top edge, the label stacked under it */
.wl-vseg { padding: 6px 10px 0 0; border-top: 1px solid rgba(244,244,246,0.12); text-align: right; font: 400 12px/1.3 var(--sans); color: var(--ink-2); text-wrap-style: balance; }
.wl-vseg b { display: block; font: 500 14px/1.3 var(--sans); color: var(--ink); margin-bottom: 2px; }
.wl-vseg b span { font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.wl-vseg em { display: block; font-style: normal; white-space: nowrap; }
.wl-vseg em { color: var(--ink-3); }
.wl-note-top { transform: translate(-50%, -100%); padding-bottom: 4px; font: 400 12px/1.3 var(--sans); color: var(--ink-2); white-space: nowrap; }
.wl-lead { width: 0; border-left: 1px solid rgba(244,244,246,0.45); }
.wall-overlay svg.voro { animation: voroIn .9s .8s both; }
.wall-overlay svg.voro path { pointer-events: none; }
@keyframes voroIn { from { opacity: 0; } to { opacity: 1; } }
.wall-overlay svg.cells { animation: voroIn .8s .7s both; }
.wall-overlay svg.cells path { pointer-events: none; }
/* alluvial workbench: pillar toggles across the top, the group key centred under the chart */
.alluv-top { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: min(980px, calc(100vw - 48px)); text-align: center; z-index: 4; }
.alluv-picker { justify-content: center; margin: 0; }
.alluv-picker .n { opacity: 1; font-weight: 500; }
.alluv-top .fine { margin: 8px 0 0; min-height: 1.3em; }
.alluv-top .alluv-hint { margin: 0 0 10px; color: var(--ink-2); }
.alluv-key { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(820px, calc(100vw - 48px)); margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font: 400 13px/1.3 var(--sans); color: var(--ink-2); }
.alluv-key li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.alluv-key i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.wl-hcount { transform: translateY(-50%); font: 400 12px var(--sans); color: var(--ink-2); }
.wl-name { font-size: 12px; line-height: 1.3; color: var(--ink); }
.wl-name span { display: block; border-top: 2px solid var(--ink-3); padding-top: 6px; font: 500 13px/1.3 var(--sans); }
.wl-name em { display: block; font: normal 400 12px var(--sans); color: var(--ink-3); margin-top: 3px; }
.wl-creator { font: 500 12px/1.25 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-creator em { display: block; font: normal 400 12px var(--sans); color: var(--ink-3); margin-top: 2px; }
.wl-tail { font: 400 13px var(--sans); color: var(--ink-3); }
.wl-note { font: 400 13px var(--sans); color: var(--ink); white-space: nowrap; transform: translateX(-6px); }
.wl-note i { position: absolute; left: 6px; top: 16px; width: 1px; background: rgba(244,244,246,0.45); }
.wl-note.right { transform: translateX(calc(-100% + 6px)); text-align: right; }
.wl-note.right i { left: auto; right: 6px; }
.wl-axis { font: 400 12px var(--sans); color: var(--ink-3); white-space: nowrap; }
.wl-axis.right { transform: translateX(-100%); }
.wl-hole { transform: translate(-100%, -50%); width: max-content; max-width: 170px; text-align: right; font: 400 13px/16px var(--sans); color: var(--ink-3); transition: color .15s; }
.wl-hole::after { content: ""; position: absolute; right: -16px; top: 50%; width: 10px; border-top: 1px solid rgba(244,244,246,0.25); }
.wl-hole.on { color: var(--ink); }
.wl-hole.on::after { border-top: 2px solid var(--c); margin-top: -1px; }
.wl-hole-cap { font: 400 13px/1.45 var(--sans); color: var(--ink-2); }
/* under the spotlight, the rabbit hole's title and description, bottom left */
/* "Down the Rabbit Holes" fades out while the spotlight shows, and back in when it goes */
#ch04 .card h2 { transition: opacity .4s ease; }
#ch04 .card h2.spot-hide { opacity: 0; }
.spot-cap { position: absolute; font-size: 14px; pointer-events: none; text-align: center; text-wrap-style: balance; }
/* the rabbit hole's number and name: larger and in medium, so it reads as the caption's title */
.wl-hole-cap.spot-cap b { font-size: 19px; font-weight: 500; line-height: 1.3; margin-bottom: 6px; text-wrap-style: balance; }
.wl-hole-cap b { display: block; font-weight: 400; color: var(--ink); margin-bottom: 2px; }
.wl-centre { transform: translate(-50%, -50%); text-align: center; font: 400 12px/1.35 var(--sans); color: var(--ink-3); width: 130px; }
.wl-centre b { display: block; font: 300 34px/1 var(--serif); color: var(--ink); letter-spacing: 0; margin-bottom: 4px; }
.wl-pole { transform: translateX(-50%); text-align: center; white-space: nowrap; }
.wl-pole span { font: 500 13px var(--sans); border-bottom: 2px solid; padding-bottom: 3px; }
.wl-pole em { display: block; font: normal 400 12px var(--sans); color: var(--ink-3); margin-top: 8px; }
.wl-pole.dim em { color: var(--ink-3); }

/* ── scroll steps ─────────────────────────────── */
.steps { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.step { min-height: 112vh; display: flex; align-items: center; padding: 0 0 0 var(--gutter); }
.card { width: min(430px, 32vw); pointer-events: auto; transition: opacity .5s; opacity: 0.18; }
.step.current .card, .hero-step .card { opacity: 1; }
.step-end { height: 40vh; }

/* the hero blurb sits above the window's bottom edge; the scroll cue stands apart, pinned just above that edge */
.hero-step { position: relative; align-items: flex-end; padding-bottom: 19vh; min-height: 100vh; }
.hero-step .cue { position: absolute; left: var(--gutter); bottom: 40px; }
/* the hero card shrinks to the title's widest line; the description takes no part in that width
   (contain: inline-size) and runs a little wider than the title */
.hero-card { width: fit-content; max-width: min(1100px, 100% - 64px); }
.hero-card .deck { contain: inline-size; width: 112%; max-width: calc(100vw - 2 * var(--gutter)); }
.display { font: 300 clamp(44px, 6.6vw, 104px)/0.95 var(--serif); letter-spacing: -0.03em; margin: 0 0 28px; max-width: 20ch; }
/* the title runs as one large word and a smaller line under it, in the hero, the footer and the phone home */
.title-sub { display: block; font-size: 0.46em; line-height: 1.08; letter-spacing: -0.02em; margin-top: 0.32em; text-wrap: balance; }
.display .title-sub { max-width: none; }
/* the title sets in all lowercase wherever it shows as a display line: the hero, the phone home and the footer */
#title, .m-home .display, .foot-title { text-transform: lowercase; }
.deck { font: 400 clamp(15px, 1.2vw, 17px)/1.55 var(--serif); color: rgba(244,244,246,0.7); max-width: 60ch; margin-bottom: 0; text-wrap: pretty; text-wrap: balance; }
/* the deck runs to two paragraphs: a paragraph gap between them, the full gap after the last */
.deck:has(+ .deck) { margin-bottom: 0.7em; }
.ledger { display: grid; grid-template-columns: repeat(2, max-content); gap: 18px 48px; margin: 22px 0 0; }
.ledger dt { font: 400 14px var(--sans); color: var(--ink-3); }
.ledger dd { margin: 4px 0 0; font: 300 32px/1 var(--serif); }
.cue { color: var(--ink-3); display: flex; gap: 12px; align-items: center; font-size: 14px; margin: 0; }
/* the arrow keys step through the page, so the cue shows them as two small keys */
.cue .keys { display: inline-flex; gap: 4px; }
.cue kbd { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(244,244,246,0.04); }
/* touch screens have no arrow keys: they get the plain cue */
.cue-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .cue .keys, .cue-kb { display: none; } .cue-touch { display: inline; } }
.cue kbd svg { width: 11px; height: 11px; fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.poles { list-style: none; padding: 0; margin: 22px 0 18px; display: flex; flex-direction: column; gap: 14px; }
.poles li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding-left: 14px; border-left: 2px solid; }
.poles b { font: 400 17px/1.25 var(--serif); }
.poles .share { font: 400 14px var(--sans); color: var(--ink-2); text-align: right; white-space: nowrap; }
.poles .share i { font-style: normal; color: var(--ink); }
.poles small { grid-column: 1 / -1; color: var(--ink-3); font-size: 12px; line-height: 1.4; }

.paradox { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin-bottom: 18px; }
.paradox span { display: block; color: var(--ink-3); margin-bottom: 4px; }
.paradox b { font: 400 16px/1.2 var(--serif); }
.paradox > div:last-child { text-align: right; }
.ratio { font: 300 46px/1 var(--serif); }
.ratio i { font-style: normal; color: var(--ink-3); margin: 0 2px; }

.legend-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); white-space: nowrap; }
.group-key { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.group-key li { display: flex; align-items: center; gap: 8px; }
.group-key i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.group-key.stack { grid-template-columns: minmax(0, 1fr); gap: 7px; }
/* the format split: a wide gap under the heading, then the genre key in two columns read top to bottom */
.step[data-stage="format"] h2, .step[data-stage="poles"] h2 { margin-bottom: 64px; }
.step[data-stage="poles"] .ledger { margin-top: 0; }
.key-h { font: 500 14px/1.3 var(--sans); color: var(--ink); margin: 0 0 14px; }
.group-key.cols { margin: 0; grid-template-rows: repeat(var(--rows), auto); grid-auto-flow: column; grid-template-columns: repeat(2, max-content); gap: 9px 40px; font-size: 14px; }
.legend-inline i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 14px; }
.pill { border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: 12px; color: var(--ink-2); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: color .15s, border-color .15s, background .15s; }
.pill:hover { color: var(--ink); border-color: var(--ink-3); }
.pill[aria-selected="true"], .pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill i { width: 8px; height: 8px; border-radius: 2px; }
.pill:disabled { opacity: 0.3; cursor: default; }
.dossier .stat { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.dossier .stat b { font: 300 52px/1 var(--serif); }
.dossier .stat span { font-size: 13px; color: var(--ink-2); }

.weekbars { display: grid; grid-template-columns: 34px 1fr 52px; gap: 6px 10px; align-items: center; margin-top: 18px; font: 400 12px var(--sans); color: var(--ink-3); }
.weekbars .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.weekbars .bar span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.weekbars .v { text-align: right; color: var(--ink-2); }


/* ── editorial plates below the wall ──────────── */
.plate-section { padding: 140px 0 40px; position: relative; z-index: 3; background: var(--bg); }
.plate-section h2 { font-size: clamp(36px, 4.6vw, 64px); max-width: 18ch; }
.lede { font-size: 17px; max-width: 62ch; margin-bottom: 40px; }

.inspector { display: flex; gap: 16px; align-items: center; min-height: 44px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 22px; font-size: 14px; color: var(--ink-2); }
.inspector b { color: var(--ink); font-weight: 500; }
.matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { display: grid; grid-template-columns: 220px repeat(9, minmax(78px, 1fr)); gap: 3px; min-width: 960px; }
.mx-col { font: 400 12px/1.3 var(--sans); color: var(--ink-3); text-align: center; padding: 0 4px 12px; display: flex; align-items: flex-end; justify-content: center; transition: color .15s; }
.mx-row { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; transition: color .15s; }
.mx-row i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.mx-col.hl, .mx-row.hl { color: #fff; }
.mx-cell { height: 58px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font: 400 11px var(--mono); cursor: crosshair; outline: 1px solid transparent; }
.mx-cell:hover { outline-color: #fff; }
.mx-cell.self { background: transparent !important; border: 1px dashed var(--line-strong); color: var(--ink-3) !important; }

/* the Algorithms scale steps down in order: section title, subheading, card number, card name, card text */
#ch09 h2 { margin-bottom: 20px; }
/* the line under the Algorithms title, set like the hero description: regular, 70% ink */
.plate-lede { margin: 0 0 88px; max-width: 34ch; font: 400 clamp(24px, 2vw, 28px)/1.3 var(--serif); letter-spacing: -0.01em; color: rgba(244,244,246,0.72); text-wrap: pretty; text-wrap: balance; }
.codex { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }
/* the first row of plates has no rule above it: the heading opens the section */
.codex .plate:nth-child(-n+2) { border-top: 0; padding-top: 0; }
/* one plate a row on phones only */
@media (max-width: 759px) { .codex .plate:nth-child(2) { border-top: 1px solid var(--line); padding-top: 40px; } }
/* three plates a row once each column has room for about 45 characters a line */
@media (min-width: 1200px) {
  .codex .plate:nth-child(3) { border-top: 0; padding-top: 0; }
  .codex { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; }
  .codex .plate p.you { font-size: 15px; }
}
.plate { padding: 40px 0 44px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.plate.full { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.plate.full > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* the number on top, the measure's name under it */
.plate-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.plate-name { font: 400 20px/1.2 var(--serif); color: var(--ink); }
/* a linked name opens its reference; the arrow says it leaves the page */
a.plate-name { display: block; text-decoration: none; text-wrap-style: balance; }
a.plate-name .nw { white-space: nowrap; }
a.plate-name .ext { display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: 0.12em; fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s, transform .2s; }
a.plate-name:hover .ext { stroke: var(--ink); transform: translate(2px, -2px); }
a.plate-name:hover { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 5px; text-decoration-thickness: 1px; }
/* the number stays a step below the section heading (clamp 36 to 64px) at every width */
.plate-val { font: 300 clamp(26px, 2.5vw, 36px)/1 var(--serif); letter-spacing: -0.02em; white-space: nowrap; }
.plate-val small { font: 400 14px var(--sans); color: var(--ink-3); margin-left: 6px; }
.eq { padding: 14px 0; overflow-x: auto; color: var(--ink); font-size: 16px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.plate p { margin: 0; }
/* what the measure does, then a rule, then what it says about you; the key phrases in medium weight */
.plate p.idea { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.plate p.idea b { font-weight: 500; color: var(--ink); }
/* what the measure says about you, in the reader's ink */
/* the inference at 80% opacity, key phrases included; the phrases stand out by weight */
.plate p.you { font-size: 16px; line-height: 1.55; color: rgba(244,244,246,0.8); }
.plate p.you b { font-weight: 600; }
.params { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.params dt { font: 400 12px var(--mono); color: var(--ink); }
.params dd { margin: 0; color: var(--ink-3); }
.lorenz-wrap canvas { width: 100%; max-width: 560px; aspect-ratio: 1 / 1; display: block; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }

/* ── video likes strip ─────────────────────── */
.strip { display: block; width: 100%; max-width: 1440px; margin: 8px auto 18px; cursor: grab; touch-action: pan-y; }
.strip-controls { display: grid; gap: 22px; }
.strip-controls input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.strip-controls input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); border-radius: 2px; }
.strip-controls input[type=range]::-moz-range-track { height: 2px; background: var(--line-strong); border-radius: 2px; }
.strip-controls input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 18px; margin-top: -8px; border-radius: 999px; background: var(--ink); border: 0; }
.strip-controls input[type=range]::-moz-range-thumb { width: 34px; height: 18px; border-radius: 999px; background: var(--ink); border: 0; }
.strip-controls input[type=range]:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 6px; border-radius: 4px; }

/* splits: group and length filters */
.split-total { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 28px; }
.split-total b { font: 300 56px/1 var(--serif); }
.split-total span { font-size: 15px; color: var(--ink-2); }
.split-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.split-label { font-size: 14px; color: var(--ink-3); padding-top: 8px; }
.pill .n { color: inherit; opacity: 0.6; }

/* rabbit-hole chapter: a tall step whose scroll moves the timeline; the card stays pinned */
#ch04 { min-height: 560vh; align-items: flex-start; position: relative; }
.hole-snap { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; pointer-events: none; }
/* snapping belongs to the main page's scroll story; the About page scrolls freely */
html:has(.story) { scroll-snap-type: y mandatory; }
/* every scroll step snaps its card to the middle of the screen; the title screen and each section below the wall snap to the top; sections taller than the screen scroll freely inside */
.steps > .step:not(.hero-step):not(#ch04) > .card { scroll-snap-align: center; }
.steps > .hero-step { scroll-snap-align: start; }
.plate-section { scroll-snap-align: start; scroll-margin-top: 0; }
.site-foot { scroll-snap-align: end; }
/* the heading holds at the middle of the screen through the chapter, like every other chapter's card */
#ch04 .card { position: sticky; top: 50vh; transform: translateY(-50%); padding-top: 0; }
/* rabbit-hole entrance: wall.js sets each piece's delay; names slide in from the right, the caption rises */
.wall-overlay.hold, .wall-labels.hold { opacity: 0 !important; transition: none; }
.wall-overlay .h-in, .wall-spot svg.h-in, .spot-av, .spot-title { animation: hIn .5s ease-out both; }
/* the spotlight's title, across the top inside the circle */
.spot-title { position: absolute; transform: translate(-50%, -50%); font: 500 12px/1.2 var(--sans); color: var(--ink-2); white-space: nowrap; pointer-events: none; }
.wl-hole { animation: hSlide .5s cubic-bezier(.2,.7,.2,1) both; }
/* the selected name brightens once its rabbit hole is framed */
.wl-hole.on { animation: hSlide .5s cubic-bezier(.2,.7,.2,1) both, hSelect .4s ease-out both; }
@keyframes hSelect { from { color: var(--ink-3); } to { color: var(--ink); } }
.wl-hole-cap { animation: hRise .5s ease-out both; }
@keyframes hIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes hSlide { from { opacity: 0; translate: 32px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes hRise { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* video likes filters: slim chips with quiet counts, one tight row per filter */
.strip-section .split-row { grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 10px; }
.strip-section h2 { margin-bottom: 27px; }
.strip-section .split-label { padding-top: 5px; font-size: 12px; color: var(--ink-3); }
.strip-section .pills { gap: 8px 4px; margin-bottom: 0; }
.strip-section .pill { padding: 3px 8px; gap: 4px; font-size: 12px; line-height: 1.4; border-color: var(--line); color: var(--ink-2); }
.strip-section .pill:hover { border-color: var(--line-strong); color: var(--ink); }
.strip-section .pill i { width: 5px; height: 5px; border-radius: 50%; }
.strip-section .pill .n { font-size: 10.5px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.strip-section .pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* length slider: five sections, one per band, filling up to one knob; the value shows in a tooltip above the knob, the count under it */
.len-range { position: relative; width: min(380px, 100%); padding: 30px 0 24px; margin-bottom: 8px; user-select: none; -webkit-user-select: none; }
.ls-track { position: relative; height: 18px; display: flex; align-items: center; gap: 3px; }
.ls-track i { flex: 1; height: 4px; border-radius: 2px; background: rgba(244,244,246,0.12); transition: background .2s, opacity .2s; }
.ls-track i.on { background: var(--ink); }
.ls-knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--bg); pointer-events: none; transition: left .2s ease-out; }
/* the native range sits on top, unseen, for the pointer and the keys */
.ls-track input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ls-track:has(input:focus-visible) .ls-knob { box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--ink-2); }
/* the value as a small tooltip over the knob, in the page's tooltip style, its arrow on the knob */
.ls-val { position: absolute; top: -4px; transform: translateX(-50%); padding: 3px 9px; border-radius: 6px; background: var(--card); border: 1px solid var(--line-strong); color: var(--ink); font: 500 12px/1.5 var(--sans); white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.4); transition: left .2s ease-out; }
.ls-val::after { content: ""; position: absolute; left: calc(50% + var(--ax, 0px)); bottom: -5px; width: 8px; height: 8px; margin-left: -4px; background: var(--card); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); transform: rotate(45deg); }
.ls-note { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 12px; line-height: 1.4; color: var(--ink-3); white-space: nowrap; transition: left .2s ease-out; }
/* Deep Dive filters: length and category side by side, each with its label above;
   the first row of chips lines up with the slider's track */
/* the slider column stays narrow so the category chips fit in two rows from about 960px up */
.dd-filters { display: grid; grid-template-columns: minmax(180px, 196px) minmax(0, 1fr); gap: 64px; align-items: start; margin-bottom: 28px; }
.dd-filters .split-label { display: block; padding: 0; margin-bottom: 4px; }
.dd-len .len-range { width: 100%; }
.dd-cat .pills { padding-top: 26px; }
/* stat row above the strip; each stat filters the strip */
.strip-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; margin: 8px 0 28px; }
.stat { text-align: left; background: none; border: 0; border-top: 2px solid var(--line-strong); padding: 14px 0 0; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.stat b { font: 300 40px/1 var(--serif); }
.stat span { font-size: 14px; color: var(--ink-2); }
.stat em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.stat:hover { border-top-color: var(--ink-3); }
.stat[aria-pressed="true"] { border-top-color: var(--ink); }
.stat:disabled { cursor: default; opacity: 0.5; }

/* ── site header: the title and the section links, fixed across the top ── */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 56px; display: flex; align-items: center; gap: 32px; padding: 0 var(--gutter); background: rgba(12,13,14,0.8); border-bottom: 1px solid var(--line); backdrop-filter: blur(24px) saturate(0.4); -webkit-backdrop-filter: blur(24px) saturate(0.4); }
.brand { font: 500 14px var(--sans); color: var(--ink); text-decoration: none; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the header title is the short mark, attention:b/b/r/w, on every page and width, set in lowercase like the hero */
.brand { text-transform: lowercase; transition: opacity .3s ease; }
/* desktop: the wordmark takes you home, so the nav drops its Home link; phones keep it in the tab bar */
@media (min-width: 760px) { #siteNav a[data-id="ch00"] { display: none; } }
/* the mark's four dots stand for black, blue, red and white, each tuned to show on the dark header */
/* a two-line wordmark: the word on top, the four dots under it */
.brand { line-height: 1.1; }
/* the dots are drawn as circles (the bullet glyph carries wide side bearings), with a thin slash between the pairs */
.brand .dots { display: flex; align-items: center; gap: 3px; width: fit-content; margin-top: 4px; font-size: 12px; line-height: 1; color: var(--ink-3); }
.brand .dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; font-size: 0; }
.brand .dots i:nth-of-type(2) { margin-right: 2px; }
.brand .dots i:nth-of-type(3) { margin-left: 2px; }
.brand .d-k { color: #7a7f87; }
.brand .d-b { color: #4466e0; }
.brand .d-r { color: #ff0000; }
.brand .d-w { color: #ffffff; }
/* desktop: the whole header stays out of the way while the hero title is on screen, so the wall runs to the top edge;
   it slides back in once the title scrolls off (phones keep their tab bar, which lives inside the header) */
@media (min-width: 760px) {
  .site-head { transition: opacity .35s ease, transform .35s ease; }
  .site-head.at-hero { opacity: 0; transform: translateY(-12px); pointer-events: none; }
}
.site-nav { margin-left: auto; flex: none; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { font: 400 13px var(--sans); color: var(--ink-3); text-decoration: none; padding: 6px 12px; border-radius: 999px; white-space: nowrap; transition: color .2s, background .2s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); background: rgba(244,244,246,0.08); }
.mark, .nav-toggle { display: none; }
.site-nav .ni, .foot-list .ni { display: none; }
/* the phone reading version: hidden on larger screens */
.phone-story { display: none; }

/* ── About page ─────────────────────────────── */
.about-page { padding: 160px 0 40px; }
.about-page h1 { font: 300 clamp(48px, 6vw, 88px)/1 var(--serif); letter-spacing: -0.03em; margin: 0 0 64px; }
.about-page section { max-width: 62ch; margin-bottom: 44px; }
.about-page h2 { font: 400 clamp(24px, 2.2vw, 30px)/1.15 var(--serif); margin: 0 0 12px; }
.about-page p { font-size: 17px; line-height: 1.6; }
.about-page .findings .qa { margin: 0 0 22px; }
.about-page .findings h3 { font: 500 16px/1.4 var(--sans); color: var(--ink); margin: 0 0 4px; }
.about-page .findings p { margin: 0; }
.about-page a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.foot-list a[aria-current="page"] { color: var(--ink); }

/* ── site footer: the title large and faded, sections and data beside it, the credit centred at the very bottom ── */
.site-foot { position: relative; z-index: 3; background: var(--bg); margin-top: 140px; border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 14px; }
/* the title on the left margin, the section links ending on the right margin, in line with the end of the rule below */
/* four equal columns on the same 64px gap as the Algorithms plates: the title over the first two,
   one column of links over each of the last two, so every block starts on a shared grid line */
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 64px; row-gap: 40px; align-items: stretch; --ft: clamp(36px, 4.4vw, 64px); }
.foot-grid > .foot-title { grid-column: 1 / 3; }
.foot-grid > div { grid-column: 3 / 5; }
/* the links block spans the title's height: its heading on the title's first line, its last row on the title's last baseline */
.foot-grid > div { display: flex; flex-direction: column; }
.site-foot nav.foot-list { flex: 1; align-content: space-between; padding-bottom: calc(var(--ft) * 0.2 - 9px); }
/* the section links run in two columns */
.site-foot nav.foot-list { display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 64px; }
.foot-title { display: block; max-width: 18ch; font: 300 var(--ft)/1.02 var(--serif); letter-spacing: -0.02em; color: var(--ink); opacity: 0.4; text-decoration: none; text-wrap-style: balance; transition: opacity .2s; }
.foot-title:hover { opacity: 0.6; }
.foot-h { font: 500 14px var(--sans); color: var(--ink); margin: 0 0 18px; }
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.foot-list a { color: var(--ink-2); text-decoration: none; width: max-content; transition: color .2s; }
.foot-list a:hover { color: var(--ink); }
/* the credit sits under a rule, on the page's left margin */
.foot-credit { margin-top: 64px; margin-bottom: 0; padding-top: 32px; border-top: 1px solid var(--line); text-align: left; font-size: 13px; color: var(--ink-3); }
.foot-credit a { color: var(--ink-2); text-decoration: none; transition: color .2s; }
.foot-credit a:hover { color: var(--ink); }

.tooltip { position: fixed; z-index: 40; pointer-events: none; background: var(--card); border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 14px; font-size: 13px; width: max-content; max-width: 300px; opacity: 0; transition: opacity .12s; box-shadow: 0 12px 34px rgba(0,0,0,0.5); }
.tooltip.show { opacity: 1; pointer-events: auto; }
.tooltip .t-cta { display: inline-flex; align-items: center; margin: 12px 14px 0; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 12px var(--sans); text-decoration: none; }
.tooltip .t-cta::after { content: "↗"; margin-left: 6px; }
.tooltip .t-cta:hover { background: #fff; }
.tooltip .t-cta:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.tooltip.thumb { padding: 0 0 12px; width: 280px; overflow: hidden; }
.tooltip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 10px; background: var(--raised); }
.tooltip .t-title { padding: 0 14px; font-weight: 500; line-height: 1.35; }
.tooltip .t-meta { padding: 4px 14px 0; display: flex; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: 12px; }
.tooltip .t-meta i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.tooltip .t-row { display: flex; justify-content: space-between; gap: 18px; color: var(--ink-2); }
.tooltip .t-row b { color: var(--ink); font: 400 12px var(--mono); }
.tooltip .t-head { font-weight: 500; margin-bottom: 6px; }


@media (max-width: 759px) {
  .codex, .plate.full { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 759px) {
  :root { --gutter: 16px; }
  /* on a phone the chart takes the top of the screen, so each card snaps to the bottom, under it */
  .steps > .step:not(.hero-step):not(#ch04) > .card { scroll-snap-align: end; scroll-margin-bottom: 28px; }
  /* the scrim only darkens the card's band at the bottom, so the chart above it keeps its full colour */
  body:not([data-stage="hero"]) .scrim { background: linear-gradient(0deg, rgba(12,13,14,0.97) 0%, rgba(12,13,14,0.92) 30%, rgba(12,13,14,0) 37%); }
  .step { align-items: flex-end; padding: 0 16px 90px; }
  .card { width: 100%; opacity: 0; }
  .step.current .card { opacity: 1; }
  .hero-step { padding-bottom: 90px; }
  .hero-card { width: 100%; }
  .ledger { gap: 12px 24px; }
  .ledger dd { font-size: 24px; }
  h2 { font-size: 28px; }
  .matrix { grid-template-columns: 140px repeat(9, 72px); min-width: 0; }
  /* phones: the title alone up top; the sections move to a tab bar floating at the bottom of the screen, icon over label */
  /* no backdrop blur on the phone header: a blur would trap the fixed tab bar inside the header */
  .site-head { padding: 0 16px; height: 52px; justify-content: center; background: rgba(12,13,14,0.94); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .brand { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
  .brand .dots { margin: 4px auto 0; }
  .mark, .nav-toggle { display: none; }
  .site-nav { position: fixed; top: auto; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 5px; border-radius: 22px; background: rgba(19,20,23,0.9); border: 1px solid var(--line-strong); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
  .site-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 4px 6px; border-radius: 17px; font: 500 11px/1.1 var(--sans); color: var(--ink-3); text-align: center; white-space: nowrap; }
  .site-nav .ni { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
  .site-nav a.active { color: var(--ink); background: rgba(244,244,246,0.09); }
  /* room at the very bottom so the bar never covers the credit line */
  .site-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* the reading version replaces the scroll story and Deep Dive; no snapping on a plain read */
  .story, .strip-section, .desk-only { display: none !important; }
  html:has(.story) { scroll-snap-type: none; }
  .phone-story { display: block; }
  .m-sec { padding: 56px 16px 8px; }
  .m-sec h2 { font-size: 30px; line-height: 1.1; margin: 0 0 24px; }
  /* the home screen fills exactly one screen: the mosaic fills the background from the top,
     and the text block sits in the lower half with a clear band of space above the tab bar. Gaps follow an 8px scale:
     title to subline 8, subline to deck 24, deck to note 16. */
  .m-home { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 52px 0 calc(max(208px, 27svh) + env(safe-area-inset-bottom)); overflow: hidden; }
  /* the mosaic box is pinned to all four edges (a percentage height on the img itself
     fails in Safari inside a min-height section), so the tiles run to the very bottom.
     An overlay darkens them on an eased curve; it stays short of full black down to the
     tab bar, so the wall shows faintly behind the text and the note, then closes to the page
     colour at the very bottom so the next section starts without a seam. */
  .m-bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; }
  .site-head { transition: background-color .3s ease, border-color .3s ease; }
  .site-head.at-hero { background: transparent; border-bottom-color: transparent; }
  /* phones only: the header mark stays hidden while the hero title is on screen */
  .site-head.at-hero .brand { opacity: 0; pointer-events: none; }
  .m-bg::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(12,13,14,0) 0%, rgba(12,13,14,0.06) 16%, rgba(12,13,14,0.2) 28%, rgba(12,13,14,0.42) 40%, rgba(12,13,14,0.62) 52%, rgba(12,13,14,0.76) 64%, rgba(12,13,14,0.84) 78%, rgba(12,13,14,0.88) 88%, #0c0d0e 100%); }
  .m-mosaic { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; background: var(--raised); }
  .m-home-text { position: relative; padding: 0 16px; text-shadow: 0 1px 2px rgba(12,13,14,0.5), 0 0 18px rgba(12,13,14,0.7); }
  .m-home .display { font-size: 42px; line-height: 1; margin: 0 0 24px; max-width: none; }
  .m-home .display .title-sub { font-size: 24px; line-height: 1.25; margin-top: 8px; }
  /* 70% ink through colour alpha: an opacity rule would fight the rise-in animation, which ends on opacity 1.
     Balance evens the line lengths and removes the orphan; pretty stands in where balance has no support. */
  .m-home .deck { font-size: 15px; font-style: normal; font-weight: 400; line-height: 1.5; margin-bottom: 16px; color: rgba(244,244,246,0.7); text-wrap: pretty; text-wrap: balance; }
  .m-home .deck:has(+ .deck) { margin-bottom: 8px; }
  /* the note stands apart from the blurb, pinned just above the tab bar */
  .m-note { position: absolute; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); margin: 0; font-size: 11px; line-height: 1.4; color: var(--ink-2); }
  .m-ledger { margin: 0 0 28px; }
  /* one bar of every genre, then a ranked row per genre with a thin line in its colour */
  .m-stack { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
  .m-stack i { display: block; min-width: 2px; }
  .m-rows { list-style: none; margin: 18px 0 0; padding: 0; }
  .m-rows li { padding: 12px 0; border-top: 1px solid var(--line); }
  .m-rows li:first-child { border-top: 0; }
  .m-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .m-row b { font-weight: 500; font-size: 15px; color: var(--ink); }
  .m-row b span { font-weight: 400; color: var(--ink-3); }
  .m-row em { font-style: normal; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
  .m-line { height: 3px; margin-top: 8px; border-radius: 2px; background: rgba(244,244,246,0.06); }
  .m-line i { display: block; height: 100%; border-radius: 2px; }
  .m-format li small { display: block; margin: 2px 0 10px; font-size: 13px; color: var(--ink-3); }
  .m-format + .key-h { margin-top: 28px; }
  /* rabbit holes as cards, each marked with its genre colour */
  .m-holes { list-style: none; margin: 0; padding: 0; }
  .m-holes li { padding: 22px 0; border-top: 1px solid var(--line); }
  .m-holes li:first-child { border-top: 0; padding-top: 4px; }
  .m-holes small { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
  .m-holes small::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
  .m-holes h3 { font: 500 20px/1.25 var(--sans); color: var(--ink); margin: 6px 0 6px; }
  .m-holes p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
  .m-avs { display: flex; align-items: center; }
  .m-avs img, .m-avs i { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; margin-right: -7px; box-shadow: 0 0 0 2px var(--bg); background: var(--raised); display: flex; align-items: center; justify-content: center; font: normal 500 12px var(--sans); color: var(--ink-2); }
  .m-avs span { margin-left: 14px; font-size: 12px; color: var(--ink-3); }
  #ch09.plate-section { padding-top: 56px; }

  /* phone motion: the title screen settles in, then each block rises in as it reaches the screen */
  .m-mosaic { animation: mMosaic 1.6s cubic-bezier(.2,.7,.2,1) both; }
  .m-home-text > *, .m-home > .m-note { animation: mRise .8s cubic-bezier(.2,.7,.2,1) both; }
  .m-home > .m-note { animation-delay: .8s; }
  .m-home-text > :nth-child(1) { animation-delay: .35s; }
  .m-home-text > :nth-child(2) { animation-delay: .5s; }
  .m-home-text > :nth-child(3) { animation-delay: .65s; }
  @keyframes mMosaic { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
  @keyframes mRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .m-anim { opacity: 0; transform: translateY(14px); transition: opacity .6s ease var(--d, 0s), transform .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
  .m-anim.in { opacity: 1; transform: none; }
  /* bars and lines grow from the left once their block is in */
  .m-stack.m-anim i, .m-anim .m-stack i { transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.2,.7,.2,1) calc(var(--d, 0s) + .1s + var(--k, 0) * 70ms); }
  .m-stack.m-anim.in i, .m-anim.in .m-stack i { transform: scaleX(1); }
  .m-anim .m-line i { transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2,.7,.2,1) calc(var(--d, 0s) + .15s); }
  .m-anim.in .m-line i { transform: scaleX(1); }
  /* the channel avatars pop in one after another */
  .m-anim .m-avs > * { opacity: 0; transform: scale(.6); transition: opacity .35s ease, transform .45s cubic-bezier(.3,1.4,.5,1); transition-delay: calc(.25s + var(--i, 0) * 55ms); }
  .m-anim.in .m-avs > * { opacity: 1; transform: none; }
  .m-avs > img, .m-avs > i { transform-origin: center; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .foot-grid > .foot-title, .foot-grid > div { grid-column: 1 / -1; }
  .site-foot { margin-top: 100px; padding-top: 48px; }
  /* the rabbit-hole heading sits just under the grid (which starts at 84px and takes 48% of the screen) */
  #ch04 .card { top: calc(48svh + 100px); }
  .wl-hole-cap.phone-cap { font-size: 13px; }
  .wl-hname { font-size: 12px; }
  .wl-bubble { font-size: 12px; }
  .wl-hname em { display: none; }
  .group-key, .group-key.stack { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 12px; gap: 4px 10px; margin-top: 12px; }
  .group-key.cols { grid-template-rows: none; grid-auto-flow: row; margin-top: 0; }
  .step[data-stage="format"] h2, .step[data-stage="poles"] h2 { margin-bottom: 20px; }
  .key-h { margin-bottom: 8px; font-size: 13px; }
  .wl-hole { max-width: 124px; font-size: 12px; line-height: 15px; }
  .wl-hole-cap { font-size: 12px; }
  .split-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dd-filters { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dd-cat .pills { padding-top: 0; }
  .split-label { padding-top: 0; }
  .strip-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
  .stat b { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .m-anim, .m-anim .m-avs > *, .m-anim .m-line i, .m-anim .m-stack i, .m-stack.m-anim i { opacity: 1 !important; transform: none !important; } .m-mosaic, .m-home-text > *, .m-home > .m-note { animation: none !important; } * { transition: none !important; } .wall-overlay path.hole-run, .wl-bubble, .wl-hole, .wl-hole.on, .wl-hole-cap, .h-in, .spot-av, .spot-title { animation: none !important; } }
/* keyboard focus shows on every control */
a:focus-visible, button:focus-visible { outline: 1px solid var(--ink-2); outline-offset: 3px; }

/* full-width alluvial: its card sits across the top */
@media (min-width: 760px) {
  .step[data-stage^="alluv"], .step[data-stage="spheres"] { align-items: flex-start; padding-top: 14vh; }
  .step[data-stage^="alluv"] .card, .step[data-stage="spheres"] .card { width: min(1100px, calc(100vw - 80px)); }
}

body[data-stage^="alluv"] .scrim, body[data-stage="spheres"] .scrim { opacity: 0 !important; }
