:root {
  --brand: #2457d6;
  --brand-strong: #1d46b8;
  --brand-soft: #eef3ff;
  --brand-line: #d9e2ff;
  --text: #1b2536;
  --text-soft: #3d4759;
  --muted: #6b7587;
  --faint: #98a1b3;
  --line: #e8ebf0;
  --line-strong: #dde2ea;
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --bg-code: #f5f7fa;
  --header-h: 64px;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, .08);
  --font-sans: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
::selection { background: #dce6ff; color: var(--text); }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  transition: top .16s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 156px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(145deg, #3f74f2, #1a43b8);
  box-shadow: 0 5px 14px rgba(36, 87, 214, .24);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 15px; letter-spacing: .01em; }
.brand-copy small { margin-top: 3px; color: var(--faint); font-size: 10.5px; letter-spacing: .08em; }

.section-tabs {
  display: flex;
  align-self: stretch;
  gap: 30px;
  margin-left: 26px;
}
.section-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: #5d6677;
  font-size: 14.5px;
  font-weight: 500;
}
.section-tabs a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  content: "";
}
.section-tabs a:hover { color: var(--text); }
.section-tabs a.active { color: var(--brand); font-weight: 600; }
.section-tabs a.active::after { background: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 196px;
  height: 34px;
  padding: 0 10px;
  color: var(--muted);
  background: #f6f7f9;
  border: 1px solid #eceef3;
  border-radius: 8px;
  font-size: 12.5px;
  text-align: left;
}
.search-trigger:hover { border-color: var(--brand-line); background: #f8faff; }
.search-trigger svg { width: 15px; height: 15px; flex: none; }
.search-trigger kbd {
  margin-left: auto;
  padding: 1px 5px;
  color: var(--faint);
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 10.5px;
}
.version-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  color: #5f6b7f;
  background: #f3f5f8;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.menu-button {
  display: none;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  padding: 8px;
  color: #4c5665;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.menu-button svg { width: 100%; height: 100%; }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 820px) 218px;
  gap: 38px;
  align-items: start;
  max-width: 1420px;
  margin: 0 auto;
  padding: 32px 32px 84px;
}
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow: auto;
  padding: 2px 8px 16px 0;
  scrollbar-width: thin;
  scrollbar-color: #dfe4ec transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #dfe4ec; border-radius: 5px; }
