/* Termless docs. Stands alone: the same tokens, type and calm as the dashboard ("the quiet desk": iOS dark
   #191919 surfaces, one emerald accent; `--accent` here is the text-safe shade, `--accent-fill` the brand), no
   dependency on its built CSS. Light and dark follow the dashboard's rule: data-theme on <html> wins,
   else the system. Fonts are self-hosted copies of the dashboard's Geist and Geist Mono (the CSP allows
   no other origin). */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/assets/docs-geist.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/assets/docs-geist-mono.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --bg: #f6f7f8; --surface: #ffffff; --field: #eef1f4; --field-strong: #e3e8ed;
  --ink: oklch(0.19 0.01 255); --muted: oklch(0.43 0.02 255); --faint: oklch(0.57 0.02 255); --rule: #e1e6eb; --rule-strong: #cad2db;
  --brand-mark: #12a160;
  --accent: #0a7a47; --accent-fill: #3ddc91; --accent-ink: #062b18; --accent-soft: color-mix(in oklch, #3ddc91 16%, transparent);
  --pos: oklch(0.52 0.15 140); --pos-soft: color-mix(in oklch, oklch(0.52 0.15 140) 12%, transparent);
  --neg: oklch(0.53 0.2 25); --neg-soft: color-mix(in oklch, oklch(0.53 0.2 25) 10%, transparent);
  --warn: oklch(0.56 0.14 70); --warn-soft: color-mix(in oklch, oklch(0.56 0.14 70) 12%, transparent);
  --buy: oklch(0.52 0.17 258); --buy-soft: color-mix(in oklch, oklch(0.52 0.17 258) 10%, transparent);
  --pill: oklch(0.19 0.01 255); --on-pill: #ffffff;
  --dim: oklch(0.16 0.02 255 / 0.34);
  --shadow-card: 0 0 0 1px var(--rule);
  --shadow-float: 0 18px 42px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--rule-strong);
  --code-bg: #f4f6f9; --code-head: #eceff3;
  --tk-s: #0b6e5a; --tk-k: #7a3e9d; --tk-n: #a85d00; --tk-w: #1d4ed8; --tk-m: #7a7a82; --tk-c: #b45309;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  --r-card: 14px; --r-field: 10px; --r-sm: 8px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --top-h: 56px; --side-w: 256px; --toc-w: 220px; --gutter: clamp(16px, 3vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #191919; --surface: #232323; --field: #2a2a2a; --field-strong: #303030;
    --ink: oklch(0.97 0 0); --muted: oklch(0.78 0 0); --faint: oklch(0.58 0 0); --rule: #2c2c2c; --rule-strong: #363636;
    --brand-mark: #56fca2;
    --accent: #56fca2; --accent-fill: #56fca2; --accent-ink: oklch(0.16 0 0); --accent-soft: color-mix(in oklch, #56fca2 15%, transparent);
    --pos: oklch(0.72 0.17 145); --pos-soft: color-mix(in oklch, oklch(0.72 0.17 145) 14%, transparent);
    --neg: oklch(0.68 0.2 25); --neg-soft: color-mix(in oklch, oklch(0.68 0.2 25) 14%, transparent);
    --warn: oklch(0.8 0.16 75); --warn-soft: color-mix(in oklch, oklch(0.8 0.16 75) 14%, transparent);
    --buy: oklch(0.7 0.15 255); --buy-soft: color-mix(in oklch, oklch(0.7 0.15 255) 15%, transparent);
    --pill: oklch(0.97 0 0); --on-pill: #191919;
    --dim: oklch(0 0 0 / 0.55);
    --shadow-card: inset 0 1px 0 oklch(1 0 0 / 0.03), 0 0 0 1px var(--rule);
    --shadow-float: 0 16px 32px oklch(0 0 0 / 0.32), 0 4px 8px oklch(0 0 0 / 0.16), 0 0 0 1px var(--rule-strong);
    --code-bg: #1a1a1a; --code-head: #222222;
    --tk-s: #7cfdb8; --tk-k: #c9a3e6; --tk-n: #ffb35c; --tk-w: #7ab8ff; --tk-m: #8a8a8a; --tk-c: #ffb35c;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #191919; --surface: #232323; --field: #2a2a2a; --field-strong: #303030;
  --ink: oklch(0.97 0 0); --muted: oklch(0.78 0 0); --faint: oklch(0.58 0 0); --rule: #2c2c2c; --rule-strong: #363636;
  --brand-mark: #56fca2;
  --accent: #56fca2; --accent-fill: #56fca2; --accent-ink: oklch(0.16 0 0); --accent-soft: color-mix(in oklch, #56fca2 15%, transparent);
  --pos: oklch(0.72 0.17 145); --pos-soft: color-mix(in oklch, oklch(0.72 0.17 145) 14%, transparent);
  --neg: oklch(0.68 0.2 25); --neg-soft: color-mix(in oklch, oklch(0.68 0.2 25) 14%, transparent);
  --warn: oklch(0.8 0.16 75); --warn-soft: color-mix(in oklch, oklch(0.8 0.16 75) 14%, transparent);
  --buy: oklch(0.7 0.15 255); --buy-soft: color-mix(in oklch, oklch(0.7 0.15 255) 15%, transparent);
  --pill: oklch(0.97 0 0); --on-pill: #191919;
  --dim: oklch(0 0 0 / 0.55);
  --shadow-card: inset 0 1px 0 oklch(1 0 0 / 0.03), 0 0 0 1px var(--rule);
  --shadow-float: 0 16px 32px oklch(0 0 0 / 0.32), 0 4px 8px oklch(0 0 0 / 0.16), 0 0 0 1px var(--rule-strong);
  --code-bg: #1a1a1a; --code-head: #222222;
  --tk-s: #7cfdb8; --tk-k: #c9a3e6; --tk-n: #ffb35c; --tk-w: #7ab8ff; --tk-m: #8a8a8a; --tk-c: #ffb35c;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 20px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
