/* ───────────────────────── Tokens ───────────────────────── */
:root {
  color-scheme: dark;
  --bg: #07080b;
  --bg-raised: #0b0d12;
  --panel: #0e1117;
  --panel-2: #131720;
  --line: rgba(var(--tint), 0.08);
  --line-strong: rgba(var(--tint), 0.15);
  --fg: #eef0f4;
  --fg-muted: #a3aab6;
  --fg-dim: #7b8291;

  --c1: #35d6ff;
  --c2: #85e66b;
  --c3: #ffd84d;
  --c4: #ff9a4d;
  --c5: #ff4fa3;
  --c6: #b78cff;
  --spectrum: linear-gradient(90deg, var(--c1), var(--c2) 28%, var(--c3) 48%, var(--c4) 67%, var(--c5) 84%, var(--c6));

  --ok: #4ade80;
  --ok-ink: #052e16;
  --accent-ink: #04131a;
  /* Lucide check (same path as the sprite) for mask-drawn ticks; the mask centres it. */
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --warn: #fbbf24;
  --err: #f87171;
  --info: #38bdf8;

  --env-dev: var(--c1);
  --env-qa: var(--c2);
  --env-uat: var(--c3);
  --env-prod: var(--c5);

  --radius: 16px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 68px;

  /* Theme-dependent surfaces. --tint is the RGB channel used for translucent fills and hairlines. */
  --tint: 255, 255, 255;
  --btn-hover: #ffffff;
  --nav-glass: rgba(7, 8, 11, 0.72);
  --nav-solid: rgba(7, 8, 11, 0.96);
  --chip-glass: rgba(14, 17, 23, 0.82);
  --console-top: #10131a;
  --console-bottom: #0a0c11;
  --console-ring: rgba(0, 0, 0, 0.6);
  --code-bg: rgba(0, 0, 0, 0.35);
  --shadow-panel: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  --shadow-chip: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  --diff-del-fg: #fecaca;
  --diff-add-fg: #bbf7d0;
  --blob-opacity: 1;
  --logo-dark: block;
  --logo-light: none;
}

/* Light theme: deeper spectrum stops keep brand hues legible as text on white (≥4.5:1). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-raised: #ffffff;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.16);
  --fg: #0b1220;
  --fg-muted: #4a5568;
  --fg-dim: #64708a;

  --c1: #0891b2;
  --c2: #15803d;
  --c3: #b45309;
  --c4: #c2410c;
  --c5: #be185d;
  --c6: #7c3aed;

  --ok: #15803d;
  --ok-ink: #ffffff;
  --accent-ink: #ffffff;
  --warn: #b45309;
  --err: #dc2626;
  --info: #0369a1;

  --tint: 15, 23, 42;
  --btn-hover: #1e293b;
  --nav-glass: rgba(247, 248, 251, 0.78);
  --nav-solid: rgba(247, 248, 251, 0.98);
  --chip-glass: rgba(255, 255, 255, 0.88);
  --console-top: #ffffff;
  --console-bottom: #f6f8fb;
  --console-ring: rgba(15, 23, 42, 0.04);
  --code-bg: #f3f5f9;
  --shadow-panel: 0 24px 60px -32px rgba(15, 23, 42, 0.22), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
  --shadow-chip: 0 16px 40px -16px rgba(15, 23, 42, 0.28);
  --diff-del-fg: #991b1b;
  --diff-add-fg: #166534;
  --blob-opacity: 0.55;
  --logo-dark: none;
  --logo-light: block;
}

.logo-on-dark { display: var(--logo-dark); }
.logo-on-light { display: var(--logo-light); }

.theme-toggle {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--fg); background: rgba(var(--tint), 0.06); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* Theme flips are one GPU cross-fade of a page snapshot (View Transitions), not
   thousands of per-element colour transitions. Element transitions are paused
   for the swap so the new snapshot is already in its final colours. */
.theme-instant, .theme-instant *, .theme-instant *::before, .theme-instant *::after { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; animation-timing-function: ease-out; }

