/* CLIbrary-Hub — shared styles */

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

:root {
  --bg: #060a0f;
  --surface: #0e1419;
  --surface-2: #131a21;
  --border: #1e2a35;
  --accent: #00e5a0;
  --accent-bright: #4dffc8;
  --accent-dim: #00e5a020;
  --accent-soft: #00e5a008;
  --text: #e8edf2;
  --muted: #8a9aa8;
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ============================================================
   Agent-routing background — high-contrast tech feel
   ============================================================ */

/* Parallax tracking — JS updates these CSS vars on mousemove */
:root {
  --mx: 0px;     /* mouse offset from center, X */
  --my: 0px;     /* mouse offset from center, Y */
}

/* Layer 1: subtle grid + dim dots at intersections — visible everywhere
   on the page but never strong enough to compete with text */
body::before {
  content: '';
  position: fixed;
  inset: -40px;
  background:
    radial-gradient(circle at 0 0,
      rgba(0, 229, 160, 0.30) 1.6px,
      rgba(0, 229, 160, 0.06) 2.4px,
      transparent 4px),
    linear-gradient(rgba(40, 55, 70, 0.40) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 55, 70, 0.40) 1px, transparent 1px);
  background-size:
    72px 72px,
    72px 72px,
    72px 72px;
  background-position: 0 0;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--mx) * 0.5), calc(var(--my) * 0.5), 0);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

/* Layer 2: dramatic accent glows — moves opposite for depth */
body::after {
  content: '';
  position: fixed;
  inset: -80px;
  background:
    /* huge top center green glow */
    radial-gradient(ellipse 1400px 700px at 50% -10%,
      rgba(0, 229, 160, 0.22), transparent 60%),
    /* upper right corner glow */
    radial-gradient(ellipse 700px 500px at 95% 10%,
      rgba(0, 229, 160, 0.10), transparent 65%),
    /* bottom left cool glow */
    radial-gradient(ellipse 800px 600px at 5% 95%,
      rgba(125, 211, 252, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--mx) * -0.25), calc(var(--my) * -0.25), 0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

/* SVG network overlay — animated routing lines + active nodes */
.bg-network {
  position: fixed;
  inset: -60px;
  pointer-events: none;
  z-index: 0;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  transform: translate3d(calc(var(--mx) * 0.8), calc(var(--my) * 0.8), 0);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

/* Active "routing" nodes — bigger, brighter, parallax */
.bg-nodes {
  position: fixed;
  inset: -50px;
  pointer-events: none;
  z-index: 0;
  width: calc(100% + 100px);
  height: calc(100% + 100px);
  transform: translate3d(calc(var(--mx) * 1.2), calc(var(--my) * 1.2), 0);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.bg-nodes .node {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent-bright);
  border-radius: 50%;
  box-shadow:
    0 0 10px var(--accent-bright),
    0 0 25px var(--accent),
    0 0 50px rgba(0, 229, 160, 0.4),
    0 0 80px rgba(0, 229, 160, 0.15);
  animation: nodePulse 4.5s ease-in-out infinite;
}
.bg-nodes .node::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: nodeRing 4.5s ease-out infinite;
}
.bg-nodes .node:nth-child(1) { top: 12%; left: 8%;  animation-delay: 0s; }
.bg-nodes .node:nth-child(1)::before { animation-delay: 0s; }
.bg-nodes .node:nth-child(2) { top: 22%; left: 78%; animation-delay: 0.9s; }
.bg-nodes .node:nth-child(2)::before { animation-delay: 0.9s; }
.bg-nodes .node:nth-child(3) { top: 48%; left: 14%; animation-delay: 1.8s; }
.bg-nodes .node:nth-child(3)::before { animation-delay: 1.8s; }
.bg-nodes .node:nth-child(4) { top: 65%; left: 88%; animation-delay: 2.7s; }
.bg-nodes .node:nth-child(4)::before { animation-delay: 2.7s; }
.bg-nodes .node:nth-child(5) { top: 82%; left: 22%; animation-delay: 3.6s; }
.bg-nodes .node:nth-child(5)::before { animation-delay: 3.6s; }
.bg-nodes .node:nth-child(6) { top: 35%; left: 92%; animation-delay: 0.3s; }
.bg-nodes .node:nth-child(6)::before { animation-delay: 0.3s; }
.bg-nodes .node:nth-child(7) { top: 90%; left: 60%; animation-delay: 1.4s; }
.bg-nodes .node:nth-child(7)::before { animation-delay: 1.4s; }
.bg-nodes .node:nth-child(8) { top: 18%; left: 45%; animation-delay: 2.2s; }
.bg-nodes .node:nth-child(8)::before { animation-delay: 2.2s; }

@keyframes nodePulse {
  0%, 100% { opacity: 0.6; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.4); }
}
@keyframes nodeRing {
  0%   { opacity: 0.7; transform: scale(0.5); }
  100% { opacity: 0;   transform: scale(3.5); }
}

