/* afferent.page, third version. three pages, one idea per screen.
   black, ink, greys. fragment mono for the words; urbanist light only for the big product name.
   free native scroll, no snapping: the finger and the wheel keep their own momentum.
   the motion is tied to scroll position, so it follows the hand at any speed. */

@font-face { font-family: "Urbanist"; font-weight: 300; font-display: swap; src: url("/assets/fonts/Urbanist-Light.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: #8f8f8f; --faint: #555; --faint-text: #7a7a7a; --line: #242424;
  --display: "Urbanist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --nav: 56px;
  --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(--mono); font-size: 16px; line-height: 1.6; letter-spacing: 0.01em;
  text-transform: lowercase; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
.keep-case { text-transform: none; }
::selection { background: var(--ink); color: var(--bg); }
h1, h2, p, figure, table { margin: 0; font: inherit; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
main: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; }
.small { font-size: 13px; color: var(--dim); letter-spacing: 0.03em; }
.skip { position: fixed; left: 12px; top: -100px; z-index: 30; background: var(--ink); color: var(--bg); padding: 6px 12px; border-radius: 999px; }
.skip:focus { top: 8px; }
#marks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.55; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 250ms; }

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

.top { position: fixed; z-index: 20; inset: 0 0 auto; height: calc(var(--nav) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 12px; letter-spacing: 0.04em; background: linear-gradient(rgba(0, 0, 0, 0.7), transparent); }
.top .wordmark { display: inline-flex; }
.wordmark .wm { display: block; height: 26px; width: auto; fill: var(--ink); }
.top nav { display: flex; gap: clamp(14px, 3vw, 36px); }
.top nav a { position: relative; padding-block: 12px; color: var(--faint-text); transition: color 0.25s; white-space: nowrap; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.top nav a:hover { color: var(--dim); }
.top nav a:hover::after { transform: none; }
.top nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 420px) { .wordmark .wm { height: 21px; } .top nav { gap: 14px; } }

/* ------------------------------------------------------------ slides */

main { position: relative; z-index: 1; }
.slide { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; align-items: center; justify-items: center;
  padding: calc(var(--nav) + 28px) var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px)); }
/* the column is as wide as the screen allows; only running text is held to a reading width.
   (a 40em column made the big title, the wordmark and the works table wider than their column,
   and grid let them spill out on the right only: everything big sat 60 to 110px right of centre.) */
.copy { position: relative; z-index: 2; display: grid; justify-items: center; gap: 18px; width: 100%; max-width: 100%; min-width: 0; text-align: center; }
.copy > p, .copy > h2 { max-width: 40em; }
.slide h1 { font-family: var(--display); font-weight: 300; font-size: clamp(76px, 18vw, 260px); line-height: 0.9; letter-spacing: -0.045em; }
.slide h2 { font-size: clamp(22px, 3vw, 38px); line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; max-width: 22em; }
.slide h2.big, .slide h1.big { font-family: var(--display); font-weight: 300; font-size: clamp(56px, 10vw, 150px); line-height: 0.95; letter-spacing: -0.04em; }
.slide h2.big { margin-bottom: 0.2em; }   /* the tail of the g stays clear of the email box */
.slide h2.small { font-size: 12px; }
.slide p { color: var(--dim); max-width: 32em; text-wrap: balance; }
.slide .lede { color: var(--ink); font-size: clamp(16px, 1.8vw, 21px); line-height: 1.5; }
.hero .copy { gap: 14px; }
.hero h1 { margin-bottom: 10px; }
.status { display: inline-flex; align-items: center; margin-top: 6px; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: var(--ink); animation: rec 1.6s steps(1) infinite; }
@keyframes rec { 50% { opacity: 0.15; } }

/* the hero's specimen, dim, behind everything */
.backdrop { position: absolute; inset: 0; z-index: 0; opacity: 0.4; }
.backdrop video { width: 100%; height: 100%; object-fit: cover; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), #000 78%); }

/* a slide with a 9:16 clip. desktop: a tall panel on one side, the words on the other, sides alternating */
.with-clip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(32px, 6vw, 110px); }
.with-clip .clip { height: 78vh; aspect-ratio: 9 / 16; justify-self: end; border-radius: 14px; overflow: hidden; background: #050505; border: 1px solid var(--line); }
.with-clip.left .clip { grid-column: 1; justify-self: end; }
.with-clip.left .copy { grid-column: 2; justify-self: start; justify-items: start; text-align: left; }
.with-clip.right .clip { grid-column: 2; grid-row: 1; justify-self: start; }
.with-clip.right .copy { grid-column: 1; grid-row: 1; justify-self: end; justify-items: end; text-align: right; }
.clip video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* phone: the clip fills the screen behind the words, the words sit in the lower third over a shade */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .with-clip { grid-template-columns: minmax(0, 1fr); align-items: end; }
  .with-clip .clip { position: absolute; inset: 0; height: auto; aspect-ratio: auto; border: 0; border-radius: 0; }
  .with-clip .clip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85) 72%, #000); }
  .with-clip.left .copy, .with-clip.right .copy { grid-column: 1; justify-self: center; justify-items: center; text-align: center; padding-bottom: 24px; }
  .slide h2 { font-size: clamp(21px, 6vw, 28px); }
}

