/* =====================================================================
   ChainLayer2 — landing site
   Identity: industrial "ball & chain / durable execution".
   Amber iron on cool ink; monospace display + system-sans body.

   One deliberate exception to the theming: the SESSION panels (real captured
   terminal output) keep a fixed dark ink ground in both themes. They are a
   terminal, they carry the product's own ANSI colours, and pinning the ground
   means their contrast is computed once and holds in light mode too.
   ===================================================================== */

/* ---- design tokens: dark is the default ground ---- */
:root {
  --ground:      #0e1117;
  --ground-2:    #0b0e14;
  --surface:     #161b22;
  --surface-2:   #1c232c;
  --surface-3:   #232b35;
  --text:        #e6edf3;
  --muted:       #9aa4b1;
  --faint:       #848e9e;   /* AA on --ground, --surface and --surface-2 */
  --border:      #262c34;
  --border-2:    #333d49;
  --control-edge: #5c6877; /* 3:1 on --ground: real control boundaries */

  --accent:      #e3a23c;   /* amber — brand */
  --accent-deep: #c9861f;
  --accent-hi:   #f6cb79;   /* highlight */
  --accent-ink:  #14100a;   /* text on a solid amber fill */
  --accent-wash: rgba(227, 162, 60, 0.12);
  --accent-line: rgba(227, 162, 60, 0.34);

  --steel:       #8caac6;   /* cool secondary */
  --steel-wash:  rgba(111, 138, 166, 0.14);

  --ok:          #58c46a;
  --refuse:      #ef7a6e;

  --shadow:    0 24px 60px -28px rgba(0, 0, 0, 0.78);
  --shadow-sm: 0 10px 30px -18px rgba(0, 0, 0, 0.7);
  --grid-line: rgba(255, 255, 255, 0.028);
  --term-edge: #262c34;

  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1140px;
  --step-1: 1.05rem;
  --step-2: 1.35rem;
  --step-3: clamp(1.7rem, 3vw, 2.3rem);
  --step-4: clamp(2.2rem, 5.2vw, 3.7rem);

  --radius: 14px;
  --radius-sm: 9px;

  /* terminal ink — identical in both themes, on purpose */
  --term-bg:    #0a0e14;
  --term-bar:   #131a24;
  --term-fg:    #cfd8e4;
  --term-dim:   #96a1b1;
  --term-chain: #58bcff;   /* the launcher's own 256-colour 39, lifted to AA */
  --term-steel: #a6c2e2;   /* 256-colour 110, lifted to AA */
  --term-ok:    #58c46a;
  --term-warn:  #e6b73f;
  --term-rule:  #2c3644;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground:      #f4f6f8;
    --ground-2:    #eceef2;
    --surface:     #ffffff;
    --surface-2:   #f0f2f5;
    --surface-3:   #e9edf1;
    --text:        #171b21;
    --muted:       #55606c;
    --faint:       #626c79;
    --border:      #dde2e8;
    --border-2:    #c3cad3;
    --control-edge: #7d8794;

    --accent:      #96620b;   /* darker amber: AA as text on white and on --ground */
    --accent-deep: #7a4f07;
    --accent-hi:   #7f5209;
    --accent-ink:  #ffffff;
    --accent-wash: rgba(150, 98, 11, 0.10);
    --accent-line: rgba(150, 98, 11, 0.32);

    --steel:       #3f5f7f;
    --steel-wash:  rgba(74, 106, 138, 0.12);

    --ok:          #1a7f37;
    --refuse:      #b3261e;

    --shadow:    0 24px 60px -30px rgba(23, 34, 54, 0.28);
    --shadow-sm: 0 12px 30px -22px rgba(23, 34, 54, 0.24);
    --grid-line: rgba(20, 30, 50, 0.035);
    --term-edge: #b7bfc9;
  }
}

