/* ChipPilot — design tokens + base
   Mono-forward, engineering-credible, single signature accent.
*/

:root {
  /* Surfaces */
  --bg:          #08080a;
  --bg-1:        #0c0c10;
  --bg-2:        #111116;
  --bg-3:        #16161c;
  --surface:     #0f0f14;
  --surface-2:   #15151c;
  --border:      #22222a;
  --border-1:    #1a1a22;
  --border-2:    #2c2c36;
  --hairline:    #1d1d25;

  /* Text */
  --fg:          #f3f3f5;
  --fg-1:        #e2e2e8;
  --fg-2:        #b8b8c2;
  --fg-3:        #8f8f9c;
  --fg-4:        #666672;

  /* Signature accent — chartreuse, like a PASS state */
  --acc:         #c5f24a;
  --acc-2:       #d4f86b;
  --acc-ink:     #0a0c00;
  --acc-soft:    rgba(197, 242, 74, 0.12);
  --acc-line:    rgba(197, 242, 74, 0.32);

  /* Semantic */
  --ok:          #c5f24a;
  --info:        #7cc4ff;
  --warn:        #f5b13a;
  --err:         #ff6f6f;
  --proved:      #8ab4ff;

  /* Type */
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1280px;
  --pad: 32px;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;

  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 0 0 1px var(--border);
  --shadow-2: 0 30px 60px -30px rgba(0,0,0,0.7), 0 0 0 1px var(--border);
}

/* Light theme override */
:root[data-theme="light"] {
  --bg:          #f6f5f0;
  --bg-1:        #ffffff;
  --bg-2:        #fafaf6;
  --bg-3:        #f1f0ea;
  --surface:     #ffffff;
  --surface-2:   #f7f6f0;
  --border:      #e2e1d8;
  --border-1:    #ebeae0;
  --border-2:    #d4d3c8;
  --hairline:    #e8e7dd;

  --fg:          #15161a;
  --fg-1:        #2c2d33;
  --fg-2:        #5a5b63;
  --fg-3:        #82838c;
  --fg-4:        #aeafb6;

  --acc-ink:     #0a0c00;
  --acc-soft:    rgba(106, 138, 18, 0.14);
  --acc-line:    rgba(106, 138, 18, 0.36);
}

/* Accent variants applied to :root via [data-accent] */
:root[data-accent="lime"]   { --acc:#c5f24a; --acc-2:#d4f86b; --acc-ink:#0a0c00; --acc-soft:rgba(197,242,74,0.12); --acc-line:rgba(197,242,74,0.32); }
:root[data-accent="cyan"]   { --acc:#7cd9ff; --acc-2:#a8e6ff; --acc-ink:#001018; --acc-soft:rgba(124,217,255,0.12); --acc-line:rgba(124,217,255,0.32); }
:root[data-accent="amber"]  { --acc:#ffb454; --acc-2:#ffc679; --acc-ink:#1a0d00; --acc-soft:rgba(255,180,84,0.12); --acc-line:rgba(255,180,84,0.32); }
:root[data-accent="violet"] { --acc:#b196ff; --acc-2:#c6b1ff; --acc-ink:#0a0420; --acc-soft:rgba(177,150,255,0.14); --acc-line:rgba(177,150,255,0.36); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--f-sans);
  font-feature-settings: "ss01","cv11","cv02";
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15.5px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Typography scale */
.kicker {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
}
.kicker .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--acc);
  border-radius: 999px;
  margin-right: 10px;
  transform: translateY(-1px);
}
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; color: var(--fg); }
h1 { font-size: clamp(40px, 6.4vw, 84px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 480; }
h2 { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.02; letter-spacing: -0.028em; }
h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; }
h4 { font-size: 14px; line-height: 1.3; letter-spacing: 0.01em; font-weight: 500; }

p { margin: 0; color: var(--fg-2); }
.lead { font-size: 17px; line-height: 1.55; color: var(--fg-1); max-width: 60ch; }

code, pre, .mono { font-family: var(--f-mono); }
.mono { font-feature-settings: "calt" 0; }

/* Containers */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section { position: relative; }
.section { padding: 96px 0; border-top: 1px solid var(--hairline); }
.section--lead { padding-top: 56px; }
.section-head {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 64px;
  margin-bottom: 56px;
}
.section-head .lhs { display: flex; flex-direction: column; gap: 12px; }
.section-head .rhs { padding-top: 4px; }
@media (max-width: 880px) {
  .section { padding: 72px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  color: var(--fg);
  background: transparent;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--fg-3); }
.btn--primary {
  background: var(--acc);
  color: var(--acc-ink);
  border-color: var(--acc);
}
.btn--primary:hover { background: var(--acc-2); border-color: var(--acc-2); transform: translateY(-1px); }
.btn--ghost { border-color: var(--border-2); color: var(--fg-1); }
.btn .arr {
  display: inline-block;
  width: 10px; height: 10px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, 1px);
}

