/* 3lbow — live performance readout (derived variant).
   Layout, type hierarchy and motion follow the derived "command centre"
   spec; palette, mark and decoration are 3lbow's own. */
:root {
  color-scheme: dark;
  /* surfaces */
  --bg: #050505;
  --panel: #0c0c0b;
  --panel-2: #151513;
  --panel-3: #1c1c19;
  --nav-bg: rgba(17, 17, 16, .9);
  --hairline: #24241f;
  --hairline-nav: rgba(255, 255, 255, .08);
  /* ink */
  --ink: #f3f1ea;
  --ink-strong: #ffffff;
  --ink-muted: #9a978d;
  --ink-faint: #8a877c;
  /* signal */
  --accent: #e2b45a;
  --accent-deep: #c8892f;
  --pos: #5fd3a0;
  --neg: #ff8a73;
  --pos-bg: rgba(95, 211, 160, .12);
  --neg-bg: rgba(255, 138, 115, .12);
  --warn-bg: #e2b45a;
  --warn-ink: #120d02;
  --cta-text: #0a0a0a;
  /* shape */
  --r-pill: 999px;
  --r-panel: 18px;
  --r-tile: 12px;
  --shadow-panel: 0 -30px 120px rgba(226, 180, 90, .05), 0 40px 120px rgba(255, 255, 255, .03);
  /* space + type */
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 40px; --space-5: 64px;
  --fs-h1: clamp(2.6rem, 1.4rem + 3.6vw, 4.5rem);
  --fs-sub: clamp(1rem, .9rem + .3vw, 1.125rem);
  --fs-nav: .9375rem;
  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* motion (from the spec) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 16px/1.5 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 3px; border-radius: 6px; }
.num, .tile-val, .list-val, .badge, .tag, .months, [data-k] { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink-strong); color: var(--cta-text); padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- honesty banner ---------- */
.banner {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 40px; padding: 9px 16px;
  background: var(--warn-bg); color: var(--warn-ink);
  font-weight: 700; font-size: 14px; letter-spacing: .005em; text-align: center;
}
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn-ink); flex: none; }
.banner[hidden] { display: none; }

/* ---------- stage ---------- */
.stage { position: relative; overflow: clip; padding-bottom: 72px; }

.nav {
  position: sticky; top: 14px; z-index: 10;
  margin: 14px auto 0; width: min(1120px, calc(100% - 48px)); height: 64px;
  background: var(--nav-bg); border: 1px solid var(--hairline-nav); border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 12px 0 20px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 40px; }