/* ───────────────────────── Base ───────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, pre { font-family: var(--font-mono); }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:focus-visible { outline: 2px solid var(--c1); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.spectrum-text {
  font-style: normal;
  background: var(--spectrum);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: spectrum-shift 8s ease-in-out infinite alternate;
}
@keyframes spectrum-shift { to { background-position: 100% 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 0 0 1px rgba(var(--tint), 0.1), 0 8px 30px -8px rgba(53, 214, 255, 0.45);
}
.btn-primary:hover { background: var(--btn-hover); box-shadow: 0 0 0 1px rgba(var(--tint), 0.2), 0 10px 40px -6px rgba(255, 79, 163, 0.5); }
.btn-primary .i { transition: transform 0.2s var(--ease-out); }
.btn-primary:hover .i { transform: translateX(3px); }
.btn-ghost { border-color: var(--line-strong); background: rgba(var(--tint), 0.03); color: var(--fg); }
.btn-ghost:hover { background: rgba(var(--tint), 0.08); border-color: rgba(var(--tint), 0.25); }

/* ───────────────────────── Scroll progress + nav ───────────────────────── */
.scroll-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--spectrum); transform-origin: 0 50%; transform: scaleX(0); }

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: var(--nav-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { margin-right: 20px; }
.nav-links { margin-right: 8px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; }
.brand img { width: 60px; height: auto; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover, .nav-links a.is-current { color: var(--fg); background: rgba(var(--tint), 0.06); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(56px, 10vh, 120px));
  overflow: hidden;
  isolation: isolate;
}
.hero-ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--blob-opacity); }
.blob { position: absolute; border-radius: 50%; opacity: 0.35; will-change: transform; background: radial-gradient(closest-side, var(--blob), transparent); }
.blob-a { --blob: var(--c1); width: 720px; height: 720px; left: -220px; top: -60px; opacity: 0.3; animation: drift 18s ease-in-out infinite alternate; }
.blob-b { --blob: var(--c5); width: 660px; height: 660px; right: -180px; top: 20px; opacity: 0.28; animation: drift 22s ease-in-out infinite alternate-reverse; }
.blob-c { --blob: var(--c3); width: 580px; height: 580px; left: calc(40% - 100px); top: 420px; opacity: 0.18; animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(60px, -40px, 0) scale(1.1); } }
.grid-floor {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(var(--tint), 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--tint), 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 80%);
}

.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.display {
  font-size: clamp(40px, 7.4vw, 96px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.display .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.display .line > span { display: inline-block; }
.lede { max-width: 640px; font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.hero-stage {
  position: relative;
  margin-top: clamp(56px, 8vh, 96px);
  padding-bottom: 120px;
  perspective: 1600px;
}
.console {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--console-top), var(--console-bottom));
  box-shadow:
    0 0 0 1px var(--console-ring),
    0 40px 120px -30px rgba(53, 214, 255, 0.25),
    0 60px 160px -40px rgba(255, 79, 163, 0.25);
  overflow: hidden;
  transform-origin: 50% 0%;
  will-change: transform;
}
.console::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--spectrum);
  opacity: 0.8;
}
.console-chrome {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(var(--tint), 0.12); }
.console-url { flex: 1; text-align: center; }
.env-badge { padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 11px; letter-spacing: 0.08em; }
.env-badge.env-prod { color: var(--c5); background: rgba(255, 79, 163, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.35); }

.console-body { display: grid; grid-template-columns: 220px 1fr; min-height: 420px; }
.console-side { border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 16px; }
.ws-switch { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 10px; background: rgba(var(--tint), 0.04); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.ws { text-align: center; padding: 6px 0; border-radius: 8px; color: var(--fg-dim); }
.ws-active { background: rgba(var(--tint), 0.1); color: var(--fg); }
.side-list { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--fg-muted); }
.side-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.side-list li .i { width: 16px; height: 16px; }
.side-list li.is-active { background: rgba(53, 214, 255, 0.1); color: var(--fg); }
.side-list li.is-active .i { color: var(--c1); }

.console-main { padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--tint), 0.02); display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 11px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 12px; font-family: var(--font-mono); }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.warn { color: var(--warn); }

.env-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.env-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(var(--tint), 0.03); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.env-chip code { margin-left: auto; font-size: 11px; color: var(--fg-muted); }
.env-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.env-dot.dev { background: var(--env-dev); box-shadow: 0 0 10px var(--env-dev); }
.env-dot.qa { background: var(--env-qa); box-shadow: 0 0 10px var(--env-qa); }
.env-dot.uat { background: var(--env-uat); box-shadow: 0 0 10px var(--env-uat); }
.env-dot.prod { background: var(--env-prod); box-shadow: 0 0 10px var(--env-prod); }

