/* ==========================================================================
   Vee — "Cinematic dark, lit from within"
   Dark-native design system. One stylesheet, no external requests.
   Self-hosted fonts. Shared by index + guide/* + compare/*.
   ========================================================================== */

/* ---- Self-hosted fonts ---------------------------------------------------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("./fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
/* size-adjust fallback faces to minimize CLS while the variable fonts load */
@font-face {
  font-family: "Hanken Fallback";
  src: local("Arial");
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
  size-adjust: 100%;
}
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial");
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 104%;
}

/* ---- Design tokens (dark-native — one set) -------------------------------- */
:root {
  color-scheme: dark;

  /* Canvas: near-black, indigo-tinted */
  --bg: #070811;
  --bg-2: #0a0c16;
  --surface: #0f1221;
  --surface-2: #151932;

  /* Ink */
  --ink: #eef1fb;
  --ink-soft: #b7bfd6;
  --ink-mute: #7b839d;

  /* Hairlines (depth via 1px gradient borders, not shadows) */
  --hair: rgba(255, 255, 255, 0.09);
  --hair-strong: rgba(255, 255, 255, 0.16);
  /* legacy aliases kept so guide/compare pages that reference them still work */
  --line: var(--hair);
  --line-strong: var(--hair-strong);

  /* Accent — treated as light (a bloom behind glass), rationed */
  --accent-1: #5b5be6;
  --accent-2: #2f6bfb;
  --accent-3: #7b6bff; /* violet for aurora depth */
  --grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --accent-grad: var(--grad);
  --accent-grad-soft: linear-gradient(135deg, rgba(91, 91, 230, 0.20), rgba(47, 107, 251, 0.16));

  /* Severity / trust colors (dark-tuned; DO NOT remove — trust visuals rely on these) */
  --sev-low: #38cf74;
  --sev-low-bg: rgba(56, 207, 116, 0.14);
  --sev-med: #f0a92b;
  --sev-med-bg: rgba(240, 169, 43, 0.15);
  --sev-high: #ff6b60;
  --sev-high-bg: rgba(255, 107, 96, 0.15);

  /* Glass (liquid, hairline not shadow) */
  --glass: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  --glass-solid: rgba(15, 18, 33, 0.85);
  --glass-2: rgba(255, 255, 255, 0.03);
  --glass-brd: var(--hair-strong);
  --glass-blur: saturate(160%) blur(14px);

  /* Shadows: soft ambient only, never the primary depth cue */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.5);
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.14);

  /* Code surface */
  --code-bg: rgba(255, 255, 255, 0.035);
  --code-ink: #dfe4f2;

  /* Radii & type */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --measure: 68ch;

  --font: "Hanken Grotesk", "Hanken Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Bricolage Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 60px;
}

/* ---- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
}
/* Clip decorative bleed (auroras, glows) at the root without creating a scroll
   container — `clip` preserves the sticky nav, unlike `overflow: hidden`. */
html { overflow-x: clip; }
body { overflow-x: clip; }

