/* ─────────────────────────────────────────────
   TraX — design tokens
   ───────────────────────────────────────────── */
:root {
  /* palette — accent is overridable via tweaks */
  --bg: #0b0b0c;
  --bg-2: #131316;
  --bg-3: #1c1c20;
  --line: #25252a;
  --line-2: #34343a;
  --text: #ededeb;
  --text-dim: #8a8a86;
  --text-mute: #5d5d5a;
  --accent: #d4ff3a;
  --accent-ink: #0b0b0c;
  --danger: #ff5a4a;
  --ok: #7af5c4;

  /* type */
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --sans: "Geist", "Helvetica Neue", system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* density */
  --gap-xs: 8px;
  --gap-s: 16px;
  --gap-m: 24px;
  --gap-l: 48px;
  --gap-xl: 96px;
  --gap-xxl: 160px;
  --pad-x: max(28px, 4vw);

  /* radius */
  --r-s: 6px;
  --r-m: 12px;
  --r-l: 18px;
}

[data-density="comfortable"] {
  --gap-l: 64px;
  --gap-xl: 128px;
  --gap-xxl: 200px;
}
[data-density="compact"] {
  --gap-l: 32px;
  --gap-xl: 72px;
  --gap-xxl: 120px;
}

[data-theme="light"] {
  --bg: #f4f2ec;
  --bg-2: #ebe8e0;
  --bg-3: #dcd9cf;
  --line: #d2cec1;
  --line-2: #b9b5a6;
  --text: #14130f;
  --text-dim: #5d5b53;
  --text-mute: #8a8779;
  --accent-ink: #f4f2ec;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--text); }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in oklch, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ─────────────────────────────────────────────
   typography primitives
   ───────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow.no-rule::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(46px, 7.5vw, 124px); letter-spacing: -0.035em; }
h2 { font-size: clamp(38px, 5.5vw, 84px); letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.015em; line-height: 1.05; }
h4 { font-size: 18px; letter-spacing: -0.01em; }

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1, "ss01" 1; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.uc { text-transform: uppercase; letter-spacing: 0.1em; }

.serif {
  font-family: "Instrument Serif", "Bricolage Grotesque", serif;
  font-style: italic;
  font-weight: 400;
}

/* ─────────────────────────────────────────────
   layout
   ───────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

section { position: relative; padding: var(--gap-xl) 0; }
section + section { border-top: 1px solid var(--line); }

.row { display: flex; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap-m);
}

/* ─────────────────────────────────────────────
   nav
   ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--gap-l);
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 5px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.04em;
}
.nav-links {
  display: flex;
  gap: 28px;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.nav-links a {
  position: relative;
  padding: 4px 2px;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.nav-links a:hover::after { right: 0; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  font-family: var(--mono);
  font-size: 11px;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

/* ─────────────────────────────────────────────
   buttons
   ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text);
  background: transparent;
  transition: all 0.2s ease;
}
.btn:hover { border-color: var(--text); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--accent) 88%, white);
  border-color: color-mix(in oklch, var(--accent) 88%, white);
}

.btn-ghost {
  border-color: transparent;
  background: var(--bg-2);
}
.btn-ghost:hover {
  background: var(--bg-3);
  border-color: transparent;
}

/* ─────────────────────────────────────────────
   live ticker (top of hero)
   ───────────────────────────────────────────── */
.ticker {
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.ticker-track {
  display: flex;
  gap: 56px;
  padding: 10px 0;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  width: max-content;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.ticker-amount { color: var(--text); font-weight: 500; }
.ticker-niche {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  text-transform: uppercase;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─────────────────────────────────────────────
   hero
   ───────────────────────────────────────────── */
.hero {
  padding: clamp(56px, 10vh, 120px) 0 var(--gap-xl);
  border-top: 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap-l);
  align-items: end;
}
.hero h1 {
  margin-top: 32px;
}
.hero h1 .blink {
  display: inline-block;
  width: 0.55em;
  height: 0.85em;
  background: var(--accent);
  vertical-align: -0.05em;
  margin-left: 0.05em;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { opacity: 0; } }

.hero-lead {
  margin: 28px 0 36px;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-dim);
}
.hero-lead strong { color: var(--text); font-weight: 500; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-m);
  border-top: 1px solid var(--line);
  padding-top: var(--gap-m);
}
.kpi-num {
  font-family: var(--display);
  font-size: clamp(32px, 3.4vw, 52px);
  letter-spacing: -0.03em;
  font-weight: 500;
  line-height: 1;
}
.kpi-num .unit {
  font-family: var(--mono);
  font-size: 0.32em;
  color: var(--text-dim);
  margin-left: 4px;
  letter-spacing: 0;
}
.kpi-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-top: 8px;
}

