/* Direction A — Institutional / Palantir-adjacent gravitas
   Near-monochrome with single deep-blue accent.
   Figtree display+body, JetBrains Mono technical labels. */

:root {
  --ink: #0a0a0a;
  --ink-2: #1a1a1a;
  --ink-3: #3a3a3a;
  --ink-4: #6b6b6b;
  --ink-5: #9a9a9a;
  --paper: #fafaf7;
  --paper-2: #f3f2ec;
  --paper-3: #e8e6df;
  --line: #d8d6cf;
  --line-2: #c2bfb6;
  --accent: oklch(0.42 0.13 250);     /* deep institutional blue */
  --accent-2: oklch(0.62 0.16 250);
  --accent-soft: oklch(0.95 0.02 250);
  --signal: oklch(0.62 0.18 35);       /* anomaly flag */
  --bg: var(--paper);
  --fg: var(--ink);
  --font-display: 'Figtree', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --ink: #f4f3ee;
  --ink-2: #d8d6cf;
  --ink-3: #aaa8a1;
  --ink-4: #8a8881;
  --ink-5: #5a5852;
  --paper: #0d0d0c;
  --paper-2: #161614;
  --paper-3: #1f1f1c;
  --line: #2a2a26;
  --line-2: #3a3a35;
  --accent: oklch(0.72 0.13 250);
  --accent-2: oklch(0.82 0.10 250);
  --accent-soft: oklch(0.22 0.05 250);
  --signal: oklch(0.72 0.17 35);
  --bg: var(--paper);
  --fg: var(--ink);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ── Type scale ── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h1 {
  font-weight: 500;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.h2 {
  font-weight: 500;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.h3 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.lede {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  max-width: 640px;
}
.body { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.small { font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.01em; }

/* ── Layout ── */
.shell { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.shell-narrow { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 32px; }
.row { display: flex; gap: 24px; }
.col { display: flex; flex-direction: column; }
.divider { height: 1px; background: var(--line); width: 100%; }
.divider-strong { height: 1px; background: var(--line-2); width: 100%; }
.vrule { width: 1px; background: var(--line); align-self: stretch; }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 32px; max-width: 1320px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.02em; font-size: 17px;
}
.brand-mark {
  display: inline-grid; place-items: center;
  position: relative;
}
.mark-img {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}
.mark-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .15s;
}
[data-theme="light"] .mark-logo--dark { opacity: 1; }
[data-theme="light"] .mark-logo--light { opacity: 0; }
[data-theme="dark"] .mark-logo--dark { opacity: 0; }
[data-theme="dark"] .mark-logo--light { opacity: 1; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav button {
  background: transparent; border: 0; padding: 8px 14px;
  font-size: 14px; color: var(--ink-2);
  border-radius: 4px; cursor: pointer;
  letter-spacing: -0.005em;
  transition: background .12s, color .12s;
}
.nav button:hover { background: var(--paper-2); color: var(--ink); }
.nav button.active { color: var(--ink); background: var(--paper-2); }

/* ── Topbar tail (CTA + hamburger) ── */
.topbar-tail { display: flex; gap: 8px; align-items: center; }
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: background .12s, border-color .12s;
}
.nav-toggle:hover { background: var(--paper-2); border-color: var(--ink-3); }
.nav-toggle-bar {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .18s, opacity .18s;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ── Nav drawer (mobile) ── */
.nav-drawer {
  display: none;
  overflow: hidden;
  max-height: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  transition: max-height .24s ease;
}
.topbar.is-open .nav-drawer { max-height: 520px; }
.nav-drawer-inner {
  display: flex; flex-direction: column;
  padding: 8px 16px 16px;
  max-width: 1320px; margin: 0 auto;
}
.nav-drawer-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 12px;
  background: transparent; border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px; color: var(--ink);
  letter-spacing: -0.005em;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}
.nav-drawer-link:last-child { border-bottom: 0; }
.nav-drawer-link:hover { background: var(--paper-2); }
.nav-drawer-link.active { color: var(--ink); }
.nav-drawer-link.active span:first-child::before {
  content: '— '; color: var(--accent); font-weight: 500;
}
.nav-drawer-link.cta {
  margin-top: 8px;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 4px;
  padding: 14px 16px;
  font-weight: 500;
}
.nav-drawer-link.cta:hover { background: var(--ink-2); }

@media (max-width: 980px) {
  .topbar-inner { padding: 0 20px; }
  .nav { display: none; }
  .nav-drawer { display: block; }
  .topbar-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .brand { font-size: 15px; }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all .14s;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-3); }
.btn-link {
  background: transparent; border: 0;
  padding: 0; color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
}
.btn-link:hover { border-bottom-color: var(--ink); }

/* ── Hero ── */
.hero {
  padding: 88px 0 56px;
  position: relative;
}
.hero-text { max-width: 880px; margin-bottom: 56px; }
.hero-meta {
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 28px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-meta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 25%, transparent);
}
.hero h1 { margin: 0 0 28px; max-width: 880px; }
.hero .lede { margin: 0 0 36px; max-width: 720px; }
.hero-cta { display: flex; gap: 12px; }
.hero-stats {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 24px;
  gap: 24px;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-stat .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ── Wave Orchestration Diagram ── */
.diagram {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
}
.diagram-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.diagram-head .title-block h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
  color: var(--ink);
}
.diagram-head .title-block p {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
  letter-spacing: -0.005em;
}
.diagram-head .legend {
  display: flex; gap: 16px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-3); letter-spacing: 0.06em;
  text-transform: uppercase;
  align-items: center;
}
.diagram-head .legend .item { display: inline-flex; align-items: center; gap: 6px; }
.diagram-head .legend .swatch {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  display: inline-grid; place-items: center;
  flex-shrink: 0;
}
.diagram-head .legend .swatch.complete { background: var(--ink); border-color: var(--ink); color: var(--paper); font-size: 8px; }
.diagram-head .legend .swatch.progress { border-color: var(--ink); border-style: solid; }
.diagram-head .legend .swatch.queued   { border-style: dashed; }
.diagram-head .legend .swatch.skipped  { border-color: var(--ink-4); opacity: 0.55; }
.diagram-head .legend .swatch.failed   { border-color: var(--signal); color: var(--signal); font-size: 9px; font-weight: 700; }