/* explicit theme override (JS toggle) wins over the media query */
:root[data-theme="dark"] {
  --ground:#0e1117; --ground-2:#0b0e14; --surface:#161b22; --surface-2:#1c232c; --surface-3:#232b35;
  --text:#e6edf3; --muted:#9aa4b1; --faint:#848e9e; --border:#262c34; --border-2:#333d49; --control-edge:#5c6877;
  --accent:#e3a23c; --accent-deep:#c9861f; --accent-hi:#f6cb79; --accent-ink:#14100a;
  --accent-wash:rgba(227,162,60,0.12); --accent-line:rgba(227,162,60,0.34);
  --steel:#8caac6; --steel-wash:rgba(111,138,166,0.14);
  --ok:#58c46a; --refuse:#ef7a6e;
  --shadow:0 24px 60px -28px rgba(0,0,0,0.78); --shadow-sm:0 10px 30px -18px rgba(0,0,0,0.7);
  --grid-line:rgba(255,255,255,0.028); --term-edge:#262c34;
}
:root[data-theme="light"] {
  --ground:#f4f6f8; --ground-2:#eceef2; --surface:#ffffff; --surface-2:#f0f2f5; --surface-3:#e9edf1;
  --text:#171b21; --muted:#55606c; --faint:#626c79; --border:#dde2e8; --border-2:#c3cad3; --control-edge:#7d8794;
  --accent:#96620b; --accent-deep:#7a4f07; --accent-hi:#7f5209; --accent-ink:#ffffff;
  --accent-wash:rgba(150,98,11,0.10); --accent-line:rgba(150,98,11,0.32);
  --steel:#3f5f7f; --steel-wash:rgba(74,106,138,0.12);
  --ok:#1a7f37; --refuse:#b3261e;
  --shadow:0 24px 60px -30px rgba(23,34,54,0.28); --shadow-sm:0 12px 30px -22px rgba(23,34,54,0.24);
  --grid-line:rgba(20,30,50,0.035); --term-edge:#b7bfc9;
}

/* ---- reset / base ---- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.62;
  overflow-x: clip;                   /* clip sideways overflow without creating a
                                         scroll container (keeps the sticky header) */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 640;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;   /* never let a long mono word force sideways overflow */
  margin: 0;
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px; flex: none;
  background: var(--accent-line);
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 8px 0;
  font-family: var(--mono); font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  padding: 12px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--control-edge); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arw { transition: transform 0.15s ease; }
.btn:hover .arw { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn .arw, .btn:hover .arw { transform: none; transition: none; }
}

/* ---- header ---- */
header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(11px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--mono); font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; display: block; }
/* ink "knockout" halos for the chain marks — via CSS so they follow the theme
   (var() does not resolve inside SVG presentation attributes) */
.knock-ground  { stroke: var(--ground); }
.knock-surface { stroke: var(--surface); }
.brand small { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-family: var(--mono); font-size: 0.85rem; text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.icon-btn {
  background: transparent; border: 1px solid var(--control-edge); color: var(--muted);
  border-radius: 8px; width: 38px; height: 38px; cursor: pointer; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 860px) { .nav-links .hide-sm { display: none; } }

/* ---- shared section chrome ---- */
main { display: block; }
section { padding: 76px 0; border-top: 1px solid var(--border); position: relative; }
.sec-head { max-width: 66ch; margin-bottom: 40px; }
.sec-head h2 { font-size: var(--step-3); line-height: 1.12; }
.sec-head p { color: var(--muted); margin-top: 14px; font-size: 1.02rem; }
.sec-head p strong { color: var(--text); }

/* small code / kbd chips */
code {
  font-family: var(--mono);
  font-size: 0.8em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 2px 7px;
  border-radius: 6px;
  overflow-wrap: break-word;
}

/* ============================ HERO ============================ */
.hero {
  position: relative;
  padding: 30px 0 8px;
  overflow: hidden;
}
/* blueprint grid, faint, behind the hero only */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 30%, #000 40%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 78% 30%, #000 40%, transparent 78%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 52px;
  align-items: center;
  padding: 56px 0 48px;
}
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; padding-top: 40px; gap: 34px; } }

/* grid children must be allowed to shrink below their content's min-content
   size, or a wide child (mono heading, code) can push the row past the viewport */
.hero-inner > *, .agent-grid > *, .start-grid > *, .paths > * { min-width: 0; }
.hero h1 { font-size: var(--step-4); line-height: 1.03; }
.hero h1 .amber { color: var(--accent); }
.hero-sub { font-size: 1.12rem; color: var(--muted); margin: 22px 0 26px; max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; margin-bottom: 20px; font-size: 0.82rem; color: var(--faint); font-family: var(--mono); }

