/* pgvector.app — design system
   Tokens → base → layout → components → prose → code → charts → tools → motion */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Grotesk"; src: url("/assets/fonts/grotesk-var.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("/assets/fonts/jbmono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg-2: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f3f4f7;
  --surface-3: #e9ecf2;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0c1222;
  --text-2: #3b4559;
  --muted: #5f6b80;
  --accent: #5b4cf0;
  --accent-2: #0891b2;
  --accent-ink: #4636d8;
  --accent-soft: rgba(91, 76, 240, 0.09);
  --grad: linear-gradient(120deg, #5b4cf0 0%, #2a78d6 45%, #0891b2 100%);
  --grad-text: linear-gradient(110deg, #4636d8 10%, #1f6fd1 50%, #0e7490 90%);
  --glow: 0 0 0 1px var(--border), 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
  --glow-hover: 0 0 0 1px rgba(91, 76, 240, 0.35), 0 12px 32px -12px rgba(91, 76, 240, 0.28);
  --code-bg: #0d1220;
  --code-text: #e3e8f2;
  --code-border: rgba(255, 255, 255, 0.06);
  --good: #0a7d0a; --good-bg: rgba(12, 163, 12, 0.09);
  --warn: #8a5a00; --warn-bg: rgba(250, 178, 25, 0.14);
  --bad: #b42323;  --bad-bg: rgba(208, 59, 59, 0.08);
  --info-bg: rgba(42, 120, 214, 0.08);
  /* chart tokens (validated: dataviz palette, light surface #ffffff) */
  --c-surface: #ffffff;
  --c-grid: #e6e8ee;
  --c-axis: #c3c7d1;
  --c-ink: #0c1222;
  --c-ink-2: #3b4559;
  --c-muted: #6b7385;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --hero-bg: #070a12;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1240px;
  --header-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JB Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #06080e; --bg-2: #0a0d15; --surface: #0e121a; --surface-2: #131824; --surface-3: #1a2030;
    --border: rgba(255, 255, 255, 0.075); --border-strong: rgba(255, 255, 255, 0.14);
    --text: #eef1f7; --text-2: #b7bfce; --muted: #8b95a8;
    --accent: #8b7bff; --accent-2: #22d3ee; --accent-ink: #a99dff; --accent-soft: rgba(139, 123, 255, 0.12);
    --grad: linear-gradient(120deg, #8b7bff 0%, #4f9cf5 45%, #22d3ee 100%);
    --grad-text: linear-gradient(110deg, #b5abff 5%, #7cb8ff 50%, #5ee0f2 95%);
    --glow: 0 0 0 1px var(--border), 0 10px 30px -18px rgba(0, 0, 0, 0.8);
    --glow-hover: 0 0 0 1px rgba(139, 123, 255, 0.45), 0 18px 40px -16px rgba(139, 123, 255, 0.35);
    --code-bg: #090c13; --code-border: rgba(255, 255, 255, 0.07);
    --good: #3ccf6a; --good-bg: rgba(12, 163, 12, 0.13);
    --warn: #ffc24d; --warn-bg: rgba(250, 178, 25, 0.12);
    --bad: #ff7b7b; --bad-bg: rgba(208, 59, 59, 0.14);
    --info-bg: rgba(57, 135, 229, 0.12);
    --c-surface: #0e121a; --c-grid: #1d2331; --c-axis: #343c4e; --c-ink: #eef1f7; --c-ink-2: #b7bfce; --c-muted: #8b95a8;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06080e; --bg-2: #0a0d15; --surface: #0e121a; --surface-2: #131824; --surface-3: #1a2030;
  --border: rgba(255, 255, 255, 0.075); --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f7; --text-2: #b7bfce; --muted: #8b95a8;
  --accent: #8b7bff; --accent-2: #22d3ee; --accent-ink: #a99dff; --accent-soft: rgba(139, 123, 255, 0.12);
  --grad: linear-gradient(120deg, #8b7bff 0%, #4f9cf5 45%, #22d3ee 100%);
  --grad-text: linear-gradient(110deg, #b5abff 5%, #7cb8ff 50%, #5ee0f2 95%);
  --glow: 0 0 0 1px var(--border), 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  --glow-hover: 0 0 0 1px rgba(139, 123, 255, 0.45), 0 18px 40px -16px rgba(139, 123, 255, 0.35);
  --code-bg: #090c13; --code-border: rgba(255, 255, 255, 0.07);
  --good: #3ccf6a; --good-bg: rgba(12, 163, 12, 0.13);
  --warn: #ffc24d; --warn-bg: rgba(250, 178, 25, 0.12);
  --bad: #ff7b7b; --bad-bg: rgba(208, 59, 59, 0.14);
  --info-bg: rgba(57, 135, 229, 0.12);
  --c-surface: #0e121a; --c-grid: #1d2331; --c-axis: #343c4e; --c-ink: #eef1f7; --c-ink-2: #b7bfce; --c-muted: #8b95a8;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--font); font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.022em; line-height: 1.15; margin: 0; font-weight: 650; }
code, kbd, pre, samp { font-family: var(--mono); font-size: 0.9em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; height: 100%; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 650; font-size: 18px; letter-spacing: -0.02em; flex-shrink: 0; }
.brand svg { width: 28px; height: 28px; }
.brand small { font: 500 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--border-strong); padding: 3px 6px; border-radius: 6px; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.nav > a, .nav-group > button {
  color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 8px 11px; border-radius: 8px;
  background: none; border: 0; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.nav > a:hover, .nav-group > button:hover, .nav-group:focus-within > button { color: var(--text); background: var(--surface-2); }
.nav > a[aria-current="page"], .nav-group.current > button { color: var(--text); }
.nav-group { position: relative; }
.nav-group > button svg { width: 12px; height: 12px; opacity: .6; transition: transform .2s; }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: -8px; min-width: 340px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45); display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu, .nav-group.open .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-group:hover > button svg { transform: rotate(180deg); }
.nav-menu a { display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); }
.nav-menu a:hover { background: var(--surface-2); }
.nav-menu .ico { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.nav-menu .ico svg { width: 18px; height: 18px; }
.nav-menu b { font-weight: 600; font-size: 14px; }
.nav-menu span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 12px; min-width: 200px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted);
  font: 14px var(--font); cursor: pointer;
}
.search-btn:hover { border-color: var(--accent); color: var(--text-2); }
.search-btn svg { width: 15px; height: 15px; }
.search-btn kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .sun { display: block; } :root:not([data-theme="light"]) .theme-btn .moon { display: none; } }
.menu-btn { display: none; }
@media (max-width: 1060px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .search-btn { min-width: 0; width: 36px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  body.nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch; position: fixed; inset: var(--header-h) 0 0 0; margin: 0;
    background: var(--bg); padding: 16px; overflow-y: auto; gap: 4px; z-index: 60;
  }
  body.nav-open .nav > a, body.nav-open .nav-group > button { font-size: 17px; padding: 12px; width: 100%; justify-content: space-between; }
  body.nav-open .nav-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; min-width: 0; padding: 0 0 8px; background: transparent; }
  body.nav-open { overflow: hidden; }
}

/* ---------- search palette ---------- */
.palette { position: fixed; inset: 0; z-index: 90; display: none; place-items: start center; padding: 12vh 16px 16px; background: rgba(3, 5, 10, 0.55); backdrop-filter: blur(6px); }
.palette.open { display: grid; }
.palette-box { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6); overflow: hidden; }
.palette-box input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: 17px var(--font); padding: 18px 20px; outline: none; }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 8px; margin: 0; list-style: none; }
.palette-results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.palette-results a small { display: block; color: var(--muted); font-size: 12.5px; }
.palette-results a.active, .palette-results a:hover { background: var(--accent-soft); }
.palette-results .empty { padding: 18px; color: var(--muted); }
.palette-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.palette-foot kbd { border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 4px; }