.wave-canvas-v2 {
  position: relative;
  padding: 36px 28px;
  background: var(--paper);
}
.wave-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.wave-rows {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  z-index: 2;
}
.wave-row-h {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: center;
}
/* Orchestrator + terminal rows — match the wave-row grid so the centered
   pill sits over the agents (1fr column), not the label column. */
.orch-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  z-index: 2;
  margin-bottom: 32px;
}
.orch-row > * {
  grid-column: 2;
  justify-self: center;
}
.orch-row.terminal {
  margin-top: 32px;
  margin-bottom: 0;
}
.wrh-body {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}
.wrh-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 16px;
  border-right: 1px solid var(--line);
  height: 100%;
}
.wrh-label .wrh-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  letter-spacing: 0.08em;
}
.agent-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  z-index: 2;
  white-space: nowrap;
  flex-shrink: 0;
}
.agent-pill .aname {
  position: relative;
  white-space: nowrap;
  display: inline-block;
}
/* In-progress shimmer = sheen pass over a fully-rendered base.
   Base text is always painted at full color. A ::after layer holds the same
   text, clipped to a horizontal gradient that's mostly black with a narrow
   light-gray band in the middle — and uses mix-blend-mode: screen so:
     • black areas of the gradient → screen onto black base = no change
     • the light-gray band      → screen onto black base = brief lift
   The result: a brighter sheen sweeps across, base text never disappears. */