/* ---- the install bar: the one thing that must be impossible to miss ---- */
.installbar {
  display: grid; gap: 8px;
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.ib-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ib-os {
  font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint);
  flex: none; min-width: 108px;
}
.ib-cmd {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: 0; padding: 0;
  flex: 1 1 260px; min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.copy {
  flex: none;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent); background: var(--accent-wash);
  border: 1px solid var(--accent-line); border-radius: 7px;
  padding: 5px 11px; cursor: pointer; min-width: 74px;
  transition: background 0.14s ease, color 0.14s ease;
}
.copy:hover { background: var(--accent); color: var(--accent-ink); }
.copy.is-done { background: var(--accent); color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .copy { transition: none; } }
.installbar.is-big { margin-bottom: 14px; padding: 18px 20px; gap: 12px; }
.installbar.is-big .ib-cmd { font-size: 0.98rem; }
.installbar.is-inline {
  border-left-width: 1px; box-shadow: none; background: var(--surface-2);
  margin: 4px 0 16px; padding: 10px 12px;
}
.installbar.is-inline .ib-cmd { font-size: 0.78rem; }
@media (max-width: 480px) {
  .ib-os { min-width: 0; }
  .ib-cmd { flex-basis: 100%; }
}

/* the ball-and-chain hero panel */
.hero-art {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 70% 8%, var(--accent-wash), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 26px;
  overflow: hidden;
}
.hero-art::after { /* corner tick, industrial detail */
  content: ""; position: absolute; top: 12px; right: 12px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--accent-line);
  border-right: 2px solid var(--accent-line);
}
.hero-art .plate {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 4px 10px; margin-bottom: 6px;
}
.hero-art svg { display: block; width: 100%; height: auto; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 18px;
}
.hero-stats .st { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.hero-stats .k { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.hero-stats .l { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.02em; line-height: 1.35; }

/* ============================ SESSION PANELS ============================
   Real captured terminal output. Fixed dark ground in both themes. */
.session {
  border: 1px solid var(--term-edge);
  border-radius: var(--radius);
  background: var(--term-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sess-top {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 15px;
  background: var(--term-bar);
  border-bottom: 1px solid var(--term-rule);
}
.sess-top .lamp, .wf-top .lamp {
  width: 10px; height: 10px; border-radius: 50%; background: var(--term-rule); flex: none;
}
.sess-top .title {
  margin-left: 8px; min-width: 0; font-family: var(--mono); font-size: 0.75rem; color: var(--term-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sess-badge {
  margin-left: auto; flex: none;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  color: var(--term-ok); border: 1px solid var(--term-rule);
  border-radius: 20px; padding: 2px 10px;
}
.sess-body {
  padding: 16px 0 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sess-body pre {
  margin: 0;
  padding: 0 18px;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.72;
  white-space: pre;
  color: var(--term-fg);
  width: max-content;
  min-width: 100%;
}
.sess-body .out { color: var(--term-fg); }
.sess-body .banner {
  font-size: 0.72rem;
  line-height: 1.14;
  padding-bottom: 14px;
}
.session-sm .sess-body pre { font-size: 0.72rem; line-height: 1.66; }
@media (max-width: 700px) {
  .sess-body pre { font-size: 0.68rem; }
  .sess-body .banner { font-size: 0.6rem; }
}
.sess-foot {
  padding: 12px 16px; border-top: 1px solid var(--term-rule);
  background: var(--term-bar);
  font-family: var(--mono); font-size: 0.72rem; color: var(--term-dim);
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  line-height: 1.6;
}
.sess-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; align-self: center; }
.sess-foot code { background: rgba(255,255,255,0.06); border-color: var(--term-rule); color: var(--term-fg); }

/* the launcher's own ANSI palette */
.c-chain  { color: var(--term-chain); }
.c-steel  { color: var(--term-steel); }
.c-ok     { color: var(--term-ok); }
.c-warn   { color: var(--term-warn); }
.c-pass   { color: var(--term-ok); }
.c-dim    { color: var(--term-dim); }
.c-rule   { color: var(--term-rule); }
.c-bold   { color: #ffffff; font-weight: 700; }
.c-prompt { color: var(--accent); }
.c-cmd    { color: #ffffff; }

/* notes beside the captured run */
.run-notes {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px;
}
@media (max-width: 980px) { .run-notes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .run-notes { grid-template-columns: 1fr; } }
.rn {
  border: 1px solid var(--border); border-top: 2px solid var(--accent-line);
  border-radius: var(--radius); background: var(--surface); padding: 18px;
}
.rn h3 { font-size: 0.86rem; line-height: 1.35; }
.rn p { color: var(--muted); font-size: 0.86rem; margin-top: 8px; }

/* ============================ HOW-IT-WORKS STRIP ============================ */
.pipe {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch; gap: 0;
}
@media (max-width: 860px) { .pipe { grid-template-columns: 1fr; gap: 14px; } }
.pnode {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 22px;
}
.pnode .pi { color: var(--accent); width: 30px; height: 30px; margin-bottom: 12px; }
.pnode h3 { font-size: 1rem; }
.pnode p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.pnode .tag { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
/* the chain-link connector between nodes */
.plink { display: flex; align-items: center; justify-content: center; width: 66px; color: var(--accent); }
.plink svg { width: 40px; height: 26px; }
@media (max-width: 860px) {
  .plink { width: 100%; height: 30px; transform: rotate(90deg); }
}
.pipe-note { margin-top: 20px; color: var(--faint); font-size: 0.85rem; font-family: var(--mono); text-align: center; }

/* ============================ ROADMAP / AGENT SECTIONS ============================ */
.notship {
  display: flex; align-items: flex-start; gap: 13px;
  border: 1px solid var(--refuse); border-left: 3px solid var(--refuse);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--refuse) 9%, transparent);
  padding: 16px 20px; color: var(--muted); font-size: 0.94rem;
}
.notship svg { color: var(--refuse); flex: none; margin-top: 3px; }
.notship strong { color: var(--text); }

.agent { position: relative; }
.agent-first { border-top: none; padding-top: 0; }
.agent .flag-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-wash);
  border: 1px solid var(--accent-line); border-radius: 20px; padding: 5px 12px; margin-bottom: 18px;
}
.agent .flag-badge.is-planned {
  color: var(--refuse);
  background: color-mix(in srgb, var(--refuse) 9%, transparent);
  border-color: color-mix(in srgb, var(--refuse) 42%, transparent);
}
.agent-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: start; }
@media (max-width: 980px) { .agent-grid { grid-template-columns: 1fr; gap: 30px; } }
.agent h2 { font-size: var(--step-3); line-height: 1.1; }
.agent .lead { font-size: 1.1rem; color: var(--text); margin: 16px 0 14px; font-family: var(--mono); font-weight: 600; letter-spacing: -0.01em; }
.agent .desc { color: var(--muted); font-size: 1.02rem; }
.agent .desc + .desc { margin-top: 14px; }
.agent .desc strong { color: var(--text); }

.usecases { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.usecases .uc {
  font-family: var(--mono); font-size: 0.74rem;
  border: 1px solid var(--border); border-radius: 20px; padding: 6px 13px; color: var(--muted);
  background: var(--surface);
}

/* authorization callout — the RE guardrail box */
.guardrail {
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  padding: 18px 20px; margin: 24px 0;
}
.guardrail h3 { font-size: 0.86rem; display: flex; align-items: center; gap: 9px; letter-spacing: 0; }
.guardrail p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.guardrail .lock { color: var(--accent); flex: none; }
.guardrail code { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: var(--accent-line); }

/* example workflow — a "spec sheet" with numbered steps */
.workflow {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.wf-top {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.wf-top .lamp { width: 9px; height: 9px; background: var(--border-2); }
.wf-top .title { margin-left: 6px; font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.wf-body { padding: 8px 6px; margin: 0; list-style: none; counter-reset: wf; }
.wf-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 13px 14px; align-items: start; position: relative; }
.wf-step + .wf-step { border-top: 1px dashed var(--border); }
.wf-step .n {
  counter-increment: wf; font-family: var(--mono); font-weight: 700; font-size: 0.78rem;
  color: var(--accent); background: var(--accent-wash); border: 1px solid var(--accent-line);
  border-radius: 7px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.wf-step .n::before { content: counter(wf, decimal-leading-zero); }
.wf-step .s-t { font-family: var(--mono); font-weight: 640; font-size: 0.9rem; }
.wf-step .s-d { color: var(--muted); font-size: 0.86rem; margin-top: 3px; }
.wf-step .s-d code { font-size: 0.82em; }
.wf-step .s-d em { color: var(--faint); font-style: normal; font-family: var(--mono); font-size: 0.9em; }
.wf-foot {
  padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--mono); font-size: 0.74rem; color: var(--faint);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.wf-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

.agent-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ============================ SAFETY ============================ */
.safety-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 920px) { .safety-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .safety-grid { grid-template-columns: 1fr; } }
.safe {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 24px;
  position: relative;
}
.safe::before { /* left industrial accent bar */
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px;
  background: var(--accent-line); border-radius: 3px;
}
.safe .si { color: var(--accent); width: 26px; height: 26px; margin-bottom: 12px; }
.safe h3 { font-size: 0.98rem; }
.safe p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.safe p code { font-size: 0.8em; }
.safe p em { color: var(--text); font-style: normal; }

.safety-foot {
  margin-top: 22px; border: 1px dashed var(--border-2); border-radius: var(--radius);
  padding: 18px 22px; color: var(--muted); font-size: 0.92rem;
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: nowrap;
}
.safety-foot > svg { color: var(--accent); flex: none; margin-top: 3px; }
.safety-foot strong { color: var(--text); }
@media (max-width: 560px) { .safety-foot { flex-wrap: wrap; } }

/* ============================ PLATFORM (four planes) ============================ */
.planes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 920px) { .planes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .planes { grid-template-columns: 1fr; } }
.plane {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 20px;
  display: flex; flex-direction: column;
}
.plane .role { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.plane h3 { font-size: 0.98rem; margin: 8px 0 6px; }
.plane p { color: var(--muted); font-size: 0.86rem; flex: 1; }
.plane .port {
  margin-top: 14px; font-family: var(--mono); font-size: 0.72rem; color: var(--faint);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pill {
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--border-2); border-radius: 20px; padding: 2px 9px;
  color: var(--faint);
}
.pill-on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }

/* ============================ INSTALL PATHS ============================ */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }
.path {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 24px;
}
.path.is-full { border-color: var(--accent-line); }
.path-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; flex-wrap: wrap; }
.path-head h3 { font-size: 1.1rem; }
.path-tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--border-2); border-radius: 20px; padding: 3px 10px; color: var(--faint);
}
.path-tag-on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }
.path-sub { color: var(--muted); font-size: 0.92rem; }
.ticks { list-style: none; margin: 16px 0 0; padding: 0; }
.ticks li {
  position: relative; padding-left: 26px; margin-bottom: 9px;
  color: var(--muted); font-size: 0.9rem; line-height: 1.55;
}
.ticks li strong { color: var(--text); }
.ticks li::before {
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-weight: 700;
}
.ticks li.yes::before { content: "✓"; color: var(--ok); }
.ticks li.no::before { content: "✗"; color: var(--refuse); }
.path-note {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
  color: var(--faint); font-size: 0.84rem; line-height: 1.6;
}

/* ============================ GET STARTED ============================ */
.start-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; margin-top: 40px; }
@media (max-width: 980px) { .start-grid { grid-template-columns: 1fr; gap: 26px; } }
.start-copy h3 { font-size: 1rem; margin-bottom: 14px; }
.cmdlist { list-style: none; margin: 0 0 18px; padding: 0; }
.cmdlist li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.cmdlist li code { align-self: flex-start; font-size: 0.8rem; }
.cmdlist li span { color: var(--muted); font-size: 0.84rem; }
.start-copy .prereq, .prereq {
  margin-top: 4px; margin-bottom: 4px; font-size: 0.84rem; color: var(--faint); line-height: 1.7;
}
.start-copy .hero-cta { margin-top: 20px; }
.start-copy .small { margin-bottom: 4px; }

