:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e7e9ef;
  background: #0b0d12;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #0b0d12;
  --panel: #10131a;
  --panel-raised: #141821;
  --line: #222733;
  --muted: #9299a8;
  --text: #e7e9ef;
  --accent: #ffb91f;
  --accent-soft: rgba(255, 185, 31, .1);
  --sidebar-width: 272px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); }
a { color: inherit; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: -50px; left: 16px; padding: 10px 14px; background: var(--accent); color: #171717; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.docs-shell { min-height: 100vh; }
.topbar { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width); align-items: center; height: 64px; padding: 0 28px; background: rgba(11, 13, 18, .9); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; width: 29px; height: 29px; place-items: center; color: #171717; background: var(--accent); border-radius: 9px; font-size: 17px; font-weight: 900; }
.brand-name { font-size: 15px; font-weight: 750; letter-spacing: -.035em; }
.brand-name span { color: var(--accent); }
.topbar-label { justify-self: center; color: #aeb4c1; font-size: 12px; font-weight: 600; }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.back-link { color: #c8cbd3; font-size: 12px; text-decoration: none; }
.back-link:hover, .docs-footer a:hover { color: var(--accent); }
.back-link span { margin-left: 3px; color: var(--accent); }
.mobile-menu-button { display: none; color: var(--text); background: var(--panel-raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.docs-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; background: #0e1016; border-right: 1px solid var(--line); }
.sidebar-inner { display: flex; flex-direction: column; min-height: 100%; padding: 24px 15px 16px; }
.search-label { margin: 0 0 8px 7px; color: #8d94a3; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.search-box { display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 0 9px; background: #13161e; border: 1px solid #292e39; border-radius: 8px; }
.search-box:focus-within { border-color: #8b671f; box-shadow: 0 0 0 3px rgba(255, 185, 31, .08); }
.search-icon { color: var(--muted); font-size: 21px; line-height: 1; transform: rotate(-20deg); }
.search-box input { min-width: 0; width: 100%; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 12px; }
.search-box input::placeholder { color: #767d8b; }
.search-box kbd { flex: 0 0 auto; padding: 3px 5px; color: #858c9a; background: #1d222c; border: 1px solid #303643; border-radius: 4px; font-size: 9px; }
.sidebar-nav { margin-top: 24px; }
.nav-group + .nav-group { margin-top: 23px; }
.nav-group-title { margin: 0 0 8px 9px; color: #7e8593; font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 2px 0; padding: 7px 9px; color: #aab0bd; border: 1px solid transparent; border-radius: 7px; font-size: 12px; line-height: 1.4; text-decoration: none; transition: color .15s, background .15s, border-color .15s; }
.nav-item:hover { color: #f3f4f6; background: #171b24; }
.nav-item.active { color: var(--accent); background: var(--accent-soft); border-color: rgba(255, 185, 31, .13); font-weight: 650; }
.nav-item-icon { display: grid; width: 19px; flex: 0 0 19px; place-items: center; color: #818898; font-size: 12px; }
.nav-item.active .nav-item-icon { color: var(--accent); }
.sidebar-help { display: flex; gap: 10px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.help-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 5px; background: #5fd19a; border-radius: 50%; box-shadow: 0 0 12px rgba(95, 209, 154, .5); }
.sidebar-help strong { display: block; color: #c7cbd3; font-size: 10px; font-weight: 600; }
.sidebar-help a { display: inline-block; margin-top: 5px; color: var(--accent); font-size: 10px; text-decoration: none; }
.search-results { position: absolute; z-index: 4; top: 111px; left: 15px; width: calc(var(--sidebar-width) - 30px); max-height: min(55vh, 440px); overflow-y: auto; padding: 6px; background: #151922; border: 1px solid #303644; border-radius: 9px; box-shadow: 0 18px 50px #0009; }
.search-result { display: block; width: 100%; padding: 9px; color: var(--text); text-align: left; background: transparent; border: 0; border-radius: 6px; cursor: pointer; }
.search-result:hover { background: #202530; }
.search-result strong { display: block; font-size: 11px; }
.search-result span { display: block; margin-top: 3px; color: #9299a8; font-size: 10px; line-height: 1.45; }
.search-empty { padding: 12px 9px; color: var(--muted); font-size: 11px; }
.main-panel { min-width: 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 170px; justify-content: center; gap: 50px; min-height: calc(100vh - 122px); padding: 47px 48px 56px; }
.article { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 27px; color: #7e8593; font-size: 11px; }
.breadcrumbs a { color: #9ea5b2; text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumb-separator { color: #535966; }
.article-kicker { margin-bottom: 12px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.article-heading h1 { margin: 0; color: #f3f4f7; font-size: clamp(30px, 4vw, 40px); font-weight: 750; letter-spacing: -.045em; line-height: 1.12; }
.article-lead { max-width: 690px; margin: 16px 0 0; color: #a9afbb; font-size: 15px; line-height: 1.75; }
.article-content { margin-top: 32px; color: #c7cbd4; font-size: 14px; line-height: 1.8; }
.article-content h2 { scroll-margin-top: 88px; margin: 38px 0 12px; padding-bottom: 9px; color: #f0f1f4; border-bottom: 1px solid var(--line); font-size: 21px; letter-spacing: -.025em; line-height: 1.35; }
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { scroll-margin-top: 88px; margin: 24px 0 9px; color: #e5e7ec; font-size: 16px; }
.article-content p { margin: 11px 0; }
.article-content ul, .article-content ol { padding-left: 22px; }
.article-content li { margin: 6px 0; padding-left: 3px; }
.article-content a { color: var(--accent); text-decoration-color: rgba(255, 185, 31, .4); text-underline-offset: 3px; }
.article-content strong { color: #e9ebef; font-weight: 650; }
.article-content code { padding: 2px 5px; color: #f5c968; background: #1a1d25; border: 1px solid #292e37; border-radius: 4px; font-family: "Cascadia Code", Consolas, monospace; font-size: .88em; }
.article-content .callout { margin: 18px 0; padding: 13px 15px; color: #c5cbd5; background: rgba(255, 185, 31, .055); border: 1px solid rgba(255, 185, 31, .2); border-left: 3px solid var(--accent); border-radius: 8px; }
.article-content .callout strong { color: #f3cd78; }
.article-content .step-list { display: grid; gap: 10px; margin: 17px 0; padding: 0; list-style: none; counter-reset: step; }
.article-content .step-list li { position: relative; min-height: 48px; margin: 0; padding: 12px 14px 12px 48px; background: #11141b; border: 1px solid #222733; border-radius: 9px; counter-increment: step; }
.article-content .step-list li::before { position: absolute; top: 12px; left: 14px; display: grid; width: 22px; height: 22px; place-items: center; color: #171717; background: var(--accent); border-radius: 7px; content: counter(step); font-size: 11px; font-weight: 800; }
.toc { position: sticky; top: 105px; align-self: start; max-height: calc(100vh - 130px); overflow-y: auto; padding-left: 15px; border-left: 1px solid var(--line); }
.toc-title { margin: 2px 0 12px; color: #c7cbd3; font-size: 11px; font-weight: 700; }
.toc nav { display: grid; gap: 7px; }
.toc a { color: #858c99; border-left: 1px solid transparent; font-size: 10px; line-height: 1.5; text-decoration: none; }
.toc a.level-3 { padding-left: 11px; font-size: 9px; }
.toc a:hover, .toc a.active { color: var(--accent); }
.article-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pagination-link { min-height: 70px; padding: 12px 14px; background: #11141b; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; }
.pagination-link:hover { border-color: #6b5324; }
.pagination-link.next { text-align: right; }
.pagination-label { display: block; color: #858c99; font-size: 9px; }
.pagination-title { display: block; margin-top: 6px; color: #e0e3e9; font-size: 11px; font-weight: 650; }
.docs-footer { display: flex; justify-content: center; gap: 21px; padding: 18px 24px 24px; color: #737a88; border-top: 1px solid var(--line); font-size: 10px; }
.docs-footer a { color: #9ba2af; text-decoration: none; }
.sidebar-backdrop { display: none; }
.not-found { padding: 30px; color: var(--muted); background: #11141b; border: 1px solid var(--line); border-radius: 10px; }

@media (max-width: 1150px) {
  .article-layout { grid-template-columns: minmax(0, 760px); max-width: 870px; margin: 0 auto; padding-right: 38px; padding-left: 38px; }
  .toc { display: none; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 280px; }
  .topbar { grid-template-columns: 1fr auto; height: 58px; padding: 0 16px; }
  .topbar-label { display: none; }
  .back-link { font-size: 11px; }
  .mobile-menu-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; }
  .docs-layout { display: block; min-height: calc(100vh - 58px); }
  .sidebar { position: fixed; z-index: 12; top: 58px; bottom: 0; left: 0; width: min(var(--sidebar-width), calc(100vw - 48px)); height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 14px 0 44px #0008; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 11; inset: 58px 0 0; display: block; background: rgba(0, 0, 0, .58); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.menu-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .article-layout { min-height: calc(100vh - 120px); padding: 28px 22px 42px; }
  .breadcrumbs { margin-bottom: 22px; }
  .article-heading h1 { font-size: clamp(29px, 9vw, 37px); }
  .article-lead { font-size: 14px; }
  .article-content { font-size: 13px; }
  .article-content h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