.agent-pill.progress .aname::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    100deg,
    #000 0%,
    #000 40%,
    #888 50%,
    #000 60%,
    #000 100%
  );
  background-size: 250% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  mix-blend-mode: screen;
  animation: aname-shimmer 4.5s ease-in-out infinite;
}
@keyframes aname-shimmer {
  0%   { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}
.agent-pill.queued .aname {
  color: var(--ink-4);
}

/* Orchestrator + Synthesis terminal — emphasized dark filled pill */
.agent-pill.orchestrator,
.agent-pill.terminal {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
/* Dark variants always read as paper-on-ink, regardless of looping status.
   The progress shimmer for these pills uses paper as base, white-bright as
   highlight — so text remains readable in queued, complete and progress. */
.agent-pill.orchestrator .aname,
.agent-pill.terminal .aname {
  color: var(--paper);
}
.agent-pill.orchestrator.progress .aname::after,
.agent-pill.terminal.progress .aname::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    100deg,
    #fff 0%,
    #fff 40%,
    #aaa 50%,
    #fff 60%,
    #fff 100%
  );
  background-size: 250% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  mix-blend-mode: multiply;
  animation: aname-shimmer 4.5s ease-in-out infinite;
}
.agent-pill.orchestrator.queued .aname,
.agent-pill.terminal.queued .aname {
  color: color-mix(in oklab, var(--paper) 55%, transparent);
}


/* Footer — single inline line, not a 3-up panel */
.diagram-foot-inline {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 16px 28px;
}
.diagram-foot-inline p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  letter-spacing: -0.005em;
  text-align: center;
}

/* ── Section ── */
section.block {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}
section.block.tight { padding: 64px 0; }
.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: start;
}
.section-head .index {
  display: flex; flex-direction: column; gap: 6px;
}
.section-head .index .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
}
.section-head .title h2 { margin: 0 0 16px; }
.section-head .title .lede { margin: 0; }

/* ── Cards / capability grid ── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cap {
  padding: 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 220px;
  position: relative;
}
.cap .cap-num {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-4); letter-spacing: 0.08em;
}
.cap h3 { margin: 0; max-width: 360px; }
.cap p { margin: 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.55; max-width: 440px; }
.cap .cap-foot { margin-top: auto; }

/* ── Industry rows ── */
.industries {
  border-top: 1px solid var(--line);
}
.industry-row {
  display: grid;
  grid-template-columns: 80px 200px 1fr 200px;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  transition: background .12s;
}
.industry-row:hover { background: var(--paper-2); }
.industry-row .num { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); padding-left: 32px; }
.industry-row .name { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.industry-row .desc { color: var(--ink-3); font-size: 14px; max-width: 540px; }
.industry-row .arrow {
  text-align: right; padding-right: 32px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Trust matrix ── */
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border: 1px solid var(--line);
}
.trust-cell {
  padding: 24px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  min-height: 140px;
}
.trust-cell:last-child { border-right: 0; }
.trust-cell .label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4);
}
.trust-cell .value { font-size: 15px; font-weight: 500; color: var(--ink); }
.trust-cell .meta { font-size: 12.5px; color: var(--ink-3); margin-top: auto; }

/* ── Footer ── */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
}
.footer h4 {
  font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4);
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 13.5px; color: var(--ink-2); }
.footer li a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-4);
}

/* ── Misc ── */
.callout {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 24px 28px;
  border-radius: 4px;
  display: flex; gap: 24px; align-items: center;
}
.callout .label {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4);
}
.callout p { margin: 6px 0 0; color: var(--ink-2); max-width: 560px; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  border-radius: 2px;
}
.tag.accent { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 35%, var(--line)); background: var(--accent-soft); }

.kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 2px 6px; border: 1px solid var(--line-2);
  background: var(--paper-2); border-radius: 3px; color: var(--ink-3);
}

