/* Orbit website. Dark by default via the system setting, with a manual toggle. */

:root {
  --bg: #fbfbfd;
  --bg-elev: #ffffff;
  --bg-sunk: #f1f2f6;
  --bg-code: #f4f4f8;
  --border: #e2e4ec;
  --border-strong: #cdd0dc;
  --text: #11131a;
  --text-2: #3d4254;
  --muted: #5f6577;
  --faint: #8a90a2;
  --brand: #7c3aed;
  --brand-2: #a855f7;
  --brand-soft: rgba(124, 58, 237, 0.09);
  --dot-yellow: #d19a06;
  --dot-red: #dc2626;
  --dot-blue: #2563eb;
  --dot-green: #16a34a;
  --dot-gray: #9ca3af;
  --dot-magenta: #c026d3;
  --shadow: 0 1px 2px rgba(17, 19, 26, 0.04), 0 8px 28px rgba(17, 19, 26, 0.08);
  --shadow-lg: 0 2px 4px rgba(17, 19, 26, 0.05), 0 30px 80px -20px rgba(60, 30, 120, 0.25);
  --hl-key: #7c3aed;
  --hl-str: #0f7a4a;
  --hl-num: #b45309;
  --hl-com: #8a90a2;
  --hl-fn: #1d4ed8;
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b10;
    --bg-elev: #12141c;
    --bg-sunk: #0e1016;
    --bg-code: #0d0f15;
    --border: #1f2330;
    --border-strong: #2c3142;
    --text: #e8eaf1;
    --text-2: #c3c7d4;
    --muted: #9298ab;
    --faint: #626879;
    --brand: #a78bfa;
    --brand-2: #c084fc;
    --brand-soft: rgba(167, 139, 250, 0.1);
    --dot-yellow: #facc15;
    --dot-red: #f87171;
    --dot-blue: #60a5fa;
    --dot-green: #4ade80;
    --dot-gray: #6b7280;
    --dot-magenta: #e879f9;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 40px 100px -20px rgba(124, 58, 237, 0.35);
    --hl-key: #c4b5fd;
    --hl-str: #86efac;
    --hl-num: #fcd34d;
    --hl-com: #626879;
    --hl-fn: #93c5fd;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b10;
  --bg-elev: #12141c;
  --bg-sunk: #0e1016;
  --bg-code: #0d0f15;
  --border: #1f2330;
  --border-strong: #2c3142;
  --text: #e8eaf1;
  --text-2: #c3c7d4;
  --muted: #9298ab;
  --faint: #626879;
  --brand: #a78bfa;
  --brand-2: #c084fc;
  --brand-soft: rgba(167, 139, 250, 0.1);
  --dot-yellow: #facc15;
  --dot-red: #f87171;
  --dot-blue: #60a5fa;
  --dot-green: #4ade80;
  --dot-gray: #6b7280;
  --dot-magenta: #e879f9;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 40px 100px -20px rgba(124, 58, 237, 0.35);
  --hl-key: #c4b5fd;
  --hl-str: #86efac;
  --hl-num: #fcd34d;
  --hl-com: #626879;
  --hl-fn: #93c5fd;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd, pre { font-family: var(--mono); }
:not(pre) > code {
  font-size: 0.86em;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  padding: 0.1em 0.38em;
  border-radius: 6px;
  color: var(--text);
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  font-size: 0.82em;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  white-space: nowrap;
}
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 650; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.c-yellow { color: var(--dot-yellow); } .c-red { color: var(--dot-red); } .c-blue { color: var(--dot-blue); }
.c-green { color: var(--dot-green); } .c-faint { color: var(--faint); } .c-brand { color: var(--brand); }

.dot { display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%; vertical-align: 0.02em; flex: none; }
.dot-yellow { background: var(--dot-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-yellow) 20%, transparent); }
.dot-red { background: var(--dot-red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-red) 20%, transparent); }
.dot-blue { background: var(--dot-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-blue) 20%, transparent); }
.dot-green { background: var(--dot-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-green) 20%, transparent); }
.dot-gray { background: var(--dot-gray); }
.dot-magenta { background: var(--dot-magenta); }

