/* Spiro: hand-inked descent. Animate only transform + opacity in the DOM. */

:root {
  --surface: #4fa3f7;
  --field: #2f7fe0;
  --deep: #1a4fae;
  --abyss: #061634;
  --ink: #0a0d14;
  --pearl: #f4eee2;
  --stripe: #c8682e;
  --glow: #9fe7ff;

  --ink-70: color-mix(in oklab, var(--ink) 70%, transparent);
  --pearl-70: color-mix(in oklab, var(--pearl) 70%, transparent);
  --pearl-40: color-mix(in oklab, var(--pearl) 40%, transparent);
  --hood: color-mix(in oklab, var(--stripe) 55%, var(--ink));
  --paper-shadow: color-mix(in oklab, var(--ink) 85%, var(--deep));

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-sink: cubic-bezier(.5, 0, .1, 1);
  --dur-sink: 1600ms;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --radius: 22px;
  --line: 3px;

  --z-ocean: 0;
  --z-crowd: 1;
  --z-content: 10;
  --z-fx: 30;
  --z-gauge: 40;
  --z-feed: 50;
  --z-nav: 60;
  --z-toast: 70;
  --z-modal: 80;
  --z-loader: 90;
  --z-cursor: 100;

  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(17px, 1.05vw + 12px, 20px);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--stripe); color: var(--pearl); }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 8px; }

.mono { font-family: var(--font-mono); font-size: 0.72em; letter-spacing: 0.02em; font-feature-settings: 'zero' 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- ocean: background layers crossfade with depth ---------- */
.ocean { position: fixed; inset: 0; z-index: var(--z-ocean); pointer-events: none; background: var(--surface); }
.ocean__layer { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.ocean__layer--field { background: var(--field); }
.ocean__layer--deep { background: var(--deep); }
.ocean__layer--abyss { background: var(--abyss); }
.sea { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sea--water { z-index: var(--z-ocean); }
/* drawn at low resolution: the upscale is the blur, and it costs nothing */
.sea--far { z-index: var(--z-crowd); }
.sea--crowd { z-index: var(--z-crowd); }
/* click splats, ripples and foreground motes sit just above the page content */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: var(--z-fx); }
main { position: relative; z-index: var(--z-content); padding-right: var(--gauge-space, 0px); }
@media (min-width: 1101px) { :root { --gauge-space: 128px; } }
@media (min-width: 901px) and (max-width: 1100px) { :root { --gauge-space: 96px; } }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  display: grid; place-items: center; align-content: center; gap: 18px;
  background: var(--surface);
  transition: opacity 600ms var(--ease-out), transform 900ms var(--ease-sink);
}
.loader svg { width: 108px; height: 108px; overflow: visible; }
.loader__spiral { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; stroke-dasharray: var(--len, 900); stroke-dashoffset: var(--len, 900); animation: draw 1s var(--ease-in-out) forwards; }
.loader__label { opacity: 0; animation: fade-in 400ms 400ms var(--ease-out) forwards; }
.loader.is-gone { opacity: 0; transform: translateY(-4vh); pointer-events: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  padding: 14px var(--gutter);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__logo { display: inline-flex; align-items: center; gap: 8px; padding: 3px 16px 3px 8px; border-radius: 999px; text-decoration: none; font-weight: 750; font-size: 21px; font-variation-settings: 'SOFT' 100, 'WONK' 1; background: color-mix(in oklab, var(--pearl) 86%, transparent); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); transition: transform 300ms var(--ease-spring); }
.nav__logo:hover { transform: translateY(-2px); }
.nav__mark { width: 44px; height: 36px; }

.nav__mark .spiro { width: 100%; height: 100%; }
.nav__links { display: flex; gap: 4px; margin-left: auto; padding: 5px; border-radius: 999px; background: color-mix(in oklab, var(--pearl) 82%, transparent); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.nav__links a { position: relative; color: var(--ink); text-decoration: none; padding: 6px 14px; border-radius: 999px; font-family: var(--font-mono); font-size: 13px; transition: transform 400ms var(--ease-spring); }
.nav__links a:hover { transform: translateY(-2px) scale(1.08); }
.nav__links a[aria-current='true'] { background: var(--ink); color: var(--pearl); }
.nav__cta { margin-left: 0; }
.nav__x { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); background: color-mix(in oklab, var(--pearl) 86%, transparent); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform 400ms var(--ease-spring), box-shadow 400ms var(--ease-spring); }
.nav__x:hover { transform: translate(-1px, -2px) rotate(-8deg) scale(1.08); box-shadow: 4px 5px 0 var(--ink); }
.nav__x:active { transform: scale(.94); box-shadow: 1px 1px 0 var(--ink); }
.nav__x svg { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.pill {
  --bg: var(--pearl); --fg: var(--ink); --sh: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: var(--line) solid var(--ink);
  background: var(--bg); color: var(--fg);
  font-family: var(--font-display); font-weight: 650; font-size: 17px; line-height: 1;
  text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--sh);
  transition: transform 350ms var(--ease-spring), box-shadow 350ms var(--ease-spring);
}
.pill:hover { transform: translate(-2px, -2px) scale(1.06); box-shadow: 6px 6px 0 var(--sh); }
.pill:active { transform: translate(2px, 2px) scale(.97); box-shadow: 1px 1px 0 var(--sh); }
.pill--ink { --bg: var(--ink); --fg: var(--pearl); --sh: var(--stripe); }
.pill--glow { --bg: var(--glow); --fg: var(--ink); --sh: var(--pearl); border-color: var(--pearl); }
.pill .arrow { display: inline-block; transition: transform 400ms var(--ease-spring); }
.pill:hover .arrow { transform: translateY(3px); }

.chip-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 13px;
  transition: transform 450ms var(--ease-spring), background-color 200ms, border-color 150ms;
}
.chip-btn:hover { transform: translateY(-2px) scale(1.08); background: color-mix(in oklab, var(--pearl) 35%, transparent); }
.chip-btn:active { transform: scale(.95); }
.chip-btn svg { width: 16px; height: 16px; }
.ca-chip { max-width: 100%; margin-bottom: 14px; background: color-mix(in oklab, var(--pearl) 22%, transparent); }
.ca-chip__k { padding: 1px 6px; border-radius: 6px; background: var(--ink); color: var(--pearl); font-weight: 700; font-size: 11px; }
.ca-chip__short { display: none; }