/* Chip / tag */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  color: var(--fg-1);
  border-radius: 3px;
  background: var(--bg-2);
  flex-shrink: 0;
  white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--fg-3); }
.chip--ok    { color: var(--ok);     border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.chip--ok .dot    { background: var(--ok); }
.chip--info  { color: var(--info);   border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 8%, transparent); }
.chip--info .dot  { background: var(--info); }
.chip--warn  { color: var(--warn);   border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.chip--warn .dot  { background: var(--warn); }
.chip--err   { color: var(--err);    border-color: color-mix(in srgb, var(--err) 40%, transparent); background: color-mix(in srgb, var(--err) 8%, transparent); }
.chip--err .dot   { background: var(--err); }
.chip--proved { color: var(--proved); border-color: color-mix(in srgb, var(--proved) 40%, transparent); background: color-mix(in srgb, var(--proved) 8%, transparent); }
.chip--proved .dot { background: var(--proved); }
.chip--accent { color: var(--acc); border-color: var(--acc-line); background: var(--acc-soft); }
.chip--accent .dot { background: var(--acc); }

/* Panel / card */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.panel--raised { background: var(--surface-2); box-shadow: var(--shadow-2); }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-1);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.panel-head .lhs { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-head .title { color: var(--fg-1); font-weight: 500; }
.traffic { display: inline-flex; gap: 6px; }
.traffic i { display: block; width: 9px; height: 9px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--border-2); }

.panel-body { padding: 14px; }

/* Code blocks */
pre.code, .code {
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg-1);
  white-space: pre;
  overflow: auto;
  margin: 0;
}
.code .c-key { color: #d6b4ff; }
.code .c-mod { color: var(--acc); }
.code .c-typ { color: #7cd9ff; }
.code .c-str { color: #f5b13a; }
.code .c-com { color: var(--fg-3); font-style: italic; }
.code .c-num { color: #ff9a73; }
.code .c-pun { color: var(--fg-2); }
.code .c-add { color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); display: block; }
.code .c-del { color: var(--err); background: color-mix(in srgb, var(--err) 8%, transparent); display: block; text-decoration: line-through; text-decoration-color: rgba(255,111,111,0.4); }
.code .c-fn  { color: #cfe4a8; }

/* Log line */
.log { font-family: var(--f-mono); font-size: 12px; line-height: 1.75; color: var(--fg-1); }
.log .ts   { color: var(--fg-3); }
.log .lev  { color: var(--fg-2); }
.log .ok   { color: var(--ok); }
.log .err  { color: var(--err); }
.log .info { color: var(--info); }
.log .warn { color: var(--warn); }
.log .acc  { color: var(--acc); }
.log .dim  { color: var(--fg-3); }
.log .sep  { color: var(--fg-4); }

/* Utility */
.hstack { display: flex; align-items: center; gap: 12px; }
.vstack { display: flex; flex-direction: column; gap: 12px; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.muted { color: var(--fg-2); }
.fg-2 { color: var(--fg-2); }
.acc  { color: var(--acc); }
.center { text-align: center; }
.hide-mobile { } @media (max-width: 720px) { .hide-mobile { display: none !important; } }

/* The repeating bg grid + scanlines for hero */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--fg) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--fg) 4%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 90%);
  pointer-events: none;
}
.tick-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--hairline) 1px, transparent 1px);
  background-size: calc(100% / 24) 100%;
  opacity: 0.35;
  pointer-events: none;
}

/* Marquee */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-1);
}
.marquee-track {
  display: flex; gap: 64px;
  padding: 18px 0;
  animation: marq 38s linear infinite;
  white-space: nowrap;
}
.marquee-item {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex; gap: 12px; align-items: center;
}
.marquee-item .dot { width: 4px; height: 4px; border-radius: 999px; background: var(--acc); }
@keyframes marq {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Section labels (left column) */
.sec-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: inline-flex; align-items: center; gap: 10px;
}
.sec-label::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--acc);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-1);
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 120ms ease, background 120ms ease;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-2); }
.nav-cta { display: flex; gap: 8px; }
@media (max-width: 920px) { .nav-links { display: none; } }

