@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-cyrillic.71d5ee93cc.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-latin.3100e775e8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-soft: #f7f7f9;
  --bg-hover: #f3f3f6;
  --text: #16161d;
  --text-2: #464652;
  --muted: #6b6b78;
  --line: #ebebef;
  --line-strong: #dcdce3;
  --accent: #5146e5;
  --accent-text: #4338ca;
  --accent-hover: #4338ca;
  --accent-soft: #f1f0fe;
  --accent-line: rgba(81, 70, 229, .35);
  --code-bg: #fafafb;
  --code-inline-bg: #f4f4f7;
  --code-text: #24292f;
  --shadow-lg: 0 24px 64px -12px rgba(16, 16, 32, .22), 0 2px 8px rgba(16, 16, 32, .06);
  --header-h: 64px;
  --tabs-h: 46px;
  --top: calc(var(--header-h) + var(--tabs-h));
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --hl-keyword: #cf222e; --hl-string: #0a3069; --hl-number: #0550ae; --hl-title: #8250df; --hl-comment: #6e7781; --hl-attr: #0550ae; --hl-var: #953800; --hl-meta: #1f6feb;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d12;
  --bg-elevated: #15151c;
  --bg-soft: #131319;
  --bg-hover: #1b1b23;
  --text: #f3f3f6;
  --text-2: #c2c2cc;
  --muted: #8e8e9b;
  --line: #22222b;
  --line-strong: #30303b;
  --accent: #8b83ff;
  --accent-text: #a49dff;
  --accent-hover: #b3adff;
  --accent-soft: rgba(139, 131, 255, .13);
  --accent-line: rgba(139, 131, 255, .5);
  --code-bg: #121218;
  --code-inline-bg: #1b1b23;
  --code-text: #e6edf3;
  --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
  --hl-keyword: #ff7b72; --hl-string: #a5d6ff; --hl-number: #79c0ff; --hl-title: #d2a8ff; --hl-comment: #8b949e; --hl-attr: #79c0ff; --hl-var: #ffa657; --hl-meta: #79c0ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 24px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: 'cv11', 'ss01'; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
