/* ==========================================================================
   Equinox — shared styles (tokens, base, components, landing)
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #07070c;
  --bg-2: #0d0d15;
  --bg-3: #13131d;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-solid: #11111a;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eceef6;
  --text-2: #a7aabc;
  --text-3: #6f7288;
  --violet: #9945ff;
  --violet-text: #c096ff;
  --green: #14f195;
  --green-text: #3af5a9;
  --cyan: #19c8ff;
  --danger: #ff5c7a;
  --warn: #ffb443;
  --grad: linear-gradient(135deg, #9945ff 0%, #14f195 100%);
  --grad-soft: linear-gradient(135deg, rgba(153, 69, 255, 0.22), rgba(20, 241, 149, 0.16));
  --glow-violet: rgba(153, 69, 255, 0.35);
  --glow-green: rgba(20, 241, 149, 0.28);
  --code-bg: #0a0a12;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1160px;
  --gutter: 16px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grid-line: rgba(255, 255, 255, 0.045);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f6fb;
    --bg-2: #ffffff;
    --bg-3: #eeeef6;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-2: rgba(16, 16, 32, 0.045);
    --surface-solid: #ffffff;
    --border: rgba(16, 16, 32, 0.1);
    --border-strong: rgba(16, 16, 32, 0.2);
    --text: #111221;
    --text-2: #4f5268;
    --text-3: #7d8096;
    --violet-text: #6b25d9;
    --green-text: #0a8a58;
    --cyan: #0a7fb3;
    --danger: #d8304f;
    --warn: #b96f00;
    --glow-violet: rgba(153, 69, 255, 0.22);
    --glow-green: rgba(20, 241, 149, 0.22);
    --code-bg: #101018;
    --shadow: 0 12px 40px rgba(20, 20, 50, 0.12);
    --shadow-sm: 0 2px 10px rgba(20, 20, 50, 0.08);
    --grid-line: rgba(16, 16, 32, 0.055);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6fb;
  --bg-2: #ffffff;
  --bg-3: #eeeef6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(16, 16, 32, 0.045);
  --surface-solid: #ffffff;
  --border: rgba(16, 16, 32, 0.1);
  --border-strong: rgba(16, 16, 32, 0.2);
  --text: #111221;
  --text-2: #4f5268;
  --text-3: #7d8096;
  --violet-text: #6b25d9;
  --green-text: #0a8a58;
  --cyan: #0a7fb3;
  --danger: #d8304f;
  --warn: #b96f00;
  --glow-violet: rgba(153, 69, 255, 0.22);
  --glow-green: rgba(20, 241, 149, 0.22);
  --code-bg: #101018;
  --shadow: 0 12px 40px rgba(20, 20, 50, 0.12);
  --shadow-sm: 0 2px 10px rgba(20, 20, 50, 0.08);
  --grid-line: rgba(16, 16, 32, 0.055);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -10%, var(--glow-violet), transparent 60%),
    radial-gradient(700px 420px at 92% 8%, var(--glow-green), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 80%);
  opacity: 0.9;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--violet-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd { font-family: var(--font-mono); }
code:not(pre code) {
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(153, 69, 255, 0.45); color: #fff; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--green); color: #05130d; padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Buttons & pills
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { text-decoration: none; background: var(--surface); border-color: var(--text-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); color: #05130d; border-color: transparent;
  box-shadow: 0 8px 24px -8px var(--glow-violet), 0 8px 24px -10px var(--glow-green);
}
.btn-primary:hover { background: var(--grad); filter: brightness(1.06); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; border-radius: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn .spinner { display: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.7; }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(20, 241, 149, 0.18); }
.pill-green { color: var(--green-text); border-color: rgba(20, 241, 149, 0.35); background: rgba(20, 241, 149, 0.08); }
.pill-violet { color: var(--violet-text); border-color: rgba(153, 69, 255, 0.4); background: rgba(153, 69, 255, 0.1); }
.pill-warn { color: var(--warn); border-color: rgba(255, 180, 67, 0.4); background: rgba(255, 180, 67, 0.1); }
.pill-danger { color: var(--danger); border-color: rgba(255, 92, 122, 0.4); background: rgba(255, 92, 122, 0.1); }
.pill-muted { color: var(--text-3); }

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, #000 50%, transparent)) {
  .nav { background: var(--bg); }
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; object-fit: contain; flex: none; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: 0.92rem; padding: 8px 12px; border-radius: 9px; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: none; }
}
.nav-menu-btn { display: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px var(--gutter) 14px;
    box-shadow: var(--shadow);
  }
  .nav-menu-btn { display: inline-flex; }
  .nav-actions .hide-mobile { display: none; }
}

/* --------------------------------------------------------------------------
   Cards / glass
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-hover { transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .card-glow::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(135deg, rgba(153, 69, 255, 0.55), transparent 40%, transparent 60%, rgba(20, 241, 149, 0.5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0.7;
  }
}
.flow-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.flow-scroll .flow-svg { min-width: 620px; }

/* --------------------------------------------------------------------------
   Code blocks
   -------------------------------------------------------------------------- */
