/* ===========================================================================
   EPS LIVE — prototype for the EPS / Nibiru CTO test.
   Built on the web-design-2026 house rules. Two families, two colours plus
   tinted neutrals, hairlines instead of shadows, one pinned signature moment.
   Chart colours were validated with the dataviz palette checker against the
   dark surface: the pink carries data, the green/amber/red carry state and
   always ship with a word beside them (pink and green are 2.1 ΔE apart under
   deuteranopia, so they never encode two series in one chart).
   =========================================================================== */

/* --- fonts: latin + latin-ext (the -ext file carries ă â î ș ț) ----------- */
@font-face{
  font-family:'Bricolage Grotesque'; font-style:normal; font-weight:200 800; font-display:swap;
  src:url('fonts/bricolage-grotesque-200800-normal-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:'Bricolage Grotesque'; font-style:normal; font-weight:200 800; font-display:swap;
  src:url('fonts/bricolage-grotesque-200800-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/jetbrains-mono-400-normal-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/jetbrains-mono-400-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/jetbrains-mono-500-normal-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/jetbrains-mono-500-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- tokens --------------------------------------------------------------- */
:root {
  --bg: oklch(16% .045 310); --fg: oklch(96% .012 310); --muted: oklch(74% .028 310);
  --accent: oklch(66% .24 350);                  /* #ff3d9a — the data colour  */
  --line: color-mix(in oklch, var(--fg) 15%, transparent);
  --panel: color-mix(in oklch, var(--fg) 4.5%, var(--bg));
  --good: oklch(68% .15 165); --warn: oklch(70% .13 75); --bad: oklch(66% .21 20);
  --display: 'Bricolage Grotesque', Bahnschrift, 'Segoe UI', system-ui, sans-serif;
  --sans: 'Bricolage Grotesque', Bahnschrift, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* One shape, everywhere. Nibiru's interface is fully rounded, so we match it. */
  --r-pill: 999px; --r-card: 22px; --r-sm: 12px; --r-xs: 8px;
  /* ink on an accent-filled pill. A fixed dark, deliberately NOT --bg:
     in the light-toned sections --bg is near-white, which would put
     white text on a pink button. */
  --on-accent: oklch(14% .04 350);
  --gutter: clamp(1rem, 4vw, 3rem); --section: clamp(4.5rem, 10vw, 9rem);
  /* sequential ramp for the zone bars — ordered by tier, monotonic in OKLab L */
  --z1: #5b1740; --z2: #8e1f5c; --z3: #c42878; --z4: #ef4593; --z5: #ff86bd;
}
[data-tone="light"] { --bg: oklch(96% .012 310); --fg: oklch(20% .04 310); --muted: oklch(46% .03 310);
  --line: color-mix(in oklch, var(--fg) 17%, transparent); --panel: color-mix(in oklch, var(--fg) 4%, var(--bg)); }
[data-tone="deep"]  { --bg: oklch(16% .045 310); --fg: oklch(96% .012 310); --muted: oklch(74% .028 310);
  --line: color-mix(in oklch, var(--fg) 15%, transparent); --panel: color-mix(in oklch, var(--fg) 4.5%, var(--bg)); }

html.motion { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 400 clamp(1rem, .95rem + .3vw, 1.12rem)/1.6 var(--sans); overflow-x: clip; }
.motion body { transition: background-color .8s var(--ease), color .8s var(--ease); }
section[data-tone] { background: var(--bg); color: var(--fg); }
.motion section[data-tone] { --bg: inherit; --fg: inherit; --muted: inherit; background: transparent; color: inherit; }

h1, .display { font: 700 clamp(2.75rem, 1rem + 8vw, 8rem)/.95 var(--display); letter-spacing: -.04em; text-wrap: balance; margin: 0; }
h2 { font: 600 clamp(1.9rem, 1rem + 3.4vw, 3.9rem)/1.02 var(--display); letter-spacing: -.03em; text-wrap: balance; margin: 0 0 .6rem; }
h3 { font: 600 clamp(1.15rem, 1rem + .7vw, 1.6rem)/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 .4rem; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
p { max-width: 65ch; text-wrap: pretty; }
a { color: inherit; }
.label { display: block; font: 500 .72rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: .5rem; z-index: 100; background: var(--bg); color: var(--fg);
  padding: .6rem 1.2rem; border-radius: var(--r-pill); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 82rem; margin: 0 auto; padding: var(--section) var(--gutter); }
.sec-head { max-width: 48rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sec-head p { color: var(--muted); }
.fineprint { font: 400 .82rem/1.55 var(--mono); color: var(--muted); max-width: 70ch; }

body::after { content: ""; position: fixed; inset: 0; z-index: 99; pointer-events: none; opacity: .045;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* --- header + progress (P2) ---------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1.2rem;
  padding: .7rem var(--gutter); border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.brand { font: 400 1rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  display: inline-flex; align-items: center; gap: .55rem; }
.brand b { font-weight: 700; }
.brand-mark { width: .72rem; height: .72rem; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent); }
.site-header nav { display: flex; gap: 1.1rem; margin-left: auto; font: 400 .85rem/1 var(--mono); }
.site-header nav a { text-decoration: none; color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid transparent; }
.site-header nav a:hover { color: var(--fg); border-bottom-color: var(--accent); }
.tag { font: 400 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); padding: .4rem .75rem; border-radius: var(--r-pill); }
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .motion .progress { display: block; position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; background: var(--accent);
    transform-origin: 0 50%; animation: grow linear both; animation-timeline: scroll(); }
}
@keyframes grow { from { scale: 0 1; } to { scale: 1 1; } }
@media (max-width: 860px) { .site-header nav { display: none; } .tag { margin-left: auto; } }

/* --- P1 reveal ------------------------------------------------------------ */
.motion .reveal { opacity: 0; translate: 0 1.5rem;
  transition: opacity .7s var(--ease), translate .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.motion .reveal.in { opacity: 1; translate: 0 0; }

/* =========================== HERO ========================================= */
#hero { background: oklch(10% .05 310); color: oklch(96% .012 310); position: relative; }
.pin-stage { position: relative; padding: var(--section) var(--gutter); }
#hero-canvas { position: absolute; inset: 0; z-index: 0; }
#hero-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
/* the fallback the page wears before (or instead of) the 3D scene */
#hero .pin-stage::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60rem 40rem at 72% 38%, color-mix(in oklch, var(--accent) 34%, transparent), transparent 68%),
    radial-gradient(40rem 30rem at 18% 76%, oklch(32% .16 290 / .55), transparent 70%),
    oklch(10% .05 310); }
/* the painted fallback only ever steps aside once the 3D scene is actually up,
   which can only happen under .motion — so every hidden state here is scoped */
.motion.hero-ready #hero .pin-stage::before { opacity: 0; transition: opacity 1.1s var(--ease); }
#hero-veil { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, transparent, oklch(16% .045 310) 72%); }
.motion #hero-veil { opacity: 0; }
#hero-loader { position: absolute; inset: auto 0 2.2rem; z-index: 4; text-align: center;
  font: 400 .78rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  transition: opacity .6s var(--ease); }
.motion #hero-loader.done { opacity: 0; }
#hero-loader .spin { display: inline-block; width: .6rem; height: .6rem; margin-right: .5rem;
  border-radius: 50%; background: var(--accent); }
.motion #hero-loader .spin { animation: pulse 1.1s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .25; scale: .6; } }
.hero-failed #hero-loader { display: none; }

.pin-head, #hero .cap { position: relative; z-index: 3; }
/* The last scene is a lit fairground, so the captions need something behind
   them. A scrim that belongs to the caption, not a box drawn around it. */
#hero .cap::before, .pin-head::before {
  content: ""; position: absolute; inset: -1.4rem -3rem -1.4rem -3rem; z-index: -1;
  background: radial-gradient(120% 100% at 20% 50%, oklch(10% .05 310 / .82), transparent 72%);
  pointer-events: none;
}
.pin-head h1 { max-width: 14ch; }
.pin-head h1 em { font-style: normal; color: var(--accent); }
#hero .cap h2 { font-size: clamp(1.6rem, 1rem + 2.4vw, 2.9rem); }
#hero .cap p { color: oklch(84% .02 310); }