/* Every button-ish thing: on hover the crisp outline swaps for a wobbly, boiling ink one. */
:is(.pill, .chip-btn, .chips button, .nav__links a, .mind__chips button, .load-older, .about__close, .feed__toggle)::after {
  content: ''; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none;
  border: 3px solid var(--wob, var(--ink)); opacity: 0; transition: opacity 180ms;
}
:is(.pill, .chip-btn, .chips button, .mind__chips button, .load-older, .about__close):hover { border-color: transparent; }
:is(.pill, .chip-btn, .chips button, .nav__links a, .mind__chips button, .load-older, .about__close, .feed__toggle):hover::after { opacity: 1; }
html.boil-0 :is(.pill, .chip-btn, .chips button, .nav__links a, .mind__chips button, .load-older, .about__close, .feed__toggle):hover::after { filter: url(#wob-0); }
html.boil-1 :is(.pill, .chip-btn, .chips button, .nav__links a, .mind__chips button, .load-older, .about__close, .feed__toggle):hover::after { filter: url(#wob-1); }
html.boil-2 :is(.pill, .chip-btn, .chips button, .nav__links a, .mind__chips button, .load-older, .about__close, .feed__toggle):hover::after { filter: url(#wob-2); }
.chips button, .mind__chips button, .feed__toggle { --wob: var(--pearl); }
.nav__links a[aria-current='true']::after { --wob: var(--stripe); }

/* ---------- depth gauge ---------- */
.gauge {
  position: fixed; right: clamp(8px, 1.6vw, 24px); top: 50%; z-index: var(--z-gauge);
  height: min(64vh, 560px); width: 150px;
  transform: translateY(-46%);
  color: var(--gauge-fg, var(--ink));
  transition: color 600ms;
}
.gauge__ruler { position: absolute; right: 18px; top: 0; bottom: 0; width: 2px; background: currentColor; border-radius: 2px; }
.gauge__tick { position: absolute; right: 0; height: 2px; width: 8px; background: currentColor; transform: translateY(-1px); }
.gauge__tick--major { width: 14px; }
.gauge__labels { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.gauge__labels li { position: absolute; right: 40px; transform: translateY(-50%); }
.gauge__labels button {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0;
  border: 0; background: none; padding: 2px 6px; cursor: pointer; text-align: right;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.25; opacity: 0.55;
  transition: opacity 300ms, transform 400ms var(--ease-spring);
}
.gauge__labels button span { font-size: 10px; opacity: 0.8; }
.gauge__labels button:hover { opacity: 0.9; transform: translateX(-3px); }
.gauge__labels button[aria-current='true'] { opacity: 1; font-weight: 700; transform: translateX(-6px); }
.gauge__labels button[aria-current='true']::after { content: ''; position: absolute; right: -16px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--stripe); }
.gauge__spiro { position: absolute; right: -6px; top: 0; width: 52px; height: 42px; margin-top: -21px; will-change: transform; filter: drop-shadow(2px 2px 0 rgba(10, 13, 20, .25)); }
.gauge__spiro .spiro { width: 100%; height: 100%; transform: scaleX(-1); }
.gauge__readout { position: absolute; right: 0; bottom: -30px; font-size: 11px; white-space: nowrap; }

/* ---------- live feed card ---------- */
.feed {
  position: fixed; left: clamp(10px, 1.6vw, 24px); bottom: clamp(10px, 1.6vw, 24px); z-index: var(--z-feed);
  width: min(340px, calc(100vw - 20px));
  border-radius: 20px; background: color-mix(in oklab, var(--abyss) 94%, transparent);
  color: var(--pearl); border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink), 0 18px 40px rgba(0, 0, 0, .25);
  overflow: hidden;
  transition: transform 700ms var(--ease-out), opacity 500ms;
}
.feed.is-hidden { transform: translateY(140%); opacity: 0; }
.feed__head { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 16px; font-family: var(--font-mono); font-size: 12px; }
.feed__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 0 var(--glow); animation: pulse-dot 2.4s infinite; flex: none; }
.feed[data-state='resting'] .feed__dot { background: var(--stripe); animation-duration: 5s; }
.feed[data-state='offline'] .feed__dot { background: #888; animation: none; }
@keyframes pulse-dot { 0% { transform: scale(1); opacity: 1; } 60% { transform: scale(1.6); opacity: .35; } 100% { transform: scale(1); opacity: 1; } }
.feed__ver { padding: 2px 8px; border-radius: 999px; background: var(--pearl); color: var(--ink); font-weight: 700; }
.feed__clock { margin-left: auto; opacity: .7; font-variant-numeric: tabular-nums; }
.feed__toggle { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--pearl-40); background: none; cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform 400ms var(--ease-spring); }
.feed__toggle svg { width: 12px; height: 12px; }
.feed.is-collapsed .feed__toggle { transform: rotate(180deg); }
.feed__inner { overflow: hidden; }
.feed__list { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 8px; height: 212px; overflow: hidden; mask-image: linear-gradient(to top, #000 70%, transparent); transition: height 500ms var(--ease-out); }
.feed.is-collapsed .feed__list { height: 76px; mask-image: linear-gradient(to top, #000 45%, transparent); }
.feed.is-collapsed .feed__item { font-size: 13px; }
.feed__item { font-size: 14px; line-height: 1.35; transition: opacity 600ms, filter 600ms; animation: feed-in 700ms var(--ease-spring) both; }
.feed__item .mono { display: block; opacity: .6; font-size: 10.5px; margin-bottom: 1px; }
.feed__item .tag { color: var(--glow); }
.feed__item[data-type='sealed'] .tag, .feed__item[data-type='resting'] .tag { color: #f0a46f; }
.feed__item[data-type='burn'] .mono { color: #f0a46f; opacity: .9; }
.feed__item[data-age='1'] { opacity: .8; filter: blur(.4px); }
.feed__item[data-age='2'] { opacity: .6; filter: blur(1px); }
.feed__item[data-age='3'] { opacity: .45; filter: blur(1.6px); }
.feed__item[data-age='4'] { opacity: .3; filter: blur(2.4px); }
@keyframes feed-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.feed__more { display: block; padding: 10px 16px 14px; text-decoration: none; color: var(--glow); font-size: 12px; }
.feed__more:hover { text-decoration: underline; }
.feed__oneline { display: none; }

/* ---------- custom cursor ---------- */
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [role='button'], .has-cursor canvas { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor { position: fixed; left: 0; top: 0; z-index: var(--z-cursor); pointer-events: none; }
.cursor__bubble {
  position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ink); background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .9) 0 18%, rgba(255, 255, 255, .25) 19% 60%, rgba(159, 231, 255, .25) 61%);
  transition: transform 300ms var(--ease-spring), opacity 300ms; will-change: transform;
}
.cursor.is-deep .cursor__bubble { border-color: var(--pearl); }
.cursor.is-hover .cursor__bubble { transform: scale(2.1); background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .9) 0 14%, rgba(159, 231, 255, .22) 15%); }
.cursor.is-text .cursor__bubble { transform: scale(.55); }
.cursor.is-down .cursor__bubble { transform: scale(.75); }
.cursor.is-hover.is-down .cursor__bubble { transform: scale(1.6); }
.cursor.is-off { opacity: 0; }
.trail { position: fixed; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; border: 1.5px solid var(--ink); pointer-events: none; z-index: var(--z-cursor); opacity: 0; }
.cursor.is-deep ~ .trail { border-color: var(--pearl); }
.trail.go { animation: trail 950ms var(--ease-out) forwards; }
@keyframes trail { 0% { opacity: .85; transform: translate(var(--x), var(--y)) scale(var(--s, 1)); } 100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) - 40px)) scale(calc(var(--s, 1) * .35)); } }

/* ---------- sections ---------- */
.sec { position: relative; }
.sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 64px); }
.sec-head.wrap { max-width: none; }
.sec-head.wrap > * { max-width: 900px; }
.kicker { display: inline-block; margin: 0 0 14px; padding: 4px 10px; border: 2px solid currentColor; border-radius: 999px; }
.sec h2 {
  margin: 0; font-weight: 800; font-size: clamp(44px, 6.4vw, 104px); line-height: 0.95; letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 1;
}
.lede { font-size: clamp(19px, 1.4vw + 12px, 26px); margin: 18px 0 0; max-width: 34ch; line-height: 1.35; }
.is-deep-text { color: var(--pearl); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- entrances (reveal.js) ---------- */
/* headings ink in letter by letter: the outline lands first, the fill follows */
[data-ink] .ink__word { display: inline-block; white-space: nowrap; }
[data-ink] .ch { position: relative; display: inline-block; transition: opacity 450ms var(--ease-out), transform 800ms var(--ease-spring); transition-delay: calc(var(--c) * 26ms); }
[data-ink] .ch__o { color: transparent; -webkit-text-stroke: 2px currentColor; }
[data-ink] .ch__f { position: absolute; inset: 0; transition: opacity 600ms var(--ease-out); transition-delay: calc(260ms + var(--c) * 26ms); }
.has-reveals [data-ink]:not(.is-in) .ch { opacity: 0; transform: translateY(.32em) rotate(-9deg) scale(.82); }
.has-reveals [data-ink]:not(.is-in) .ch__f { opacity: 0; }
/* body copy sharpens out of a blur */
.has-reveals .blur-in { opacity: 0; filter: blur(10px); transform: translateY(18px); transition: opacity 900ms var(--ease-out), filter 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: var(--d, 280ms); }
.has-reveals .blur-in.is-in { opacity: 1; filter: none; transform: none; }
/* illustrations spring up from .85 */
.has-reveals .spring-in { opacity: 0; transform: translateY(46px) scale(.85) rotate(-1.5deg); transition: opacity 700ms var(--ease-out), transform 1200ms var(--ease-spring); transition-delay: var(--d, 120ms); }
.has-reveals .spring-in.is-in { opacity: 1; transform: none; }
.has-reveals .pop-in { opacity: 0; transform: scale(.5) rotate(-8deg); transition: opacity 400ms var(--ease-out), transform 700ms var(--ease-spring); }
.has-reveals .pop-in.is-in { opacity: 1; transform: none; }

/* ---------- 1. surface / hero ---------- */
.hero { min-height: 100svh; padding: clamp(88px, 11vh, 120px) 0 clamp(96px, 13vh, 130px); display: flex; flex-direction: column; justify-content: center; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(16px, 3vw, 48px); }
.hero__copy { position: relative; z-index: 2; }
.hero__eyebrow { margin: 0 0 6px; }
.hero__title {
  margin: 0 0 0 -0.04em; font-weight: 900; line-height: 0.82; letter-spacing: -0.045em;
  font-size: clamp(96px, 15.5vw, 244px);
  padding-bottom: 0.12em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.hero__letters { display: flex; }
.L { position: relative; display: inline-block; }
.L__o { color: transparent; -webkit-text-stroke: 3px var(--ink); }
.L__f { position: absolute; inset: 0; color: var(--ink); }
.hero__title .L:nth-child(3) .L__f { color: var(--pearl); -webkit-text-stroke: 3px var(--ink); }
.hero__tagline { margin: 0; font-size: clamp(26px, 2.6vw, 42px); line-height: 1.1; font-weight: 600; font-style: italic; font-variation-settings: 'opsz' 72; }
.hero__intro { margin: 18px 0 0; max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
/* Spiro fills most of the hero's height and pushes over the edge of the text column. */
.hero__side { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-self: stretch; }
.hero__art { --h: min(80vh, 47vw); position: relative; height: var(--h); width: calc(var(--h) * 1.25); margin-left: calc(-1 * min(9vw, 150px)); }
.hero__art .spiro-host { position: absolute; inset: 0; transform-origin: 62% 52%; }
.hero__next { position: absolute; right: -2%; bottom: max(-40px, -4vh); z-index: 3; display: flex; align-items: center; gap: 18px; }
.hero__aside { margin: 0; max-width: 26ch; font-size: 17px; line-height: 1.4; padding: 10px 14px; border-radius: 16px; background: color-mix(in oklab, var(--pearl) 72%, transparent); }
.hero__aside em { display: block; font-size: 18px; }
.hero__aside .mono { display: block; margin-top: 6px; opacity: .75; }
.hero__waterline { position: absolute; left: 0; right: 0; bottom: clamp(20px, 5vh, 60px); height: 70px; pointer-events: none; }
.hero__waterline svg { width: 100%; height: 100%; overflow: visible; }
.hero__waterline path { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

/* next-chamber badge */
.badge-next { position: relative; width: 148px; height: 148px; flex: none; display: grid; place-items: center; }
.badge-next svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.badge-next__disc { fill: var(--pearl); stroke: var(--ink); stroke-width: 3; }
.badge-next__track { fill: none; stroke: color-mix(in oklab, var(--ink) 14%, transparent); stroke-width: 7; }
.badge-next__prog { fill: none; stroke: var(--stripe); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.badge-next__ring-text { font-family: var(--font-mono); font-size: 9.4px; letter-spacing: .22em; fill: var(--ink); text-transform: uppercase; }
.badge-next__inner { position: relative; text-align: center; display: grid; gap: 2px; justify-items: center; }
.badge-next__inner .mono { font-size: 9.5px; opacity: .7; max-width: 96px; line-height: 1.2; }
.badge-next.is-resting .badge-next__prog { stroke: var(--deep); }
.badge-next .spin { transform-origin: 74px 74px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* odometer */
.odo { display: inline-flex; font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; overflow: hidden; }
.odo__d { position: relative; display: inline-block; height: 1em; overflow: hidden; width: 0.62em; }
.odo__strip { display: flex; flex-direction: column; transition: transform 900ms var(--ease-spring); will-change: transform; }
.odo__strip span { height: 1em; display: block; text-align: center; }
.odo__sep { display: inline-block; width: 0.42em; text-align: center; }
.odo--count { font-size: 30px; transition: font-size 300ms; }
.odo--count.is-long { font-size: 21px; }
.odo--giant { font-family: var(--font-display); font-weight: 900; font-size: clamp(76px, 15vw, 230px); letter-spacing: -0.04em; font-variation-settings: 'opsz' 144; }
.odo--giant .odo__d { width: 0.6em; }
.odo--giant .odo__sep { width: 0.28em; }

/* Spiro character styling */
.spiro { width: 100%; height: 100%; overflow: visible; }
.spiro path, .spiro circle, .spiro ellipse { stroke: var(--ink); stroke-width: var(--sw, 4); stroke-linejoin: round; stroke-linecap: round; }
.sp-shell { fill: var(--pearl); stroke: none !important; }
.sp-shell-line { fill: none; }
.sp-stripes path { fill: var(--stripe); stroke: none !important; }
.sp-coil { fill: none; }
.sp-umbo { fill: var(--ink); }
.sp-head { fill: color-mix(in oklab, var(--pearl) 80%, var(--stripe)); }
.sp-hood { fill: var(--hood); }
.sp-hood-dots circle { fill: color-mix(in oklab, var(--hood) 60%, var(--pearl)); stroke: none !important; }
.sp-eye-white { fill: #fffdf6; }
.sp-pupil { fill: var(--ink); stroke: none !important; }
.sp-glint { fill: #fff; stroke: none !important; }
.sp-lid { fill: var(--hood); transform: scaleY(0); transform-origin: 0 -18px; transition: transform 90ms ease-in; }
.sp-brow { fill: none; }
.spiro.is-blink .sp-lid { transform: scaleY(1); }
.tent path { fill: none; }
.tent .t-o { stroke-width: calc(var(--sw, 4) * 2.2) !important; }
.tent .t-i { stroke: color-mix(in oklab, var(--pearl) 78%, var(--stripe)) !important; stroke-width: calc(var(--sw, 4) * 1.05) !important; }
.tent { animation: sway 3.2s var(--ease-in-out) infinite alternate; animation-delay: calc(var(--i) * -0.37s); }
.spiro.is-driven .tent { animation: none; } /* spiro-life.js draws these every frame */
@keyframes sway { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
.spiro__float { animation: bob 5.5s var(--ease-in-out) infinite alternate; transform-box: view-box; }
@keyframes bob { from { transform: translateY(-3px) rotate(-1.2deg); } to { transform: translateY(4px) rotate(1.4deg); } }
.spiro__jet circle { fill: none; stroke-width: 2 !important; opacity: 0; }
.spiro.is-jet .spiro__float { animation: jet 900ms var(--ease-out); }
.spiro.is-jet .spiro__jet circle { animation: jet-bubble 900ms var(--ease-out); }
@keyframes jet { 0% { transform: none; } 20% { transform: translateX(-2px) scaleX(.94); } 55% { transform: translateX(10px) scaleX(1.03); } 100% { transform: none; } }
@keyframes jet-bubble { 0% { opacity: 0; transform: none; } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-26px, 6px); } }
/* boil: show one of three jittered copies */
.spiro .v1, .spiro .v2 { display: none; }
html.boil-1 .spiro .v0, html.boil-2 .spiro .v0 { display: none; }
html.boil-1 .spiro .v1 { display: inline; }
html.boil-2 .spiro .v2 { display: inline; }
/* filter boil for static line art */
html.boil-0 .boil { filter: url(#boil-0); }
html.boil-1 .boil { filter: url(#boil-1); }
html.boil-2 .boil { filter: url(#boil-2); }

/* intro choreography for the hero Spiro */
.intro .hero .spiro .sp-shell, .intro .hero .spiro .sp-head, .intro .hero .spiro .sp-hood,
.intro .hero .spiro .sp-stripes, .intro .hero .spiro .sp-hood-dots, .intro .hero .spiro .spiro__eye { opacity: 0; }
.intro .hero .spiro .sp-shell-line, .intro .hero .spiro .sp-coil, .intro .hero .spiro .tent path { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
.intro-run .hero .spiro .sp-shell-line, .intro-run .hero .spiro .sp-coil { animation: draw 1.1s var(--ease-in-out) forwards; }
.intro-run .hero .spiro .tent path { animation: draw .8s .55s var(--ease-out) forwards; }
.intro-run .hero .spiro .sp-shell, .intro-run .hero .spiro .sp-head, .intro-run .hero .spiro .sp-hood,
.intro-run .hero .spiro .sp-stripes, .intro-run .hero .spiro .sp-hood-dots { animation: fade-in .7s .8s var(--ease-out) forwards; }
.intro-run .hero .spiro .spiro__eye { animation: pop-in .6s 1.15s var(--ease-spring) forwards; }
@keyframes pop-in { from { opacity: 0; transform: translate(70px, 110px) scale(.2); } to { opacity: 1; transform: translate(70px, 110px) scale(1); } }
.intro .L { opacity: 0; transform: translateY(.18em) rotate(-5deg) scale(.92); }
.intro .L__f { opacity: 0; }
.intro-run .L { animation: letter-in .7s var(--ease-spring) forwards; animation-delay: calc(250ms + var(--i) * 90ms); }
.intro-run .L__f { animation: fade-in .5s var(--ease-out) forwards; animation-delay: calc(650ms + var(--i) * 90ms); }
@keyframes letter-in { to { opacity: 1; transform: none; } }
.intro .hero .stagger { opacity: 0; transform: translateY(22px); }
.intro-run .hero .stagger { animation: rise-in .8s var(--ease-out) forwards; animation-delay: calc(900ms + var(--i) * 110ms); }
@keyframes rise-in { to { opacity: 1; transform: none; } }
.intro .hero__waterline path { stroke-dasharray: var(--len, 3000); stroke-dashoffset: var(--len, 3000); }
.intro-run .hero__waterline path { animation: draw 1.3s 700ms var(--ease-in-out) forwards; }
.intro .nav, .intro .gauge, .intro .feed { opacity: 0; }
.intro-run .nav, .intro-run .gauge, .intro-run .feed { animation: fade-in .8s 1.5s var(--ease-out) forwards; }
.intro-skip * { animation-duration: 1ms !important; animation-delay: 0ms !important; }

/* ---------- dividers ---------- */
.divider { position: relative; height: clamp(60px, 8vw, 110px); margin: clamp(30px, 6vw, 80px) 0; pointer-events: none; color: var(--div, var(--ink)); }
.divider svg { width: 100%; height: 100%; overflow: visible; }
.divider__riders { position: absolute; inset: 0; will-change: transform; }
.divider__line { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.6s var(--ease-in-out); }
.divider.is-in .divider__line { stroke-dashoffset: 0; }
.divider__bubble { fill: none; stroke: currentColor; stroke-width: 2; opacity: 0; transition: opacity .6s 1.2s; }
.divider.is-in .divider__bubble { opacity: .75; }

/* ---------- 2. currents: a vertical journey ---------- */
.currents .sec-head { margin-bottom: clamp(10px, 2vw, 30px); }
.flow { position: relative; padding-top: 6vh; }
.flow__clip { position: absolute; inset: 0 -20px; overflow: hidden; pointer-events: none; z-index: 0; will-change: transform; }
.flow__line { position: absolute; left: 20px; top: 0; width: calc(100% - 40px); height: 100%; overflow: visible; will-change: transform; }
.flow__line path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.flow__line .ink { stroke: var(--ink); stroke-width: 12; }
.flow__line .halo { stroke: color-mix(in oklab, var(--pearl) 55%, transparent); stroke-width: 28; }
/* the round nib at the drawing tip, and the bubbles riding it */
.flow__tip { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.flow__nib, .flow__rider { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform, opacity; opacity: 0; }
.flow__nib { --w: 12px; --h: 8px; width: var(--w); height: var(--w); margin: calc(var(--w) / -2); background: var(--ink); box-shadow: 0 0 0 var(--h) color-mix(in oklab, var(--pearl) 55%, transparent); transition: opacity 200ms; }
.flow__rider { width: var(--r); height: var(--r); margin: calc(var(--r) / -2); background: rgba(255, 255, 255, .3); border: 2.5px solid var(--ink); }

.step { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 96px); min-height: 96vh; padding: 3vh 0; }
.step__art { position: relative; width: min(46vw, 590px); aspect-ratio: 1; justify-self: start; transform-origin: 50% 55%; will-change: transform, opacity; transform: scale(.85); opacity: 0; }
.step:nth-of-type(even) .step__art { order: 2; justify-self: end; }
/* each illustration is a stack: static boiled ink at the back, moving parts in their own
   layers on top, so the turbulence filter only runs when the boil ticks */
.step__art .art-svg, .step__art .art-stack { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.clock__fizz, .pearl__front, .clock__bubble > svg:last-child { will-change: transform; }
.step__text { max-width: 32rem; will-change: transform; }
.step:nth-of-type(even) .step__text { justify-self: end; }
.step__num { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--pearl); font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 24px; box-shadow: 3px 3px 0 var(--ink); transform: scale(.3) rotate(-30deg); opacity: 0; transition: transform 800ms var(--ease-spring), opacity 300ms; }
.step.is-on .step__num { transform: none; opacity: 1; }
.step h3 { margin: 18px 0 16px; font-size: clamp(34px, 3.4vw, 58px); line-height: 1; letter-spacing: -0.02em; font-weight: 800; font-variation-settings: 'opsz' 144, 'SOFT' 60; opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-spring); transition-delay: 80ms; }
.step.is-on h3 { opacity: 1; transform: none; }
.step p { margin: 0; font-size: clamp(18px, 1.1vw + 10px, 23px); line-height: 1.5; }
/* word-by-word reveal: the blur is a text-shadow on transparent text, not a filter, so a
   few hundred words don't each become their own GPU effect */
.w { display: inline-block; color: color-mix(in oklab, var(--ink) 14%, transparent); transform: translateY(6px); transition: color 450ms var(--ease-out), text-shadow 450ms var(--ease-out), transform 500ms var(--ease-out); }
/* only the words just ahead of the reveal are blurred (blurring all of them is costly to paint) */
.w.is-near { color: transparent; text-shadow: 0 0 7px color-mix(in oklab, var(--ink) 55%, transparent); }
.w.is-sharp { color: var(--ink); text-shadow: 0 0 0 transparent; transform: none; }

/* the hanging tags under each illustration */
.art__tag { position: absolute; left: 50%; bottom: 0; margin: 0; padding: 7px 14px; transform: translateX(-50%) rotate(-3deg); background: var(--pearl); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); white-space: nowrap; font-size: 14px; }
.art__tag b { color: var(--stripe); }
.art__tag--model { bottom: 2%; transform: translateX(-50%) rotate(3deg); }
.art__tag--model::before { content: ''; position: absolute; left: 50%; bottom: 100%; width: 3px; height: 30px; background: var(--ink); }

/* i. clock bubble */
.clock__nums text { font-family: var(--font-display); font-weight: 800; font-size: 32px; fill: var(--ink); stroke: none; }
.clock__bubble { transform-origin: 50% 50%; will-change: transform; animation: bubble-bob 4.2s ease-in-out infinite alternate; }
.clock__bubble.is-surfacing { animation: surface 1.3s var(--ease-out); }
@keyframes bubble-bob { from { transform: translateY(-6px) rotate(-2deg); } to { transform: translateY(6px) rotate(2deg); } }
@keyframes surface {
  0% { transform: translateY(70px) scale(.82, 1.16); }
  30% { transform: translateY(-16px) scale(1.12, .9); }
  52% { transform: translateY(4px) scale(.95, 1.06); }
  74% { transform: scale(1.03, .98); }
  100% { transform: none; }
}
.clock__fizz circle { fill: rgba(255, 255, 255, .25); stroke: var(--ink); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: fizz 3.4s linear infinite; animation-delay: var(--d); opacity: 0; }
@keyframes fizz { 0% { transform: translateY(40px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-150px) translateX(10px); opacity: 0; } }

/* ii. scroll of old chambers */
.scroll { position: absolute; inset: 7% 3% auto; display: flex; flex-direction: column; transform: rotate(-3deg); }
.scroll__rod { position: relative; z-index: 2; height: 56px; flex: none; }
.scroll__rod svg { width: 100%; height: 100%; overflow: visible; }
.scroll__rod--bottom { margin-top: -26px; will-change: transform; }
.scroll__clip { position: relative; z-index: 1; overflow: hidden; margin: -26px 30px 0; will-change: transform; }
.scroll__sheet { padding: 40px 26px 40px; background: var(--pearl); border-inline: 4px solid var(--ink); will-change: transform; background-image: repeating-linear-gradient(0deg, transparent 0 33px, color-mix(in oklab, var(--deep) 12%, transparent) 33px 34px); }
.scroll__head { margin: 0 0 10px; opacity: .7; }
.scroll__list { list-style: none; margin: 0; padding: 0; }
.scroll__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 11px 0; border-bottom: 2px dashed color-mix(in oklab, var(--ink) 22%, transparent); font-style: italic; font-size: clamp(16px, 1vw + 8px, 21px); line-height: 1.3; }
.scroll__list b { padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--pearl); font-family: var(--font-mono); font-style: normal; font-size: 12px; margin-top: 2px; }
.scroll__list li:first-child b { background: var(--stripe); }
.scroll__foot { margin: 12px 0 0; opacity: .6; text-align: right; }

/* iii. the dreaming pearl */
.pearl__halo { transform-origin: 50% 49%; will-change: transform, opacity; animation: halo 2.6s ease-in-out infinite alternate; }
@keyframes halo { from { opacity: .45; transform: scale(.86); } to { opacity: 1; transform: scale(1.08); } }
.pearl__orb { transform-origin: 200px 224px; animation: orb 2.6s ease-in-out infinite alternate; }
@keyframes orb { to { transform: scale(1.05); } }
.pearl__orbit { transform-origin: 200px 224px; animation: spin 5.5s linear infinite; }
.pearl__spark { transform-origin: 200px 112px; animation: twinkle 1.1s ease-in-out infinite alternate; }
@keyframes twinkle { from { transform: scale(.7) rotate(0deg); } to { transform: scale(1.18) rotate(45deg); } }
.pearl__motes path { transform-box: fill-box; transform-origin: center; animation: twinkle 1.8s ease-in-out infinite alternate; animation-delay: var(--d); }

/* iv. a new chamber, then the wall */
.grow__sway { transform-origin: 50% 51%; will-change: transform; animation: grow-sway 7s ease-in-out infinite alternate; }
@keyframes grow-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.grow__ch { fill: color-mix(in oklab, var(--pearl) 90%, var(--stripe)); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.grow__ch--front { fill: var(--pearl); transition: fill 600ms; }
.grow.is-sealed .grow__ch--front { fill: color-mix(in oklab, var(--pearl) 72%, var(--stripe)); }
.grow__new { fill: var(--glow); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.grow__septum { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; }
.grow__seal { font-family: var(--font-mono); font-weight: 700; font-size: 17px; fill: var(--ink); opacity: 0; transition: opacity 500ms; }
.grow.is-sealed .grow__seal { opacity: .75; }
.grow__label text { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 30px; fill: var(--ink); }
.grow__label { transform: scale(0); transition: transform 700ms var(--ease-spring); }
.grow.is-sealed .grow__label { transform: none; }

/* the pearl shell, where the current ends up */
.pearls { position: relative; z-index: 1; padding-top: 12vh; }
.pearls__copy { text-align: center; max-width: 1100px; margin: 0 auto; }
.statement { margin: 0; font-weight: 800; font-size: clamp(48px, 7.4vw, 128px); line-height: 0.98; letter-spacing: -0.02em; font-variation-settings: 'opsz' 144, 'SOFT' 100; }
.statement em { color: var(--pearl); font-style: italic; }
.statement em .ch__o { -webkit-text-stroke: 2px var(--ink); }
.statement em .ch__f { -webkit-text-stroke: 2px var(--ink); }
.pearls__note { margin-top: 18px; }
.pearls__shell { width: min(94%, 880px); aspect-ratio: 1; margin: clamp(24px, 4vw, 60px) auto 0; }
.pearls__shell svg { width: 100%; height: 100%; overflow: visible; }
.pearl-chamber { fill: color-mix(in oklab, var(--pearl) 92%, var(--stripe)); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.pearl-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 700ms var(--ease-spring); transition-delay: calc(var(--i) * 45ms); }
.pearls.is-in .pearl-dot { transform: scale(1); }
.pearl-dot circle { stroke: var(--ink); stroke-width: 2; }
.pearl-dot circle.glow, .pearl-dot circle.glint { stroke: none; }
.pearl-dot.is-new circle.glow { animation: pearl-glow 2.4s ease-in-out infinite; }
.pearl-chamber.is-empty { fill: color-mix(in oklab, var(--pearl) 55%, var(--field)); }
@keyframes pearl-glow { 50% { opacity: .55; } }

.counter { margin: clamp(60px, 10vw, 140px) 0 0; text-align: center; }
.counter p { margin: 10px 0 0; }

/* stats float in the water: no boxes, just big numbers and small ink drawings */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 52px); max-width: 1220px; margin: clamp(50px, 7vw, 110px) auto 0; align-items: start; }
.stat { text-align: center; opacity: 0; transform: translateY(160px) scale(.88); transition: opacity 800ms var(--ease-out), transform 1700ms cubic-bezier(.22, 1.45, .4, 1); transition-delay: calc(var(--i) * 150ms); }
.stat:nth-child(even) { margin-top: clamp(30px, 5vw, 80px); }
.stats.is-in .stat { opacity: 1; transform: none; }
.stat__float { animation: buoy 5.2s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.4s); }
@keyframes buoy { from { transform: translateY(-9px) rotate(-1.4deg); } to { transform: translateY(9px) rotate(1.4deg); } }
.stat__icon { display: block; width: clamp(48px, 4.6vw, 66px); height: auto; margin: 0 auto 8px; overflow: visible; }
.stat__rays { transform-origin: 32px 32px; animation: spin 26s linear infinite; }
.odo--stat { font-family: var(--font-display); font-weight: 900; font-size: clamp(54px, 6.4vw, 108px); letter-spacing: -0.035em; font-variation-settings: 'opsz' 144; }
.odo--stat .odo__d { width: .6em; }
.odo--stat .odo__sep { width: .26em; }
.stat__label { display: block; margin-top: 8px; text-transform: uppercase; letter-spacing: .12em; }
.stat p { margin: 8px auto 0; max-width: 24ch; font-size: 16px; line-height: 1.4; }

/* ---------- 3. thinking ---------- */
.thinking { color: var(--pearl); padding-top: 40px; }
.thinking__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
.mind { position: relative; margin-left: -2%; }
.mind__svg { width: 100%; height: auto; overflow: visible; }
.mind__ch { cursor: pointer; }
.mind__chamber { fill: color-mix(in oklab, var(--pearl) 92%, var(--stripe)); stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; cursor: pointer; transition: fill 300ms, stroke-width 300ms; }
.mind__chamber.is-on, .mind__chamber.is-pinned { fill: var(--glow); }
.mind__chamber.is-pinned { stroke-width: 5; }
.mind__chamber:focus-visible { outline: none; stroke: var(--stripe); stroke-width: 6; }
.mind__halo { fill: none; stroke: var(--glow); stroke-width: 22; stroke-linejoin: round; opacity: 0; transition: opacity 300ms; pointer-events: none; }
.mind__ch.is-on .mind__halo { opacity: .5; }
.mind__folds path { fill: none; stroke: color-mix(in oklab, var(--stripe) 70%, var(--ink)); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .55; pointer-events: none; }
.mind__core { fill: color-mix(in oklab, var(--pearl) 75%, var(--stripe)); stroke: var(--ink); stroke-width: 3; }
.mind__siphuncle { fill: none; stroke: var(--stripe); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 9; pointer-events: none; }
.mind__face { pointer-events: none; }
.mind__eye-white { fill: #fffdf6; stroke: var(--ink); stroke-width: 3.5; }
.mind__pupil circle { fill: var(--ink); }
.mind__pupil .glint { fill: #fff; }
.mind__lid { fill: color-mix(in oklab, var(--pearl) 70%, var(--stripe)); stroke: var(--ink); stroke-width: 3; transform: scaleY(0); transform-origin: 0 -24px; transition: transform 90ms ease-in; }
.mind__svg.is-blink .mind__lid { transform: scaleY(1); }
.mind__mouth { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.mind__label { cursor: pointer; }
.mind__label text { font-family: var(--font-mono); font-size: 15px; fill: var(--pearl); transition: fill 250ms; }
.mind__label .num { font-family: var(--font-display); font-style: italic; font-size: 21px; font-weight: 700; }
.mind__tag { opacity: 0; transition: opacity 200ms; pointer-events: none; }
.mind__tag.is-on { opacity: 1; }
.mind__tag rect { fill: var(--ink); stroke: var(--glow); stroke-width: 2.5; }
.mind__tag text { font-family: var(--font-mono); font-weight: 700; font-size: 15px; fill: var(--glow); }
.mind__label line { stroke: var(--pearl-70); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .5; transition: opacity 300ms; }
.mind__label.is-on line { opacity: 1; }
.mind__label circle { fill: var(--ink); stroke: var(--pearl); stroke-width: 2; transition: transform 300ms var(--ease-spring); transform-box: fill-box; transform-origin: center; }
.mind__label.is-on text { fill: var(--glow); }
.mind__label.is-on circle { transform: scale(1.6); fill: var(--glow); }

/* the trait panel: shows the hovered chamber, or the pinned one */
.trait { margin: 0 0 22px; padding: 16px 18px 18px; border-radius: 18px; background: color-mix(in oklab, var(--glow) 18%, var(--pearl)); border: 2px dashed color-mix(in oklab, var(--ink) 35%, transparent); transition: background-color 300ms, border-color 300ms; }
.trait.is-pinned { background: var(--glow); border: 2px solid var(--ink); }
.trait.is-thump { animation: trait-thump 520ms var(--ease-spring); }
@keyframes trait-thump { 0% { transform: scale(.96); } 50% { transform: scale(1.02); } 100% { transform: none; } }
.trait__kicker { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.trait__kicker span:first-child { opacity: .7; }
.trait__pin { padding: 1px 8px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.trait.is-pinned .trait__pin { background: var(--ink); color: var(--glow); }
.trait h4 { margin: 0 0 4px; font-size: clamp(22px, 1.4vw + 10px, 30px); line-height: 1.1; }
.trait p { margin: 0; font-size: 16.5px; line-height: 1.45; }
.trait__swap.is-swap { animation: trait-in 520ms var(--ease-spring); }
@keyframes trait-in { from { opacity: 0; transform: translateY(12px) scale(.97); filter: blur(4px); } }
.stamp {
  position: absolute; right: 2%; top: 0; transform: rotate(9deg);
  padding: 8px 14px 6px; border: 4px double var(--stripe); border-radius: 12px; color: var(--stripe);
  font-family: var(--font-mono); font-weight: 700; font-size: 24px; letter-spacing: .05em; text-transform: uppercase;
  mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0, 0, 0, .55) 61%, #000 70%);
  background: color-mix(in oklab, var(--abyss) 30%, transparent);
}
.stamp small { display: block; font-size: 10px; letter-spacing: .2em; }
.stamp.is-thump { animation: thump 600ms var(--ease-spring); }
@keyframes thump { 0% { transform: rotate(9deg) scale(1.6); opacity: 0; } 100% { transform: rotate(9deg) scale(1); opacity: 1; } }
.mind__chips { display: none; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mind__chips button { position: relative; border: 1.5px solid var(--pearl-70); background: none; border-radius: 999px; padding: 5px 11px; font-family: var(--font-mono); font-size: 12px; cursor: pointer; transition: transform 400ms var(--ease-spring); }
.mind__chips button:hover { transform: scale(1.08); }
.mind__chips button.is-on { background: var(--glow); color: var(--ink); border-color: var(--glow); }

.panel { border-radius: 28px 22px 26px 20px / 22px 28px 20px 26px; background: var(--pearl); color: var(--ink); border: var(--line) solid var(--ink); box-shadow: 7px 7px 0 var(--ink); padding: clamp(20px, 2.6vw, 36px); }
.thoughts__head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.scrubber { position: relative; height: 54px; margin: 0 6px 24px; touch-action: pan-y; }
.scrubber__track { position: absolute; left: 0; right: 0; top: 26px; height: 3px; background: var(--ink); border-radius: 3px; }
.scrubber__fill { position: absolute; left: 0; top: 24px; height: 7px; border-radius: 7px; background: var(--stripe); width: 100%; transform-origin: left center; transform: scaleX(0); transition: transform 600ms var(--ease-out); }
.scrubber__node { position: absolute; top: 13px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--pearl); cursor: pointer; padding: 0; font-family: var(--font-mono); font-size: 10px; display: grid; place-items: center; transition: transform 400ms var(--ease-spring), background-color 300ms; }
.scrubber__node:hover { transform: scale(1.12); }
.scrubber__node.is-on { background: var(--ink); color: var(--pearl); transform: scale(1.22); }
.scrubber__node small { position: absolute; top: 34px; white-space: nowrap; font-size: 10px; opacity: .65; }
.scrubber__handle { position: absolute; top: 0; width: 24px; height: 12px; margin-left: -12px; pointer-events: none; transition: transform 600ms var(--ease-spring); }
.scrubber input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; margin: 0; }
.thoughts__headline { margin: 0 0 14px; min-height: 2.3em; font-size: clamp(25px, 2vw + 10px, 38px); line-height: 1.12; font-weight: 750; font-variation-settings: 'opsz' 72, 'SOFT' 60; }
.caret { display: inline-block; width: .08em; height: .95em; margin-left: .06em; vertical-align: -0.1em; background: var(--stripe); animation: blink 900ms steps(2, start) infinite; }
@keyframes blink { to { opacity: 0; } }
.thoughts__body p { margin: 0 0 12px; opacity: 0; transform: translateY(10px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i) * 160ms); }
.thoughts__body.is-in p { opacity: 1; transform: none; }
.thoughts__foot { margin-top: 14px; padding-top: 12px; border-top: 2px dashed color-mix(in oklab, var(--ink) 25%, transparent); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- 4. chambers ---------- */
.chambers { color: var(--pearl); }
.chambers__stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(3, auto); gap: clamp(26px, 3.4vw, 54px) clamp(18px, 3vw, 46px); align-items: center; }
.chambers__tentacles { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.chambers__tentacles path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chambers__tentacles .t-out { stroke: var(--ink); stroke-width: 10; }
.chambers__tentacles .t-in { stroke: color-mix(in oklab, var(--pearl) 78%, var(--stripe)); stroke-width: 4; stroke-dasharray: 1 13; transition: stroke 400ms; }
.chambers__tentacles .t-pulse { stroke: var(--glow); stroke-width: 10; stroke-dasharray: 70 110 50 2400; stroke-dashoffset: 240; opacity: 0; filter: drop-shadow(0 0 8px var(--glow)); }
.chambers__tentacles .is-pulse .t-pulse { animation: t-pulse 1.5s var(--ease-in-out); }
.chambers__tentacles .is-pulse .t-in { stroke: var(--glow); transition-duration: 100ms; }
@keyframes t-pulse { 0% { opacity: 1; stroke-dashoffset: 240; } 88% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: -1100; } }
/* Spiro is twice the size and sits under the cards, which overlap his silhouette */
.chambers__center { grid-column: 2; grid-row: 1 / span 3; position: relative; z-index: 1; margin-inline: -34%; display: grid; place-items: center; }
.chambers__center .spiro-host { width: 100%; aspect-ratio: 1.25; }
.chambers__center p { position: absolute; bottom: 4%; left: 0; right: 0; text-align: center; margin: 0; }
.chamber { position: relative; z-index: 2; padding: 20px 22px 22px; border-radius: 24px 18px 26px 20px / 18px 26px 20px 24px; background: var(--pearl); color: var(--ink); border: var(--line) solid var(--ink); box-shadow: 6px 6px 0 var(--ink); transition: box-shadow 400ms var(--ease-spring); will-change: transform; }
.chamber:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.chamber:nth-of-type(2) { grid-column: 1; grid-row: 2; }
.chamber:nth-of-type(3) { grid-column: 1; grid-row: 3; }
.chamber:nth-of-type(4) { grid-column: 3; grid-row: 1; }
.chamber:nth-of-type(5) { grid-column: 3; grid-row: 2; }
.chamber:nth-of-type(6) { grid-column: 3; grid-row: 3; }
.chamber.is-held { box-shadow: 9px 13px 0 var(--ink); }
.chamber__meta { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 8px; opacity: .7; }
.chamber h3 { margin: 0; font-size: 23px; line-height: 1.1; font-weight: 750; }
.chamber__desc { margin: 8px 0 14px; font-size: 16px; line-height: 1.42; min-height: 3em; }
.chamber__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.chamber__value { font-weight: 900; font-size: clamp(26px, 2.3vw, 38px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; font-variation-settings: 'opsz' 144, 'SOFT' 100; overflow-wrap: anywhere; }
.badge { flex: none; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--ink); font-family: var(--font-mono); font-size: 11px; background: var(--glow); }
.badge--rust { background: var(--stripe); color: var(--pearl); }
/* a changed card: it jolts, flashes glow and throws off two rings (individual transform
   properties, so this composes with the sway that JS writes into `transform`) */
.chamber.is-changed { animation: card-pop 1100ms var(--ease-out); }
@keyframes card-pop {
  0% { scale: 1; rotate: 0deg; }
  18% { scale: 1.1; rotate: -2.5deg; }
  38% { scale: .96; rotate: 2deg; }
  58% { scale: 1.04; rotate: -1deg; }
  78% { scale: .99; rotate: .4deg; }
  100% { scale: 1; rotate: 0deg; }
}
.chamber.is-changed::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--glow); mix-blend-mode: multiply; animation: flash 1.4s var(--ease-out) forwards; pointer-events: none; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.chamber.is-changed::after { content: ''; position: absolute; inset: -10px; border-radius: 30px; border: 5px solid var(--glow); box-shadow: 0 0 24px var(--glow); animation: ring 1.3s var(--ease-out) forwards; pointer-events: none; }
@keyframes ring { from { opacity: 1; transform: scale(.94); } to { opacity: 0; transform: scale(1.16); } }

/* ---------- 5. burns: the vault, read straight from the chain ---------- */
.burns { color: var(--pearl); }
.burns__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.burns__label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.burns__label code { font: inherit; color: var(--glow); }
.burns__icon { width: clamp(40px, 3.6vw, 52px); height: auto; flex: none; overflow: visible; }
.burns__tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--stripe); color: var(--pearl); border: 2px solid var(--ink); font-family: var(--font-mono); font-size: 11px; font-style: normal; text-transform: uppercase; letter-spacing: .1em; vertical-align: middle; }
.odo--supply { font-family: var(--font-display); font-weight: 900; font-size: clamp(38px, 6vw, 100px); letter-spacing: -0.035em; font-variation-settings: 'opsz' 144; transition: color 600ms; }
.odo--supply .odo__d { width: .6em; }
.odo--supply .odo__sep { width: .24em; }
.odo--supply.is-burning { animation: supply-burn 1.8s var(--ease-out); }
@keyframes supply-burn { 0% { color: var(--stripe); transform: scale(1.025) rotate(-.6deg); } 30% { color: #f0a46f; } 100% { color: var(--pearl); transform: none; } }
.burns[data-state='loading'] .odo--supply, .burns[data-state='prelaunch'] .odo--supply, .burns[data-state='error'] .odo--supply { opacity: .3; }
.burns__sub { margin: 12px 0 0; opacity: .85; }
.burns__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px clamp(14px, 2vw, 32px); margin: clamp(28px, 4vw, 52px) 0 0; padding-top: 22px; border-top: 2px dashed var(--pearl-40); }
.burns__stats div { margin: 0; }
.burns__stats dt { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.burns__stats dd { margin: 0; font-weight: 800; font-size: clamp(24px, 1.6vw + 12px, 38px); line-height: 1.05; font-variant-numeric: tabular-nums; font-variation-settings: 'opsz' 144, 'SOFT' 60; white-space: nowrap; }
.burns__stats dd small { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: .06em; opacity: .7; }
.burns__status { margin: 22px 0 0; opacity: .6; transition: color 300ms, opacity 300ms; }
.burns.is-stale .burns__status, .burns[data-state='error'] .burns__status { opacity: 1; color: #f0a46f; }

.burns__side { display: grid; gap: 24px; }
.burns__next-head { display: flex; align-items: center; gap: 14px; }
.burns__next .spiro-host { width: clamp(80px, 7vw, 104px); aspect-ratio: 1.25; flex: none; }
.burns__next-kicker { margin: 0 0 6px; opacity: .7; }
.burns__next .odo--count { font-size: 34px; }
.burns__next .odo--count.is-long { font-size: 28px; }
.burns__next-big { margin: 0; font-weight: 800; font-size: clamp(24px, 1.2vw + 14px, 30px); line-height: 1.1; font-variation-settings: 'opsz' 72, 'SOFT' 60; }
/* how full the vault is, against the threshold it needs before it burns */
.burns__fill { position: relative; height: 12px; margin: 18px 0 12px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.burns__fill span { position: absolute; inset: 0; background: var(--glow); transform-origin: left center; transform: scaleX(var(--fill, 0)); transition: transform 900ms var(--ease-out), background-color 400ms; }
.burns__fill.is-ready span { background: var(--stripe); }
.burns__next-note { margin: 0; font-size: 16px; line-height: 1.45; }
.burns__feed-head { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 8px; opacity: .7; }
.burns__list { list-style: none; margin: 0 -8px; padding: 0; }
.burn + .burn { border-top: 2px dashed color-mix(in oklab, var(--ink) 20%, transparent); }
.burn a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'amt sol' 'when arrow'; align-items: baseline; gap: 2px 12px; padding: 10px 8px; border-radius: 12px; text-decoration: none; transition: background-color 200ms, transform 400ms var(--ease-spring); }
.burn a:hover { background: color-mix(in oklab, var(--glow) 32%, transparent); transform: translateX(3px); }
.burn__amt { grid-area: amt; font-weight: 800; font-size: 20px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.burn__amt small { font-family: var(--font-mono); font-size: 11px; font-weight: 400; opacity: .7; }
.burn__sol { grid-area: sol; justify-self: end; white-space: nowrap; }
.burn__when { grid-area: when; opacity: .6; }
.burn__arrow { grid-area: arrow; justify-self: end; font-family: var(--font-mono); font-size: 14px; transition: transform 400ms var(--ease-spring); }
.burn a:hover .burn__arrow { transform: translate(2px, -2px) scale(1.2); }
.burn.is-new { animation: burn-in 900ms var(--ease-spring) both; }
.burn.is-new a { animation: burn-flash 2.4s var(--ease-out); }
@keyframes burn-in { from { opacity: 0; transform: translateY(-16px) scale(.95) rotate(-1deg); } }
@keyframes burn-flash { 0%, 20% { background: color-mix(in oklab, var(--stripe) 40%, transparent); } 100% { background: transparent; } }
.burn--empty { padding: 12px 8px; font-style: italic; font-size: 16px; opacity: .75; }
.burns__verify { justify-self: start; }

/* the verify dialog borrows the about dialog's paper, with room for long addresses */
.verify { width: min(720px, calc(100vw - 32px)); }
.verify__list { margin: 18px 0 8px; }
.verify__list dt { margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.verify__list dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.verify code, .burns__label code { overflow-wrap: anywhere; }
.verify code { font-family: var(--font-mono); font-size: 12.5px; padding: 3px 8px; border-radius: 8px; background: color-mix(in oklab, var(--ink) 7%, transparent); word-break: break-all; }
.verify__list dd.is-unset code { background: none; padding-left: 0; font-style: italic; opacity: .6; }
.verify__actions { display: inline-flex; gap: 6px; }
.verify__actions .chip-btn { padding: 4px 10px; font-size: 12px; text-decoration: none; }
.verify__h { margin: 26px 0 8px; text-transform: uppercase; letter-spacing: .12em; }
.verify__steps { margin: 0; padding-left: 22px; }
.verify__steps li { margin: 0 0 12px; }
.verify__steps b { display: block; }
.verify__cmd { display: block; margin-top: 6px; padding: 6px 10px !important; }

/* ---------- 6. logbook ---------- */
.logbook { color: var(--pearl); }
.logbook__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.timeline { position: relative; padding-left: 74px; min-height: 120vh; }
.timeline__spiral { position: absolute; left: 0; top: 0; width: 74px; height: 100%; overflow: visible; pointer-events: none; }
.timeline__spiral path { fill: none; stroke: var(--pearl); stroke-width: 6; stroke-linecap: round; }
.timeline__spiral .ghost { stroke: var(--pearl-40); stroke-width: 3; stroke-dasharray: 2 10; }
.timeline__clip { position: absolute; left: -10px; top: 0; width: calc(74px + 20px); height: 100%; overflow: hidden; pointer-events: none; will-change: transform; }
.timeline__spiral--ink { left: 10px; will-change: transform; }
.timeline__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(46px, 8vh, 96px); }
.node { position: relative; cursor: pointer; }
.node__dot { position: absolute; left: -60px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--pearl); border: var(--line) solid var(--ink); box-shadow: 0 0 0 4px var(--abyss); transform: scale(0); transition: transform 650ms var(--ease-spring), background-color 300ms; }
.node.is-in .node__dot { transform: none; }
.node.is-current .node__dot { background: var(--glow); box-shadow: 0 0 0 4px var(--abyss), 0 0 24px 6px color-mix(in oklab, var(--glow) 60%, transparent); }
.node.is-in.is-on .node__dot { transform: scale(1.3); background: var(--stripe); }
/* the words follow the dot in */
.node > :not(.node__dot) { opacity: 0; transform: translateX(-18px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-spring); transition-delay: 120ms; }
.node.is-in > :not(.node__dot) { opacity: 1; transform: none; }
.node__v { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--glow); }
.node h3 { margin: 4px 0 10px; font-size: clamp(21px, 1.4vw + 10px, 30px); line-height: 1.15; font-weight: 700; font-style: italic; max-width: 32ch; transition: color 300ms; }
.node.is-on h3 { color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.pills li { padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--pearl-70); font-family: var(--font-mono); font-size: 11.5px; }
.node__meta { opacity: .65; }
.load-older { margin-top: 48px; --wob: var(--ink); }
.logbook__panel { position: sticky; top: 92px; }
.paper-wrap { position: relative; filter: drop-shadow(7px 8px 0 var(--ink)); }
.paper.paper--turning { position: absolute; inset: 0; pointer-events: none; backface-visibility: hidden; z-index: 2; }
.paper { background: var(--pearl); color: var(--ink); padding: 40px clamp(22px, 2.6vw, 36px) 44px; clip-path: var(--torn, none); min-height: 360px; position: relative; }
.paper::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in oklab, var(--deep) 12%, transparent) 31px 32px); pointer-events: none; }
.paper > * { position: relative; }
.paper__kicker { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.seal { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--pearl); font-weight: 700; }
.seal.is-live { background: var(--stripe); }
.paper h3 { margin: 0 0 14px; font-size: clamp(24px, 1.8vw + 10px, 34px); line-height: 1.12; font-weight: 750; }
.paper blockquote { margin: 0 0 18px; padding-left: 16px; border-left: 4px solid var(--stripe); font-style: italic; font-size: 19px; }
.paper blockquote cite { display: block; margin-top: 6px; font-style: normal; font-family: var(--font-mono); font-size: 11px; opacity: .65; }
.paper__changed { margin: 0 0 16px; font-size: 16.5px; }
.paper__changed b { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; display: block; margin-bottom: 2px; }
.paper__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; opacity: .7; }
.paper__live { display: none; align-items: center; gap: 16px; margin: 4px 0 16px; }
.paper.is-current .paper__live { display: flex; }
.paper.is-current blockquote { display: none; }
.paper__live .spiro-host { width: 120px; flex: none; }
.paper__swap { transition: opacity 260ms, transform 400ms var(--ease-out); }
.paper__swap.is-out { opacity: 0; transform: translateY(8px); }
.slider { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 26px; padding: 14px 18px; border-radius: 999px; border: 2px solid var(--pearl-40); }
.slider input { width: 100%; accent-color: var(--glow); }
.slider__val { min-width: 4ch; text-align: right; color: var(--glow); font-weight: 700; }
input[type='range'].ink-range { -webkit-appearance: none; appearance: none; height: 28px; background: none; }
input[type='range'].ink-range::-webkit-slider-runnable-track { height: 4px; background: var(--pearl); border-radius: 4px; }
input[type='range'].ink-range::-moz-range-track { height: 4px; background: var(--pearl); border-radius: 4px; }
input[type='range'].ink-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--glow); border: 3px solid var(--ink); }
input[type='range'].ink-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--glow); border: 3px solid var(--ink); }

/* ---------- 7. others / reef tank ---------- */
.others { color: var(--pearl); }
.others h2 { color: var(--pearl); }
.tank__frame { position: relative; border-radius: 34px; border: 5px solid var(--ink); background: color-mix(in oklab, var(--deep) 45%, var(--abyss)); box-shadow: 0 0 0 3px var(--pearl-40), 10px 10px 0 var(--ink); overflow: hidden; height: clamp(360px, 56vw, 660px); }
.tank__frame::after { content: ''; position: absolute; inset: 0; border-radius: 30px; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .12), transparent 30%, transparent 70%, rgba(255, 255, 255, .06)); }
.tank__canvas { width: 100%; height: 100%; }
.tank__bubble {
  position: absolute; left: 0; top: 0; max-width: 260px; padding: 12px 15px; border-radius: 18px;
  background: var(--pearl); color: var(--ink); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-size: 15.5px; line-height: 1.35; pointer-events: none;
  opacity: 0; transform: translate(var(--x), var(--y)) scale(.5); transform-origin: 20px 100%;
  transition: opacity 250ms;
}
.tank__bubble.is-on { opacity: 1; animation: say-pop 750ms cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes say-pop {
  0% { transform: translate(var(--x), var(--y)) scale(.35) rotate(-8deg); }
  50% { transform: translate(var(--x), var(--y)) scale(1.1) rotate(2.5deg); }
  72% { transform: translate(var(--x), var(--y)) scale(.96) rotate(-1deg); }
  100% { transform: translate(var(--x), var(--y)) scale(1) rotate(0deg); }
}
.tank__bubble::after { content: ''; position: absolute; left: 22px; bottom: -11px; width: 18px; height: 18px; background: var(--pearl); border-right: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); transform: rotate(45deg) skew(8deg, 8deg); }
.tank__captions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 22px; }
.tank__captions span { display: inline-flex; align-items: center; gap: 8px; }
.tank__captions i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 2px solid var(--pearl); }

