/* ────────────────────────────────────────────────────────────────────────
 * arch-graph landing page · styles
 * Palette: deep black/charcoal + indigo-violet primary, cyan-blue accent
 * ──────────────────────────────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --bg: #0a0a0f;
  --bg-1: #0f0f17;
  --bg-2: #14141d;
  --bg-3: #1a1a24;
  --bg-secondary: #0f0f17;
  --bg-tertiary: #14141d;
  --bg-elev: #1d1d28;

  /* Text */
  --text: #e4e4e7;
  --text-dim: #a1a1aa;
  --text-mute: #71717a;

  /* Borders */
  --border: rgba(228, 228, 231, 0.08);
  --border-strong: rgba(228, 228, 231, 0.16);

  /* Accents */
  --accent: #8b9eff;       /* indigo-violet, primary */
  --accent-2: #7dd3fc;     /* cyan-blue, secondary */
  --accent-warm: #fbbf24;  /* amber for "warn" pills */
  --accent-ok: #34d399;    /* mint for "ok" pills */
  --accent-glow: rgba(139, 158, 255, 0.18);

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Scale */
  --max-w: 1180px;
  --max-w-narrow: 760px;
  --radius: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle texture so the dark surface doesn't feel flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(139, 158, 255, 0.06), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(125, 211, 252, 0.05), transparent 60%);
  z-index: 0;
}

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border: 3px solid var(--bg);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--bg-elev); }
* { scrollbar-color: var(--bg-3) var(--bg); scrollbar-width: thin; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

a { color: var(--accent-2); text-decoration: none; transition: color 160ms ease; }
a:hover { color: var(--accent); }

p { margin: 0 0 1em; }

code, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--accent-2);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.narrow { max-width: var(--max-w-narrow); }

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--bg-elev);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  z-index: 100;
  transition: top 150ms ease;
}
.skip-link:focus { top: 8px; }