code, kbd, pre, var, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
var { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ico { display: inline-flex; width: 16px; height: 16px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.muted { color: var(--muted); font-weight: 400; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 12px; background: var(--pill); color: var(--on-pill); border-radius: 8px; }
.skip:focus { top: 12px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--top-h) minmax(0, 1fr); min-height: 100vh; }
.top { grid-column: 1 / -1; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: var(--top-h); padding: 0 var(--gutter) 0 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); width: calc(var(--side-w) - 16px); flex: none; }
.brand:hover { text-decoration: none; }
.mark { width: 30px; height: 30px; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mark svg { width: 100%; height: 100%; overflow: visible; }
.mark .lm-prompt { stroke: currentColor; } .mark .lm-brand { fill: var(--brand-mark); } .mark .lm-wick { stroke: var(--brand-mark); fill: none; }
.mark.boxed { border-radius: 22.5%; background: linear-gradient(180deg, #14171e, #0b0d11); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); overflow: hidden; }
.mark.boxed .lm-prompt { stroke: #ffffff; } .mark.boxed .lm-brand { fill: #56fca2; } .mark.boxed .lm-wick { stroke: #56fca2; }
.word { font-weight: 600; font-size: 16px; letter-spacing: -0.012em; line-height: 1.1; }
.word small { display: block; font-size: 11.5px; font-weight: 400; color: var(--faint); letter-spacing: 0; margin-top: 1px; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.icon-btn:hover { background: var(--field); color: var(--ink); }
.menu-btn { display: none; }
.top-links { display: flex; gap: 2px; margin-left: auto; }
.top-links a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 9px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.top-links a:hover { background: var(--field); color: var(--ink); text-decoration: none; }
.top-links a .ico { width: 14px; height: 14px; color: var(--faint); }
.theme { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--field); }
.theme button { width: 30px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background-color 140ms, color 140ms, transform 140ms var(--ease); }
.theme button:active { transform: scale(0.95); }
.theme button[aria-checked='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }

/* search (icon inside the field) */
.search { position: relative; width: min(420px, 100%); }
.search > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { width: 100%; height: 36px; padding: 0 44px 0 38px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-size: 13.5px; transition: border-color 120ms, box-shadow 120ms; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); height: 20px; padding: 0 6px; border-radius: 5px; background: var(--field); color: var(--muted); font-size: 11px; border: 1px solid var(--rule); display: inline-flex; align-items: center; pointer-events: none; }
.search-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: min(460px, 70vh); overflow-y: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-float); padding: 6px; }
.search-pop a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); min-width: 0; }
.search-pop a:hover, .search-pop a[aria-selected='true'] { background: var(--field); text-decoration: none; }
.search-pop .st { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 13.5px; }
.search-pop .st small { display: block; color: var(--faint); font-weight: 400; font-size: 12px; }
.search-pop .sk { font-size: 11.5px; color: var(--faint); flex: none; }
.search-pop .sr { font-family: var(--mono); font-size: 11.5px; color: var(--muted); flex: none; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-pop .none { padding: 18px 12px; text-align: center; color: var(--muted); font-size: 13.5px; }
.search-pop .none b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

/* sidebar */
.side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; border-right: 1px solid var(--rule); padding: 18px 12px 24px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.nav { display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 11.5px; color: var(--faint); font-weight: 500; padding: 0 10px 6px; }
.nav a { display: flex; align-items: center; min-height: 34px; padding: 6px 10px; border-radius: 9px; color: var(--muted); font-size: 13.5px; font-weight: 500; line-height: 1.3; transition: background-color 120ms, color 120ms; }
.nav a:hover { background: var(--field); color: var(--ink); text-decoration: none; }
.nav a[aria-current='page'] { background: var(--field); color: var(--ink); }
.nav .sub { display: flex; flex-direction: column; gap: 0; margin: 2px 0 6px; padding-left: 10px; }
.nav .sub a { min-height: 28px; padding: 3px 10px 3px 12px; font-size: 12.75px; font-weight: 400; color: var(--muted); border-left: 1px solid var(--rule); border-radius: 0 7px 7px 0; }
.nav .sub a:hover { color: var(--ink); background: transparent; border-left-color: var(--rule-strong); }
.nav .sub a.on { color: var(--ink); border-left-color: var(--ink); }
.nav .sub a .method { margin-right: 6px; font-size: 9.5px; min-width: 38px; height: 16px; }
.nav .sub a .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side-foot { margin-top: auto; padding: 14px 10px 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--faint); }
.side-foot .ver { font-family: var(--mono); }

