/* TokenWatt — site styles
   Tokens first; every color in the page comes from :root. */

:root {
  --bg: #f6f5f1;
  --bg-2: #efede6;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #15171b;
  --ink-2: #474c55;
  --muted: #737983;
  --line: #e2dfd6;
  --line-2: #d3cfc4;

  --accent: #c2410c;          /* text-safe accent */
  --accent-fill: #ea580c;     /* fills, bars */
  --accent-soft: #fdeadf;
  --accent-ink: #ffffff;

  --series-base: #c3c7ce;     /* production baseline */
  --series-vendor: #7b8697;   /* vendor latest */
  --series-tuned: var(--accent-fill);

  --good: #2b8a3e;
  --good-soft: #e3f4e6;
  --bad: #c92a2a;
  --bad-soft: #fbe6e6;
  --warn: #a15c00;
  --warn-soft: #fbf0d9;

  --code-bg: #15171b;
  --code-ink: #e6e7ea;
  --code-muted: #8a909a;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(20, 22, 27, .04), 0 12px 32px -16px rgba(20, 22, 27, .18);

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1160px;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10;
    --bg-2: #0f1216;
    --surface: #13161b;
    --surface-2: #171b21;
    --ink: #eceef1;
    --ink-2: #b4b9c1;
    --muted: #80868f;
    --line: #232830;
    --line-2: #2e343d;
    --accent: #ff8f4d;
    --accent-fill: #f97316;
    --accent-soft: #2a1a10;
    --accent-ink: #160b04;
    --series-base: #3b424c;
    --series-vendor: #6f7a8b;
    --good: #69db7c;
    --good-soft: #13261a;
    --bad: #ff8787;
    --bad-soft: #2c1414;
    --warn: #ffc069;
    --warn-soft: #2b2010;
    --code-bg: #090b0d;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-2: #0f1216;
  --surface: #13161b;
  --surface-2: #171b21;
  --ink: #eceef1;
  --ink-2: #b4b9c1;
  --muted: #80868f;
  --line: #232830;
  --line-2: #2e343d;
  --accent: #ff8f4d;
  --accent-fill: #f97316;
  --accent-soft: #2a1a10;
  --accent-ink: #160b04;
  --series-base: #3b424c;
  --series-vendor: #6f7a8b;
  --good: #69db7c;
  --good-soft: #13261a;
  --bad: #ff8787;
  --bad-soft: #2c1414;
  --warn: #ffc069;
  --warn-soft: #2b2010;
  --code-bg: #090b0d;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; }
code, pre, kbd, .mono { font-family: var(--font-mono); }
::selection { background: var(--accent-fill); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { left: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; gap: 28px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; font-size: 18px; }
.brand-mark { width: 26px; height: 26px; color: var(--accent-fill); }
.brand-name b { font-weight: 600; }
.brand-name span { color: var(--muted); font-weight: 500; }

.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a {
  text-decoration: none; color: var(--ink-2); font-size: 15px; padding: 6px 12px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; cursor: pointer; transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.menu-btn { display: none; }

@media (max-width: 860px) {
  .nav { gap: 12px; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; margin: 0; flex-direction: column; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  }
  .nav-links a { font-size: 17px; padding: 12px 8px; border-radius: 8px; }
  .nav-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .menu-btn { display: inline-grid; }
  .nav-right .btn { display: none; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 500; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s, background .15s, border-color .15s, color .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent-fill)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; }

/* ---------- type helpers ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-fill); }

.lede { font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 640px; }

.section { padding: 112px 0; }
.section-tight { padding: 72px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 46px); margin: 16px 0 18px; }
.section-head p { color: var(--ink-2); font-size: 18px; margin: 0; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 36px; }
  .lede { font-size: 18px; }
  :root { --gutter: 16px; }
}

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

.hero { position: relative; padding: 88px 0 104px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 0%, transparent 75%);
  opacity: .55;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); letter-spacing: -0.035em; margin: 22px 0 24px; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin-top: 26px; font-size: 14px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { width: 15px; height: 15px; color: var(--good); }

@media (max-width: 980px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---------- instrument panel (hero readout) ---------- */

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.panel-bar .dots { display: inline-flex; gap: 6px; }
.panel-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.panel-bar .tag {
  margin-left: auto; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
}
.panel-body { padding: 20px 20px 22px; }

.seg {
  display: inline-flex; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  gap: 2px; margin-bottom: 18px; max-width: 100%;
}
.seg button {
  font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.readout { display: grid; gap: 4px; }
.ro-row {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.ro-row:last-child { border-bottom: 0; }
.ro-label { font-size: 13.5px; color: var(--ink-2); }
.ro-label small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.ro-val { font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.ro-val .u { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.ro-meter { grid-column: 1 / -1; height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.ro-meter i {
  display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent-fill);
  transition: width .9s cubic-bezier(.2, .8, .2, 1), background .3s;
}
.ro-meter i.is-base { background: var(--series-vendor); }
@media (prefers-reduced-motion: reduce) { .ro-meter i { transition: none; } }

.ro-slo { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; grid-column: 1 / -1; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-family: var(--font-mono); border: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
  white-space: nowrap;
}
.pill svg { width: 13px; height: 13px; }
.pill-good { color: var(--good); background: var(--good-soft); border-color: transparent; }
.pill-bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.pill-warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.pill-accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.panel-foot {
  border-top: 1px solid var(--line); padding: 14px 20px; background: var(--surface-2);
  font-size: 14px; color: var(--ink-2);
}
.panel-foot b { color: var(--ink); font-weight: 600; }

/* ---------- cards & grids ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative;
}
.card h3 { font-size: 20px; margin: 0 0 10px; }
.card p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.card .num {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .06em;
  display: block; margin-bottom: 22px;
}
.card .formula {
  margin-top: 18px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-2);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
}
.card-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 20px;
}
.card-icon svg { width: 20px; height: 20px; }

/* statements */
.statements { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); }
.statement { padding: 28px 28px 0 0; }
.statement + .statement { padding-left: 28px; border-left: 1px solid var(--line); }
.statement .k { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.statement h3 { font-size: 22px; margin: 12px 0 10px; }
.statement p { color: var(--ink-2); font-size: 16px; }
@media (max-width: 860px) {
  .statements { grid-template-columns: 1fr; }
  .statement, .statement + .statement { padding: 24px 0 8px; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* steps */
.steps { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step-list li { position: relative; padding: 0 0 30px 56px; counter-increment: s; }
.step-list li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; background: var(--surface); border: 1px solid var(--line-2);
}
.step-list li::after {
  content: ""; position: absolute; left: 18px; top: 42px; bottom: 6px; width: 1px; background: var(--line-2);
}
.step-list li:last-child::after { display: none; }
.step-list h3 { font-size: 19px; margin: 6px 0 8px; }
.step-list p { color: var(--ink-2); font-size: 16px; margin: 0; }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* code */
.code {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius); overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--code-bg) 70%, var(--line-2));
  box-shadow: var(--shadow);
}
.code-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07); font-family: var(--font-mono); font-size: 12px; color: var(--code-muted);
}
.code pre { margin: 0; padding: 18px 18px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.code .c { color: var(--code-muted); }
.code .p { color: #ff9f5a; user-select: none; }
.code .ok { color: #8ce99a; }
.copy-btn {
  font: inherit; font-size: 12px; color: var(--code-muted); background: transparent; border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px; padding: 3px 9px; cursor: pointer;
}
.copy-btn:hover { color: var(--code-ink); border-color: rgba(255,255,255,.3); }

/* principles */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.principle { padding: 28px 30px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 16px; }
.principle:nth-child(odd) { border-right: 1px solid var(--line); }
.principle:nth-last-child(-n+2) { border-bottom: 0; }
.principle svg { width: 22px; height: 22px; color: var(--accent); margin-top: 3px; }
.principle h3 { font-size: 18px; margin: 0 0 6px; }
.principle p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
  .principle:nth-child(odd) { border-right: 0; }
  .principle:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* products */
.product { display: flex; flex-direction: column; }
.product .status { position: absolute; top: 24px; right: 24px; }
.product h3 { font-size: 22px; margin-top: 4px; }
.product .kicker { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.product ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.product li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15px; color: var(--ink-2); }
.product li svg { width: 16px; height: 16px; color: var(--accent); margin-top: 4px; }
.product.is-primary { border-color: color-mix(in srgb, var(--accent-fill) 45%, var(--line)); box-shadow: var(--shadow); }
.product .foot { margin-top: auto; padding-top: 24px; font-size: 14px; color: var(--muted); }

/* CTA band */
.cta {
  border-radius: 22px; padding: 64px; position: relative; overflow: hidden;
  background: var(--ink); color: var(--bg);
}
.cta::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-fill) 55%, transparent) 0%, transparent 65%);
  pointer-events: none;
}
.cta h2 { font-size: clamp(30px, 4vw, 44px); max-width: 680px; position: relative; z-index: 1; }
.cta p { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); max-width: 620px; margin: 18px 0 30px; font-size: 18px; position: relative; z-index: 1; }
.cta .btn-primary { background: var(--accent-fill); color: #fff; position: relative; z-index: 1; }
.cta .btn-primary:hover { background: color-mix(in srgb, var(--accent-fill) 85%, #fff); }
.cta .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); position: relative; z-index: 1; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 720px) { .cta { padding: 40px 24px; border-radius: 18px; } }

/* ---------- report list ---------- */

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.chip {
  font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.toolbar .count { margin-left: auto; font-size: 14px; color: var(--muted); font-family: var(--font-mono); }

.report-list { display: grid; gap: 14px; }
.report-card {
  display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center;
  padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.report-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.report-card h3 { font-size: 19px; margin: 8px 0 10px; }
.report-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.report-card .gain { text-align: right; }
.report-card .gain b { display: block; font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }
.report-card .gain small { font-size: 12.5px; color: var(--muted); }
.report-card .top { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); font-family: var(--font-mono); }
@media (max-width: 640px) {
  .report-card { grid-template-columns: 1fr; padding: 20px; }
  .report-card .gain { text-align: left; }
}

.empty {
  border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 48px 28px; text-align: center; color: var(--ink-2);
  background: var(--surface-2);
}
.empty h3 { font-size: 20px; margin-bottom: 8px; color: var(--ink); }

/* ---------- report detail ---------- */

.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px;
  background: var(--warn-soft); color: var(--warn); font-size: 15px; margin-bottom: 32px;
}
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.banner b { font-weight: 600; }

.report-head h1 { font-size: clamp(30px, 4vw, 44px); margin: 14px 0 18px; }
.report-head .meta { display: flex; flex-wrap: wrap; gap: 8px; }

.verdict {
  margin: 36px 0 0; padding: 26px 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--accent-fill); font-size: 20px; line-height: 1.5;
}
.verdict .lbl { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }

.r-section { margin-top: 64px; }
.r-section > h2 { font-size: 26px; margin-bottom: 8px; }
.r-section > p.sub { color: var(--ink-2); margin-bottom: 24px; }

.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } }

.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 18px; }
.chart h3 { font-size: 16px; margin: 0 0 4px; }
.chart .unit { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center; position: relative; }
.bar-row .name { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.bar-track { position: relative; height: 26px; display: flex; align-items: center; gap: 8px; }
.bar {
  height: 18px; border-radius: 0 4px 4px 0; min-width: 2px; background: var(--series-base);
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.bar[data-series="vendor"] { background: var(--series-vendor); }
.bar[data-series="tuned"] { background: var(--series-tuned); }
.bar-val { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-row:hover .bar, .bar-row:focus-within .bar { filter: brightness(1.08); }
.bar-row .tip {
  position: absolute; left: 140px; bottom: calc(100% + 6px); z-index: 5; pointer-events: none;
  background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 8px 10px; border-radius: 8px;
  white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
  font-family: var(--font-mono);
}
.bar-row:hover .tip, .bar-row:focus-within .tip { opacity: 1; transform: none; }
.chart .scale-note { margin-top: 14px; font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .bar-row { grid-template-columns: 92px 1fr; } .bar-row .tip { left: 0; } }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--series-base); }
.legend i[data-series="vendor"] { background: var(--series-vendor); }
.legend i[data-series="tuned"] { background: var(--series-tuned); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead th { font-size: 12.5px; font-weight: 500; color: var(--muted); font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; background: var(--surface-2); white-space: nowrap; }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody th { font-weight: 500; color: var(--ink-2); white-space: nowrap; }
td.hl { color: var(--accent); font-weight: 500; }

.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.kv > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv > div:nth-child(odd) { border-right: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-family: var(--font-mono); font-size: 14px; word-break: break-word; }
@media (max-width: 760px) {
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { border-right: 0; }
  .kv > div { grid-template-columns: 120px 1fr; }
}

.notlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notlist li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--ink-2); }
.notlist svg { width: 16px; height: 16px; margin-top: 5px; color: var(--muted); }