/* Logo */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 14.5px;
  letter-spacing: 0.02em;
}
.logo-mark { width: 22px; height: 22px; display:block; }
.logo .ver {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--fg-3);
  padding: 1px 6px;
  border: 1px solid var(--border-2);
  border-radius: 3px;
  letter-spacing: 0.08em;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--hairline);
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 1080px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.hero h1 .acc-word {
  color: var(--acc);
  display: inline;
  font-style: italic;
  font-weight: 400;
  white-space: normal;
}
.hero h1 .acc-word::before {
  content: "/* ";
  font-family: var(--f-mono);
  font-size: 0.32em;
  font-style: normal;
  color: var(--fg-3);
  letter-spacing: 0;
  vertical-align: 0.6em;
  margin-right: 2px;
}
.hero h1 .acc-word::after {
  content: " */";
  font-family: var(--f-mono);
  font-size: 0.32em;
  font-style: normal;
  color: var(--fg-3);
  letter-spacing: 0;
  vertical-align: 0.6em;
  margin-left: 2px;
}
@media (max-width: 1080px) {
  .hero h1 .acc-word {
    display: inline-block;
    white-space: nowrap;
  }
}
.hero-sub { color: var(--fg-1); max-width: 56ch; font-size: 17.5px; line-height: 1.5; }
.hero-meta {
  margin-top: 28px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}
.hero-stats .s { padding-right: 16px; border-right: 1px solid var(--hairline); }
.hero-stats .s:last-child { border-right: 0; }
.hero-stats .v {
  font-family: var(--f-mono); font-size: 22px; color: var(--fg); letter-spacing: -0.02em;
}
.hero-stats .v small { color: var(--fg-3); font-size: 12px; margin-left: 4px; }
.hero-stats .k {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); margin-top: 4px;
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero-stats .s { border-right: 0; }
}

/* Hero artifact card stack */
.artifact {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.run-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.run-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-1);
  background:
    linear-gradient(to bottom, var(--bg-3), var(--surface));
}
.run-head .left { display:flex; align-items:center; gap:10px; min-width:0; }
.run-head .title { font-family: var(--f-mono); font-size: 12px; color: var(--fg-1); letter-spacing: 0.02em; }
.run-head .meta  { font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); }
.run-body { padding: 0; }
.run-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px dashed var(--border-1);
}
.run-row:last-child { border-bottom: 0; }
.run-row .step {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-3); padding-top: 2px;
}
.run-row .body { color: var(--fg-1); font-size: 13px; }
.run-row .body .code-inline {
  font-family: var(--f-mono); font-size: 12px; color: var(--fg-2); background: var(--bg-2); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-1);
}
.run-row .body strong { color: var(--fg); font-weight: 500; }

/* Waveform */
.wave {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-2);
  border-top: 1px solid var(--border-1);
  background: var(--bg-1);
}
.wave .lbl {
  padding: 8px 12px;
  border-right: 1px solid var(--border-1);
  display: flex; align-items: center;
  background: var(--bg-2);
  letter-spacing: 0.06em;
}
.wave svg { width: 100%; height: 28px; display: block; }