/* dashboard panel in hero */
.dashboard {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  position: relative;
  overflow: hidden;
}
.dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in oklch, var(--text) 4%, transparent) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in oklch, var(--text) 4%, transparent) 23px 24px);
  pointer-events: none;
  opacity: 0.5;
}
.dashboard > * { position: relative; }
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
}
.dash-status .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dash-card {
  background: color-mix(in oklch, var(--bg) 60%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px;
}
.dash-card-label { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.dash-card-val { font-family: var(--display); font-size: 28px; color: var(--text); margin-top: 4px; letter-spacing: -0.02em; }
.dash-card-trend { font-size: 11px; color: var(--ok); margin-top: 4px; }

.dash-chart {
  height: 120px;
  margin: 0 -2px 16px;
  position: relative;
}
.dash-chart svg { width: 100%; height: 100%; }
.dash-chart .line { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.dash-chart .area { fill: url(#area-grad); }
.dash-chart .axis { stroke: var(--line); stroke-width: 1; }

.dash-feed { border-top: 1px dashed var(--line); padding-top: 12px; }
.dash-feed-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding: 5px 0;
  font-size: 11.5px;
  align-items: center;
}
.dash-feed-row .t { color: var(--text-mute); }
.dash-feed-row .who { color: var(--text); }
.dash-feed-row .amt { color: var(--accent); font-weight: 500; }
.dash-feed-row.new { animation: feedIn 0.5s ease; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } }

/* ─────────────────────────────────────────────
   live metrics strip
   ───────────────────────────────────────────── */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.strip-cell {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.strip-cell:last-child { border-right: 0; }
.strip-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.strip-val { font-family: var(--display); font-size: 36px; line-height: 1; letter-spacing: -0.02em; }
.strip-val .unit { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-left: 6px; letter-spacing: 0; }
.strip-meter {
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.strip-meter::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w, 60%);
  background: var(--accent);
  animation: meter 4s ease infinite;
}
@keyframes meter {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ─────────────────────────────────────────────
   section header
   ───────────────────────────────────────────── */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-l);
  margin-bottom: var(--gap-l);
  align-items: end;
}
.section-head .lead {
  color: var(--text-dim);
  max-width: 56ch;
  font-size: 17px;
}

/* ─────────────────────────────────────────────
   how it works (animated)
   ───────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--bg-2);
}
.step {
  position: relative;
  padding: 32px 28px 36px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 360px;
}
.step:last-child { border-right: 0; }
.step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}
.step h3 { color: var(--text); }
.step p { color: var(--text-dim); margin: 0; }
.step-art {
  margin-top: auto;
  height: 140px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  position: relative;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 12px;
}

/* step 1 — form lines */
.art-form { display: flex; flex-direction: column; gap: 6px; }
.art-form .line {
  height: 8px;
  background: var(--line);
  border-radius: 2px;
  width: var(--w, 80%);
}
.art-form .line.a { animation: typeIn 2.4s ease infinite; transform-origin: left; }
@keyframes typeIn {
  0%, 100% { width: 0; }
  40%, 60% { width: 80%; }
}

/* step 2 — rate dial */
.art-dial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.art-dial-num {
  font-family: var(--display);
  font-size: 56px;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-weight: 500;
  animation: dialPulse 3s ease infinite;
}
@keyframes dialPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.art-dial-num .pct { font-family: var(--mono); font-size: 0.4em; color: var(--text-dim); }

/* step 3 — flow */
.art-flow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 16px;
}
.art-flow-node {
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 10px;
  background: var(--bg-2);
}
.art-flow-line {
  flex: 1;
  height: 1px;
  background: var(--line-2);
  position: relative;
  margin: 0 6px;
}
.art-flow-line::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -10%;
  width: 20%;
  height: 5px;
  background: var(--accent);
  border-radius: 999px;
  filter: blur(1px);
  animation: flow 2.2s linear infinite;
}
@keyframes flow {
  from { left: -20%; }
  to { left: 110%; }
}

