/* ==========================================================================
   Coherence Power — site styles
   Dark mode, derived from the Coherence Power overview deck.
   Tokens are documented in docs/DESIGN_SYSTEM.md
   ========================================================================== */

:root {
  /* Ground & surfaces (deck slide background is #1F1F1F) */
  --bg: #1b1c1d;
  --bg-deep: #141516;
  --surface: #252728;
  --surface-2: #2d3031;
  --surface-teal: #1d2b32;      /* deck "ecosystem" panels */
  --line: #36393b;
  --line-strong: #4a4e51;

  /* Text */
  --text: #f3f5f6;
  --text-muted: #b0b7bb;
  --text-dim: #8b9398;          /* >= 4.5:1 on --bg */

  /* Brand */
  --cyan: #33e3ff;              /* deck headline cyan */
  --cyan-soft: rgba(51, 227, 255, 0.12);
  --cyan-line: rgba(51, 227, 255, 0.45);
  --steel: #2f7aa3;             /* deck bar / pie blue */
  --steel-deep: #255c7c;        /* deck big-number blue */
  --on-cyan: #071a20;

  /* Type */
  --font-display: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --font-body: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Scale */
  --fs-display: clamp(2.6rem, 1.5rem + 4vw, 4.75rem);
  --fs-h2: clamp(2rem, 1.3rem + 2.6vw, 3.4rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(88px, 10vw, 152px);
  --radius: 10px;
  --radius-lg: 16px;
  /* Theme-dependent extras (dark values) */
  --cyan-hover: #8ff0ff;
  --cyan-hover-bg: #8ff0ff;
  --header-bg: rgba(27, 28, 29, 0.82);
  --card-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  --hairline-soft: rgba(255, 255, 255, 0.08);
  --tint: rgba(51, 227, 255, 0.07);
  --glow-strong: rgba(51, 227, 255, 0.16);
  --glow-steel: rgba(47, 122, 163, 0.08);
  --glow-soft: rgba(51, 227, 255, 0.10);
  --glow-dot: rgba(51, 227, 255, 0.6);

  /* Charts */
  --chart-text: #8b9398;
  --chart-grid: rgba(255, 255, 255, 0.07);
  --chart-axis: rgba(255, 255, 255, 0.25);
  --chart-base: #8b9398;
  --chart-accent: #33e3ff;
  --chart-steel: #2f7aa3;
  --chart-spike: #5aa6cf;
  --chart-strong: #f3f5f6;
  --chart-muted: #b0b7bb;
  --chart-peak: rgba(47, 122, 163, 0.22);
  --chart-peak-key: rgba(47, 122, 163, 0.45);
  --chart-peak-label: #7fb6d3;
  --chart-soft: rgba(255, 255, 255, 0.03);
  --chart-single-fill: rgba(139, 147, 152, 0.28);
  --chart-robust-fill: rgba(51, 227, 255, 0.22);
  --chart-margin-fill: rgba(51, 227, 255, 0.12);

  color-scheme: dark;
}

/* ---------- Light theme ----------
   Applied with data-theme="light" on <html> (site) or on a wrapper (canvas). */
[data-theme="light"] {
  --bg: #f6f7f7;
  --bg-deep: #eceeef;
  --surface: #ffffff;
  --surface-2: #f1f3f4;
  --surface-teal: #e4f0f3;
  --line: #dde1e3;
  --line-strong: #c3c9cc;

  --text: #141516;
  --text-muted: #4a5257;
  --text-dim: #5f676c;

  --cyan: #056d89;              /* accent darkened for text contrast on light */
  --cyan-soft: rgba(5, 109, 137, 0.12);
  --cyan-line: rgba(5, 109, 137, 0.40);
  --steel: #2f7aa3;
  --steel-deep: #255c7c;
  --on-cyan: #ffffff;

  --cyan-hover: #034e63;
  --cyan-hover-bg: #034e63;
  --header-bg: rgba(246, 247, 247, 0.86);
  --card-shadow: 0 30px 60px -36px rgba(20, 40, 50, 0.25);
  --hairline-soft: rgba(0, 0, 0, 0.08);
  --tint: rgba(8, 145, 178, 0.07);
  --glow-strong: rgba(8, 170, 210, 0.16);
  --glow-steel: rgba(47, 122, 163, 0.07);
  --glow-soft: rgba(8, 170, 210, 0.10);
  --glow-dot: rgba(8, 145, 178, 0.45);

  --chart-text: #646c71;
  --chart-grid: rgba(0, 0, 0, 0.07);
  --chart-axis: rgba(0, 0, 0, 0.28);
  --chart-base: #7a8287;
  --chart-accent: #0891b2;
  --chart-steel: #2f7aa3;
  --chart-spike: #2f7aa3;
  --chart-strong: #1b1c1d;
  --chart-muted: #4a5257;
  --chart-peak: rgba(47, 122, 163, 0.13);
  --chart-peak-key: rgba(47, 122, 163, 0.35);
  --chart-peak-label: #2a6a8f;
  --chart-soft: rgba(0, 0, 0, 0.035);
  --chart-single-fill: rgba(122, 130, 135, 0.20);
  --chart-robust-fill: rgba(8, 145, 178, 0.18);
  --chart-margin-fill: rgba(8, 145, 178, 0.12);

  color-scheme: light;
}
[data-theme="light"] .brand .wave-a { stroke: #0891b2; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-muted); border: 1px solid var(--line-strong);
  transition: color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  transition: background-color .25s ease, color .25s ease;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cyan-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: 0.005em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--cyan); color: var(--on-cyan); padding: 10px 16px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); border-top: 1px solid var(--line); }

