:root {
  --bg: #fbfcfe;
  --surface: #fff;
  --surface-soft: #f5f7fb;
  --line: #e5eaf2;
  --line-strong: #d3dce9;
  --text: #1c1f23;
  --text-soft: #4e5969;
  --text-faint: #8793a7;
  --brand: #2080f0;
  --brand-deep: #0664e0;
  --brand-soft: #e8f2ff;
  --warn: #fa8c16;
  --code-bg: #172033;
  --code-text: #dce8ff;
  --max: 1480px;
  --nav-h: 64px;
  --side-w: 220px;
  --toc-w: 208px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", Arial, sans-serif;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
code { padding: 2px 6px; border-radius: 5px; color: var(--brand-deep); background: var(--surface-soft); font-size: .92em; }
pre {
  position: relative;
  margin: 14px 0 22px;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 10px;
  color: var(--code-text);
  background: var(--code-bg);
}
pre code { padding: 0; color: inherit; background: transparent; font-size: 13px; line-height: 1.72; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #50627b; background: #f6f8fc; font-weight: 700; }
td { background: var(--surface); }
h1, h2, h3 { color: var(--text); line-height: 1.25; }
h1 { margin: 0 0 14px; font-size: 44px; overflow-wrap: anywhere; }
h2 { margin: 0 0 12px; padding-top: 10px; font-size: 28px; }
h3 { margin: 26px 0 10px; font-size: 20px; }
p { margin: 0 0 14px; color: var(--text-soft); }
ul, ol { margin-top: 8px; color: var(--text-soft); }
li { margin: 6px 0; }
.wrap { width: min(100% - 32px, var(--max)); margin: 0 auto; }
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #fff; background: var(--brand); font-weight: 800; }
.brand-text { line-height: 1.2; }
.brand-text small { display: block; color: var(--text-faint); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.btn:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.btn-primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.btn-primary:hover { color: #fff; background: var(--brand-deep); }
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); gap: 20px; padding: 24px 0 56px; }
.layout > div { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--nav-h) + 18px); max-height: calc(100vh - var(--nav-h) - 36px); padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.96); }
.sb-title { margin: 18px 8px 8px; color: var(--text-faint); font-size: 12px; font-weight: 800; }
.sb-title:first-child { margin-top: 4px; }
.sb-link { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text-soft); font-size: 14px; font-weight: 650; }
.sb-link:hover, .sb-link[aria-current="page"] { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.sidebar-note { margin: 14px 10px 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 12px; line-height: 1.6; }
.toc { position: sticky; top: calc(var(--nav-h) + 18px); max-height: calc(100vh - var(--nav-h) - 36px); padding: 8px 0 8px 16px; overflow: auto; border-left: 1px solid var(--line); }
.toc-title { margin: 0 0 9px; color: var(--text); font-size: 13px; font-weight: 800; }
.toc a { display: block; padding: 5px 0; color: var(--text-faint); font-size: 13px; line-height: 1.45; }
.toc a:hover { color: var(--brand); text-decoration: none; }
.hero { padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.hero-kicker, .section-tag { display: inline-flex; align-items: center; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px; color: var(--brand-deep); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.hero p { max-width: 820px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-soft); background: #fff; font-size: 12px; font-weight: 700; }
.section { margin-top: 22px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-margin-top: 84px; }
.table-wrap { overflow-x: auto; margin: 14px 0 24px; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap table { border: 0; }
.table-wrap th:first-child, .table-wrap td:first-child { border-left: 0; }
.table-wrap th:last-child, .table-wrap td:last-child { border-right: 0; }
.table-wrap tr:first-child th { border-top: 0; }
.table-wrap tr:last-child td { border-bottom: 0; }
.note, .callout { margin: 16px 0 22px; padding: 14px 16px; border-left: 4px solid var(--brand); border-radius: 8px; background: #f3f8ff; color: var(--text-soft); }
.warning { border-left-color: var(--warn); background: #fff8ed; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; }
.card:hover { border-color: var(--brand); text-decoration: none; box-shadow: 0 8px 22px rgba(32,128,240,.1); }
.card h3 { margin: 0 0 8px; color: var(--brand-deep); font-size: 18px; }
.card p { margin: 0; font-size: 13px; }
.footer { padding: 26px 0 44px; color: var(--text-faint); text-align: center; font-size: 13px; }
@media (max-width: 1240px) { .layout { grid-template-columns: var(--side-w) minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .sidebar { position: static; max-height: none; } .cards { grid-template-columns: 1fr; } .hero, .section { padding: 22px; } }
@media (max-width: 600px) { .wrap { width: min(100% - 20px, var(--max)); } .nav-actions .btn:first-child { display: none; } .brand { gap: 8px; } .brand-text small { display: none; } h1 { font-size: 32px; } h2 { font-size: 24px; } .hero, .section { padding: 18px; } p, li, th, td { overflow-wrap: anywhere; } }
