/* OmniGuard — design system */
:root {
  --bg: #060d18;
  --bg-2: #0a1424;
  --surface: #0e1a2c;
  --surface-2: #13223a;
  --line: rgba(148, 197, 222, .12);
  --line-2: rgba(148, 197, 222, .22);
  --text: #e8f4fa;
  --muted: #93a9ba;
  --faint: #5f7487;
  --brand: #2de1fc;
  --brand-2: #0ea5b7;
  --brand-3: #0b5e8e;
  --brand-soft: rgba(45, 225, 252, .12);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --violet: #a78bfa;
  --orange: #fb923c;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .65);
  --glow: 0 0 0 1px rgba(45, 225, 252, .25), 0 10px 40px -10px rgba(45, 225, 252, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", var(--font);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
[data-theme=light] {
  --bg: #f6f9fc;
  --bg-2: #eef4f8;
  --surface: #ffffff;
  --surface-2: #f2f7fa;
  --line: rgba(11, 33, 52, .10);
  --line-2: rgba(11, 33, 52, .18);
  --text: #0b1726;
  --muted: #4a6072;
  --faint: #7d91a1;
  --brand: #0a9bb3;
  --brand-2: #0e8fa3;
  --brand-soft: rgba(14, 143, 163, .10);
  --shadow: 0 20px 50px -25px rgba(11, 33, 52, .25);
  --glow: 0 0 0 1px rgba(14, 143, 163, .25), 0 10px 30px -12px rgba(14, 143, 163, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(45, 225, 252, .3); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ── top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50; height: 64px;
  display: flex; align-items: center; gap: 22px; padding: 0 24px;
  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(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 19px/1 var(--font-display); letter-spacing: -.3px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand b { color: var(--brand); font-weight: 700; }
.brand .ver { font: 600 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line-2); padding: 4px 7px; border-radius: 999px; margin-left: 4px; }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a { color: var(--muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.topnav a:hover, .topnav a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }
.search-btn {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; min-width: 220px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; color: var(--faint); font: 14px var(--font);
}
.search-btn:hover { border-color: var(--brand); color: var(--muted); }
.search-btn svg { width: 16px; height: 16px; }
.search-btn kbd { margin-left: auto; font: 600 11px var(--font-mono); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; color: var(--muted); }
.menu-btn { display: none; }
.i18n-pending body { visibility: hidden; }

/* language picker */
.lang { position: relative; }
.lang-btn { width: auto; padding: 0 10px; gap: 6px; display: flex; }
.lang-code { font: 700 12px var(--font); letter-spacing: .5px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 190px; padding: 6px; display: none;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
}
.lang-menu.open { display: grid; }
.lang-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--text); font: 500 14.5px var(--font); text-align: left;
}
.lang-menu button b { width: 26px; font: 700 11.5px var(--font); color: var(--faint); }
.lang-menu button:hover { background: var(--surface-2); }
.lang-menu button.on { color: var(--brand); background: var(--brand-soft); }
.lang-menu button.on b { color: var(--brand); }
.lang-notice { display: none; max-width: 820px; margin: 0 0 22px; padding: 10px 16px; border-radius: 12px; font-size: 14px; color: var(--muted);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
html:not(.lang-en) .lang-notice { display: block; }

/* mobile drawer */
.drawer {
  position: fixed; top: 64px; right: 0; bottom: 0; z-index: 45; width: min(320px, 86vw); overflow-y: auto; padding: 18px 16px 40px;
  background: var(--bg); border-left: 1px solid var(--line-2); box-shadow: var(--shadow);
  transform: translateX(105%); transition: transform .25s ease; visibility: hidden;
}
.drawer-links { display: grid; gap: 4px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.drawer-links a { padding: 11px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 16px; }
.drawer-links a:hover { background: var(--surface-2); text-decoration: none; }
.drawer-links a.drawer-cta { margin-top: 10px; justify-content: center; color: #04101c; }
.drawer-docs a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 15px; }
.drawer-docs a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.drawer-backdrop { position: fixed; inset: 64px 0 0 0; z-index: 44; background: rgba(2, 6, 12, .55); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.nav-open .drawer { transform: none; visibility: visible; }
body.nav-open .drawer-backdrop { opacity: 1; pointer-events: auto; }

/* ── buttons & badges ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 12px;
  font: 600 15px var(--font); border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(135deg, #3ee8ff, #0ea5b7 60%, #0b6f9e); color: #04101c; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(45, 225, 252, .5), 0 14px 50px -10px rgba(45, 225, 252, .55); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 700 11.5px/1.7 var(--font); color: #fff; white-space: nowrap; letter-spacing: .2px; }
.b-packet { background: #e5484d; } .b-dupe { background: #8e4ec6; } .b-world { background: #e5880a; }
.b-conn { background: #2f81f7; } .b-server { background: #b38a00; }
.ok { color: var(--ok); font-weight: 800; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--brand); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }

/* ── landing ────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 96px 24px 72px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(800px 420px at 75% 20%, rgba(45, 225, 252, .16), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(11, 94, 142, .35), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 60% 30%, #000 30%, transparent 75%);
}
[data-theme=light] .hero::before { background: radial-gradient(800px 420px at 75% 20%, rgba(14, 143, 163, .14), transparent 60%); }
.hero-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font: 800 clamp(40px, 5.6vw, 68px)/1.04 var(--font-display); letter-spacing: -2px; margin: 22px 0 20px; }
.hero h1 .grad { background: linear-gradient(120deg, #7ef0ff, #2de1fc 40%, #0ea5b7); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme=light] .hero h1 .grad { background: linear-gradient(120deg, #0a9bb3, #0b6f9e); -webkit-background-clip: text; background-clip: text; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 30px; color: var(--faint); font-size: 14px; }
.hero-meta span { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--ok); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 520px; padding-bottom: 150px; }
.orbit { position: absolute; top: 0; width: 400px; height: 400px; border-radius: 50%; border: 1px dashed var(--line-2); animation: spin 60s linear infinite; }
.orbit.o2 { top: 50px; width: 300px; height: 300px; animation-duration: 40s; animation-direction: reverse; border-style: solid; border-color: var(--line); }
.orbit i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 16px var(--brand); }
.hero-logo { width: 230px; filter: drop-shadow(0 30px 60px rgba(45, 225, 252, .28)); animation: float 6s ease-in-out infinite; }
.terminal {
  position: absolute; bottom: 0; right: -10px; width: 430px; border-radius: 14px; overflow: hidden;
  background: rgba(7, 14, 26, .92); border: 1px solid var(--line-2); box-shadow: var(--shadow); font: 12.5px/1.75 var(--font-mono);
}
[data-theme=light] .terminal { background: #0b1726; }
.terminal .bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid rgba(148, 197, 222, .12); }
.terminal .bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.terminal .bar i:nth-child(1) { background: #f87171; } .terminal .bar i:nth-child(2) { background: #fbbf24; } .terminal .bar i:nth-child(3) { background: #34d399; }
.terminal .log { padding: 10px 14px 14px; height: 168px; overflow: hidden; color: #b9cbd8; }
.terminal .log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: line-in .45s ease both; }
.terminal .tag { color: #2de1fc; } .terminal .red { color: #f87171; } .terminal .ok2 { color: #34d399; } .terminal .yel { color: #fbbf24; }

.stats { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; z-index: 2; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.stat b { display: block; font: 800 34px/1.1 var(--font-display); letter-spacing: -1px; }
.stat b em { font-style: normal; color: var(--brand); }
.stat span { color: var(--muted); font-size: 14px; }

section.block { max-width: 1200px; margin: 0 auto; padding: 110px 24px 0; }
.eyebrow { font: 700 13px var(--font); letter-spacing: 2.5px; text-transform: uppercase; color: var(--brand); }
section.block h2 { font: 800 clamp(30px, 3.6vw, 44px)/1.12 var(--font-display); letter-spacing: -1.2px; margin: 12px 0 14px; }
section.block > p.sub { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 0 44px; }

.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
  transition: transform .2s, border-color .2s, box-shadow .2s; overflow: hidden;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; }
.card .ic svg { width: 24px; height: 24px; }
.card h3 { font: 700 20px/1.3 var(--font-display); margin: 0 0 10px; letter-spacing: -.3px; }
.card p { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.card li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--text); }
.card li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); transform: rotate(45deg); opacity: .8; }
.card.wide { grid-column: span 2; }
.ic.c-packet { background: rgba(229, 72, 77, .14); color: #ff6b70; }
.ic.c-dupe { background: rgba(142, 78, 198, .16); color: #b78cf0; }
.ic.c-world { background: rgba(229, 136, 10, .15); color: #ffae42; }
.ic.c-conn { background: rgba(47, 129, 247, .15); color: #6aa8ff; }
.ic.c-server { background: rgba(179, 138, 0, .16); color: #f1c233; }
.ic.c-brand { background: var(--brand-soft); color: var(--brand); }

.unique { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature { display: grid; grid-template-columns: 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.feature h3 { font: 700 22px/1.25 var(--font-display); margin: 0; letter-spacing: -.4px; }
.feature p { margin: 0; color: var(--muted); }
.demo { white-space: pre; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; font: 13px/1.7 var(--font-mono); color: var(--muted); overflow: auto; }
.demo .k { color: var(--brand); } .demo .r { color: var(--danger); } .demo .g { color: var(--ok); } .demo .y { color: var(--warn); }
.chain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 600 13px var(--font); }
.chain span { padding: 7px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.chain span.bad { border-color: rgba(248, 113, 113, .55); color: var(--danger); background: rgba(248, 113, 113, .08); }
.chain i { color: var(--faint); font-style: normal; }
.bars { display: grid; gap: 10px; }
.bars .row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; font: 12.5px var(--font-mono); color: var(--muted); }
.bars .track { height: 10px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; }
.bars .now { position: absolute; inset: 0 auto 0 0; background: rgba(148, 197, 222, .25); border-radius: 999px; }
.bars .learned { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #0ea5b7, #2de1fc); border-radius: 999px; }

.fair { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fair .item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.fair .item b { display: block; font: 700 16px var(--font-display); margin: 10px 0 6px; }
.fair .item span { color: var(--muted); font-size: 14px; }
.fair .item .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.fair .item .ic svg { width: 20px; height: 20px; }

.compare { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 15px 22px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { font: 700 13px var(--font); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.compare td:nth-child(2), .compare td:nth-child(3), .compare th:nth-child(2), .compare th:nth-child(3) { text-align: center; width: 170px; }
.compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--ok); font-weight: 800; } .compare .no { color: var(--faint); } .compare .part { color: var(--warn); font-weight: 700; }
.compare th.us { color: var(--brand); }

.platforms { display: flex; flex-wrap: wrap; gap: 12px; }
.platforms span { padding: 12px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }

.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font: 600 17px var(--font-display); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

.cta { max-width: 1200px; margin: 110px auto 0; padding: 0 24px; }
.cta-box {
  position: relative; overflow: hidden; border-radius: 28px; padding: 64px 48px; text-align: center;
  background: radial-gradient(600px 300px at 50% 0%, rgba(45, 225, 252, .25), transparent 70%), var(--surface);
  border: 1px solid var(--line-2);
}
.cta-box h2 { font: 800 clamp(28px, 3.4vw, 42px)/1.15 var(--font-display); letter-spacing: -1px; margin: 0 0 12px; }
.cta-box p { color: var(--muted); margin: 0 auto 28px; max-width: 560px; font-size: 18px; }
.cta-box .hero-cta { justify-content: center; }

footer.site { max-width: 1200px; margin: 100px auto 0; padding: 36px 24px 50px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; color: var(--faint); font-size: 14px; }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes line-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── docs ───────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; max-width: 1440px; margin: 0 auto; }
.sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 26px 18px 40px 24px; border-right: 1px solid var(--line); }
.nav-group { margin-bottom: 22px; }
.nav-title { font: 700 12px var(--font); letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); margin: 0 0 8px 10px; }
.sidebar a { display: block; padding: 7px 10px; border-radius: 9px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.sidebar a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sidebar a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
main.content { padding: 44px 56px 80px; min-width: 0; }
.prose { max-width: 820px; }
.prose h1 { font: 800 42px/1.15 var(--font-display); letter-spacing: -1.2px; margin: 0 0 18px; }
.prose h2 { font: 700 27px/1.25 var(--font-display); letter-spacing: -.6px; margin: 52px 0 14px; padding-top: 8px; }
.prose h3 { font: 700 20px/1.3 var(--font-display); margin: 34px 0 10px; }
.prose h2 .anchor, .prose h3 .anchor { opacity: 0; margin-left: 8px; color: var(--faint); font-weight: 500; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--brand); }
.prose code { font: 600 .86em var(--font-mono); background: var(--surface-2); border: 1px solid var(--line); padding: .15em .45em; border-radius: 6px; }
.prose a code { color: var(--brand); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.table-wrap { overflow-x: auto; margin: 20px 0 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); font: 700 12.5px var(--font); letter-spacing: .6px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child code { white-space: nowrap; }
.prose h1 .anchor { display: none; }
.hl { position: relative; margin: 18px 0 24px; border-radius: var(--radius); border: 1px solid var(--line); background: #0b1422 !important; }
[data-theme=light] .hl { background: #f6f8fa !important; }
.hl pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 13.5px/1.7 var(--font-mono); }
.copy { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity .2s; font: 600 12px var(--font); color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.hl:hover .copy { opacity: 1; }
.callout { border-radius: var(--radius); padding: 14px 18px 14px 52px; margin: 20px 0; position: relative; border: 1px solid; }
.callout p { margin: 6px 0; }
.callout::before { position: absolute; left: 18px; top: 15px; font-weight: 800; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; }
.callout.warn { background: rgba(251, 191, 36, .07); border-color: rgba(251, 191, 36, .35); }
.callout.warn::before { content: "!"; background: var(--warn); color: #1a1300; }
.callout.note, .callout.tip { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.callout.note::before, .callout.tip::before { content: "i"; background: var(--brand); color: #04101c; font-family: Georgia, serif; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; max-width: 820px; }
.pn { display: block; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font-weight: 600; }
.pn:hover { border-color: var(--brand); text-decoration: none; }
.pn small { display: block; color: var(--faint); font-weight: 500; font-size: 12.5px; margin-bottom: 2px; }
.pn.next { text-align: right; }
.toc { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 44px 22px 40px 8px; font-size: 13.5px; }
.toc .label { font: 700 12px var(--font); letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.toc a { display: block; color: var(--muted); padding: 5px 0 5px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { color: var(--brand); border-left-color: var(--brand); }
.doc-footer { margin-top: 48px; color: var(--faint); font-size: 13.5px; max-width: 820px; }

/* ── search dialog ─────────────────────────────────────── */
.search-modal { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(2, 6, 12, .6); backdrop-filter: blur(6px); padding: 12vh 16px 0; }
.search-modal.open { display: block; }
.search-box { max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 17px var(--font); padding: 20px 22px; border-bottom: 1px solid var(--line); }
.results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.results a { display: block; padding: 12px 14px; border-radius: 12px; color: var(--text); }
.results a:hover, .results a.sel { background: var(--surface-2); text-decoration: none; }
.results a b { display: block; font-size: 15px; }
.results a span { display: block; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results mark { background: rgba(45, 225, 252, .25); color: inherit; border-radius: 3px; }
.results .empty { padding: 20px; color: var(--faint); text-align: center; }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 1180px) { .docs { grid-template-columns: 250px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 420px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .layers { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: span 2; }
  .unique { grid-template-columns: 1fr; }
  .fair { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .topnav, .search-btn span, .search-btn kbd, .lang-code { display: none; }
  .lang-btn { width: 38px; padding: 0; justify-content: center; }
  .search-btn { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .menu-btn { display: grid; }
  .docs { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main.content { padding: 30px 20px 60px; }
  .prose h1 { font-size: 34px; }
}
@media (max-width: 620px) {
  .hero .pill { font-size: 12px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand .ver { display: none; }
  .hero { padding: 64px 16px 48px; }
  .hero-visual { min-height: 400px; padding-bottom: 170px; }
  .orbit { width: 290px; height: 290px; } .orbit.o2 { top: 35px; width: 220px; height: 220px; }
  .hero-logo { width: 170px; }
  .terminal { width: 100%; right: 0; bottom: -20px; }
  .stats { padding: 0 16px; gap: 10px; }
  .stat { padding: 16px; } .stat b { font-size: 28px; }
  section.block { padding: 80px 16px 0; }
  .layers, .fair { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; }
  .compare th, .compare td { padding: 12px; } .compare td:nth-child(2), .compare td:nth-child(3), .compare th:nth-child(2), .compare th:nth-child(3) { width: 90px; }
  .cta { padding: 0 16px; } .cta-box { padding: 44px 22px; }
  .bars .row { grid-template-columns: 110px 1fr; }
  .pager { grid-template-columns: 1fr; }
}