.motion #hero { height: 200vh; }
.motion #hero .pin-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  padding: 0 var(--gutter); display: grid; align-content: center; }
/* the wordmark steps aside once the approach starts, so it never sits on top
   of the star; --p is written by the motion kit */
.motion .pin-head { position: absolute; left: var(--gutter); top: 13vh; max-width: min(30rem, 42%);
  opacity: clamp(0, calc((0.52 - var(--p, 0)) * 5), 1); transition: opacity .25s linear; }
.motion #hero .cap { position: absolute; left: var(--gutter); bottom: 12vh; max-width: min(34rem, 45%);
  opacity: 0; translate: 0 1.5rem; transition: opacity .5s var(--ease), translate .5s var(--ease); }
.motion #hero .cap.on { opacity: 1; translate: 0 0; }
/* without motion the hero is a plain stacked block: every caption readable */
html:not(.motion) #hero .pin-stage { display: grid; gap: 2.5rem; }
html:not(.motion) #hero-canvas, html:not(.motion) #hero-loader { display: none; }
@media (max-width: 859px) {
  .motion #hero { height: 160vh; }
  .motion .pin-head { top: 8vh; right: var(--gutter); max-width: none; }
  .motion #hero .cap { bottom: 6vh; right: var(--gutter); max-width: none; }
}