.icon { width: 16px; height: 16px; flex: none; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
kbd { font: 500 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; background: var(--bg); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -48px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); view-transition-name: topbar; }
.topbar-row { max-width: 92rem; margin: 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.logo { display: flex; align-items: center; color: var(--text); flex: none; margin-right: 8px; }
.logo-svg { height: 30px; width: auto; }
.search-trigger { flex: 0 1 440px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-elevated); color: var(--muted); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.search-trigger:hover { border-color: var(--accent-line); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.search-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-links { display: flex; align-items: center; gap: 4px; flex: none; }
.top-link { font-size: 14px; font-weight: 500; color: var(--text-2); padding: 8px 12px; border-radius: 10px; transition: color .15s, background .15s; }
.top-link:hover { color: var(--text); background: var(--bg-hover); }
.btn-primary { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; height: 36px; padding: 0 12px 0 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(81, 70, 229, .3), inset 0 1px 0 rgba(255, 255, 255, .15); transition: background .15s, transform .15s; }
:root[data-theme="dark"] .btn-primary { background: #5b50ec; }
.btn-primary:hover { background: #4338ca; }
.btn-primary .icon { width: 15px; height: 15px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); flex: none; transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--text); background: var(--bg-hover); }
.icon-btn .icon { width: 18px; height: 18px; }
.menu-toggle, .search-mobile { display: none; }
.theme-toggle .icon-moon, :root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.tabs-bar { max-width: 92rem; margin: 0 auto; padding: 0 24px; }
.tabs-row { display: flex; gap: 28px; height: var(--tabs-h); overflow-x: auto; scrollbar-width: none; }
.tabs-row::-webkit-scrollbar { display: none; }
.doc-tab { position: relative; display: flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .15s; }
.doc-tab:hover { color: var(--text); }
.doc-tab.active { color: var(--text); font-weight: 600; }
.doc-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

/* ---------- Layout ---------- */
.layout { max-width: 92rem; margin: 0 auto; display: grid; grid-template-columns: 18rem minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--top); height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); overflow-y: auto; padding: 24px 16px 48px 24px; scrollbar-width: thin; scrollbar-color: transparent transparent; view-transition-name: sidebar; }
.sidebar:hover, .sidebar:focus-within { scrollbar-color: var(--line-strong) transparent; }
.anchors { list-style: none; margin: 0 0 20px; padding: 0; }
.anchor-link { display: flex; align-items: center; gap: 12px; padding: 5px 8px; font-size: 14px; font-weight: 500; color: var(--text-2); border-radius: 10px; transition: color .15s; }
.anchor-link:hover { color: var(--text); }
.anchor-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); background: var(--bg-elevated); transition: color .15s, border-color .15s; }
.anchor-link:hover .anchor-icon { color: var(--accent); border-color: var(--accent-line); }
.anchor-icon .icon { width: 14px; height: 14px; }
.nav-group { margin-bottom: 22px; }
.nav-group-title { margin: 0 0 6px; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a { display: flex; align-items: flex-start; gap: 8px; padding: 6px 10px; margin: 1px 0; font-size: 14px; line-height: 1.45; color: var(--text-2); border-radius: 10px; transition: color .12s, background .12s; }
.nav-group a:hover { color: var(--text); background: var(--bg-hover); }
.nav-group a.active { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.nav-method { flex: none; min-width: 36px; margin-top: 2px; font: 700 10px/16px var(--mono); letter-spacing: .02em; text-align: left; }
.sidebar-backdrop { display: none; }

.main { min-width: 0; }
.page { display: grid; grid-template-columns: minmax(0, 46rem) 15rem; justify-content: center; gap: 56px; padding: 40px 40px 64px; }
.article { min-width: 0; }

/* ---------- Page header ---------- */
.eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
h1 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -.022em; color: var(--text); text-wrap: balance; }
.lead { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.page-actions { position: relative; display: flex; flex: none; margin-top: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-elevated); }
.copy-page, .copy-page-more { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--text-2); transition: color .15s, background .15s; }
.copy-page { border-radius: 11px 0 0 11px; }
.copy-page-more { padding: 0 9px; border-left: 1px solid var(--line-strong); border-radius: 0 11px 11px 0; }
.copy-page:hover, .copy-page-more:hover { color: var(--text); background: var(--bg-hover); }
.icon-done { display: none; color: #16a34a; }
.done > .icon { display: none; }
.done > .icon-done { display: block; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 290px; padding: 6px; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.menu[hidden] { display: none; }
.menu-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 9px 10px; text-align: left; border-radius: 10px; color: var(--text); }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-hover); outline: none; }
.menu-item > .icon { margin-top: 3px; color: var(--muted); }
.menu-item span { display: flex; flex-direction: column; flex: 1; }
.menu-item b { font-size: 14px; font-weight: 500; }
.menu-item small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.menu-item .icon-ext { width: 14px; height: 14px; margin-top: 4px; color: var(--muted); }

