:root {
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --header-height: 54px;
  --sidebar-width: 290px;
  --affix-width: 240px;
  --content-width: 880px;
  --radius: 4px;
  --bg: #ffffff;
  --bg-subtle: #f8f8f8;
  --bg-muted: #f2f2f2;
  --bg-hover: #ebebeb;
  --text: #161616;
  --text-muted: #505050;
  --text-subtle: #6e6e6e;
  --border: #e0e0e0;
  --border-strong: #c8c8c8;
  --accent: #0065b3;
  --accent-hover: #004f8c;
  --accent-soft: #eaf3fb;
  --focus: #0078d4;
  --code-bg: #f5f5f5;
  --header-bg: #ffffff;
  --shadow: 0 1.6px 3.6px rgba(0, 0, 0, .13), 0 .3px .9px rgba(0, 0, 0, .11);
  --note: #0065b3; --note-bg: #eaf3fb;
  --tip: #107c10; --tip-bg: #eaf5ea;
  --important: #6b2fbb; --important-bg: #f2ecfa;
  --caution: #a4262c; --caution-bg: #fbeaea;
  --warning: #8a5a00; --warning-bg: #fdf4e3;
  --hl-k: #0000c8; --hl-s: #a31515; --hl-c: #008000; --hl-n: #098658; --hl-l: #0000c8; --hl-t: #267f99;
}
:root[data-theme="dark"] {
  --bg: #1b1b1b; --bg-subtle: #212121; --bg-muted: #262626; --bg-hover: #303030;
  --text: #f2f2f2; --text-muted: #c8c8c8; --text-subtle: #a0a0a0;
  --border: #3a3a3a; --border-strong: #505050;
  --accent: #75b6e7; --accent-hover: #9ccbef; --accent-soft: #1f3345;
  --focus: #75b6e7; --code-bg: #262626; --header-bg: #202020;
  --shadow: 0 1.6px 3.6px rgba(0, 0, 0, .5), 0 .3px .9px rgba(0, 0, 0, .4);
  --note: #75b6e7; --note-bg: #1c2a36; --tip: #6ccb5f; --tip-bg: #1d2b1c; --important: #b69ee8; --important-bg: #2a2336;
  --caution: #f1707b; --caution-bg: #3a2124; --warning: #f3c65b; --warning-bg: #33291a;
  --hl-k: #569cd6; --hl-s: #ce9178; --hl-c: #6a9955; --hl-n: #b5cea8; --hl-l: #569cd6; --hl-t: #4ec9b0;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #1b1b1b; --bg-subtle: #212121; --bg-muted: #262626; --bg-hover: #303030;
    --text: #f2f2f2; --text-muted: #c8c8c8; --text-subtle: #a0a0a0;
    --border: #3a3a3a; --border-strong: #505050;
    --accent: #75b6e7; --accent-hover: #9ccbef; --accent-soft: #1f3345;
    --focus: #75b6e7; --code-bg: #262626; --header-bg: #202020;
    --shadow: 0 1.6px 3.6px rgba(0, 0, 0, .5), 0 .3px .9px rgba(0, 0, 0, .4);
    --note: #75b6e7; --note-bg: #1c2a36; --tip: #6ccb5f; --tip-bg: #1d2b1c; --important: #b69ee8; --important-bg: #2a2336;
    --caution: #f1707b; --caution-bg: #3a2124; --warning: #f3c65b; --warning-bg: #33291a;
    --hl-k: #569cd6; --hl-s: #ce9178; --hl-c: #6a9955; --hl-n: #b5cea8; --hl-l: #569cd6; --hl-t: #4ec9b0;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 16px; background: var(--bg); border: 1px solid var(--border); }
.skip-link:focus { left: 8px; }
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-height); background: var(--header-bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 100%; max-width: 1920px; margin: 0 auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; white-space: nowrap; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-logo { width: 24px; height: 24px; }
.navbar { flex: 1; min-width: 0; overflow-x: auto; }
.navbar ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.navbar a { display: block; padding: 14px 10px 12px; color: var(--text-muted); font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.navbar a:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--border-strong); }
.navbar a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--text-muted); cursor: pointer; }
.icon-button:hover { background: var(--bg-hover); color: var(--text); }
.menu-toggle { display: none; }
.search { position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.search input { width: 260px; height: 34px; padding: 0 12px 0 32px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); font: 14px var(--font); }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
.search-results { position: absolute; right: 0; top: calc(100% + 6px); width: min(520px, 92vw); max-height: 70vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6.4px 14.4px rgba(0, 0, 0, .13), 0 1.2px 3.6px rgba(0, 0, 0, .11); }
.search-result { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result[aria-selected="true"] { background: var(--accent-soft); text-decoration: none; color: var(--text); }
.search-result strong { display: block; color: var(--accent); font-weight: 600; }
.search-result span { display: block; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.search-result mark { background: transparent; color: inherit; font-weight: 700; }
.search-empty { padding: 12px 14px; color: var(--text-muted); font-size: 14px; }
.page { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--affix-width); max-width: 1920px; margin: 0 auto; }
.page:not(:has(.sidebar)) { grid-template-columns: minmax(0, 1fr) var(--affix-width); }
.page:not(:has(.affix)) { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.page:not(:has(.sidebar)):not(:has(.affix)) { grid-template-columns: minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); border-right: 1px solid var(--border); background: var(--bg); }
.sidebar-inner { height: 100%; overflow-y: auto; padding: 20px 12px 32px 20px; }
.toc-filter input { width: 100%; height: 32px; margin-bottom: 12px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); font: 14px var(--font); }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc ul ul { padding-left: 14px; }
.toc li { margin: 0; }
.toc a, .toc .toc-group { display: flex; align-items: flex-start; gap: 4px; width: 100%; padding: 5px 8px; border: 0; border-left: 2px solid transparent; background: none; color: var(--text); font: 14px/1.4 var(--font); text-align: left; cursor: pointer; }
.toc a:hover, .toc .toc-group:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.toc a.active { border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.toc .toc-group::before, .toc .has-children > a::before { content: ""; flex: none; width: 6px; height: 6px; margin: 6px 4px 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.toc .expanded > .toc-group::before, .toc .expanded.has-children > a::before { transform: rotate(45deg); }
.toc li:not(.has-children) > a { padding-left: 22px; }
.toc li > ul { display: none; }
.toc li.expanded > ul { display: block; }
.toc .filtered-out { display: none; }
.main { min-width: 0; padding: 24px 48px 64px; }
.main > * { max-width: var(--content-width); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 14px; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 4px; color: var(--text-subtle); }
.breadcrumb span { color: var(--text-muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 8px; color: var(--text-muted); font-size: 14px; }
.page-action { display: inline-flex; align-items: center; gap: 6px; }
.content { overflow-wrap: break-word; }
.content h1 { margin: 8px 0 16px; font-size: 40px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.content h2 { margin: 40px 0 12px; font-size: 28px; line-height: 1.3; font-weight: 600; }
.content h3 { margin: 32px 0 10px; font-size: 22px; line-height: 1.35; font-weight: 600; }
.content h4, .content h5, .content h6 { margin: 24px 0 8px; font-size: 18px; font-weight: 600; }
.content .anchor { margin-left: 8px; opacity: 0; font-weight: 400; }
.content .anchor::before { content: "#"; }
.content :is(h2, h3, h4):hover .anchor, .content .anchor:focus { opacity: .6; text-decoration: none; }
.content p, .content ul, .content ol, .content dl, .content blockquote, .content .table-wrapper, .content .code-block, .content figure { margin: 0 0 16px; }
.content ul, .content ol { padding-left: 28px; }
.content li + li { margin-top: 4px; }
.content ul.tasks { padding-left: 4px; list-style: none; }
.content img { max-width: 100%; height: auto; }
.content hr { margin: 32px 0; border: 0; border-top: 1px solid var(--border); }
.content blockquote { padding: 4px 16px; border-left: 4px solid var(--border-strong); color: var(--text-muted); }
.content code { padding: 1px 5px; border-radius: 3px; background: var(--code-bg); font: .875em var(--font-mono); }
.content kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 3px; background: var(--bg-subtle); font: .85em var(--font-mono); }
.table-wrapper { overflow-x: auto; }
.content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.content th, .content td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.content th { border-bottom: 2px solid var(--border-strong); font-weight: 600; }
.content .align-center { text-align: center; }
.content .align-right { text-align: right; }
.content td > .api-doc p { margin: 0; }
.code-block { border: 1px solid var(--border); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 4px 14px; border-bottom: 1px solid var(--border); background: var(--bg-muted); color: var(--text-muted); font-size: 13px; }
.copy { padding: 3px 10px; border: 1px solid transparent; border-radius: var(--radius); background: none; color: var(--text-muted); font: 13px var(--font); cursor: pointer; }
.copy:hover { background: var(--bg-hover); color: var(--text); }
.code-block pre, .api-signature pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 14px/1.55 var(--font-mono); tab-size: 4; }
.code-block pre code, .api-signature code { padding: 0; background: none; font: inherit; }
.line.highlight { display: inline-block; min-width: 100%; margin: 0 -16px; padding: 0 16px; background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.hl-k { color: var(--hl-k); } .hl-s { color: var(--hl-s); } .hl-c { color: var(--hl-c); font-style: italic; } .hl-n { color: var(--hl-n); } .hl-l { color: var(--hl-l); } .hl-t { color: var(--hl-t); }
.mermaid { margin: 0 0 16px; text-align: center; background: none; }
.alert { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--note); border-radius: var(--radius); background: var(--note-bg); }
.alert > :last-child { margin-bottom: 0; }
.alert-title { margin: 0 0 4px; color: var(--note); font-weight: 600; }
.alert-tip { border-color: var(--tip); background: var(--tip-bg); } .alert-tip .alert-title { color: var(--tip); }
.alert-important { border-color: var(--important); background: var(--important-bg); } .alert-important .alert-title { color: var(--important); }
.alert-caution { border-color: var(--caution); background: var(--caution-bg); } .alert-caution .alert-title { color: var(--caution); }
.alert-warning { border-color: var(--warning); background: var(--warning-bg); } .alert-warning .alert-title { color: var(--warning); }
.tabs { margin: 0 0 16px; }
.tab-list { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.tab-list button { padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-muted); font: 15px var(--font); cursor: pointer; }
.tab-list button:hover { color: var(--text); background: var(--bg-hover); }
.tab-list button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }
.tab-panel { padding-top: 16px; }
.video { position: relative; margin: 0 0 16px; padding-top: 56.25%; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.row { display: flex; flex-wrap: wrap; gap: 24px; margin: 0 0 16px; }
.column { flex-basis: 0; min-width: 220px; }
.image-icon img { width: 48px; }
.content figcaption { margin-top: 6px; color: var(--text-muted); font-size: 14px; }
.xref.unresolved { border-bottom: 1px dotted var(--caution); }
.api-heading { margin-bottom: 8px; }
.api-kind { margin: 0; color: var(--text-muted); font-size: 14px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.api-heading h1 { margin-top: 0; }
.api-namespace, .api-source { color: var(--text-muted); font-size: 14px; }
.api-signature { margin: 0 0 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--code-bg); }
.api-member { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--border); }
.api-parameters dt { margin-top: 8px; }
.api-parameters dd { margin: 2px 0 0 20px; color: var(--text-muted); }
.api-list { padding-left: 24px; }
.api-table td:first-child { white-space: nowrap; }
.rest-version { margin-left: 12px; padding: 2px 8px; border-radius: 12px; background: var(--bg-muted); color: var(--text-muted); font-size: 14px; font-weight: 400; vertical-align: middle; }
.rest-endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rest-endpoint code { font-size: 15px; }
.method { display: inline-block; min-width: 64px; padding: 2px 8px; border-radius: 3px; color: #fff; font: 600 12px var(--font-mono); text-align: center; background: #505050; }
.method-get { background: #0065b3; } .method-post { background: #107c10; } .method-put { background: #8a5a00; } .method-patch { background: #6b2fbb; } .method-delete { background: #a4262c; }
.status { font-family: var(--font-mono); font-weight: 600; } .status-2xx { color: var(--tip); } .status-4xx, .status-5xx { color: var(--caution); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--bg-muted); color: var(--text-muted); font-size: 12px; font-weight: 600; }
.badge.deprecated { background: var(--caution-bg); color: var(--caution); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.pager-link { display: block; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.pager-link:hover { border-color: var(--accent); text-decoration: none; color: var(--text); }
.pager-link.next { grid-column: 2; text-align: right; }
.pager-label { display: block; color: var(--text-muted); font-size: 13px; }
.pager-title { display: block; color: var(--accent); font-weight: 600; }
.affix { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); }
.affix-inner { height: 100%; overflow-y: auto; padding: 28px 20px 32px 8px; }
.affix-title { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.affix ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--border); }
.affix a { display: block; margin-left: -1px; padding: 4px 12px; border-left: 2px solid transparent; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.affix .level-3 a { padding-left: 24px; }
.affix a:hover { color: var(--text); text-decoration: none; }
.affix a.active { border-left-color: var(--accent); color: var(--text); font-weight: 600; }
.site-footer { border-top: 1px solid var(--border); background: var(--bg-subtle); color: var(--text-muted); font-size: 14px; }
.footer-inner { max-width: 1920px; margin: 0 auto; padding: 20px 24px; }
.redirect { padding: 48px 24px; text-align: center; }
@media (max-width: 1200px) {
  .page, .page:not(:has(.affix)) { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .page:not(:has(.sidebar)) { grid-template-columns: minmax(0, 1fr); }
  .affix { display: none; }
}
@media (max-width: 1024px) {
  .page, .page:not(:has(.affix)), .page:not(:has(.sidebar)) { grid-template-columns: minmax(0, 1fr); }
  .menu-toggle { display: inline-flex; }
  .sidebar { position: fixed; top: var(--header-height); left: 0; z-index: 20; width: min(var(--sidebar-width), 86vw); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .navbar { display: none; }
  .main { padding: 20px 24px 48px; }
  .search input { width: 180px; }
}
@media (max-width: 640px) {
  .header-inner { gap: 12px; padding: 0 12px; }
  .brand-name { display: none; }
  .search input { width: 140px; }
  .content h1 { font-size: 30px; }
  .content h2 { font-size: 24px; }
  .main { padding: 16px 16px 40px; }
  .pager { grid-template-columns: 1fr; }
  .pager-link.next { grid-column: 1; }
}
@media print {
  .site-header, .sidebar, .affix, .page-actions, .pager, .site-footer, .copy, .anchor, .skip-link { display: none !important; }
  .page { display: block; }
  .main { padding: 0; }
  .main > * { max-width: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .code-block, .api-signature { break-inside: avoid; }
  .tab-panel[hidden] { display: block !important; }
  .print-section { break-before: page; }
  .print-cover { display: flex; flex-direction: column; justify-content: center; min-height: 90vh; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.layout-landing .main > * { max-width: none; }
.layout-landing .content h1 { font-size: 48px; }
.layout-chromeless .main { padding-top: 32px; }
.content sub, .content sup { line-height: 0; }
.content mark { padding: 0 2px; background: #fff4b3; color: inherit; }
:root[data-theme="dark"] .content mark { background: #5c4d00; }
.content ins { text-decoration-color: var(--tip); }
.footnote-ref a { padding: 0 2px; font-size: .8em; }
.footnotes { margin-top: 40px; color: var(--text-muted); font-size: 14px; }
.footnotes hr { margin: 0 0 16px; }
.footnote-back { margin-left: 4px; }
.diagram { text-align: center; }
.content video { max-width: 100%; }
.page-action.pdf { margin-left: auto; }
.toc .toc-heading { display: block; margin: 14px 0 4px; padding: 0 8px; color: var(--text-subtle); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.toc li:first-child > .toc-heading { margin-top: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 24px 0; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); box-shadow: var(--shadow); }
.card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); background: var(--bg-muted); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.content .card-title { margin: 0; font-size: 18px; }
.card-meta { margin: 0; color: var(--text-muted); font-size: 13px; }
.card-body p { margin: 0; }
.card-usage { margin: 0; font-size: 13px; }
.card-usage dt { margin-top: 6px; color: var(--text-muted); font-weight: 600; }
.card-usage dd { margin: 2px 0 0; overflow-x: auto; }
.card-links { margin-top: auto; font-size: 14px; }