/* ─────────────────────────────────────────────
   features grid (editorial)
   ───────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
}
.feat {
  background: var(--bg);
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  position: relative;
  transition: background 0.2s ease;
}
.feat:hover { background: var(--bg-2); }
.feat.span-3 { grid-column: span 3; }
.feat.span-2 { grid-column: span 2; }
.feat.span-4 { grid-column: span 4; }

.feat-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.feat h3 { color: var(--text); }
.feat p { color: var(--text-dim); margin: 0; font-size: 15px; }
.feat-foot {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.feat-foot .num { color: var(--accent); }

/* spark for features */
.spark { display: flex; align-items: end; gap: 3px; height: 36px; }
.spark span {
  width: 6px;
  background: var(--line-2);
  border-radius: 1px;
  height: var(--h, 30%);
  transition: background 0.3s ease;
}
.feat:hover .spark span { background: var(--accent); }

/* ─────────────────────────────────────────────
   rate calculator
   ───────────────────────────────────────────── */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--bg-2);
}
.calc-left { padding: 36px 36px 40px; border-right: 1px solid var(--line); }
.calc-right {
  padding: 36px 36px 40px;
  background:
    radial-gradient(800px 400px at 100% 100%, color-mix(in oklch, var(--accent) 12%, transparent), transparent 60%),
    var(--bg-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
}
.calc-field { margin-bottom: 28px; }
.calc-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.calc-field-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.calc-field-val { font-family: var(--display); font-size: 28px; letter-spacing: -0.02em; }
.calc-field-val .unit { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-left: 4px; }

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 32px;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line-2) var(--p, 50%));
  border-radius: 2px;
}
input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--line-2);
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--text);
  border-radius: 50%;
  margin-top: -8px;
  border: 2px solid var(--accent);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--text);
  border-radius: 50%;
  border: 2px solid var(--accent);
  cursor: grab;
}

.niche-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.niche-chip {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text-dim);
  background: transparent;
  transition: all 0.15s ease;
}
.niche-chip:hover { color: var(--text); }
.niche-chip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.calc-result-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.calc-rate {
  font-family: var(--display);
  font-size: clamp(72px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 12px 0 4px;
}
.calc-rate .pct {
  font-family: var(--mono);
  font-size: 0.28em;
  color: var(--text-dim);
  margin-left: 4px;
}
.calc-rate-foot { color: var(--text-dim); font-size: 14px; max-width: 38ch; }
.calc-summary {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.calc-sum-row { display: flex; flex-direction: column; gap: 4px; }
.calc-sum-row .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.calc-sum-row .v { font-family: var(--display); font-size: 24px; letter-spacing: -0.02em; }
.calc-sum-row .v .unit { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-left: 3px; }

/* ─────────────────────────────────────────────
   niches
   ───────────────────────────────────────────── */
.niches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
}
.niche-cell {
  background: var(--bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 180px;
  transition: background 0.2s ease;
  position: relative;
}
.niche-cell:hover { background: var(--bg-2); }
.niche-cell .label {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.niche-cell .vol {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.niche-cell .vol b { color: var(--accent); font-weight: 500; }
.niche-cell .risk {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-dim);
}
.niche-cell .risk.mid { color: #ffb45a; border-color: color-mix(in oklch, #ffb45a 40%, var(--line-2)); }

/* ─────────────────────────────────────────────
   compare table
   ───────────────────────────────────────────── */
.compare {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--bg-2);
}
.compare-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.compare-row:last-child { border-bottom: 0; }
.compare-row > div {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  font-size: 14px;
}
.compare-row > div:last-child { border-right: 0; }
.compare-row.head > div {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: var(--bg);
}
.compare-row.head .self {
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 10%, var(--bg));
}
.compare-row .self {
  background: color-mix(in oklch, var(--accent) 5%, transparent);
  color: var(--text);
  font-weight: 500;
}
.compare-row .label {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.compare-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.compare-tag.ok { color: var(--ok); border-color: color-mix(in oklch, var(--ok) 40%, var(--line)); }
.compare-tag.no { color: var(--text-mute); }
.compare-tag.mid { color: #ffb45a; border-color: color-mix(in oklch, #ffb45a 40%, var(--line)); }

/* ─────────────────────────────────────────────
   API teaser
   ───────────────────────────────────────────── */
.api {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--gap-l);
  align-items: center;
}
.code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  font-family: var(--mono);
  font-size: 13px;
  overflow: hidden;
}
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.code-tabs { display: flex; gap: 16px; }
.code-tab {
  background: transparent;
  border: 0;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}
.code-tab[aria-pressed="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.code-body {
  padding: 22px 24px;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}
.code-body .k { color: #c9a3ff; }
.code-body .s { color: var(--accent); }
.code-body .n { color: #7af5c4; }
.code-body .c { color: var(--text-mute); }
.code-body .p { color: var(--text); }

/* ─────────────────────────────────────────────
   CTA + footer
   ───────────────────────────────────────────── */
.cta {
  padding: var(--gap-xxl) 0;
  text-align: left;
  position: relative;
}
.cta-headline {
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 156px);
  letter-spacing: -0.045em;
  line-height: 0.92;
  font-weight: 500;
}
.cta-headline em { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; color: var(--accent); }
.cta-foot {
  margin-top: var(--gap-l);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--gap-m);
  border-top: 1px solid var(--line);
  padding-top: var(--gap-m);
  align-items: end;
}
.cta-foot .copy { color: var(--text-dim); max-width: 56ch; }

footer {
  border-top: 1px solid var(--line);
  padding: var(--gap-l) 0 var(--gap-m);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap-l);
  margin-bottom: var(--gap-l);
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
  font-weight: 400;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--text-dim); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: var(--gap-m);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.05em;
}
.footer-disclaimer {
  margin-top: 16px;
  max-width: 760px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}