/* SVG connecting lines pulse */
.bg-network .conn {
  stroke: var(--accent);
  stroke-width: 1;
  fill: none;
  opacity: 0.18;
  stroke-dasharray: 4 6;
  animation: dashFlow 8s linear infinite;
}
.bg-network .conn-pulse {
  stroke: var(--accent-bright);
  stroke-width: 1.5;
  fill: none;
  opacity: 0;
  animation: connPulse 5s ease-in-out infinite;
}
.bg-network .conn-pulse:nth-child(odd)  { animation-delay: 0s; }
.bg-network .conn-pulse:nth-child(even) { animation-delay: 2.5s; }

@keyframes dashFlow {
  to { stroke-dashoffset: -100; }
}
@keyframes connPulse {
  0%, 100% { opacity: 0; }
  20%      { opacity: 0.7; }
  40%      { opacity: 0.2; }
  60%      { opacity: 0; }
}

/* ============================================================
   Nav — minimal, logo-led
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 2.5rem;
  background: rgba(6, 10, 15, 0.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(30, 42, 53, 0.55);
}

.logo {
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.logo a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}
.logo a:hover { opacity: 0.85; }
.logo span {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 229, 160, 0.65);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
nav a:hover { color: var(--accent); }

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 0.25rem;
}

.nav-cta {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  font-size: 0.82rem;
}
.nav-cta:hover {
  background: rgba(0, 229, 160, 0.12);
  box-shadow: 0 0 18px rgba(0, 229, 160, 0.18);
}

/* Secondary CTA — used for 'Write a Manifest' to elevate it
   above the plain Benchmark link without competing with the
   primary pip install button */
.nav-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  padding: 0.5rem 0.95rem;
  border-radius: 4px;
  color: var(--text) !important;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.nav-secondary::before {
  content: '+';
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}
.nav-secondary:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-dim);
}

.lang-active { color: var(--accent) !important; }

@media (max-width: 720px) {
  nav {
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    justify-content: flex-start;
  }
  .logo { font-size: 1.5rem; flex: 0 0 auto; }
  .nav-links {
    flex: 1 1 100%;
    gap: 0.6rem 0.85rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .nav-divider { display: none; }
  nav a { font-size: 0.78rem; }
  .nav-cta { padding: 0.4rem 0.85rem; }
  .lang-trigger { padding: 0.35rem 0.65rem; }
}

/* Language dropdown */
.lang-switch {
  position: relative;
  display: inline-block;
}
.lang-trigger {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}
.lang-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lang-trigger .caret {
  font-size: 0.6rem;
  opacity: 0.7;
  transition: transform 0.15s;
}
.lang-switch.open .lang-trigger .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s;
}
.lang-switch.open .lang-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.lang-menu a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  transition: all 0.15s;
  border-bottom: 1px solid var(--border);
}
.lang-menu a:last-child { border-bottom: none; }
.lang-menu a:hover {
  background: var(--accent-dim);
  color: var(--accent);
}
.lang-menu a.current {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ============================================================
   Layout
   ============================================================ */
main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 9rem 2rem 6rem;
}
main.wide { max-width: 1100px; }

.hero-block {
  margin-bottom: 6rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

/* ============================================================
   Typography
   ============================================================ */
h1 {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}
h1 span { color: var(--accent); text-shadow: 0 0 24px rgba(0, 229, 160, 0.4); }

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 640px;
}

.step-section { margin-bottom: 6rem; }