.activity { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.activity-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; font-size: 13px; color: var(--fg-muted); border-top: 1px solid var(--line); }
.activity-row:first-child { border-top: 0; }
.activity-row b { color: var(--fg); font-weight: 600; }
.activity-row time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); }

.st { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.st .i { width: 14px; height: 14px; }
.st.ok { color: var(--ok); background: rgba(74, 222, 128, 0.12); }
.st.warn { color: var(--warn); background: rgba(251, 191, 36, 0.12); }
.st.info { color: var(--info); background: rgba(56, 189, 248, 0.12); }

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--chip-glass);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-chip);
  white-space: nowrap;
}
.chip-a { left: -12px; top: 22%; }
.chip-b { right: -16px; top: 46%; }
.chip-c { left: 6%; bottom: 60px; }

/* ───────────────────────── Statement ───────────────────────── */
.statement { padding-block: clamp(80px, 14vh, 160px); }
.statement-text {
  max-width: 980px;
  font-size: clamp(28px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.statement-text .w { transition: none; }

/* ───────────────────────── Sections ───────────────────────── */
.section { padding-block: clamp(96px, 14vh, 160px); }
.section-head { display: flex; flex-direction: column; gap: 18px; max-width: 620px; }
.section-head.center { margin-inline: auto; text-align: center; align-items: center; }
.section-head h2, .toolkit-head h2, .pipeline-copy h2 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 800; letter-spacing: -0.035em; }
.section-lede { font-size: 17px; color: var(--fg-muted); max-width: 560px; }

.panel {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow-panel);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.panel-head > .i { color: var(--fg-muted); }

.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.split.reverse > :first-child { order: 2; }

.ticks { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ticks li { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); font-size: 15px; }
.ticks .i { color: var(--ok); width: 16px; height: 16px; }

.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(var(--tint), 0.07); color: var(--fg-muted); }
.tag.ok { background: rgba(74, 222, 128, 0.12); color: var(--ok); }

/* ───────────────────────── Workspaces ───────────────────────── */
.ws-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.ws-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.ws-card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 2px;
  background: var(--ws);
  box-shadow: 0 0 30px 4px var(--ws);
  opacity: 0.8;
}
.ws-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -120px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--ws), transparent);
  opacity: 0.16;
  transition: opacity 0.3s;
}
.ws-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.ws-card:hover::after { opacity: 0.22; }
.ws-code { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ws); letter-spacing: 0.1em; }
.ws-card h3 { font-size: 24px; font-weight: 700; }
.ws-card p { color: var(--fg-muted); font-size: 15px; }
.ws-meta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-dim); font-family: var(--font-mono); }
.ws-meta .i { width: 15px; height: 15px; }

.marquee {
  margin-top: 56px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 12px; padding-right: 12px; }
.marquee li {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--tint), 0.025);
  font-size: 14px;
  color: var(--fg-muted);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────────────────────── Pipeline ───────────────────────── */
.pipeline { position: relative; padding-block: clamp(96px, 12vh, 140px); }
.motion .pipeline.is-pinnable { padding-block: 0; }
.pipeline-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.motion .pipeline.is-pinnable .pipeline-inner { min-height: 100vh; padding-top: var(--nav-h); }
.pipeline-copy { display: flex; flex-direction: column; gap: 18px; }

.steps { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.steps li {
  display: flex;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  opacity: 0.45;
  transition: opacity 0.35s, background-color 0.35s, border-color 0.35s;
}
.steps li.is-active { opacity: 1; }
.steps li.is-current { background: rgba(var(--tint), 0.04); border-color: var(--line); }
.step-n { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); padding-top: 3px; }
.steps li.is-current .step-n { color: var(--c1); }
.steps b { display: block; font-size: 16px; }
.steps span:not(.step-n) { font-size: 14px; color: var(--fg-muted); }