/* ── Page transitions ── */
.page { animation: pagefade .35s ease both; }
@keyframes pagefade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Form ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label.field {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4);
}
label.field input, label.field select, label.field textarea {
  font-family: var(--font-display); font-size: 14.5px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 12px; border-radius: 3px;
  letter-spacing: -0.005em;
  text-transform: none;
  outline: none; transition: border-color .12s;
}
label.field input:focus, label.field textarea:focus, label.field select:focus {
  border-color: var(--ink-2);
}
label.field textarea { min-height: 120px; resize: vertical; }
label.field.full { grid-column: span 2; }

/* ── Theme toggle button (bottom-left) ── */
.theme-btn {
  position: fixed; bottom: 16px; left: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  cursor: pointer; z-index: 100;
  color: var(--ink-2);
  transition: background .12s;
}
.theme-btn:hover { background: var(--paper-2); }

/* ── Code-ish blocks ── */
.spec {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  padding: 18px 20px;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre;
}
.spec .kw { color: var(--accent); }
.spec .cm { color: var(--ink-4); }
.spec .st { color: var(--signal); }

/* ── Pipeline visualization ── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.pipe-step {
  background: var(--paper);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px;
}
.pipe-step .pi-num {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-4); letter-spacing: 0.08em;
}
.pipe-step .pi-name { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; }
.pipe-step .pi-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: auto; }

/* ── Hairline grid bg pattern ── */
.bg-grid {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 96px 100%;
}

/* ── Page bands ── */
.band {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ── Inline measurement-doc style ── */
.spec-row {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 24px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row .k {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.spec-row .v { color: var(--ink); font-size: 14.5px; }

/* ── Geom mark ── */
.mark-svg { display: block; }

/* ── Data-path diagram (Trust · Fig B.01) ── */
.dpath {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
}
.dpath-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  flex-wrap: wrap;
}
.dpath-head-left { display: flex; align-items: baseline; gap: 14px; }
.dpath-tag {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4);
  padding: 3px 7px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
}
.dpath-title {
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.04em; color: var(--ink-2);
}
.dpath-legend {
  display: flex; gap: 18px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.dpath-legend span { display: inline-flex; align-items: center; gap: 8px; }
.dpath-legend .sw {
  width: 10px; height: 10px; border-radius: 2px;
  display: inline-block;
  border: 1px solid var(--line-2);
  background: var(--paper);
}
.dpath-legend .sw-priv { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, var(--paper)); }
.dpath-legend .sw-gate { border-color: var(--signal); background: color-mix(in oklab, var(--signal) 14%, var(--paper)); }

.dpath-canvas {
  padding: 28px 22px 22px;
  display: flex; flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0/24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0/24px 24px,
    var(--paper);
  background-blend-mode: normal;
  position: relative;
}
[data-theme="dark"] .dpath-canvas {
  background:
    linear-gradient(color-mix(in oklab, var(--line) 60%, transparent) 1px, transparent 1px) 0 0/24px 24px,
    linear-gradient(90deg, color-mix(in oklab, var(--line) 60%, transparent) 1px, transparent 1px) 0 0/24px 24px,
    var(--paper);
}

/* mute the grid so it reads as a substrate */
.dpath-canvas::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--paper) 65%, transparent),
    color-mix(in oklab, var(--paper) 92%, transparent));
  pointer-events: none;
}
.dpath-canvas > * { position: relative; z-index: 1; }

.dpath-row {
  display: flex; align-items: stretch; gap: 4px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}
.dpath-arrow {
  align-self: center;
  font-family: var(--font-mono);
  color: var(--ink-4);
  font-size: 12px;
  user-select: none;
  flex: 0 0 auto;
  padding: 0 1px;
}

