/* afferent. one stylesheet for every page.
   colours and the type pair come from the dendrite window:
   true black, greys, white, and one dark red that belongs to the itch.
   urbanist for words, fragment mono for numbers and labels. */

@font-face { font-family: "Urbanist"; font-weight: 300; font-display: swap;
  src: url("/assets/fonts/Urbanist-Light.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/Urbanist-Regular.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/Urbanist-Medium.woff2") format("woff2"); }
@font-face { font-family: "Fragment Mono"; font-display: swap;
  src: url("/assets/fonts/FragmentMono-Regular.woff2") format("woff2"); }

:root {
  --bg: #000;
  --ink: #ededed;
  --dim: #979797;
  --faint: #575757;
  --line: #262626;
  --panel: rgba(18, 18, 18, 0.94);
  --red: #b3241b;
  --words: "Urbanist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 64px);
  --nav: 52px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--words);
  font-size: 19px;
  line-height: 1.5;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3, p, ol, ul, dl, dd, dt, figure { margin: 0; padding: 0; font: inherit; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; text-transform: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
main:focus, .part:focus, section:focus { outline: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.dim { color: var(--dim); }

/* ------------------------------------------------------------ event layer (behind everything) */

#marks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.frame { position: relative; z-index: 1; }
.wrap { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }

.skip { position: fixed; left: 12px; top: -100px; z-index: 20; background: var(--ink); color: var(--bg); padding: 6px 12px; border-radius: 999px; }
.skip:focus { top: 8px; }

/* ------------------------------------------------------------ top bar */

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: calc(var(--nav) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  /* no backdrop blur: blurring the moving layer behind it every frame was a main cause of lag */
  background: linear-gradient(color-mix(in srgb, var(--bg) 92%, transparent), color-mix(in srgb, var(--bg) 78%, transparent));
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
}
.top nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.top a { padding-block: 12px; color: var(--dim); transition: color 0.2s; }
.top a:hover, .top a:focus-visible, .top a[aria-current="page"], .top .wordmark { color: var(--ink); }

/* ------------------------------------------------------------ floating player */

.player {
  position: fixed; z-index: 10;
  left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  white-space: nowrap;
}
.player button { height: 38px; padding-inline: 16px; border-radius: 999px; color: var(--dim); transition: color 0.2s, background 0.2s; }
.player button:hover { color: var(--ink); }
.player button[aria-pressed="true"] { color: var(--ink); }
.seg { display: flex; gap: 2px; }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.12); }
.tempo { display: flex; align-items: center; padding-left: 6px; margin-left: 2px; border-left: 1px solid var(--line); }
.tempo span { color: var(--ink); min-width: 7ch; text-align: center; font-variant-numeric: tabular-nums; user-select: none; }
.player .tempo button { width: 34px; padding-inline: 0; font-size: 15px; touch-action: manipulation; }

/* the dot on a sound control: hollow when off, lit when on */
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border: 1px solid currentColor; border-radius: 50%; vertical-align: -1px; transition: background 0.2s, box-shadow 0.2s; }
[aria-pressed="true"] > .dot { background: currentColor; box-shadow: 0 0 10px currentColor; }
[data-state="loading"] { cursor: progress; }
[data-state="loading"] > .dot { animation: pulse 0.9s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.25; } to { opacity: 1; } }

/* inline copy of the dry / dendrite switch, used inside pages */
.switch { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; background: rgba(0, 0, 0, 0.5); }
.switch button { height: 36px; padding-inline: 16px; border-radius: 999px; color: var(--dim); transition: color 0.2s, background 0.2s; }
.switch button:hover { color: var(--ink); }
.switch button[aria-pressed="true"] { color: var(--ink); background: rgba(255, 255, 255, 0.12); }

