/* =====================================================================
   snowball — the whole visual identity is the :root block below.
   Nothing further down hardcodes a colour, a face or a size, so a
   reskin is these ~20 lines plus the PALETTE block in app.js (the
   pixel scene has its own palette, because canvas can't read CSS vars).
   ===================================================================== */

/* fonts are loaded by a <link> in index.html, not an @import — an @import
   here serialises the download behind this stylesheet, and the page then
   measures `ch` against the fallback face and wraps headings wrong. */

:root {
  --paper: #f2f6fb;   /* the light band                        */
  --ink:   #16243a;   /* text, every rule, the dark band       */
  --mute:  #5a6b80;   /* secondary prose                       */
  --blue:  #2f89ba;   /* the one accent: numerals, labels      */
  --line:  #16243a;

  --dark-panel: #101c2e;  /* boxes that stay dark on both bands */
  --dark-line:  #2d4360;
  --dark-ink:   #e6eef8;
  --dark-mute:  #8296ae;

  --pump:  #00ff88;   /* the buy button, and only the buy button */
  --live:  #5dca8a;
  --bad:   #e07a7a;

  --pixel: "Silkscreen", monospace;   /* headings, labels, furniture */
  --mono:  "Space Mono", ui-monospace, monospace;  /* all prose      */

  --pad: clamp(1rem, 4vw, 2.75rem);
  --wrap: 920px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- nav ---------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  color: var(--ink);
}
.nav-brand { font-family: var(--pixel); font-size: 0.85rem; letter-spacing: 0.02em; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem 1rem; font-size: 0.75rem; text-transform: lowercase; color: var(--mute); }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.hero { position: relative; display: grid; min-height: 100dvh; }
.hero-stage { position: absolute; inset: 0; z-index: 0; }