.sidebar-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}
.sidebar-close {
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
}
.side-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 22px;
}
.side-search svg {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: #9aa3b2;
  pointer-events: none;
}
.side-search input {
  width: 100%;
  height: 38px;
  padding: 0 11px 0 33px;
  color: var(--text);
  background: #f8f9fb;
  border: 1px solid #edeff3;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
}
.side-search input:focus { background: #fff; border-color: var(--brand-line); box-shadow: 0 0 0 3px rgba(36, 87, 214, .07); }
.side-search input::placeholder { color: #9ba4b3; }

.nav-section { margin-bottom: 12px; }
.nav-section-label {
  display: block;
  padding: 4px 10px 10px;
  color: #8b94a5;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
}
.nav-section.current .nav-section-label { color: var(--brand); }
.nav-group { margin-bottom: 8px; }
.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px 6px;
  color: #596273;
  background: transparent;
  border: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .015em;
  text-align: left;
}
.nav-group-title svg {
  width: 14px;
  height: 14px;
  color: #a3abba;
  transition: transform .16s ease;
}
.nav-group[data-collapsed="true"] .nav-group-title svg { transform: rotate(-90deg); }
.nav-group[data-collapsed="true"] .nav-list { display: none; }
.nav-list { margin: 0; padding: 0 0 0 2px; list-style: none; }
.nav-list a {
  display: block;
  margin: 1px 0;
  padding: 6px 10px;
  color: #4c5667;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  transition: background .12s ease, color .12s ease;
}
.nav-list a:hover { color: var(--text); background: #f5f6f9; }
.nav-list a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.sidebar-foot {
  margin-top: 26px;
  padding: 16px 10px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.7;
}
.sidebar-foot a { display: block; margin-bottom: 4px; color: #5d6a80; }
.sidebar-foot span { color: #a0a8b6; }
.sidebar-switch {
  display: block;
  margin-top: 12px;
  padding: 8px 10px;
  color: var(--brand);
  background: #f7f9ff;
  border: 1px solid #e6ecff;
  border-radius: 7px;
  font-size: 12.5px;
  text-align: center;
}

.main { min-width: 0; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 2px 0 22px;
  color: #9aa3b2;
  font-size: 11.5px;
}
.breadcrumb a { color: #7c8798; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span:last-child { color: #697487; }

.article-head { margin-bottom: 34px; }
.article-badge {
  display: inline-flex;
  align-items: center;
  height: 23px;
  margin-bottom: 13px;
  padding: 0 9px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
}
.article h1 {
  margin: 0 0 14px;
  color: #141c2b;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.28;
}
.article .lead {
  max-width: 720px;
  margin: 0 0 15px;
  color: #5b6575;
  font-size: 15.5px;
  line-height: 1.85;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #9aa3b2;
  font-size: 11.5px;
}
.article-meta span + span::before {
  margin-right: 16px;
  color: #d3d8e0;
  content: "·";
}

.prose { color: var(--text-soft); font-size: 15px; line-height: 1.9; }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  margin: 46px 0 15px;
  padding-top: 8px;
  color: #172033;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.45;
}
.prose h2:first-of-type { margin-top: 36px; }
.prose h3 {
  margin: 30px 0 10px;
  color: #222d40;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.prose p { margin: 13px 0; }
.prose strong { color: #202a3b; font-weight: 600; }
.prose a { border-bottom: 1px solid #c9d8ff; }
.prose a:hover { border-bottom-color: var(--brand); }
.prose ul, .prose ol { margin: 12px 0; padding-left: 24px; }
.prose li { margin: 6px 0; padding-left: 2px; }
.prose li::marker { color: #9aa6bb; }
.prose hr { margin: 38px 0; border: 0; border-top: 1px solid var(--line); }
.prose blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  color: #4c5870;
  background: #f8f9fc;
  border-left: 3px solid #cbd5e6;
  border-radius: 0 8px 8px 0;
}
.prose blockquote p { margin: 5px 0; }
.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote > :last-child { margin-bottom: 0; }

.table-wrap {
  margin: 18px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; line-height: 1.65; }
.prose th {
  padding: 9px 12px;
  color: #4b5668;
  background: #f7f8fa;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.prose td { padding: 9px 12px; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: #fbfcfe; }
.prose td code, .prose th code { white-space: nowrap; }

.prose code {
  padding: 2px 5px;
  color: #24406f;
  background: #f2f5fa;
  border: 1px solid #e9edf4;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.prose pre {
  position: relative;
  margin: 18px 0;
  padding: 17px 18px;
  overflow: auto;
  color: #dbe5f6;
  background: #111a2c;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.7;
}
.prose pre code { padding: 0; color: inherit; background: transparent; border: 0; font-size: inherit; white-space: pre; }
.copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  color: #9fb0cc;
  background: #1d2a42;
  border: 1px solid #31405d;
  border-radius: 5px;
  font-size: 10.5px;
  opacity: 0;
  transition: opacity .14s ease;
}
.prose pre:hover .copy-code { opacity: 1; }
.copy-code:hover { color: #fff; border-color: #4d6388; }

.callout {
  margin: 20px 0;
  padding: 14px 17px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.75;
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout strong:first-child { display: block; margin-bottom: 3px; font-size: 13px; }
.callout.tip { color: #2f4a7a; background: #f5f8ff; border-color: #dfe8ff; }
.callout.tip strong { color: #2457d6; }
.callout.warn { color: #6b5127; background: #fffbf2; border-color: #f3e4c4; }
.callout.warn strong { color: #9a6a10; }
.callout.boundary { color: #4d5566; background: #f8f9fb; border-color: #e5e8ee; }
.callout.boundary strong { color: #525d70; }
.callout.danger { color: #7a3030; background: #fff7f7; border-color: #f1dada; }
.callout.danger strong { color: #a13b3b; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 26px;
}
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  padding: 16px 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}
.card h3, .card h4 { margin: 0 0 6px; color: #202a3c; font-size: 14.5px; }
.card p { margin: 0; color: #687385; font-size: 12.5px; line-height: 1.7; }
.card .card-tag { display: inline-block; margin-bottom: 8px; color: var(--brand); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; }
.card a { font-weight: 500; }

.steps { margin: 18px 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li {
  position: relative;
  margin: 0 0 12px;
  padding: 0 0 0 38px;
  min-height: 26px;
  counter-increment: step;
}
.steps > li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #dfe7ff;
  border-radius: 50%;
  content: counter(step);
  font-size: 11px;
  font-weight: 700;
}
.steps > li > :first-child { margin-top: 0; }
.steps > li > :last-child { margin-bottom: 0; }

.figure { margin: 24px 0 28px; }
.figure a { display: block; border-bottom: 0; cursor: zoom-in; }
.figure a:hover { border-bottom-color: transparent; }
.figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
.figure.diagram img {
  border-color: #e3e9f3;
  border-radius: 12px;
  background: #fbfcff;
  box-shadow: none;
}
.figure figcaption { margin-top: 9px; color: #8b95a5; font-size: 11.5px; text-align: center; }

.login-mock {
  display: flex;
  justify-content: center;
  margin: 24px 0 28px;
  padding: 36px 20px;
  background:
    radial-gradient(circle at 20% 15%, rgba(120, 168, 255, .28), transparent 32%),
    radial-gradient(circle at 82% 80%, rgba(84, 118, 255, .26), transparent 34%),
    linear-gradient(135deg, #17398f, #2a55c9 58%, #5b7fe8);
  border-radius: 12px;
}
.login-mock-card {
  width: min(286px, 100%);
  padding: 22px 22px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 22px 50px rgba(11, 30, 80, .28);
  text-align: center;
}
.login-mock-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  color: #fff;
  background: linear-gradient(145deg, #3f74f2, #1a43b8);
  border-radius: 10px;
  font-size: 21px;
  font-weight: 700;
}
.login-mock-card strong { display: block; color: #172033; font-size: 16px; letter-spacing: .01em; }
.login-mock-card > span { display: block; margin-top: 3px; color: #8993a5; font-size: 8.5px; letter-spacing: .12em; }
.login-mock-field {
  display: flex;
  align-items: center;
  height: 34px;
  margin-top: 10px;
  padding: 0 11px;
  color: #a3abba;
  background: #fff;
  border: 1px solid #e2e6ee;
  border-radius: 6px;
  font-size: 11.5px;
  text-align: left;
}
.login-mock-btn {
  display: grid;
  place-items: center;
  height: 34px;
  margin-top: 12px;
  color: #fff;
  background: #5b7fe8;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
}
.login-mock-divider {
  margin-top: 14px;
  padding-top: 12px;
  color: #6c7890;
  border-top: 1px solid #edf0f5;
  font-size: 10.5px;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 4px; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  color: #556175;
  background: #f4f6f9;
  border: 1px solid #e8ebf0;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.7;
}
.pill.blue { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }
.pill.green { color: #256b4b; background: #edf9f2; border-color: #d6f0e1; }
.pill.amber { color: #8a6116; background: #fff8e8; border-color: #f5e5c2; }
.pill.red { color: #9b3b3b; background: #fff4f4; border-color: #f2dddd; }

.kbd {
  display: inline-block;
  padding: 1px 5px;
  color: #526075;
  background: #f7f8fa;
  border: 1px solid #e0e4ea;
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.5;
}

.page-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 52px 0 24px;
  padding: 18px 20px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.page-feedback strong { display: block; color: #2b3547; font-size: 13.5px; }
.page-feedback span { color: #8b95a5; font-size: 11.5px; }
.feedback-actions { display: flex; gap: 8px; flex: none; }
.feedback-actions button {
  padding: 6px 13px;
  color: #5b6678;
  background: #fff;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  font-size: 12px;
}
.feedback-actions button:hover { color: var(--brand); border-color: var(--brand-line); background: #f8faff; }
.feedback-actions button.selected { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 8px 0 20px;
}
.pager-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 70px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.pager-card:hover { border-color: #cbd7f3; box-shadow: var(--shadow-sm); }
.pager-card span { color: #98a1b0; font-size: 10.5px; }
.pager-card strong { color: #2a3445; font-size: 13.5px; font-weight: 600; }
.pager-card.next { text-align: right; }

/* TOC */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  max-height: calc(100vh - var(--header-h) - 44px);
  overflow: auto;
  padding: 2px 0 16px 18px;
  border-left: 1px solid #eef0f4;
}
.toc-title { margin-bottom: 10px; color: #6e7888; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; }
.toc-links { display: flex; flex-direction: column; }
.toc-link {
  position: relative;
  padding: 5px 0;
  color: #8993a2;
  font-size: 11.5px;
  line-height: 1.55;
}
.toc-link:hover { color: var(--brand); }
.toc-link.level-3 { padding-left: 12px; font-size: 11px; }
.toc-link.active { color: var(--brand); font-weight: 600; }
.toc-link.active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -19px;
  width: 2px;
  background: var(--brand);
  border-radius: 2px;
  content: "";
}
.toc-empty { color: #a3abba; font-size: 11.5px; }

/* Footer */
.site-footer { background: #fafbfc; border-top: 1px solid var(--line); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 28px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 34px;
  color: #8d97a7;
  font-size: 11.5px;
}
.footer-inner strong { margin-right: 8px; color: #4f5a6c; font-size: 12.5px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: #6e798b; }
.footer-inner p { grid-column: 1 / -1; margin: 6px 0 0; color: #a2aab8; }

/* Search */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 16px 24px;
  background: rgba(17, 26, 44, .38);
  backdrop-filter: blur(4px);
}
.search-modal[hidden] { display: none; }
.search-panel {
  width: min(700px, 100%);
  max-height: 70vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 13px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .25);
}
.search-panel-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.search-panel-head svg { width: 20px; height: 20px; flex: none; color: #8c96a7; }
.search-panel-head input {
  flex: 1;
  min-width: 0;
  color: var(--text);
  border: 0;
  outline: 0;
  font-size: 16px;
}
.search-panel-head input::placeholder { color: #a2aab8; }
.search-panel-head button {
  padding: 3px 7px;
  color: #8a94a4;
  background: #f6f7f9;
  border: 1px solid #e5e8ee;
  border-radius: 5px;
  font-size: 10.5px;
}
.search-hint { padding: 22px 16px; color: #96a0b0; font-size: 12.5px; }
.search-results { max-height: calc(70vh - 120px); overflow: auto; padding: 6px 8px 10px; }
.search-result {
  display: block;
  padding: 11px 11px 10px;
  border-radius: 8px;
}
.search-result:hover, .search-result.focused { background: #f5f8ff; }
.search-result-top { display: flex; align-items: baseline; gap: 8px; }
.search-result-title { color: #263144; font-size: 13.5px; font-weight: 600; }
.search-result-path { color: #a0a9b7; font-size: 10.5px; }
.search-result-desc { margin-top: 2px; color: #7a8494; font-size: 11.5px; line-height: 1.6; }
.search-result mark { color: inherit; background: #fff0b8; border-radius: 2px; }
.search-empty { padding: 28px 16px; color: #98a2b2; font-size: 12.5px; text-align: center; }
.search-foot { padding: 8px 15px; color: #a0a8b6; background: #fafbfc; border-top: 1px solid var(--line); font-size: 10.5px; }

/* Home */
.is-home .layout { grid-template-columns: 256px minmax(0, 1fr); }
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 52px 46px;
  background:
    radial-gradient(circle at 92% 12%, rgba(84, 130, 255, .20), transparent 32%),
    radial-gradient(circle at 72% 88%, rgba(36, 87, 214, .08), transparent 34%),
    linear-gradient(140deg, #f7f9ff 0%, #fbfcff 58%, #f3f7ff 100%);
  border: 1px solid #e3eaff;
  border-radius: 16px;
}
.home-hero::after {
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image: linear-gradient(rgba(36, 87, 214, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(36, 87, 214, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom right, #000, transparent 72%);
  content: "";
  pointer-events: none;
}
.home-hero > * { position: relative; z-index: 1; }
.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 4px 10px;
  color: var(--brand);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.home-eyebrow::before { width: 5px; height: 5px; background: var(--brand); border-radius: 50%; content: ""; }
.home-hero h1 {
  max-width: 720px;
  margin: 0 0 16px;
  color: #14203a;
  font-size: 44px;
  font-weight: 750;
  letter-spacing: -.03em;
  line-height: 1.22;
}
.home-hero h1 em { color: var(--brand); font-style: normal; }
.home-hero .home-lead { max-width: 690px; margin: 0; color: #5a6578; font-size: 16px; line-height: 1.9; }
.home-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
}
.button.primary { color: #fff; background: var(--brand); box-shadow: 0 7px 18px rgba(36, 87, 214, .22); }
.button.primary:hover { color: #fff; background: var(--brand-strong); }
.button.ghost { color: #42506a; background: #fff; border: 1px solid #dfe5ef; }
.button.ghost:hover { border-color: #c9d5ea; }
.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 34px;
  overflow: hidden;
  background: #e6ebf7;
  border: 1px solid #e6ebf7;
  border-radius: 10px;
}
.home-stat { padding: 15px 18px; background: rgba(255, 255, 255, .78); }
.home-stat strong { display: block; color: #1e3158; font-size: 22px; font-weight: 700; line-height: 1.2; }
.home-stat span { color: #7a879d; font-size: 11.5px; }
.home-section { margin: 52px 0 0; }
.home-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.home-section-head h2 { margin: 0; color: #1a2437; font-size: 23px; font-weight: 650; letter-spacing: -.01em; }
.home-section-head p { margin: 0; color: #8a94a4; font-size: 12px; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.role-card:hover { transform: translateY(-2px); border-color: #cdd9f0; box-shadow: var(--shadow-md); }
.role-number { color: #b8c1cf; font-family: var(--font-mono); font-size: 11px; }
.role-card h3 { margin: 10px 0 7px; color: #223048; font-size: 16px; }
.role-card p { flex: 1; margin: 0 0 14px; color: #788395; font-size: 12.5px; line-height: 1.75; }
.role-card a { font-size: 12px; font-weight: 600; }
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cap-block { padding: 18px 20px; background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; }
.cap-block h3 { margin: 0 0 4px; color: #263247; font-size: 14.5px; }
.cap-block > p { margin: 0 0 10px; color: #8a94a4; font-size: 11.5px; }
.cap-block ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin: 0; padding: 0; list-style: none; }
.cap-block li { position: relative; padding-left: 12px; color: #5e6a7d; font-size: 12px; line-height: 1.9; }
.cap-block li::before { position: absolute; top: 9px; left: 0; width: 4px; height: 4px; background: #b7c6e6; border-radius: 50%; content: ""; }
.home-shot { margin: 0; }
.home-shot img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 22px 60px rgba(22, 38, 74, .12); }
.home-shot figcaption { margin-top: 10px; color: #95a0b1; font-size: 11.5px; text-align: center; }
.doc-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; }
.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  color: #465269;
  border-bottom: 1px solid #eef1f5;
  font-size: 13px;
}
.doc-link:hover { color: var(--brand); }
.doc-link span { color: #a1aab8; font-size: 11px; white-space: nowrap; }
.home-note { margin-top: 46px; padding: 18px 20px; color: #687385; background: #f8fafc; border: 1px solid #e9edf3; border-radius: 9px; font-size: 12px; line-height: 1.8; }

.mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(2px);
}
.mobile-backdrop[hidden] { display: none; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: 244px minmax(0, 1fr); max-width: 1080px; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .site-header { padding: 0 16px; }
  .menu-button { display: inline-flex; }
  .brand { min-width: 0; }
  .brand-copy small { display: none; }
  .section-tabs { gap: 20px; margin-left: 22px; }
  .section-tabs a { font-size: 13.5px; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; background: transparent; border-color: transparent; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .version-pill { display: none; }
  .layout, .is-home .layout { grid-template-columns: minmax(0, 1fr); max-width: 860px; padding: 22px 20px 64px; }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: 286px;
    max-height: none;
    padding: 16px 14px 24px;
    background: #fff;
    border-right: 1px solid var(--line);
    box-shadow: 18px 0 50px rgba(15, 23, 42, .14);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-head { display: flex; }
  .breadcrumb { margin-bottom: 16px; }
  .home-hero { padding: 38px 30px 32px; }
  .home-hero h1 { font-size: 36px; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .role-grid { grid-template-columns: 1fr; }
  .role-card { min-height: 0; }
  .cap-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; padding: 24px 20px 30px; }
  .footer-links { flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .site-header { gap: 4px; }
  .brand-mark { width: 29px; height: 29px; font-size: 15px; }
  .brand-copy { display: none; }
  .section-tabs { margin-left: 6px; gap: 14px; }
  .section-tabs a { font-size: 13px; }
  .article h1 { font-size: 28px; }
  .home-hero { padding: 32px 22px 26px; }
  .home-hero h1 { font-size: 31px; }
  .home-hero .home-lead { font-size: 14.5px; }
  .home-actions .button { flex: 1; }
  .home-stats { grid-template-columns: 1fr 1fr; }
  .home-stat { padding: 13px 14px; }
  .home-stat strong { font-size: 19px; }
  .cards, .cards.three, .doc-links { grid-template-columns: 1fr; }
  .cap-block ul { grid-template-columns: 1fr; }
  .page-feedback { flex-direction: column; align-items: flex-start; }
  .pager { grid-template-columns: 1fr; }
  .pager-card.next { text-align: left; }
  .prose h2 { font-size: 21px; }
  .prose table { min-width: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .site-header, .sidebar, .toc, .site-footer, .page-feedback, .pager, .search-modal, .mobile-backdrop { display: none !important; }
  .layout { display: block; max-width: none; padding: 0; }
  .prose pre { white-space: pre-wrap; }
}