/* =========================== THE DECK ===================================== */
.deck { border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.1rem, 2.5vw, 1.9rem);
  display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin-bottom: 2.5rem;
  background: var(--panel); }
.deck-main { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.deck-clock { margin: 0 0 0 auto; display: flex; align-items: baseline; gap: .5rem; }
.deck-clock b { font: 500 1.6rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.deck-clock span { font: 400 .76rem/1 var(--mono); color: var(--muted); }
.deck-row { display: grid; gap: .4rem; }
.fld { display: flex; justify-content: space-between; align-items: baseline;
  font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fld output { font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--fg); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 1.6rem; }
.switches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.switches legend { float: left; width: 100%; margin-bottom: .5rem; }
.sw { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .95rem; }
/* visually hidden but still focusable — clipped, not faded, so the lint can
   tell this apart from content that starts invisible */
.sw input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
.sw span { width: 2.3rem; height: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-pill); position: relative;
  background: color-mix(in oklch, var(--fg) 8%, transparent); transition: background .25s var(--ease); }
.sw span::after { content: ""; position: absolute; inset: 2px auto 2px 2px; width: 1rem; border-radius: 50%;
  background: var(--muted); transition: translate .25s var(--ease), background .25s var(--ease); }
.sw input:checked + span { background: color-mix(in oklch, var(--accent) 36%, transparent); border-color: var(--accent); }
.sw input:checked + span::after { translate: 1.05rem 0; background: var(--accent); }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (min-width: 900px) { .deck { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
  .deck-main { grid-column: 1 / -1; } .switches { grid-column: 1 / -1; } }

.btn { font: 500 .95rem/1 var(--mono); letter-spacing: .04em; padding: .95rem 1.7rem; border-radius: var(--r-pill);
  border: 1px solid var(--accent); cursor: pointer; transition: translate .3s var(--ease), background .2s var(--ease); }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover { background: color-mix(in oklch, var(--accent) 84%, white); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* =========================== PANELS ======================================= */
.panels { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 1040px) { .panels { grid-template-columns: .85fr 1.3fr .85fr; align-items: start; } }
.panel { border: 1px solid var(--line); background: var(--panel); padding: clamp(1.1rem, 2vw, 1.6rem);
  border-radius: var(--r-card); }
.panel > header { margin-bottom: 1.1rem; }
.panel h3 { margin: 0; }
.panel-note { font: 400 .78rem/1.5 var(--mono); color: var(--muted); margin: 1rem 0 0; max-width: none; }
.sub { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin: 1.6rem 0 .7rem; }
.spot { position: relative; }
.motion .spot:hover { background:
  radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklch, var(--accent) 12%, transparent), transparent 62%),
  var(--panel); }

/* --- the fan's phone ------------------------------------------------------ */
.phone { border: 1px solid var(--line); background: color-mix(in oklch, var(--fg) 6%, var(--bg)); min-height: 20rem;
  display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-sm); overflow: hidden; }