/* ---------- 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);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; color: var(--text); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); font-size: 0.93rem; padding: 6px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-sunk); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.gh-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 9px; color: var(--text); font-size: 0.9rem; font-weight: 500;
}
.gh-btn:hover { border-color: var(--border-strong); text-decoration: none; }
.gh-btn svg { width: 17px; height: 17px; }
.gh-ver { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); border-left: 1px solid var(--border); padding-left: 8px; }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px; font-weight: 550; font-size: 0.97rem;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--text) 86%, var(--brand)); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--bg-elev); }
.btn-ghost:hover { border-color: var(--brand); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 40px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 760px; z-index: -2;
  background:
    radial-gradient(600px 340px at 50% 18%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(420px 260px at 82% 40%, color-mix(in srgb, var(--dot-blue) 10%, transparent), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 18%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 20%, #000 20%, transparent 75%);
}
.orbits { position: absolute; left: 50%; top: 250px; width: 0; height: 0; z-index: -1; pointer-events: none; }
.ring {
  position: absolute; border: 1px solid color-mix(in srgb, var(--text) 13%, transparent); border-radius: 50%;
  left: 50%; top: 50%; transform: translate(-50%, -50%) rotateX(68deg) rotateZ(0deg);
  animation: spin linear infinite;
}
.ring .sat { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; margin-left: -5px; }
.r1 { width: 560px; height: 560px; animation-duration: 38s; }
.r2 { width: 780px; height: 780px; animation-duration: 54s; animation-direction: reverse; }
.r3 { width: 1000px; height: 1000px; animation-duration: 72s; }
.r4 { width: 1240px; height: 1240px; animation-duration: 96s; animation-direction: reverse; }
@keyframes spin { to { transform: translate(-50%, -50%) rotateX(68deg) rotateZ(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring { animation: none; } html { scroll-behavior: auto; } }

.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  color: var(--text-2); font-size: 0.85rem; font-family: var(--mono); margin-bottom: 28px;
}
.eyebrow:hover { text-decoration: none; border-color: var(--brand); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--dot-green); box-shadow: 0 0 0 0 var(--dot-green); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot-green) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 700; letter-spacing: -0.045em; max-width: 14ch; margin-bottom: 22px; }
.grad { background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 50%, var(--dot-blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 40em; margin-bottom: 34px; }
.install-hero { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 760px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.cmd {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--bg-code); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 8px 8px 8px 18px; box-shadow: var(--shadow); text-align: left;
}
.cmd .prompt { color: var(--brand); font-family: var(--mono); user-select: none; }
.cmd code { flex: 1; min-width: 0; font-size: 0.88rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; color: var(--text); }
.cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none; font: 500 0.78rem var(--mono); color: var(--muted); background: var(--bg-elev);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 11px; cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--brand); }
.copy.done { color: var(--dot-green); border-color: var(--dot-green); }

.window { margin: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: #0b0c11; box-shadow: var(--shadow-lg); }
.window-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #15171f; border-bottom: 1px solid #252836; }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3e4d; }
.window-bar i:nth-child(1) { background: #ff5f57; } .window-bar i:nth-child(2) { background: #febc2e; } .window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { margin-left: auto; margin-right: auto; padding-right: 50px; font: 0.76rem var(--mono); color: #7d8396; }
.hero-shot { margin-top: 64px; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.035em; }
.kicker { font: 600 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand); margin-bottom: 14px; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 1.08rem; }

/* Why */
.why-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.why-grid p { color: var(--text-2); }
.tui-mock {
  font: 0.86rem/1.5 var(--mono); background: #0b0c11; color: #d7dae3; border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-lg);
  --dot-yellow: #facc15; --dot-red: #f87171; --dot-blue: #60a5fa; --dot-green: #4ade80; --faint: #5f6577; --brand: #a78bfa;
}
.tm-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid #222634; margin-bottom: 14px; }
.tm-tab { padding: 4px 10px; border-radius: 7px; color: #8a90a2; }
.tm-tab b { font-weight: 500; }
.tm-tab.active { background: #1b1e29; color: #fff; }
.tm-band { display: flex; align-items: center; gap: 8px; color: #c9ccd6; margin: 4px 0 8px; white-space: nowrap; overflow: hidden; }
.tm-rule { flex: 1; height: 1px; background: #2a2e3c; min-width: 16px; }
.tm-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tm-card {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 12px; min-width: 180px;
  background: #141721; border: 1px solid #252a38; border-left: 3px solid #3b3f52; border-radius: 8px;
}
.tm-card:first-child { border-left-color: #a78bfa; background: #181b27; }
.tm-card small { margin-left: auto; color: #5f6577; font-size: 0.74rem; }
.tm-foot { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #222634; color: #7d8396; font-size: 0.76rem; }
.tm-foot kbd { background: #1b1e29; color: #d7dae3; border-color: #2f3342; }
.tm-limits { margin-left: auto; }

.legend { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.legend li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.legend .dot { width: 12px; height: 12px; margin-top: 6px; }
.legend b { display: block; font-weight: 600; }
.legend span:not(.dot) { color: var(--muted); font-size: 0.92rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg); padding: 30px 28px 26px; position: relative; transition: background .2s ease; }
.feature:hover { background: var(--bg-elev); }
.feature h3 { font-size: 1.06rem; margin-top: 18px; }
.feature p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.fkey { font-size: 0.86rem; min-width: 36px; height: 32px; line-height: 28px; color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }

/* Gallery */
.gallery { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.gallery-tabs { display: flex; flex-direction: column; gap: 6px; }
.gallery-tabs button {
  text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px;
  padding: 14px 16px; cursor: pointer; color: var(--text); font: inherit; transition: background .15s ease, border-color .15s ease;
}
.gallery-tabs button:hover { background: var(--bg-sunk); }
.gallery-tabs button[aria-selected="true"] { background: var(--bg-elev); border-color: var(--border-strong); box-shadow: var(--shadow); }
.gallery-tabs b { display: block; font-weight: 600; margin-bottom: 3px; }
.gallery-tabs span { color: var(--muted); font-size: 0.88rem; }
.gallery-tabs kbd { font-size: 0.74rem; }
.gallery-view img { transition: opacity .2s ease; }

/* Install */
.os-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-sunk); margin-bottom: 28px; flex-wrap: wrap; }
.os-tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 0;
  background: transparent; color: var(--muted); font: 500 0.94rem var(--font); cursor: pointer;
}
.os-tabs button svg { width: 17px; height: 17px; }
.os-tabs button:hover { color: var(--text); }
.os-tabs button[aria-selected="true"] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow); }
.os-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); padding: 36px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 34px; }
.steps > li { counter-increment: step; position: relative; padding-left: 56px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; display: grid; place-items: center;
  font: 600 0.9rem var(--mono); color: var(--brand); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); border-radius: 10px;
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: -26px; width: 1px; background: var(--border); }
.steps h3 { font-size: 1.1rem; margin-bottom: 8px; }
.steps p { color: var(--text-2); margin-bottom: 12px; }
.code-block { position: relative; margin: 0 0 12px; }
.code-block pre, .prose pre.code {
  margin: 0; background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 80px 14px 16px; overflow-x: auto; font-size: 0.85rem; line-height: 1.65;
}
.code-block .copy, .prose pre.code .copy { position: absolute; top: 9px; right: 9px; }
.note { font-size: 0.9rem; color: var(--muted) !important; }
.note.warn { border-left: 3px solid var(--dot-yellow); padding-left: 12px; }
.callout { border: 1px solid color-mix(in srgb, var(--dot-blue) 40%, transparent); background: color-mix(in srgb, var(--dot-blue) 8%, transparent); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 30px; color: var(--text-2); }
.badge { font: 600 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--dot-green) 15%, transparent); color: var(--dot-green); margin-left: 6px; }

