/* =====================================================================
   MONTY FATHOM — "Pressure Deco" design system
   Shared by every page. Tokens first, then base, layout, components.
   Live at 4,000 m. Do not tap the glass.
   ===================================================================== */

:root {
  color-scheme: dark;

  /* water column */
  --bg-0: #01060b;
  --bg-1: #041320;
  --bg-2: #08202f;
  --bg-3: #0d2c3f;

  /* ink */
  --ink: #e8f2f5;
  --ink-2: #a9c4cc;
  --ink-3: #6f8f99;
  --ink-4: #46616b;

  /* brass + bioluminescence */
  --gold: #e6c069;
  --gold-hi: #f7e3a4;
  --gold-deep: #9c7a33;
  --bio: #46e3cb;
  --bio-dim: #1aa892;
  --coral: #ef6f5e;
  --violet: #9a85f0;

  /* chart system (validated: dark, surface #0a1c29, all checks pass) */
  --chart-surface: #0a1c29;
  --s1: #1aa892; /* teal    */
  --s2: #b8862a; /* brass   */
  --s3: #8670e6; /* violet  */
  --s4: #e2594a; /* coral   */
  --s5: #3a88db; /* blue    */
  --s6: #c9548c; /* magenta */
  --grid: #16303f;
  --axis: #24485a;
  --muted: #6f8f99;

  /* status (reserved, never a series) */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  /* surfaces */
  --glass: rgba(9, 27, 40, 0.58);
  --glass-2: rgba(14, 38, 54, 0.72);
  --line: rgba(230, 192, 105, 0.22);
  --line-2: rgba(230, 192, 105, 0.42);
  --hair: rgba(160, 205, 220, 0.12);
  --hair-2: rgba(160, 205, 220, 0.22);

  /* type */
  --f-display: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --f-sans: 'Geist', 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --f-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* geometry */
  --w: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
  --ticker-h: 34px;
  --r: 18px;
  --r-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* set by abyss.js: 0 at the surface, 1 at the bottom of the page */
  --depth: 0;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--nav-h) + var(--ticker-h) + 24px); }
