/* ============================================================================
   VITALS — clinical luminescence
   Deep ink ground, instrument-panel grid, one warm signal + one cool signal.
   Type: Fraunces (display serif) / Spline Sans Mono (data + UI).
   ============================================================================ */

/* -------- DARK THEME (default) -------- */
:root, :root[data-theme="dark"] {
  --ink:        #07090c;
  --ink-2:      #0c1014;
  --panel:      #0f151b;
  --line:       #1c252e;
  --line-soft:  #141b22;
  --fog:        #6d7d8a;
  --fog-2:      #93a4b1;
  --bone:       #e8ebe4;

  --risk:       #ff5a3c;   /* warm signal — elevated / atherogenic */
  --risk-glow:  rgba(255, 90, 60, 0.55);
  --good:       #34e0c4;   /* cool signal — optimal / improving */
  --good-glow:  rgba(52, 224, 196, 0.45);
  --gold:       #e9c46a;   /* neutral accent — totals */

  /* theme-dependent compositing */
  --scrim:        radial-gradient(80% 70% at 30% 50%, rgba(7,9,12,0.72) 0%, transparent 70%),
                  linear-gradient(180deg, rgba(7,9,12,0.4) 0%, transparent 30%, var(--ink) 96%);
  --vignette:     radial-gradient(120% 120% at 50% 0%, transparent 55%, rgba(0,0,0,0.55) 100%);
  --vignette-blend: multiply;
  --grain-opacity: 0.30;
  --tip-bg:       rgba(7,9,12,0.92);
  --panel-grad:   linear-gradient(180deg, var(--panel), var(--ink-2));
  --sel-text:     var(--ink);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --serif: "Fraunces", Georgia, serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
}

/* -------- LIGHT THEME -------- */
/* Paper-white clinical chart aesthetic. Signal colors are darkened a touch so
   they hold contrast on a bright ground; the cool "good" goes deeper teal. */
:root[data-theme="light"] {
  --ink:        #f4f1ea;   /* warm paper ground */
  --ink-2:      #eceae1;
  --panel:      #fbfaf6;
  --line:       #d3cec1;
  --line-soft:  #e3dfd4;
  --fog:        #8a8576;
  --fog-2:      #5f5b50;
  --bone:       #16140f;   /* near-black ink for text */

  --risk:       #e0341c;
  --risk-glow:  rgba(224, 52, 28, 0.30);
  --good:       #0f9c86;
  --good-glow:  rgba(15, 156, 134, 0.28);
  --gold:       #b88410;

  --scrim:        radial-gradient(80% 70% at 30% 50%, rgba(244,241,234,0.55) 0%, transparent 70%),
                  linear-gradient(180deg, rgba(244,241,234,0.3) 0%, transparent 35%, var(--ink) 96%);
  --vignette:     radial-gradient(120% 120% at 50% 0%, transparent 60%, rgba(120,110,90,0.10) 100%);
  --vignette-blend: normal;
  --grain-opacity: 0.45;
  --tip-bg:       rgba(251,250,246,0.95);
  --panel-grad:   linear-gradient(180deg, var(--panel), #f3f1ea);
  --sel-text:     #fbfaf6;
}

/* smooth cross-fade when toggling */
body, .panel, .marker, .strip .cell, .chip, .tip, .cursor,
.sec-head, .ticker, .sidenav a, footer { transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 2rem; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

/* film grain (under the vignette) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 199;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: calc(var(--grain-opacity) * 0.18);
  mix-blend-mode: overlay;
}

/* vignette overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background: var(--vignette);
  mix-blend-mode: var(--vignette-blend);
}

::selection { background: var(--risk); color: var(--sel-text); }

/* ===========================================================================
   PRELOADER
   =========================================================================== */
#loader {
  position: fixed; inset: 0;
  z-index: 400;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform .85s var(--ease-io), visibility 0s .85s;
}
#loader.done { transform: translateY(-101%); visibility: hidden; }
.loader-inner {
  width: min(340px, 72vw);
  display: flex; flex-direction: column; gap: 1.2rem;
}
.loader-ecg { width: 100%; height: 64px; overflow: visible; }
.loader-ecg path {
  fill: none;
  stroke: var(--good);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 10px var(--good-glow));
}
.loader-row {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: .9rem;
}
.loader-name {
  font-size: .66rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--fog-2);
}
.loader-pct { font-family: var(--serif); font-size: 1.5rem; color: var(--bone); line-height: 1; }