/* ---------- docs / methodology ---------- */

.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); margin: 18px 0 18px; letter-spacing: -0.03em; }

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding: 56px 0 112px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc .lbl { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; text-decoration: none; color: var(--ink-2); border-left: 1px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent-fill); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; gap: 0; } .toc { display: none; } }

.prose { max-width: 740px; }
.prose h2 { font-size: 28px; margin: 64px 0 16px; scroll-margin-top: 92px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose code { font-size: .88em; background: var(--bg-2); padding: 2px 6px; border-radius: 5px; color: var(--ink); }
.prose .code { margin: 20px 0 28px; }
.prose .code pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose .table-wrap { margin: 20px 0 28px; }
.eq {
  margin: 20px 0 24px; padding: 18px 22px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 15px; color: var(--ink); overflow-x: auto; line-height: 1.8;
}
.eq .lbl { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.callout {
  margin: 24px 0; padding: 18px 22px; border-radius: 12px; background: var(--accent-soft); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent-fill) 25%, transparent); font-size: 16px;
}
.callout b { color: var(--accent); }

/* support matrix */
.matrix td .pill { font-size: 11.5px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin: 0 0 20px; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid h4 { font-size: 12px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--muted); }
.foot-grid a:hover { color: var(--ink); }
.foot-grid .blurb { max-width: 320px; margin-top: 14px; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }
.legal p { margin: 0; max-width: 760px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- utility ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }

/* grid children must be allowed to shrink below their content width */
.hero-grid > *, .steps > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .charts > *, .doc > * { min-width: 0; }
.panel-bar > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.seg { overflow-x: auto; }