h2 {
  font-family: var(--mono);
  font-size: 1.35rem;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
h2 .num {
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  letter-spacing: 0.12em;
  font-weight: 700;
}

h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

p { margin-bottom: 1.5rem; color: var(--text); }

ul, ol { margin: 1rem 0 2rem 1.5rem; color: var(--text); }
ul li, ol li { margin-bottom: 0.9rem; line-height: 1.75; }

/* ============================================================
   Code
   ============================================================ */
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.75;
}
pre code { background: none; border: none; padding: 0; color: var(--text); }
.k { color: #7dd3fc; }
.s { color: #86efac; }
.c { color: #6b7280; font-style: italic; }
.n { color: #fbbf24; }

code {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--surface);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: #86efac;
}

/* ============================================================
   Tables
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.5rem 0 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
th, td { padding: 0.95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
th {
  color: var(--muted);
  font-weight: normal;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--surface-2);
  font-family: var(--mono);
}
td code { font-size: 0.78rem; }
td.num { color: var(--accent); text-align: right; font-family: var(--mono); }
td.muted { color: var(--muted); text-align: right; font-family: var(--mono); }
td.muted-l { color: var(--muted); }
tr.highlight td.num { color: var(--accent); font-weight: bold; }

/* ============================================================
   Callouts
   ============================================================ */
.callout {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
  line-height: 1.75;
}
.callout strong { color: var(--accent); }
.callout p:last-child { margin-bottom: 0; }

.warn {
  background: rgba(248, 113, 113, 0.06);
  border-left: 3px solid #f87171;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
  line-height: 1.75;
}
.warn strong { color: #f87171; }
.warn p:last-child { margin-bottom: 0; }

.check { color: var(--accent); font-weight: bold; margin-right: 0.4rem; }
.cross { color: #f87171; font-weight: bold; margin-right: 0.4rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9rem 2rem 5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  margin-bottom: 2.5rem;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
  box-shadow: 0 0 24px rgba(0, 229, 160, 0.15);
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 12px var(--accent);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 620px;
  font-weight: 300;
  margin-bottom: 3.5rem;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}

.stats-row {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 0.7s forwards;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  text-shadow: 0 0 28px rgba(0, 229, 160, 0.5);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
  display: block;
}

.install-box {
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
  width: 100%;
  max-width: 520px;
}
.install-cmd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.install-cmd:hover {
  border-color: var(--accent);
  box-shadow: 0 0 32px rgba(0, 229, 160, 0.18);
}
.install-cmd .prompt { color: var(--accent); user-select: none; }
.install-cmd .cmd { flex: 1; text-align: left; }
.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.install-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1rem;
  text-align: center;
  font-family: var(--mono);
}
.install-note a { color: var(--accent); text-decoration: none; }
.install-note a:hover { text-decoration: underline; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Animated terminal session (homepage)
   ============================================================ */
.flow-wrap {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto 6rem;
  padding: 4rem 2rem 2rem;
}
.flow-wrap .section-label { text-align: center; }
.flow-wrap h2 {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  text-align: center;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.flow-wrap h2 span { color: var(--accent); }
.flow-wrap .section-sub {
  text-align: center;
  margin: 0 auto 2.5rem;
  color: var(--muted);
  max-width: 560px;
  font-size: 0.95rem;
}

.term-window {
  background: #0a0e13;            /* solid, darker than surface for contrast */
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.92rem;
  position: relative;
  z-index: 2;                     /* sits clearly above bg grid + nodes */
  isolation: isolate;             /* new stacking context — no leakage */
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
.term-bar {
  background: #141c24;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.term-title {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.05em;
}

.term-pane {
  padding: 1.2rem 1.3rem;
  overflow-y: auto;
  line-height: 1.65;
  color: var(--text);
  font-size: 0.85rem;
  background: #0a0e13;            /* explicit solid background */
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.term-pane::-webkit-scrollbar { width: 6px; }
.term-pane::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.term-pane.h-input  { height: 200px; }
.term-pane.h-output { height: 280px; }
.term-pane.agent    { height: 500px; }

.term-window + .term-window { margin-top: 0.85rem; }

/* ── Chat-style lines (agent column) ─────────────────────────── */
.t-chat-label {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.6rem;
  font-weight: 700;
  vertical-align: 1px;
  text-transform: uppercase;
}
.t-chat-label.t-chat-user {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
}
.t-chat-label.t-chat-agent {
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid #7dd3fc;
}
.t-chat-text { color: var(--text); }

/* ── Status / spinner / progress ─────────────────────────────── */
.t-status      { color: #7dd3fc; }
.t-status-dim  { color: var(--muted); font-style: italic; }
.t-spinner     { color: var(--accent); display: inline-block; width: 1ch; }

.t-progress {
  display: inline-block;
  width: 240px;
  height: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 0.6rem;
}
.t-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #4dffc8);
  transition: width 0.08s linear;
  box-shadow: 0 0 12px rgba(0, 229, 160, 0.5);
}
.t-progress-pct { color: var(--accent); font-size: 0.78rem; }

/* ── Tool option list ────────────────────────────────────────── */
.t-tool {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.8rem;
  margin: 0.25rem 0 0.25rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  transition: all 0.3s;
  font-size: 0.83rem;
}
.t-tool.picked {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 18px rgba(0, 229, 160, 0.2);
}
.t-tool-num {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}
.t-tool-name { color: var(--text); font-weight: 700; }
.t-tool-desc { color: var(--muted); }

/* ── Side-by-side feature rows ──────────────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 5rem 2rem;
  position: relative;
  z-index: 2;
}
.feature-row.reverse {
  grid-template-columns: 1.15fr 1fr;
}
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-demo { order: 1; }

@media (max-width: 920px) {
  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3.5rem 1.25rem;
  }
  .feature-row.reverse .feature-text { order: 1; }
  .feature-row.reverse .feature-demo { order: 2; }
}

.feature-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.feature-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}
.feature-row.agent-side .feature-tag { color: #7dd3fc; }
.feature-row.agent-side .feature-tag::before {
  background: #7dd3fc;
  box-shadow: 0 0 12px #7dd3fc;
}

.feature-row h2 {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1.4rem;
  letter-spacing: -0.02em;
  display: block;
}
.feature-row .feature-lead {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 520px;
}

.feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.feature-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.feature-cta::before { content: '↗'; opacity: 0.7; }

/* The demo column wraps the existing terminal markup */
.feature-demo .term-window + .term-window { margin-top: 0.85rem; }

/* ── Developer quickstart ────────────────────────────────────── */
.quickstart-section {
  max-width: none;
  margin: 0 auto;
  padding: 5rem 2rem;
  position: relative;
  z-index: 2;
}
.quickstart-section > .quickstart-title,
.quickstart-section > .quickstart-card {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.quickstart-title {
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.quickstart-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
@media (max-width: 760px) {
  .quickstart-card { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
}

.quickstart-side h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
  margin-top: 0;
}
.quickstart-side p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.quickstart-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.quickstart-side .feature-cta { margin-top: 1.2rem; }

.quickstart-code {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.qs-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.qs-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s;
  border-right: 1px solid var(--border);
}
.qs-tab:last-child { border-right: none; }
.qs-tab:hover { color: var(--text); }
.qs-tab.active { color: var(--text); }
.qs-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.qs-panel {
  display: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.75;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  color: var(--text);
}
.qs-panel.active { display: block; }
.qs-panel pre { background: transparent; border: none; padding: 0; margin: 0; font-size: 0.82rem; }
.qs-panel .qs-line {
  display: flex;
  gap: 1rem;
}
.qs-panel .qs-num {
  color: var(--muted);
  user-select: none;
  text-align: right;
  width: 1.8rem;
  flex-shrink: 0;
  opacity: 0.5;
}
.qs-panel .qs-content { white-space: pre; }
.qs-key  { color: #c084fc; }
.qs-imp  { color: #f97316; }
.qs-str  { color: #86efac; }
.qs-num2 { color: #fbbf24; }
.qs-com  { color: #6b7280; font-style: italic; }
.qs-fn   { color: #7dd3fc; }

.flow-col-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.flow-col-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.flow-col.agent .flow-col-label { color: #7dd3fc; }
.flow-col.agent .flow-col-label::before {
  background: #7dd3fc;
  box-shadow: 0 0 10px #7dd3fc;
}

.flow-col-tagline {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.t-line {
  white-space: pre-wrap;
  word-break: break-word;
}
.t-line.t-res { padding-left: 0; }

.t-prompt { color: var(--accent); user-select: none; }
.t-key    { color: #7dd3fc; }
.t-val    { color: #86efac; }
.t-num    { color: #fbbf24; }
.t-good   { color: var(--accent); font-weight: bold; }
.t-muted  { color: var(--muted); }
.t-note   { color: #6b7280; font-style: italic; }

/* Blinking caret on the line currently being typed.
   Removed when that line finishes; appears on the next line. */
.t-caret {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: termBlink 1s steps(1, end) infinite;
}
@keyframes termBlink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@media (max-width: 600px) {
  #term-screen { font-size: 0.78rem; height: 420px; padding: 1.1rem 1rem; }
  .flow-wrap { padding: 2.5rem 1rem 1rem; }
}

/* ============================================================
   Terminal
   ============================================================ */
.terminal-wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 1s forwards;
}
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.85rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5),
              0 0 60px rgba(0, 229, 160, 0.05);
}
.terminal-bar {
  background: #141c24;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.terminal-title {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
}
.terminal-body { padding: 1.5rem; line-height: 2; overflow-x: auto; }
.line-prompt { color: var(--accent); }
.line-cmd { color: var(--text); }
.line-out { color: var(--muted); }
.line-key { color: #7dd3fc; }
.line-val { color: #86efac; }
.line-comment { color: #4b5563; }

/* ============================================================
   Section blocks
   ============================================================ */
section.block {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 0 auto;
  padding: 5rem 2rem;
}
section.block > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-sub {
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 3rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  transition: all 0.2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 229, 160, 0.08);
}
.card-icon {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-icon::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent);
}
.card h3 { font-family: var(--mono); font-size: 1rem; margin-bottom: 0.6rem; margin-top: 0; }
.card p { font-size: 0.9rem; color: var(--muted); margin-bottom: 0; }

/* ============================================================
   Compare
   ============================================================ */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } }

.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
}
.compare-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(0, 229, 160, 0.1);
}
.compare-card h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.compare-card.highlight h3 { color: var(--accent); }

.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.compare-row:last-child { border-bottom: none; }
.compare-row span:last-child { font-family: var(--mono); font-size: 0.82rem; }
.good { color: var(--accent); }
.bad { color: #f87171; }

/* ============================================================
   Bundles section — surface what's actually published
   ============================================================ */
.bundles-section {
  position: relative;
  z-index: 2;
  max-width: none;
  padding: 5rem 2rem;
}
.bundles-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.bundles-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.bundles-header h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.bundles-header h2 span {
  color: var(--accent);
}
.bundles-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.bundles-meta strong { color: var(--accent); }

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 820px) { .bundle-grid { grid-template-columns: 1fr; } }

.bundle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.5rem;
  transition: all 0.2s;
  position: relative;
  isolation: isolate;
}
.bundle-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 229, 160, 0.08);
}
.bundle-card-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}
.bundle-card h3 {
  font-family: var(--mono);
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.bundle-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bundle-tool {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  transition: all 0.2s;
}
.bundle-card:hover .bundle-tool { border-color: rgba(0, 229, 160, 0.3); }

.bundles-coming {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}
.bundles-coming-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.bundles-coming-tag {
  padding: 0.3rem 0.65rem;
  border: 1px dashed var(--border);
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
}

/* ============================================================
   Extend section — promote manifest authoring
   ============================================================ */
.extend-section {
  position: relative;
  z-index: 2;
  max-width: none;
  padding: 5rem 2rem;
}
.extend-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 920px) {
  .extend-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.extend-text .section-title { margin-bottom: 1.2rem; }
.extend-bullets {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.extend-bullets li {
  display: flex;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.extend-bullets li:last-child { border-bottom: none; }
.extend-bullets li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.extend-cta-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  align-items: center;
}
.extend-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #060a0f !important;
  padding: 0.85rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--accent);
  transition: all 0.2s;
}
.extend-cta-primary::after { content: '→'; }
.extend-cta-primary:hover {
  box-shadow: 0 0 24px rgba(0, 229, 160, 0.5);
  transform: translateY(-1px);
}

.extend-preview {
  background: #0a0e13;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text);
  position: relative;
  z-index: 2;
  isolation: isolate;
}
.extend-preview-label {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
  display: block;
}
.extend-preview .k { color: #7dd3fc; }
.extend-preview .s { color: #86efac; }
.extend-preview .c { color: #6b7280; font-style: italic; }

/* ============================================================
   Categories
   ============================================================ */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.cat {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
  transition: all 0.2s;
}
.cat:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--accent); }
footer p { margin: 0; line-height: 2; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  main { padding: 7rem 1.25rem 4rem; }
  .hero { padding: 7rem 1.25rem 4rem; }
  .stats-row { gap: 1.75rem; }
  .hero-block { margin-bottom: 4rem; padding-bottom: 2.5rem; }
  .step-section { margin-bottom: 4rem; }
  .nav-links { gap: 1rem; }
  .nav-links a:not(.nav-cta):not(.lang-trigger) { display: none; }
  .logo { font-size: 1.15rem; }
}
