/* A lighter serif for editorial text, paired with a clear sans serif for controls. */
@font-face {
  font-family: "Source Serif 4 Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Source Serif 4 Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4 Variable";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Source Serif 4 Variable";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* Shared product colors with a calmer editorial rhythm for the public site. */
:root {
  --accent: #2563eb; --accent-strong: #1d4ed8; --accent-deep: #1746a2; --accent-ink: #2457ad;
  --accent-soft: #eff6ff; --accent-softer: #eaf2ff; --accent-tint: #dbeafe;
  --accent-border: #9ab8ec; --accent-border-soft: #c8d8f2;
  --app-bg: #f6f8fb; --surface: #fff; --surface-subtle: #f9fbfd; --surface-soft: #f2f6fb;
  --surface-hover: #f0f2f5; --surface-sunk: #f7f8fa; --surface-track: #e9edf2;
  --border: #dfe6ef; --border-strong: #cad5e3;
  --text: #263448; --text-strong: #101b2d; --text-heading: #30415a; --text-secondary: #4e6078;
  --muted: #64738a; --text-faint: #7b8aa0;
  --success: #14734f; --success-soft: #e8f7ef; --success-bright: #22a06b;
  --warning: #745612; --warning-soft: #fff8e7; --warning-border: #e0b45b;
  --danger: #a4262c; --danger-soft: #fff1f2;
  --violet: #7c3aed; --teal: #0f8aa6;
  --radius-xs: 6px; --radius-s: 8px; --radius-m: 11px; --radius-l: 16px; --radius-xl: 22px; --radius-pill: 999px;
  --shadow-1: 0 2px 8px rgba(28, 47, 84, .055);
  --shadow-2: 0 12px 32px rgba(28, 47, 84, .12);
  --shadow-card: 0 18px 45px rgba(28, 47, 84, .09);
  --shadow-4: 0 28px 80px rgba(31, 41, 55, .24);
  --font: "Manrope Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, sans-serif;
  --serif: "Source Serif 4 Variable", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", ui-serif, Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --nav-h: 60px;
  --topbar-bg: rgba(248, 250, 252, .88);
  --code-bg: #0f172a; --code-border: var(--border);
  --edge: #b6bfcb; --node-halo: #f8fafc;
  color-scheme: light;
}

/* Dark palette: same hues, lowered luminance. Applied by data-theme (set before first paint by an inline script). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #4f83f1; --accent-strong: #79a3ff; --accent-deep: #a9c4ff; --accent-ink: #8fb2ff;
  --accent-soft: #14213b; --accent-softer: #182a4d; --accent-tint: #1d3564;
  --accent-border: #3a5fae; --accent-border-soft: #2b4680;
  --app-bg: #0d1117; --surface: #151b24; --surface-subtle: #111720; --surface-soft: #1a212c;
  --surface-hover: #1d2531; --surface-sunk: #0f141c; --surface-track: #262f3d;
  --border: #253041; --border-strong: #34415a;
  --text: #dbe1ea; --text-strong: #f3f6fa; --text-heading: #c3ccd9; --text-secondary: #a5b0c0;
  --muted: #8a96a8; --text-faint: #6f7b8e;
  --success: #4cc38a; --success-soft: #11291f; --success-bright: #34b47c;
  --warning: #e6b95a; --warning-soft: #2a2110; --warning-border: #6b5220;
  --danger: #f08a8f; --danger-soft: #2f1517;
  --shadow-1: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, .4);
  --shadow-4: 0 28px 80px rgba(0, 0, 0, .6);
  --topbar-bg: rgba(13, 17, 23, .85);
  --code-bg: #0a0e14; --code-border: #253041;
  --edge: #3a4658; --node-halo: #111720;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
body { margin: 0; background: var(--app-bg); color: var(--text); font: 450 15px/1.7 var(--font); letter-spacing: -.006em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
:where(h1, h2, h3) { font-family: var(--serif); font-weight: 500; text-wrap: balance; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font: inherit; }
code, pre, kbd { font-family: var(--mono); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--nav-h); background: var(--topbar-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text-strong); font-weight: 800; font-size: 17px; letter-spacing: -.035em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--accent); box-shadow: 0 5px 12px rgba(37, 99, 235, .18); }
.topnav { display: flex; gap: 4px; margin-right: auto; }
.topnav a { padding: 8px 14px; border-radius: var(--radius-m); color: var(--text-secondary); font-size: 13.5px; font-weight: 600; }
.topnav a:hover { background: var(--surface-hover); color: var(--text-strong); text-decoration: none; }
.topnav a.active { background: var(--accent-softer); color: var(--accent-deep); font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-link, .lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); color: var(--text-secondary); font-size: 13px; }
.icon-link:hover, .lang-switch:hover { border-color: var(--accent-border-soft); background: var(--accent-soft); color: var(--accent-strong); text-decoration: none; }
.btn.menu-toggle { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 21px; border: 1px solid var(--border-strong); border-radius: var(--radius-m); background: var(--surface); color: var(--text-heading); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: background .18s, box-shadow .18s, transform .18s; }
.btn:hover { background: var(--surface-hover); box-shadow: var(--shadow-1); text-decoration: none; transform: translateY(-1px); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 6px 15px rgba(37, 99, 235, .16); }
.btn.primary:hover { background: var(--accent-strong); box-shadow: 0 9px 22px rgba(37, 99, 235, .23); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---------- home ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 72px 0 36px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border: 1px solid var(--accent-border-soft); border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-deep); font-size: 13px; font-weight: 600; }
.hero h1 { max-width: 820px; margin: 20px auto 0; color: var(--text-strong); font-size: clamp(32px, 5vw, 52px); line-height: 1.12; letter-spacing: -.03em; }
.hero h1 em { color: var(--accent); }
html[lang="en"] .hero h1 em { font-style: italic; }
html[lang="zh"] .hero h1 em { font-style: normal; }
.hero p.lead { max-width: 680px; margin: 18px auto 0; color: var(--muted); font-size: 17px; }
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.quick-install { max-width: 1000px; margin: 0 auto; padding-top: 86px; text-align: center; }
.demo-stage { padding-top: 48px; }
.quick-install h1 { max-width: 900px; margin: 22px auto 0; color: var(--text-strong); font-size: clamp(38px, 5.2vw, 62px); line-height: 1.09; letter-spacing: -.045em; }
.quick-install h1 em { color: var(--accent); }
html[lang="en"] .quick-install h1 em { font-style: italic; }
html[lang="zh"] .quick-install h1 em { font-style: normal; }
.quick-install .lead { max-width: 750px; margin: 22px auto 0; color: var(--muted); font-size: 17.5px; line-height: 1.75; }
.quick-command { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 30px; margin-top: 38px; padding: 30px; border: 1px solid var(--accent-border-soft); border-radius: var(--radius-xl); background: linear-gradient(125deg, var(--surface) 8%, var(--accent-soft)); box-shadow: var(--shadow-1); text-align: left; }
.quick-command .eyebrow { padding: 0; border: 0; background: transparent; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.quick-command h2 { margin: 9px 0 8px; color: var(--text-strong); font-size: 22px; letter-spacing: -.035em; }
.quick-command p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.quick-command .quick-download { margin-top: 16px; }
.quick-command pre { align-self: center; min-width: 0; margin: 0; padding: 15px 16px; border: 1px solid var(--code-border); border-radius: var(--radius-m); background: var(--code-bg); color: #e2e8f0; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; font-size: 13px; line-height: 1.6; }
.install-alternative { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.install-alternative a { font-weight: 650; }

/* sections */
.section { padding: 96px 0 0; }
.section h2 { margin: 0; text-align: center; color: var(--text-strong); font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -.045em; }
.section .sub { max-width: 620px; margin: 10px auto 0; text-align: center; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.card { padding: 25px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); transition: box-shadow .18s, border-color .18s, transform .18s; }
a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--accent-border-soft); box-shadow: var(--shadow-card); text-decoration: none; transform: translateY(-3px); }
.card .ico { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 10px; background: var(--accent-softer); color: var(--accent); }
.card h3 { margin: 0 0 7px; color: var(--text-strong); font-size: 17px; letter-spacing: -.025em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.card .more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; }
.cta { margin: 92px auto 0; padding: 52px 24px; border: 1px solid var(--accent-border-soft); border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); text-align: center; }
.cta h2 { font-size: 30px; letter-spacing: -.04em; }
.cta .hero-cta { margin-top: 22px; }

