/* ============================================================
   PIPE LABS — design system v0.1
   Fonts: Golos Text (UI/headings), IBM Plex Mono (data/terminal)
   Themes: light (paper/graphite) + dark (graphite/signal-lime)
   ============================================================ */

:root {
  --font-ui: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --maxw: 1160px;
  --pad: clamp(20px, 4vw, 40px);

  --ease: cubic-bezier(.22,.9,.3,1);
}

/* ---------- LIGHT ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f3ef;
  --bg-raise: #fbfbf9;
  --surface: #ffffff;
  --surface-2: #e9ebe4;
  --ink: #14171a;
  --ink-2: #3c423e;
  --muted: #6a7169;
  --line: #d8dbd2;
  --line-strong: #b9beb2;
  --accent: #a8e10c;
  --accent-ink: #121600;
  --accent-deep: #55710a;
  --btn-bg: #14171a;
  --btn-fg: #cdf83d;
  --btn-bg-hover: #23282c;
  --up: #2f7d33;
  --down: #c2402f;
  --term-bg: #e7e9e1;
  --term-fg: #2b302b;
  --term-dim: #8b9283;
  --term-chrome: #dcdfd5;
  --shadow: 0 1px 2px rgba(20,23,26,.06), 0 12px 32px -12px rgba(20,23,26,.14);
}

/* ---------- DARK ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e0c;
  --bg-raise: #111412;
  --surface: #141815;
  --surface-2: #1b201c;
  --ink: #e9ede5;
  --ink-2: #c2c9bd;
  --muted: #8d968b;
  --line: #262b26;
  --line-strong: #39403a;
  --accent: #cdf83d;
  --accent-ink: #121600;
  --accent-deep: #9ec425;
  --btn-bg: #cdf83d;
  --btn-fg: #121600;
  --btn-bg-hover: #dcff5e;
  --up: #8fe06a;
  --down: #ff6e57;
  --term-bg: #0a0c0a;
  --term-fg: #cfd6c8;
  --term-dim: #6c766c;
  --term-chrome: #12160f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -16px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background .3s var(--ease), color .3s var(--ease);
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.mono { font-family: var(--font-mono); }

/* faint engineering grid on page background */
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .28;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 78%);
}

/* ================= NAV ================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.logo svg { display: block; }
.logo .lab { color: var(--muted); font-weight: 600; }

.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a.active { color: var(--ink); background: var(--surface-2); }

.nav-ctrls { display: flex; align-items: center; gap: 10px; }

.ctl {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; min-width: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  transition: border-color .15s, color .15s, background .15s;
}
.ctl:hover { border-color: var(--line-strong); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 10px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  transition: background .15s var(--ease), transform .15s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 9px; }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover { background: var(--surface-2); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--accent-deep); color: #fff; }
html[data-theme="dark"] .btn.accent:hover { background: var(--btn-bg-hover); color: var(--accent-ink); }
.btn.wide { width: 100%; }

.burger { display: none; }

/* ================= HERO ================= */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 22px;
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.06; letter-spacing: -.035em; font-weight: 800;
  margin-bottom: 20px;
}
h1 .accent-word { color: var(--accent-deep); }
html[data-theme="dark"] h1 .accent-word { color: var(--accent); }