.dpath-node {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--line-2);
  background: var(--paper);
  border-radius: 4px;
  padding: 9px 10px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
  overflow: hidden;
}
.dpath-node .n-lbl { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.dpath-node .n-idx {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.08em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.dpath-node .n-lbl {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.dpath-node .n-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.dpath-node.priv {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, var(--paper));
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 14px;
}
.dpath-node.priv .n-lbl { color: var(--accent); font-weight: 500; }
.dpath-node.gate {
  border-color: var(--signal);
  background: color-mix(in oklab, var(--signal) 6%, var(--paper));
  box-shadow: inset 3px 0 0 var(--signal);
  padding-left: 14px;
}
.dpath-node.gate .n-lbl { color: var(--signal); font-weight: 500; }
.dpath-node.term {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: inset 3px 0 0 var(--ink);
  padding-left: 14px;
}
.dpath-node.term .n-lbl { font-weight: 600; }

/* Branches dropping below the row */
.dpath-branch {
  display: flex;
  align-items: stretch;
  margin: 4px 0 12px;
  position: relative;
}
.dpath-branch-line {
  width: 0;
  border-left: 1px dashed var(--line-2);
  margin-left: 0;
  flex: 0 0 1px;
  position: relative;
}
.dpath-branch-line::before {
  content: "";
  position: absolute; left: -3px; top: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-2);
}
.dpath-branch-line::after {
  content: "";
  position: absolute; left: 0; bottom: 8px;
  width: 18px; height: 0;
  border-top: 1px dashed var(--line-2);
}
.dpath-branch .dpath-node.branch {
  margin-left: 24px;
  margin-bottom: 0;
  align-self: flex-end;
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 320px;
}
.dpath-branch-vault .dpath-branch-line {
  /* aligns under "pii detector" — node 3 of 7 in the row */
  margin-left: calc((100% - 12px) * 0.286 + 60px);
}
.dpath-branch-reid {
  /* anchor the whole branch to the right and let the box extend leftward */
  justify-content: flex-end;
}
.dpath-branch-reid .dpath-branch-line {
  margin-left: 0;
  margin-right: 140px;
}
.dpath-branch-reid .dpath-node.branch {
  margin-left: 0;
  margin-right: 0;
  /* sit flush right under "evidence package" */
  position: relative;
  right: 0;
}

.dpath-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 18px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.dpath-divider::before,
.dpath-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 0;
  border-top: 1px dashed var(--line-2);
}

.dpath-foot {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.dpath-foot-k {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4);
  padding-top: 2px;
}
.dpath-foot-v {
  font-family: var(--font-display);
  font-size: 13px; line-height: 1.55;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.dpath-foot-v em { font-family: var(--font-mono); font-style: normal; color: var(--accent); font-size: 12px; }

@media (max-width: 1080px) {
  .dpath-canvas { padding: 24px 16px 18px; }
  .dpath-node { padding: 8px 8px; }
  .dpath-node .n-lbl { font-size: 11.5px; }
  .dpath-node .n-meta { display: none; }
}
@media (max-width: 880px) {
  .dpath-canvas { overflow-x: auto; }
  .dpath-row { width: max-content; min-width: 100%; }
  .dpath-node { min-width: 110px; }
  .dpath-branch-vault .dpath-branch-line,
  .dpath-branch-reid .dpath-branch-line { margin-left: 24px; }
  .dpath-legend { width: 100%; }
}

/* ── Mobile responsive overrides ── */
html, body { overflow-x: hidden; max-width: 100%; }

@media (max-width: 820px) {
  .shell, .shell-narrow { padding: 0 20px; }

  /* Section heads — stack the index above the title so headlines have room */
  .section-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
  }
  .section-head .title h2 { word-break: break-word; }

  /* Hero */
  .hero { padding: 56px 0 40px; }
  .hero-text { margin-bottom: 36px; }
  .hero h1 { word-break: break-word; }
  .hero-cta { flex-wrap: wrap; }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 36px;
    gap: 20px;
  }

  /* Sections */
  section.block { padding: 56px 0; }
  section.block.tight { padding: 40px 0; }

  /* 01 problem grid + 03 differentiation grid — single column vertically */
  .cap-grid,
  .cap-grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .cap {
    padding: 24px 20px;
    min-height: 0;
  }

  /* 02 pipeline — stack vertically so all five steps are visible */
  .pipeline {
    grid-template-columns: 1fr;
    gap: 1px;
  }
  .pipe-step { min-height: 0; padding: 18px 20px; }

  /* 04 industries — restack each row */
  .industry-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 20px;
    align-items: flex-start;
  }
  .industry-row .num { padding-left: 0; }
  .industry-row .name { font-size: 20px; }
  .industry-row .desc { font-size: 13.5px; max-width: 100%; }
  .industry-row .arrow { text-align: left; padding-right: 0; }

  /* Trust matrix */
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-cell { border-bottom: 1px solid var(--line); min-height: 0; }
  .trust-cell:nth-child(2n) { border-right: 0; }

  /* Callouts */
  .callout {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  /* Footer */
  .footer { padding: 48px 0 24px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    padding-bottom: 32px;
  }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  /* Form */
  .form-grid { grid-template-columns: 1fr; }
  label.field.full { grid-column: span 1; }

  /* Industries page tab strip — let it scroll */
  .page .shell > div[style*="border-top"][style*="border-bottom"] {
    overflow-x: auto;
  }

  /* Spec blocks — keep code from forcing page-wide overflow */
  .spec { font-size: 11px; padding: 14px 16px; }
}