/* ------------------------------------------------------------ controls */

.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; margin-top: 10px; }
.with-clip.right .actions { justify-content: flex-end; }
.with-clip.left .actions { justify-content: flex-start; }
.cta { position: relative; display: inline-flex; align-items: center; height: 46px; padding-inline: 22px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg); font-size: 13px; letter-spacing: 0.04em; transition: background 0.2s, color 0.2s, transform 0.2s var(--ease); }
.cta:hover { background: #fff; }
.cta:active { background: #d6d6d6; }
.cta.ghost { background: none; color: var(--ink); border-color: var(--faint); }
.cta.ghost:hover { border-color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border: 1px solid currentColor; border-radius: 50%; transition: background 0.2s; }
[aria-pressed="true"] > .dot { background: currentColor; }
[data-state="loading"] > .dot { animation: pulse 0.9s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.25; } }
/* play: rings go out from the dot, the way sound leaves a speaker */
[data-action="sound"] { --dot-x: 26px; }
.player [data-action="sound"] { --dot-x: 20px; }
[data-action="sound"]:hover::before, [data-action="sound"]:hover::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; }
@keyframes ring { to { transform: scale(6); opacity: 0; } }
.more { display: inline-flex; align-items: center; height: 44px; font-size: 13px; color: var(--ink); }
.more::after { content: "→"; margin-left: 10px; transition: transform 0.25s var(--ease); }
.more:hover::after { transform: translateX(5px); }

.switch { display: inline-flex; align-items: center; gap: 2px; height: 46px; padding: 4px 4px 4px 16px; border: 1px solid var(--line); border-radius: 999px; }
.switch .small { margin-right: 8px; }
.switch button { height: 36px; padding-inline: 14px; border-radius: 999px; color: var(--dim); font-size: 13px; transition: color 0.2s, background 0.2s; }
.switch button:hover { color: var(--ink); }
.switch button[aria-pressed="true"] { color: var(--bg); background: var(--ink); }

.credit a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.credit a:hover { text-decoration-color: var(--ink); }

/* works: a catalogue, hairline rules */
.works { border-collapse: collapse; width: min(760px, 86vw); font-size: 13px; text-align: left; }
.works td { padding: 14px 12px 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: baseline; }
.works td:first-child { color: var(--dim); width: 4ch; }
.works td:last-child { color: var(--dim); text-align: right; padding-right: 0; }
.works tr.empty td { color: var(--faint-text); }
.works a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; }
.works a:hover { text-decoration-color: var(--ink); }
@media (max-width: 560px) { .works td:nth-child(3) { display: none; } }

.mark { line-height: 0; }
.mark .wm { width: min(78vw, 760px); height: auto; fill: var(--ink); }
.mail { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 6px; text-decoration-thickness: 1px; transition: text-decoration-color 0.25s; }
.mail:hover { text-decoration-color: var(--ink); }

/* the last slide of a page carries the footer at its foot */
.slide.end { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.foot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 2;
  display: flex; justify-content: center; gap: 24px; color: var(--faint-text); }