/* Base atmosphere for ALL pages: near-black with restrained brand glows +
   a bottom grounding. The landing page layers its live aurora on top. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60vmax 46vmax at 14% -8%, rgba(91, 91, 230, 0.16), transparent 60%),
    radial-gradient(56vmax 42vmax at 92% -6%, rgba(47, 107, 251, 0.12), transparent 62%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, var(--bg-2) 100%);
}

/* Fine film grain over gradients so dark reads as material, not flat.
   Inline SVG feTurbulence data-URI. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { max-width: 100%; }
svg { display: block; }

a {
  color: #7fa9ff;
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { text-decoration: underline; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hair-strong);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ---- Layout helpers ------------------------------------------------------- */
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); position: relative; }
.section { padding-block: clamp(56px, 9vw, 108px); position: relative; }
.section-tight { padding-block: clamp(40px, 6vw, 72px); position: relative; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.center .eyebrow { justify-content: center; }

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h2.section-title { font-size: clamp(1.75rem, 3.6vw, 2.7rem); margin-bottom: 0.35em; letter-spacing: -0.028em; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: var(--measure); font-weight: 380; }
.center .lede { margin-inline: auto; }

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

/* ---- Glass primitives ----------------------------------------------------- */
/* Liquid glass: gradient fill + small blur + inset specular + hairline gradient
   border via mask-composite. Depth from hairline, not shadow. */
.glass, .card {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), var(--specular);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .card { background: var(--glass-solid); }
}
/* 1px gradient hairline border via mask-composite trick */
.glass::after, .card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 40%, rgba(255, 255, 255, 0.02) 60%, rgba(123, 107, 255, 0.14));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card {
  padding: clamp(20px, 3vw, 30px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card--hover { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--specular);
}
.card--hover:hover::after {
  background: linear-gradient(135deg, rgba(123, 130, 255, 0.5), rgba(47, 107, 251, 0.28) 50%, rgba(255, 255, 255, 0.06));
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  --bh: 46px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--bh);
  padding: 0 20px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 560;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 8px 24px rgba(47, 107, 251, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(47, 107, 251, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.32); }
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-color: var(--hair-strong);
}
.btn-ghost:hover { border-color: rgba(127, 169, 255, 0.6); background: rgba(255, 255, 255, 0.07); }
.btn svg { width: 18px; height: 18px; }

/* ---- Top nav -------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--nav-h);
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.brand b {
  font-weight: 600;
  color: var(--ink);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
  padding: 0; margin-block: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 460;
  padding: 8px 12px;
  border-radius: 9px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--glass-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links .nav-cta {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 4px 14px rgba(47, 107, 251, 0.32);
}
.nav-links .nav-cta:hover { color: #fff; background: var(--grad); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: var(--glass-2);
  border: 1px solid var(--hair-strong);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px clamp(18px, 5vw, 40px) 20px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    backdrop-filter: saturate(160%) blur(20px);
    border-bottom: 1px solid var(--hair);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
}

/* ==========================================================================
   Content sections (shared shells used by landing + docs)
   ========================================================================== */

/* protocol / feature chips */
.chip-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.proto-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hair);
  box-shadow: var(--specular);
  font-size: 0.9rem; font-weight: 440;
  color: var(--ink-soft);
}
.proto-chip code { font-family: var(--mono); }
.proto-chip svg { width: 13px; height: 13px; color: var(--accent-1); }

/* feature grid */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.feature__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-grad-soft);
  border: 1px solid var(--hair);
  color: #a9baff;
  margin-bottom: 16px;
}
.feature__icon svg { width: 23px; height: 23px; }
.feature h3 { font-size: 1.16rem; margin-bottom: 0.35em; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }
.feature code { font-family: var(--mono); }

/* split section (visual beside copy) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.split--rev .split__visual { order: -1; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split--rev .split__visual { order: 0; }
}
.split__copy code, .split__copy strong { }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-soft); }
.check-list svg { flex: none; width: 20px; height: 20px; color: var(--sev-low); margin-top: 2px; }
.check-list b { color: var(--ink); font-weight: 600; }

/* ---- Code blocks ---------------------------------------------------------- */
pre {
  margin: 1.1rem 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--code-bg);
  border: 1px solid var(--hair);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}