/* ---------- buttons, badges ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font: 600 15px var(--font);
  text-decoration: none; cursor: pointer; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); transition: transform .15s, box-shadow .2s, border-color .2s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 30px -10px rgba(91, 76, 240, 0.6); }
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(91, 76, 240, 0.75); border-color: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #0ca30c; box-shadow: 0 0 0 3px rgba(12, 163, 12, 0.18); }
.eyebrow { font: 600 12.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 8px; }

/* ---------- home hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #eef1f7;
  background: radial-gradient(1200px 600px at 75% -10%, rgba(139, 123, 255, 0.28), transparent 60%),
              radial-gradient(900px 500px at 10% 110%, rgba(34, 211, 238, 0.14), transparent 60%), var(--hero-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 650; }
.hero h1 .grad-text { background: linear-gradient(110deg, #c3bbff 0%, #8fc4ff 45%, #67e8f9 100%); -webkit-background-clip: text; background-clip: text; }
.hero .lede { font-size: 19px; color: #b7bfce; margin: 22px 0 30px; max-width: 34em; }
.hero .badge { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); color: #c9d0dd; }
.hero .btn { background: rgba(255,255,255,.05); color: #eef1f7; border-color: rgba(255,255,255,.16); }
.hero .btn-primary { background: linear-gradient(120deg, #8b7bff, #4f9cf5 55%, #22d3ee); border-color: transparent; color: #fff; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 40px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); }
.hero-stats div { background: rgba(7, 10, 18, 0.85); padding: 14px 16px; }
.hero-stats b { display: block; font: 600 26px/1.1 var(--font-display); letter-spacing: -0.02em; color: #fff; }
.hero-stats span { font-size: 12.5px; color: #8b95a8; line-height: 1.35; display: block; margin-top: 4px; }
.map-card { position: relative; border-radius: 20px; background: rgba(10, 13, 22, 0.6); border: 1px solid rgba(255,255,255,.09); box-shadow: 0 40px 120px -40px rgba(139, 123, 255, 0.45), inset 0 1px 0 rgba(255,255,255,.06); overflow: hidden; }
.map-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); font: 12px var(--mono); color: #8b95a8; }
.map-top .lights { display: flex; gap: 6px; }
.map-top .lights i { width: 10px; height: 10px; border-radius: 50%; background: #2a3142; }
.map-search { margin-left: auto; position: relative; }
.map-search input { width: 210px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #eef1f7; padding: 0 10px; font: 13px var(--font); }
.map-search ul { position: absolute; right: 0; top: 34px; width: 280px; max-height: 260px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: #0e121a; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; z-index: 5; display: none; }
.map-search ul.show { display: block; }
.map-search li button { width: 100%; text-align: left; background: none; border: 0; color: #dfe4ee; padding: 7px 9px; border-radius: 7px; font: 13px var(--font); cursor: pointer; }
.map-search li button:hover, .map-search li button.active { background: rgba(139,123,255,.18); }
.map-canvas-wrap { position: relative; aspect-ratio: 1.18 / 1; }
.map-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.map-tip { position: absolute; pointer-events: none; z-index: 3; background: rgba(14, 18, 26, 0.94); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: #eef1f7; max-width: 260px; transform: translate(-50%, calc(-100% - 14px)); opacity: 0; transition: opacity .12s; }
.map-tip small { color: #8b95a8; display: block; }
.map-panel { border-top: 1px solid rgba(255,255,255,.07); padding: 12px 14px 14px; min-height: 152px; font-size: 13px; color: #b7bfce; }
.map-panel h3 { font: 600 14px var(--font); color: #fff; letter-spacing: 0; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.map-panel h3 small { color: #8b95a8; font-weight: 400; font-family: var(--mono); font-size: 11px; }
.map-panel ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 18px; }
.map-panel li { display: flex; justify-content: space-between; gap: 8px; break-inside: avoid; padding: 2px 0; }
.map-panel li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-panel li code { color: #8fc4ff; font-size: 11.5px; flex-shrink: 0; }
.map-panel pre { margin: 10px 0 0; font-size: 11.5px; color: #8b95a8; white-space: pre-wrap; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 48px; } .map-panel ol { columns: 1; } }
@media (max-width: 520px) { .hero-stats { grid-template-columns: 1fr; } .map-search input { width: 150px; } }

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(900px 340px at 85% -20%, var(--accent-soft), transparent 70%), var(--bg); }
.page-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(circle at 1px 1px, var(--border-strong) 1px, transparent 0); background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 40%, #000 100%); }
.page-hero .wrap { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 36px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; padding: 0; list-style: none; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 52px); max-width: 20em; }
.page-hero .lede { font-size: 18.5px; color: var(--text-2); max-width: 44em; margin: 16px 0 0; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

/* ---------- doc layout ---------- */
.doc { display: grid; grid-template-columns: 228px minmax(0, 1fr) 220px; gap: 48px; padding-top: 40px; padding-bottom: 80px; }
.doc.no-side { grid-template-columns: minmax(0, 1fr) 220px; }
.doc.wide { grid-template-columns: minmax(0, 1fr); }
.sidenav, .toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; font-size: 14px; scrollbar-width: thin; }
.sidenav h2, .toc h2 { font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.sidenav h2:first-child, .toc h2:first-child { margin-top: 0; }
.sidenav ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.sidenav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.sidenav a:hover { background: var(--surface-2); color: var(--text); }
.sidenav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--border-strong); color: var(--muted); text-decoration: none; line-height: 1.4; font-size: 13.5px; }
.toc a.l3 { padding-left: 24px; font-size: 13px; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent-ink); border-left: 2px solid var(--accent); padding-left: 11px; }
.toc a.l3.active { padding-left: 23px; }
.toc-extra { margin-top: 24px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--text-2); }
.toc-extra b { display: block; color: var(--text); margin-bottom: 4px; }
@media (max-width: 1200px) { .doc { grid-template-columns: 210px minmax(0, 1fr); } .doc .toc { display: none; } .doc.no-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .doc, .doc.no-side { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; } .sidenav { display: none; } }