/* ===========================================================================
   FIXED CHROME — progress hairline, brand, theme toggle, side nav, cursor
   =========================================================================== */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 260;
  pointer-events: none;
}
.progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--good), var(--gold), var(--risk));
  transform-origin: left center;
  transform: scaleX(var(--scroll, 0));
}

.brand {
  position: fixed;
  top: clamp(1.15rem, 3vw, 1.95rem);
  left: clamp(1rem, 3vw, 1.8rem);
  z-index: 250;
  font-size: .62rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--fog-2);
  text-decoration: none;
  transition: color .3s;
}
.brand:hover { color: var(--bone); }

.theme-toggle {
  position: fixed;
  top: clamp(1rem, 3vw, 1.8rem);
  right: clamp(1rem, 3vw, 1.8rem);
  z-index: 250;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .5rem .8rem .5rem .65rem;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--fog-2);
  font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color .3s, color .3s, background-color .3s;
}
.theme-toggle:hover { border-color: var(--fog); color: var(--bone); }
.theme-toggle .tt-icon {
  position: relative;
  width: 16px; height: 16px; flex: 0 0 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  overflow: hidden;
  transition: background-color .4s var(--ease);
}
/* the dot's inner shadow flips to suggest sun (filled) vs moon (crescent) */
.theme-toggle .tt-icon::after {
  content: ""; position: absolute; inset: -1.5px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px currentColor;
  transition: transform .45s var(--ease), opacity .3s;
}
/* dark theme active -> show crescent (moon) */
:root[data-theme="dark"] .theme-toggle .tt-icon::after,
:root:not([data-theme]) .theme-toggle .tt-icon::after { transform: translate(5px, -5px); }
/* light theme active -> filled (sun) */
:root[data-theme="light"] .theme-toggle .tt-icon::after { transform: translate(0,0); }
.theme-toggle .tt-label::before { content: "Dark"; }
:root[data-theme="light"] .theme-toggle .tt-label::before { content: "Light"; }

.sidenav {
  position: fixed;
  left: clamp(1rem, 2.4vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 240;
  display: flex; flex-direction: column; gap: 1.15rem;
}
.sidenav a {
  display: flex; align-items: center; gap: .65rem;
  color: var(--fog);
  text-decoration: none;
  font-size: .58rem; letter-spacing: .28em; text-transform: uppercase;
}
.sidenav i {
  width: 16px; height: 1px;
  background: currentColor;
  transition: width .35s var(--ease), background-color .35s;
}
.sidenav span {
  opacity: 0; transform: translateX(-6px);
  transition: opacity .3s, transform .3s var(--ease);
}
.sidenav a:hover { color: var(--fog-2); }
.sidenav a:hover span, .sidenav a.on span { opacity: 1; transform: none; }
.sidenav a.on { color: var(--bone); }
.sidenav a.on i { width: 34px; background: var(--risk); }
@media (max-width: 1259px) { .sidenav { display: none; } }

/* ---- custom cursor dot ---------------------------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  pointer-events: none; z-index: 300;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .25s var(--ease), height .25s var(--ease), background .25s;
}
.cursor.hot { width: 38px; height: 38px; background: var(--risk); }
@media (hover: none) { .cursor { display: none; } }

/* ---- type scale ----------------------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1; }
.display {
  font-size: clamp(3.4rem, 13vw, 11.5rem);
  letter-spacing: -0.04em;
  line-height: .96;
  font-weight: 300;
}
.display em { font-style: italic; font-variation-settings: "SOFT" 60; color: var(--risk); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--fog);
}

.mono-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.tint-good { color: var(--good); }

/* ---- layout shell --------------------------------------------------------- */
.wrap { width: min(1180px, 92vw); margin-inline: auto; }
section { position: relative; }

/* ===========================================================================
   HERO
   =========================================================================== */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5.5rem;
}
#bloodstream {
  position: absolute; inset: 0;
  z-index: 0;
}
#hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: var(--scrim);
  pointer-events: none;
}
.hero-ecg {
  position: absolute; left: 0; right: 0;
  top: 52%;
  width: 100%;
  height: clamp(70px, 11vw, 140px);
  z-index: 1;
  opacity: .55;
  pointer-events: none;
}
.hero-ecg path {
  fill: none;
  stroke: var(--good);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px var(--good-glow));
}
#hero .wrap { position: relative; z-index: 2; }