.code {
  position: relative;
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  color: #e6e8f2;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono); font-size: 0.75rem; color: #8a8ea6; background: rgba(255, 255, 255, 0.02);
}
.code-head .dots { display: inline-flex; gap: 5px; }
.code-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a3c4d; }
.code-head .dots i:nth-child(1) { background: #ff5f57; }
.code-head .dots i:nth-child(2) { background: #febc2e; }
.code-head .dots i:nth-child(3) { background: #28c840; }
.code-head .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code pre { margin: 0; padding: 16px 18px; overflow: auto; font-size: 0.84rem; line-height: 1.65; tab-size: 2; }
.code pre code { font-family: var(--font-mono); color: inherit; background: none; border: 0; padding: 0; font-size: inherit; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05); color: #c2c5d6; font-size: 0.74rem; font-family: var(--font-sans); font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.copy-btn.is-copied { color: #14f195; border-color: rgba(20, 241, 149, 0.5); }
.copy-btn svg { width: 13px; height: 13px; }
.code.code-bare .copy-btn { position: absolute; top: 8px; right: 8px; }
/* token colours (dark code background in both themes) */
.tok-c { color: #6b7088; font-style: italic; }
.tok-s { color: #8fe3b8; }
.tok-n { color: #ffb86c; }
.tok-k { color: #c39bff; }
.tok-p { color: #9ad3ff; }
.tok-f { color: #ffd77a; }
.tok-b { color: #ff9ac9; }
.tok-t { color: #7cd5ff; }
.tok-o { color: #a7abbf; }

/* --------------------------------------------------------------------------
   Reveal / motion
   -------------------------------------------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
html.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
html.js .reveal[data-delay="3"] { transition-delay: 0.24s; }
html.js .reveal[data-delay="4"] { transition-delay: 0.32s; }
html.js .reveal[data-delay="5"] { transition-delay: 0.4s; }

@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; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Splash
   -------------------------------------------------------------------------- */
.splash {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: #07070c;
  color: #eceef6;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.splash::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 30% 40%, rgba(153, 69, 255, 0.28), transparent 60%),
    radial-gradient(600px 400px at 70% 60%, rgba(20, 241, 149, 0.22), transparent 60%);
  animation: splash-glow 2.6s var(--ease) both;
}
@keyframes splash-glow { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
html.no-splash .splash { display: none; }
.splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
body.splash-active { overflow: hidden; }
.splash-inner { position: relative; text-align: center; padding: 0 var(--gutter); }
.splash-mark {
  display: block; width: 112px; height: 112px; margin: 0 auto 22px; object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(153, 69, 255, 0.35)) drop-shadow(0 0 18px rgba(20, 241, 149, 0.25));
  animation: mark-in 1.1s var(--ease) 0.05s both, mark-spin 12s linear 1.15s infinite;
}
@keyframes mark-in { from { opacity: 0; transform: rotate(-240deg) scale(0.3); filter: blur(8px); } to { opacity: 1; transform: none; } }
@keyframes mark-spin { to { transform: rotate(360deg); } }
.splash-word {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 8vw, 4rem); letter-spacing: -0.03em; line-height: 1;
  animation: word-in 0.8s var(--ease) 0.7s both;
}
@keyframes word-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
.splash-line { position: relative; width: min(320px, 70vw); height: 2px; margin: 24px auto 14px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.splash-line::after {
  content: ""; position: absolute; top: 0; left: 0; height: 100%; width: 34%;
  background: var(--grad); border-radius: 2px;
  animation: packet 1.3s var(--ease) 1.05s both;
}
@keyframes packet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.splash-caption { color: #8a8ea6; font-family: var(--font-mono); font-size: 0.8rem; margin: 0; letter-spacing: 0.04em; animation: word-in 0.6s var(--ease) 1.3s both; }
.splash-skip {
  position: absolute; right: 18px; bottom: 18px;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.18); color: #a7aabc; padding: 7px 12px; border-radius: 9px; font-size: 0.8rem;
  animation: word-in 0.5s var(--ease) 0.8s both;
}
.splash-skip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
html.js .hero [data-rise] { opacity: 0; transform: translateY(18px); }
html.js .hero.entered [data-rise] { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js .hero.entered [data-rise="2"] { transition-delay: 0.1s; }
html.js .hero.entered [data-rise="3"] { transition-delay: 0.2s; }
html.js .hero.entered [data-rise="4"] { transition-delay: 0.3s; }
html.js .hero.entered [data-rise="5"] { transition-delay: 0.42s; }
@media (prefers-reduced-motion: reduce) {
  html.js .hero [data-rise] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Landing: hero
   -------------------------------------------------------------------------- */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.eyebrow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2); max-width: 560px; margin-bottom: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--text-3); font-size: 0.86rem; }
.hero-stats strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.01em; }

/* Terminal mock */
.terminal { min-height: 380px; }
.terminal pre { padding: 14px 16px 18px; font-size: 0.8rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; min-height: 330px; }
.terminal .t-you { color: #9ad3ff; font-weight: 500; }
.terminal .t-agent { color: #c39bff; font-weight: 500; }
.terminal .t-tool { color: #ffd77a; }
.terminal .t-ok { color: #14f195; }
.terminal .t-dim { color: #7a7e96; }
.terminal .t-line { display: block; }
.terminal .cursor { display: inline-block; width: 8px; height: 1em; background: #14f195; vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.terminal .t-line.thinking::after { content: "…"; animation: blink 1s steps(1) infinite; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head .kicker { display: inline-block; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-text); margin-bottom: 12px; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
.section-sep { height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }

/* Flow visualization */
.flow-wrap { padding: 18px 12px 8px; overflow: hidden; }
.flow-svg { width: 100%; height: auto; }
.flow-svg .node-box { fill: var(--surface-solid); stroke: var(--border-strong); stroke-width: 1; }
.flow-svg .node-label { fill: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.flow-svg .node-sub { fill: var(--text-3); font-family: var(--font-mono); font-size: 11px; }
.flow-svg .lane { stroke: var(--border-strong); stroke-width: 1.2; fill: none; }
.flow-svg .lane-active { stroke: url(#flowGrad); stroke-width: 2; opacity: 0; transition: opacity 0.3s; }
.flow-svg .lane-active.on { opacity: 1; }
.flow-svg .arrow { fill: var(--text-3); }
.flow-svg .packet { fill: #14f195; filter: drop-shadow(0 0 6px rgba(20, 241, 149, 0.9)); opacity: 0; }
.flow-svg .packet.v { fill: #9945ff; filter: drop-shadow(0 0 6px rgba(153, 69, 255, 0.9)); }
.flow-svg .packet.show { opacity: 1; }
.flow-svg .node.pulse .node-box { stroke: #14f195; stroke-width: 2; }
.flow-svg .node.pulse-v .node-box { stroke: #9945ff; stroke-width: 2; }
.flow-svg .halo { fill: none; stroke: #14f195; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.flow-svg .node.pulse .halo { animation: halo 0.9s var(--ease) both; }
.flow-svg .node.pulse-v .halo { stroke: #9945ff; animation: halo 0.9s var(--ease) both; }
@keyframes halo { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.18); } }
.flow-svg .badge402 { fill: var(--warn); font-family: var(--font-mono); font-weight: 700; font-size: 13px; opacity: 0; transition: opacity 0.3s; }
.flow-svg .badge402.on { opacity: 1; }
.flow-caption { text-align: center; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-2); min-height: 1.6em; margin: 8px 0 6px; padding: 0 8px; }
.flow-caption strong { color: var(--green-text); font-weight: 600; }
.flow-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: step; }
@media (max-width: 860px) { .flow-steps { grid-template-columns: repeat(2, 1fr); } }
.flow-steps li {
  counter-increment: step; position: relative;
  padding: 10px 12px 10px 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  font-size: 0.82rem; color: var(--text-2); transition: border-color 0.3s, color 0.3s, background 0.3s;
  min-height: 56px; display: flex; align-items: center;
}
.flow-steps li::before {
  content: counter(step); position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; color: var(--text-3); background: var(--surface-2);
}
.flow-steps li.active { border-color: rgba(20, 241, 149, 0.5); color: var(--text); background: rgba(20, 241, 149, 0.06); }
.flow-steps li.active::before { background: var(--grad); color: #05130d; }
.flow-steps li.done::before { color: var(--green-text); }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 24px; }
.feature .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--grad-soft); border: 1px solid var(--border); color: var(--green-text);
}
.feature .icon svg { width: 20px; height: 20px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--text-2); font-size: 0.93rem; margin: 0; }

/* MCP tools */
.tools { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .tools { grid-template-columns: 1fr; } }
.tool-list { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.tool-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 11px 13px; border-radius: 10px; border: 1px solid transparent; background: transparent; width: 100%;
  transition: background 0.15s, border-color 0.15s;
}
.tool-btn:hover { background: var(--surface-2); }
.tool-btn[aria-selected="true"] { background: var(--surface-2); border-color: var(--border-strong); }
.tool-btn code { background: none; border: 0; padding: 0; font-size: 0.88rem; color: var(--text); font-weight: 500; }
.tool-btn[aria-selected="true"] code { color: var(--green-text); }
.tool-btn span { font-size: 0.8rem; color: var(--text-3); }
@media (max-width: 860px) {
  .tool-list { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tool-btn { min-width: 170px; }
  .tool-btn span { display: none; }
}
.tool-panel { display: none; }
.tool-panel.is-active { display: block; }
.tool-panel .desc { color: var(--text-2); margin-bottom: 14px; font-size: 0.95rem; }
.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1000px) { .io-grid { grid-template-columns: 1fr; } }

/* Code tabs */
.tabs { display: flex; gap: 4px; padding: 6px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 14px; }
.tab-btn { padding: 8px 14px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 0.88rem; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.tab-btn:hover { color: var(--text); }
.tab-btn[aria-selected="true"] { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* Setup steps */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; counter-reset: setup; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 22px; counter-increment: setup; }
.step .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #05130d; font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; margin-bottom: 12px; }
.step .num::before { content: counter(setup, decimal-leading-zero); }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 0.92rem; }
.step .code { margin-top: 12px; }
.step .code pre { padding: 12px 14px; }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .roadmap { grid-template-columns: 1fr; } }
.road-col { padding: 20px; }
.road-col h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.road-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.road-col li { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.9rem; color: var(--text-2); }
.road-col li strong { color: var(--text); display: block; font-weight: 600; }

/* CTA band */
.cta-band { padding: 40px; text-align: center; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 200px; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow-violet), transparent), radial-gradient(closest-side at 70% 50%, var(--glow-green), transparent);
  opacity: 0.8; filter: blur(20px);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band p { color: var(--text-2); max-width: 560px; margin: 0 auto 22px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--text-3); font-size: 0.88rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: flex-start; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--text-2); }
.footer .brand { font-size: 1rem; margin-bottom: 8px; }
.footer-net { font-family: var(--font-mono); font-size: 0.76rem; word-break: break-all; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 300;
  padding: 10px 16px; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: var(--shadow); font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