.scene-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #f2f6fb;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hero-plate {
  position: relative;
  z-index: 2;
  place-self: end start;
  max-width: min(38rem, 92vw);
  padding: 0 var(--pad) clamp(2rem, 6vh, 3.5rem);
  color: var(--ink);
  /* the reveal lives in the boot block at the bottom of this file, as a
     transition rather than a keyframe animation. See the note there. */
}
.hero-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}
.brand {
  margin: 0 0 0.85rem;
  font-family: var(--pixel);
  font-size: clamp(3rem, 11vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(47, 137, 186, 0.18);
}
.claim {
  margin: 0 0 1rem;
  max-width: 18ch;
  font-family: var(--pixel);
  font-size: clamp(1.15rem, 3.6vw, 2rem);
  line-height: 1.35;
  color: var(--ink);
}
.tag {
  margin: 0 0 1.5rem;
  max-width: 32ch;
  font-size: clamp(0.95rem, 2.1vw, 1.2rem);
  line-height: 1.55;
  color: var(--mute);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.95rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.btn:hover:not(:disabled) { translate: 2px 2px; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-ink  { background: var(--ink); color: var(--paper); }
.btn-line { background: none; }
.btn-pump { background: var(--pump); border-color: var(--pump); color: #0a0f0c; }

.hero .btn-line { background: rgba(242, 246, 251, 0.85); }
.hero .btn-pump:hover { background: #3dffaa; border-color: #3dffaa; }

/* ---------- bands -------------------------------------------------- */

/* the waterline. snowball divides its bands with a 2px ink hairline; this
   one uses a blue rule, which is the single cheapest way to stop the page
   reading as the same template. */
.strip { padding: clamp(4.5rem, 12vw, 7.5rem) 0; border-top: 3px solid var(--blue); }
.strip-ink { background: var(--ink); color: var(--paper); border-top-color: var(--blue); }
.strip-end { border-bottom: 3px solid var(--blue); }
.strip-grid {
  background-image: radial-gradient(var(--ink) 0.6px, transparent 0.6px);
  background-size: 10px 10px;
  background-position: 0 0;
}

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--pad))); margin: 0 auto; }

.phrase {
  margin: 0 0 1.75rem;
  max-width: 14ch;
  font-family: var(--pixel);
  font-size: clamp(1.35rem, 4.2vw, 2.35rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.phrase-light { color: var(--paper); }

.slim { margin: 0 0 2rem; max-width: 34ch; font-size: 0.92rem; color: var(--mute); }
.slim.wide { max-width: 48ch; font-size: 1rem; }
.slim.light, .strip-ink .slim { color: #9fb2c8; }

/* ---------- the six facts ------------------------------------------ */

.plain-list { display: grid; margin: 0 0 2rem; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.plain-list li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.85rem 1.1rem;
  padding: 1.35rem 0;
  border-bottom: 2px solid var(--ink);
}
.plain-n { padding-top: 0.15rem; font-family: var(--pixel); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--blue); }
.plain-list h3 {
  margin: 0 0 0.45rem;
  max-width: 22ch;
  font-family: var(--pixel);
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  line-height: 1.35;
}
.plain-list p { margin: 0; max-width: 48ch; font-size: 0.95rem; line-height: 1.65; color: var(--mute); }
.plain-cta { margin-top: 0.25rem; }

/* ---------- the ledger --------------------------------------------- */

.ledger { border: 2px solid var(--ink); background: var(--paper); }
.ledger-head, .ledger-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
}
.ledger-foot { border-bottom: 0; border-top: 2px solid var(--ink); color: var(--mute); }
.ledger-rows { margin: 0; padding: 0; list-style: none; }
.ledger-rows li {
  display: grid;
  grid-template-columns: 7.5rem 1fr 1fr;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  border-bottom: 1px solid #ccd7e4;
}
.ledger-rows li:last-child { border-bottom: 0; }
.ledger-rows .k { align-self: center; font-family: var(--pixel); font-size: 0.58rem; letter-spacing: 0.04em; }
.ledger-rows .v { font-size: 1.05rem; font-weight: 700; }
.ledger-rows .n { text-align: right; font-size: 0.75rem; color: var(--mute); }
.ledger-status { font-family: var(--pixel); font-size: 0.7rem; }
.ledger-status.bad { color: #8b3a2e; }

/* ---------- panic ---------------------------------------------------- */

.thesis-grid { display: grid; gap: 1.25rem; max-width: 52ch; }
.thesis-grid p { margin: 0; font-size: 1.05rem; line-height: 1.65; color: var(--mute); }
.thesis-grid strong { color: var(--ink); font-weight: 700; }
.strip-ink .thesis-grid p { color: #9fb2c8; }
.strip-ink .thesis-grid strong { color: var(--paper); }

.giant-eq {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 2px dashed var(--dark-line);
  font-family: var(--pixel);
  font-size: clamp(1rem, 3.5vw, 1.65rem);
  letter-spacing: 0.02em;
}

/* ---------- the live dot ---------------------------------------------- */

.live-dot { width: 8px; height: 8px; border-radius: 0; background: var(--live); animation: pulse 1.6s steps(2, end) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- the worked calculation ------------------------------------ */

.calc { border: 2px solid var(--dark-line); background: var(--dark-panel); color: var(--dark-ink); }
.calc-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--dark-line);
  font-family: var(--pixel); font-size: 0.65rem; letter-spacing: 0.06em;
}
.calc-sub { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0; color: var(--dark-mute); }
.calc-body { display: grid; }
.calc-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: baseline; gap: 0.4rem 1rem;
  padding: 1rem;
  border-bottom: 1px solid #22334a;
}
.calc-row:last-child { border-bottom: 0; }
.calc-name { font-family: var(--pixel); font-size: 0.62rem; letter-spacing: 0.04em; color: #7cc6ea; }
.calc-eq { font-size: 0.85rem; color: var(--dark-mute); }
.calc-sub2 { font-size: 0.85rem; color: var(--dark-ink); word-break: break-word; }
.calc-out { font-family: var(--pixel); font-size: 0.85rem; color: #7cc6ea; text-align: right; }
.calc-foot {
  margin: 0; padding: 0.85rem 1rem;
  border-top: 2px solid var(--dark-line);
  font-size: 0.75rem; color: var(--dark-mute);
}
.calc-foot b { color: var(--dark-ink); }

/* ---------- the projection table --------------------------------------- */

.proj-wrap { overflow-x: auto; }
.proj {
  width: 100%; min-width: 34rem;
  border-collapse: collapse;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-size: 0.85rem;
}
.proj th {
  padding: 0.7rem 0.85rem;
  border-bottom: 2px solid var(--ink);
  font-family: var(--pixel); font-size: 0.56rem; letter-spacing: 0.04em;
  text-align: left; white-space: nowrap;
}
.proj td { padding: 0.7rem 0.85rem; border-bottom: 1px solid #ccd7e4; white-space: nowrap; }
.proj tr:last-child td { border-bottom: 0; }
.proj .num { font-weight: 700; }
.proj .gain { font-weight: 700; color: var(--blue); }
.proj-empty { color: var(--mute); font-style: italic; white-space: normal; }
.fine-light { margin: 0.9rem 0 0; font-size: 0.75rem; color: var(--mute); }
.fine-light b { color: var(--ink); }

/* ---------- the writeup ---------------------------------------------- */

.tech { display: grid; border: 2px solid var(--ink); background: var(--paper); }
/* grid items default to min-width:auto and refuse to shrink below their
   content, which stops .tech-code from ever scrolling inside itself and
   pushes the whole page sideways on a phone */
.tech-block { min-width: 0; padding: 1.35rem 1.2rem; border-bottom: 2px solid var(--ink); }
.tech-block:last-child { border-bottom: 0; }
.tech-block h3 { margin: 0 0 0.65rem; font-family: var(--pixel); font-size: 0.78rem; letter-spacing: 0.02em; }
.tech-block p { margin: 0 0 0.75rem; max-width: 62ch; font-size: 0.95rem; line-height: 1.65; color: var(--mute); }
.tech-block p:last-child { margin-bottom: 0; }
.tech-code {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--ink);
  color: var(--dark-ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
}
.tech-list { margin: 0 0 0.85rem; padding: 0 0 0 1.1rem; font-size: 0.95rem; line-height: 1.65; color: var(--mute); }
.tech-list li { margin-bottom: 0.45rem; }
.tech-list strong { color: var(--ink); }

/* ---------- the three regimes ---------------------------------------- */

.regimes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.regimes-dark { background: var(--dark-panel); border-color: var(--dark-line); color: var(--dark-ink); }
.regimes > div { display: grid; gap: 0.35rem; padding: 1.1rem 1rem; border-right: 2px solid var(--ink); }
.regimes-dark > div { border-right-color: var(--dark-line); }
.regimes > div:last-child { border-right: 0; }
.r-name { font-family: var(--pixel); font-size: 0.7rem; }
.r-rule { font-size: 0.8rem; color: var(--blue); }
.r-split { margin-top: 0.35rem; font-size: 1.25rem; font-weight: 700; }
.r-note { font-size: 0.75rem; color: var(--mute); }
.regimes-dark .r-note { color: var(--dark-mute); }

/* ---------- links ------------------------------------------ */

.prog-id {
  display: block;
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.8vw, 0.9rem);
  line-height: 1.6;
  word-break: break-all;
  cursor: pointer;
}
.prog-id:hover { color: var(--blue); }

.link-rail { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-family: var(--pixel); font-size: 0.65rem; }
.link-rail a { padding-bottom: 2px; border-bottom: 2px solid; }
.link-rail a:hover { color: var(--blue); }

.end-phrase { max-width: 16ch; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem var(--pad) 1.75rem;
  font-family: var(--pixel);
  font-size: 0.72rem;
  color: var(--mute);
}

/* ---------- narrow --------------------------------------------------- */

@media (width <= 820px) {
  .regimes, .ledger-rows li { grid-template-columns: 1fr; }
  .calc-sub { margin-left: 0; }
  .regimes > div { border-right: 0; border-bottom: 2px solid var(--ink); }
  .regimes > div:last-child { border-bottom: 0; }
  .regimes-dark > div { border-bottom-color: var(--dark-line); }
  .ledger-rows .n { text-align: left; }
  .nav { background: rgba(242, 246, 251, 0.9); }
  .plain-list li > div, .thesis-grid { min-width: 0; }
  .calc-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .calc-out { text-align: left; }
}

@media (width <= 440px) {
  .nav { align-items: flex-start; }
  .nav-brand { font-size: 0.72rem; }
  .nav-links { gap: 0.3rem 0.7rem; font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-plate { animation: none; }
  .btn:hover:not(:disabled) { translate: none; }
}

/* =====================================================================
   pools-only adjustments — the small set that separates this from the
   snowball skeleton it was built on. Delete this block and you are back
   to the base exactly.
   ===================================================================== */

/* 1. panels are rounded. snowball is all hard 90-degree boxes. */
.ledger,
.calc,
.proj-wrap,
.regimes,
.tech { border-radius: 14px; overflow: hidden; }

/* the tech block's internal rules shouldn't fight the rounded shell */
.tech-block:first-child { border-top: 0; }

/* 2. buttons soften to match, without going full pill */
.btn { border-radius: 8px; }

/* 3. the headline figures live in .tiles at the top of the ledger */


/* 4. the boot sequence — see the block at the very bottom */

/* =====================================================================
   the boot sequence
   ===================================================================== */

.boot {
  position: absolute;
  left: var(--pad);
  bottom: clamp(1.5rem, 6vh, 3.5rem);
  z-index: 3;
  font-family: var(--pixel);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  transition: opacity 0.3s ease;
}
.boot.done { opacity: 0; pointer-events: none; }

.boot-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.42rem; }
.boot-lines li {
  display: grid;
  grid-template-columns: 8.5rem auto;
  gap: 0.9rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.boot-lines li.in { opacity: 1; transform: none; }
.bk { color: var(--mute); }
.bv { color: var(--blue); }
.bv.ok   { color: var(--live); }
.bv.warn { color: #b07a2e; }

.boot-done {
  margin: 0.85rem 0 0;
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.boot-done.in { opacity: 1; transform: none; }

/* The plate is held back until the fill actually finishes, not on a timer
   that would drift if BOOT_MS changed.

   A TRANSITION, not a keyframe animation, deliberately. An animation
   overrides the element while running, so if it ever stalls the hero copy
   is stranded at opacity 0 — wordmark, claim and buttons all invisible. A
   transition cannot do that: if it does not run, the property is already
   at its final value. It also defaults to VISIBLE, so a dead script leaves
   the copy on the page rather than hiding it. */
.hero-plate.pending { opacity: 0; transform: translateY(14px); }
.hero-plate.up { opacity: 1; transform: none; }
.hero-plate { transition: opacity 0.55s ease, transform 0.55s ease; }

@media (width <= 640px) {
  .boot-lines li { grid-template-columns: 7rem auto; gap: 0.6rem; }
  .boot { font-size: 0.56rem; }
}

@media (prefers-reduced-motion: reduce) {
  .boot { display: none; }
  .hero-plate { transition: none; }
  .hero-plate.pending { opacity: 1; transform: none; }
}

/* ---------- the glossary ------------------------------------------------ */

.gloss {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0;
  margin: 0;
  border-top: 2px solid var(--ink);
}
.gloss dt {
  padding: 0.85rem 0.9rem 0.85rem 0;
  border-bottom: 1px solid #ccd7e4;
  font-family: var(--pixel);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--blue);
}
.gloss dd {
  margin: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ccd7e4;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--mute);
}
.gloss dt:last-of-type, .gloss dd:last-of-type { border-bottom: 0; }

@media (width <= 640px) {
  .gloss { grid-template-columns: 1fr; }
  .gloss dt { padding-bottom: 0.2rem; border-bottom: 0; }
  .gloss dd { padding-top: 0.15rem; }
}

/* the setting the pool is actually in, lit */
.regimes > div.on { background: rgba(47, 137, 186, 0.16); }
.regimes-dark > div.on { background: rgba(127, 198, 234, 0.14); }
.regimes > div.on .r-name { color: var(--blue); }
.regimes-dark > div.on .r-name { color: #7cc6ea; }

/* =====================================================================
   craft pass — the details that make it read as built rather than
   assembled. Each block is independent; delete any one of them and
   nothing else breaks.
   ===================================================================== */

/* ---- the waterline divider -------------------------------------------
   A flat 3px rule is a rule. Two rows — solid, then a dashed row beneath —
   reads as the pixel water edge the hero is drawn in. */
.strip { position: relative; }
.strip::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background-image: repeating-linear-gradient(90deg, var(--blue) 0 3px, transparent 3px 6px);
  opacity: 0.5;
  pointer-events: none;
}

/* ---- scroll gauge: the page itself has a depth ------------------------ */
.gauge {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 5px;
  z-index: 60;
  background: rgba(22, 36, 58, 0.07);
  pointer-events: none;
}
.gauge-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  background: linear-gradient(var(--blue), #7cc6ea);
}
.gauge-tick {
  position: absolute; left: 0; width: 100%; height: 1px;
  background: rgba(22, 36, 58, 0.16);
}

/* ---- nav: which section you are in ------------------------------------ */
.nav-links a { position: relative; padding-bottom: 2px; }
.nav-links a.on { color: var(--blue); }
.nav-links a.on::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--blue);
}

/* ---- the ledger's headline tiles -------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 2px solid var(--ink);
}
.tile {
  display: grid; gap: 0.3rem; align-content: start;
  padding: 1.15rem 0.95rem;
  border-right: 2px solid var(--ink);
}
.tile:last-child { border-right: 0; }
.tile-k { font-family: var(--pixel); font-size: 0.55rem; letter-spacing: 0.08em; color: var(--mute); }
.tile-v {
  font-size: clamp(1.25rem, 3.6vw, 1.85rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--blue);
}
.tile-n { font-size: 0.7rem; color: var(--mute); }

/* ---- the depth trace --------------------------------------------------- */
.trace {
  margin-top: 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
}
.trace-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--ink);
  font-family: var(--pixel); font-size: 0.55rem; letter-spacing: 0.08em;
}
.trace-sub { margin-left: auto; font-family: var(--mono); letter-spacing: 0; color: var(--mute); font-size: 0.72rem; }
.trace-canvas { display: block; width: 100%; height: 110px; }
.trace-foot { margin: 0; padding: 0.55rem 0.9rem; border-top: 1px solid #ccd7e4; font-size: 0.75rem; color: var(--mute); }

/* ---- the trade calculator ---------------------------------------------- */
.tradebox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.2rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
}
.tradebox label { display: grid; gap: 0.45rem; font-family: var(--pixel); font-size: 0.58rem; letter-spacing: 0.06em; }
.tradebox .row { display: flex; align-items: center; gap: 0.5rem; }
.tradebox .cur { font-size: 1.3rem; font-weight: 700; color: var(--mute); }
.tradebox input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}
.tradebox input:focus { outline: 3px solid rgba(47, 137, 186, 0.35); outline-offset: 1px; }
.trade-out { display: grid; gap: 0.25rem; text-align: right; }
.trade-big { font-family: var(--pixel); font-size: clamp(1.1rem, 3.4vw, 1.6rem); color: var(--blue); }
.trade-note { font-size: 0.75rem; color: var(--mute); }