/* ---------- Prose ---------- */
.prose { margin-top: 32px; color: var(--text-2); font-size: 16px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 20px; text-wrap: pretty; }
.prose strong { color: var(--text); font-weight: 600; }
.prose h2, .prose h3, .prose h4 { position: relative; color: var(--text); letter-spacing: -.012em; scroll-margin-top: calc(var(--top) + 24px); text-wrap: balance; }
.prose h2 { margin: 48px 0 16px; font-size: 24px; line-height: 1.35; font-weight: 650; }
.prose h3 { margin: 36px 0 12px; font-size: 19px; line-height: 1.4; font-weight: 600; }
.prose h4 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; }
.prose .anchor { position: absolute; left: -36px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg-elevated); color: var(--muted); opacity: 0; transition: opacity .15s, color .15s; }
.prose .anchor .icon { width: 13px; height: 13px; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose .anchor:hover { color: var(--accent); }
.prose a:not(.card-title):not(.anchor):not(.endpoint-row) { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .15s, color .15s; }
.prose a:not(.card-title):not(.anchor):not(.endpoint-row):hover { color: var(--accent-text); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin: 6px 0; padding-left: 4px; }
.prose li::marker { color: var(--muted); }
.prose ol > li::marker { font-weight: 600; font-size: .92em; }
.prose li > p { margin: 0 0 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose blockquote { margin: 0 0 20px; padding: 2px 0 2px 18px; border-left: 3px solid var(--accent-line); color: var(--text-2); }
.prose img { border-radius: 12px; border: 1px solid var(--line); }
.prose :not(pre) > code { font: 500 .875em/1.5 var(--mono); color: var(--text); background: var(--code-inline-bg); border: 1px solid var(--line); border-radius: 6px; padding: .12em .38em; overflow-wrap: anywhere; }
.prose a code { color: inherit; }
.table-wrap { margin: 0 0 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.prose th { text-align: left; font-weight: 600; color: var(--text); background: var(--bg-soft); }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td code { white-space: nowrap; }

/* ---------- Code ---------- */
.code-block { position: relative; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-head { display: flex; align-items: center; height: 40px; padding: 0 48px 0 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--text-2); }
.code-block pre { margin: 0; padding: 14px 18px; overflow-x: auto; font: 13.5px/1.7 var(--mono); color: var(--code-text); tab-size: 2; scrollbar-width: thin; }
.code-block code { font: inherit; background: none; border: 0; padding: 0; }
.copy-code { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); background: var(--code-bg); opacity: 0; transition: opacity .15s, color .15s, background .15s; }
.code-block:hover .copy-code, .copy-code:focus-visible, .copy-code.done { opacity: 1; }
.copy-code:hover { color: var(--text); background: var(--bg-hover); }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-doctag, .hljs-type { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-tag { color: var(--hl-string); }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: var(--hl-number); }
.hljs-title, .hljs-title.function_, .hljs-section { color: var(--hl-title); }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-selector-attr, .hljs-name { color: var(--hl-attr); }
.hljs-variable, .hljs-template-variable, .hljs-params, .hljs-subst { color: var(--hl-var); }
.hljs-meta, .hljs-deletion { color: var(--hl-meta); }

/* ---------- Components ---------- */
.card-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 28px; }
.card-group.cols-1 { grid-template-columns: 1fr; }
.card-group.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-group.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elevated); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-group > .card { margin: 0; }
.card:not(.card-group > .card) { margin: 0 0 20px; }
.card-link:hover { border-color: var(--accent-line); box-shadow: 0 6px 24px -10px rgba(81, 70, 229, .25); }
.card-icon { color: var(--accent); margin-bottom: 14px; }
.card-icon .icon { width: 22px; height: 22px; stroke-width: 1.75; }
.card-title { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.45; color: var(--text); }
.card-link .card-title::after { content: ''; position: absolute; inset: 0; border-radius: 16px; }
.card-body { margin-top: 6px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.card-body > :last-child { margin-bottom: 0; }
.card-body p { margin: 0 0 8px; }

.steps { margin: 0 0 28px; counter-reset: step; }
.step { position: relative; padding: 0 0 26px 48px; counter-increment: step; }
.step::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line-strong); color: var(--text); font-size: 13px; font-weight: 600; }
.step::after { content: ''; position: absolute; left: 13.5px; top: 36px; bottom: 6px; width: 1px; background: var(--line-strong); }
.step:last-child { padding-bottom: 4px; }
.step:last-child::after { display: none; }
.step-title { padding-top: 2px; margin-bottom: 6px; font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.5; }
.step-body > :last-child { margin-bottom: 0; }