.foot a { color: var(--dim); transition: color 0.2s; }
.foot a:hover { color: var(--ink); }
body.heard .slide.end { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
body.heard .foot { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* ------------------------------------------------------------ section index and sound bar */

.rail { position: fixed; z-index: 15; right: clamp(12px, 2vw, 26px); top: 50%; transform: translateY(-50%); display: grid; gap: 2px; font-size: 12px; letter-spacing: 0.04em; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 24px; color: var(--faint-text); }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity 0.2s, transform 0.2s var(--ease); }
.rail a::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; transition: transform 0.25s var(--ease); }
.rail a:hover 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: 1100px) { .rail { display: none; } }

.player { position: fixed; z-index: 20; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 5px; background: rgba(14, 14, 14, 0.94); border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; transition: opacity 0.3s, transform 0.3s var(--ease); }
body:not(.heard) .player { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(12px); }
.player button { position: relative; height: 36px; padding-inline: 16px; border-radius: 999px; color: var(--dim); }
.player button:hover, .player button[aria-pressed="true"] { color: var(--ink); }
.tempo { display: flex; align-items: center; padding-left: 6px; 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: 32px; padding-inline: 0; font-size: 15px; touch-action: manipulation; }

/* ------------------------------------------------------------ the words rise once as a slide comes in */

.js .reveal > * { opacity: 0; transform: translateY(16px); transition: opacity 0.35s ease-out, transform 0.35s var(--ease); }
.js .reveal.in > * { opacity: 1; transform: none; }
.js .reveal.in > :nth-child(2) { transition-delay: 0.06s; }
.js .reveal.in > :nth-child(3) { transition-delay: 0.12s; }
.js .reveal.in > :nth-child(n+4) { transition-delay: 0.18s; }

/* where the browser can run animations on the scroll itself (chrome, edge, safari 26), the words,
   the clips and the hero are moved by the scroll position instead of by a timer: nothing lags
   behind a fast swipe, nothing jumps after it. everything runs on the compositor. */