/* ─────────────────────────────────────────────────── HEADER ─────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.brand-text { font-family: var(--font-mono); font-size: 15px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 160ms ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta {
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
}
.site-nav .nav-cta:hover {
  background: var(--bg-3);
  border-color: var(--accent);
}
.site-nav .nav-active {
  color: var(--text);
  position: relative;
}
.site-nav .nav-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

@media (max-width: 720px) {
  .site-nav { gap: 16px; }
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ─────────────────────────────────────────────────── HERO ───────────── */
.hero {
  position: relative;
  min-height: 720px;
  padding: 120px 0 100px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-graph .dot {
  fill: var(--accent-2);
  animation: dotPulse 4s ease-in-out infinite;
}
.hero-graph .dot-1  { animation-delay: 0s;    }
.hero-graph .dot-2  { animation-delay: 0.3s;  }
.hero-graph .dot-3  { animation-delay: 0.6s;  }
.hero-graph .dot-4  { animation-delay: 0.9s;  }
.hero-graph .dot-5  { animation-delay: 1.2s;  }
.hero-graph .dot-6  { animation-delay: 1.5s;  }
.hero-graph .dot-7  { animation-delay: 1.8s;  }
.hero-graph .dot-8  { animation-delay: 2.1s;  }
.hero-graph .dot-9  { animation-delay: 2.4s;  }
.hero-graph .dot-10 { animation-delay: 2.7s;  }
.hero-graph .dot-11 { animation-delay: 3.0s;  }
.hero-graph .dot-12 { animation-delay: 3.3s;  }

.hero-graph .hero-edges path {
  stroke-dasharray: 6 8;
  animation: dashDrift 22s linear infinite;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(10, 10, 15, 0) 0%, rgba(10, 10, 15, 0.55) 55%, rgba(10, 10, 15, 0.95) 100%),
    linear-gradient(to bottom, rgba(10, 10, 15, 0.4), transparent 30%, transparent 70%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}
.hero-title {
  font-size: clamp(48px, 9vw, 96px);
  line-height: 1.0;
  margin: 0 0 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.title-mono {
  font-family: var(--font-mono);
  background: linear-gradient(180deg, #ffffff 0%, #c7c7d1 60%, #8b8b97 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 auto 40px;
  line-height: 1.5;
}
.hl { color: var(--text); font-weight: 500; }
.hl-accent { color: var(--accent-2); font-weight: 500; }

.hero-ctas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 56px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), #6b81f5);
  color: #0a0a0f;
  font-weight: 600;
  box-shadow: 0 6px 24px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #a4b3ff, #8b9eff);
  box-shadow: 0 8px 32px rgba(139, 158, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary .btn-arrow { transition: transform 160ms ease; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.btn-ghost {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}
.hero-stats li {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.3;
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────────────────────── SECTIONS ───────────── */
.section {
  position: relative;
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.section:first-of-type { border-top: none; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 14px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 24px;
  color: var(--text);
}
.subsection-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 48px 0 16px;
}
.section-lead {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 0 40px;
}
.prose { font-size: 17px; color: var(--text-dim); }
.prose.dim { color: var(--text-mute); }
.prose.small { font-size: 14px; line-height: 1.6; }

/* ─────────────────────────────────────────────── FLOW DIAGRAM ───────── */
.section-flow { background: linear-gradient(180deg, var(--bg), var(--bg-1) 50%, var(--bg)); }
.flow-stage {
  position: relative;
  margin-top: 32px;
  padding: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.flow-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
}

.flow-col-label {
  fill: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Source tokens */
.src-token rect {
  fill: var(--bg-2);
  stroke: var(--border-strong);
  stroke-width: 1;
  transition: stroke 200ms ease;
}
.src-token text {
  fill: var(--text);
  font-size: 13px;
}
.src-token { animation: tokenFlicker 6s ease-in-out infinite; transform-box: fill-box; }
.src-token.st-1 { animation-delay: 0s;   }
.src-token.st-2 { animation-delay: 0.5s; }
.src-token.st-3 { animation-delay: 1.0s; }
.src-token.st-4 { animation-delay: 1.5s; }
.src-token.st-5 { animation-delay: 2.0s; }
.src-token.st-6 { animation-delay: 2.5s; }
.src-token.st-7 { animation-delay: 3.0s; }
.src-token.st-8 { animation-delay: 3.5s; }
.src-token.st-9 { animation-delay: 4.0s; }

/* Core */
.core-card {
  fill: var(--bg-elev);
  stroke: var(--accent);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 24px var(--accent-glow));
}
.core-title { fill: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.core-sub   { fill: var(--text-dim); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; }
.core-mono  { fill: var(--accent-2); font-size: 13px; }
.core-mark .core-mark-leg,
.core-mark .core-mark-bar { stroke: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.core-mark .core-mark-node { fill: var(--bg-elev); stroke: var(--accent); stroke-width: 1.6; }
@keyframes coreMarkBreathe {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}
.core-mark { animation: coreMarkBreathe 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .core-mark { animation: none; }
}
.core-orbit circle {
  fill: var(--accent);
  opacity: 0.6;
  animation: orbitPulse 3s ease-in-out infinite;
}
.core-orbit circle:nth-child(2) { animation-delay: 0.6s; }
.core-orbit circle:nth-child(3) { animation-delay: 1.2s; }
.core-orbit circle:nth-child(4) { animation-delay: 1.8s; }
.core-orbit circle:nth-child(5) { animation-delay: 2.4s; }
/* NB: do NOT apply a CSS transform animation directly on .flow-core —
 * CSS transforms override the SVG `transform="translate(600 260)"`
 * attribute, dumping the whole group to (0,0). The brand-mark inside
 * already has its own coreMarkBreathe animation; that's enough. */
.flow-core { transform-origin: center; }

/* Graph nodes */
/* Obsidian-style graph cluster on the right side of the flow stage.
 * Nodes are filled circles colored by kind; static lines beneath show the
 * edges that arch-graph actually emits. Pulses (above) animate flow INTO
 * the cluster's hub node; intra-cluster edges are decorative-static. */
.graph-cluster-edges path { stroke-linecap: round; }
.cn-kind {
  stroke: rgba(10, 10, 15, 0.6);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
}
.cn-hub .cn-kind { filter: drop-shadow(0 0 8px rgba(125, 211, 252, 0.55)); }
.cn-label {
  fill: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.01em;
  pointer-events: none;
}
.cn-hub .cn-label { fill: var(--text); font-size: 12px; }
.cn { opacity: 0; animation: nodeGrow 8s ease-out infinite; }
.cn-hub { animation-delay: 2.0s; }
.cn-1   { animation-delay: 2.6s; }
.cn-2   { animation-delay: 3.1s; }
.cn-3   { animation-delay: 3.6s; }
.cn-4   { animation-delay: 4.1s; }
.cn-5   { animation-delay: 4.6s; }
.cn-6   { animation-delay: 5.1s; }

.cn-kind.kind-service { fill: var(--accent-2);  }
.cn-kind.kind-nats    { fill: #c084fc;          }
.cn-kind.kind-db      { fill: var(--accent-ok); }
.cn-kind.kind-queue   { fill: var(--accent-warm); }
.cn-kind.kind-module  { fill: var(--accent);    }

/* Flow legend */

/* ─────────────────────────────────────────────── BENCH ──────────────── */
.bench-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0 16px;
}
.bench-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: transform 200ms ease, border-color 200ms ease;
}
.bench-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.bench-card.highlight {
  border-color: rgba(139, 158, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(139, 158, 255, 0.15), 0 12px 40px rgba(139, 158, 255, 0.08);
}
.bench-card-label {
  font-size: 12px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.bench-card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}
.bench-card-row.dim { opacity: 0.55; }
.bench-card-tool {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.bench-card-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.bench-card.highlight .bench-card-num { color: var(--accent-2); }
.bench-card-foot {
  font-size: 12px;
  color: var(--text-mute);
  margin: 12px 0 0;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
}
table.bench-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* ── Domain grid (replaces old flat domain-table) ── */
.domain-grid {
  list-style: none;
  padding: 0;
  margin: 32px 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.domain-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  transition: transform 200ms ease, border-color 200ms ease;
}
.domain-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
@media (min-width: 900px) {
  .domain-grid {
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-flow: row dense;
  }
  .domain-card-feature {
    grid-column: 3;
    grid-row: span 2;
  }
  .domain-card-under-feature {
    grid-column: 3;
  }
}
.domain-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.domain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  color: var(--accent);
  flex-shrink: 0;
}
.domain-card h3 {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.domain-card-compact {
  padding: 16px 18px;
  gap: 8px;
}
.domain-card-compact .domain-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.domain-card-compact .domain-blurb {
  font-size: 13px;
  line-height: 1.45;
}
.domain-card-compact .domain-edges li {
  padding: 3px 8px;
  font-size: 11px;
}
.domain-blurb {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}
.domain-edges {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.domain-edges li {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.18);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.01em;
}

table.domain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bench-table th, .bench-table td,
.domain-table th, .domain-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.bench-table thead th,
.domain-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  background: var(--bg-2);
}
.bench-table tbody tr:last-child td,
.bench-table tbody tr:last-child th,
.domain-table tbody tr:last-child td,
.domain-table tbody tr:last-child th { border-bottom: none; }
.bench-table tbody tr:hover,
.domain-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.bench-table th[scope="row"],
.domain-table th[scope="row"] {
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}
td.dim, .dim { color: var(--text-mute); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}
.pill.ok   { background: rgba(52, 211, 153, 0.1);  color: var(--accent-ok);   border-color: rgba(52, 211, 153, 0.2);  }
.pill.warn { background: rgba(251, 191, 36, 0.08); color: var(--accent-warm); border-color: rgba(251, 191, 36, 0.2); }

.link { color: var(--accent-2); border-bottom: 1px solid transparent; transition: border-color 160ms ease; }
.link:hover { border-bottom-color: var(--accent-2); }

/* ─────────────────────────────────────────────── INSTALL ────────────── */
.install-steps {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  /* minmax(0, 1fr) lets grid items shrink below their content's intrinsic width
   * — without this, a wide code-block inside an .install-step forces the column
   * (and therefore the page) wider than the viewport on mobile. */
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  counter-reset: step;
}
.install-step {
  min-width: 0; /* allow grid item to shrink below content width — see .install-steps */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  transition: border-color 200ms ease;
}
.install-step:hover { border-color: var(--border-strong); }
.step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.step-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.install-step > p {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 16px;
}

/* Code blocks */
.code-block {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-block pre {
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}
.code-block code { background: none; border: none; padding: 0; color: inherit; }
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  background: var(--bg-2);
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 160ms ease;
  opacity: 0;
}
.code-block:hover .copy-btn,
.copy-btn:focus { opacity: 1; }
.copy-btn:hover { background: var(--bg-3); color: var(--text); border-color: var(--accent); }
.copy-btn.copied { color: var(--accent-ok); border-color: var(--accent-ok); }

/* ─────────────────────────────────────────────── CLI GRID ───────────── */
.cli-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.cli-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 200ms ease, transform 200ms ease;
}
.cli-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.cli-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--accent-2);
  font-weight: 600;
}
.cli-card p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 14px;
}
/* Code block in CLI/MCP/Skill cards FILLS the remaining card height
 * (flex: 1 1 auto), keeping all three cards' code regions visually
 * aligned regardless of how long each card's description text is.
 * The inner <pre> is vertically centred for balance. */
.cli-card .code-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cli-card .code-block pre {
  margin: 0;
}

/* ─────────────────────────────────────── CONTRIBUTE BANNER ─────────── */
/* Visually distinct from neighboring sections — same indigo palette, but
 * a soft accent border + halo so the invitation reads as "featured", not
 * an error/warning. Lives between Bench and Install in the flow. */
.section-contribute { padding: 56px 0; }
.contribute-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background:
    radial-gradient(ellipse at top left, rgba(139, 158, 255, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid rgba(139, 158, 255, 0.32);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: 0 0 36px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.contribute-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(139, 158, 255, 0.12);
  border: 1px solid rgba(139, 158, 255, 0.30);
  color: var(--accent);
}
.contribute-body { flex: 1 1 auto; min-width: 0; }
.contribute-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.contribute-title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text);
}
.contribute-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 18px;
}
.contribute-lead code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
}
.contribute-lead strong { color: var(--text); font-weight: 600; }
.contribute-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.contribute-routes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 22px;
}
.contribute-route {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--bg-2);
}
.contribute-route p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}
.contribute-route p:last-of-type { margin-bottom: 10px; }
.contribute-route code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 0 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-2);
}
.contribute-route-label {
  font-size: 13px !important;
  color: var(--text) !important;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contribute-route-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-2);
  color: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