/* Loop diagram */
.loop {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.loop .node {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  min-height: 138px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.loop .node .num {
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--fg-3); letter-spacing: 0.18em;
}
.loop .node h4 { font-size: 17px; }
.loop .node p { font-size: 13px; color: var(--fg-2); }
.loop .node::after {
  content: "→";
  position: absolute;
  right: -16px; top: 50%;
  transform: translate(50%, -50%);
  font-family: var(--f-mono);
  color: var(--fg-3);
  font-size: 16px;
  z-index: 2;
}
.loop .node:last-child::after {
  content: "↺";
  color: var(--acc);
}
@media (max-width: 1080px) {
  .loop { grid-template-columns: repeat(3, 1fr); }
  .loop .node:nth-child(3n)::after { display: none; }
}
@media (max-width: 640px) {
  .loop { grid-template-columns: repeat(2, 1fr); }
  .loop .node::after { display: none; }
}

/* Agents grid */
.agents {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.agent {
  grid-column: span 4;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  min-height: 260px;
  overflow: hidden;
}
.agent:hover { border-color: var(--border-2); }
.agent--wide { grid-column: span 6; }
.agent .ix {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-2);
  display: flex; align-items: center; gap: 10px;
}
.agent .ix .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--fg-1);
}
.agent-maturity {
  margin-left: auto;
  border: 1px solid var(--acc-line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--acc);
  background: var(--acc-soft);
  font-size: 10px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.agent h3 { font-size: 22px; letter-spacing: -0.02em; }
.agent p { font-size: 13.5px; color: var(--fg-2); }
.agent .footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agent .footer .muted { min-width: 0; text-align: right; }
.agent .vis {
  height: 78px;
  border: 1px dashed var(--border-1);
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, transparent 0 6px, var(--bg-2) 6px 7px),
    var(--bg-1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.12em;
}
@media (max-width: 980px) {
  .agent, .agent--wide { grid-column: span 6; }
}
@media (max-width: 640px) {
  .agent, .agent--wide { grid-column: span 12; }
}

/* Architecture */
.arch {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 48% 44% at 50% 42%, color-mix(in srgb, var(--acc) 5%, transparent), transparent 70%),
    linear-gradient(to bottom, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.arch-map {
  position: relative;
  min-height: 500px;
  padding: 28px;
  display: grid;
  grid-template-rows: 112px auto auto 1fr auto;
  gap: 20px;
  background:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
}
.arch-map::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 78% at 50% 50%, color-mix(in srgb, var(--acc) 6%, transparent), transparent 72%),
    radial-gradient(ellipse 70% 62% at 50% 58%, color-mix(in srgb, var(--ok) 3%, transparent), transparent 74%),
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 36%, transparent), transparent 18%, transparent 82%, color-mix(in srgb, var(--bg) 36%, transparent));
  opacity: 0.78;
}
.arch-map > * {
  position: relative;
  z-index: 1;
}
.arch-map__rail {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.arch-map__rail--top {
  left: 50%;
  top: 98px;
  width: min(340px, 34vw);
  height: 98px;
  transform: translateX(-50%);
  border-top: 1px dashed var(--border-2);
  border-left: 1px dashed var(--border-2);
  border-right: 1px dashed var(--border-2);
}
.arch-map__rail--top::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: -36px;
  border-left: 1px dashed var(--border-2);
}
.arch-plane-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.arch-tools {
  position: relative;
  width: min(560px, 60%);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  padding-top: 24px;
}
.arch-tools .arch-plane-label {
  position: absolute;
  left: 0;
  top: 0;
}
.arch-node,
.arch-service,
.arch-core,
.arch-policy {
  border: 1px solid var(--border-2);
  background: color-mix(in srgb, var(--bg-1) 92%, transparent);
  border-radius: 8px;
}
.arch-node {
  min-height: 58px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  text-align: center;
  font-family: var(--f-mono);
  color: var(--fg-1);
}
.arch-node span {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.arch-node small,
.arch-service small,
.arch-policy small {
  color: var(--fg-3);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.arch-node--tool {
  border-style: dashed;
  background: color-mix(in srgb, var(--bg-2) 86%, transparent);
}
.arch-node--edge {
  min-height: 66px;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
}
.arch-node--evidence {
  border-color: var(--border-2);
  box-shadow: none;
}
.arch-flow {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(52px, 96px) minmax(330px, 1.65fr) minmax(52px, 96px) minmax(160px, 1fr);
  align-items: center;
  gap: 0;
}
.arch-line {
  height: 1px;
  position: relative;
  background-image: repeating-linear-gradient(
    90deg,
    var(--fg-3) 0 4px,
    transparent 4px 8px
  );
  opacity: 0.72;
}
.arch-line--out {
  background-image: repeating-linear-gradient(
    90deg,
    var(--acc) 0 4px,
    transparent 4px 8px
  );
  opacity: 0.9;
}
.arch-line i {
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  color: var(--fg-3);
  transform: translateY(-50%) rotate(45deg);
}
.arch-line--out i { color: var(--acc); }
.arch-core {
  min-height: 152px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--fg);
  border-color: var(--acc-line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--acc) 13%, var(--bg-2)), color-mix(in srgb, var(--ok) 7%, var(--bg-2))),
    var(--bg-2);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--acc) 10%, transparent),
    0 18px 44px color-mix(in srgb, var(--acc) 8%, transparent);
}
.arch-core::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24px;
  height: 24px;
  border-left: 1px dashed var(--border-2);
}
.arch-core__eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--acc);
  text-transform: uppercase;
}
.arch-core h3 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}
.arch-core p {
  margin: 0 auto;
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
}
.arch-core__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.arch-core__chips span {
  border: 1px solid var(--acc-line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--fg-1);
  background: color-mix(in srgb, var(--acc) 8%, transparent);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.arch-services {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 28px;
}
.arch-services::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  border-top: 1px dashed var(--border-2);
}
.arch-services .arch-plane-label {
  position: absolute;
  left: 0;
  top: -3px;
  transform: translateY(-100%);
}
.arch-service {
  position: relative;
  min-height: 104px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.arch-service::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  height: 28px;
  border-left: 1px dashed var(--border-2);
}
.arch-service span {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--fg-3);
}
.arch-service strong {
  font-size: 13.5px;
  color: var(--fg-1);
  letter-spacing: -0.01em;
}
.arch-policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px;
  background: color-mix(in srgb, var(--acc) 5%, var(--bg-1));
}