body {
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #1a1205; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* the water: deepens as you scroll (index), fixed behind everything */
.abyss-water {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(140% 70% at 50% -10%,
      color-mix(in oklab, #1f6f93 calc((1 - var(--depth)) * 70%), transparent) 0%,
      transparent 60%),
    radial-gradient(90% 60% at 80% 110%, rgba(22, 92, 104, .16), transparent 60%),
    linear-gradient(180deg,
      color-mix(in oklab, #0b3550 calc((1 - var(--depth)) * 100%), var(--bg-1)) 0%,
      var(--bg-1) 45%,
      var(--bg-0) 100%);
  transition: background .2s linear;
}
.abyss-snow { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.abyss-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px 420px at var(--mx, 50%) var(--my, 30%), rgba(70, 227, 203, .07), transparent 70%);
}
/* grain + vignette */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 900; pointer-events: none;
  background: radial-gradient(120% 95% at 50% 45%, transparent 55%, rgba(0, 3, 7, .6) 100%);
}
body::after {
  content: ''; position: fixed; inset: -50%; z-index: 901; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); }
}

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); }
main { position: relative; padding-top: calc(var(--nav-h) + var(--ticker-h)); }
.section { position: relative; padding: clamp(80px, 12vw, 160px) 0; }
.section-tight { padding: clamp(56px, 8vw, 96px) 0; }
.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-12 > * { grid-column: span 12; }
}
@media (max-width: 720px) {
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
}
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------ typography */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: ''; width: 7px; height: 7px; transform: rotate(45deg);
  border: 1px solid var(--gold); box-shadow: 0 0 12px rgba(230, 192, 105, .6);
}
.eyebrow .num { color: var(--ink-3); }
.h-mega {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(4rem, 15.5vw, 15rem); line-height: .82; letter-spacing: -.035em;
}
.h-display {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.8rem, 7.4vw, 7rem); line-height: .92; letter-spacing: -.025em;
}
.h-1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.2rem, 4.8vw, 4.4rem); line-height: 1; letter-spacing: -.02em;
}
.h-2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.012em;
}
.h-3 { font-family: var(--f-sans); font-weight: 600; font-size: 1.12rem; letter-spacing: -.01em; line-height: 1.3; }
.h-mega em, .h-display em, .h-1 em, .h-2 em { font-style: italic; color: var(--gold-hi); }
.lede { font-size: clamp(1.05rem, 1.45vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.body-2 { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; }
.mono { font-family: var(--f-mono); }
.caps { text-transform: uppercase; letter-spacing: .16em; }
.dim { color: var(--ink-3); }
.gold { color: var(--gold); }
.bio { color: var(--bio); }
.coral { color: var(--coral); }
.serif { font-family: var(--f-display); }
.italic { font-style: italic; }
.shimmer {
  background: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold-hi) 30%, #fff8e1 45%, var(--gold) 60%, var(--gold-deep) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s var(--ease) infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -150% 0; } }
.outline-text { color: transparent; -webkit-text-stroke: 1px rgba(230, 192, 105, .55); }

/* ------------------------------------------------------------------- nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(3, 12, 20, .88);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--hair);
}
.nav .wrap-wide { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--f-display); font-size: 1.32rem; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.brand-name small { display: block; font-family: var(--f-mono); font-size: 9px; letter-spacing: .3em; color: var(--ink-3); margin-top: 3px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 13.5px; color: var(--ink-2); transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--ink); background: rgba(160, 205, 220, .07); }
.nav-links a[aria-current="page"] { color: var(--gold-hi); }
.nav-links a[aria-current="page"]::after {
  content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 10px var(--gold);
}
.nav-tools { display: flex; align-items: center; gap: 10px; }
.depth-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(230, 192, 105, .05);
  font-family: var(--f-mono); font-size: 12px; color: var(--gold-hi); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.depth-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bio); box-shadow: 0 0 8px var(--bio); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--hair-2); color: var(--ink-2); transition: all .25s;
}
.icon-btn:hover { color: var(--gold-hi); border-color: var(--line-2); }
.icon-btn[aria-pressed="true"] { color: var(--bio); border-color: rgba(70, 227, 203, .5); box-shadow: 0 0 16px rgba(70, 227, 203, .25); }
.icon-btn svg { width: 16px; height: 16px; }
/* music playing: the speaker breathes in time with the track (~99 bpm, every two beats) */
.icon-btn.is-playing { animation: music-beat 1.212s ease-in-out infinite; }
@keyframes music-beat { 0%, 100% { box-shadow: 0 0 10px rgba(70, 227, 203, .18); } 12% { box-shadow: 0 0 22px rgba(70, 227, 203, .45); } }
.nav-menu-btn { display: none; }
@media (max-width: 1100px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(2, 10, 17, .96); backdrop-filter: blur(20px); border-bottom: 1px solid var(--hair);
    padding: 8px var(--gutter) 20px;
    clip-path: inset(0 0 100% 0); transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: clip-path .45s var(--ease-out), transform .45s var(--ease-out), opacity .3s ease, visibility 0s linear .45s;
  }
  .nav-links.open {
    clip-path: inset(0 0 0 0); transform: none; opacity: 1; visibility: visible;
    transition: clip-path .45s var(--ease-out), transform .45s var(--ease-out), opacity .2s ease, visibility 0s;
  }
  .nav-links a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--hair); font-size: 1.05rem; }
  .nav-menu-btn { display: grid; }
  .nav-tools { margin-left: auto; }
}
@media (max-width: 520px) { .depth-pill .lbl { display: none; } .brand-name small { display: none; } }