.footer-wordmark {
  font-family: var(--display);
  font-size: clamp(80px, 14vw, 220px);
  letter-spacing: -0.05em;
  font-weight: 500;
  line-height: 0.9;
  color: var(--text);
  margin-bottom: var(--gap-m);
  position: relative;
}
.footer-wordmark .dot {
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: 0.05em;
}

/* ─────────────────────────────────────────────
   subpage helpers (faq, cases, docs)
   ───────────────────────────────────────────── */
.page-hero {
  padding: var(--gap-xl) 0 var(--gap-l);
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(48px, 7vw, 104px); }
.page-hero .lead { color: var(--text-dim); max-width: 60ch; margin-top: 24px; font-size: 19px; }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  cursor: pointer;
}
.faq-item summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: baseline;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-num { font-family: var(--mono); font-size: 11px; color: var(--text-mute); letter-spacing: 0.08em; }
.faq-q { font-family: var(--display); font-size: 24px; letter-spacing: -0.015em; line-height: 1.2; color: var(--text); }
.faq-toggle {
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  color: var(--text-dim);
  transition: transform 0.2s;
}
.faq-item[open] .faq-toggle { transform: rotate(45deg); color: var(--accent); }
.faq-a { padding: 18px 0 6px 64px; color: var(--text-dim); max-width: 70ch; line-height: 1.6; }

.case-card {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gap-l);
  padding: var(--gap-l) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.case-card:last-child { border-bottom: 0; }
.case-meta { display: flex; flex-direction: column; gap: 12px; }
.case-niche { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.case-name { font-family: var(--display); font-size: 32px; letter-spacing: -0.02em; line-height: 1; }
.case-quote { font-family: "Instrument Serif", serif; font-style: italic; font-size: 28px; line-height: 1.25; color: var(--text); margin: 0 0 24px; }
.case-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-m); border-top: 1px solid var(--line); padding-top: 20px; }
.case-stats .v { font-family: var(--display); font-size: 38px; letter-spacing: -0.025em; line-height: 1; }
.case-stats .v .unit { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-left: 4px; }
.case-stats .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); margin-top: 6px; }

/* ─────────────────────────────────────────────
   responsive
   ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feat.span-3, .feat.span-4, .feat.span-2 { grid-column: span 1; }
  .niches-grid { grid-template-columns: repeat(2, 1fr); }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip-cell:nth-child(2) { border-right: 0; }
  .strip-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .calc { grid-template-columns: 1fr; }
  .calc-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .api { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .compare-row { grid-template-columns: 1.4fr 1fr 1fr; }
  .compare-row > div:nth-child(4) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .case-card { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-inner { grid-template-columns: auto auto; justify-content: space-between; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .niches-grid { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .strip-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .section-head { grid-template-columns: 1fr; }
  .case-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .compare-row { grid-template-columns: 1.4fr 1fr; }
  .compare-row > div:nth-child(3) { display: none; }
}