/* ---------- Shared type pieces ---------- */
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
}
.label--muted { color: var(--text-dim); }
.section-head { display: grid; gap: 20px; max-width: 820px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .label { display: flex; gap: 14px; align-items: center; }
.section-head .label span { color: var(--text-dim); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p:not(.label) { font-size: var(--fs-lead); color: var(--text-muted); max-width: 680px; }
.accent { color: var(--cyan); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 1rem; font-weight: 500; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--cyan); color: var(--on-cyan); }
.btn--primary:hover { background: var(--cyan-hover-bg); color: var(--on-cyan); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.02em; }
.brand:hover { color: var(--text); }
.brand svg { width: 34px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.975rem; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { min-height: 44px; padding: 10px 18px; font-size: 0.95rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-deep); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-cta .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 8vw, 112px) clamp(64px, 8vw, 120px); }
.hero::before {
  /* Echo of the deck's title-slide corner light. Kept subtle. */
  content: ""; position: absolute; inset: -20% -30% auto auto; width: 70vw; height: 70vw; max-width: 980px; max-height: 980px;
  background: radial-gradient(closest-side, var(--glow-strong), var(--glow-steel) 45%, transparent 72%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.hero-copy { display: grid; gap: 28px; }
.hero h1 { font-size: var(--fs-display); font-weight: 600; letter-spacing: 0.002em; line-height: 1.02; }
.hero h1 .accent { display: block; }
.hero .lead { font-size: var(--fs-lead); color: var(--text-muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); letter-spacing: 0.04em; }
.hero-meta span::before { content: "— "; color: var(--cyan); }

@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* Load-shift chart card */
.chart-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-deep) 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 22px 18px; display: grid; gap: 14px;
  box-shadow: var(--card-shadow);
}
.chart-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chart-card h2 { font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.chart-card .tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.chart-legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 8px; }
.chart-legend .k-base { background: var(--chart-base); }
.chart-legend .k-opt { background: var(--cyan); height: 3px; }
.chart-legend .k-peak { background: var(--chart-peak-key); height: 10px; width: 14px; border-radius: 2px; }
.chart-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 14px; gap: 12px; }
.chart-readout div { display: grid; gap: 2px; }
.chart-readout b { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--text); }
.chart-readout span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.load-chart text { font-family: var(--font-mono); font-size: 11px; fill: var(--chart-text); }
.load-chart .opt-line { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s .4s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .load-chart .opt-line { animation: none; stroke-dashoffset: 0; } }

/* ---------- Results strip ---------- */
.results { background: var(--bg-deep); border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 72px); }
.results-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.results-top p { color: var(--text-muted); font-size: var(--fs-small); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.stat { padding: 8px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 28px; }
.stat b { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 2rem + 2.2vw, 4rem); line-height: 1; color: var(--cyan); letter-spacing: 0.01em; }
.stat span { color: var(--text-muted); font-size: var(--fs-small); max-width: 220px; }
.results .footnote { margin-top: 28px; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
}
.footnote { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.02em; line-height: 1.6; }