pre code { font-family: inherit; color: var(--code-ink); background: none; padding: 0; font-size: inherit; }
:not(pre) > code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code-bg);
  border: 1px solid var(--hair);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  color: #cdd5ee;
  word-break: break-word;
}
.code-window {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--hair-strong);
  box-shadow: var(--shadow-md);
  background: rgba(10, 12, 22, 0.7);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.code-window__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.02);
}
.code-window__bar .traffic { display: flex; gap: 7px; }
.code-window__bar .traffic i { width: 11px; height: 11px; border-radius: 50%; }
.code-window__bar .traffic i:nth-child(1) { background: #ff5f57; }
.code-window__bar .traffic i:nth-child(2) { background: #febc2e; }
.code-window__bar .traffic i:nth-child(3) { background: #28c840; }
.code-window__bar .fname { margin-left: 8px; font-size: 0.82rem; color: var(--ink-mute); font-family: var(--mono); }
.code-window pre { margin: 0; border: 0; border-radius: 0; background: transparent; }

/* Syntax highlight (CSS classes emitted inline, no JS) */
.tok-key { color: #d99cf5; }
.tok-str { color: #7ee0a0; }
.tok-com { color: var(--ink-mute); font-style: italic; }
.tok-fn  { color: #6fa8ff; }
.tok-num { color: #f0b64a; }
.tok-punc { color: var(--ink-mute); }

/* ---- Trust install sheet (shared token-driven visual) --------------------- */
.trust-sheet {
  position: relative;
  width: min(420px, 100%);
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg), var(--specular);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .trust-sheet { background: var(--glass-solid); }
}
.trust-sheet::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.03) 50%, rgba(123, 107, 255, 0.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.trust-sheet__head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.trust-sheet__icon { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--shadow-sm); flex: none; }
.trust-sheet__title { font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.trust-sheet__by { font-size: 0.85rem; color: var(--ink-mute); font-family: var(--mono); }
.trust-sheet__q { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); margin: 18px 0 10px; }

.trust-rows { display: grid; gap: 8px; }
.trust-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--hair);
}
.trust-row__ic {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
}
.trust-row__ic svg { width: 17px; height: 17px; }
.trust-row__body { min-width: 0; }
.trust-row__what { font-weight: 500; font-size: 0.92rem; line-height: 1.3; color: var(--ink); }
.trust-row__detail { font-size: 0.86rem; color: var(--ink-mute); font-family: var(--mono); word-break: break-word; }

.sev-low  .trust-row__ic { background: var(--sev-low-bg); color: var(--sev-low); }
.sev-med  .trust-row__ic { background: var(--sev-med-bg); color: var(--sev-med); }
.sev-high .trust-row__ic { background: var(--sev-high-bg); color: var(--sev-high); }

.trust-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.76rem; font-weight: 500;
  border: 1px solid transparent;
}
.trust-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.trust-pill--declared { background: var(--sev-low-bg); color: var(--sev-low); border-color: color-mix(in srgb, var(--sev-low) 34%, transparent); }
.trust-pill--declared .dot { background: var(--sev-low); }
.trust-pill--partial { background: var(--sev-med-bg); color: var(--sev-med); border-color: color-mix(in srgb, var(--sev-med) 34%, transparent); }
.trust-pill--partial .dot { background: var(--sev-med); }
.trust-pill--undeclared { background: var(--sev-high-bg); color: var(--sev-high); border-color: color-mix(in srgb, var(--sev-high) 34%, transparent); }
.trust-pill--undeclared .dot { background: var(--sev-high); }

.trust-sheet__foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.trust-sheet__foot .spacer { flex: 1; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.92rem; border-radius: 10px; }

/* ---- Discover plugin card ------------------------------------------------- */
.plugin-card { display: grid; gap: 14px; width: min(340px, 100%); }
.plugin-card__top { display: flex; gap: 14px; align-items: flex-start; }
.plugin-tile {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.3);
  background: var(--grad);
}
.plugin-tile svg { width: 26px; height: 26px; }
.plugin-card__name { font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.plugin-card__author { font-size: 0.85rem; color: var(--ink-mute); font-family: var(--mono); }
.plugin-card__desc { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.plugin-card__foot { display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.74rem; font-weight: 500;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip--low { background: var(--sev-low-bg); color: var(--sev-low); }
.chip--low .dot { background: var(--sev-low); }

/* ---- Comparison teaser ---------------------------------------------------- */
.teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .teaser-grid { grid-template-columns: 1fr; } }
.teaser-card { display: flex; flex-direction: column; gap: 8px; }
.teaser-card h3 { margin: 0; font-size: 1.2rem; }
.teaser-card .arrow { margin-top: auto; color: #7fa9ff; font-weight: 560; font-size: 0.95rem; }

/* ---- Final CTA ------------------------------------------------------------ */
.cta-band { text-align: center; padding: clamp(40px, 6vw, 64px); }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.cta-band .hero-cta { justify-content: center; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--hair);
  padding-block: 44px 52px;
  margin-top: clamp(40px, 6vw, 72px);
  position: relative;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer-grid h4 { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); margin-bottom: 0.9em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-soft); font-size: 0.94rem; }
.footer-grid a:hover { color: #7fa9ff; }
.footer-about { color: var(--ink-mute); font-size: 0.92rem; max-width: 34ch; margin: 0.8rem 0 0; }
.footer-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between;
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--hair);
  color: var(--ink-mute); font-size: 0.88rem;
}
.footer-bar span:last-child { font-family: var(--mono); font-size: 0.8rem; }

/* ==========================================================================
   Docs shell (guide + compare)
   ========================================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 44px) clamp(18px, 5vw, 40px) 80px;
  position: relative;
}
.docs-side {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 40px);
  overflow-y: auto;
}
.docs-nav-title {
  font-family: var(--mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute); font-weight: 500;
  margin: 0 0 10px; padding-left: 12px;
}
.docs-nav { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 2px; }
.docs-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 440;
  border-left: 2px solid transparent;
}
.docs-nav a:hover { background: var(--glass-2); color: var(--ink); text-decoration: none; }
.docs-nav a[aria-current="page"] {
  background: var(--accent-grad-soft);
  color: #cdd5ff;
  font-weight: 540;
  border-left-color: var(--accent-2);
}

.docs-main { min-width: 0; }
.docs-content { max-width: var(--measure); }
.docs-content > *:first-child { margin-top: 0; }
.docs-content h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 0.5em; letter-spacing: -0.028em; }
.docs-content h2 {
  font-size: 1.5rem; margin-top: 2.2rem;
  padding-bottom: 0.3em; border-bottom: 1px solid var(--hair);
}
.docs-content h3 { font-size: 1.18rem; margin-top: 1.8rem; }
.docs-content h4 { font-size: 1.02rem; margin-top: 1.4rem; }
.docs-content p { margin: 0 0 1.05rem; color: var(--ink-soft); }
.docs-content ul, .docs-content ol { margin: 0 0 1.05rem; padding-left: 1.3em; color: var(--ink-soft); }
.docs-content li { margin-bottom: 0.4rem; }
.docs-content li::marker { color: #7fa9ff; }
.docs-content strong { color: var(--ink); font-weight: 600; }
.docs-content a { font-weight: 440; }

.table-scroll { overflow-x: auto; margin: 1.1rem 0; border-radius: var(--r-md); border: 1px solid var(--hair); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; min-width: 460px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; }
thead th { background: rgba(255, 255, 255, 0.03); font-weight: 600; color: var(--ink); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td code, th code { white-space: nowrap; }

.callout {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--accent-grad-soft);
  border: 1px solid color-mix(in srgb, var(--accent-2) 28%, transparent);
  margin: 1.2rem 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}
.callout svg { flex: none; width: 20px; height: 20px; color: #7fa9ff; margin-top: 2px; }

.doc-hero-note {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: #8fb0ff;
  margin-bottom: 0.6rem;
}
.doc-nextprev {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--hair);
}
.doc-nextprev a {
  flex: 1 1 220px;
  padding: 14px 18px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--hair-strong);
  box-shadow: var(--shadow-sm);
}
.doc-nextprev a:hover { text-decoration: none; border-color: rgba(127, 169, 255, 0.6); }
.doc-nextprev .dir { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; }
.doc-nextprev .lbl { font-weight: 560; color: var(--ink); }
.doc-nextprev .next { text-align: right; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side {
    position: static; max-height: none; overflow: visible;
    margin-bottom: 8px;
  }
  .docs-nav {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px;
  }
  .docs-nav a { border-left: 0; border: 1px solid var(--hair); border-radius: 999px; padding: 7px 13px; font-size: 0.88rem; }
  .docs-nav a[aria-current="page"] { border-left: 0; border-color: var(--accent-2); }
  .docs-nav-title { padding-left: 0; }
}

/* Guide index cards */
.guide-index-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 8px; }
.guide-index-card { display: flex; flex-direction: column; gap: 6px; }
.guide-index-card h3 { margin: 0; font-size: 1.08rem; }
.guide-index-card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.guide-index-card .num { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; color: #8fb0ff; }

/* Comparison bottom-line box */
.bottom-line {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin: 1.4rem 0;
}
@media (max-width: 680px) { .bottom-line { grid-template-columns: 1fr; } }
.bottom-line .bl-card { padding: 18px 20px; }
.bottom-line h3 { margin: 0 0 0.5em; font-size: 1.05rem; }
.bl-yes { color: var(--sev-low); }
.bl-no { color: var(--ink-soft); }

/* verdict cells in compare tables */
.v-yes { color: var(--sev-low); font-weight: 560; }
.v-no  { color: var(--sev-high); font-weight: 540; }
.v-mid { color: var(--sev-med); font-weight: 540; }

/* utility */
.mt-0 { margin-top: 0; }
.muted { color: var(--ink-mute); }
.nowrap { white-space: nowrap; }

/* ===================== RELIABILITY / SOAK CHART ===================== */
.soak-figure {
  margin: 2.6rem auto 0;
  max-width: 900px;
  padding: 1.4rem 1.4rem 1rem;
  background: var(--glass);
  border: 1px solid var(--hair);
  border-radius: 18px;
}
.soak-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.soak-stat {
  flex: 1 1 120px;
  min-width: 120px;
  text-align: center;
  padding: 0.7rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
}
.soak-stat b {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.soak-stat.is-good b { background: none; -webkit-text-fill-color: initial; color: var(--sev-low); }
.soak-stat span { display: block; margin-top: 0.25rem; font-size: 0.78rem; color: var(--ink-mute); }
.soak-figure img { display: block; width: 100%; height: auto; }
.soak-figure figcaption { margin-top: 0.8rem; font-size: 0.82rem; color: var(--ink-mute); text-align: center; }
@media (max-width: 560px) { .soak-stat { flex-basis: 44%; min-width: 44%; } }

/* ---- Docs search, in-page contents, copy buttons -------------------------- */
/* Added alongside the Pagefind index. Pagefind's own UI is themed through its
   CSS variables rather than restyled, so its markup stays upgradeable. */
.docs-search { margin-bottom: 18px; }
.docs-search .pagefind-ui {
  --pagefind-ui-primary: var(--ink);
  --pagefind-ui-text: var(--ink-soft);
  --pagefind-ui-background: var(--surface);
  --pagefind-ui-border: var(--hair);
  --pagefind-ui-tag: var(--surface-2);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 10px;
  --pagefind-ui-font: var(--font);
  --pagefind-ui-scale: 0.8;
}
.docs-search .pagefind-ui__search-input { font-size: 0.94rem; }
.docs-search .pagefind-ui__drawer { max-height: 52vh; overflow-y: auto; }

.docs-toc { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--hair); }
.docs-toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.docs-toc a {
  display: block;
  padding: 5px 12px;
  border-left: 2px solid transparent;
  color: var(--ink-mute);
  font-size: 0.86rem;
  line-height: 1.35;
}
.docs-toc a:hover { color: var(--ink-soft); border-left-color: var(--hair-strong); }
.docs-toc code { font-size: 0.94em; }

.docs-content pre { position: relative; }
.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  background: var(--surface-2);
  border: 1px solid var(--hair);
  border-radius: 7px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.docs-content pre:hover .copy-btn,
.copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--ink); }
.copy-btn.copied { color: var(--accent-2); opacity: 1; }
/* Touch devices have no hover, so never hide the control there. */
@media (hover: none) { .copy-btn { opacity: 1; } }