/* main + toc */
.main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px var(--gutter) 64px; min-width: 0; align-items: start; }
.article { max-width: 760px; min-width: 0; margin: 0 auto; width: 100%; }
.toc { display: none; position: sticky; top: calc(var(--top-h) + 32px); max-height: calc(100vh - var(--top-h) - 64px); overflow-y: auto; width: var(--toc-w); font-size: 12.75px; }
.toc-label { font-size: 11.5px; color: var(--faint); font-weight: 500; margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); line-height: 1.4; }
.toc li.lvl3 a { padding-left: 24px; color: var(--faint); }
.toc li a:hover { color: var(--ink); text-decoration: none; }
.toc li a.on { color: var(--ink); border-left-color: var(--ink); }
@media (min-width: 1280px) {
  .main { grid-template-columns: minmax(0, 1fr) var(--toc-w); }
  .toc { display: block; }
}
body.ref .article { max-width: 1180px; }
@media (min-width: 1280px) and (max-width: 1539px) {
  body.ref .main { grid-template-columns: minmax(0, 1fr); }
  body.ref .toc { display: none; }
}

/* ---------- type ---------- */
.eyebrow { margin: 0 0 8px; font-size: 12.5px; font-weight: 500; color: var(--accent); }
h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.022em; }
.lead { margin: 0 0 28px; font-size: 17px; line-height: 1.55; color: var(--muted); }
h2 { margin: 44px 0 12px; font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.016em; padding-top: 4px; }
h3 { margin: 30px 0 8px; font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
h4 { margin: 26px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
h2 .anchor, h3 .anchor { margin-left: 8px; color: var(--faint); font-weight: 400; opacity: 0; transition: opacity 120ms; font-size: 0.85em; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
h2:target, h3:target, .op:target .op-head { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 4px 0; }
li > ul, li > ol { margin: 4px 0 0; }
strong { font-weight: 600; }
p code, li code, td code, .fdesc code, .callout code, .op-desc code, .edesc code { font-size: 0.88em; padding: 1.5px 5px; border-radius: 5px; background: var(--field); color: var(--ink); word-break: break-word; }
td code { white-space: nowrap; padding: 1px 4px; }
blockquote { margin: 0 0 16px; padding: 10px 16px; border-left: 2px solid var(--rule-strong); color: var(--muted); }
blockquote p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* tables */
.table-wrap { margin: 0 0 20px; border: 1px solid var(--rule); border-radius: var(--r-field); background: var(--surface); overflow-x: auto; box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; font-size: 13.75px; line-height: 1.5; }
th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead:empty { display: none; }
table.tight td, table.tight th { padding: 7px 14px; }
.table-wrap.routes td:nth-child(2) { max-width: 420px; }
.table-wrap.routes a { color: var(--ink); }
.table-wrap.routes a:hover code { color: var(--accent); }
.table-wrap.routes a code { background: transparent; padding: 0; font-size: 12.75px; }

/* callouts */
.callout { margin: 0 0 20px; padding: 14px 16px; border-radius: var(--r-field); background: var(--surface); border: 1px solid var(--rule); font-size: 14px; }
.callout.note { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.callout.tip { background: var(--pos-soft); border-color: color-mix(in srgb, var(--pos) 24%, transparent); }
.callout-title { font-weight: 600; margin: 0 0 4px; }
.callout.note .callout-title { color: var(--accent); } .callout.warn .callout-title { color: var(--warn); } .callout.tip .callout-title { color: var(--pos); }
.callout p:last-child { margin-bottom: 0; }

/* code */
.code { margin: 0 0 18px; border: 1px solid var(--rule); border-radius: var(--r-field); background: var(--code-bg); overflow: hidden; min-width: 0; }
.code-head { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 14px; background: var(--code-head); border-bottom: 1px solid var(--rule); }
.code-title { flex: 1; font-size: 12px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; transition: background-color 120ms, color 120ms; }
.copy:hover { background: var(--field-strong); color: var(--ink); }
.copy.done { color: var(--pos); }
.code pre { margin: 0; padding: 13px 16px; overflow-x: auto; font-size: 12.75px; line-height: 1.6; tab-size: 4; }
.code code { font-size: inherit; background: none; padding: 0; color: var(--ink); white-space: pre; }
.tk-s { color: var(--tk-s); } .tk-k { color: var(--tk-k); } .tk-n { color: var(--tk-n); } .tk-w { color: var(--tk-w); } .tk-m { color: var(--tk-m); font-style: italic; } .tk-c { color: var(--tk-c); }
.tabs { margin: 0 0 18px; }
.tabs-head { display: flex; gap: 2px; padding: 0 0 0 2px; }
.tabs-head button { height: 32px; padding: 0 12px; border-radius: 8px 8px 0 0; font-size: 12.75px; font-weight: 500; color: var(--muted); border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; position: relative; z-index: 1; transition: color 120ms, background-color 120ms; }
.tabs-head button:hover { color: var(--ink); }
.tabs-head button[aria-selected='true'] { background: var(--code-head); color: var(--ink); border-color: var(--rule); }
.tabs .code { display: none; border-top-left-radius: 0; margin-bottom: 0; }
.tabs .code.active { display: block; }
.tabs .code .code-title { visibility: hidden; }

/* chips */
.enum { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.enum code { font-size: 11.5px; padding: 1px 6px; border-radius: 5px; background: var(--field); color: var(--muted); }

/* method, scope, status */
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 22px; padding: 0 7px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; flex: none; }
.method.get { background: var(--pos-soft); color: var(--pos); }
.method.post { background: var(--buy-soft); color: var(--buy); }
.method.put, .method.patch { background: var(--warn-soft); color: var(--warn); }
.method.delete { background: var(--neg-soft); color: var(--neg); }
.scope { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; background: var(--field); color: var(--muted); white-space: nowrap; }
.scope.read { background: var(--accent-soft); color: var(--accent); }
.scope.trade { background: var(--warn-soft); color: var(--warn); }
.scope.admin { background: var(--neg-soft); color: var(--neg); }
.status { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; background: var(--field); color: var(--muted); }
.status.s2 { background: var(--pos-soft); color: var(--pos); }
.status.s4 { background: var(--warn-soft); color: var(--warn); }
.status.s5 { background: var(--neg-soft); color: var(--neg); }

/* ---------- reference ---------- */
.tag-grid { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tag-grid a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--r-field); background: var(--surface); border: 1px solid var(--rule); color: var(--ink); box-shadow: var(--shadow-card); transition: border-color 120ms, background-color 120ms; height: 100%; }
.tag-grid a:hover { text-decoration: none; border-color: var(--rule-strong); background: var(--field); }
.tag-grid b { font-weight: 600; font-size: 14.5px; }
.tag-grid span { font-size: 12.75px; color: var(--muted); line-height: 1.45; }
.op { padding: 36px 0 28px; border-top: 1px solid var(--rule); }
.op:first-of-type, .lead + .op { border-top: 0; padding-top: 8px; }
.op-head { margin-bottom: 18px; border-radius: 8px; }
.op-head h2, .op-head h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.016em; }
.op-head h2 a, .op-head h3 a { color: inherit; }
.op-head h2 a:hover, .op-head h3 a:hover { text-decoration: none; color: var(--accent); }
.route { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.route .path { font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 4px 10px; word-break: break-all; }
.route .path var { color: var(--accent); }
.op-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.op-left { min-width: 0; }
.op-right { min-width: 0; }
.op-right .code, .op-right .tabs { margin-bottom: 14px; }
@media (min-width: 1100px) {
  .op-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 46%); gap: 32px; }
  .op-right { position: sticky; top: calc(var(--top-h) + 20px); }
}
.op-desc { font-size: 15px; color: var(--ink); }
.op-auth { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 0 0 6px; }
.op-left h4 { display: flex; align-items: center; gap: 8px; margin: 26px 0 6px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.fields { list-style: none; margin: 0 0 8px; padding: 0; }
.fields > li { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.fields > li:last-child { border-bottom: 0; }
.fhead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.fname { font-weight: 600; color: var(--ink); background: none; padding: 0; font-size: 13.5px; }
.ftype { color: var(--muted); font-size: 12.5px; }
.req { color: var(--warn); font-size: 11.5px; font-weight: 500; }
.dflt { color: var(--faint); font-size: 11.5px; }
.dflt code { font-size: 11.5px; padding: 0 4px; }
.fdesc { margin: 3px 0 0; font-size: 13.75px; color: var(--muted); line-height: 1.5; }
.lead-note { margin: 4px 0 8px; }
.field-note { margin: 4px 0 0; font-size: 12.75px; color: var(--muted); }
details.nested { margin-top: 8px; }
details.nested > summary, details.variant > summary { cursor: pointer; font-size: 12.75px; color: var(--accent); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); }
details.nested > summary::-webkit-details-marker, details.variant > summary::-webkit-details-marker { display: none; }
details.nested > summary::before, details.variant > summary::before { content: ''; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 160ms var(--ease); margin-right: 2px; }
details.nested[open] > summary::before, details.variant[open] > summary::before { transform: rotate(45deg); }
details.nested[open] > summary { margin-bottom: 4px; }
details.nested .fields { margin: 6px 0 0 10px; padding-left: 12px; border-left: 1px solid var(--rule); }
details.nested .fields > li { padding: 8px 0; }
.variants { display: flex; flex-direction: column; gap: 10px; }
details.variant { border: 1px solid var(--rule); border-radius: var(--r-field); padding: 10px 14px; background: var(--surface); }
details.variant > summary { background: none; color: var(--ink); padding: 0; font-size: 14px; display: flex; flex-wrap: wrap; }
details.variant > summary .muted { font-size: 13px; }
details.variant .fields { margin-top: 6px; }
.errors { list-style: none; margin: 0; padding: 0; }
.errors li { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; flex-wrap: wrap; }
.errors li:last-child { border-bottom: 0; }
.errors .edesc { color: var(--muted); flex: 1 1 100%; margin-top: -2px; line-height: 1.5; }
.obj .op-head h2 { font-family: var(--mono); font-weight: 600; font-size: 20px; letter-spacing: 0; }

/* pager, footer */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 48px 0 0; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-field); border: 1px solid var(--rule); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); transition: border-color 120ms, background-color 120ms; }
.pager a:hover { text-decoration: none; border-color: var(--rule-strong); background: var(--field); }
.pager a.next { text-align: right; }
.pager-k { font-size: 12px; color: var(--faint); }
.pager-t { font-weight: 600; font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--faint); }
.foot a { color: var(--muted); }