/* ---------- Problem cards ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; align-content: start; }
.card .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); letter-spacing: 0.1em; }
.card h3 { font-size: var(--fs-h3); }
.card p { color: var(--text-muted); }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); counter-reset: step; }
.step { padding: 28px 28px 0 0; display: grid; gap: 14px; align-content: start; position: relative; }
.step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--bg), 0 0 16px var(--glow-dot); }
.step .label { color: var(--text-dim); }
.step h3 { font-size: var(--fs-h3); }
.step p { color: var(--text-muted); font-size: var(--fs-small); }
@media (max-width: 960px) {
  .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: 1px solid var(--line-strong); padding-left: 28px; gap: 36px; }
  .step { padding: 0; }
  .step::before { top: 6px; left: -33px; }
}

.diff { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.diff h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
.diff-list { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.diff-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); align-items: baseline; }
.diff-list li:last-child { border-bottom: 1px solid var(--line); }
.diff-list b { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; color: var(--cyan); line-height: 1; }
.diff-list p { color: var(--text-muted); }
.diff-list p strong { color: var(--text); font-weight: 500; }
@media (max-width: 900px) { .diff { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .diff-list li { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ---------- Constraints (process first) ---------- */
.constraints { background: var(--surface-teal); border-top: 1px solid var(--line); }
.constraints-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.constraints-grid .section-head { margin-bottom: 0; }
.guard-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hairline-soft); border: 1px solid var(--hairline-soft); border-radius: var(--radius); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.guard-list li { background: var(--surface-teal); padding: 28px; display: grid; gap: 12px; align-content: start; }
.guard-list svg { width: 26px; height: 26px; color: var(--cyan); }
.guard-list h3 { font-size: 1.2rem; }
.guard-list p { color: var(--text-muted); font-size: var(--fs-small); }
@media (max-width: 960px) { .constraints-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .guard-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Industries ---------- */
.industry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.industry { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; background: var(--surface); }
.industry h3 { font-size: 1.15rem; font-weight: 500; }
.industry .status { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); display: inline-flex; align-items: center; gap: 8px; }
.industry .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--text-dim); }
.industry.is-proven { border-color: var(--cyan-line); background: linear-gradient(180deg, var(--tint), transparent 70%), var(--surface); }
.industry.is-proven .status { color: var(--cyan); }
.industry.is-proven .status::before { background: var(--cyan); border-color: var(--cyan); }
@media (max-width: 1000px) { .industry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Evidence dot-range chart */
.evidence { margin-top: clamp(56px, 7vw, 96px); background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 44px); display: grid; gap: 28px; }
.evidence-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.evidence-head h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); max-width: 620px; }
.evidence-head p { color: var(--text-muted); font-size: var(--fs-small); max-width: 360px; }
.ev-table { display: grid; gap: 0; }
.ev-row { display: grid; grid-template-columns: minmax(0, 240px) 110px minmax(0, 1fr); gap: 16px; align-items: center; min-height: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.ev-row .name { font-size: 0.95rem; }
.ev-row.is-water .name { color: var(--cyan); }
.ev-row .kind { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.ev-track { position: relative; height: 28px; }
.ev-track::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(255, 255, 255, 0.06) calc(25% - 1px) 25%); }
.ev-target { position: absolute; top: -6px; bottom: -6px; left: 37.5%; width: 2px; background: var(--cyan); opacity: .85; }
.ev-bar { position: absolute; top: 50%; height: 2px; background: #6f777c; transform: translateY(-50%); }
.ev-dot { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; background: #d7dcdf; transform: translate(-50%, -50%); }
.ev-val { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; padding-left: 12px; }
.ev-axis { display: grid; grid-template-columns: minmax(0, 240px) 110px minmax(0, 1fr); gap: 16px; }
.ev-axis .ticks { position: relative; height: 20px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }
.ev-axis .ticks span { position: absolute; transform: translateX(-50%); }
.ev-axis .ticks span:first-child { transform: none; }
.ev-axis .ticks span:last-child { transform: translateX(-100%); }
.ev-target-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.04em; }
@media (max-width: 760px) {
  .ev-row, .ev-axis { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ev-row { padding: 12px 0; }
  .ev-row .kind { order: -1; }
  .ev-axis > div:not(.ticks) { display: none; }
}

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 18px; align-content: start; }
.person img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); }
.person h3 { font-size: 1.3rem; }
.person .role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); margin-top: 6px; }
.person ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--text-muted); font-size: var(--fs-small); }
.person li { padding-left: 16px; position: relative; }
.person li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 1px; background: var(--text-dim); }
@media (max-width: 900px) { .team-grid { grid-template-columns: minmax(0, 1fr); } }