/* ---------------------------------------------------------------- ticker */
.ticker {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 790; height: var(--ticker-h);
  overflow: hidden; display: flex; align-items: center;
  background: rgba(3, 13, 21, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--ink-3);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track { display: flex; gap: 0; white-space: nowrap; animation: marquee 90s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; }
.ticker-item b { color: var(--ink); font-weight: 500; }
.ticker-item .up { color: var(--bio); }
.ticker-item .dn { color: var(--coral); }
.ticker-item .flat { color: var(--gold); }
.ticker-item::after { content: '◆'; color: var(--gold-deep); font-size: 8px; margin-left: 22px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ------------------------------------------------------- the depth gauge */
.gauge {
  position: fixed; left: clamp(10px, 1.6vw, 26px); top: calc(var(--nav-h) + var(--ticker-h) + 34px); bottom: 34px;
  z-index: 700; width: 56px; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-start;
}
.gauge-rail { position: relative; flex: 1; width: 1px; margin-left: 8px; background: linear-gradient(180deg, rgba(160, 205, 220, .35), rgba(230, 192, 105, .4)); }
.gauge-tick { position: absolute; left: -4px; width: 9px; height: 1px; background: var(--ink-4); }
.gauge-tick.major { left: -7px; width: 15px; background: var(--ink-3); }
.gauge-tick span {
  position: absolute; left: 20px; top: -7px; font-family: var(--f-mono); font-size: 9.5px; color: var(--ink-4);
  white-space: nowrap; letter-spacing: .04em;
}
.gauge-marker {
  position: absolute; left: -6px; width: 13px; height: 13px; transform: translateY(-50%) rotate(45deg);
  border: 1.5px solid var(--gold); background: var(--bg-0); box-shadow: 0 0 14px rgba(230, 192, 105, .7);
  transition: top .12s linear;
}
.gauge-read {
  position: absolute; left: 22px; transform: translateY(-50%);
  font-family: var(--f-mono); font-size: 11px; color: var(--gold-hi); white-space: nowrap;
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: rgba(2, 10, 17, .85);
  font-variant-numeric: tabular-nums; transition: top .12s linear;
}
.gauge-read em { display: block; font-style: normal; font-size: 8.5px; letter-spacing: .2em; color: var(--ink-3); }
@media (max-width: 1180px) { .gauge { display: none; } }

/* ---------------------------------------------------------------- cards */
.card {
  position: relative; border-radius: var(--r); padding: clamp(20px, 2.4vw, 32px);
  background: linear-gradient(180deg, rgba(14, 38, 54, .62), rgba(6, 20, 31, .62));
  border: 1px solid var(--hair);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 30px 60px -30px rgba(0, 0, 0, .7);
  transition: border-color .35s, transform .5s var(--ease-out), box-shadow .5s;
  overflow: hidden;
}
.card:hover { border-color: var(--hair-2); }
.card.gold { border-color: var(--line); }
.card.gold:hover { border-color: var(--line-2); }
.card .corner { position: absolute; width: 14px; height: 14px; border-color: var(--gold); opacity: .55; pointer-events: none; }
.card .corner.tl { top: 10px; left: 10px; border-top: 1px solid; border-left: 1px solid; }
.card .corner.tr { top: 10px; right: 10px; border-top: 1px solid; border-right: 1px solid; }
.card .corner.bl { bottom: 10px; left: 10px; border-bottom: 1px solid; border-left: 1px solid; }
.card .corner.br { bottom: 10px; right: 10px; border-bottom: 1px solid; border-right: 1px solid; }
/* spotlight that follows the cursor inside a card (abyss.js sets --cx/--cy) */
.card.spot::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--cx, 50%) var(--cy, 50%), rgba(230, 192, 105, .09), transparent 60%);
}
.card.spot:hover::before { opacity: 1; }
.card-label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.tilt { transform-style: preserve-3d; will-change: transform; }

/* ------------------------------------------------------------ stat tiles */
.stat .k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.stat .v {
  font-family: var(--f-sans); font-weight: 500; letter-spacing: -.03em; line-height: 1;
  font-size: clamp(2rem, 4vw, 3.2rem); margin: 10px 0 8px; color: var(--ink);
}
.stat .v .u { font-size: .45em; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; font-weight: 400; }
.stat .s { font-size: .82rem; color: var(--ink-3); }
.stat .s .up { color: var(--bio); } .stat .s .flat { color: var(--gold); } .stat .s .dn { color: var(--coral); }