@supports (animation-timeline: view()) {
  .slide { view-timeline: --slide block; }
  .js .reveal > * { opacity: 1; transform: none; transition: none; }
  .js .reveal { animation: copy-in linear both, copy-out linear forwards; animation-timeline: --slide, --slide;
    animation-range: entry 10% entry 60%, exit 30% exit 85%; }
  .with-clip .clip { animation: clip-in linear both, clip-out linear forwards; animation-timeline: --slide, --slide;
    animation-range: entry 0% entry 90%, exit 15% exit 100%; }
  .hero .backdrop { animation: hero-out linear both; animation-timeline: --slide; animation-range: exit 0% exit 100%; }
  .hero .copy { animation: copy-out linear both; animation-timeline: --slide; animation-range: exit 5% exit 60%; }
}
@keyframes copy-in { from { opacity: 0; transform: translateY(56px); } to { opacity: 1; transform: none; } }
@keyframes copy-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-40px); } }
@keyframes clip-in { from { opacity: 0.2; transform: translateY(8%); } to { opacity: 1; transform: none; } }
@keyframes clip-out { from { opacity: 1; transform: none; } to { opacity: 0.25; transform: translateY(-4%); } }
@keyframes hero-out { from { opacity: 0.4; } to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes copy-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes copy-out { from { opacity: 1; } to { opacity: 0.15; } }
  @keyframes clip-in { from { opacity: 0.3; } to { opacity: 1; } }
  @keyframes clip-out { from { opacity: 1; } to { opacity: 0.3; } }
  @keyframes hero-out { from { opacity: 0.4; } to { opacity: 0; } }
  .js .reveal > * { opacity: 1; transform: none; transition: none; }
  .live-dot, [data-action]:hover::before, [data-action]:hover::after, [data-state="loading"] > .dot { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
@media (max-width: 760px) {
  /* positioned against the whole slide, not a grid column */
  .with-clip.left .clip, .with-clip.right .clip { grid-column: auto; grid-row: auto; }
}
#marks { opacity: 0.9; }
/* the new clips leave their top 520 of 1280 px empty: on a phone the words sit there, no shade needed */
@media (max-width: 760px) {
  .with-clip { align-items: start; }
  .with-clip .clip::after { background: linear-gradient(#000 0, rgba(0, 0, 0, 0) 38%); }
  .with-clip.left .copy, .with-clip.right .copy { padding-bottom: 0; padding-top: 4svh; }
  .with-clip .clip video { object-position: center bottom; }
}
@media (max-width: 760px) {
  /* the whole frame, its foot on the floor of the screen: nothing of the readouts is cut off */
  .with-clip .clip video { object-fit: contain; object-position: center bottom; }
}
@media (max-width: 760px) {
  /* the words keep the top quarter to themselves, the clip takes the rest */
  .with-clip .clip { top: calc(var(--nav) + 24svh); }
}
@media (max-width: 760px) and (max-height: 700px) { .slide h1.big { font-size: 52px; } .copy { gap: 12px; } }

/* ------------------------------------------------------------ paged: one gesture, one screen (assets/pager.js)
   the page does not scroll. the screens sit in a stack that the finger, the wheel or a key moves,
   and letting go springs straight to the next screen. the words and the clip of the screen that
   arrives come in after it; the one that leaves lets go of them. */
html.paged, html.paged body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.paged main { position: fixed; inset: 0; overflow: clip; touch-action: pinch-zoom; }
html.paged main > .slide { height: 100%; min-height: 0; transform: translate3d(0, var(--y, 0px), 0); will-change: transform; }
html.paged .reveal, html.paged .with-clip .clip, html.paged .hero .backdrop, html.paged .hero .copy { animation: none; }

html.paged .slide .copy > * { opacity: 0; transform: translateY(26px); transition: opacity 0.3s ease-out, transform 0.3s ease-out; }
html.paged .slide.is-active .copy > * { opacity: 1; transform: none; transition: opacity 0.5s ease-out 0.05s, transform 0.7s var(--ease) 0.05s; }
html.paged .slide.is-active .copy > :nth-child(2) { transition-delay: 0.1s; }
html.paged .slide.is-active .copy > :nth-child(3) { transition-delay: 0.15s; }
html.paged .slide.is-active .copy > :nth-child(n+4) { transition-delay: 0.2s; }
html.paged .with-clip .clip { opacity: 0.3; transform: translateY(4%); transition: opacity 0.4s ease-out, transform 0.5s var(--ease); }
html.paged .with-clip.is-active .clip { opacity: 1; transform: none; transition: opacity 0.7s ease-out 0.05s, transform 0.9s var(--ease) 0.05s; }
html.paged .hero .backdrop { transition: opacity 0.6s ease-out, transform 1.2s var(--ease); }
html.paged .hero:not(.is-active) .backdrop { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html.paged .slide .copy > *, html.paged .slide.is-active .copy > * { transform: none; }
  html.paged .with-clip .clip, html.paged .with-clip.is-active .clip, html.paged .hero .backdrop { transform: none; }
}

/* ------------------------------------------------------------ 22 nov fixes */
/* where the section rail shows (wide screens), the slides keep its column free on both sides,
   so a label never sits on a headline and the content stays centred */
@media (min-width: 1101px) {
  .slide { padding-left: calc(var(--gutter) + 120px); padding-right: calc(var(--gutter) + 120px); }
}
/* the a/b panel: the recording's own "fly: off / on" is covered by this label, which follows the switch */
.clip.ab { position: relative; }
.ab-label { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 30%; display: grid; place-items: end center;
  padding-bottom: 2.2%; background: #000; font-family: var(--mono); font-size: clamp(14px, 1.6vw, 20px); color: var(--ink); letter-spacing: 0.02em; }
.more-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
/* the release note form: one field and the button, on one line where it fits */
.notify { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: min(100%, 520px); }
.notify input[type="email"] { flex: 1 1 220px; min-width: 0; height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--faint);
  background: #0a0a0a; color: var(--ink); font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0.01em; }
.notify input[type="email"]::placeholder { color: var(--faint-text); }
.notify input[type="email"]:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; border-color: var(--dim); }
.notify .cta[disabled] { opacity: 0.5; cursor: default; }
.fallback a { text-transform: none; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
/* four nav items on a small phone */
@media (max-width: 420px) {
  .top { gap: 10px; }
  .top nav { gap: 11px; font-size: 12px; letter-spacing: 0; }
}

/* ------------------------------------------------------------ 23 nov fixes (design critique)
   the clips: 720x1280 recordings whose top 30% is empty except an old header line (the recording's
   "flywire 783" label). the panel shows only the readouts: from 29.5% to 86% of the frame, near square.
   the a/b clip keeps 21% to 86%: its own "fly: off/on" sits in the extra band, under our label. */
.with-clip .clip { --top: 0.295; --keep: 0.565; position: relative; height: auto; aspect-ratio: 520 / 522;
  width: min(100%, 64vh); overflow: hidden; }
.with-clip .clip.ab { --top: 0.21; --keep: 0.65; aspect-ratio: 720 / 832; width: min(100%, 58vh); }
.with-clip .clip video { position: absolute; left: 0; top: 0; width: 100%; height: auto; aspect-ratio: 9 / 16;
  object-fit: cover; transform: translateY(calc(var(--top) * -100%)); }
/* 3 dec: the 3.8 clips are 520x522 crops of the window at its real size, the panel's own shape: shown whole */
.with-clip .clip:not(.ab) { --top: 0; }
.with-clip .clip:not(.ab) video { aspect-ratio: 520 / 522; }
.ab-label { height: calc((0.335 - 0.21) / 0.65 * 100%); padding-bottom: 0; place-items: center; font-size: clamp(13px, 1.3vw, 17px); }
/* the hero's specimen on a tall screen: its height maps 1:1, so the header band is cut off at the top */
@media (max-aspect-ratio: 1 / 1) { .backdrop video { clip-path: inset(30% 0 0 0); } }

/* phone: the words, then the panel under them, both centred; the listen screen shows its a/b panel too */
@media (max-width: 760px) {
  .with-clip, .listen { grid-template-columns: minmax(0, 1fr); align-content: center; align-items: center; row-gap: clamp(18px, 4svh, 36px); }
  .with-clip .copy, .with-clip.left .copy, .with-clip.right .copy { order: -1; padding-top: 0; }
  .with-clip .clip, .with-clip.left .clip, .with-clip.right .clip { position: relative; inset: auto; top: auto; grid-column: 1; justify-self: center;
    width: min(100%, 44svh); border: 1px solid var(--line); border-radius: 12px; }
  .with-clip .clip.ab { width: min(100%, 40svh); }
  .with-clip .clip::after { content: none; }
  .with-clip .clip video { object-fit: cover; object-position: center top; }
  .listen .actions { justify-content: center; }
}
@media (max-width: 760px) and (max-height: 700px) { .with-clip .clip { width: min(100%, 40svh); } .with-clip .clip.ab { width: min(100%, 36svh); } }

/* small links get a finger-sized hit area without moving the text */
.credit a, .fallback a, .works a { padding-block: 13px; }
.foot { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
.foot a, .foot span { padding: 12px 6px; }
body.heard .foot { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 360px) { .top nav { gap: 9px; font-size: 11px; } }
/* the a/b recording is dim (fly off is meant to look quiet): lift it a little */
.clip.ab video { filter: brightness(1.45) contrast(1.1); }
.share button { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; padding-block: 13px; color: var(--ink); }
/* the afferent layer is drawn on a canvas; on a phone it runs at 30 frames (see site.js) */
body.tempo-drag, body.tempo-drag * { cursor: ew-resize !important; user-select: none; }

/* 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); } }
/* the countdown on dendrite's last screen: under "coming soon.", centred, labels grey */
.slide .countdown { display: flex; flex-wrap: nowrap; width: max-content; max-width: 100%; justify-content: center; gap: 6px clamp(18px, 3vw, 40px); margin: 0 0 0.4em; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.slide .countdown > span { display: grid; justify-items: center; gap: 2px; }
.slide .countdown b { font-family: var(--mono); font-weight: 300; font-size: clamp(40px, 7vw, 92px); line-height: 1.05; }