.board { border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); overflow: hidden; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.board-title { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.board-title .i { color: var(--fg-muted); }
.board-route { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }
.board-route i { font-style: normal; color: var(--fg-dim); padding-inline: 4px; }

.track {
  --p: 1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 72px 20px 28px;
}
.track-line { position: absolute; left: calc(20px + 12.5% - 14px * 0.75); right: calc(20px + 12.5% - 14px * 0.75); top: 36px; height: 2px; background: rgba(var(--tint), 0.08); border-radius: 2px; }
.track-fill { position: absolute; inset: 0; background: var(--spectrum); transform-origin: 0 50%; transform: scaleX(var(--p)); border-radius: 2px; box-shadow: 0 0 12px rgba(255, 216, 77, 0.4); }

.packet {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 0 0 4px rgba(var(--tint), 0.08), 0 0 30px rgba(var(--tint), 0.4);
  will-change: transform;
  white-space: nowrap;
}
.packet .i { width: 14px; height: 14px; }
.motion .packet { display: inline-flex; }

.env {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(var(--tint), 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.env-node {
  position: absolute;
  left: 50%;
  top: -42px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid rgba(var(--tint), 0.2);
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.env header b { display: block; font-size: 16px; letter-spacing: 0.04em; }
.env header small { font-size: 12px; color: var(--fg-dim); font-family: var(--font-mono); }
.env-ver { position: relative; height: 28px; font-family: var(--font-mono); font-size: 20px; font-weight: 600; overflow: hidden; }
.env-ver span { position: absolute; inset: 0; transition: transform 0.45s var(--ease-out), opacity 0.45s; }
.ver-old { color: var(--fg-dim); transform: translateY(-100%); opacity: 0; }
.ver-new { color: var(--env); transform: translateY(0); }
.pill { display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(var(--tint), 0.06); color: var(--fg-muted); }
.pill > span { display: none; align-items: center; gap: 6px; }
.pill .i { width: 12px; height: 12px; }

.env[data-state="done"] { border-color: color-mix(in srgb, var(--env) 40%, transparent); background: color-mix(in srgb, var(--env) 6%, transparent); }
.env[data-state="done"] .env-node { background: var(--env); border-color: var(--env); box-shadow: 0 0 16px var(--env); }
.env[data-state="done"] .pill { background: rgba(74, 222, 128, 0.12); color: var(--ok); }
.env[data-state="done"] .pill-done { display: inline-flex; }

.env[data-state="running"] { border-color: var(--line-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--env) 12%, transparent); }
.env[data-state="running"] .env-node { border-color: var(--env); animation: node-ping 1s infinite; }
.env[data-state="running"] .pill { background: rgba(56, 189, 248, 0.12); color: var(--info); }
.env[data-state="running"] .pill-run { display: inline-flex; }

.env[data-state="waiting"] .pill-wait { display: inline-flex; }
.env:is([data-state="running"], [data-state="waiting"]) .ver-old { transform: translateY(0); opacity: 1; }
.env:is([data-state="running"], [data-state="waiting"]) .ver-new { transform: translateY(100%); opacity: 0; }
@keyframes node-ping { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--env) 0%, transparent), 0 0 0 0 var(--env); } 0% { box-shadow: 0 0 0 0 var(--env); } }

.board-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); min-height: 50px; }
.board-foot .i { width: 15px; height: 15px; color: var(--ok); }

/* ───────────────────────── Deploy ───────────────────────── */
.deploy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; align-items: stretch; }
.dialog { overflow: hidden; }
.fields { margin: 0; padding: 8px 18px; }
.fields > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.fields dt { font-size: 13px; color: var(--fg-dim); }
.fields dd { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 500; }
.fields code { font-size: 13px; }
.review { margin: 16px 18px 0; padding: 14px 16px; border-radius: 12px; background: rgba(var(--tint), 0.03); border: 1px solid var(--line); }
.review-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-dim); margin-bottom: 10px; }
.review ul { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--fg-muted); }
.review li { display: flex; align-items: center; gap: 10px; }
.review .i { width: 15px; height: 15px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px; }