/* --------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px;
  border-radius: 999px; font-size: 14.5px; font-weight: 500; letter-spacing: .01em;
  overflow: hidden; isolation: isolate; transition: transform .35s var(--ease-out), box-shadow .35s, border-color .3s, color .3s;
}
.btn svg { width: 16px; height: 16px; }
.btn-gold { color: #1b1305; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #c99a3e); box-shadow: 0 10px 30px -10px rgba(230, 192, 105, .55), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn-gold:hover::after { transform: translateX(120%); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(230, 192, 105, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { color: var(--ink); border: 1px solid var(--hair-2); background: rgba(160, 205, 220, .04); }
.btn-ghost:hover { border-color: var(--line-2); color: var(--gold-hi); transform: translateY(-2px); }
.btn-sm { padding: 9px 15px; font-size: 13px; }

/* ------------------------------------------------------------ tags/pills */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--hair-2); color: var(--ink-2); white-space: nowrap;
}
.tag.gold { border-color: var(--line-2); color: var(--gold-hi); }
.tag.bio { border-color: rgba(70, 227, 203, .4); color: var(--bio); }
.tag.coral { border-color: rgba(239, 111, 94, .45); color: var(--coral); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* --------------------------------------------------------- deco dividers */
.deco-rule { display: flex; align-items: center; gap: 16px; color: var(--gold); opacity: .8; }
.deco-rule::before, .deco-rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.deco-rule svg { width: 64px; height: 16px; flex-shrink: 0; }
.fan {
  /* art deco sunburst, used behind portraits */
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 180deg at 50% 100%, rgba(230, 192, 105, .16) 0deg 1.2deg, transparent 1.2deg 9deg);
  mask-image: radial-gradient(circle at 50% 100%, #000 0%, #000 40%, transparent 72%);
}

/* ------------------------------------------------------------ zone bands */
.zone-band {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
}
.zone-band b { color: var(--gold-hi); font-weight: 500; }

/* ------------------------------------------------------- charts (shared) */
.chart-card { display: flex; flex-direction: column; gap: 14px; }
.chart-card .chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.chart-card .chart-title { font-family: var(--f-sans); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.3; }
.chart-card .chart-sub { font-size: .84rem; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }
.chart-card .chart-foot { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--ink-4); line-height: 1.5; }
.chart-card .chart-foot b { color: var(--ink-3); font-weight: 500; }
.chart-plot { position: relative; width: 100%; }
.chart-plot svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-tooltip {
  position: fixed; z-index: 1000; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 14px)) scale(.96);
  transition: opacity .15s, transform .15s var(--ease-out);
  min-width: 120px; max-width: 260px; padding: 10px 12px; border-radius: 10px;
  background: rgba(4, 16, 25, .94); border: 1px solid var(--hair-2); box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
}
.viz-tooltip.on { opacity: 1; transform: translate(-50%, calc(-100% - 14px)) scale(1); }
.viz-tooltip .tt-title { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.viz-tooltip .tt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.viz-tooltip .tt-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-tooltip .tt-note { margin-top: 6px; color: var(--ink-3); font-style: italic; }
.viz-tooltip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* --------------------------------------------------------------- reveals */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(.94); }
[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal].in { opacity: 1; transform: none; }
.split .ch { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(6deg); filter: blur(8px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), filter .9s; transition-delay: calc(var(--i) * 28ms); }
.split .w { display: inline-block; white-space: nowrap; }
.split.in .ch { opacity: 1; transform: none; filter: none; }