/* ---------- prose ---------- */
.prose { min-width: 0; font-size: 16.5px; color: var(--text-2); }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { color: var(--text); font-size: 30px; margin-top: 2.1em; padding-top: .2em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { color: var(--text); font-size: 21px; margin-top: 1.8em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h4 { color: var(--text); font-size: 17px; margin-top: 1.5em; font-family: var(--font); letter-spacing: -0.01em; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose h2 .anchor, .prose h3 .anchor { margin-left: 8px; opacity: 0; color: var(--muted); text-decoration: none; font-weight: 400; transition: opacity .15s; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose p, .prose li { max-width: 72ch; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--muted); }
.prose :not(pre) > code { font-size: .86em; padding: .12em .38em; border-radius: 6px; background: var(--surface-3); color: var(--text); border: 1px solid var(--border); overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--text-2); }
.lead-answer { font-size: 18px; color: var(--text); padding: 18px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--glow); border-left: 3px solid var(--accent); }
.lead-answer p { margin: 0; }
.lead-answer p + p { margin-top: .6em; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prose table, table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td, table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th, table.data th { font-weight: 600; color: var(--text); background: var(--surface-2); font-size: 13px; white-space: nowrap; }
.prose tr:last-child td, table.data tr:last-child td { border-bottom: 0; }
.prose td.num, table.data td.num, .prose th.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose td code { white-space: nowrap; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }

/* callouts */
.callout { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--info-bg); font-size: 15.5px; color: var(--text-2); }
.callout svg { width: 20px; height: 20px; margin-top: 2px; color: var(--accent-ink); }
.callout p { margin: 0; }
.callout p + p { margin-top: .5em; }
.callout b:first-child { color: var(--text); }
.callout.warn { background: var(--warn-bg); } .callout.warn svg { color: var(--warn); }
.callout.bad { background: var(--bad-bg); } .callout.bad svg { color: var(--bad); }
.callout.good { background: var(--good-bg); } .callout.good svg { color: var(--good); }

/* key findings */
.findings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.finding { padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--glow); }
.finding b { display: block; font: 650 28px/1.1 var(--font-display); color: var(--text); letter-spacing: -0.02em; }
.finding span { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.finding em { font-style: normal; color: var(--muted); font-size: 12px; display: block; margin-top: 8px; font-family: var(--mono); }

/* steps */
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 48px; max-width: none; }
.steps > li + li { margin-top: 22px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font: 600 14px var(--mono); color: var(--accent-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.steps > li > b:first-child { color: var(--text); display: block; margin-bottom: 4px; }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 12px; background: var(--surface); box-shadow: var(--glow); }
.faq summary { cursor: pointer; padding: 15px 18px; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 18px 16px; color: var(--text-2); }
.faq details > div > * + * { margin-top: .7em; }
.faq details p { margin: 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--glow); color: var(--text-2); text-decoration: none; transition: box-shadow .2s, transform .2s; overflow: hidden; }
a.card:hover { box-shadow: var(--glow-hover); transform: translateY(-2px); }
.card h3 { color: var(--text); font-size: 18px; margin: 12px 0 6px; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.card .card-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.card .card-ico svg { width: 21px; height: 21px; }
.card .more { margin-top: auto; padding-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); }
.card .stat { font: 600 12px var(--mono); color: var(--muted); margin-top: 12px; }