/* buttons */
.cta { display: inline-flex; align-items: center; height: 48px; padding-inline: 26px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 500; font-size: 17px; transition: transform 0.2s var(--ease), background 0.2s; }
.cta:hover { background: #fff; }
.cta:active { background: #d6d6d6; }
.cta .dot { border-color: var(--bg); }
.cta[aria-pressed="true"] .dot { background: var(--bg); box-shadow: none; }
.more { display: inline-flex; align-items: center; height: 48px; color: var(--ink); font-size: 17px; }
.more::after { content: "→"; margin-left: 8px; transition: transform 0.2s var(--ease); }
.more:hover::after { transform: translateX(4px); }
.cta.off { background: none; border: 1px solid var(--faint); color: var(--faint); cursor: default; }
.cta.off:hover { transform: none; background: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; }

/* ------------------------------------------------------------ home: the product */

.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center; justify-items: center; text-align: center;
  gap: 28px;
  padding-top: var(--nav); padding-bottom: 96px;
}
.hero h1 {
  font-weight: 300;
  font-size: clamp(64px, 19vw, 300px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin-block: -0.04em 0;
}
.lede { font-size: clamp(20px, 2.6vw, 30px); font-weight: 300; color: var(--dim); max-width: 24em; text-wrap: balance; }
.hero .sub { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink); max-width: 30em; margin-top: -14px; text-wrap: balance; }

.scene {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center;
  padding-block: 120px;
}
.scene .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1240px; margin-inline: auto; width: 100%; }
.scene h2 { font-weight: 300; font-size: clamp(38px, 6.2vw, 92px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.scene p { color: var(--dim); max-width: 26em; }
.copy { display: grid; gap: 24px; justify-items: start; }
.centre { justify-items: center; text-align: center; max-width: 1240px; margin-inline: auto; }
.centre p { max-width: 30em; }
.hint { color: var(--faint); }

/* live stereo display and the playable field share one square stage */
.stage { width: 100%; max-width: 460px; justify-self: center; display: grid; gap: 16px; justify-items: center; }
.square { position: relative; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 28px; background: rgba(0, 0, 0, 0.6); overflow: hidden; }
.square canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.axis { position: absolute; color: var(--dim); pointer-events: none; }
.axis.up { top: 14px; left: 50%; transform: translateX(-50%); }
.axis.right { right: 16px; top: 50%; transform: translateY(-50%); }
.axis.left { left: 16px; top: 50%; transform: translateY(-50%); }
.axis.down { bottom: 14px; left: 50%; transform: translateX(-50%); }

.field { touch-action: none; cursor: grab; }
.field:active { cursor: grabbing; }
.cell { position: absolute; width: 44px; height: 44px; margin: -22px; border-radius: 50%; }
.cell::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--faint); transition: background 0.2s; }
.cell:hover::after { background: var(--ink); }
.light { position: absolute; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: #fff; box-shadow: 0 0 24px 6px rgba(255, 255, 255, 0.35), 0 0 80px 30px rgba(255, 255, 255, 0.08); pointer-events: none; transition: left 0.3s var(--ease), top 0.3s var(--ease), opacity 0.3s; }
.field.dragging .light { transition: opacity 0.3s; }

.figures { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px clamp(32px, 8vw, 120px); }
.figure { display: grid; gap: 4px; justify-items: center; }
.figure b { font-family: var(--mono); font-weight: 400; font-size: clamp(44px, 9vw, 132px); line-height: 1; letter-spacing: -0.04em; color: var(--red); font-variant-numeric: tabular-nums; }

.foot { border-top: 1px solid var(--line); padding-block: 40px 140px; display: grid; gap: 28px; }
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.foot a { color: var(--dim); transition: color 0.2s; }
.foot a:hover, .foot a:focus-visible { color: var(--ink); }
.foot .links { display: flex; gap: 24px; }

/* the plug-in window on video */
.window { width: 100%; max-width: 1240px; margin-inline: auto; display: grid; gap: 28px; justify-items: center; text-align: center; }
.window .shot { max-width: calc((100svh - 230px) * 1.5714); }
.scene .window p, .centre .hint { max-width: none; }
.window .shot.wide { max-width: 1240px; }
.window .narrow { max-width: 30em; }
.window .title { font-weight: 300; font-size: clamp(38px, 6.2vw, 92px); line-height: 1; letter-spacing: -0.035em; }
.tiles { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 32px); text-align: left; }
.tiles .span { grid-column: 1 / -1; }
.tiles li { display: grid; gap: 14px; align-content: start; }
.tiles .shot { max-width: none; box-shadow: none; border-radius: clamp(12px, 1.6vw, 20px); }
.tiles p { font-size: 17px; max-width: 34em; }
.tiles b { font-weight: 500; }
@media (max-width: 760px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.shot { width: 100%; border: 1px solid var(--line); border-radius: clamp(14px, 2vw, 28px); overflow: hidden; background: #000; line-height: 0; box-shadow: 0 40px 120px rgba(255, 255, 255, 0.05); }
.shot video { width: 100%; height: auto; display: block; }
.part .shot { border-radius: 14px; box-shadow: none; }

/* sections ease in the first time they are seen (only when the script is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ text pages */

main[data-page="text"] { padding-top: calc(var(--nav) + 14vh); padding-bottom: 40px; max-width: 1000px; margin-inline: auto; }
.head { display: grid; gap: 16px; padding-bottom: 24px; }
.head h1 { font-weight: 300; font-size: clamp(48px, 9vw, 120px); line-height: 0.95; letter-spacing: -0.04em; }
.head p { color: var(--dim); }

.index { display: flex; flex-wrap: wrap; gap: 4px 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.index a { color: var(--dim); padding-block: 8px; transition: color 0.2s; }
.index a:hover, .index a:focus-visible { color: var(--ink); }

.part { display: grid; grid-template-columns: 150px minmax(0, 34em); column-gap: 40px; padding-block: 56px; border-top: 1px solid var(--line); scroll-margin-top: var(--nav); }
.head + .part, .index + .part { margin-top: 40px; }
.part > h2 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--dim); padding-top: 6px; }
.part > div { display: grid; gap: 1.1em; min-width: 0; }
.text a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.listen { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.rows { display: grid; grid-template-columns: 110px minmax(0, 1fr); column-gap: 20px; row-gap: 0.7em; }
.rows dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--dim); padding-top: 6px; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 760px) {
  body { font-size: 17px; }
  .scene { min-height: 0; padding-block: 72px; }          /* on phones a scene is as tall as its content */
  .hero { min-height: 100svh; }
  .scene .cols { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 380px; }
  .part { grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding-block: 44px; }
  .rows { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .rows dd { margin-bottom: 0.9em; }
  .player button { padding-inline: 13px; }
  .player .tempo button { width: 30px; }
  .tempo span { min-width: 6.4ch; }
}

@media (max-width: 420px) {
  .top nav a[href$="/legal/"], .top nav a[href$="/colophon/"] { display: none; }      /* still in the footer */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .light, .cta, .more::after { transition: none; }
  [data-state="loading"] > .dot { animation: none; }
}
.top .wordmark { display: inline-flex; align-items: flex-start; }
.wordmark .wm { display: block; height: 30px; width: auto; transform: translateY(4px); }
@media (max-width: 480px) { .wordmark .wm { height: 22px; transform: translateY(3px); } }

/* ------------------------------------------------------------ download: header button, hero button, sheet */

.top nav { align-items: center; }
.top a.get { padding: 0 14px; height: 30px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--ink); color: var(--bg); transition: background 0.2s; }
.top a.get:hover, .top a.get:focus-visible { background: #fff; color: var(--bg); }
.cta.ghost { background: none; color: var(--ink); border: 1px solid var(--faint); }
.cta.ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--dim); }
.hero > .mono:last-child { margin-top: -8px; }
.reveal.later { margin-top: clamp(56px, 9vh, 112px); }