.traction { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.traction div { padding: 24px 28px; display: grid; gap: 6px; }
.traction div + div { border-left: 1px solid var(--line); }
.traction b { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; color: var(--text); line-height: 1; }
.traction span { color: var(--text-muted); font-size: var(--fs-small); }
@media (max-width: 760px) {
  .traction { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .traction div:nth-child(3) { border-left: 0; }
  .traction div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.affiliations { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; }
.affiliations .label { margin-right: 8px; }
.affiliations ul { display: flex; flex-wrap: wrap; gap: 12px 36px; list-style: none; margin: 0; padding: 0; }
.affiliations li { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.06em; color: var(--text-dim); }
/* When real logo files are added: .affiliations img { height: 28px; width: auto; filter: grayscale(1) brightness(1.6); opacity: .7; } */

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; background: var(--bg-deep); }
.contact::before {
  content: ""; position: absolute; left: -20%; bottom: -60%; width: 900px; height: 900px;
  background: radial-gradient(closest-side, var(--glow-soft), transparent 70%);
  pointer-events: none;
}
.contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy { display: grid; gap: 24px; }
.contact-copy h2 { font-size: var(--fs-h2); }
.contact-copy p:not(.label):not(.contact-direct) { color: var(--text-muted); font-size: var(--fs-lead); }
.contact-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: baseline; color: var(--text-muted); }
.contact-steps li span { font-family: var(--font-mono); color: var(--cyan); font-size: 0.8rem; }
.contact-direct { font-size: var(--fs-small); color: var(--text-dim); }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: var(--font-body); font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b0b7bb' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.form .btn { grid-column: 1 / -1; justify-self: start; }
.form-note { grid-column: 1 / -1; font-size: 0.85rem; color: var(--text-dim); }
.form-status { grid-column: 1 / -1; font-size: var(--fs-small); color: var(--cyan); min-height: 1.4em; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 40px; background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer-grid p { color: var(--text-muted); font-size: var(--fs-small); max-width: 360px; margin-top: 16px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.04em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   How it works page
   ========================================================================== */
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { content: ""; display: block; height: 2px; background: var(--cyan); margin-top: 4px; border-radius: 2px; }
@media (max-width: 900px) { .nav-links a[aria-current="page"]::after { display: none; } .nav-links a[aria-current="page"] { color: var(--cyan); } }

.page-hero { position: relative; overflow: hidden; padding-block: clamp(56px, 8vw, 104px) clamp(64px, 8vw, 112px); }
.page-hero::before {
  content: ""; position: absolute; inset: -30% -25% auto auto; width: 60vw; height: 60vw; max-width: 860px; max-height: 860px;
  background: radial-gradient(closest-side, var(--glow-strong), var(--glow-steel) 50%, transparent 72%);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.25rem); line-height: 1.04; }

/* Scenario fan */
.fan-chart .scn { fill: none; stroke: var(--chart-base); stroke-width: 1; opacity: .32; }
.fan-chart .scn--spike { stroke: var(--chart-spike); opacity: .75; stroke-width: 1.3; }
.fan-chart .fcst { fill: none; stroke: var(--chart-strong); stroke-width: 2; stroke-dasharray: 6 5; }
.fan-chart text { font-family: var(--font-mono); font-size: 11px; fill: var(--chart-text); }
.chart-legend .k-scn { background: var(--chart-base); opacity: .6; }
.chart-legend .k-spike { background: var(--chart-spike); }
.chart-legend .k-fcst { background: repeating-linear-gradient(90deg, var(--chart-strong) 0 5px, transparent 5px 9px); }

/* Two-column explainer with chart */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.split .section-head { margin-bottom: 0; }
.split-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
.split-points li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--text-muted); }
.split-points svg { width: 18px; height: 18px; color: var(--cyan); margin-top: 4px; }
.split-points strong { color: var(--text); font-weight: 500; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }

.dist-card { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 14px; }
.dist-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dist-card h3 { font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.dist-card .tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; }
.dist-chart text { font-family: var(--font-mono); font-size: 11px; fill: var(--chart-text); }
.chart-legend .k-single { background: var(--chart-base); height: 10px; width: 14px; border-radius: 2px; opacity: .7; }
.chart-legend .k-robust { background: var(--cyan); height: 10px; width: 14px; border-radius: 2px; }