.req-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; margin-top: 18px; }
.req-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); padding: 26px; min-width: 0; }
.req-card h3 { font-size: 1.05rem; }
.req-card h3.mt { margin-top: 22px; }
.req-card p { color: var(--text-2); font-size: 0.94rem; }
.req-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 14px; }
.req-table th { text-align: left; font: 500 0.74rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 0 8px 8px 0; border-bottom: 1px solid var(--border); }
.req-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
.req-table td:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.req-table tr:last-child td { border-bottom: 0; }
.tag { font: 500 0.72rem var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); }
.tag-req { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: var(--brand-soft); }
.tag-ok { color: var(--dot-green); border-color: color-mix(in srgb, var(--dot-green) 45%, transparent); }
.tag-no { color: var(--dot-red); border-color: color-mix(in srgb, var(--dot-red) 45%, transparent); }

/* Quickstart */
.qs-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.qs { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 18px; }
.qs li { display: flex; gap: 16px; color: var(--text-2); }
.qs-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font: 600 0.82rem var(--mono); margin-top: 1px; }
.qs .dot { margin: 0 2px 0 4px; }
.keys-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); padding: 26px; box-shadow: var(--shadow); }
.keys-title { font: 600 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); }
.keys { margin: 0 0 18px; }
.keys > div { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.keys > div:last-child { border-bottom: 0; }
.keys dt { display: flex; gap: 4px; flex-wrap: wrap; }
.keys dd { margin: 0; color: var(--muted); font-size: 0.92rem; }
.keys-more { font-weight: 550; font-size: 0.94rem; }

/* Docs cards */
.doc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.doc-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.doc-card:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); }
.doc-card-title { font-weight: 600; display: flex; justify-content: space-between; }
.doc-card-title::after { content: "→"; color: var(--faint); transition: transform .15s ease, color .15s ease; }
.doc-card:hover .doc-card-title::after { color: var(--brand); transform: translateX(3px); }
.doc-card-blurb { color: var(--muted); font-size: 0.92rem; }