.sheet { margin: auto; width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: #0b0b0b; color: var(--ink); overflow: auto; }
.sheet::backdrop { background: rgba(0, 0, 0, 0.72); }
.sheet[open] { animation: rise 0.28s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.sheet-in { position: relative; display: grid; gap: 18px; justify-items: start; padding: clamp(24px, 5vw, 40px); }
.sheet h2 { font-weight: 300; font-size: clamp(34px, 6vw, 48px); line-height: 1; letter-spacing: -0.03em; }
.sheet .close { position: absolute; top: 18px; right: 18px; height: 32px; padding-inline: 12px; border-radius: 999px; color: var(--dim); }
.sheet .close:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.sheet #sheet-note { margin-top: -6px; }
.files { width: 100%; border-top: 1px solid var(--line); margin-top: 6px; }
.files li { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.files span { width: 72px; color: var(--dim); }
.files li.here span { color: var(--ink); }
.files a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; }
.files a:hover { text-decoration-color: var(--ink); }
.small { font-size: 14px; line-height: 1.5; }
.small a { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ chapter rail (home, wide screens) */

.rail { position: fixed; z-index: 9; right: clamp(14px, 2vw, 28px); top: 50%; transform: translateY(-50%); display: grid; gap: 2px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 26px; color: var(--faint); }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity 0.2s, transform 0.2s var(--ease); }
.rail a::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; transition: transform 0.2s var(--ease), background 0.2s; }
.rail:hover a span, .rail a:focus-visible span, .rail a[aria-current="true"] span { opacity: 1; transform: none; }
.rail a:hover, .rail a[aria-current="true"] { color: var(--ink); }
.rail a[aria-current="true"]::after { background: var(--ink); }
@media (max-width: 900px) { .rail { display: none; } }
@media (max-width: 480px) { .files span { width: 100%; } }
.top a.lang { color: var(--dim); }
@media (max-width: 380px) { .top nav a[href$="/s-001/"]:not(.get) { display: none; } }
/* the sound bar appears once sound has been turned on: until then "listen" in the page is the way in */
body:not(.heard) .player { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(12px); }
.player { transition: opacity 0.3s, transform 0.3s var(--ease); }
/* the first screen of dendrite is balanced on its centre: the same space above and below */
.hero { min-height: 100vh; min-height: 100svh; padding-block: calc(var(--nav) + 32px); }
.rows dt.sub-head { grid-column: 1 / -1; margin-top: 18px; color: var(--faint); }
@media (max-width: 1100px) { .rail { display: none; } }
.scene[data-chapter="window"] { min-height: 0; padding-top: 0; }


/* ------------------------------------------------------------ afferent: the imprint's home */

.works { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.works a { display: grid; grid-template-columns: 7ch minmax(0, 1fr) auto; grid-template-areas: "num name state" "num what state"; column-gap: 24px; row-gap: 4px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.works .mono.dim { grid-area: num; }
.works .name { grid-area: name; font-size: clamp(28px, 3.4vw, 44px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; transition: transform 0.3s var(--ease); }
.works .what { grid-area: what; color: var(--dim); }
.works .state { grid-area: state; color: var(--red); font-size: 12px; }
.works a:hover .name, .works a:focus-visible .name { transform: translateX(6px); }
.works + p { margin-top: 18px; }
@media (max-width: 600px) {
  .works a { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num state" "name name" "what what"; }
}
.imprint h1.mark { line-height: 0; margin: 0; }
.imprint h1.mark .wm { width: min(84vw, 900px); height: auto; fill: currentColor; }


/* ============================================================ alive (assets/alive.js)
   a document that is also a spreadsheet, a memo, a pdf and a type specimen. */

@property --bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #ededed; }
@property --dim { syntax: "<color>"; inherits: true; initial-value: #979797; }
@property --faint { syntax: "<color>"; inherits: true; initial-value: #575757; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #262626; }
body { transition: --bg 0.7s var(--ease), --ink 0.7s var(--ease), --dim 0.7s var(--ease), --faint 0.7s var(--ease), --line 0.7s var(--ease); }
/* a sheet of paper: the notes are read on it */
body.paper { --bg: #ebe9e3; --ink: #121212; --dim: #55534f; --faint: #9b9892; --line: #cfccc4; }
body.paper ::selection { background: #121212; color: #ebe9e3; }
.player { --ink: #ededed; --dim: #979797; --faint: #575757; --line: #262626; }

/* ------------------------------------------------------------ chrome: rulers, formula bar, page count */

.chrome { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .js .chrome { display: block; }
}
.ruler { position: fixed; z-index: 9; pointer-events: none; color: var(--faint); font-family: var(--mono); font-size: 9px; }
.ruler.x { top: var(--nav); left: 0; right: 0; height: 8px;
  background:
    repeating-linear-gradient(90deg, var(--faint) 0 1px, transparent 1px 80px) 0 0 / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 8px) 0 0 / 100% 4px no-repeat; }
.ruler.y { top: var(--nav); bottom: 0; left: 0; width: 8px;
  background:
    repeating-linear-gradient(180deg, var(--faint) 0 1px, transparent 1px 80px) 0 0 / 8px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--line) 0 1px, transparent 1px 8px) 0 0 / 4px 100% no-repeat; }
/* how far down the document you are, as a thin line on the left ruler */
.ruler.y::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: calc(var(--read, 0) * 100%); background: var(--red); }
.ruler .pos { position: absolute; background: var(--red); }
.ruler.x .pos { left: var(--at, -10px); top: 0; width: 1px; height: 12px; }
.ruler.y .pos { top: calc(var(--at, -10px) - var(--nav)); left: 0; height: 1px; width: 12px; }
.ruler .read { position: absolute; font-style: normal; color: var(--dim); letter-spacing: 0.04em; }
.ruler.x .read { left: calc(var(--at, -100px) + 5px); top: 10px; }
.ruler.y .read { top: calc(var(--at, -100px) - var(--nav) + 4px); left: 12px; }
.formula, .pageno { position: fixed; z-index: 9; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); font-size: 11px; color: var(--dim); pointer-events: none; }
.formula { left: var(--gutter); display: flex; align-items: center; gap: 10px; max-width: 34vw; white-space: nowrap; overflow: hidden; }
.formula b { font-weight: 400; color: var(--ink); border: 1px solid var(--line); padding: 2px 7px; min-width: 5ch; text-align: center; }
.formula span:nth-child(2) { font-style: italic; color: var(--faint); }
.formula [data-formula] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.pageno { right: var(--gutter); font-variant-numeric: tabular-nums; }
.pageno [data-pageno] { display: inline-block; color: var(--ink); }

/* ------------------------------------------------------------ the veil between pages */

.veil { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.veil.signal { background: var(--bg); clip-path: inset(var(--y) 0 calc(100% - var(--y) - 2px) 0); }
.veil .axon { position: absolute; left: 0; right: 0; top: var(--y); height: 2px; background: var(--red); box-shadow: 0 0 14px var(--red); transform: scaleX(0); transform-origin: var(--x) 50%; }
.veil .ring { position: absolute; left: 50%; top: 50%; width: 120vmax; height: 120vmax; border: 1px solid var(--ink); border-radius: 50%; opacity: 0; }
.veil .scan { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); box-shadow: 0 0 18px 1px color-mix(in srgb, var(--ink) 60%, transparent); opacity: 0.7; }

/* ------------------------------------------------------------ home: leaves of one document */

main[data-page="home"] .leaf { position: relative; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav) + 56px) max(var(--gutter), 40px) 96px; border-bottom: 1px dashed var(--line); }
.leaf .crop { position: absolute; width: 16px; height: 16px; border: 0 solid var(--faint); }
.leaf .crop.tl { left: 18px; top: calc(var(--nav) + 18px); border-left-width: 1px; border-top-width: 1px; }
.leaf .crop.tr { right: 18px; top: calc(var(--nav) + 18px); border-right-width: 1px; border-top-width: 1px; }
.leaf .crop.bl { left: 18px; bottom: 18px; border-left-width: 1px; border-bottom-width: 1px; }
.leaf .crop.br { right: 18px; bottom: 18px; border-right-width: 1px; border-bottom-width: 1px; }
.folio { position: absolute; left: max(var(--gutter), 40px); right: max(var(--gutter), 40px); top: calc(var(--nav) + 20px); display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; }

.leaf.first { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.memo { position: relative; z-index: 2; width: min(100%, 440px); display: grid; border-top: 1px solid var(--line); }
.memo > div { display: grid; grid-template-columns: 7ch minmax(0, 1fr); gap: 12px; padding-block: 7px; border-bottom: 1px solid var(--line); }
.memo dt { color: var(--faint); }
.memo dt::after { content: ":"; }
.memo-sound { display: inline-flex; align-items: center; color: var(--ink); position: relative; --dot-x: 4px; }
.memo-sound .dot { margin-right: 8px; }
.memo-sound[aria-pressed="true"] { color: var(--red); }

.blank { position: relative; z-index: 2; align-self: center; display: grid; justify-items: center; text-align: center; gap: 30px; padding-block: 48px; pointer-events: none; }
.blank a, .blank button { pointer-events: auto; }
.blank h1.mark { position: relative; line-height: 0; pointer-events: auto;
  opacity: calc(1 - var(--p, 0) * 0.9); filter: blur(calc(var(--p, 0) * 5px)); }
.blank h1.mark .wm { width: min(78vw, 860px); height: auto; fill: currentColor; display: block; }
.entry { max-width: 36em; font-size: 17px; line-height: 1.6; color: var(--ink); text-wrap: pretty; opacity: calc(1 - var(--p, 0) * 1.4); }
.entry .mono { margin-right: 0.6em; }
.entry i { font-style: italic; }
.intent { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--dim); }
.fn { color: var(--red); font-size: 9px; vertical-align: super; margin-left: 3px; letter-spacing: 0; }
.footnote { position: relative; z-index: 2; color: var(--dim); border-top: 1px solid var(--line); padding-top: 10px; width: min(100%, 440px); margin-bottom: 18px; }
.footnote > span:first-child { color: var(--red); font-size: 9px; vertical-align: super; margin-right: 6px; }
.footnote .touch { display: none; }
@media (hover: none) { .footnote .pointer { display: none; } .footnote .touch { display: inline; } }

/* under the blank page: words only seen through the lens */
.hidden-layer { display: none; }
.js .hidden-layer { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  -webkit-mask-image: radial-gradient(circle calc(190px * var(--lens, 0.7)) at var(--mx, 50%) var(--my, 50%), #000 0, #000 35%, transparent 100%);
  mask-image: radial-gradient(circle calc(190px * var(--lens, 0.7)) at var(--mx, 50%) var(--my, 50%), #000 0, #000 35%, transparent 100%); }
.hidden-layer span { position: absolute; white-space: nowrap; }
.js .leaf.first::after { content: ""; position: absolute; z-index: 1; left: var(--mx, 50%); top: var(--my, 50%); width: calc(380px * var(--lens, 0.7)); aspect-ratio: 1;
  border: 1px dashed var(--line); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; transition: width 0.4s var(--ease); }
@media (max-width: 760px) { .hidden-layer span { white-space: normal; max-width: 52vw; } }
@media (prefers-reduced-motion: reduce) { .js .leaf.first::after { display: none; } }

/* headings of the other leaves */
.leaf-head { display: grid; gap: 12px; margin-bottom: clamp(36px, 6vh, 64px); }
.leaf-head h2 { font-weight: 300; font-size: clamp(56px, 10vw, 148px); line-height: 0.92; letter-spacing: -0.045em; }

/* the works sheet */
.grid { border-top: 1px solid var(--line); font-size: 16px; }
.grid-row { position: relative; display: grid; grid-template-columns: 5ch minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 0.6fr); border-bottom: 1px solid var(--line); align-items: stretch; }
.grid-row > [role] { padding: 16px 14px; border-left: 1px solid var(--line); min-width: 0; }
.grid-row > [role]:first-child { border-left: 0; padding-left: 0; }
.grid-row.head { color: var(--faint); counter-reset: col; }
.grid-row.head > span { padding-block: 9px; transition: color 0.2s, background 0.2s; }
.grid-row.head > span:not(:first-child) { counter-increment: col; }
.grid-row.head > span:not(:first-child)::before { content: counter(col, lower-alpha); margin-right: 1.2ch; color: var(--line); }
.grid-row.head > span.hot { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.grid-row.head > span.hot::before { color: var(--red); }
.grid-row.work { transition: background 0.25s; }
.grid-row.work .name { font-size: clamp(24px, 2.4vw, 34px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; }
.grid-row.work > span:nth-child(3) { color: var(--dim); }
.grid-row.work .state { color: var(--red); }
.grid-row.work::after { content: ""; position: absolute; inset: -1px; border: 2px solid transparent; pointer-events: none; transition: border-color 0.15s; }
.grid-row.work::before { content: ""; position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; background: var(--ink); border: 1px solid var(--bg); opacity: 0; z-index: 2; transition: opacity 0.15s; }
.grid-row.work:hover, .grid-row.work:focus-visible { background: color-mix(in srgb, var(--ink) 4%, transparent); outline: none; }
.grid-row.work:hover::after, .grid-row.work:focus-visible::after { border-color: var(--ink); }
.grid-row.work:hover::before, .grid-row.work:focus-visible::before { opacity: 1; }
.sprout { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.5s; }
.grid-row.empty .reserved { color: var(--faint); }
.grid-row.empty { transition: background 0.3s; }
.grid-row.empty:hover { background: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--ink) 6%, transparent) 7px 8px); }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--red); vertical-align: 1px; animation: rec 1.6s steps(1) infinite; }
@keyframes rec { 50% { opacity: 0.2; } }
@media (max-width: 760px) {
  .grid-row { grid-template-columns: 3ch minmax(0, 1fr) auto; }
  .grid-row.head { display: none; }
  .grid-row > [role] { border-left: 0; padding: 14px 8px; }
  .grid-row.work > span:nth-child(3) { grid-column: 2 / -1; grid-row: 2; padding-top: 0; }
  .grid-row.work > span:nth-child(4), .grid-row.work > span:nth-child(6) { display: none; }
  .grid-row.work > span:nth-child(5) { grid-column: 3; grid-row: 1; }
  .grid-row.empty > span:nth-child(n+3) { display: none; }
}

/* notes with an answering margin */
.notes { border-top: 1px solid var(--line); }
.notes li { display: grid; grid-template-columns: minmax(0, 36em) minmax(0, 1fr); column-gap: clamp(32px, 6vw, 96px); row-gap: 14px; padding-block: 40px; border-bottom: 1px solid var(--line); }
.notes h3 { grid-column: 1; font-size: clamp(26px, 2.6vw, 36px); font-weight: 300; letter-spacing: -0.025em; line-height: 1.1; }
.notes h3 .mono { color: var(--red); margin-right: 16px; vertical-align: 0.5em; }
.notes p { grid-column: 1; color: var(--dim); max-width: 36em; }
.notes .margin { grid-column: 2; grid-row: 1 / span 2; align-self: start; max-width: 26em; padding-left: 18px; border-left: 1px solid var(--line); color: var(--faint); line-height: 1.6;
  transform: translateX(14px); transition: transform 0.5s var(--ease), color 0.3s, border-color 0.3s; }
.notes .margin::before { content: "↳ "; color: var(--red); opacity: 0; transition: opacity 0.3s; }
.notes li:hover .margin { transform: none; color: var(--ink); border-color: var(--red); }
.notes li:hover .margin::before { opacity: 1; }
@media (max-width: 760px) { .notes li { grid-template-columns: minmax(0, 1fr); } .notes .margin { grid-column: 1; grid-row: auto; transform: none; } }

/* the type specimen */
.specimen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.glyph { position: relative; height: clamp(300px, 38vw, 500px); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat; }
.glyph .big { display: block; font-size: clamp(170px, 24vw, 340px); line-height: 1; font-weight: 300; letter-spacing: -0.02em; color: var(--ink); background: var(--bg); padding-inline: 0.06em; }
.glyph .big.mono { font-family: var(--mono); font-weight: 400; font-size: clamp(150px, 20vw, 290px); letter-spacing: 0; }
.glyph [data-glyph-name] { position: absolute; left: 14px; bottom: 12px; right: 14px; }
.guide { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); z-index: 1; pointer-events: none; transition: top 0.4s var(--ease); }
.guide.base { border-top-style: solid; border-color: var(--faint); }
.guide b { position: absolute; right: 10px; top: -15px; font-weight: 400; font-size: 10px; color: var(--faint); }
.glyph .big { position: relative; z-index: 0; background: none; }
.set { display: grid; gap: 28px; }
.words-set { font-size: clamp(24px, 2.6vw, 34px); font-weight: 300; line-height: 1.5; word-spacing: 0.2em; }
.mono-set { font-size: 15px !important; line-height: 2; word-spacing: 0.4em; color: var(--dim); }
.g { cursor: crosshair; border-radius: 3px; transition: color 0.15s, background 0.15s; }
.g:hover, .g.on { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.end { margin-top: clamp(56px, 10vh, 120px); }
.end a { color: var(--ink); }
@media (max-width: 760px) { .specimen { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ reveals on scroll, four kinds */

.js [data-reveal="rise"] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal="type"] { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s steps(32, end); }
.js [data-reveal="draw"] { background: linear-gradient(var(--faint), var(--faint)) 0 100% / 0 1px no-repeat; transition: background-size 1.1s var(--ease); }
.js [data-reveal="draw"] > * { opacity: 0; transition: opacity 0.6s 0.4s; }
.js [data-reveal].in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); background-size: 100% 1px; }
.js [data-reveal="draw"].in > * { opacity: 1; }
.js .grid-row:nth-child(3)[data-reveal] { transition-delay: 0.12s; }
.js .grid-row:nth-child(4)[data-reveal] { transition-delay: 0.24s; }
.js .grid-row:nth-child(5)[data-reveal] { transition-delay: 0.36s; }
.js .notes li:nth-child(2)[data-reveal] { transition-delay: 0.1s; }
.js .notes li:nth-child(3)[data-reveal] { transition-delay: 0.2s; }
/* the dendrite page: each section has its own way in */
.js .reveal.r-focus { transform: none; filter: blur(14px); transition: opacity 1.1s var(--ease), filter 1.1s var(--ease); }
.js .reveal.r-scan { transform: none; clip-path: inset(0 0 100% 0); transition: opacity 0.4s, clip-path 1.2s var(--ease); }
.js .reveal.r-wide { transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js .reveal.in { filter: none; clip-path: inset(0 0 0 0); transform: none; }

/* ------------------------------------------------------------ hovers, each one saying what the thing does */

/* the wordmark: a ring closes on the centre */
[data-hover="pulse"] { position: relative; }
.pulsing::after { content: ""; position: absolute; left: 50%; top: 50%; width: 180%; aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%;
  pointer-events: none; animation: inward 0.75s cubic-bezier(0.6, 0, 0.8, 0.4) forwards; }
.blank .pulsing::after { width: 60%; }
@keyframes inward { from { transform: translate(-50%, -50%) scale(1); opacity: 0; } 35% { opacity: 0.7; } to { transform: translate(-50%, -50%) scale(0); opacity: 1; } }
.pulsing .wm { animation: gather 0.75s var(--ease); }
@keyframes gather { 50% { transform: scaleX(0.965); } }
.top .wordmark.pulsing .wm { animation: none; }

/* colophon: the letters change face */
[data-hover="face"] .ch { display: inline-block; }
[data-hover="face"] .ch.alt { font-family: var(--words); font-size: 14px; color: var(--ink); }

/* legal: a § and small print */
[data-hover="section"]::before { content: "§"; display: inline-block; width: 0; opacity: 0; overflow: hidden; vertical-align: bottom; transition: width 0.25s var(--ease), opacity 0.25s, margin 0.25s; }
[data-hover="section"] { transition: color 0.2s, font-size 0.25s, letter-spacing 0.25s; }
[data-hover="section"]:hover::before, [data-hover="section"]:focus-visible::before { width: 1ch; margin-right: 0.6ch; opacity: 1; }
[data-hover="section"]:hover, [data-hover="section"]:focus-visible { font-size: 10px; letter-spacing: 0.06em; }

/* language: split flap */
[data-hover="flap"] { display: inline-block; text-align: left; }

/* writing: the caret */
.typing::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 2px; background: currentColor; vertical-align: -0.14em; animation: caret 0.8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* more: a spike train runs out along the arrow */
.more:hover::after, .more:focus-visible::after { animation: spike 0.7s var(--ease); }
@keyframes spike {
  0% { transform: none; text-shadow: none; }
  45% { transform: translateX(12px); text-shadow: -6px 0 color-mix(in srgb, currentColor 50%, transparent), -12px 0 color-mix(in srgb, currentColor 25%, transparent), -18px 0 color-mix(in srgb, currentColor 10%, transparent); }
  100% { transform: translateX(4px); text-shadow: none; }
}

/* sound: rings go out from the dot */
[data-action="sound"] { position: relative; --dot-x: 30px; }
.player [data-action="sound"] { --dot-x: 20px; }
[data-action="sound"]:hover::before, [data-action="sound"]:hover::after, [data-action="sound"]:focus-visible::after {
  content: ""; position: absolute; left: var(--dot-x); top: 50%; width: 8px; height: 8px; margin: -4px; border: 1px solid currentColor; border-radius: 50%; pointer-events: none;
  animation: ring 1.4s ease-out infinite; }
[data-action="sound"]:hover::after { animation-delay: 0.45s; }
.cta[data-action="sound"]:hover::before, .cta[data-action="sound"]:hover::after { border-color: var(--ink); }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(6); opacity: 0; } }