/* ---- the footer --------------------------------------------------------- */
.site-foot {
  padding: clamp(2.5rem, 7vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
  background: var(--ink);
  color: #9fb2c8;
  border-top: 3px solid var(--blue);
}
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.foot-col h4 {
  margin: 0 0 0.8rem;
  font-family: var(--pixel); font-size: 0.6rem; letter-spacing: 0.08em;
  color: var(--paper);
}
.foot-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; font-size: 0.85rem; }
.foot-col a:hover { color: #7cc6ea; text-decoration: underline; text-underline-offset: 3px; }
.foot-note {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dark-line);
  font-size: 0.78rem;
  line-height: 1.7;
  max-width: 62ch;
}
.foot-tick { font-family: var(--pixel); font-size: 0.6rem; letter-spacing: 0.08em; color: var(--paper); }

/* ---- focus, everywhere -------------------------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (width <= 820px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { border-right: 0; border-bottom: 2px solid var(--ink); }
  .tile:last-child { border-bottom: 0; }
  .tradebox { grid-template-columns: 1fr; }
  .trade-out { text-align: left; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .gauge { width: 3px; }
}

/* =====================================================================
   polish pass — icons, motion, micro-detail. Each block independent.
   ===================================================================== */

/* ---- the pixel icon system --------------------------------------------
   One 12x12 glyph per section, drawn in the same idiom as the hero. */