/* ---------------------------------------------------------------- cursor */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 1100; pointer-events: none; border-radius: 50%; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold-hi); box-shadow: 0 0 10px var(--gold); }
.cursor-ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(230, 192, 105, .55); transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), border-color .3s, background .3s; }
.cursor-ring.hot { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: rgba(70, 227, 203, .7); background: rgba(70, 227, 203, .06); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
html.has-cursor input, html.has-cursor textarea { cursor: text; }

/* ----------------------------------------------------------------- toast */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 1050; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  padding: 13px 16px; border-radius: 12px; background: rgba(4, 16, 25, .95); border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .5); font-size: 13.5px; color: var(--ink-2);
  animation: toast-in .5s var(--ease-out) both;
}
.toast b { color: var(--gold-hi); font-weight: 600; display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 3px; }
.toast.out { animation: toast-out .4s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------------------------------------------------------------- footer */
.footer { position: relative; padding: clamp(80px, 12vw, 140px) 0 40px; border-top: 1px solid var(--hair); overflow: hidden; }
.footer-sign {
  font-family: var(--f-display); font-size: clamp(3rem, 11vw, 10rem); line-height: .88; letter-spacing: -.03em;
}
.footer-sign .anyway { display: block; font-style: italic; color: var(--ink-3); font-size: .42em; letter-spacing: -.01em; margin-bottom: .2em; }
/* official contract + socials (footer, every page) */
.footer-official { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); margin-top: 56px; align-items: stretch; }
.fo-ca .card-label { flex-wrap: wrap; }
.fo-ca-row { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; flex-wrap: wrap; }
.fo-addr {
  flex: 1 1 280px; min-width: 0; font-family: var(--f-mono); font-size: clamp(.82rem, 1.5vw, 1rem); letter-spacing: .02em; color: var(--gold-hi);
  padding: 12px 14px; border-radius: 10px; background: rgba(2, 10, 17, .6); border: 1px solid var(--line); overflow-wrap: anywhere; user-select: all;
}
.fo-copy { flex-shrink: 0; }
.fo-note { font-size: .84rem; color: var(--ink-2); line-height: 1.5; }
.fo-note a { color: var(--bio); white-space: nowrap; }
.fo-note a:hover { text-decoration: underline; }
.fo-legal { margin-top: 8px; font-size: .78rem; color: var(--ink-3); }
/* the links column stretches to the card's height so both edges line up */
.fo-social { display: flex; }
.fo-social-list { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.fo-social-list .fo-social-link { flex: 1; min-height: 44px; }
.fo-social-link, .nav-social-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--hair);
  background: rgba(9, 27, 40, .45); color: var(--ink-2); font-size: 14px; transition: border-color .25s, color .25s, transform .35s var(--ease-out);
}
.fo-social-link svg, .nav-social-link svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--gold); }
.fo-social-link:hover { border-color: var(--line-2); color: var(--ink); transform: translateX(3px); }
.nav-social { display: none; }
@media (max-width: 1100px) {
  .nav-social { display: flex; gap: 8px; padding-top: 16px; }
  .nav-links .nav-social-link { width: 44px; height: 44px; justify-content: center; padding: 0; border-radius: 50%; border: 1px solid var(--hair); font-size: 0; }
  .nav-links .nav-social-link span { display: none; }
}
@media (max-width: 820px) { .footer-official { grid-template-columns: minmax(0, 1fr); } .fo-social-list .fo-social-link { flex: none; } }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--hair); }
.footer-grid h4 { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin-bottom: 14px; }
.footer-grid a { display: block; color: var(--ink-2); font-size: 14px; padding: 4px 0; transition: color .2s; }
.footer-grid a:hover { color: var(--gold-hi); }
.footer-legal { margin-top: 40px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-4); letter-spacing: .06em; }
.point-down { display: inline-block; animation: point 2.2s var(--ease) infinite; }
@keyframes point { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* --------------------------------------------------------- sound waves */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; background: currentColor; border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ------------------------------------------------------------- utilities */
.hr { height: 1px; background: var(--hair); border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.tabnum { font-variant-numeric: tabular-nums; }
.redact { background: var(--ink); color: transparent; border-radius: 2px; padding: 0 .2em; user-select: none; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.redact:hover { background: rgba(232, 242, 245, .85); }

/* -------------------------------------------- the squid (konami easter egg) */
.squid-arm {
  position: fixed; right: -40px; bottom: -40px; z-index: 1040; width: min(520px, 70vw); pointer-events: none;
  transform-origin: 100% 100%; animation: squid 5.5s var(--ease) forwards;
  filter: drop-shadow(0 0 24px rgba(201, 84, 140, .45));
}
@keyframes squid {
  0% { transform: translate(60%, 60%) rotate(18deg); }
  30%, 65% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(70%, 70%) rotate(22deg); }
}

/* -------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal], .split .ch { opacity: 1 !important; transform: none !important; filter: none !important; }
  .ticker-track { animation: none !important; }
}