/* ============================ FINAL CTA + FOOTER ============================ */
.final { text-align: center; }
.final .eyebrow { justify-content: center; }
.final h2 { font-size: var(--step-3); }
.final p { color: var(--muted); margin: 16px auto 28px; max-width: 58ch; font-size: 1.04rem; }
.final .hero-cta { justify-content: center; }

footer { border-top: 1px solid var(--border); padding: 40px 0 48px; }
.foot { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.foot .brand { align-items: flex-start; }
.foot-col h2 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; font-weight: 600; }
.foot-cols { display: flex; gap: 54px; flex-wrap: wrap; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: 0.85rem; margin-bottom: 9px; }
.foot-col a:hover { color: var(--accent); }
.foot-legal { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.8rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-legal .mono { color: var(--faint); }

/* ---- phones: tighten scale so the mono display + letterspaced eyebrows fit ---- */
@media (max-width: 480px) {
  :root { --step-4: clamp(1.9rem, 8.4vw, 2.5rem); --step-3: clamp(1.45rem, 5.8vw, 1.9rem); }
  .wrap { padding: 0 18px; }
  section { padding: 54px 0; }
  .eyebrow { letter-spacing: 0.12em; font-size: 0.65rem; flex-wrap: wrap; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .st:first-child { grid-column: 1 / -1; }
  .nav-links { gap: 10px; }
  .nav { gap: 10px; }
  .brand { font-size: 0.9rem; gap: 9px; }
  .brand .mark { width: 26px; height: 26px; }
  .brand small { display: none; }
  .nav .btn { padding: 9px 12px; font-size: 0.8rem; }
  .icon-btn { width: 34px; height: 34px; }
  .hero-art { padding: 18px; }
  .safe, .path, .plane { padding: 18px; }
  .foot-cols { gap: 28px; }
}

/* =====================================================================
   MCP page — access, tool groups, code cards, trace
   ===================================================================== */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 16px;
  border: 1px solid var(--refuse);
  border-left: 3px solid var(--refuse);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--refuse) 9%, transparent);
  padding: 22px 24px;
}
.callout > svg { color: var(--refuse); flex: none; margin-top: 4px; }
.callout > div { min-width: 0; }
.callout h2 { font-size: 1.05rem; }
.callout p { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }
.callout p + p { margin-top: 12px; }
.callout strong { color: var(--text); }
@media (max-width: 560px) { .callout { grid-template-columns: 1fr; } .callout > svg { display: none; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split > * { min-width: 0; }
.factcard {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 22px 24px;
}
.factcard.is-open { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.factcard.is-shut { border-color: var(--accent-line); }
.factcard .fc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.factcard h3 { font-size: 1rem; }
.factcard .fc-state {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 20px; padding: 3px 10px; border: 1px solid var(--border-2); color: var(--faint);
}
.factcard.is-open .fc-state { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.factcard.is-shut .fc-state { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }
.factcard p { color: var(--muted); font-size: 0.92rem; }
.factcard p + p { margin-top: 10px; }

.toolgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 18px; margin-top: 34px; }
.tgroup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 11px;
}
.tgroup .tg-head { display: flex; align-items: center; gap: 11px; }
.tgroup .tg-icon {
  width: 34px; height: 34px; flex: none;
  background: var(--accent-wash); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.tgroup .tg-icon svg { width: 19px; height: 19px; }
.tgroup h3 { font-size: 0.96rem; }
.tgroup .tg-n { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: var(--faint); flex: none; }
.tgroup p { color: var(--muted); font-size: 0.88rem; }
.tnames { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tnames code { font-size: 0.7rem; padding: 2px 7px; background: var(--surface-2); }

.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 34px;
}
.connect-grid > * { min-width: 0; }
.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.code-head {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.code-head .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-2);
  flex: none;
}
.code-head .dot:first-child { background: var(--refuse); opacity: 0.75; }
.code-head .dot:nth-child(2) { background: var(--accent); opacity: 0.75; }
.code-head .dot:nth-child(3) { background: var(--ok); opacity: 0.75; }
.code-title {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin-left: auto;
}
.code-card pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.7;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.code-card pre code {
  color: var(--text);
  font-family: var(--mono);
  background: none; border: 0; padding: 0; font-size: inherit;
}
.code-note {
  padding: 12px 18px; border-top: 1px dashed var(--border);
  color: var(--faint); font-size: 0.78rem; line-height: 1.6;
}

.trace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.trace-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.trace-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.trace-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}
.sub-h {
  margin-top: 40px; font-size: 1.05rem;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.steps { list-style: none; counter-reset: st; margin: 4px 0 0; padding: 0; max-width: 74ch; }
.steps li {
  counter-increment: st;
  display: grid; grid-template-columns: 30px 1fr; gap: 14px;
  padding: 15px 0; border-top: 1px dashed var(--border);
  color: var(--muted); font-size: 0.94rem;
}
.steps li::before {
  content: counter(st, decimal-leading-zero);
  font-family: var(--mono); font-weight: 700; font-size: 0.76rem;
  color: var(--accent); background: var(--accent-wash); border: 1px solid var(--accent-line);
  border-radius: 7px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.steps li strong { color: var(--text); font-family: var(--mono); font-weight: 640; }
.steps li code { font-size: 0.78rem; }

.cta-section { text-align: center; }
.cta-section .eyebrow { justify-content: center; }
.cta-inner h2 { font-size: var(--step-3); color: var(--text); }
.cta-inner p { color: var(--muted); font-size: 1.02rem; margin: 14px auto 0; max-width: 60ch; }
.cta-inner .installbar { max-width: 640px; margin: 26px auto 0; text-align: left; }
.cta-inner .hero-cta { justify-content: center; }

@media (max-width: 640px) {
  .toolgroups, .connect-grid, .trace-grid { grid-template-columns: 1fr; }
}