.hero-sub {
  font-size: clamp(16px, 1.5vw, 18.5px); color: var(--ink-2);
  max-width: 52ch; margin-bottom: 30px;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-stats { display: flex; gap: clamp(20px, 3vw, 40px); flex-wrap: wrap; }
.stat .num {
  font-family: var(--font-mono); font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600; letter-spacing: -.02em;
}
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- terminal ---------- */
.terminal {
  background: var(--term-bg); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
.term-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--term-chrome);
  border-bottom: 1px solid color-mix(in srgb, var(--term-fg) 12%, transparent);
}
.term-head .live-tag {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-deep); display: inline-flex; align-items: center; gap: 6px;
}
html[data-theme="dark"] .term-head .live-tag { color: var(--accent); }
.term-head .live-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: pulse 2.2s infinite;
}
.term-head .tdot { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--term-fg) 22%, transparent); }
.term-head .title {
  margin-left: 8px; font-family: var(--font-mono); font-size: 12px;
  color: var(--term-dim); letter-spacing: .04em;
}
.term-body {
  padding: 14px 16px 18px; height: 320px; overflow: hidden;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.9;
  color: var(--term-fg);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.term-line { white-space: pre; opacity: 0; transform: translateY(6px); animation: lineIn .35s var(--ease) forwards; }
@keyframes lineIn { to { opacity: 1; transform: none; } }
.term-line .t { color: var(--term-dim); }
.term-line .tag { color: var(--accent); font-weight: 600; }
.term-line .ok { color: var(--up); }
.term-line .warn { color: var(--down); }

/* ================= SECTIONS ================= */
section { padding: clamp(48px, 7vw, 96px) 0; }
section.tight { padding: clamp(32px, 4vw, 56px) 0; }

.kicker {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 14px;
}
html[data-theme="dark"] .kicker { color: var(--accent); }

h2 {
  font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12;
  letter-spacing: -.03em; font-weight: 800; max-width: 24ch;
  margin-bottom: 16px;
}
.section-sub { color: var(--ink-2); max-width: 62ch; font-size: 16.5px; }

.sect-head { margin-bottom: clamp(28px, 4vw, 48px); }

/* logos strip */
.logos {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.logos-inner { display: flex; align-items: center; gap: clamp(24px, 5vw, 64px); flex-wrap: wrap; }
.logos .cap { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.logos .lg { font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--ink-2); opacity: .85; }

/* problem cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--line-strong); }
.card .idx {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  margin-bottom: 40px; display: block;
}
.card h3 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 10px; font-weight: 700; }
.card p { color: var(--ink-2); font-size: 15px; }

/* pipeline */
.pipeline {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  counter-reset: stage;
}
.stage {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 16px 16px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.stage .s-idx {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  letter-spacing: .06em;
}
.stage .s-idx::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stage h4 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.stage p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.stage.active {
  border-color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
html[data-theme="dark"] .stage.active { border-color: var(--accent); }
.stage.active .s-idx { color: var(--accent-deep); }
html[data-theme="dark"] .stage.active .s-idx { color: var(--accent); }

.pipe-note {
  margin-top: 22px; display: flex; gap: 10px; align-items: baseline;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}
.pipe-note .op { color: var(--accent-deep); font-weight: 600; }
html[data-theme="dark"] .pipe-note .op { color: var(--accent); }

/* replace strip */
.replace {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px;
}
.replace .chip {
  font-family: var(--font-mono); font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--down);
  text-decoration-thickness: 1.5px;
}
.replace .chip.keep {
  text-decoration: none; color: var(--accent-ink);
  background: var(--accent); border-color: transparent; font-weight: 600;
}

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.step .n {
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  margin-bottom: 18px;
}
.step h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 15px; }

/* split section (agents) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.codeblock {
  background: var(--term-bg); color: var(--term-fg);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; font-family: var(--font-mono); font-size: 13px; line-height: 1.85;
  overflow-x: auto; box-shadow: var(--shadow);
}
.codeblock .c { color: var(--term-dim); }
.codeblock .k { color: var(--accent); }
.codeblock .s { color: var(--up); }

.checklist { list-style: none; margin-top: 18px; }
.checklist li { display: flex; gap: 12px; padding: 9px 0; color: var(--ink-2); font-size: 15.5px; }
.checklist li::before {
  content: "|>"; font-family: var(--font-mono); font-weight: 600;
  color: var(--accent-deep); flex-shrink: 0;
}
html[data-theme="dark"] .checklist li::before { color: var(--accent); }

/* ================= PRICING ================= */
.term-toggle {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  margin: 6px 0 34px;
}
.term-toggle button {
  padding: 9px 18px; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--muted); display: inline-flex; gap: 8px; align-items: center;
  transition: background .15s, color .15s;
}
.term-toggle button .save {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--accent-deep);
}
.term-toggle button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
html[data-theme="dark"] .term-toggle button.on { background: var(--bg-raise); }
html[data-theme="dark"] .term-toggle button .save { color: var(--accent); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px 26px;
  transition: border-color .2s var(--ease);
}
.plan:hover { border-color: var(--line-strong); }
.plan.featured { border-color: var(--accent-deep); }
html[data-theme="dark"] .plan.featured { border-color: var(--accent); }
.plan .flag {
  position: absolute; top: -12px; left: 24px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
}
.plan .p-name { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.plan .p-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.plan .p-price .val { font-family: var(--font-mono); font-size: 38px; font-weight: 600; letter-spacing: -.03em; }
.plan .p-price .per { color: var(--muted); font-size: 14px; }
.plan .p-bill { font-size: 13px; color: var(--muted); min-height: 20px; margin-bottom: 20px; font-family: var(--font-mono); }
.plan ul { list-style: none; margin: 20px 0 26px; flex: 1; }
.plan ul li { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; color: var(--ink-2); }
.plan ul li::before { content: "—"; color: var(--accent-deep); font-weight: 600; flex-shrink: 0; }
html[data-theme="dark"] .plan ul li::before { color: var(--accent); }
.plan ul li.inherit { color: var(--muted); font-size: 13.5px; }

.pricing-notes { margin-top: 30px; color: var(--muted); font-size: 13.5px; max-width: 72ch; }
.pricing-notes p { margin-bottom: 6px; }

/* ================= FAQ ================= */
.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 4px 0;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px;
  padding: 18px 0; font-weight: 600; font-size: 16.5px; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 20px; color: var(--ink-2); font-size: 15px; max-width: 64ch; }