.btn-deploy {
  position: relative;
  min-width: 170px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 0;
  background: var(--spectrum);
  color: #08090c;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(255, 154, 77, 0.7);
  transition: transform 0.15s var(--ease-out), filter 0.2s;
}
.btn-deploy:hover { filter: brightness(1.08); }
.btn-deploy.is-pressed { transform: scale(0.94); }
.btn-deploy > span { display: none; align-items: center; justify-content: center; gap: 8px; }
.btn-deploy[data-state="idle"] .btn-label-idle,
.btn-deploy[data-state="busy"] .btn-label-busy,
.btn-deploy:not([data-state]) .btn-label-done,
.btn-deploy[data-state="done"] .btn-label-done { display: inline-flex; }
.btn-deploy[data-state="busy"] { filter: saturate(0.6); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(8, 9, 12, 0.25); border-top-color: #08090c; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cursor {
  position: absolute;
  width: 26px;
  height: 26px;
  right: 40px;
  bottom: 30px;
  fill: #fff;
  stroke: #08090c;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.job { display: flex; flex-direction: column; overflow: hidden; }
.job-status { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.job-status > span { display: none; }
.job-status[data-state="queued"] { background: rgba(var(--tint), 0.08); color: var(--fg-muted); }
.job-status[data-state="queued"] .s-queued { display: inline; }
.job-status[data-state="active"] { background: rgba(56, 189, 248, 0.14); color: var(--info); }
.job-status[data-state="active"] .s-active { display: inline; }
.job-status[data-state="done"] { background: rgba(74, 222, 128, 0.14); color: var(--ok); }
.job-status[data-state="done"] .s-done { display: inline; }
.job-progress { height: 3px; background: rgba(var(--tint), 0.06); }
.job-progress span { display: block; height: 100%; background: var(--spectrum); transform-origin: 0 50%; }
.job-steps { padding: 10px 18px; display: flex; flex-direction: column; flex: 1; }
.job-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 14px;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line);
  transition: color 0.3s, opacity 0.3s;
}
.job-steps li:last-child { border-bottom: 0; }
.job-steps time { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); }
.js-ic { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(var(--tint), 0.18); flex: none; transition: all 0.3s; }
.job-steps li[data-state="pending"] { opacity: 0.4; }
.job-steps li[data-state="pending"] time { visibility: hidden; }
.job-steps li[data-state="running"] { color: var(--fg); }
.job-steps li[data-state="running"] .js-ic { border-color: rgba(56, 189, 248, 0.25); border-top-color: var(--info); animation: spin 0.7s linear infinite; }
.job-steps li[data-state="running"] time { visibility: hidden; }
.job-steps li[data-state="done"] { color: var(--fg); }
.job-steps li[data-state="done"] .js-ic { border-color: var(--ok); background: var(--ok); }
.job-steps li[data-state="done"] .js-ic::after { content: ""; position: absolute; inset: 0; background: var(--ok-ink); -webkit-mask: var(--tick) center / 11px 11px no-repeat; mask: var(--tick) center / 11px 11px no-repeat; }
.job-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--ok);
  font-weight: 600;
  font-size: 14px;
}
.replay {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 18px 16px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.replay:hover { color: var(--fg); border-color: var(--line-strong); }
.replay .i { width: 14px; height: 14px; }

/* ───────────────────────── SOP ───────────────────────── */
.sop { overflow: hidden; }
.sop-env { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }
.sop-steps { padding: 8px; counter-reset: s; }
.sop-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 40px;
  border-radius: 10px;
  font-size: 14px;
  transition: background-color 0.25s, opacity 0.25s;
}
.sop-steps li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  left: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  border: 1px solid var(--line-strong);
}
.sop-steps .m { width: 46px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.m.post { color: var(--c4); }
.m.get { color: var(--ok); }
.m.put { color: var(--info); }
.sop-steps .ms { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); }
.sop-steps li[data-state="pending"] { opacity: 0.38; }
.sop-steps li[data-state="pending"] .ms { visibility: hidden; }
.sop-steps li[data-state="running"] { background: rgba(56, 189, 248, 0.08); }
.sop-steps li[data-state="running"]::before { border-color: rgba(56, 189, 248, 0.3); border-top-color: var(--info); color: transparent; animation: spin 0.8s linear infinite; }
.sop-steps li[data-state="running"] .ms { visibility: hidden; }
.sop-steps li[data-state="done"]::before { content: "✓"; background: rgba(74, 222, 128, 0.15); border-color: rgba(74, 222, 128, 0.5); color: var(--ok); }
.sop-var {
  margin: 0 16px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(183, 140, 255, 0.4);
  background: rgba(183, 140, 255, 0.06);
  font-size: 13px;
  color: var(--fg-muted);
}
.sop-var code { color: var(--c6); }
.sop-var span { margin-left: 6px; font-family: var(--font-mono); color: var(--fg); }
.sop-summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.sop-summary b { color: var(--fg); }
.sop-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(var(--tint), 0.07); overflow: hidden; }
.sop-bar span { display: block; height: 100%; background: var(--ok); transform-origin: 0 50%; }
[data-sop-time] { font-family: var(--font-mono); }