/* links in the footer and in text: a line is drawn under them, left to right */
[data-hover="axon"] { background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1px no-repeat; transition: background-size 0.45s var(--ease), color 0.2s; }
[data-hover="axon"]:hover, [data-hover="axon"]:focus-visible { background-size: 100% 1px; }
.text a[data-hover="axon"] { text-decoration-color: var(--faint); }
.text a[data-hover="axon"]:hover { text-decoration-color: transparent; }

/* dendrite repeats, dry does not */
[data-action="dendrite"]:hover { animation: echo 1.2s ease-out infinite; }
@keyframes echo { from { text-shadow: 0 0 transparent, 0 0 transparent; } 60% { text-shadow: 9px 0 color-mix(in srgb, currentColor 40%, transparent), 18px 0 color-mix(in srgb, currentColor 16%, transparent); } to { text-shadow: 14px 0 transparent, 28px 0 transparent; } }
[data-action="dry"] { transition: color 0.2s, background 0.2s, letter-spacing 0.3s; }
[data-action="dry"]:hover { letter-spacing: -0.04em; }

/* tempo: each button ticks at the speed it leads to */
.tempo [data-action="faster"]:hover { animation: tick 0.22s ease-in-out infinite alternate; }
.tempo [data-action="slower"]:hover { animation: tick 0.7s ease-in-out infinite alternate; }
@keyframes tick { to { opacity: 0.4; } }