/* ================= CTA BAND ================= */
.cta-band {
  background: var(--btn-bg); color: var(--btn-fg);
  border-radius: var(--r-lg); padding: clamp(36px, 6vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
html[data-theme="dark"] .cta-band { color: var(--accent-ink); }
.cta-band h2 { margin-bottom: 8px; max-width: none; }
.cta-band p { opacity: .75; font-size: 15.5px; }
.cta-band .btn { background: var(--btn-fg); color: var(--btn-bg); }
html[data-theme="dark"] .cta-band .btn { background: var(--accent-ink); color: var(--accent); }

/* ================= FOOTER ================= */
footer { border-top: 1px solid var(--line); padding: 44px 0 36px; margin-top: 24px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.foot-col h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.foot-col a { display: block; padding: 4px 0; color: var(--ink-2); font-size: 14px; }
.foot-col a:hover { color: var(--ink); }
.foot-base {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
}

/* ================= COOKIE BANNER ================= */
.cookiebar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); padding: 18px 20px;
  box-shadow: var(--shadow);
  display: none; gap: 14px; align-items: center; flex-wrap: wrap;
}
.cookiebar.show { display: flex; }
.cookiebar p { font-size: 13.5px; color: var(--ink-2); flex: 1 1 260px; }
.cookiebar .row { display: flex; gap: 8px; }

/* ================= FORMS / AUTH / ACCOUNT ================= */
.narrow { max-width: 440px; margin: 0 auto; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow);
}
.tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tabs button { flex: 1; padding: 9px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
html[data-theme="dark"] .tabs button.on { background: var(--bg-raise); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field select {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent-deep); }
html[data-theme="dark"] .field input:focus { border-color: var(--accent); }
.form-err { color: var(--down); font-size: 13px; margin-bottom: 12px; display: none; }
.form-err.show { display: block; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--font-mono); text-align: right; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up);
}
.badge.gray { background: var(--surface-2); color: var(--muted); }

.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.acct-grid .panel { box-shadow: none; }
.panel h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 16px; }