/* ───────────────────────── Config matrix ───────────────────────── */
.matrix-wrap { margin-top: 56px; overflow: hidden; }
.matrix-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 160px;
  background: linear-gradient(90deg, transparent, rgba(53, 214, 255, 0.12), transparent);
  border-right: 1px solid rgba(53, 214, 255, 0.5);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.matrix { overflow-x: auto; }
.mrow { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(90px, 1fr)); align-items: center; border-bottom: 1px solid var(--line); min-width: 640px; }
.mrow > span { padding: 14px 18px; font-size: 14px; }
.mhead > span { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); }
.mrow code { font-size: 13px; color: var(--fg); }
.cell { --drift: 1; position: relative; font-family: var(--font-mono); font-size: 13px !important; color: var(--fg-muted); }
.cell.drift {
  color: color-mix(in srgb, var(--warn) calc(var(--drift) * 100%), var(--fg-muted));
  background: rgba(251, 191, 36, calc(var(--drift) * 0.1));
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, calc(var(--drift) * 0.45));
  font-weight: 600;
}
.cell.drift::after {
  content: "≠";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--warn);
  opacity: var(--drift);
}
.matrix-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 16px 18px; font-size: 13px; color: var(--fg-muted); }
.legend { display: inline-flex; align-items: center; gap: 8px; }
.legend b { color: var(--fg); font-variant-numeric: tabular-nums; }
.sw { width: 12px; height: 12px; border-radius: 4px; }
.sw.sync { background: rgba(var(--tint), 0.12); }
.sw.drift { background: rgba(251, 191, 36, 0.3); box-shadow: inset 0 0 0 1px var(--warn); }
.matrix-note { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); }

/* ───────────────────────── Director ───────────────────────── */
.director-stack { display: flex; flex-direction: column; gap: 16px; }
.profile-body { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 16px 18px; }
.components { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 28px; font-size: 14px; color: var(--fg-muted); }
.components li { display: flex; align-items: center; gap: 10px; }
.cb { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-strong); position: relative; }
.cb.on { background: var(--c1); border-color: var(--c1); }
.cb.on::after { content: ""; position: absolute; inset: 0; background: var(--accent-ink); -webkit-mask: var(--tick) center / 10px 10px no-repeat; mask: var(--tick) center / 10px 10px no-repeat; }
.profile-actions { display: flex; gap: 8px; }

.diff { overflow: hidden; }
.diff-count { font-family: var(--font-mono); font-size: 12px; color: var(--warn); font-weight: 500; }
.toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
}
.toggle .knob { position: relative; width: 30px; height: 18px; border-radius: 999px; background: rgba(var(--tint), 0.12); transition: background-color 0.2s; }
.toggle .knob::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); transition: transform 0.2s var(--ease-out); }
.toggle[aria-pressed="true"] { color: var(--fg); }
.toggle[aria-pressed="true"] .knob { background: var(--c2); }
.toggle[aria-pressed="true"] .knob::after { transform: translateX(12px); }

.diff-cols { display: grid; grid-template-columns: 1fr 1fr; }
.diff-col { min-width: 0; border-right: 1px solid var(--line); }
.diff-col:last-child { border-right: 0; }
.diff-label { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--fg-dim); border-bottom: 1px solid var(--line); }
.diff pre { margin: 0; padding: 10px 0; overflow-x: auto; white-space: normal; font-size: 12.5px; line-height: 1.75; }
.dl { --hl: 1; display: block; padding: 0 16px; white-space: pre; color: var(--fg-muted); }
.dl.del { background: rgba(248, 113, 113, calc(var(--hl) * 0.12)); color: color-mix(in srgb, var(--diff-del-fg) calc(var(--hl) * 100%), var(--fg-muted)); box-shadow: inset calc(var(--hl) * 3px) 0 0 var(--err); }
.dl.add { background: rgba(74, 222, 128, calc(var(--hl) * 0.12)); color: color-mix(in srgb, var(--diff-add-fg) calc(var(--hl) * 100%), var(--fg-muted)); box-shadow: inset calc(var(--hl) * 3px) 0 0 var(--ok); }
.diff.only-diff .dl.same { display: none; }