.arch-loop-path {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--acc-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--acc) 5%, var(--bg-1));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 5%, transparent);
}
.arch-loop-path span {
  min-width: 0;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: var(--fg-1);
  text-transform: uppercase;
}
.arch-loop-path span:last-child {
  color: var(--acc);
}
.arch-policy > div {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--fg-1);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 980px) {
  .arch-map {
    padding: 24px;
    grid-template-rows: auto auto auto auto;
    gap: 22px;
  }
  .arch-tools { width: min(520px, 76%); }
  .arch-flow {
    grid-template-columns: minmax(136px, 1fr) 44px minmax(260px, 1.4fr) 44px minmax(136px, 1fr);
  }
  .arch-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch-loop-path { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--radius); }
  .arch-services::before,
  .arch-service::before,
  .arch-core::after { display: none; }
  .arch-services .arch-plane-label {
    position: static;
    transform: none;
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .arch-map {
    min-height: 0;
    padding: 18px;
    gap: 16px;
    background-size: 48px 48px;
  }
  .arch-map__rail { display: none; }
  .arch-tools,
  .arch-flow,
  .arch-services,
  .arch-loop-path {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .arch-tools { padding-top: 24px; }
  .arch-tools .arch-plane-label {
    left: 0;
    top: 0;
  }
  .arch-node,
  .arch-node--edge {
    min-height: 0;
    text-align: left;
    align-items: flex-start;
  }
  .arch-line {
    width: 1px;
    height: 26px;
    justify-self: center;
    background-image: repeating-linear-gradient(
      180deg,
      var(--fg-3) 0 4px,
      transparent 4px 8px
    );
  }
  .arch-line--out {
    background-image: repeating-linear-gradient(
      180deg,
      var(--acc) 0 4px,
      transparent 4px 8px
    );
  }
  .arch-line i {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }
  .arch-core {
    min-height: 0;
    text-align: left;
    padding: 18px;
  }
  .arch-core p { margin: 0; }
  .arch-core__chips { justify-content: flex-start; }
  .arch-services { padding-top: 24px; }
  .arch-loop-path {
    border-radius: var(--radius);
    align-items: stretch;
  }
  .arch-loop-path span {
    text-align: left;
    padding: 2px 0;
  }
  .arch-services .arch-plane-label { position: static; transform: none; }
  .arch-policy {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Toolchain rows */
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.tools .row {
  padding: 22px 24px;
  border-right: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-1);
  display: flex; flex-direction: column; gap: 8px;
}
.tools .row:nth-child(2n) { border-right: 0; }
.tools .row:nth-last-child(-n+2) { border-bottom: 0; }
.tools .row .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tools .row h4 { font-size: 16px; }
.tools .row p { font-size: 13px; color: var(--fg-2); }
@media (max-width: 720px) {
  .tools { grid-template-columns: 1fr; }
  .tools .row { border-right: 0; }
  .tools .row:nth-child(2n) { border-right: 0; }
}

/* Security */
.sec-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sec-list .item {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-1);
  border: 1px solid var(--border-1);
  background: var(--bg-1);
  padding: 12px;
  border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
}
.sec-list .item .tick { color: var(--acc); }
@media (max-width: 720px) { .sec-list { grid-template-columns: repeat(2,1fr); } }

.policy-card {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, color-mix(in srgb, var(--acc) 9%, transparent), transparent 72%),
    var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.policy-card .ph {
  padding: 12px 16px; border-bottom: 1px solid var(--border-1);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-2);
}
.policy-card .ph .label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.14em; color: var(--fg-2); text-transform: uppercase; }
.policy-card .row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 16px;
  font-family: var(--f-mono); font-size: 12.5px;
  color: var(--fg-1);
  border-bottom: 1px dashed var(--border-1);
}
.policy-card .row:last-child { border-bottom: 0; }
.policy-card .row .k { color: var(--fg-2); }
.policy-card .row .v { color: var(--fg-1); }
.policy-card .row .v.on { color: var(--ok); }
.policy-card .row .v.off { color: var(--err); }