/* Scale band */
.scale-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.scale-band div { padding: clamp(28px, 4vw, 48px) 28px clamp(28px, 4vw, 48px) 0; display: grid; gap: 10px; align-content: start; }
.scale-band div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.scale-band b { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 1.8rem + 2.4vw, 4rem); line-height: 1; color: var(--cyan); }
.scale-band span { color: var(--text-muted); max-width: 300px; }
@media (max-width: 760px) {
  .scale-band { grid-template-columns: minmax(0, 1fr); }
  .scale-band div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Pipeline flow */
.flow { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; list-style: none; padding: 0; }
.flow li { position: relative; padding: 24px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.flow li + li { border-left: 0; }
.flow li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.flow li:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-color: var(--cyan-line); background: linear-gradient(180deg, var(--tint), transparent 70%), var(--surface); }
.flow li:not(:last-child)::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%) rotate(45deg);
  background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); z-index: 1;
}
.flow .label { color: var(--text-dim); }
.flow h3 { font-size: 1.2rem; }
.flow p { color: var(--text-muted); font-size: var(--fs-small); }
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li + li { border-left: 1px solid var(--line); border-top: 0; }
  .flow li:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .flow li:last-child { border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--cyan-line); }
  .flow li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -9px; transform: translateX(-50%) rotate(135deg); }
}

/* Uncertainty */
.example-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; background: var(--surface-teal); border: 1px solid var(--hairline-soft); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 24px; }
.example-intro .label { padding-top: 4px; white-space: nowrap; }
.example-intro p { color: var(--text-muted); }
.example-intro strong { color: var(--text); font-weight: 500; }
@media (max-width: 640px) { .example-intro { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

.uncert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.uncert { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.uncert-main { padding: clamp(24px, 3vw, 40px); display: grid; gap: 16px; align-content: start; border-right: 1px solid var(--line); }
.uncert-main .num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); letter-spacing: 0.14em; text-transform: uppercase; }
.uncert-main h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.uncert-main > p { color: var(--text-muted); font-size: var(--fs-lead); }
.uncert-main svg.mini { width: 100%; height: auto; margin-top: 8px; }
.mini text { font-family: var(--font-mono); font-size: 10px; fill: var(--chart-text); }
.uncert-detail { display: grid; gap: 0; }
.uncert-detail > div { padding: clamp(20px, 2.6vw, 32px) clamp(24px, 3vw, 40px); display: grid; gap: 10px; }
.uncert-detail > div + div { border-top: 1px solid var(--line); }
.uncert-detail .label { color: var(--text-dim); }
.uncert-detail .is-answer { background: linear-gradient(90deg, var(--tint), transparent 80%); }
.uncert-detail .is-answer .label { color: var(--cyan); }
.uncert-detail p { color: var(--text-muted); }
.uncert-detail ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--text-muted); }
.uncert-detail li { padding-left: 18px; position: relative; }
.uncert-detail li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--cyan); }
@media (max-width: 900px) {
  .uncert { grid-template-columns: minmax(0, 1fr); }
  .uncert-main { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Research */
.research { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.research .section-head { margin-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 1px solid var(--line-strong); display: grid; gap: 28px; }
.timeline li { position: relative; display: grid; gap: 6px; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); }
.timeline li:last-child::before { background: var(--cyan); box-shadow: 0 0 14px var(--glow-dot); }
.timeline .label { color: var(--text-dim); }
.timeline h3 { font-size: 1.15rem; }
.timeline p { color: var(--text-muted); font-size: var(--fs-small); }
@media (max-width: 900px) { .research { grid-template-columns: minmax(0, 1fr); } }

/* Deliverables */
.deliver-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.deliver-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; }
.deliver-grid svg { width: 26px; height: 26px; color: var(--cyan); }
.deliver-grid h3 { font-size: 1.2rem; }
.deliver-grid p { color: var(--text-muted); font-size: var(--fs-small); }
@media (max-width: 1000px) { .deliver-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .deliver-grid { grid-template-columns: minmax(0, 1fr); } }

/* CTA band */
.cta-band { background: var(--bg-deep); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; right: -10%; top: -80%; width: 800px; height: 800px; background: radial-gradient(closest-side, var(--glow-soft), transparent 70%); pointer-events: none; }
.cta-inner { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { font-size: var(--fs-h2); max-width: 760px; }
.cta-inner p:not(.label) { color: var(--text-muted); font-size: var(--fs-lead); margin-top: 16px; max-width: 620px; }
.text-link { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; text-decoration: none; margin-top: 32px; }
.text-link:hover { text-decoration: underline; }

/* Three-up traction row (how-it-works) stacks on phones */
@media (max-width: 760px) {
  .traction[style] { grid-template-columns: minmax(0, 1fr) !important; }
  .traction[style] div + div { border-left: 0; border-top: 1px solid var(--line); }
}