/* ───────────────────────── Templates fan-out ───────────────────────── */
.fanout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 0.9fr) minmax(0, 0.8fr); align-items: center; margin-top: 64px; min-height: 380px; }
.tpl-card { overflow: hidden; }
.tpl-versions { display: flex; gap: 8px; padding: 14px 18px 0; }
.tv { padding: 4px 10px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); border: 1px solid var(--line); }
.tv.is-current { color: var(--bg); background: var(--fg); border-color: var(--fg); font-weight: 600; }
.tpl-code { margin: 14px 18px; padding: 14px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--line); font-size: 12.5px; color: var(--fg-muted); overflow-x: auto; }
.tpl-apply { display: flex; align-items: center; gap: 8px; margin: 0 18px 18px; font-size: 13px; font-weight: 600; color: var(--c1); }
.tpl-apply .i { width: 15px; height: 15px; }

.fan-lines { width: 100%; height: 320px; overflow: visible; }
.fan-lines path { fill: none; stroke: url(#spectrum-stroke); stroke-width: 2; vector-effect: non-scaling-stroke; }
.motion .fan-lines path { vector-effect: none; stroke-dasharray: 1; stroke-dashoffset: 0; }

.fan-targets { display: grid; grid-template-rows: repeat(4, 1fr); height: 320px; gap: 12px; }
.fan-env {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--env) 35%, transparent);
  background: color-mix(in srgb, var(--env) 6%, var(--panel));
  font-weight: 600;
  font-size: 14px;
}
.fan-ver { position: relative; margin-left: auto; width: 32px; height: 22px; overflow: hidden; font-family: var(--font-mono); font-size: 13px; }
.fan-ver > * { position: absolute; inset: 0; text-align: right; }
.fan-ver s { text-decoration: none; color: var(--fg-dim); opacity: 0; transform: translateY(-100%); }
.fan-ver b { color: var(--env); }

/* ───────────────────────── Toolkit (horizontal) ───────────────────────── */
.toolkit { padding-block: clamp(96px, 12vh, 140px); overflow: hidden; }
.motion .toolkit.is-pinnable { padding-block: 0; }
.motion .toolkit.is-pinnable .toolkit-inner { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: var(--nav-h); }
.toolkit-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.toolkit-head h2 { max-width: 640px; margin-top: 18px; }
.toolkit-count { font-family: var(--font-mono); font-size: 14px; color: var(--fg-dim); white-space: nowrap; }
.toolkit-count b { color: var(--fg); font-weight: 600; }
.toolkit-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2));
  will-change: transform;
}
.tool {
  position: relative;
  width: clamp(280px, 30vw, 380px);
  min-height: 300px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--t) 9%, var(--panel-2)), var(--panel) 60%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.tool:hover { border-color: color-mix(in srgb, var(--t) 45%, transparent); transform: translateY(-4px); }
.tool-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--t); background: color-mix(in srgb, var(--t) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent); }
.tool-ic .i { width: 22px; height: 22px; }
.tool h3 { font-size: 22px; font-weight: 700; margin-top: 8px; }
.tool p { font-size: 15px; color: var(--fg-muted); }
.tool-stat { margin-top: auto; font-family: var(--font-mono); font-size: 12px; color: var(--t); }

/* ───────────────────────── Guardrails ───────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 56px; border-radius: var(--radius); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.stat { padding: 32px 24px; background: var(--bg-raised); display: flex; flex-direction: column; gap: 6px; }
.stat strong { font-size: clamp(44px, 5vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat > span { font-size: 14px; color: var(--fg-muted); }
.guard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.guard-item { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(var(--tint), 0.015); display: flex; flex-direction: column; gap: 10px; }
.guard-item .i { width: 22px; height: 22px; color: var(--c1); }
.guard-item h3 { font-size: 17px; font-weight: 700; }
.guard-item p { font-size: 14px; color: var(--fg-muted); }

/* ───────────────────────── CTA + footer ───────────────────────── */
.cta { position: relative; padding-block: clamp(120px, 18vh, 200px); overflow: hidden; isolation: isolate; text-align: center; }
.cta-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 140vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 32% 38%, var(--c1), transparent),
    radial-gradient(closest-side at 68% 34%, var(--c5), transparent),
    radial-gradient(closest-side at 62% 68%, var(--c3), transparent),
    radial-gradient(closest-side at 36% 66%, var(--c6), transparent);
  opacity: 0.3;
  will-change: transform;
  animation: rotate 40s linear infinite;
}
@keyframes rotate { to { rotate: 360deg; } }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cta-mark { width: 96px; height: auto; }
.cta h2 { font-size: clamp(36px, 6vw, 80px); font-weight: 800; letter-spacing: -0.04em; max-width: 900px; }