.ph-ic { display: block; margin-bottom: 0.9rem; color: var(--blue); }
.ph-ic svg { display: block; width: 28px; height: 28px; }
.strip-ink .ph-ic { color: #7cc6ea; }

/* ---- the big drain sign ------------------------------------------------ */
.drain-big {
  float: right;
  width: clamp(84px, 14vw, 128px);
  margin: 0 0 1.25rem 1.75rem;
  color: var(--bad);
}
.drain-big svg { display: block; width: 100%; height: auto; }
#drain .wrap::after { content: ""; display: block; clear: both; }

/* ---- the nav live chip ------------------------------------------------- */
.nav-left { display: flex; align-items: center; gap: 0.85rem; }
.nav-live {
  padding: 0.22rem 0.6rem;
  border: 2px solid var(--blue);
  border-radius: 999px;
  font-size: 0.68rem;
  color: var(--blue);
  white-space: nowrap;
}
@media (width <= 700px) { .nav-live { display: none; } }

/* ---- depth trend on the headline tile ---------------------------------- */
.tile-trend { font-family: var(--pixel); font-size: 0.55rem; letter-spacing: 0.04em; }
.tile-trend.up   { color: var(--live); }
.tile-trend.down { color: var(--bad); }
.tile-trend.flat { color: var(--mute); }

/* ---- scroll reveal ------------------------------------------------------
   The attribute is only ever added by JS, so a dead script leaves every
   section visible. Same fail-open rule as the hero plate. */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ---- texture on the dark bands ----------------------------------------- */
.strip-ink {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.6px, transparent 0.6px);
  background-size: 10px 10px;
}

/* ---- rows that respond ------------------------------------------------- */
.proj tbody tr:hover td { background: rgba(47, 137, 186, 0.07); }
.ledger-rows li { transition: background 0.12s ease; }
.ledger-rows li:hover { background: rgba(47, 137, 186, 0.05); }

/* ---- the footer wave ---------------------------------------------------- */
.foot-wave {
  height: 14px;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(90deg, var(--blue) 0 10px, transparent 10px 20px),
    repeating-linear-gradient(90deg, transparent 0 6px, #7cc6ea 6px 16px, transparent 16px 20px);
  background-size: 20px 3px, 20px 3px;
  background-position: 0 2px, 10px 9px;
  background-repeat: repeat-x, repeat-x;
}

/* ---- small crafts -------------------------------------------------------- */
::selection { background: var(--blue); color: #fff; }

.proj-wrap { scrollbar-color: var(--blue) #dce6f0; }
.proj-wrap::-webkit-scrollbar { height: 10px; }
.proj-wrap::-webkit-scrollbar-track { background: #dce6f0; }
.proj-wrap::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