@media (max-width: 860px) {
  .contribute-routes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .contribute-card { flex-direction: column; gap: 14px; padding: 22px 20px; }
}

/* ───────────────────────────────── THREE WAYS TO QUERY ─────────────── */
/* Equal-weight 3-up grid; reuses .cli-card. The .three-ways-sub eyebrow
 * gives each card a parity-of-importance hint without changing visual weight. */
.three-ways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.three-ways-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

/* ─────────────────────────────────────── ADJACENT TOOLS ─────────────── */
.section-adjacent .adjacent-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
}
.section-adjacent .adjacent-list li {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.section-adjacent .adjacent-list h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.section-adjacent .adjacent-list h3 a { color: var(--accent-2); text-decoration: none; }
.section-adjacent .adjacent-list h3 a:hover { color: var(--accent); text-decoration: underline; }
.section-adjacent .adjacent-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ─────────────────────────────────────────────── LIMITS ─────────────── */
.section-limits { background: linear-gradient(180deg, var(--bg), var(--bg-1) 80%, var(--bg)); }
.limits-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.limits-list li {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.limits-list h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.limits-list p { margin: 0; font-size: 14px; color: var(--text-dim); }

/* ─────────────────────────────────────────────── FOOTER ─────────────── */
.site-footer {
  margin-top: 40px;
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
}
.footer-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-brand { font-size: 16px; color: var(--text); margin: 0 0 4px; }
.footer-sub { font-size: 14px; color: var(--text-dim); margin: 0; }
.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.site-footer nav a {
  color: var(--text-dim);
  font-size: 14px;
}
.site-footer nav a:hover { color: var(--accent-2); }
.footer-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); margin: 0; text-align: right; }
@media (max-width: 720px) {
  .footer-row { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

/* ─────────────────────────────────────────── REVEAL ON SCROLL ───────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ────────────────────────────────────────── AI RUNTIME LAYER ────────── */
.section-ai-layer {
  background: radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.03), transparent 40%),
              linear-gradient(180deg, var(--bg-1), var(--bg));
  border-top: 1px solid rgba(251, 191, 36, 0.1);
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
  background-clip: padding-box;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.3);
  background: var(--bg-3);
}