.footer { border-top: 1px solid var(--line); padding-block: 28px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--fg-dim); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg-muted); font-weight: 600; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1080px) {
  .console-body { grid-template-columns: 1fr; }
  .console-side { display: none; }
  .chip-a { left: 0; }
  .chip-b { right: 0; }
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--nav-solid);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 8px; border-radius: 8px; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  .kpis, .env-strip { grid-template-columns: repeat(2, 1fr); }
  .float-chip { display: none; }

  .ws-grid, .deploy-grid, .guard-grid { grid-template-columns: 1fr; }
  .split, .pipeline-inner { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }

  /* Pipeline turns vertical */
  .track { grid-template-columns: 1fr; padding: 24px 20px 24px 56px; gap: 12px; }
  .track-line { left: 27px; right: auto; top: 48px; bottom: 48px; width: 2px; height: auto; }
  .track-fill { transform-origin: 50% 0; transform: scaleY(var(--p)); }
  .env-node { left: -36px; top: 50%; margin: -7px 0 0; }
  .env { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "h v" "p v"; gap: 6px 12px; }
  .env header { grid-area: h; }
  .env-ver { grid-area: v; width: 72px; align-self: center; text-align: right; }
  .env .pill { grid-area: p; }

  /* Templates stack */
  .fanout { grid-template-columns: 1fr; gap: 20px; min-height: 0; }
  .fan-lines { display: none; }
  .fan-targets { height: auto; grid-template-rows: none; grid-template-columns: repeat(2, 1fr); }
  .fan-env { min-height: 56px; }

  /* Toolkit becomes a grid */
  .toolkit-track { width: auto; flex-wrap: wrap; padding-inline: var(--gutter); }
  .tool { width: 100%; min-height: 0; }
  .toolkit-count { display: none; }
}

@media (max-width: 600px) {
  .console-chrome .console-url { display: none; }
  .console-main { padding: 14px; }
  .activity-row { font-size: 12px; }
  .activity-row:nth-child(n + 3) { display: none; }
  .diff-cols { grid-template-columns: 1fr; }
  .diff-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .components { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px 18px; }
  .fan-targets { grid-template-columns: 1fr; }
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee ul[aria-hidden] { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
}

@media (max-width: 900px) {
  .packet { width: 22px; height: 22px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .packet .i { width: 12px; height: 12px; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
}

@media (max-width: 900px) {
  .theme-toggle { margin-left: auto; }
  .nav-toggle { margin-left: 0; }
}

/* Fade the CTA glow out radially so the section's overflow clip never shows a hard edge. */
.cta-glow {
  mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
}
:root[data-theme="light"] .cta-glow { opacity: 0.18; }

/* ───────────────────────── Demo request form ───────────────────────── */
.demo-form {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 20px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  box-shadow: var(--shadow-chip);
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--fg-muted); }
.field-opt { font-weight: 500; color: var(--fg-dim); }
.field input {
  height: 48px;
  width: 100%;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(var(--tint), 0.03);
  color: var(--fg);
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: var(--fg-dim); opacity: 0.7; }
.field input:focus-visible { outline: none; border-color: var(--c1); box-shadow: 0 0 0 3px rgba(var(--tint), 0.1), 0 0 0 1px var(--c1); }
.field input:user-invalid { border-color: var(--c4); }
.field-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.demo-submit { grid-column: 1 / -1; justify-self: center; min-width: 220px; }
.demo-submit[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.form-status { grid-column: 1 / -1; min-height: 1.4em; margin: -4px 0 0; text-align: center; font-size: 14px; color: var(--fg-muted); }
.form-status.is-error { color: var(--c4); }
.form-status:empty { display: none; }
.demo-done {
  width: min(760px, 100%);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  text-align: left;
}
.demo-form[hidden], .demo-done[hidden] { display: none; }
.demo-done:focus { outline: none; }
.demo-done .i { width: 28px; height: 28px; flex: none; padding: 5px; border-radius: 50%; color: var(--bg); background: var(--c2); stroke-width: 3; }
.demo-done h3 { font-size: 18px; font-weight: 700; }
.demo-done p { margin-top: 4px; color: var(--fg-muted); font-size: 15px; }
@media (max-width: 720px) {
  .demo-form { grid-template-columns: 1fr; padding: 16px; }
  .demo-submit { width: 100%; }
}