.phone-top { font: 500 .74rem/1 var(--mono); letter-spacing: .08em; padding: .8rem; border-bottom: 1px solid var(--line);
  color: var(--muted); text-transform: uppercase; }
.phone-body { padding: 1.1rem; display: grid; align-content: start; gap: .8rem; }
.fan-idle { color: var(--muted); font: 400 .9rem/1.5 var(--mono); }
.fan-pos { font: 500 clamp(2.2rem, 7vw, 3.4rem)/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.fan-sub { font: 400 .82rem/1.5 var(--mono); color: var(--muted); margin: 0; }
.fan-bar { height: 5px; background: color-mix(in oklch, var(--fg) 14%, transparent); overflow: hidden;
  border-radius: var(--r-pill); }
.fan-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s linear;
  border-radius: var(--r-pill); }
.fan-zones { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.fan-zones button { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: .6rem;
  padding: .75rem 1.1rem; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer;
  font: 400 .85rem/1.3 var(--mono); border-radius: var(--r-pill); }
.fan-zones button:hover:not([disabled]) { border-color: var(--accent); }
.fan-zones button[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.fan-zones .chosen { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 14%, transparent); }
.fan-state { display: inline-flex; align-items: center; gap: .45rem; font: 500 .78rem/1 var(--mono);
  text-transform: uppercase; letter-spacing: .1em; padding: .5rem .9rem; border: 1px solid currentColor;
  border-radius: var(--r-pill); }
.fan-state.good { color: var(--good); } .fan-state.warn { color: var(--warn); } .fan-state.bad { color: var(--bad); }
.fan-ticket { border: 1px solid var(--accent); padding: 1rem 1.2rem; display: grid; gap: .3rem;
  background: color-mix(in oklch, var(--accent) 12%, transparent); border-radius: var(--r-sm); }
.fan-ticket b { font: 600 1.1rem/1.2 var(--display); }
.fan-ticket span { font: 400 .78rem/1.4 var(--mono); color: var(--muted); }

/* --- tiles ---------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 560px) { .panel-org .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--panel); padding: .85rem; display: grid; gap: .25rem; }
.tile b { font: 500 clamp(1.25rem, 3vw, 1.75rem)/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tile span { font: 400 .7rem/1.3 var(--mono); color: var(--muted); }
.tile.big b { color: var(--accent); font-size: clamp(1.7rem, 4.5vw, 2.4rem); }

/* --- charts (one series each: no legend, the caption names it) ------------ */
.charts { display: grid; gap: 1rem; margin-top: 1.2rem; }
.chart { margin: 0; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
  font: 400 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.chart figcaption b { font-weight: 500; font-size: .95rem; letter-spacing: 0; text-transform: none;
  color: var(--fg); font-variant-numeric: tabular-nums; }
.chart svg { display: block; width: 100%; height: 68px; border-bottom: 1px solid var(--line); overflow: visible; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke; }
.chart .area { fill: color-mix(in oklch, var(--accent) 11%, transparent); stroke: none; }

/* --- zones (sequential ramp, ordered by tier) ----------------------------- */
.zones { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.zones li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: baseline; }
.zones .zname { font: 400 .82rem/1.3 var(--mono); }
.zones .znum { font: 500 .82rem/1.3 var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.zones .zbar { grid-column: 1 / -1; height: 7px; background: color-mix(in oklch, var(--fg) 12%, transparent);
  border-radius: var(--r-pill); overflow: hidden; }
.zones .zbar i { display: block; height: 100%; width: 0; border-radius: var(--r-pill); transition: width .3s linear; }
.zones li:nth-child(1) .zbar i { background: var(--z1); }
.zones li:nth-child(2) .zbar i { background: var(--z2); }
.zones li:nth-child(3) .zbar i { background: var(--z3); }
.zones li:nth-child(4) .zbar i { background: var(--z4); }
.zones li:nth-child(5) .zbar i { background: var(--z5); }
.zones li.full .znum { color: var(--accent); }

/* --- psp rows: colour carries STATE, the word carries identity ------------ */
.psp { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.psp li { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border: 1px solid var(--line);
  font: 400 .84rem/1 var(--mono); border-radius: var(--r-pill); }
.psp b { font-weight: 500; }
.psp .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--good); flex: 0 0 auto; }
.psp .st { color: var(--muted); font-size: .78rem; }
.psp .num { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.psp li.is-bad { border-color: color-mix(in oklch, var(--bad) 55%, transparent); }
.psp li.is-bad .dot { background: var(--bad); }
.psp li.is-bad .st { color: var(--bad); }
.psp li.is-live .dot { background: var(--good); }
.psp li.is-live .st { color: var(--good); }
.psp li.is-idle .dot { background: color-mix(in oklch, var(--fg) 30%, transparent); }

/* --- the trust feed ------------------------------------------------------- */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem;
  max-height: 16rem; overflow: hidden; font: 400 .76rem/1.45 var(--mono); }
.feed li { display: grid; grid-template-columns: auto 1fr; gap: .55rem; padding: .45rem .9rem;
  border-left: 3px solid var(--line); color: var(--muted); border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.feed li .v { color: var(--fg); }
.feed li.block { border-left-color: var(--bad); }
.feed li.leak { border-left-color: var(--warn); }
.feed li.ok { border-left-color: var(--good); }
.motion .feed li { animation: slip .35s var(--ease) both; }
@keyframes slip { from { opacity: 0; translate: -.4rem 0; } }

/* =========================== COMPARE ====================================== */
.compare { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2rem;
  border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 880px) { .compare { grid-template-columns: repeat(4, 1fr); } }
.cmp { background: var(--bg); padding: 1.2rem; display: grid; gap: .55rem; align-content: start; }
.cmp h3 { font-size: 1.05rem; margin: 0; }
.cmp .big { font: 500 clamp(1.8rem, 4vw, 2.5rem)/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.cmp dl { margin: .4rem 0 0; display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem;
  font: 400 .8rem/1.4 var(--mono); }
.cmp dt { color: var(--muted); } .cmp dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.cmp.is-base { background: color-mix(in oklch, var(--accent) 10%, var(--bg)); }
.cmp .delta { font: 500 .8rem/1.4 var(--mono); }
.cmp .delta.down { color: var(--bad); } .cmp .delta.up { color: var(--good); }
.callout { margin-top: 1.6rem; border-left: 3px solid var(--accent); padding: 1.1rem 1.4rem;
  background: color-mix(in oklch, var(--accent) 8%, transparent); border-radius: 0 var(--r-card) var(--r-card) 0; }
.callout h3 { margin-top: 0; }

/* =========================== ARCH + BENTO ================================= */
.arch { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 900px) { .arch { grid-template-columns: repeat(2, 1fr); } }
.arch li { background: var(--bg); padding: clamp(1.2rem, 3vw, 2.2rem); display: grid; gap: .5rem; align-content: start; }
.arch .n { font: 500 .78rem/1 var(--mono); color: var(--accent); letter-spacing: .14em; }
.arch p { color: var(--muted); margin: 0; }

.bento { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(2, 1fr); } }
/* six cells in three columns leaves a hole unless one of them takes four
   slots: the live one does, which is also the one worth the room */
@media (min-width: 1100px) { .bento { grid-template-columns: repeat(3, 1fr); }
  .cell-wide { grid-column: span 2; grid-row: span 2; } }
.cell { background: var(--bg); padding: clamp(1.2rem, 2.5vw, 2rem); display: grid; align-content: start; gap: .3rem; }
.cell p { color: var(--muted); margin: 0; }
.cell .label { margin-bottom: .5rem; }
.cell.live { background: color-mix(in oklch, var(--accent) 9%, var(--bg)); }
.cell.live .label { color: var(--accent); }

.tenants { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 720px) { .tenants { grid-template-columns: repeat(4, 1fr); } }
.tenants li { background: var(--bg); padding: 1.2rem; display: grid; gap: .3rem; }
.tenants b { font: 600 1.05rem/1.2 var(--display); }
.tenants span { font: 400 .8rem/1.4 var(--mono); color: var(--muted); }

.assume { margin-top: 3rem; border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.3rem, 3vw, 2.1rem); }
.assume h3 { margin-top: 0; }
.assume ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; color: var(--muted);
  font: 400 .88rem/1.55 var(--sans); }

/* =========================== FOOTER ======================================= */
.site-footer { border-top: 1px solid var(--line); padding: var(--gutter); display: grid; gap: .8rem;
  background: oklch(12% .04 310); color: oklch(92% .012 310);
  --muted: oklch(70% .025 310); --line: color-mix(in oklch, oklch(92% .012 310) 15%, transparent); }
.site-footer p { margin: 0; max-width: 78ch; }

@media print {
  .reveal { opacity: 1 !important; translate: none !important; }
  body::after, #hero-canvas, .site-header { display: none; }
}

/* =========================================================================
   The live platform: language switch, ops room, stress deck, tickets.
   ========================================================================= */
.lang { display: inline-flex; border: 1px solid var(--line); margin-left: .8rem;
  border-radius: var(--r-pill); overflow: hidden; }
.lang button { background: transparent; color: var(--muted); border: 0; cursor: pointer;
  font: 500 .74rem/1 var(--mono); letter-spacing: .1em; padding: .5rem .6rem; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 860px) { .lang { margin-left: auto; } }

.live-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin: 0 .4rem 0 .2rem;
  background: color-mix(in oklch, var(--fg) 30%, transparent); vertical-align: baseline; }