/* dendrite: the name gathers repeats as you scroll past it */
[data-echo] { text-shadow: calc(var(--p, 0) * 90px) 0 color-mix(in srgb, var(--ink) 28%, transparent), calc(var(--p, 0) * 180px) 0 color-mix(in srgb, var(--ink) 12%, transparent), calc(var(--p, 0) * 270px) 0 color-mix(in srgb, var(--ink) 5%, transparent); }
.hero .status { display: inline-flex; align-items: center; color: var(--red); letter-spacing: 0.08em; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js .reveal.r-focus, .js .reveal.r-scan, .js .reveal.r-wide { opacity: 1; transform: none; clip-path: none; filter: none; transition: none; background-size: 100% 1px; }
  .js [data-reveal="draw"] > * { opacity: 1; transition: none; }
  .pulsing::after, .pulsing .wm, .typing::after, .live-dot, [data-action]:hover, [data-action]:hover::before, [data-action]:hover::after, .more:hover::after { animation: none !important; }
  body { transition: none; }
  .blank h1.mark, .entry { transform: none; filter: none; opacity: 1; }
  [data-echo] { text-shadow: none; }
}

/* fixes after the first look */
.grid-row { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 0.6fr); }
.grid-row > [role] { display: flex; align-items: center; }
@media (max-width: 760px) { .grid-row { grid-template-columns: 32px minmax(0, 1fr) auto; } .grid-row.work > span:nth-child(3) { display: block; } }
html[data-leaves] .rail { display: none !important; }
.formula, .pageno { background: var(--bg); padding: 4px 8px; margin-inline: -8px; border-radius: 4px; }
.memo, .footnote, .entry, .intent { background: var(--bg); box-shadow: 0 0 0 10px var(--bg); }
.entry { box-shadow: 0 0 0 14px var(--bg); }
[data-hover="type"]:not(.cta), [data-hover="face"] { display: inline-block; }

