:root {
  --bg: #0c0e0e;
  --panel: #111413;
  --panel-2: #151917;
  --ink: #ffffff;
  --muted: #a0a29f;
  --muted-2: #6f726f;
  --line: rgba(255,255,255,.09);
  --line-soft: rgba(255,255,255,.06);
  --accent: #4f6bff;
  --accent-soft: #a3b2ff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body { color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(79,107,255,.35); }

/* top bar: 64px, then a 48px tab row, like the reference shell */
.doc-top { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 64px; display: flex; align-items: center; gap: 24px; padding: 0 24px; background: rgba(12,14,14,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.doc-brand { display: flex; align-items: center; gap: 9px; }
.doc-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #fff; color: #0c0e0e; font-size: 12px; font-weight: 700; }
.doc-brand b { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.doc-brand span.doc-split { color: var(--muted-2); font-size: 14.5px; }
.doc-search { position: relative; width: 320px; margin-left: 8px; }
.doc-search button { width: 100%; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); color: var(--muted); font-size: 13px; cursor: text; }
.doc-search button svg { width: 14px; height: 14px; }
.doc-search kbd { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.doc-top-links { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 13.5px; color: var(--muted); }
.doc-top-links a:hover { color: #fff; }
.doc-cta { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 7px; background: var(--accent); color: #fff !important; font-size: 13px; font-weight: 550; }

.doc-tabs { position: fixed; top: 64px; left: 0; right: 0; z-index: 55; height: 48px; display: flex; align-items: center; gap: 22px; padding: 0 24px; background: rgba(12,14,14,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.doc-tabs a { font-size: 13.5px; color: var(--muted); height: 48px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.doc-tabs a.is-on { color: #fff; border-bottom-color: var(--accent-soft); }
.doc-tabs .doc-tabs-right { margin-left: auto; display: flex; gap: 16px; }

/* shell: 288 rail, content 864, toc 200 */
.doc-shell { display: grid; grid-template-columns: 288px minmax(0, 864px) 200px; gap: 0; max-width: 1425px; margin: 0 auto; padding: 0 32px; }
.doc-side { position: sticky; top: 112px; height: calc(100vh - 112px); overflow: auto; padding: 28px 0 60px; }
.doc-group { margin-bottom: 22px; }
.doc-group > p { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--muted-2); }
.doc-link { display: block; padding: 5px 0 5px 12px; margin-left: -12px; border-left: 1px solid transparent; font-size: 14px; color: var(--muted); border-radius: 0 6px 6px 0; }
.doc-link:hover { color: #fff; background: rgba(255,255,255,.03); }
.doc-link.is-active { color: var(--accent-soft); border-left-color: var(--accent-soft); background: rgba(79,107,255,.06); }

.doc-main { padding: 40px 40px 100px; min-width: 0; }
.doc-crumb { display: flex; gap: 8px; font-size: 13px; color: var(--muted-2); margin-bottom: 14px; }
.doc-crumb a:hover { color: #fff; }

.doc-article h1 { margin: 0; font-size: 36px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.doc-lede { margin: 12px 0 30px; font-size: 17px; color: var(--muted); }
.doc-body { font-size: 16px; color: #d6d8d5; }
.doc-body h2 { margin: 40px 0 12px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: #fff; scroll-margin-top: 130px; }
.doc-body h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 600; color: #fff; }
.doc-body p { margin: 0 0 16px; }
.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 22px; }
.doc-body li { margin-bottom: 8px; }
.doc-body b { color: #fff; font-weight: 600; }
.doc-body a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 2px; }
.doc-body code { font-family: var(--mono); font-size: 13.5px; background: rgba(255,255,255,.06); border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 5px; color: #fff; }
.doc-body pre { margin: 0 0 20px; padding: 16px 18px; background: #080a09; border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.doc-body pre code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.7; color: #d6d8d5; }
.callout { margin: 20px 0; padding: 13px 16px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: rgba(79,107,255,.06); font-size: 15px; color: #d6d8d5; }
.callout.warn { border-left-color: #f0b45f; background: rgba(240,180,95,.06); }

.doc-toc { position: sticky; top: 112px; padding: 44px 0 44px 32px; font-size: 13px; height: fit-content; }
.doc-toc p { margin: 0 0 10px; font-size: 12px; color: var(--muted-2); }
.doc-toc a { display: block; padding: 4px 0; color: var(--muted); }
.doc-toc a:hover { color: #fff; }

.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.doc-pager a { border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; background: var(--panel); }
.doc-pager a:hover { border-color: rgba(163,178,255,.4); }
.doc-pager small { display: block; font-size: 11.5px; color: var(--muted-2); margin-bottom: 3px; }
.doc-pager b { font-size: 14px; font-weight: 550; color: #fff; }
.doc-next { text-align: right; }

.doc-helpful { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.doc-helpful button { height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.doc-helpful button:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.doc-helpful .doc-thanks { color: var(--accent-soft); font-size: 13px; }

/* landing: image-led cards, 2 columns */
.doc-hero { padding: 12px 0 8px; }
.doc-eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 500; color: var(--muted-2); }
.doc-hero h1 { margin: 0; font-size: 38px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.doc-hero p.doc-hero-sub { margin: 14px 0 0; font-size: 17px; color: var(--muted); max-width: 62ch; }
.doc-hero-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 0 8px; }
.doc-hero-cards a { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; transition: border-color .18s ease, transform .18s ease; }
.doc-hero-cards a:hover { border-color: rgba(163,178,255,.45); transform: translateY(-1px); }
.doc-card-art { height: 132px; display: grid; place-items: center; background: radial-gradient(120% 130% at 20% 0%, rgba(79,107,255,.28), transparent 60%), #0a0c0b; border-bottom: 1px solid var(--line-soft); }
.doc-card-art svg { width: 46px; height: 46px; color: var(--accent-soft); opacity: .9; }
.doc-card-copy { padding: 14px 16px 16px; }
.doc-card-copy b { display: block; font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.doc-card-copy span { font-size: 13.5px; color: var(--muted); }

.doc-section-head { margin: 44px 0 12px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.doc-list { border-top: 1px solid var(--line-soft); }
.doc-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 13px 2px; border-bottom: 1px solid var(--line-soft); }
.doc-list a:hover b { color: var(--accent-soft); }
.doc-list b { font-size: 14.5px; font-weight: 550; color: #fff; }
.doc-list span { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }
.doc-list svg { width: 14px; height: 14px; color: var(--muted-2); align-self: center; }

.doc-foot { margin-top: 70px; padding: 26px 0 10px; border-top: 1px solid var(--line-soft); display: flex; gap: 24px; font-size: 12.5px; color: var(--muted-2); flex-wrap: wrap; }
.doc-foot a:hover { color: #fff; }

/* search dialog */
.doc-find { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(5,7,6,.55); backdrop-filter: blur(3px); }
.doc-find.is-open { display: block; }
.doc-find-box { width: min(620px, 92vw); margin: 96px auto 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.doc-find-box input { width: 100%; height: 48px; padding: 0 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: #fff; font-size: 15px; outline: none; }
.doc-find-list { max-height: 360px; overflow: auto; padding: 6px; }
.doc-find-list a { display: flex; align-items: baseline; gap: 10px; padding: 9px 10px; border-radius: 7px; }
.doc-find-list a:hover, .doc-find-list a.is-first { background: rgba(255,255,255,.05); }
.doc-find-list b { font-size: 13.5px; color: #fff; font-weight: 550; }
.doc-find-list span { margin-left: auto; font-size: 11.5px; color: var(--muted-2); }
.doc-find-none { padding: 16px; font-size: 13px; color: var(--muted); }

@media (max-width: 1200px) { .doc-shell { grid-template-columns: 260px minmax(0, 1fr); } .doc-toc { display: none; } }
@media (max-width: 900px) {
  .doc-shell { grid-template-columns: minmax(0, 1fr); padding: 0 20px; }
  .doc-side { display: none; }
  .doc-search { display: none; }
  .doc-main { padding-top: 28px; }
  .doc-hero h1 { font-size: 32px; }
  .doc-hero-cards { grid-template-columns: 1fr; }
}

/* scrollbars: thin, dark, ours */
html { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
body, .doc-side, .doc-body pre, .doc-find-list { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; border: 3px solid #0c0e0e; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); background-clip: padding-box; border: 2px solid #0c0e0e; }
::-webkit-scrollbar-corner { background: transparent; }