.hero-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 2.4rem;
}
.hero-title { position: relative; }

.hero-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 2rem 3rem;
  margin-top: 2.6rem;
}
.hero-sub {
  max-width: 36ch;
  color: var(--fog-2);
  font-size: clamp(0.88rem, 1.6vw, 1.02rem);
  line-height: 1.7;
}
.hero-stats { display: flex; gap: clamp(1.4rem, 3vw, 2.6rem); flex-wrap: wrap; }
.hs {
  position: relative;
  display: flex; flex-direction: column; gap: .2rem;
  padding-left: .95rem;
}
.hs::before {
  content: ""; position: absolute; left: 0; top: .25rem; bottom: .25rem;
  width: 1px; background: var(--line);
}
.hs-k { font-size: .6rem; letter-spacing: .26em; text-transform: uppercase; color: var(--fog); }
.hs-v { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1; font-weight: 300; }
.hs-v.risk { color: var(--risk); }
.hs-v.good { color: var(--good); }
.hs-u { font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fog); display: inline-flex; align-items: center; gap: .4rem; }
.hs-u .pulse {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  animation: blink 1.7s ease-in-out infinite;
}
.hs-u.risk { color: var(--risk); }
.hs-u.good { color: var(--good); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }

.hero-scroll {
  position: absolute; bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.66rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--fog); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.hero-scroll .bar { width: 1px; height: 46px; background: linear-gradient(var(--fog), transparent); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* reveal mask for hero headline lines */
.line-mask { overflow: hidden; display: block; }
.line-mask > span { display: block; will-change: transform; }

/* ===========================================================================
   DATA TICKER
   =========================================================================== */
.ticker {
  position: relative;
  z-index: 2;
  border-block: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--ink-2) 65%, transparent);
  overflow: hidden;
  padding: .85rem 0;
}
.ticker-track { display: flex; width: max-content; will-change: transform; animation: tick 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-half { display: flex; }
@keyframes tick { to { transform: translateX(-50%); } }
.tk {
  display: inline-flex; align-items: baseline; gap: .55rem;
  margin-right: 3.4rem;
  font-size: .68rem; letter-spacing: .12em;
  white-space: nowrap;
}
.tk-k { color: var(--fog); text-transform: uppercase; letter-spacing: .24em; font-size: .6rem; }
.tk-v { font-family: var(--serif); font-size: 1.05rem; line-height: 1; }
.tk-v.risk { color: var(--risk); }
.tk-v.good { color: var(--good); }
.tk-v.neutral { color: var(--gold); }
.tk-u { color: var(--fog); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; }
.tk-d { font-size: .58rem; }
.tk-d.risk { color: var(--risk); }
.tk-d.good { color: var(--good); }
.tk::after {
  content: "·";
  color: var(--line);
  margin-left: 3.4rem;
  align-self: center;
}

/* ===========================================================================
   SECTION HEADERS — ghost numeral behind a masked title
   =========================================================================== */
.sec-head {
  position: relative;
  padding: clamp(6rem, 12vw, 9.5rem) 0 3rem;
  border-bottom: 1px solid var(--line-soft);
}
.sec-ghost {
  position: absolute;
  top: clamp(1.4rem, 4vw, 2.6rem);
  right: -0.04em;
  z-index: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(8rem, 21vw, 17rem);
  line-height: .72;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  pointer-events: none;
  user-select: none;
}
.sec-kicker { position: relative; z-index: 1; margin-bottom: 1.2rem; }
.sec-title {
  position: relative; z-index: 1;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: -0.03em;
}
/* word-mask spans injected by JS */
.sec-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .1em; margin-bottom: -.1em; }
.sec-title .w > span { display: inline-block; will-change: transform; }
.sec-desc { position: relative; z-index: 1; max-width: 60ch; color: var(--fog-2); font-size: 0.92rem; margin-top: 1rem; }
.sec-head .headline { position: relative; z-index: 1; color: var(--good); font-size: 0.82rem; letter-spacing: 0.04em; margin-top: .7rem; }
.sec-head .headline.warn { color: var(--risk); }