/* Contribute */
.contribute { background: var(--bg-sunk); }
.contrib-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.contrib-grid > div > p:not(.kicker) { color: var(--text-2); font-size: 1.05rem; margin-bottom: 26px; }
.contrib-grid .hero-ctas { justify-content: flex-start; }
.contrib-steps { list-style: none; counter-reset: c; padding: 0; margin: 0; display: grid; gap: 14px; }
.contrib-steps li { counter-increment: c; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.contrib-steps b { display: block; margin-bottom: 10px; }
.contrib-steps b::before { content: "0" counter(c) "  "; font-family: var(--mono); color: var(--brand); white-space: pre; }
.contrib-steps span { color: var(--muted); font-size: 0.94rem; }
.contrib-steps .code-block { margin: 0; }

/* Author */
.author-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.author-card { display: flex; gap: 28px; padding: 36px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); position: relative; overflow: hidden; }
.author-card::before { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid var(--border); box-shadow: 0 0 0 40px color-mix(in srgb, var(--border) 25%, transparent), 0 0 0 80px color-mix(in srgb, var(--border) 15%, transparent); pointer-events: none; }
.avatar { width: 96px; height: 96px; border-radius: 50%; flex: none; border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--brand); }
.author-card h2 { font-size: 1.9rem; margin-bottom: 4px; }
.author-meta { font: 0.86rem var(--mono); color: var(--faint); }
.author-card p:not(.kicker):not(.author-meta) { color: var(--text-2); }
.author-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; position: relative; }
.author-links .btn { height: 40px; }
.credit-card { padding: 32px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.credit-card h3 { font-size: 1.2rem; }
.credit-card p:not(.kicker) { color: var(--text-2); font-size: 0.95rem; }

/* Final */
.final { text-align: center; padding: 120px 0; position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 240px at 50% 60%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%); }
.final-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 760px; }
.final h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0; }
.final p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-about p { color: var(--muted); font-size: 0.92rem; margin-top: 12px; max-width: 32ch; }
.footer-title { font: 600 0.76rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--text-2); font-size: 0.93rem; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.85rem; }
.footer-base p { margin: 0; }

/* ---------- Docs ---------- */
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 220px; gap: 48px; align-items: start; padding-top: 40px; padding-bottom: 80px; }
.docs-side, .docs-toc { position: sticky; top: calc(var(--header-h) + 28px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
.side-toggle { display: none; }
.side-group { margin-bottom: 26px; }
.side-title { font: 600 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 8px; }
.side-nav ul, .toc ul { list-style: none; padding: 0; margin: 0; }
.side-nav a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 0.93rem; border-left: 2px solid transparent; }
.side-nav a:hover { color: var(--text); background: var(--bg-sunk); text-decoration: none; }
.side-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); font-weight: 550; }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--border); color: var(--muted); font-size: 0.84rem; line-height: 1.4; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--brand); border-left-color: var(--brand); }
.toc-l3 a { padding-left: 24px; font-size: 0.8rem; }

