:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-code: #f4f6fa;
  --border: #e3e8ef;
  --text: #1a2233;
  --text-soft: #4f5a6e;
  --text-faint: #8590a3;
  --accent: #2f5bff;
  --accent-soft: #eef2ff;
  --accent-text: #2848d8;
  --note: #2f5bff;
  --tip: #11845b;
  --important: #7c3aed;
  --warning: #b86e00;
  --caution: #c8322a;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  --header-h: 60px;
  --sidebar-w: 268px;
  --toc-w: 230px;
  --measure: 780px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0d1220;
  --bg-soft: #141b2c;
  --bg-code: #111829;
  --border: #252f46;
  --text: #e6e9f1;
  --text-soft: #a7b0c3;
  --text-faint: #6f7a92;
  --accent: #6d88ff;
  --accent-soft: #1a2448;
  --accent-text: #9db0ff;
  --note: #6d88ff;
  --tip: #3cc28d;
  --important: #a78bfa;
  --warning: #e3a33b;
  --caution: #f0716a;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1220;
  --bg-soft: #141b2c;
  --bg-code: #111829;
  --border: #252f46;
  --text: #e6e9f1;
  --text-soft: #a7b0c3;
  --text-faint: #6f7a92;
  --accent: #6d88ff;
  --accent-soft: #1a2448;
  --accent-text: #9db0ff;
  --note: #6d88ff;
  --tip: #3cc28d;
  --important: #a78bfa;
  --warning: #e3a33b;
  --caution: #f0716a;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
svg { display: block; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 40; height: var(--header-h); display: flex; align-items: center; gap: 14px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-docs { color: var(--text-soft); font-weight: 500; font-size: 16px; padding-left: 10px; border-left: 1px solid var(--border); }
.search-btn { flex: 0 1 380px; margin-left: 28px; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text-faint); font: inherit; font-size: 14.5px; cursor: pointer; min-width: 0; }
.search-btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.search-btn svg, .search-field svg { width: 17px; height: 17px; flex: none; }
.search-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-btn kbd, .search-field kbd { margin-left: auto; font: 12px var(--mono); color: var(--text-faint); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--bg); }
.top-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--text-soft); cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.open-app { margin-right: 6px; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.open-app:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.menu-btn { display: none; margin-left: -8px; }

.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w); max-width: 1480px; margin: 0 auto; }
.sidebar { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 26px 14px 56px 20px; border-right: 1px solid var(--border); overscroll-behavior: contain; }
.nav-section { margin-bottom: 24px; }
.nav-section h2 { margin: 0 0 6px 10px; font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.nav-section ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.nav-section a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--text-soft); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.nav-section a:hover { color: var(--text); background: var(--bg-soft); }
.nav-section a[aria-current] { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }

.content { min-width: 0; padding: 44px 56px 88px; }
.prose { max-width: var(--measure); }
.eyebrow { margin: 0 0 8px; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.prose h1 { margin: 0 0 22px; font-size: 36px; line-height: 1.18; letter-spacing: -0.025em; font-weight: 700; }
.prose h2 { margin: 52px 0 14px; font-size: 25px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 650; }
.prose h3 { margin: 34px 0 10px; font-size: 19px; line-height: 1.35; font-weight: 650; }
.prose h4 { margin: 26px 0 8px; font-size: 16px; font-weight: 650; }
.prose h1 + p { font-size: 18px; color: var(--text-soft); }
.anchor { margin-left: 8px; color: var(--text-faint); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, .anchor:focus { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin: 4px 0; }
.prose a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
.prose a:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.prose blockquote { margin: 20px 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--border); color: var(--text-soft); }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--bg-code); border: 1px solid var(--border); border-radius: 5px; padding: 0.12em 0.38em; overflow-wrap: anywhere; }
.prose kbd { font-family: var(--mono); font-size: 0.8em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0.1em 0.45em; background: var(--bg); white-space: nowrap; }
.code { margin: 20px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-code); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 5px 6px 5px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-faint); }
.copy { border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text-soft); font: 12.5px var(--font); padding: 3px 10px; cursor: pointer; }
.copy:hover { color: var(--text); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }
.table-wrap { margin: 20px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th { background: var(--bg-soft); text-align: left; font-weight: 600; white-space: nowrap; }
th, td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tr:target td { background: var(--accent-soft); }
td:first-child code { white-space: nowrap; }
.callout { margin: 22px 0; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--border)); border-left: 4px solid var(--c); border-radius: 9px; background: color-mix(in srgb, var(--c) 7%, var(--bg)); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 4px !important; font-weight: 650; color: var(--c); }
.callout.note { --c: var(--note); }
.callout.tip { --c: var(--tip); }
.callout.important { --c: var(--important); }
.callout.warning { --c: var(--warning); }
.callout.caution { --c: var(--caution); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 24px 0 32px; }
.prose a.card { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--bg); transition: border-color 0.15s, box-shadow 0.15s; }
.prose a.card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }
.card strong { display: block; margin-bottom: 4px; color: var(--accent-text); }
.card span { display: block; color: var(--text-soft); font-size: 14.5px; font-weight: 400; line-height: 1.5; }

.pager { display: flex; gap: 16px; max-width: var(--measure); margin-top: 60px; }
.pager > * { flex: 1; }
.pager a { padding: 14px 18px; border: 1px solid var(--border); border-radius: 11px; color: var(--accent-text); font-weight: 600; text-decoration: none; }
.pager a:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.pager a span { display: block; color: var(--text-faint); font-size: 13px; font-weight: 500; }
.pager .next { text-align: right; }
.page-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; max-width: var(--measure); margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 13.5px; }
.page-foot a { color: var(--text-soft); }

.toc { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 46px 20px 40px 6px; font-size: 13.5px; }
.toc-title { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--border); color: var(--text-soft); text-decoration: none; line-height: 1.4; }
.toc a.lvl3 { padding-left: 24px; font-size: 13px; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent-text); border-left-color: var(--accent); font-weight: 600; }

.search-overlay { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 11vh 16px 16px; background: rgba(8, 12, 24, 0.46); }
.search-panel { width: min(660px, 100%); max-height: 76vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); box-shadow: var(--shadow); }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--border); color: var(--text-faint); }
.search-field input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 17px; }
.search-field input::-webkit-search-cancel-button { display: none; }
.results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.results a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.results a.sel { background: var(--accent-soft); }
.r-h { font-weight: 600; }
.r-h mark, .r-x mark { background: none; color: var(--accent-text); }
.r-s { display: block; color: var(--text-faint); font-size: 12.5px; }
.r-x { display: block; color: var(--text-soft); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 18px 14px; color: var(--text-faint); }

@media (max-width: 1200px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 880px) {
  .layout { display: block; }
  .menu-btn { display: inline-flex; }
  .sidebar { position: fixed; z-index: 35; top: var(--header-h); left: 0; bottom: 0; width: min(310px, 86vw); height: auto; background: var(--bg); transform: translateX(-102%); transition: transform 0.2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  body.nav-open::after { content: ""; position: fixed; inset: var(--header-h) 0 0 0; z-index: 30; background: rgba(8, 12, 24, 0.35); }
  .content { padding: 28px 16px 64px; }
  .top { gap: 8px; padding: 0 12px; }
  .search-btn { margin-left: 6px; flex: 1; }
  .search-btn kbd, .brand-docs, .open-app { display: none; }
  .prose h1 { font-size: 29px; }
  .prose h2 { font-size: 22px; margin-top: 42px; }
  .pager { flex-direction: column; }
}
@media (max-width: 420px) {
  .brand-name { display: none; }
}