/* ===========================================================================
   CHART PANEL
   =========================================================================== */
.panel {
  position: relative;
  margin: 3.5rem 0 6rem;
  padding: 2.2rem clamp(1rem, 3vw, 2.6rem) 2.6rem;
  background: var(--panel-grad);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.panel:hover {
  border-color: color-mix(in srgb, var(--fog) 35%, var(--line));
  box-shadow: 0 24px 60px -42px var(--good-glow);
}
.panel::before { /* corner ticks */
  content: ""; position: absolute; inset: 10px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--line), var(--line)) top left / 14px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) top left / 1px 14px no-repeat,
    linear-gradient(var(--line), var(--line)) top right / 14px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) top right / 1px 14px no-repeat,
    linear-gradient(var(--line), var(--line)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--line), var(--line)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) bottom right / 1px 14px no-repeat;
  pointer-events: none;
  z-index: 2;
}
/* scanline sweep, triggered once when the chart draws in */
.panel::after {
  content: "";
  position: absolute; left: 0; right: 0; top: -45%;
  height: 40%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--good) 6%, transparent), transparent);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}
.panel.scanned::after { animation: scan 1.4s var(--ease) 1 forwards; }
@keyframes scan {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(380%); opacity: 0; }
}

.panel-head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: .8rem 1.4rem;
  margin-bottom: 1.4rem;
}
.panel-head h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.panel-unit { font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--fog); }

/* legend / series toggles */
.legend { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: .32rem .7rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--fog-2);
  background: transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
  transition: border-color .25s, color .25s, opacity .25s;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip .chip-label { color: var(--bone); }
.chip[aria-pressed="false"] { opacity: 0.35; }
.chip:hover { border-color: var(--fog); }

.chart-shell { position: relative; width: 100%; }
.chart-shell svg { width: 100%; height: auto; display: block; overflow: visible; }

/* tooltip */
.tip {
  position: absolute; z-index: 20;
  pointer-events: none;
  background: var(--tip-bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .55rem .7rem;
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0; transform: translate(-50%, -118%);
  transition: opacity .15s;
  backdrop-filter: blur(4px);
}
.tip.show { opacity: 1; }
.tip .t-date { color: var(--fog); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; }
.tip .t-val b { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; }

/* svg primitives */
.grid-line { stroke: var(--line-soft); stroke-width: 1; }
.axis-label { fill: var(--fog); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; }
.target-line { stroke-dasharray: 3 5; stroke-width: 1; }
.target-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; }
.series-path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px currentColor); }
.series-dot { stroke: var(--ink); stroke-width: 1.5; cursor: pointer; transition: r .15s; }
.series-halo { cursor: pointer; }
.series-area { opacity: 0.10; }
.xhair { stroke: var(--fog); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0; pointer-events: none; transition: opacity .2s; }

/* compact (mobile) chart rendering — bigger user-unit type so labels stay legible */
svg.compact .axis-label { font-size: 15px; }
svg.compact .target-tag { font-size: 13px; }
svg.compact .series-path { stroke-width: 2.4; }
svg.compact .grid-line { stroke-width: 0.8; }