.prose { font-size: 1rem; color: var(--text-2); min-width: 0; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); color: var(--text); letter-spacing: -0.035em; margin-bottom: 0.6em; }
.prose h2 { font-size: 1.55rem; color: var(--text); margin: 2.2em 0 0.7em; padding-top: 1.2em; border-top: 1px solid var(--border); }
.prose h3 { font-size: 1.18rem; color: var(--text); margin: 1.8em 0 0.6em; }
.prose h4 { font-size: 1rem; color: var(--text); margin: 1.6em 0 0.5em; }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose :is(h2, h3, h4) { position: relative; }
.prose :is(h2, h3, h4) .anchor { position: absolute; left: -1.1em; color: var(--faint); opacity: 0; text-decoration: none; font-weight: 400; }
.prose :is(h2, h3, h4):hover .anchor { opacity: 1; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin: 0.3em 0; }
.prose li > ul, .prose li > ol { margin: 0.3em 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose blockquote { margin: 1.2em 0; padding: 0.6em 1em; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 8px 8px 0; }
.prose blockquote p:last-child { margin: 0; }
.prose pre.code { position: relative; margin: 0 0 1.2em; }
@media (hover: hover) {
  .prose pre.code { padding-right: 16px; }
  .prose pre.code .copy { opacity: 0; transition: opacity .15s ease; }
  .prose pre.code:hover .copy, .prose pre.code .copy:focus-visible { opacity: 1; }
}
.prose pre.code code { font-size: 0.85rem; background: none; border: 0; padding: 0; color: var(--text); }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 1em 0; }
.prose sub { font-size: 0.85em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.req-card .table-wrap { border: 0; border-radius: 0; margin: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.prose th { text-align: left; font-weight: 600; color: var(--text); background: var(--bg-sunk); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td code { white-space: nowrap; }
.prose table img { border: 0; margin: 0; }
.edit-link { margin-top: 48px; font-size: 0.9rem; color: var(--faint); }
.edit-link span { font-family: var(--mono); font-size: 0.82rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-weight: 600; }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager a span { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.pager-next { text-align: right; grid-column: 2; }

/* highlight.js tokens, themed by the variables above */
.hljs-keyword, .hljs-built_in, .hljs-selector-tag, .hljs-literal { color: var(--hl-key); }
.hljs-string, .hljs-attr + .hljs-string, .hljs-regexp { color: var(--hl-str); }
.hljs-number, .hljs-variable, .hljs-template-variable { color: var(--hl-num); }
.hljs-comment, .hljs-meta { color: var(--hl-com); font-style: italic; }
.hljs-title, .hljs-function, .hljs-attr, .hljs-section { color: var(--hl-fn); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .docs-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .req-grid { grid-template-columns: 1fr 1fr; }
  .req-grid .req-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; font-size: 1rem; }
  .menu-toggle { display: inline-grid; }
  .why-grid, .qs-grid, .contrib-grid, .author-grid { grid-template-columns: 1fr; gap: 40px; }
  .features, .doc-cards { grid-template-columns: 1fr 1fr; }
  .legend { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 0 24px 4px; }
  .gallery-tabs button { flex: none; }
  .gallery-tabs span { display: none; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 20px; }
  .docs-side { position: static; max-height: none; overflow: visible; margin-bottom: 24px; }
  .side-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); color: var(--text); font: 500 0.95rem var(--font); cursor: pointer; }
  .side-toggle::after { content: "▾"; color: var(--faint); }
  .side-nav { display: none; padding: 16px 4px 0; }
  .side-nav.open { display: block; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .gallery-tabs { margin: 0 -16px; padding: 0 16px 4px; }
  .gh-btn span:not(.gh-ver) { display: none; }
  .gh-ver { border-left: 0; padding-left: 0; }
  .header-inner { gap: 12px; }
  .hero { padding-top: 56px; }
  .hero-shot { margin-top: 44px; }
  .section { padding: 72px 0; }
  .features, .doc-cards, .legend, .req-grid { grid-template-columns: 1fr; }
  .os-panel { padding: 22px 16px; }
  .steps > li { padding-left: 0; }
  .steps > li::before { position: static; margin-bottom: 10px; }
  .steps > li::after { display: none; }
  .os-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .os-tabs button { justify-content: center; }
  .keys > div { grid-template-columns: 1fr; gap: 6px; }
  .author-card { flex-direction: column; padding: 26px; }
  .tm-limits { margin-left: 0; }
  .tm-card { min-width: 0; flex: 1 1 100%; }
  .window-bar span { padding-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .prose :is(h2, h3, h4) .anchor { display: none; }
}