.mark { width: 26px; height: 26px; color: var(--ink-strong); flex: none; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  font-weight: 500; font-size: var(--fs-nav); color: #b4b1a7; text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.state-pill {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--ink-strong); color: var(--cta-text); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.state-pill[data-state="illustrative"] { background: var(--warn-bg); color: var(--warn-ink); }
.state-pill[data-state="stale"] { background: var(--neg); color: #1a0703; }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 2; text-align: center; padding: clamp(40px, 6vh, 64px) 24px 0; max-width: 760px; margin: 0 auto; }
.hero-title { font: 500 var(--fs-h1)/1.06 var(--font); letter-spacing: -.035em; }
.hero-title .line { display: block; }
.hero-title .line:first-child { font-weight: 700; }
.hero-sub { font-size: var(--fs-sub); line-height: 1.55; color: var(--ink-muted); max-width: 36ch; margin: var(--space-3) auto 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: center; align-items: center; margin-top: 32px; }
.cta-primary {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  background: var(--ink-strong); color: var(--cta-text); font-weight: 600; font-size: 15px; letter-spacing: -.005em;
}
.live-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #1f9d68; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #1f9d68; opacity: 0; animation: ping 2.4s var(--ease-out) infinite; }
.is-stale .live-dot { background: #c0412a; }
.is-stale .live-dot::after { border-color: #c0412a; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.cta-secondary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px;
  background: none; border: 0; color: var(--ink); font: 500 15px var(--font); cursor: pointer;
}
.cta-secondary:hover span { text-decoration: underline; text-underline-offset: 4px; }
.cta-secondary svg { width: 16px; height: 16px; fill: currentColor; }
.motion-toggle .i-play { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: inline; }
.motion-toggle[aria-pressed="true"] .i-pause { display: none; }

/* ---------- decoration ---------- */
.flora { position: absolute; z-index: 0; pointer-events: none; width: min(30vw, 420px); height: auto; aspect-ratio: 420 / 520; top: clamp(330px, 46vh, 460px); }
.flora { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 96%); mask-image: linear-gradient(to bottom, #000 55%, transparent 96%); }
.flora-left { left: -2vw; transform-origin: 30% 100%; }
.flora-right { right: -2vw; transform-origin: 70% 100%; }

/* ---------- dashboard ---------- */
.dash {
  position: relative; z-index: 1;
  width: min(1120px, 84%); margin: 48px auto 0;
  display: grid; grid-template-columns: 188px minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-panel);
  box-shadow: var(--shadow-panel);
}
.side { border-right: 1px solid var(--hairline); padding: 20px 14px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; border-bottom: 1px solid var(--hairline); }
.side-brand .mark { width: 22px; height: 22px; }
.side-brand b { display: block; font-size: 14px; }
.side-brand span { display: block; font-size: 12px; color: var(--ink-muted); }
.side-cap { margin: 18px 6px 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.side-rows { display: grid; gap: 2px; }
.side-row { display: grid; gap: 2px; padding: 9px 8px; border-radius: 10px; }
.side-row.is-active { background: var(--panel-2); }
.side-row dt { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); }
.side-row dt svg { width: 14px; height: 14px; flex: none; }
.side-row dd { font-size: 14px; font-weight: 600; padding-left: 22px; }
.side-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 9px 2px 7px; border-radius: var(--r-pill); background: rgba(226, 180, 90, .14); color: var(--accent); }
.side-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.side-live[data-state="live"] { background: var(--pos-bg); color: var(--pos); }
.side-live[data-state="stale"] { background: var(--neg-bg); color: var(--neg); }

.main { padding: 20px 22px 24px; min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.main-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.main-sub { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.main-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.illus-tag { font-size: 12px; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); padding: 5px 11px; border-radius: var(--r-pill); }
[data-illus][hidden], [data-illus-short][hidden] { display: none; }
.fresh { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--ink-muted); background: var(--panel-2); border: 1px solid var(--hairline); padding: 4px 11px; border-radius: var(--r-pill); }
.fresh i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.fresh[data-state="fresh"] i { background: var(--pos); }
.fresh[data-state="stale"] { color: var(--neg); border-color: rgba(255, 138, 115, .4); background: var(--neg-bg); }
.fresh[data-state="stale"] i { background: var(--neg); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .03); border-radius: var(--r-tile); padding: 14px 16px 16px; min-width: 0; }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chip { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--panel-3); color: var(--accent); flex: none; }
.chip svg { width: 15px; height: 15px; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: var(--panel-3); color: var(--ink-muted); white-space: nowrap; }
.tag.is-pos { color: var(--pos); background: var(--pos-bg); }
.tag.is-neg { color: var(--neg); background: var(--neg-bg); }
.tile-val { margin-top: 16px; font-size: clamp(1.6rem, 1.1rem + 1vw, 2.1rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.tile-cap { margin-top: 4px; font-size: 13px; color: var(--ink-muted); }
.is-pos { color: var(--pos); }
.is-neg { color: var(--neg); }

.row { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: 16px; margin-top: 16px; }
.panel { background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .03); border-radius: var(--r-tile); padding: 16px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-title { display: flex; align-items: center; gap: 10px; }
.panel h3 { font-size: 14px; font-weight: 600; }
.pill { font-size: 11px; font-weight: 700; color: var(--accent); border: 1px solid rgba(226, 180, 90, .45); padding: 1px 8px; border-radius: var(--r-pill); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.panel-chart { display: flex; flex-direction: column; }
.panel-chart .chart { flex: 1 1 auto; }
.chart { position: relative; height: 240px; min-height: 240px; background: radial-gradient(120% 90% at 55% 110%, rgba(226, 180, 90, .07), transparent 60%), var(--panel); border-radius: 10px; overflow: hidden; }
.chart-dd { height: 170px; min-height: 170px; }
.chart-svg { display: block; width: 100%; height: 100%; }
.chart-svg .grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.chart-svg .axis { fill: var(--ink-faint); font: 500 11px var(--mono); }
.chart-svg .line-nav { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.chart-svg .area-nav { fill: url(#navfill); }
.chart-svg .line-dd { fill: none; stroke: var(--neg); stroke-width: 1.5; }
.chart-svg .area-dd { fill: rgba(255, 138, 115, .16); }
.chart-svg .last { fill: var(--accent); }
.chart-svg .last-halo { fill: var(--accent); opacity: .25; }
.chart-foot { display: flex; justify-content: space-between; margin-top: 8px; font: 500 11px var(--mono); color: var(--ink-faint); }
.scan { position: absolute; left: 0; top: 0; bottom: 0; width: 0; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.scan-line { position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: linear-gradient(to bottom, transparent, rgba(226, 180, 90, .7) 30%, rgba(226, 180, 90, .7) 70%, transparent); }
.scan-dot { position: absolute; left: -5px; top: 0; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(226, 180, 90, .2); }

.list { display: grid; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--hairline); }
.list-row:first-child { border-top: 0; }
.list-row-lead { justify-content: flex-start; background: var(--panel-3); border-radius: 10px; padding: 10px; margin-bottom: 4px; }
.badge { display: grid; place-items: center; min-width: 46px; height: 38px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--warn-ink); font-weight: 700; font-size: 15px; }
.list-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.list-label { font-size: 14px; font-weight: 500; }
.list-note { font-size: 12px; color: var(--ink-muted); }
.list-val { font-size: 16px; font-weight: 600; white-space: nowrap; }
.bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .6s var(--ease-out); }

.panel-months { margin-top: 16px; }
.months {
  display: grid; grid-template-columns: 52px repeat(12, minmax(0, 1fr)); gap: 4px;
  font-size: 12px;
}
.months .mh, .months .yh { display: flex; align-items: center; justify-content: center; min-height: 26px; color: var(--ink-faint); font: 500 11px var(--mono); text-transform: uppercase; }
.months .yh { justify-content: flex-start; color: var(--ink-muted); font-size: 12px; }
.months .c {
  grid-row: calc(var(--y) + 1); grid-column: calc(var(--m) + 1);
  display: flex; align-items: center; justify-content: center; min-height: 34px; border-radius: 6px;
  background: var(--panel-3); font-weight: 600; font-size: 12px; white-space: nowrap;
}
.months .mh { grid-row: 1; grid-column: calc(var(--m) + 1); }
.months .yh { grid-column: 1; grid-row: calc(var(--y) + 1); }
.months .c.is-pos { background: rgba(95, 211, 160, var(--a, .1)); color: #c9f3df; }
.months .c.is-neg { background: rgba(255, 138, 115, var(--a, .1)); color: #ffd6cc; }
.months .c.is-empty { background: transparent; border: 1px dashed rgba(255, 255, 255, .05); }

.motion-paused .live-dot::after { animation-play-state: paused; }

/* ---------- footer ---------- */
.foot { max-width: 1120px; margin: 0 auto; padding: 8px 24px 56px; color: var(--ink-muted); font-size: 13px; text-align: center; display: grid; gap: 8px; }
.foot-illus { color: var(--accent); font-weight: 700; }
.foot-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* ---------- entrance pose (removed the frame the timeline starts) ---------- */
.pre .nav, .pre .hero-title .line, .pre .hero-sub, .pre .cta-primary, .pre .cta-secondary, .pre .dash { opacity: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .scan { display: none; }
  .flora { width: 34vw; top: 340px; opacity: .8; }
  .dash { width: calc(100% - 32px); grid-template-columns: minmax(0, 1fr); }
  /* figures first: the readout details move below the main column */
  .side { order: 2; border-right: 0; border-top: 1px solid var(--hairline); padding: 14px 16px; }
  .side-brand, .side-cap { display: none; }
  .side-rows { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 4px; }
  .side-row dd { padding-left: 0; }
  .row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .nav { width: calc(100% - 24px); height: 56px; top: 10px; margin-top: 10px; padding: 0 8px 0 14px; }
  .state-pill { height: 36px; padding: 0 14px; font-size: 13px; }
  .hero { padding: 22px 16px 0; }
  .hero-title { font-size: 2.15rem; }
  .hero-sub { margin-top: 8px; font-size: 15px; }
  .cta-row { margin-top: 16px; flex-direction: column; gap: 0; }
  .cta-primary { font-size: 14px; padding: 0 18px; min-height: 42px; }
  .cta-secondary { min-height: 36px; font-size: 14px; }
  .dash { width: calc(100% - 24px); margin-top: 16px; }
  .main { padding: 14px 12px 16px; }
  .main-head { margin-bottom: 12px; gap: 8px; }
  .main-head-right { justify-content: flex-start; gap: 6px; }
  .illus-tag, .fresh { font-size: 11.5px; padding: 3px 9px; }
  .tiles { gap: 8px; }
  .tile { padding: 12px; }
  .tile-val { font-size: 1.55rem; margin-top: 12px; }
  .side-row { padding: 6px 8px; }
  .side-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart { height: 200px; min-height: 200px; }
  .chart-dd { height: 150px; min-height: 150px; }
  .flora { width: 46vw; top: 300px; opacity: .55; }
  /* months become rows, years become columns: three or four columns fit a phone */
  .months { grid-template-columns: 44px repeat(var(--years, 3), minmax(0, 1fr)); }
  .months .c { grid-row: calc(var(--m) + 1); grid-column: calc(var(--y) + 1); min-height: 32px; font-size: 13px; }
  .months .mh { grid-column: 1; grid-row: calc(var(--m) + 1); justify-content: flex-start; }
  .months .yh { grid-row: 1; grid-column: calc(var(--y) + 1); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scan, .motion-toggle { display: none !important; }
  .live-dot::after { animation: none; }
  .bar i { transition: none; }
  .nav, .hero-title .line, .hero-sub, .cta-primary, .cta-secondary, .dash { animation: none !important; transition: none !important; opacity: 1; }
  .flora { animation: none !important; }
}

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 32px 16px; text-align: center; }
.nf-mark { width: 44px; height: 44px; }
.nf-code { font: 500 13px var(--mono); color: var(--accent); letter-spacing: .2em; }
.nf-title { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); font-weight: 500; letter-spacing: -.03em; }
.nf-sub { color: var(--ink-muted); }
.nf-link { margin-top: 12px; text-decoration: none; }