/* ------------------------------------------------------------ slides: every section of the dendrite page is one screen.
   the page settles on each one; a slide that is leaving sinks back and fades as the next comes up. */
html { scroll-snap-type: y proximity; }
.hero, .scene { scroll-snap-align: start; }
.scene, .scene[data-chapter="window"] { min-height: 100vh; min-height: 100svh; padding-block: calc(var(--nav) + 48px) 72px; }
@media (max-width: 760px) { .scene, .scene[data-chapter="window"] { min-height: 100svh; padding-block: calc(var(--nav) + 32px) 56px; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero > *, .scene > * { animation: slide-away linear none; animation-timeline: view(); animation-range: exit 10% exit 100%; }
  }
}
@keyframes slide-away { to { transform: translateY(-6vh); opacity: 0; filter: blur(6px); } }

/* ------------------------------------------------------------ spec page: facts, tables, diagrams */

.index { position: sticky; top: calc(var(--nav) + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; scrollbar-width: none; }
.index::-webkit-scrollbar { display: none; }
.index + .part { margin-top: 0; border-top: 0; }
/* a section jumped to from the index lands below the bar and the index (one row, 35px with its line) */
.index ~ .part { scroll-margin-top: calc(var(--nav) + env(safe-area-inset-top, 0px) + 35px); }
.part h3 { font-size: 12px; font-weight: 400; letter-spacing: 0.02em; margin-top: 0.6em; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; font-size: 12px; color: var(--dim); }
.facts b { font-weight: 400; color: var(--ink); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); font-weight: 300; }
.tbl thead th { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--dim); }
.tbl tbody th { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--ink); white-space: nowrap; }
.diagram { margin: 0; }
.diagram svg { display: block; width: 100%; max-width: 420px; height: auto; }
.diagram.fieldmap svg { max-width: 340px; }
.still { margin: 0; display: grid; gap: 8px; }
/* stills and clips never grow past their own pixels: nothing on this page is magnified */
.still .shot { width: auto; max-width: 100%; justify-self: start; }
.still img, .still video { max-width: 100%; height: auto; display: block; }
a.u { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--faint); transition: text-decoration-color 0.2s; }
a.u:hover, a.u:focus-visible { text-decoration-color: var(--ink); }
/* paths and commands keep their real letters (the body is lowercased) */
code, pre { font-family: var(--mono); font-size: 13px; text-transform: none; }
:not(pre) > code { overflow-wrap: anywhere; }
pre { margin: 0.7em 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; line-height: 1.6; white-space: pre; }
.still figcaption { max-width: 60ch; }
.earlier { margin-top: 1em; }
.earlier summary { cursor: pointer; padding-block: 8px; }
.earlier[open] summary { margin-bottom: 0.8em; }
@media (max-width: 760px) {
  .tbl tbody th { white-space: normal; }
  .tbl th, .tbl td { padding-right: 10px; }
}