/* ---------- 8. trench ---------- */
.trench { color: var(--pearl); padding-bottom: 40px; }
.trench__headline { margin: 0; color: var(--pearl); font-weight: 900; line-height: .9; letter-spacing: -0.035em; font-size: clamp(64px, 11vw, 190px); font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; }
.trench__headline .tl { display: block; }
.trench__headline .tl--glow { color: var(--glow); text-shadow: 0 0 40px color-mix(in oklab, var(--glow) 45%, transparent); }
.trench__headline .tl--glow .ch__o { text-shadow: none; }
.trench__wrap { position: relative; }
.trench__line { display: flex; align-items: center; gap: 16px; margin: 28px 0 0; font-size: clamp(19px, 1.2vw + 12px, 26px); line-height: 1.3; max-width: 900px; }
/* a big Spiro who swims about beside the chat (trench.js moves him) */
.trench__swimmer { position: absolute; left: 0; top: 0; z-index: 4; width: clamp(170px, 20vw, 300px); aspect-ratio: 1.25; pointer-events: none; will-change: transform; }
.trench__swimmer .spiro-host { width: 100%; height: 100%; }
.swap { display: inline-block; color: var(--glow); font-style: italic; font-weight: 700; transition: opacity 320ms var(--ease-out), filter 320ms var(--ease-out), transform 420ms var(--ease-out); }
.swap.is-out { opacity: 0; filter: blur(8px); transform: translateY(-8px); }
.swap.is-pre { opacity: 0; filter: blur(8px); transform: translateY(8px); transition: none; }