/* Pilot path */
.pilot {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  counter-reset: pilot;
}
.pilot .p {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
}
.pilot .p::before {
  counter-increment: pilot;
  content: "0" counter(pilot);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-3);
}
.pilot .p h3 { font-size: 17px; }
.pilot .p p { font-size: 13px; color: var(--fg-2); }
.pilot-cta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--fg-2);
  font-size: 13.5px;
}
@media (max-width: 1100px) { .pilot { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .pilot { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .pilot { grid-template-columns: 1fr; } }

/* Workflow demo (tabs) */
.demo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  scroll-margin-top: 96px;
}
.demo-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-2);
  overflow-x: auto;
}
.demo-tabs button {
  flex: 1;
  padding: 14px 18px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  border-right: 1px solid var(--border-1);
  text-align: left;
  white-space: nowrap;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
}
.demo-tabs button:last-child { border-right: 0; }
.demo-tabs button:hover { color: var(--fg); }
.demo-tabs button.on { color: var(--fg); background: var(--surface); }
.demo-tabs button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--acc);
}
.demo-tabs .lab { color: var(--fg-3); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.demo-panes { display: grid; grid-template-columns: 1fr; }
.demo-pane { display: none; grid-template-columns: 1fr 1fr; gap: 0; }
.demo-pane.on { display: grid; }
.demo-pane .col { padding: 22px; border-right: 1px solid var(--border-1); display: flex; flex-direction: column; gap: 14px; }
.demo-pane .col:last-child { border-right: 0; background: var(--bg-1); }
.demo-pane h3 { font-size: 18px; }
.demo-pane .lbl { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.demo-pane .prompt {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--fg-1);
  font-family: var(--f-mono);
}
@media (max-width: 880px) {
  .demo-pane.on { grid-template-columns: 1fr; }
  .demo-pane .col { border-right: 0; border-bottom: 1px solid var(--border-1); }
}

/* Roadmap */
.roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.roadmap .ph {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 200px;
}
.roadmap .ph .v {
  font-family: var(--f-mono);
  font-size: 32px;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.roadmap .ph .v sup {
  color: var(--acc); font-size: 12px;
  letter-spacing: 0.1em;
  vertical-align: super;
  margin-left: 6px;
  border: 1px solid var(--acc-line);
  padding: 2px 6px;
  border-radius: 4px;
}
.roadmap .ph h3 { font-size: 18px; }
.roadmap .ph p { font-size: 13.5px; color: var(--fg-2); }
.roadmap .ph .barwrap { height: 4px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.roadmap .ph .bar { height: 100%; background: var(--acc); }
@media (max-width: 880px) { .roadmap { grid-template-columns: 1fr; } }

/* CTA */
.cta {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
.cta .row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; }
.cta h2 { font-size: clamp(36px, 4.5vw, 64px); }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 880px) { .cta .row { grid-template-columns: 1fr; } .cta .actions { justify-content: flex-start; } }

/* Footer */
footer.foot {
  background: var(--bg-1);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 32px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px;
}
.foot h4 { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.16em; color: var(--fg-3); text-transform: uppercase; margin-bottom: 14px; }
.foot a { display: block; color: var(--fg-2); font-size: 13.5px; padding: 4px 0; }
.foot a:hover { color: var(--fg); }
.foot-legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3);
  letter-spacing: 0.04em;
}
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* "Why ChipPilot" comparison */
.compare {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.compare .c {
  padding: 24px; border-right: 1px solid var(--border-1);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 220px;
}
.compare .c:last-child { border-right: 0; }
.compare .c.us { background: color-mix(in srgb, var(--acc) 6%, var(--surface)); }
.compare .c .tag {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3);
}
.compare .c.us .tag { color: var(--acc); }
.compare .c h3 { font-size: 18px; }
.compare .c p { font-size: 13px; color: var(--fg-2); }
.compare .c.us p { color: var(--fg-1); }
@media (max-width: 980px) { .compare { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .compare { grid-template-columns: 1fr; } }

/* Tweaks panel position adjustment */
.tp-root { z-index: 100; }