.footer { margin-top: 84px; padding: 28px 0 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.footer a { color: var(--text-secondary); }

/* ---------- download ---------- */
.page-head { padding: 68px 0 10px; text-align: center; }
.page-head h1 { margin: 0; color: var(--text-strong); font-size: clamp(36px, 4vw, 46px); line-height: 1.12; letter-spacing: -.05em; }
.page-head p { margin: 16px auto 0; max-width: 670px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.os-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 860px; margin: 34px auto 0; }
.os, .os .files > div { min-width: 0; }
.os { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.os.recommended { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-tint), var(--shadow-card); }
.os .ico { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 12px; background: var(--surface-soft); color: var(--text-heading); }
.os.recommended .ico { background: var(--accent-softer); color: var(--accent); }
.os h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-strong); font-size: 18px; }
.os .req { margin: 4px 0 16px; color: var(--muted); font-size: 13px; }
.os .files { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: auto; }
.file { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface-subtle); color: var(--text-heading); font-size: 13px; }
a.file:hover { border-color: var(--accent-border-soft); background: var(--accent-soft); color: var(--accent-strong); text-decoration: none; }
.file small { color: var(--text-faint); font-size: 12px; }
.file.off { color: var(--text-faint); border-style: dashed; }
.ver-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.steps { margin: 40px 0 0; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.steps h2 { margin: 0 0 12px; font-size: 18px; color: var(--text-strong); }
.steps pre { margin: 10px 0 0; }
.note { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--accent-border-soft); border-radius: var(--radius-m); background: var(--accent-soft); color: var(--accent-deep); font-size: 13.5px; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 280px minmax(0, 1fr) 210px; max-width: 1400px; margin: 0 auto; align-items: start; }
.docs-nav { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 18px 12px 32px; border-right: 1px solid var(--border); background: var(--surface-subtle); }
.docs-nav-group { margin: 4px 0; border: 1px solid transparent; border-radius: 12px; }
.docs-nav-group[open] { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-1); }
.docs-nav summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border-radius: 11px; list-style: none; color: var(--text-heading); font-size: 14px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.docs-nav summary::-webkit-details-marker { display: none; }
.docs-nav summary::marker { content: ''; }
.docs-nav summary:hover { background: var(--surface-hover); color: var(--text-strong); }
.docs-nav summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.docs-nav-group[open] > summary { color: var(--accent-deep); }
.docs-nav-icon { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-soft); color: var(--text-secondary); }
.docs-nav-group[open] .docs-nav-icon { background: var(--accent-softer); color: var(--accent-deep); }
.docs-nav-title { flex: 1; min-width: 0; }
.docs-nav-chevron { flex: none; width: 7px; height: 7px; margin-right: 3px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); transition: transform .16s ease; }
.docs-nav-group[open] .docs-nav-chevron { transform: rotate(45deg); }
.docs-nav-links { margin: 0 11px 12px 25px; padding-left: 13px; border-left: 1px solid var(--border); }
.docs-nav-links a { position: relative; display: block; margin: 2px 0; padding: 7px 10px; border-radius: 8px; color: var(--text-secondary); font-size: 14px; line-height: 1.4; }
.docs-nav-links a:hover { background: var(--surface-hover); color: var(--text-strong); text-decoration: none; }
.docs-nav-links a.active { background: var(--accent-softer); color: var(--accent-deep); font-weight: 650; }
.docs-nav-links a.active::before { position: absolute; top: 6px; bottom: 6px; left: -14px; width: 2px; border-radius: 2px; background: var(--accent); content: ''; }
.article { min-width: 0; padding: 48px 52px 24px; font-family: var(--serif); }
.article > *:first-child { margin-top: 0; }
.article h1 { margin: 0 0 24px; color: var(--text-strong); font-size: clamp(32px, 3.1vw, 40px); line-height: 1.18; letter-spacing: -.045em; }
.article h2 { margin: 48px 0 16px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-strong); font-size: 25px; letter-spacing: -.035em; }
.article h3 { margin: 32px 0 10px; color: var(--text-strong); font-size: 19px; letter-spacing: -.02em; }
.article h4 { margin: 22px 0 6px; color: var(--text-heading); font-size: 15px; }
.article p, .article li { color: var(--text); font-size: 16px; line-height: 1.78; }
.article > p, .article > ul, .article > ol, .article > blockquote { max-width: 76ch; }
.article li { margin: 4px 0; }
.article a { text-decoration: underline; text-decoration-color: var(--accent-border-soft); text-underline-offset: 2px; }
.article a:hover { text-decoration-color: var(--accent-strong); }
.article :not(pre) > code { padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--accent-deep); font-size: .88em; }
.article pre { position: relative; margin: 14px 0; padding: 14px 16px; border: 1px solid var(--code-border); border-radius: var(--radius-m); background: var(--code-bg); color: #e2e8f0; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.article pre code { background: none; border: 0; padding: 0; color: inherit; }
.article img { display: block; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: var(--shadow-1); }
.table-wrap { margin: 14px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.article table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.article th, .article td { padding: 9px 13px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.article th { background: var(--surface-subtle); color: var(--text-heading); font-weight: 650; white-space: nowrap; }
.article tr:last-child td { border-bottom: 0; }
.article blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--border-strong); color: var(--text-secondary); }
.callout { margin: 16px 0; padding: 10px 16px; border: 1px solid var(--accent-border-soft); border-left-width: 4px; border-radius: var(--radius-m); background: var(--accent-soft); }
.callout p { margin: 6px 0; }
.callout .t { font-weight: 700; color: var(--accent-deep); font-size: 13px; }
.callout.warning, .callout.caution { border-color: var(--warning-border); background: var(--warning-soft); }
.callout.warning .t, .callout.caution .t { color: var(--warning); }
.callout.tip { border-color: #a8d5ba; background: var(--success-soft); }
.callout.tip .t { color: var(--success); }
.banner { margin: 0 0 20px; padding: 9px 14px; border: 1px solid var(--warning-border); border-radius: var(--radius-m); background: var(--warning-soft); color: var(--warning); font-size: 13px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 48px 0 0; }
.pager a { flex: 1; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); color: var(--text-heading); text-decoration: none !important; }
.pager a:hover { border-color: var(--accent-border-soft); background: var(--accent-soft); }
.pager small { display: block; color: var(--muted); font-size: 12px; }
.pager a.next { text-align: right; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); padding: 26px 16px 20px 0; font-size: 13px; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
.toc b { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.toc a { display: block; padding: 3px 0 3px 12px; border-left: 2px solid var(--border); color: var(--muted); line-height: 1.4; }
.toc a.l3 { padding-left: 24px; }
.toc a:hover { color: var(--text-strong); text-decoration: none; }
.toc a.active { border-left-color: var(--accent); color: var(--accent-deep); font-weight: 600; }
.docs-home { max-width: 1040px; margin: 0 auto; padding: 64px 24px 0; }
.docs-home .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.docs-home h2 { margin: 52px 0 0; text-align: left; font-size: 22px; letter-spacing: -.03em; }
.docs-home h1 { margin: 0; font-size: clamp(36px, 4vw, 46px); line-height: 1.12; letter-spacing: -.05em; color: var(--text-strong); }
.docs-home .card { position: relative; display: flex; align-items: center; min-height: 88px; padding: 18px 52px 18px 22px; }
.docs-home .card::after { position: absolute; right: 20px; color: var(--text-faint); font-size: 18px; content: '↗'; transition: color .18s, transform .18s; }
.docs-home .card:hover::after { color: var(--accent); transform: translate(2px, -2px); }
.docs-home .card h3 { margin: 0; font-size: 15px; line-height: 1.5; }

/* highlight.js (dark code blocks) */
.hljs-comment, .hljs-quote { color: #94a3b8; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-literal { color: #7dd3fc; }
.hljs-string, .hljs-attr, .hljs-symbol { color: #86efac; }
.hljs-number, .hljs-variable, .hljs-template-variable { color: #fdba74; }
.hljs-title, .hljs-section, .hljs-name, .hljs-type { color: #c4b5fd; }
.hljs-meta { color: #f0abfc; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .docs { grid-template-columns: 250px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .grid, .os-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { gap: 6px; padding: 0 8px; }
  .topnav { gap: 0; }
  .topnav a { padding: 7px; font-size: 13px; }
  .brand-name, .icon-link { display: none; }
  .topbar-actions { gap: 4px; }
  .search-btn, .theme-toggle, .lang-switch { height: 32px; }
  .theme-toggle { width: 32px; }
  .lang-switch { padding: 0 8px; font-size: 12px; }
  .grid, .os-grid, .docs-home .grid { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); display: none; }
  .docs-nav.open { display: block; }
  .btn.menu-toggle { display: inline-flex; margin: 12px 14px 0; }
  .article { padding: 24px 16px; }
  .page-head { padding-top: 46px; }
  .docs-home { padding-top: 42px; }
  .quick-install { padding-top: 44px; }
  .demo-stage { padding-top: 32px; }
  .quick-command { grid-template-columns: 1fr; padding: 20px; }
  .quick-command pre { padding-top: 38px; }
  .install-route pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .install-route summary, .install-route-body { padding-left: 18px; padding-right: 18px; }
}

/* theme toggle + shared bits */
.theme-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); color: var(--text-secondary); cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent-border-soft); background: var(--accent-soft); color: var(--accent-strong); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.sha { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.sha code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--text-secondary); }
.sha button { flex: none; padding: 1px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-secondary); font-size: 11.5px; cursor: pointer; }
.sha button:hover { border-color: var(--accent-border-soft); color: var(--accent-strong); }
.os .file-block { display: block; }

/* deployment page */
.deploy { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.mode-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-subtle); }
.mode-tabs button { padding: 8px 18px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font-weight: 600; font-size: 14px; cursor: pointer; }
.mode-tabs button:hover { background: var(--surface-hover); }
.mode-tabs button[aria-selected="true"] { background: var(--surface); color: var(--accent-deep); box-shadow: var(--shadow-1); }
.tabs-row { display: flex; justify-content: center; margin-top: 30px; }
.mode-panel { display: none; margin-top: 20px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.mode-panel.active { display: block; }
.mode-panel h2 { margin: 0 0 4px; color: var(--text-strong); font-size: 20px; }
.mode-panel > p { margin: 0 0 16px; color: var(--muted); }
.mode-panel ol { margin: 0; padding-left: 20px; }
.mode-panel li { margin: 8px 0; }
.mode-panel pre, .deploy pre { margin: 10px 0; padding: 13px 16px; border: 1px solid var(--code-border); border-radius: var(--radius-m); background: var(--code-bg); color: #e2e8f0; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.mode-panel :not(pre) > code, .deploy .card :not(pre) > code { padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-subtle); color: var(--accent-deep); font-size: .88em; }
.reqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 4px; }
.req-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface-subtle); font-size: 13px; }
.req-item b { display: block; margin-bottom: 2px; color: var(--text-strong); font-size: 12px; letter-spacing: .04em; }
.deploy h2.h { margin: 48px 0 0; color: var(--text-strong); font-size: 22px; letter-spacing: -.015em; }
.deploy .grid { margin-top: 18px; }
.readmore { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 14px; }
.install-page .page-head { padding-bottom: 26px; }
.install-platform-nav { margin: 0 0 32px; }
.install-platform-nav h2 { margin: 0 0 17px; color: var(--text-strong); font-size: 23px; letter-spacing: -.035em; }
.install-platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.install-platform { min-width: 0; padding: 23px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.install-platform-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.install-platform-icon { display: grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-softer); color: var(--accent-deep); }
.install-platform h3 { margin: 0; color: var(--text-strong); font-size: 19px; line-height: 1.3; letter-spacing: -.03em; }
.install-experimental { display: inline-block; margin-left: 5px; padding: 2px 7px; border: 1px solid var(--warning-border); border-radius: var(--radius-pill); background: var(--warning-soft); color: var(--warning); font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: 0; vertical-align: middle; white-space: nowrap; }
.install-platform-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.install-platform-methods { display: grid; gap: 8px; }
.install-platform-methods a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 39px; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface-subtle); color: var(--text-heading); font-size: 13px; font-weight: 600; }
.install-platform-methods a:hover, .install-platform-methods a:focus-visible { border-color: var(--accent-border-soft); background: var(--accent-soft); color: var(--accent-deep); text-decoration: none; }
.install-platform-nav > p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.install-platform-nav > p + p { margin-top: 5px; }
.install-route { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.install-route summary { display: flex; align-items: center; gap: 10px; padding: 22px 24px; color: var(--text-strong); cursor: pointer; }
.install-route summary:hover { background: var(--surface-subtle); }
.install-route summary::before { content: '▸'; color: var(--accent); font-size: 18px; transition: transform .15s; }
.install-route[open] summary::before { transform: rotate(90deg); }
.install-route summary > span { display: grid; gap: 5px; }
.install-route summary b { font-size: 19px; letter-spacing: -.025em; }
.install-route summary .badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-softer);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  vertical-align: 2px;
}
.install-route summary small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.install-route[open] summary { border-bottom: 1px solid var(--border); }
.install-route-body { padding: 22px 24px 24px; }
.install-route-body ol { margin: 20px 0 0; padding-left: 20px; }
.install-route-body li { margin: 8px 0; }
.install-step-note { margin: 10px 0 0; }
.release-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.release-file { min-width: 0; }
.release-file .download-file { min-height: 52px; padding: 12px 16px; border-color: #1d4ed8; background: #1d4ed8; color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 4px 12px rgba(29, 78, 216, .18); transition: background .15s, box-shadow .15s, transform .15s; }
.release-file .download-file small { color: #fff; }
.release-file .download-file:hover { border-color: #1e40af; background: #1e40af; color: #fff; box-shadow: 0 6px 16px rgba(29, 78, 216, .26); transform: translateY(-1px); }
.release-file .download-file:focus-visible { outline: 3px solid var(--accent-border); outline-offset: 2px; }
@media (max-width: 900px) { .install-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .release-files, .install-platforms { grid-template-columns: 1fr; } }
.install-more { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 28px; text-align: center; }
.redirect { min-height: 50vh; display: grid; place-items: center; }
@media (max-width: 900px) { .reqs { grid-template-columns: 1fr; } }

/* docs search */
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); color: var(--muted); font-size: 13px; cursor: pointer; min-width: 150px; }
.search-btn:hover { border-color: var(--accent-border-soft); color: var(--text-secondary); }
.search-btn span { flex: 1; text-align: left; }
.search-btn kbd, .sx-in kbd { padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-subtle); color: var(--text-faint); font: 11px var(--font); }
.sx-mask { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(15, 20, 28, .55); backdrop-filter: blur(3px); animation: sxfade .15s ease; }
@keyframes sxfade { from { opacity: 0; } to { opacity: 1; } }
.sx { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-4); overflow: hidden; }
.sx-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.sx-in input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; color: var(--text-strong); font: 16px var(--font); }
.sx-list { overflow-y: auto; padding: 6px; }
.sx-item { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none !important; }
.sx-item.on { background: var(--accent-softer); }
.sx-t { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; }
.sx-t b { color: var(--text-strong); }
.sx-t span { color: var(--accent-ink); }
.sx-s { margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.sx-s mark, .sx-t mark { background: var(--warning-soft); color: var(--warning); border-radius: 3px; padding: 0 1px; }
.sx-msg { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.sx-foot { padding: 8px 14px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 12px; }
@media (max-width: 900px) { .search-btn { min-width: 0; } .search-btn span, .search-btn kbd { display: none; } .search-btn { padding: 0 10px; } }
.lang-switch, .icon-link, .search-btn { white-space: nowrap; }
.os-grid + .note, .steps { max-width: 860px; margin-left: auto; margin-right: auto; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