.live-dot.on { background: var(--good); }
.motion .live-dot.on { animation: blip 1.8s var(--ease) infinite; }
@keyframes blip { 50% { opacity: .35; } }

.buyflow { display: grid; gap: 1.2rem; }
@media (min-width: 1000px) { .buyflow { grid-template-columns: 1fr 1fr; align-items: start; } }

.tiles-wide { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 680px) { .tiles-wide { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .tiles-wide { grid-template-columns: repeat(6, 1fr); } }

.opsgrid { display: grid; gap: 1.4rem; margin-top: 1.8rem; }
@media (min-width: 900px) { .opsgrid { grid-template-columns: repeat(3, 1fr); } }
.opscols { display: grid; gap: 2rem; margin-top: 2rem; }
@media (min-width: 900px) { .opscols { grid-template-columns: 1fr 1fr; } }

.phone-body .fld { margin-top: .4rem; }
.phone-body input[type=text] { width: 100%; padding: .75rem 1.1rem; background: transparent; color: inherit;
  border: 1px solid var(--line); font: 400 .9rem/1.3 var(--mono); border-radius: var(--r-pill); }
.phone-body input[type=text]:focus-visible { border-color: var(--accent); }
.phone-body .btn { width: 100%; margin-top: .5rem; }
.fan-sub.err { color: var(--bad); }
.fan-pos { display: block; }

.tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.tickets .tk { display: grid; gap: .15rem; border: 1px solid var(--accent); padding: .85rem 1.1rem;
  background: color-mix(in oklch, var(--accent) 10%, transparent); border-radius: var(--r-sm); }
.tickets .tk b { font: 600 1rem/1.2 var(--display); }
.tickets .tk span { font: 400 .76rem/1.4 var(--mono); }
.tickets .muted, .muted { color: var(--muted); font: 400 .82rem/1.5 var(--mono); }

#pass { width: 100%; padding: .8rem 1.1rem; background: transparent; color: inherit;
  border: 1px solid var(--line); font: 400 .9rem/1.3 var(--mono); border-radius: var(--r-pill); }
