:root {
  color-scheme: light;
  --page: #fbfcfe;
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --ink: #0b1220;
  --muted: #526173;
  --faint: #7d8b9d;
  --line: #e4e9f1;
  --line-strong: #cbd5e1;
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --brand-soft: #eaf1ff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}
pre {
  margin: 18px 0;
  padding: 18px;
  overflow: auto;
  border-radius: 8px;
  background: #0b1220;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.7;
}
pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.icon { width: 16px; height: 16px; flex: 0 0 16px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(203, 213, 225, .72);
  background: rgba(251, 252, 254, .9);
  backdrop-filter: blur(14px) saturate(160%);
}
.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 198px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
}
.brand img { width: 138px; height: auto; mix-blend-mode: multiply; }
.brand-badge {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}
.top-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.top-links a { text-decoration: none; }
.top-links a:hover { color: var(--ink); }
.search {
  position: relative;
  width: min(360px, 30vw);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--faint);
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.search input::placeholder { color: var(--faint); }
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: min(460px, calc(100vh - 90px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
}
.search-result,
.search-empty {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.search-result:hover,
.search-result:focus {
  outline: 0;
  background: var(--brand-soft);
}
.search-result strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}
.search-result span,
.search-empty {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.docs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 240px;
  gap: 34px;
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  align-items: start;
}
.sidebar,
.toc {
  position: sticky;
  top: 86px;
  height: calc(100vh - 104px);
  overflow: auto;
  padding: 22px 0;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding-right: 22px;
}
.sidebar-group { margin-bottom: 28px; }
.sidebar-title,
.toc-title {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.side-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.side-link:hover,
.side-link.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.article {
  min-width: 0;
  padding: 54px 0 90px;
}
.doc-content {
  max-width: 850px;
}
.doc-content h1 {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: 0;
}
.doc-content h2 {
  margin: 46px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
}
.doc-content h3 {
  margin: 30px 0 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}
.doc-content h4 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 17px;
}
.doc-content p,
.doc-content li {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}
.doc-content p { margin: 14px 0; }
.doc-content ul,
.doc-content ol {
  margin: 14px 0 20px;
  padding-left: 24px;
}
.doc-content li + li { margin-top: 7px; }
.doc-content a {
  color: var(--brand-dark);
  font-weight: 750;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.table-wrap {
  overflow: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
th {
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 850;
}
tr:last-child td { border-bottom: 0; }
.edit-source {
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.edit-source a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.toc {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.toc a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}
.toc a:hover { color: var(--brand-dark); }
.toc-level-3 { padding-left: 12px !important; font-size: 12.5px !important; }
.toc-empty {
  color: var(--faint);
  font-size: 13px;
}
@media (max-width: 1080px) {
  .docs-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .toc { display: none; }
  .search { display: none; }
  .top-links { gap: 16px; }
}
@media (max-width: 760px) {
  .topbar-inner { width: min(100% - 28px, 1440px); }
  .brand { min-width: 0; }
  .brand img { width: 126px; }
  .brand-badge { display: none; }
  .top-links a:nth-child(1),
  .top-links a:nth-child(2) { display: none; }
  .docs-shell {
    width: min(100% - 28px, 1440px);
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
  }
  .sidebar-group { margin-bottom: 0; }
  .article { padding-top: 34px; }
}
@media (max-width: 520px) {
  .sidebar { grid-template-columns: 1fr; }
  .doc-content h1 { font-size: 38px; }
}