.section-code-intel .feature-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-warm);
  opacity: 0.3;
}

.section-code-intel .feature-card::before {
  background: var(--accent);
}

.section-code-intel .feature-title {
  color: var(--accent);
}

.feature-title {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-warm);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-text {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
}

/* Terminal Showcase & Animation */
.terminal-showcase {
  margin-top: 3rem;
  background: #0d0d14;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  overflow: hidden;
}

.terminal-header {
  background: #1a1a24;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

.agent-bubble {
  display: none;
  margin-bottom: 24px;
}

.agent-bubble.is-visible {
  display: block;
  animation: bubbleFadeIn 400ms ease forwards;
}

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

.bubble-role {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.role-agent { color: var(--accent-2); }
.role-tool { color: var(--accent-warm); }
.role-user { color: var(--accent-ok); }

.bubble-content {
  color: var(--text);
}

.tool-output {
  background: rgba(0,0,0,0.3);
  border-left: 2px solid var(--accent-warm);
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 0 4px 4px 0;
  color: var(--text-dim);
  opacity: 0;
  white-space: pre-wrap;
  word-break: break-word;
  transition: opacity 600ms ease;
}

.section-code-intel .tool-output {
  border-left-color: var(--accent);
}

/* LSP Comparison Table */
.lsp-comparison {
  margin-top: 64px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.comp-cell {
  background: var(--bg-1);
  padding: 24px;
}

.comp-header {
  background: var(--bg-2);
  font-weight: 600;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comp-label {
  grid-column: span 2;
  background: rgba(139, 158, 255, 0.05);
  padding: 10px 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.comp-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}

.comp-check {
  color: var(--accent-ok);
  margin-right: 8px;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid var(--accent-warm);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-warm);
}

/* ─────────────────────────────────────────────── KEYFRAMES ──────────── */
@keyframes dotPulse {
  0%, 100% { transform: scale(1);   opacity: 0.5; }
  50%      { transform: scale(1.8); opacity: 1;   }
}
@keyframes dashDrift {
  to { stroke-dashoffset: -200; }
}
@keyframes tokenFlicker {
  0%, 90%, 100% { opacity: 0.55; }
  10%, 30%      { opacity: 1;    }
}
@keyframes nodeGrow {
  0%, 25%      { opacity: 0; transform: scale(0.85); }
  35%, 90%     { opacity: 1; transform: scale(1);    }
  100%         { opacity: 0; transform: scale(0.95); }
}
@keyframes orbitPulse {
  0%, 100% { transform: scale(1);   opacity: 0.5; }
  50%      { transform: scale(1.6); opacity: 1;   }
}
@keyframes coreBreath {
  0%, 100% { transform: scale(1);    }
  50%      { transform: scale(1.025); }
}

/* ─────────────────────────────────────────── MOTION PREFERENCES ─────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-graph .dot { animation: none; }
  .hero-graph .hero-edges path { animation: none; stroke-dasharray: none; }
  .src-token, .flow-core, .core-orbit circle, .g-node { animation: none !important; opacity: 1 !important; transform: none !important; }
  .pulse { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────── PRINT (degrade gracefully) ─ */
@media print {
  body { background: white; color: black; }
  .hero-bg, .site-header, .copy-btn, .reveal { display: none; }
  .section { padding: 30px 0; border: none; }
  a { color: black; }
}

/* ─────────────────────────────────────────── RESPONSIVE / MOBILE ──────── */

/* Grid/flex items must be allowed to shrink below content width so children
 * with `overflow-x: auto` (code blocks, tables) actually scroll instead of
 * forcing the parent wider than the viewport. */
.bench-cards > *,
.query-cards > *,
.install-cards > *,
.install-steps > *,
.install-step,
.domain-list > *,
.section > *,
.container > * {
  min-width: 0;
}
.code-block,
.table-wrap,
pre {
  max-width: 100%;
}

/* Long unwrapped mono strings (subjects, paths, identifiers) — wrap on small
 * screens rather than overflow. Keeps the visual rhythm in code blocks where
 * `overflow-x: auto` still provides horizontal scroll. */
@media (max-width: 768px) {
  code, .mono {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .code-block code,
  .code-block pre {
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* Tablet — single-column collapses, tighter padding */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .hero { padding: 80px 0 64px; min-height: auto; }

  /* minmax(0, 1fr) instead of plain 1fr — lets the grid item shrink below its
   * content's intrinsic width (an unwrapped code-block line otherwise expands
   * the grid track and pushes the layout wider than the viewport). */
  .bench-cards,
  .query-cards,
  .install-cards,
  .install-steps { grid-template-columns: minmax(0, 1fr); }

  .domain-list { grid-template-columns: minmax(0, 1fr); }

  .footer-row { grid-template-columns: 1fr; gap: 20px; }
  .footer-meta { text-align: left; }
}

/* Phones — type scales down, hero SVG drops below content, narrower padding */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }

  .section-title { font-size: 28px; line-height: 1.2; }
  .section-lead { font-size: 15px; }

  /* Hero adjustments */
  .hero { padding: 64px 0 48px; }
  .hero-title { font-size: 36px; line-height: 1.1; }
  .hero-tagline { font-size: 17px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta a { text-align: center; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-graph { opacity: 0.3; }

  /* Code blocks — slightly tighter padding, fully scrollable horizontally */
  .code-block pre { padding: 14px 14px; font-size: 12.5px; }
  .copy-btn { top: 6px; right: 6px; padding: 4px 8px; font-size: 10px; opacity: 1; }

  /* Tables — keep nowrap inside but let .table-wrap scroll horizontally */
  .bench-table th, .bench-table td,
  .domain-table th, .domain-table td { padding: 10px 12px; font-size: 13px; }

  /* Bench cards — smaller numbers + labels on phones */
  .bench-card-num { font-size: 22px; }
  .bench-card-label { font-size: 11px; }

  /* Footer */
  .site-footer nav ul { flex-wrap: wrap; gap: 12px 16px; padding: 0; }
}

/* ─────────────────────────────────── CAPABILITY MATRIX ──────────────── */
/* Shared cell glyphs for matrix tables (compact + full) */
.cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
}
.cell.ok      { background: rgba(52, 211, 153, 0.10); color: var(--accent-ok);   border-color: rgba(52, 211, 153, 0.25);  }
.cell.partial { background: rgba(251, 191, 36, 0.08); color: var(--accent-warm); border-color: rgba(251, 191, 36, 0.25);  }
.cell.no      { background: rgba(228, 228, 231, 0.04); color: var(--text-mute);  border-color: rgba(228, 228, 231, 0.10); }

/* Compact capability matrix on the landing page (inside section-bench) */
.matrix-block {
  margin-top: 56px;
}
.matrix-foot {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--text-dim);
}
table.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.matrix-table th, .matrix-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.matrix-table th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--text);
  font-size: 13.5px;
  position: sticky;
  left: 0;
  background: var(--bg-1);
  z-index: 1;
}
.matrix-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.matrix-table thead th.capability-col {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
}
.matrix-table tbody tr:last-child td,
.matrix-table tbody tr:last-child th { border-bottom: none; }
.matrix-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.matrix-table tbody tr:hover th[scope="row"] { background: var(--bg-2); }
.matrix-table .col-self {
  color: var(--accent);
}

/* Full comparison page — wider matrix, sticky first column for horizontal scroll */
.section-compare-hero { padding-top: 96px; }
.comparison-wrap { background: var(--bg-1); }
table.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.comparison-table th, .comparison-table td {
  padding: 12px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
.comparison-table thead th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  background: var(--bg-2);
  white-space: normal;
  vertical-align: bottom;
  min-width: 92px;
  max-width: 120px;
}
.comparison-table thead th.th-narrow {
  font-size: 10px;
  line-height: 1.25;
}
.comparison-table thead th.capability-col {
  text-align: left;
  min-width: 240px;
  position: sticky;
  left: 0;
  z-index: 2;
}
.comparison-table th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font-sans);
  position: sticky;
  left: 0;
  background: var(--bg-1);
  z-index: 1;
  white-space: normal;
  max-width: 280px;
}
.comparison-table th[scope="row"] code {
  font-size: 12px;
}
.comparison-table tbody tr:last-child td,
.comparison-table tbody tr:last-child th { border-bottom: none; }
.comparison-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.comparison-table tbody tr:hover th[scope="row"] { background: var(--bg-2); }

/* Per-tool cards */
.compare-tools-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.compare-tools-list li {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.compare-tools-list h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.compare-tools-list .tool-meta {
  margin: 0 0 12px;
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.compare-tools-list p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}
.compare-tools-list p:last-child { margin-bottom: 0; font-size: 13px; }

/* Where we lose */
.section-compare-losses { background: linear-gradient(180deg, var(--bg), var(--bg-1) 80%, var(--bg)); }
.compare-losses-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
}
.compare-losses-list li {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-warm);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.compare-losses-list h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.compare-losses-list p {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .compare-tools-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .matrix-table th, .matrix-table td { padding: 9px 10px; font-size: 12.5px; }
  .comparison-table th, .comparison-table td { padding: 9px 8px; font-size: 12.5px; }
  .comparison-table thead th { min-width: 84px; }
  .comparison-table thead th.capability-col { min-width: 180px; }
  .matrix-table thead th.capability-col,
  .matrix-table th[scope="row"] { min-width: 200px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero-title { font-size: 30px; }
  .section-title { font-size: 24px; }
  .hero-stats { grid-template-columns: 1fr; }
}