.paym { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; }
.paym .ic {
  width: 42px; height: 30px; border-radius: 6px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--muted);
}
.paym .nm { font-size: 14.5px; font-weight: 600; }
.paym .sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.paym .spacer { margin-left: auto; }

/* checkout */
.co-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.radio-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; cursor: pointer;
  transition: border-color .15s;
}
.radio-card:hover { border-color: var(--line-strong); }
.radio-card.sel { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
html[data-theme="dark"] .radio-card.sel { border-color: var(--accent); }
.radio-card input { margin-top: 4px; accent-color: var(--accent-deep); }

/* ================= LEGAL ================= */
.legal { max-width: 780px; padding-bottom: 40px; }
.legal h1 { font-size: clamp(28px, 4vw, 40px); margin: 40px 0 10px; }
.legal .updated { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.legal h2 { font-size: 21px; margin: 34px 0 12px; max-width: none; }
.legal p, .legal li { color: var(--ink-2); font-size: 15.5px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 16px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ================= BRANDBOOK ================= */
.bb-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sw { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sw .chip-c { height: 74px; }
.sw .meta { padding: 10px 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.sw .meta b { display: block; color: var(--ink); font-weight: 600; }
.specimen { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; background: var(--surface); margin-bottom: 14px; }
.specimen .cap { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-bottom: 12px; letter-spacing: .06em; }

/* ================= REVEAL ANIMATION ================= */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- light-theme syntax (grey code blocks, readable ink) ---------- */
html[data-theme="light"] .term-line .tag,
html[data-theme="light"] .codeblock .k { color: var(--accent-deep); }
html[data-theme="light"] .term-line .ok,
html[data-theme="light"] .codeblock .s { color: #2f7d33; }
html[data-theme="light"] .term-line .warn { color: #c2402f; }

/* ---------- terminal caret ---------- */
.term-caret {
  display: inline-block; width: 8px; height: 15px; margin-left: 2px;
  background: var(--accent-deep); vertical-align: -2px;
  animation: blink 1.05s steps(1) infinite;
}
html[data-theme="dark"] .term-caret { background: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- codeblock: typing + scan ---------- */
.codeblock { position: relative; }
.codeblock .cb-caret {
  display: inline-block; width: 8px; height: 14px; background: var(--accent);
  vertical-align: -2px; animation: blink 1.05s steps(1) infinite;
}
.codeblock .num-live { transition: color .25s var(--ease); }
.codeblock .num-live.flash { color: var(--accent); }
html[data-theme="light"] .codeblock .num-live.flash { color: var(--accent-deep); }

/* ---------- pipeline flow dot ---------- */
.pipe-note { position: relative; }
.pipe-note .flow-track {
  position: relative; flex: 1; height: 2px; margin-left: 14px;
  background: var(--line); border-radius: 2px; overflow: hidden; align-self: center;
}
.pipe-note .flow-track::after {
  content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-deep), transparent);
  animation: flow 2.6s var(--ease) infinite;
}
html[data-theme="dark"] .pipe-note .flow-track::after { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
@keyframes flow { to { left: 100%; } }

/* ================= PARTNERS MARQUEE ================= */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-cap {
  display: block; text-align: center; font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.marquee-track {
  display: flex; align-items: center; gap: 56px; width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.mq-item { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mq-item img { height: 30px; width: auto; display: block; }
.mq-item .nm { font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--ink-2); }
.mq-item .sep { color: var(--line-strong); font-size: 20px; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .pipe-note .flow-track::after, .term-caret, .codeblock .cb-caret { animation: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .hero-grid, .split, .co-grid { grid-template-columns: 1fr; }
  .cards-3, .steps, .plans { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .acct-grid { grid-template-columns: 1fr; }
  .plan.featured { order: -1; }
}
@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: var(--bg-raise);
    border-bottom: 1px solid var(--line); padding: 12px var(--pad) 18px;
  }
  .nav-links.open { display: flex; }
  .burger { display: inline-flex; }
  .cards-3, .steps, .plans { grid-template-columns: 1fr; }
  .term-body { height: 260px; }
}