/* particle marker cards (ApoB / Lp(a) / Non-HDL) */
.markers-note { margin-bottom: 1.4rem; }
.markers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-top: 0; }
.marker {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--ink-2);
  overflow: hidden;
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.marker:hover { border-color: color-mix(in srgb, var(--risk) 45%, var(--line)); transform: translateY(-3px); }
.marker .ring { position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; }
.marker .m-label { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--fog); }
.marker .m-val { font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1; margin: .5rem 0 .2rem; color: var(--risk); }
.marker .m-unit { font-size: 0.72rem; color: var(--fog-2); }
.marker .m-note { font-size: 0.74rem; color: var(--fog-2); margin-top: .9rem; line-height: 1.55; max-width: 28ch; }
.marker .m-flag { position: absolute; top: 1.4rem; right: 1.4rem; font-size: 0.6rem; letter-spacing: 0.2em; color: var(--risk); border: 1px solid var(--risk); padding: .15rem .45rem; border-radius: 2px; }

/* ===========================================================================
   STAT STRIP (between sections)
   =========================================================================== */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line);
  margin: 4rem 0;
}
.strip .cell {
  background: var(--ink);
  padding: 1.8rem 1.4rem;
  transition: background-color .35s var(--ease);
}
.strip .cell:hover { background: var(--ink-2); }
.strip .s-val { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.strip .s-val .s-suf { font-size: 1.4rem; }
.strip .s-val.up { color: var(--good); }
.strip .s-val.down { color: var(--risk); }
.strip .s-key { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fog); margin-top: .6rem; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
footer {
  padding: 8rem 0 3rem;
  border-top: 1px solid var(--line);
  margin-top: 6rem;
}
.foot-kicker { margin-bottom: 2rem; }
.foot-big {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 9.5vw, 7.4rem);
  letter-spacing: -0.03em;
  line-height: .98;
  max-width: 14ch;
}
.foot-big .tw { display: inline-block; }
.foot-big .twr { font-style: italic; color: var(--risk); }
.foot-grid {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 2rem;
  margin-top: 3.4rem;
}
.foot-meta { font-size: 0.72rem; color: var(--fog); max-width: 44ch; line-height: 1.7; }
.to-top {
  font-family: var(--mono);
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--fog-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: .75rem 1.4rem;
  cursor: pointer;
  transition: border-color .3s, color .3s, transform .3s var(--ease);
}
.to-top:hover { border-color: var(--fog); color: var(--bone); transform: translateY(-2px); }
.foot-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem 2rem;
  border-top: 1px solid var(--line-soft);
  margin-top: 4.5rem;
  padding-top: 1.4rem;
  font-size: .6rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--fog);
}

/* reveal utility (GSAP toggles .in) */
[data-reveal] { opacity: 0; transform: translateY(28px); }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 720px) {
  .sec-head { padding-top: 5.5rem; }
  .sec-ghost { font-size: clamp(6.5rem, 26vw, 9rem); top: 1.6rem; }
  .panel { padding: 1.6rem .9rem 1.9rem; margin: 2.6rem 0 4.5rem; }
  .panel::before { inset: 6px; }
  .panel-head h3 { font-size: 1.2rem; }
  .hero-meta { gap: .4rem; margin-bottom: 1.8rem; flex-direction: column; }
  .hero-meta .eyebrow { font-size: .6rem; letter-spacing: .3em; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1.8rem; margin-top: 2rem; }
  .hero-scroll { display: none; }
  .hero-ecg { top: 56%; }
  .theme-toggle .tt-label { display: none; }
  .theme-toggle { padding: .55rem; }
  .tk { margin-right: 2.2rem; }
  .tk::after { margin-left: 2.2rem; }
  .strip { margin: 3rem 0; }
  footer { padding-top: 5.5rem; }
  .foot-grid { margin-top: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .ticker-track { animation: none !important; }
  #loader { display: none; }
}