.tabs { margin: 0 0 28px; }
.tab-list { display: flex; gap: 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab-list button { position: relative; padding: 8px 0 10px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .15s; }
.tab-list button:hover { color: var(--text); }
.tab-list button[aria-selected="true"] { color: var(--accent-text); font-weight: 600; }
.tab-list button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tabs > .tab-panel:not(.active) { display: none; }
.tabs:not(.ready) > .tab-panel:first-of-type { display: block; }
.code-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-group > .tab-list { margin: 0; padding: 0 16px; gap: 18px; }
.code-group > .tab-list button { padding: 10px 0 11px; font-size: 13px; }
.code-group > .code-block { margin: 0; border: 0; border-radius: 0; }

.callout { display: flex; gap: 12px; margin: 0 0 24px; padding: 14px 18px; border: 1px solid; border-radius: var(--radius); font-size: 15px; line-height: 1.65; }
.callout-icon { flex: none; padding-top: 3px; }
.callout-body { min-width: 0; color: var(--text); }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p { margin: 0 0 10px; }
.callout-note { background: #eff6ff; border-color: #cfe1fd; color: #1d4ed8; }
.callout-info { background: var(--bg-soft); border-color: var(--line-strong); color: var(--muted); }
.callout-tip, .callout-check { background: #ecfdf5; border-color: #b7ecd6; color: #047857; }
.callout-warning { background: #fffbeb; border-color: #fbe3a3; color: #b45309; }
.callout-danger { background: #fef2f2; border-color: #fbcfcf; color: #b91c1c; }
:root[data-theme="dark"] .callout-note { background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .3); color: #7fb0ff; }
:root[data-theme="dark"] .callout-tip, :root[data-theme="dark"] .callout-check { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); color: #5ee0b0; }
:root[data-theme="dark"] .callout-warning { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); color: #fbbf5a; }
:root[data-theme="dark"] .callout-danger { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .3); color: #fb8a8a; }

.accordion-group { margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.accordion { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.accordion-group > .accordion { margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.accordion-group > .accordion:last-child { border-bottom: 0; }
.accordion summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 600; color: var(--text); cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.accordion[open] > summary::before { transform: rotate(45deg); }
.accordion-body { padding: 0 18px 14px 35px; }
.accordion-body > :last-child { margin-bottom: 0; }
.frame { margin: 0 0 24px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-soft); }
.frame img { border-radius: 12px; }
.frame figcaption { padding: 8px 4px 2px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- TOC ---------- */
.toc { position: sticky; top: calc(var(--top) + 40px); align-self: start; max-height: calc(100vh - var(--top) - 64px); overflow-y: auto; font-size: 13.5px; scrollbar-width: none; }
.toc-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 600; color: var(--text); }
.toc-title .icon { width: 15px; height: 15px; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0; line-height: 1.45; color: var(--muted); transition: color .12s; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent-text); font-weight: 600; }
.toc .toc-depth-3 a { padding-left: 14px; }

/* ---------- Pager & footer ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.pager a:hover { border-color: var(--accent-line); }
.pager-next { text-align: right; align-items: flex-end; }
.pager-label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.pager-label .icon { width: 14px; height: 14px; }
.pager-title { font-weight: 600; color: var(--text); }
.page-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.feedback .icon { color: var(--accent); }
.feedback a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 4px; }
.feedback a:hover { color: var(--accent-text); text-decoration-color: var(--accent); }
.footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; }
.footer-links a:hover { color: var(--text); }

/* ---------- API reference ---------- */
.page-api .page { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); max-width: 84rem; margin: 0 auto; gap: 48px; }
.endpoint { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 8px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); }
.prose .endpoint-path { flex: 1; min-width: 0; font: 500 14px/1.4 var(--mono); color: var(--text); overflow-wrap: anywhere; background: none; border: 0; padding: 0; }
.copy-endpoint { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); }
.copy-endpoint:hover { color: var(--text); background: var(--bg-hover); }
.method { flex: none; padding: 3px 8px; border-radius: 8px; font: 700 12px/1.4 var(--mono); letter-spacing: .02em; }
.method-get { color: #047857; background: #d1fae5; }
.method-post { color: #1d4ed8; background: #dbeafe; }
.method-delete { color: #b91c1c; background: #fee2e2; }
.method-put, .method-patch { color: #b45309; background: #fef3c7; }
.nav-method.method-get, .nav-method.method-post, .nav-method.method-delete, .nav-method.method-put, .nav-method.method-patch { background: none; }
:root[data-theme="dark"] .method-get { color: #6ee7b7; background: rgba(16, 185, 129, .15); }
:root[data-theme="dark"] .method-post { color: #93c5fd; background: rgba(59, 130, 246, .15); }
:root[data-theme="dark"] .method-delete { color: #fca5a5; background: rgba(239, 68, 68, .15); }
:root[data-theme="dark"] .method-put, :root[data-theme="dark"] .method-patch { color: #fcd34d; background: rgba(245, 158, 11, .15); }
.op-desc { margin-bottom: 8px; }
.schema-desc { margin-bottom: 8px; font-size: 15px; }
.schema-type { margin: 0 0 8px !important; font-size: 14px; color: var(--muted); }
.field { padding: 14px 0; border-bottom: 1px solid var(--line); }
.field-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.prose .field-name { font: 600 14px/1.5 var(--mono); color: var(--accent-text); background: none; border: 0; padding: 0; }
.field-type { font: 500 12.5px/1.5 var(--mono); color: var(--muted); }
.field-required { font-size: 12px; font-weight: 600; color: #dc2626; }
:root[data-theme="dark"] .field-required { color: #f87171; }
.field-meta { font-size: 12.5px; color: var(--muted); }
.field-meta code { font-size: 12px !important; }
.field-desc { margin-top: 6px; font-size: 14.5px; line-height: 1.65; }
.field-desc p { margin: 0 0 6px; }
.field-desc > :last-child { margin-bottom: 0; }
.field-enum { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.field-children { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; }
.field-children > summary { padding: 7px 12px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; list-style: none; }
.field-children > summary::-webkit-details-marker { display: none; }
.field-children > summary::before { content: '+ '; color: var(--accent); font-weight: 700; }
.field-children[open] > summary { border-bottom: 1px solid var(--line); }
.field-children[open] > summary::before { content: '− '; }
.field-children > .field, .field-children > .variants { margin: 0 14px; }
.field-children > .field:last-child { border-bottom: 0; }
.variants { margin: 12px 0; }
.variants-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.variant { padding: 4px 14px; margin-bottom: 10px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.variant-title { padding: 8px 0 2px; font-size: 14px; font-weight: 600; color: var(--text); }
.variant > .field:last-child { border-bottom: 0; }
.response { margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.response > summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; font-size: 14.5px; color: var(--text); }
.response > summary::-webkit-details-marker { display: none; }
.response[open] > summary { border-bottom: 1px solid var(--line); }
.response-body { padding: 12px 16px 4px; }
.status { flex: none; padding: 2px 8px; border-radius: 7px; font: 700 12px/1.5 var(--mono); }
.status-ok { color: #047857; background: #d1fae5; }
.status-info { color: #1d4ed8; background: #dbeafe; }
.status-error { color: #b91c1c; background: #fee2e2; }
:root[data-theme="dark"] .status-ok { color: #6ee7b7; background: rgba(16, 185, 129, .15); }
:root[data-theme="dark"] .status-info { color: #93c5fd; background: rgba(59, 130, 246, .15); }
:root[data-theme="dark"] .status-error { color: #fca5a5; background: rgba(239, 68, 68, .15); }
.endpoint-list { margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.endpoint-row { display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; transition: background .12s; }
.endpoint-row:last-child { border-bottom: 0; }
.endpoint-row:hover { background: var(--bg-hover); }
.endpoint-row .method { justify-self: start; }
.endpoint-row code { font: 500 13px var(--mono); color: var(--text); overflow-wrap: anywhere; background: none !important; border: 0 !important; padding: 0 !important; }
.endpoint-row span:last-child { color: var(--text-2); }
.api-examples { position: sticky; top: calc(var(--top) + 32px); align-self: start; max-height: calc(100vh - var(--top) - 56px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; scrollbar-width: none; }
.api-example .code-group { margin: 0; background: #0f1015; border-color: #23242d; }
.api-example .tab-list { border-color: #23242d; }
.api-example .tab-list-title { align-self: center; margin-right: auto; font-size: 13px; font-weight: 600; color: #f3f3f6; }
.api-example .tab-list button { color: #9a9aa8; }
.api-example .tab-list button:hover { color: #fff; }
.api-example .tab-list button[aria-selected="true"] { color: #c4bfff; }
.api-example .tab-list button[aria-selected="true"]::after { background: #8b83ff; }
.api-example .code-block { background: #0f1015; --code-text: #e6edf3; --hl-keyword: #ff7b72; --hl-string: #a5d6ff; --hl-number: #79c0ff; --hl-title: #d2a8ff; --hl-comment: #8b949e; --hl-attr: #79c0ff; --hl-var: #ffa657; --hl-meta: #79c0ff; }
.api-example .code-block pre { max-height: 440px; font-size: 12.5px; }
.api-example .copy-code { background: #0f1015; color: #9a9aa8; }
.api-example .copy-code:hover { background: #1c1d25; color: #fff; }

/* ---------- Search ---------- */
.search-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(600px, calc(100vh - 120px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-dialog[open] { display: flex; }
.search-dialog::backdrop { background: rgba(10, 10, 20, .38); backdrop-filter: blur(3px); }
.search-box { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-input-row .icon { width: 18px; height: 18px; }
.search-input-row input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 400 16px var(--font); }
.search-input-row input::-webkit-search-cancel-button { display: none; }
.search-results { flex: 1; overflow-y: auto; padding: 8px; min-height: 80px; }
.search-empty { padding: 28px 16px; text-align: center; font-size: 14px; color: var(--muted); }
.search-group { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.search-item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); scroll-margin: 8px; }
.search-item .icon { margin-top: 3px; color: var(--muted); }
.search-item[aria-selected="true"] { background: var(--accent-soft); }
.search-item[aria-selected="true"] .icon { color: var(--accent); }
.search-item-text { min-width: 0; flex: 1; }
.search-item-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.search-item-title span { font-weight: 400; color: var(--muted); }
.search-item-snippet { margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-item mark { background: none; color: var(--accent-text); font-weight: 600; }
.search-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.search-foot kbd { margin-right: 4px; }

/* ---------- Page transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .14s; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .page { grid-template-columns: minmax(0, 46rem); }
  .toc { display: none; }
  .page-api .page { grid-template-columns: minmax(0, 1fr); max-width: 50rem; }
  .api-examples { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 1023px) {
  .top-link { display: none; }
  .search-trigger kbd { display: none; }
}
@media (max-width: 860px) {
  :root { --header-h: 58px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-toggle, .search-mobile { display: inline-grid; }
  .search-trigger, .top-links { display: none; }
  .topbar-row { gap: 4px; padding: 0 12px; }
  .logo { margin-right: auto; }
  .logo-svg { height: 26px; }
  .tabs-bar { padding: 0 16px; }
  .tabs-row { gap: 22px; }
  .sidebar { position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); height: auto; padding: 20px 16px 40px; background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-105%); transition: transform .22s ease; view-transition-name: none; }
  .menu-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(10, 10, 20, .4); }
  .menu-open { overflow: hidden; }
  .page { padding: 28px 16px 48px; }
  h1 { font-size: 27px; }
  .lead { font-size: 16.5px; }
  .title-row { flex-direction: column; gap: 12px; }
  .prose .anchor { display: none; }
  .card-group, .card-group.cols-3, .card-group.cols-4 { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .endpoint-row { grid-template-columns: 56px minmax(0, 1fr); }
  .endpoint-row span:last-child { grid-column: 2; }
  .search-dialog { margin-top: 16px; max-height: calc(100vh - 32px); }
  .search-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
@media print {
  .topbar, .sidebar, .toc, .pager, .page-actions, .page-footer, .copy-code { display: none !important; }
  .layout, .page { display: block; padding: 0; }
}