/* ---------- phone and narrow ---------- */
.scrim { position: fixed; inset: 0; z-index: 35; background: var(--dim); }
body.no-scroll { overflow: hidden; }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .brand { width: auto; }
  .brand .word small { display: none; }
  .side { position: fixed; top: var(--top-h); left: 0; bottom: 0; z-index: 36; width: min(300px, 86vw); height: auto; transform: translateX(-104%); transition: transform 240ms var(--ease); box-shadow: none; }
  .side.open { transform: none; box-shadow: var(--shadow-float); }
  .search { width: auto; flex: 1; min-width: 0; }
  .search kbd { display: none; }
  .top-links { display: none; }
  .main { padding: 24px 16px 56px; }
  h1 { font-size: 26px; }
  .lead { font-size: 15.5px; }
  h2 { font-size: 20px; margin-top: 36px; }
  .op-head h2, .op-head h3 { font-size: 20px; }
  .op { padding: 28px 0 20px; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { text-align: left; }
  .code pre { font-size: 12.25px; padding: 12px 14px; }
}
@media (max-width: 520px) {
  .top { gap: 8px; padding-right: 10px; }
  .theme { display: none; }
  .brand .word { display: none; }
  .tabs-head { overflow-x: auto; scrollbar-width: none; }
  .tabs-head::-webkit-scrollbar { display: none; }
  table { font-size: 13px; }
  th, td { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .side { transition: none; }
  h2:target, h3:target, .op:target .op-head { animation: none; }
  details.nested > summary::before, details.variant > summary::before { transition: none; }
}
@media print {
  .top, .side, .toc, .pager, .copy, .tabs-head { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .tabs .code { display: block !important; }
  .op-right { position: static; }
}