/* sections on home */
.section { padding: 88px 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin-top: 12px; }
.section-head p { font-size: 18px; color: var(--text-2); margin: 14px 0 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .section { padding: 60px 0; } }

/* tabs */
.tabs { border-radius: var(--radius); background: var(--surface); box-shadow: var(--glow); overflow: hidden; }
.tablist { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; background: var(--surface-2); }
.tablist button { flex-shrink: 0; border: 0; background: none; color: var(--text-2); font: 500 14px var(--font); padding: 8px 12px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.tablist button:hover { color: var(--text); background: var(--surface); }
.tablist button[aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--border-strong); font-weight: 600; }
.tabpanel { padding: 18px 20px 20px; }
.tabpanel[hidden] { display: none; }
.tabpanel > * + * { margin-top: 1em; }

/* segmented control & form */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button, .seg label { border: 0; background: none; color: var(--text-2); font: 500 14px var(--font); padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong), 0 2px 6px -2px rgba(0,0,0,.2); font-weight: 600; }
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 13px; font-weight: 600; color: var(--text); }
.field small { color: var(--muted); font-size: 12.5px; }
.input, select.input { height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 0 12px; font: 15px var(--font); width: 100%; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ---------- code ---------- */
.code { position: relative; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--code-border); overflow: hidden; box-shadow: 0 10px 30px -18px rgba(0,0,0,.5); }
.code-head { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--code-border); font: 500 12px var(--mono); color: #8b95a8; background: rgba(255,255,255,.02); }
.code-head .lang { text-transform: uppercase; letter-spacing: .06em; }
.code-head .title { color: #c9d0dd; }
.copy-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: #c9d0dd; font: 500 12px var(--font); cursor: pointer; }
.copy-btn:hover { background: rgba(255,255,255,.09); color: #fff; }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.done { color: #3ccf6a; border-color: rgba(60, 207, 106, .4); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--code-text); font-size: 13.5px; line-height: 1.65; tab-size: 2; scrollbar-width: thin; }
.code pre code { font-size: inherit; background: none; border: 0; padding: 0; color: inherit; }
.code.output pre { color: #aeb8c9; }
.code.output .code-head { color: #6b7590; }
.tk-k { color: #c4a5ff; } .tk-f { color: #7cc4ff; } .tk-s { color: #a5e3a1; } .tk-n { color: #ffb86b; }
.tk-c { color: #6b7590; font-style: italic; } .tk-o { color: #ff8fb1; } .tk-t { color: #67e8f9; } .tk-p { color: #6b7590; user-select: none; }
.tk-e { color: #ff7b7b; } .tk-v { color: #ffd479; }

/* ---------- charts ---------- */
.chart { margin: 0; border-radius: var(--radius); background: var(--c-surface); box-shadow: var(--glow); padding: 18px 18px 14px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.chart-title { font: 650 16.5px/1.3 var(--font); color: var(--c-ink); letter-spacing: -0.01em; margin: 0; }
.chart-sub { font-size: 13.5px; color: var(--c-muted); margin: 3px 0 0; max-width: 62ch; }
.chart-tools { display: flex; gap: 6px; flex-shrink: 0; }
.chart-tools button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: 500 12.5px var(--font); cursor: pointer; }
.chart-tools button:hover { color: var(--text); border-color: var(--accent); }
.chart-tools button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 6px; padding: 0; list-style: none; font-size: 13px; color: var(--c-ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.sq { width: 10px; height: 10px; border-radius: 3px; }
.chart-plot { position: relative; }
.chart-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-plot text { font-family: var(--font); fill: var(--c-muted); font-size: 11.5px; }
.chart-plot .tick-line { stroke: var(--c-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart-plot .axis-line { stroke: var(--c-axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart-plot .axis-title { fill: var(--c-ink-2); font-size: 12px; font-weight: 500; }
.chart-plot .dlabel { fill: var(--c-ink); font-size: 12px; font-weight: 600; }
.chart-plot .dlabel-2 { fill: var(--c-ink-2); font-size: 11.5px; }
.chart-plot .ref { stroke: var(--c-muted); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-plot .ref-label { fill: var(--c-muted); font-size: 11px; }
.chart-plot .hover-line { stroke: var(--c-axis); stroke-width: 1; }
.chart-plot .series path.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-plot .series circle { stroke: var(--c-surface); stroke-width: 2; }
.chart-plot .bar { transition: opacity .15s; }
.chart-plot .dim { opacity: .28; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; max-width: 280px; padding: 9px 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 14px 34px -12px rgba(0,0,0,.45); font-size: 12.5px; color: var(--text-2); opacity: 0; transition: opacity .1s; }
.chart-tip b { color: var(--text); display: block; margin-bottom: 4px; font-size: 13px; }
.chart-tip div { display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.chart-tip div span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.chart-tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chart-tip em { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.chart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: var(--c-muted); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-grid); }
.chart-foot a { color: var(--c-muted); }
.chart-table { margin-top: 12px; }
.chart-table[hidden] { display: none; }
.chart.js-ready .chart-table:not(.show) { display: none; }
.chart:not(.js-ready) .chart-plot, .chart:not(.js-ready) .legend { display: none; }
.chart-table table { font-size: 13px; }
.chart-table td, .chart-table th { padding: 6px 10px !important; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat-tile { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--glow); }
.stat-tile .label { font-size: 13px; color: var(--muted); }
.stat-tile .value { font: 650 30px/1.15 var(--font-display); color: var(--text); letter-spacing: -0.02em; margin-top: 4px; }
.stat-tile .note { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

/* ---------- tools ---------- */
.tool { border-radius: 18px; background: var(--surface); box-shadow: var(--glow); overflow: hidden; }
.tool-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.tool-inputs { padding: 22px; border-right: 1px solid var(--border); background: var(--surface-2); display: grid; gap: 16px; align-content: start; }
.tool-out { padding: 22px; min-width: 0; display: grid; gap: 18px; align-content: start; }
.tool h2.tool-h { font-size: 15px; font-family: var(--font); letter-spacing: 0; color: var(--text); margin: 0; }
.out-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.out-tile { padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.out-tile .label { font-size: 12.5px; color: var(--muted); }
.out-tile .value { font: 650 22px/1.2 var(--font-display); color: var(--text); margin-top: 3px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.out-tile .note { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.notes-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.notes-list li { padding: 10px 12px 10px 36px; border-radius: 10px; position: relative; font-size: 14px; background: var(--info-bg); color: var(--text-2); max-width: none; }
.notes-list li::before { content: "i"; position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; border-radius: 50%; font: 700 11px/16px var(--mono); text-align: center; background: var(--s1); color: #fff; }
.notes-list li.warn { background: var(--warn-bg); } .notes-list li.warn::before { content: "!"; background: #c98500; }
.notes-list li.good { background: var(--good-bg); } .notes-list li.good::before { content: "✓"; background: #0ca30c; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } .tool-inputs { border-right: 0; border-bottom: 1px solid var(--border); } }

/* viz canvases (HNSW/IVF explainers) */
.viz { border-radius: 18px; background: var(--hero-bg); border: 1px solid rgba(255,255,255,.08); overflow: hidden; color: #dfe4ee; box-shadow: 0 30px 80px -40px rgba(139,123,255,.45); }
.viz-stage { position: relative; aspect-ratio: 16 / 9; }
.viz-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.viz-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 13.5px; color: #b7bfce; }
.viz-bar label { display: inline-flex; align-items: center; gap: 8px; }
.viz-bar input[type="range"] { width: 140px; }
.viz-bar output { font: 600 13px var(--mono); color: #fff; min-width: 2.5ch; display: inline-block; }
.viz-bar .btn { height: 32px; font-size: 13px; padding: 0 12px; background: rgba(255,255,255,.06); color: #eef1f7; border-color: rgba(255,255,255,.14); border-radius: 9px; }
.viz-bar .btn-primary { background: linear-gradient(120deg, #8b7bff, #4f9cf5); border-color: transparent; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; font-size: 12.5px; color: #8b95a8; }
.viz-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.viz-caption { padding: 0 16px 14px; font-size: 13px; color: #8b95a8; }
.viz-caption b { color: #dfe4ee; font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 36px; font-size: 14px; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.site-footer h2 { font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .about-col p { margin: 12px 0 0; max-width: 34em; line-height: 1.6; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid .about-col { grid-column: 1 / -1; } }

/* ---------- motion ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .chart-plot .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s cubic-bezier(.3,.7,.2,1) forwards; }
  .chart-plot .grow { transform-origin: var(--ox, 0) var(--oy, 100%); animation: grow .8s cubic-bezier(.3,.7,.2,1) both; }
  .chart-plot .pop { animation: pop .4s .7s both; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes pop { from { opacity: 0; } }
@media print {
  .site-header, .site-footer, .sidenav, .toc, .copy-btn, .chart-tools { display: none !important; }
  .doc { display: block; }
  .chart .chart-table { display: block !important; }
}
@media (forced-colors: active) { .btn-primary, .hero .btn-primary { border: 1px solid ButtonText; } }

/* ---------- refinements ---------- */
.prose .notes-list, .prose .steps { padding-left: 0; }
.prose .tool { margin-top: 1.4em; }
.doc:not(.no-side) .tool-grid { grid-template-columns: minmax(0, 1fr); }
.doc:not(.no-side) .tool-inputs { border-right: 0; border-bottom: 1px solid var(--border); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.toc-extra a { display: inline; border: 0; padding: 0; color: var(--accent-ink); font-size: 13px; }
.page-hero .lede code, .hero .lede code { font-size: .86em; padding: .1em .35em; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text); }
.page-hero .lede kbd, .prose kbd { font: 12px var(--mono); padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--text); }
.lead-answer .code { margin-top: 12px; }
/* hero constellation */
.hero-deco { position: absolute; right: -40px; top: -20px; width: min(560px, 55vw); height: 100%; z-index: 0; pointer-events: none; opacity: .9; }
.hero-deco line { stroke: var(--accent); stroke-opacity: .22; stroke-width: 1; }
.hero-deco circle { fill: var(--accent); }
.hero-deco circle.q { fill: var(--accent-2); }
.hero-deco .glow { fill: url(#hd-glow); }
@media (prefers-reduced-motion: no-preference) {
  .hero-deco g.float { animation: float 9s ease-in-out infinite alternate; transform-origin: center; }
  .hero-deco line.pulse { stroke-dasharray: 4 6; animation: dash 6s linear infinite; stroke-opacity: .5; stroke: var(--accent-2); }
  .hero-deco circle.q { animation: breathe 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(8px); } }
@keyframes dash { to { stroke-dashoffset: -100; } }
@keyframes breathe { 50% { transform: scale(1.6); opacity: .7; } }
@media (max-width: 760px) { .hero-deco { opacity: .35; } }
.tool-inputs { align-items: start; }
#vc-presets button { text-align: left; }
code, kbd, pre, samp, .mono { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
body.nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
.prose .chart, .prose .viz, .prose .tool { margin-top: 1.6em; margin-bottom: 1.6em; }
.prose .chart + .chart { margin-top: 1.2em; }
.cs-item { margin-top: 2.2em; }
.cs-item > * + * { margin-top: .75em; }
.cs-item h3 { margin-top: 0; }
.prose h2 + .cs-item { margin-top: 1.2em; }
.anchor { opacity: 0; margin-left: 8px; color: var(--muted); text-decoration: none; font-weight: 400; transition: opacity .15s; }
h2:hover > .anchor, h3:hover > .anchor, .anchor:focus { opacity: 1; }
.hero-stats b span { font: inherit; color: inherit; display: inline; margin: 0; }
.map-note { padding: 0 14px 12px; font-size: 11.5px; color: #6b7590; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (min-width: 1000px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.split-code { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