@media (max-width: 560px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-cell { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Mobile responsive — interior pages ── */
@media (max-width: 820px) {
  /* Generic: any inline-styled grid inside a page section becomes single-column */
  .page section .shell > div[style*="grid-template-columns"],
  .page section .shell-narrow > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Page-hero h1s wrap cleanly */
  .page .hero h1,
  .page .hero .h-display { word-break: break-word; }
  .page .hero .lede { max-width: 100% !important; }

  /* Spec / code blocks — wrap, don't force horizontal scroll across the page */
  .spec {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
  }

  /* Spec rows (Contact aside, Company commitments) */
  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }

  /* Company page — 80px / 1fr commitment rows */
  .shell-narrow div[style*="80px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* Company roadmap — three-up cards stack */
  .page section .shell > div[style*="repeat(3, 1fr)"][style*="border:"],
  .page section .shell > div[style*="repeat(3,1fr)"][style*="border:"] {
    grid-template-columns: 1fr !important;
  }
  .page section .shell > div[style*="repeat(3"] > div[style*="border-right"] {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }
  .page section .shell > div[style*="repeat(3"] > div:last-child {
    border-bottom: 0;
  }

  /* Contact aside — drop the left rule + padding on mobile */
  aside[style*="border-left"] {
    border-left: 0 !important;
    padding-left: 0 !important;
    padding-top: 32px;
    border-top: 1px solid var(--line);
  }

  /* Team cards — keep side-by-side photo+text but allow narrower */
  .page div[style*="border:1px solid var(--line)"][style*="padding:28"] {
    padding: 20px !important;
    gap: 16px !important;
  }

  /* Industries page tab strip — horizontal scroll, snug padding.
     React serializes inline styles with a space after the colon, so match that. */
  .page .shell > div[style*="border-bottom: 1px solid"][style*="border-top: 1px solid"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .page .shell > div[style*="border-bottom: 1px solid"][style*="border-top: 1px solid"] > button {
    padding: 14px 18px !important;
    flex: 0 0 auto !important;
  }

  /* dpath legend wraps */
  .dpath-head { gap: 12px; padding: 14px 16px; }
  .dpath-legend { flex-wrap: wrap; gap: 8px 14px; }

  /* Long-text link buttons (e.g. "Download earned-autonomy whitepaper") must wrap */
  .btn-link {
    white-space: normal;
    line-height: 1.4;
    text-align: left;
  }

  /* Callout inline button rows must wrap so long emails/labels don't overflow */
  .callout > div { flex-wrap: wrap; }
  .callout .btn { white-space: normal; }
}