:root {
  color-scheme: dark;
  --bg: #0a0a0a; --fg: #ededed; --muted: #7d7d7d; --soft: #a1a1a1; --line: #1f1f1f; --line-2: #2a2a2a;
  --code-bg: #111318; --code-fg: #e6edf3; --active-bg: #172b40; --active-fg: #d5ebff; --link: #ededed; --mint: #a7e9ce;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 "Inter", -apple-system, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; color: #000; padding: 8px 12px; }

.site-header { position: sticky; top: 0; z-index: 30; background: #0a0a0acc; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: 1328px; margin: 0 auto; height: 56px; padding: 0 24px; display: flex; align-items: center; gap: 12px; }
.mark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; letter-spacing: -.03em; font-size: 15px; margin-right: auto; }
.mark svg { width: 20px; height: 20px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { font-size: 13px; color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 6px; }
.nav a:hover { color: var(--fg); }
.nav a.on { background: #1a1a1a; color: var(--fg); }
.nav a.cta { background: #ededed; color: #0a0a0a; font-weight: 500; margin-left: 8px; border: 1px solid #ededed; }
.nav a.cta:hover { background: #fff; }
.menu { display: none; background: none; border: 1px solid var(--line-2); color: var(--fg); border-radius: 6px; width: 34px; height: 32px; cursor: pointer; }

.docs-layout { max-width: 1328px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 236px minmax(0, 1fr) 200px; gap: 48px; }
.docs-sidebar { position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px); overflow-y: auto; padding: 28px 12px 24px 0; }
.docs-nav__label { margin: 22px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.docs-nav__label:first-child { margin-top: 0; }
.docs-nav__list { list-style: none; margin: 0; padding: 0; }
.docs-nav__list a { display: block; padding: 5.6px 9.6px; font-size: 14px; line-height: 1.6; color: var(--muted); text-decoration: none; border-radius: 6px; }
.docs-nav__list a:hover { color: var(--fg); background: #141414; }
.docs-nav__list a[aria-current] { background: var(--active-bg); color: var(--active-fg); font-weight: 600; }

.docs-content { min-width: 0; padding: 36px 0 96px; max-width: 800px; }
.docs-meta { font-size: 13px; color: var(--soft); margin: 0 0 28px; }
.docs-meta a { color: var(--fg); text-underline-offset: 3px; }
.docs-content h1 { font-size: 48px; line-height: 1.15; font-weight: 700; letter-spacing: -.035em; margin: 0 0 28px; }
.docs-content h2 { font-size: 25.6px; line-height: 1.6; font-weight: 700; letter-spacing: -.02em; margin: 52px 0 14px; }
.docs-content h3 { font-size: 19px; font-weight: 600; margin: 36px 0 10px; }
.docs-content .anchor { margin-left: 8px; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.docs-content h2:hover .anchor, .docs-content h3:hover .anchor { opacity: 1; }
.docs-content p, .docs-content li { font-size: 16.32px; line-height: 1.75; }
.docs-content p { margin: 0 0 18px; }
.docs-content ul, .docs-content ol { padding-left: 22px; margin: 0 0 18px; }
.docs-content li { margin: 4px 0; }
.docs-content a { color: var(--link); text-decoration: underline; text-decoration-color: #555; text-underline-offset: 3px; }
.docs-content a:hover { text-decoration-color: var(--fg); }
.docs-content :not(pre) > code { font-family: var(--mono); font-size: .88em; padding: 1px 5px; border-radius: 5px; background: #161616; border: 1px solid var(--line-2); }
.docs-content strong { font-weight: 600; }

.code { margin: 20px 0 22px; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--code-bg); }
.code__bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 8px 16px; border-bottom: 1px solid #1c2027; font-size: 11px; color: var(--muted); }
.copy { font: inherit; color: var(--muted); background: none; border: 1px solid #262b33; border-radius: 5px; padding: 3px 8px; cursor: pointer; }
.copy:hover { color: var(--fg); border-color: #3a404a; }
.code pre { margin: 0; padding: 17.6px 20px; overflow-x: auto; }
.code code { font: 14.4px/1.7 var(--mono); color: var(--code-fg); }

.table { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--line-2); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: #111; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

.note { margin: 22px 0; padding: 14px 18px; border: 1px solid #2c3a33; border-left: 3px solid var(--mint); border-radius: 8px; background: #0f1513; }
.note p { margin: 0; font-size: 15px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 8px; text-decoration: none; font-weight: 500; }
.pager a:hover { border-color: #444; }
.pager a span { font-size: 12px; color: var(--muted); font-weight: 400; }
.pager .next { grid-column: 2; text-align: right; }

.docs-toc { position: sticky; top: 56px; align-self: start; padding: 40px 0; font-size: 13px; }
.docs-toc p { margin: 0 0 10px; font-weight: 600; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.docs-toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; color: var(--muted); text-decoration: none; border-left: 1px solid transparent; }
.docs-toc a:hover { color: var(--fg); }
.docs-toc a.on { color: var(--fg); border-left-color: var(--mint); }

@media (max-width: 1180px) { .docs-layout { grid-template-columns: 236px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 820px) {
  .menu { display: block; }
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding: 0 16px; }
  .docs-sidebar { position: fixed; inset: 56px 0 0 0; z-index: 20; background: var(--bg); padding: 20px 16px; display: none; height: auto; }
  .nav-open .docs-sidebar { display: block; }
  .docs-content { padding-top: 24px; }
  .docs-content h1 { font-size: 34px; }
  .docs-content h2 { font-size: 22px; margin-top: 40px; }
  .nav a:not(.cta):not(.on) { display: none; }
  .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; }
}
@media (max-width: 420px) {
  .site-header__inner { padding: 0 12px; gap: 8px; }
  .nav a.on { display: none; }
  .nav a.cta { margin-left: 0; }
  .docs-content h1 { font-size: 30px; }
}