#pass:focus-visible { border-color: var(--accent); }
.deck-status { grid-column: 1 / -1; margin: 0; font: 400 .85rem/1.5 var(--mono); color: var(--accent); min-height: 1.4em; }

.measured { margin-top: 3rem; border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.3rem, 3vw, 2.1rem); }
.measured h3 { margin-top: 0; }
.bench { overflow-x: auto; margin: 1.2rem 0; }
.bench table { border-collapse: collapse; width: 100%; font: 400 .84rem/1.4 var(--mono); }
.bench tbody tr:last-child td:first-child { border-bottom-left-radius: var(--r-sm); }
.bench tbody tr:last-child td:last-child { border-bottom-right-radius: var(--r-sm); }
.bench caption { text-align: left; color: var(--muted); font-size: .78rem; padding-bottom: .6rem; }
.bench th, .bench td { text-align: right; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.bench th:first-child, .bench td:first-child { text-align: left; }
.bench thead th { color: var(--muted); font-weight: 500; text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; }
.bench td.good { color: var(--good); } .bench td.bad { color: var(--bad); }
.arch code, .assume code { font: 400 .85em/1.4 var(--mono); background: color-mix(in oklch, var(--fg) 8%, transparent);
  padding: .15em .5em; border-radius: var(--r-xs); overflow-wrap: anywhere; }
.tenants .muted { font-size: .76rem; }

/* =========================================================================
   The AI surfaces. Two run live off the platform's own counters, three are
   pre-generated — and the badge says which, in the panel, not in a footnote.
   ========================================================================= */
.analyst { margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(1rem, 2vw, 1.5rem); background: var(--panel); }
.analyst-head { display: flex; align-items: baseline; gap: .8rem; }
.analyst-head .sub { margin: 0 0 .7rem; }
.ai-badge { margin-left: auto; font: 500 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); }
.ai-badge[data-mode="live"] { color: var(--good); border-color: color-mix(in oklch, var(--good) 55%, transparent); }
.ai-badge[data-mode="prepared"] { color: var(--warn); border-color: color-mix(in oklch, var(--warn) 55%, transparent); }
.feed-analyst { max-height: none; gap: .5rem; }
.feed-analyst li { grid-template-columns: 1fr; gap: .25rem; padding: .7rem 1rem;
  border-left-width: 3px; font: 400 .88rem/1.5 var(--sans); }