/* 3 dec: install, the countdown, the picture viewer */
.launch { font-size: 1.15em; }
.countdown { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0.6em 0 1.2em; font-size: 12px; color: var(--dim); }
.countdown b { display: block; font-weight: 300; font-size: clamp(34px, 6vw, 56px); line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.steps { list-style: decimal; padding-left: 1.4em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35em; }
.steps li::marker { font-family: var(--mono); font-size: 12px; color: var(--dim); }
#install .rows { margin-top: 1.2em; }
.viewer { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, 0.94); display: none; place-items: center; cursor: zoom-out; }
.viewer[open] { display: grid; }
.viewer::backdrop { background: #000; }
.viewer img { max-width: min(100vw - 32px, 1920px); max-height: calc(100svh - 96px); width: auto; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.viewer .close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; height: 34px; padding-inline: 14px; border-radius: 999px; font-size: 12px; color: var(--dim); background: rgba(255, 255, 255, 0.06); }
.viewer .close:hover, .viewer .close:focus-visible { color: var(--ink); }
a.shot { cursor: zoom-in; }
/* text pages: the bar is solid, so text scrolling under it never shows through */
.top { background: var(--bg); }
@media (max-width: 760px) { pre { font-size: 11px; padding: 10px 12px; } }

/* the countdown in the itch's red (dendrite's RedRamp.h: black, #b3251d, pale #ffe3de). a new number flares
   and heals; the old one stays as a trace that rises, blurs and sinks to black. slower units leave longer,
   hazier traces (1.6 s, 24 s, 15 min, 3 h). trace lives (--life) are mirrored in site.js (CD_LIFE). */
.countdown { --itch: #b3251d; --itch-pale: #ffe3de; }
.countdown b { position: relative; display: block; color: var(--itch); font-variant-numeric: tabular-nums; }
.countdown b i { font-style: normal; }
.countdown .cd-now { position: relative; z-index: 1; display: inline-block; }
.countdown .cd-now.arrive { animation: cd-arrive 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.countdown .cd-trace { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; will-change: transform, opacity, filter;
  animation: cd-trace var(--life) cubic-bezier(0.25, 0.6, 0.35, 1) forwards; }
.countdown [data-cd="s"] { --life: 1.6s; --o0: 0.85; --b0: 0px; --b1: 3px; --rise: 0.1em; }
.countdown [data-cd="m"] { --life: 24s; --o0: 0.75; --b0: 0.5px; --b1: 7px; --rise: 0.22em; }
.countdown [data-cd="h"] { --life: 900s; --o0: 0.55; --b0: 3px; --b1: 16px; --rise: 0.4em; }
.countdown [data-cd="d"] { --life: 10800s; --o0: 0.5; --b0: 4px; --b1: 20px; --rise: 0.5em; }
@keyframes cd-arrive {
  0% { color: var(--itch-pale); transform: translateY(-0.07em); text-shadow: 0 0 0.25em rgba(179, 37, 29, 0.95); }
  18% { transform: translateY(0.025em); }
  100% { color: var(--itch); transform: none; text-shadow: 0 0 0 rgba(179, 37, 29, 0); }
}
@keyframes cd-trace {
  0% { opacity: var(--o0); filter: blur(var(--b0)); transform: none; color: var(--itch); }
  35% { color: #7a0b05; }
  100% { opacity: 0; filter: blur(var(--b1)); transform: translateY(calc(-1 * var(--rise))); color: #1e0000; }
}
/* reduced motion: the traces still fade, blur and darken, nothing rises or jolts */
@media (prefers-reduced-motion: reduce) {
  .countdown b { --rise: 0em !important; }
  .countdown .cd-now.arrive { animation-name: cd-arrive-still; }
}
@keyframes cd-arrive-still { 0% { color: var(--itch-pale); text-shadow: 0 0 0.25em rgba(179, 37, 29, 0.95); } 100% { color: var(--itch); text-shadow: 0 0 0 rgba(179, 37, 29, 0); } }

/* install lines: one line each, a copy button at the right */
pre.cmd { position: relative; padding-right: 74px; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; }
pre.cmd .copy { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); height: 28px; padding-inline: 10px; border-radius: 999px; font-size: 11px; color: var(--dim); background: rgba(255, 255, 255, 0.06); cursor: pointer; }
pre.cmd .copy:hover, pre.cmd .copy:focus-visible { color: var(--ink); }
#install h3 { margin-top: 2.2em; }