.chat { position: relative; z-index: 3; margin-top: clamp(36px, 6vw, 70px); max-width: 920px; }
.chat__log { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 14px; max-height: 52vh; overflow-y: auto; scroll-behavior: smooth; padding-right: 4px; }
.chat__log:empty { display: none; }
.msg { max-width: min(640px, 88%); padding: 13px 18px; border-radius: 22px; font-size: 17px; line-height: 1.45; animation: rise-in .5s var(--ease-out) both; opacity: 0; transform: translateY(10px); }
.msg--user { align-self: flex-end; border: 2px solid var(--pearl-70); border-bottom-right-radius: 6px; }
.msg--spiro { align-self: flex-start; background: var(--pearl); color: var(--ink); border: var(--line) solid var(--ink); border-bottom-left-radius: 6px; box-shadow: 4px 4px 0 color-mix(in oklab, var(--glow) 60%, var(--ink)); }
.msg__meta { display: block; margin-top: 6px; opacity: .55; }
.msg--note { align-self: center; font-family: var(--font-mono); font-size: 12px; opacity: .7; padding: 4px 10px; }
.chat__form { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 26px; border-radius: 999px; background: var(--pearl); border: var(--line) solid var(--ink); box-shadow: 6px 6px 0 var(--glow); }
.chat__input { flex: 1; min-width: 0; border: 0; background: none; font-family: var(--font-display); font-size: clamp(19px, 1.4vw + 10px, 26px); padding: 12px 0; color: var(--ink); outline: none; }
.chat__input::placeholder { color: color-mix(in oklab, var(--ink) 45%, transparent); font-style: italic; }
.chat__count { color: color-mix(in oklab, var(--ink) 50%, transparent); }
.chat__count.is-warn { color: var(--stripe); }
.chat__send { flex: none; }
.chat__send[disabled] { opacity: .5; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chips button { position: relative; border: 2px solid var(--pearl-70); background: transparent; color: var(--pearl); border-radius: 999px; padding: 9px 16px; font-family: var(--font-display); font-size: 15.5px; cursor: pointer; transition: transform 450ms var(--ease-spring), background-color 200ms, color 200ms; }
.chips button:hover { transform: translateY(-3px) scale(1.06); background: var(--pearl); color: var(--ink); }
.chips button:active { transform: scale(.95); }
.chat__note { margin-top: 16px; opacity: .6; }

.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: clamp(80px, 12vw, 160px); padding: 26px 0 12px; border-top: 2px solid var(--pearl-40); color: var(--pearl); }
.footer a, .footer button { font-family: var(--font-mono); font-size: 13px; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.footer a:hover, .footer button:hover { color: var(--glow); }
.footer small { margin-left: auto; opacity: .55; }

/* ---------- about modal & toast ---------- */
.about { width: min(640px, calc(100vw - 32px)); max-height: calc(100svh - 40px); padding: 0; border: var(--line) solid var(--ink); border-radius: 26px; background: var(--pearl); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.about::backdrop { background: color-mix(in oklab, var(--abyss) 70%, transparent); }
.about[open] { animation: rise-in .5s var(--ease-out) both; opacity: 0; transform: translateY(16px); }
.about__inner { padding: clamp(24px, 4vw, 40px); }
.about h2 { margin: 0 0 12px; font-size: 38px; line-height: 1; }
.about p, .about li { font-size: 16.5px; line-height: 1.5; }
.about ul { padding-left: 20px; }
.about__close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--pearl); cursor: pointer; font-size: 20px; line-height: 1; transition: transform 450ms var(--ease-spring); }
.about__close:hover { transform: scale(1.12) rotate(90deg); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: var(--z-toast); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--pearl); font-family: var(--font-mono); font-size: 13px; transform: translate(-50%, 30px); opacity: 0; transition: transform 500ms var(--ease-spring), opacity 300ms; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .gauge { width: 110px; }
  .gauge__labels button span { display: none; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__x { margin-left: auto; }
  .hero__grid, .thinking__grid, .logbook__grid { grid-template-columns: minmax(0, 1fr); }
  /* Spiro first, full width, tucked under the title */
  .hero__art { --h: auto; width: min(100%, 560px); height: auto; aspect-ratio: 1.25; margin: -10px auto -9vw; }
  .hero__next { position: relative; right: auto; bottom: auto; margin-top: 18px; order: 2; }
  .hero__side { display: contents; }
  .hero__copy { order: 1; }
  .hero__title { font-size: clamp(96px, 30vw, 200px); }

  /* the gauge becomes a thin bar on the right edge */
  .gauge { right: 4px; width: 6px; height: 46vh; }
  .gauge__labels, .gauge__readout { display: none; }
  .gauge__ruler { right: 2px; width: 2px; opacity: .5; }
  .gauge__tick { display: none; }
  .gauge__spiro { right: -2px; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--stripe); border: 2px solid var(--ink); filter: none; }
  .gauge__spiro .spiro { display: none; }

  /* the current runs down the left edge; each illustration sits above its text */
  .flow { padding-top: 2vh; }
  .flow__line .ink { stroke-width: 8; }
  .flow__line .halo { stroke-width: 18; }
  .flow__nib { --w: 8px; --h: 5px; }
  .step { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 8px; padding: 7vh 0 7vh 34px; }
  .step:nth-of-type(even) .step__art { order: 0; }
  .step__art, .step:nth-of-type(even) .step__art { width: min(100%, 440px); justify-self: center; }
  .step:nth-of-type(even) .step__text { justify-self: start; }
  .art__tag { font-size: 12px; }
  .pearls { padding: 8vh 0 0 34px; }
  .pearls__shell { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }

  .chambers__stage { grid-template-columns: minmax(0, 1fr); }
  .chambers__center { grid-column: 1; grid-row: auto; order: -1; margin-inline: 0; max-width: 380px; justify-self: center; width: 100%; }
  .chamber:nth-of-type(n) { grid-column: 1; grid-row: auto; transform: none; }
  .chambers__tentacles { display: none; }

  .timeline { min-height: 0; padding-left: 56px; }
  .timeline__spiral { width: 56px; }
  .timeline__clip { width: calc(56px + 20px); }
  .node__dot { left: -48px; width: 24px; height: 24px; }
  .logbook__panel { position: relative; top: 0; order: -1; }

  .burns__grid { grid-template-columns: minmax(0, 1fr); }
  .burns__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mind { margin-left: 0; }
  .mind__labels { display: none; }
  .mind__chips { display: flex; }

  .chat { margin-top: clamp(150px, 46vw, 240px); }

  .feed { width: auto; right: 54px; }
  .feed__list { height: 168px; }
  .feed.is-collapsed .feed__body { display: none; }
  .feed.is-collapsed .feed__head { padding-bottom: 4px; }
  .feed.is-collapsed .feed__oneline { display: block; margin: 0; padding: 0 16px 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; animation: feed-in 600ms var(--ease-out); }
  .footer small { margin-left: 0; }
}
@media (max-width: 560px) {
  .nav { gap: 8px; }
  .nav__x { width: 40px; height: 40px; }
  .nav__cta { padding: 10px 15px; font-size: 15px; }
  .ca-chip__full { display: none; }
  .ca-chip__short { display: inline; }
  .hero__next { flex-direction: row; align-items: center; gap: 14px; }
  .badge-next { width: 122px; height: 122px; }
  .odo--count { font-size: 24px; }
  .step, .pearls { padding-left: 28px; }
  .stat p { font-size: 14.5px; }
  .chat__form { padding-left: 18px; }
  .chat__count { display: none; }
  .tank__frame { border-radius: 24px; }
  .burn__amt { font-size: 18px; }
  .burns__next .odo--count { font-size: 28px; }
  .burns__next .odo--count.is-long { font-size: 23px; }
}

/* ---------- reduced motion: final states, no boil, no canvases, no scrub ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .sea { display: none; }
  .reveal, .w { opacity: 1 !important; filter: none !important; transform: none !important; }
  .tent, .spiro__float { animation: none !important; }
  .divider__line { stroke-dashoffset: 0 !important; }
  .divider__bubble { display: none; }
  html .boil { filter: none !important; }
  .pearl-dot { transform: none !important; }
}
/* .reduced is set before first paint when the visitor prefers less motion */
.reduced .sea { display: none; }
.reduced .step__art { transform: none; opacity: 1; }
.reduced .step h3, .reduced .step__num, .reduced .stat, .reduced .node > *, .reduced .node__dot { opacity: 1; transform: none; filter: none; }
.reduced .burn.is-new, .reduced .burn.is-new a, .reduced .odo--supply.is-burning { animation: none; }
.reduced .stat__float, .reduced .clock__bubble, .reduced .grow__sway, .reduced .pearl__orbit, .reduced .stat__rays { animation: none; }

/* SVGs that repaint every frame get their own compositor layer, so their repaints don't
   re-raster the text around them. */
.flow__line, .chambers__tentacles, .mind__svg, .pearls__shell svg, .spiro-host { will-change: transform; }