.feed-analyst li.act { border-left-color: var(--bad); }
.feed-analyst li.watch { border-left-color: var(--warn); }
.feed-analyst li.info { border-left-color: var(--good); }
.feed-analyst .who { font: 500 .66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.feed-analyst .act-line { font: 400 .8rem/1.45 var(--mono); color: var(--accent); }

.aitabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.aitabs button { font: 500 .82rem/1 var(--mono); padding: .7rem 1.2rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.aitabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.aitabs button:hover[aria-selected="false"] { color: var(--fg); border-color: var(--accent); }
.aipane { display: none; }
.aipane.is-on { display: block; }

.assist { border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1rem, 2vw, 1.5rem); background: var(--panel); }
#assistQ { width: 100%; padding: .85rem 1.2rem; background: transparent; color: inherit; border: 1px solid var(--line);
  border-radius: var(--r-pill); font: 400 1rem/1.3 var(--sans); margin-bottom: .9rem; }
#assistQ:focus-visible { border-color: var(--accent); }
.assist-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; padding: 0; }
.assist-chips button { font: 400 .78rem/1 var(--mono); padding: .5rem .9rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.assist-chips button:hover { color: var(--fg); border-color: var(--accent); }
.assist-a { min-height: 5rem; }
.assist-a .q { font: 500 .8rem/1.4 var(--mono); color: var(--muted); margin: 0 0 .4rem; }
.assist-a .a { font: 400 1rem/1.6 var(--sans); margin: 0; max-width: 62ch; }
.assist-a .doing { margin-top: .9rem; display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid var(--accent); border-radius: var(--r-pill); padding: .55rem 1.1rem;
  background: color-mix(in oklch, var(--accent) 12%, transparent); font: 500 .82rem/1 var(--mono); }
.assist-a .demo { margin-top: .7rem; font: 400 .74rem/1.4 var(--mono); color: var(--warn); }

.evpick { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.evpick button { font: 400 .8rem/1.35 var(--mono); text-align: left; padding: .7rem 1.1rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; max-width: 30rem; }
.evpick button[aria-pressed="true"] { border-color: var(--accent); color: var(--fg);
  background: color-mix(in oklch, var(--accent) 12%, transparent); }
.evout { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 900px) { .evout { grid-template-columns: 1.1fr 1fr; } }
.evout > div { background: var(--bg); padding: clamp(1rem, 2vw, 1.6rem); }
.evout h3 { margin: 0 0 .3rem; }
.evout .tag-line { font: 400 .9rem/1.5 var(--sans); color: var(--muted); margin: 0 0 1rem; }
.evtiers { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.evtiers li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .7rem 1rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); font: 400 .85rem/1.35 var(--mono); }
.evtiers b { font-weight: 500; }
.evtiers .why { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.evladder { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .4rem; }
.evladder li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; font: 400 .82rem/1.45 var(--mono); }
.evladder .p { color: var(--accent); font-weight: 500; }

.personas { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 760px) { .personas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1150px) { .personas { grid-template-columns: repeat(3, 1fr); } }
.personas li { background: var(--bg); padding: 1.2rem 1.3rem; display: grid; gap: .5rem; align-content: start; }
.personas b { font: 600 1.05rem/1.2 var(--display); }
.personas .hist { font: 400 .76rem/1.45 var(--mono); color: var(--muted); }
.personas .rec { border-top: 1px solid var(--line); padding-top: .55rem; font: 400 .86rem/1.5 var(--sans); }
.personas .rec em { font-style: normal; color: var(--accent); font-weight: 600; display: block; }

.pricing { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.pricing li { border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.1rem 1.3rem; display: grid; gap: .4rem; }
.pricing .ev { font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pricing .sug { font: 600 1.05rem/1.35 var(--display); }
.pricing .rat { font: 400 .9rem/1.55 var(--sans); color: var(--muted); max-width: 70ch; margin: 0; }
.pricing .cap { font: 400 .78rem/1.4 var(--mono); color: var(--accent); }
.pricing .decide { display: flex; gap: .5rem; margin-top: .3rem; }
.pricing .decide span { font: 400 .74rem/1 var(--mono); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: .4rem .8rem; color: var(--muted); }

/* The aerial view reacts to the checkout: daylight when a payment settles,
   grey daylight and rain when one is refused. This chip mirrors it next to
   the buy panel, because the hero is a long way up the page. */
.sky-row { display: flex; align-items: center; gap: .6rem; margin: .7rem 0 0;
  font: 400 .78rem/1.4 var(--mono); color: var(--muted); }
.sky-chip { font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .4rem .8rem; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); }
.sky-chip[data-sky="day"]   { color: var(--warn); border-color: color-mix(in oklch, var(--warn) 55%, transparent); }
.sky-chip[data-sky="rain"]  { color: var(--bad);  border-color: color-mix(in oklch, var(--bad) 55%, transparent); }
.sky-chip[data-sky="night"] { color: var(--muted); }
.fan-sub.sky-hint { color: var(--accent); }

/* The component gallery. Each piece runs in its own page, which is also the
   honest way to show them: their CSS really is isolated, not just namespaced. */
.cmptabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.cmptabs button { font: 500 .8rem/1 var(--mono); padding: .65rem 1.1rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.cmptabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent);
  border-color: var(--accent); font-weight: 700; }
.cmptabs button:hover[aria-selected="false"] { color: var(--fg); border-color: var(--accent); }
.cmp-note { font: 400 .9rem/1.5 var(--sans); color: var(--muted); margin: 0 0 1rem; max-width: 70ch; min-height: 1.4em; }
.cmp-frame { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden;
  background: var(--panel); }
.cmp-frame iframe { display: block; width: 100%; height: 78vh; min-height: 34rem; border: 0; }
@media (max-width: 760px) { .cmp-frame iframe { height: 70vh; min-height: 30rem; } }
