/* Light AI API docs. Dark-first, light theme via [data-theme="light"]. Self-hosted fonts only. */

@font-face {
  font-family: "Sora Variable";
  src: url("/_docs/assets/fonts/sora-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope Variable";
  src: url("/_docs/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #2f6bff;
  --brand-strong: #1f56e0;
  --font-body: "Manrope Variable", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Sora Variable", "Sora", var(--font-body);
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --topbar: 64px;
  --sidebar: 284px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-card: 16px;
  /* App buttons (components/ui/button.tsx + Night Glass): 44px tall, 8px radius. */
  --btn-h: 44px;
  --btn-radius: 8px;

  /* Night Glass (src/styles/nightGlass.css) */
  color-scheme: dark;
  --bg: #090b11;
  --bg-soft: #0d1018;
  --bg-glow: radial-gradient(900px 560px at 82% -10%, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0) 62%), radial-gradient(760px 520px at 10% 110%, rgba(47, 107, 255, 0.07), rgba(47, 107, 255, 0) 60%);
  --surface: #0f131d;
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.025) 100%);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --drawer: #0d1019;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f5fb;
  --text-soft: #b9c2d3;
  --muted: #8a96ad;
  --accent: #7ea6ff;
  --accent-bg: rgba(47, 107, 255, 0.14);
  --accent-ring: rgba(96, 140, 255, 0.6);
  --nav-active: rgba(47, 107, 255, 0.16);
  --nav-active-text: #dfe8ff;
  --code-bg: #0b0e15;
  --code-text: #dfe4ee;
  --inline-code-bg: rgba(255, 255, 255, 0.06);
  --shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.75);
  --scroll-thumb: rgb(47 107 255 / 0.55);
  --tile-mix: 18%;
  --tk-str: #9fd8a8;
  --tk-key: #8fb4ff;
  --tk-num: #f2c27a;
  --tk-kw: #d39bff;
  --tk-com: #6b7385;
  --tk-flag: #7fd3e6;
  --m-get: #3ccf91;
  --m-post: #6f9bff;
  --m-put: #c49bff;
  --m-patch: #f2b55c;
  --m-delete: #ff7a7a;
}

/* Daylight Glass */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9fd;
  --bg-soft: #eff3fa;
  --bg-glow: radial-gradient(1000px 600px at 6% -10%, rgba(47, 107, 255, 0.08), transparent 62%), radial-gradient(760px 520px at 100% 0%, rgba(47, 107, 255, 0.06), transparent 60%);
  --surface: #ffffff;
  --surface-2: rgba(15, 23, 42, 0.045);
  --surface-hover: rgba(47, 107, 255, 0.07);
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(15, 23, 42, 0.04);
  --drawer: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #526079;
  --accent: #1f56e0;
  --accent-bg: rgba(47, 107, 255, 0.08);
  --accent-ring: rgba(47, 107, 255, 0.5);
  --nav-active: rgba(47, 107, 255, 0.1);
  --nav-active-text: #1a46c4;
  --code-bg: #ffffff;
  --code-text: #1c2333;
  --inline-code-bg: rgba(15, 23, 42, 0.05);
  --shadow: 0 18px 40px -22px rgba(30, 64, 175, 0.35);
  --scroll-thumb: rgb(47 107 255 / 0.5);
  --tile-mix: 13%;
  --tk-str: #1d7a3a;
  --tk-key: #1f56e0;
  --tk-num: #a2560c;
  --tk-kw: #8a3fd1;
  --tk-com: #7a8396;
  --tk-flag: #0b7a91;
  --m-get: #12945e;
  --m-post: #1f56e0;
  --m-put: #7b3fd1;
  --m-patch: #a8620b;
  --m-delete: #c93434;
}

/* Section tones (sidebar tiles, eyebrows, overview cards): one hue per section, brand family. */
.tone-blue { --tone: #6f9bff; }
.tone-sky { --tone: #4cc3f5; }
.tone-violet { --tone: #a98bff; }
.tone-amber { --tone: #f5b84a; }
.tone-emerald { --tone: #3fcf9a; }
.tone-pink { --tone: #f47bbd; }
.tone-indigo { --tone: #8f93ff; }
.tone-teal { --tone: #3fd0c2; }
.tone-slate { --tone: #a3b0c6; }
.tone-cyan { --tone: #4fd1e8; }
.tone-fuchsia { --tone: #e07cf2; }
[data-theme="light"] .tone-blue { --tone: #2459e0; }
[data-theme="light"] .tone-sky { --tone: #0377b5; }
[data-theme="light"] .tone-violet { --tone: #6d3fe0; }
[data-theme="light"] .tone-amber { --tone: #9a5600; }
[data-theme="light"] .tone-emerald { --tone: #08754d; }
[data-theme="light"] .tone-pink { --tone: #c2257a; }
[data-theme="light"] .tone-indigo { --tone: #4b4fd6; }
[data-theme="light"] .tone-teal { --tone: #0b7f76; }
[data-theme="light"] .tone-slate { --tone: #4b5a73; }
[data-theme="light"] .tone-cyan { --tone: #0a7790; }
[data-theme="light"] .tone-fuchsia { --tone: #a32cb8; }
.tile {
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 7px;
  color: var(--tone, var(--accent));
  background: color-mix(in srgb, var(--tone, var(--brand)) var(--tile-mix), transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--brand)) 22%, transparent);
}
.tile svg { width: 14px; height: 14px; }

/* Brand scrollbars, as in the app (src/index.css): Light AI blue thumb on a transparent track. */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgb(47 107 255 / 0.85); background-clip: padding-box; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 20px); }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: 6px; }
svg { width: 18px; height: 18px; flex: none; }
button { font: inherit; color: inherit; }
kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Buttons: the app's primary (brand-primary-gradient under Night Glass) and secondary (outline glass). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h); padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--btn-radius);
  font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { cursor: default; opacity: .6; }
.btn-primary {
  color: #fff;
  background-color: #2563eb;
  background-image: linear-gradient(180deg, #2e66f5 0%, #1d4ed8 100%);
  border-color: rgba(147, 178, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 28px -10px rgba(47, 107, 255, 0.75);
}
.btn-primary:hover:not(:disabled) { color: #fff; background-image: linear-gradient(180deg, #3b74ff 0%, #2458e6 100%); }
.btn-primary:active:not(:disabled) { background-image: linear-gradient(180deg, #2458e6 0%, #1a45c4 100%); }
.btn-primary:focus-visible { outline: 2px solid #93b4ff; outline-offset: 3px; }
[data-theme="light"] .btn-primary:focus-visible { outline-color: var(--brand); }
.btn-secondary {
  color: var(--text);
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--highlight);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-hover); border-color: color-mix(in srgb, var(--brand) 45%, var(--border-strong)); }
.btn-secondary svg { color: var(--muted); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--font-head); font-weight: 650; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .bolt { width: 22px; height: 22px; color: var(--brand); }
.brand-docs { color: var(--muted); font-weight: 500; padding-left: 9px; border-left: 1px solid var(--border-strong); }
.beta-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-left: -2px;
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--accent);
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em; line-height: 1; white-space: nowrap; cursor: default;
}
.search-trigger {
  margin-left: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  width: min(380px, 34vw); height: 40px; padding: 0 8px 0 12px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--card); box-shadow: var(--highlight); color: var(--muted); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.search-trigger:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border-strong)); color: var(--text-soft); }
.search-trigger span { flex: 1; text-align: left; font-size: 14px; }
.top-links { margin-left: auto; display: flex; gap: 22px; font-size: 14px; font-weight: 500; }
.top-links a { color: var(--text-soft); }
.top-links a:hover { color: var(--text); text-decoration: none; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--card); box-shadow: var(--highlight); color: var(--text-soft); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface-hover); }
.btn-app { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
.nav-toggle { display: none; }
.theme-toggle .i-moon { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidebar {
  position: sticky; top: var(--topbar);
  height: calc(100vh - var(--topbar));
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
}

/* Sidebar navigation: group header (tile + label + chevron), nested links, a soft pill for the current page. */
.nav { flex: 1; overflow-y: auto; padding: 16px 12px 24px; overscroll-behavior: contain; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav summary { list-style: none; cursor: pointer; }
.nav summary::-webkit-details-marker { display: none; }
.nav .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .15s ease; }
.nav details[open] > summary .chev { transform: rotate(90deg); }
.nav-group + .nav-group { margin-top: 6px; }
.nav-head {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 6px 8px; border-radius: 10px;
  font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: -0.005em; color: var(--text);
}
.nav-head .nav-label { flex: 1; min-width: 0; }
.nav-head .chev { opacity: 0; }
.nav-head:hover { background: var(--surface-2); }
.nav-head:hover .chev, .nav-head:focus-visible .chev, .nav-group:not([open]) > .nav-head .chev { opacity: 1; }
.nav-list { padding: 2px 0 10px 30px !important; }
.nav-list a, .nav-sub summary {
  display: flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 5px 10px; border-radius: 8px;
  color: var(--text-soft); font-size: 14px; font-weight: 450; line-height: 1.35;
  transition: background-color .12s ease, color .12s ease;
}
.nav-list a:hover, .nav-sub summary:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-list a[aria-current="page"] { color: var(--nav-active-text); background: var(--nav-active); font-weight: 650; }
.nav-list a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub summary { gap: 6px; padding-left: 4px; }
.nav-sub summary span { flex: 1; min-width: 0; }
.nav-sub > ul { padding: 2px 0 4px 18px !important; }
.nav-sub a { font-size: 13.5px; }
.nav .method { font-size: 9.5px; min-width: 34px; padding: 1px 0; }
.sidebar-search, .nav-extra { display: none; }
.sidebar-foot { padding: 12px 14px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.sidebar-foot p { margin: 10px 0 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sidebar-foot a { color: var(--muted); }
.sidebar-foot a:hover { color: var(--text); }
.btn-ai { width: 100%; }
.btn-ai svg { color: var(--accent); }
.scrim { display: none; }

/* Main */
/* The page uses the full width beside the sidebar: a wide, centred text column and a slim On this page (narrower than the sidebar) at the right edge (founder, Oct 22). */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; padding: 40px 32px 80px 48px; width: 100%; outline: none; }
.is-reference .main { grid-template-columns: minmax(0, 1fr); max-width: 1500px; }
.doc { min-width: 0; width: 100%; max-width: 960px; margin: 0 auto; }
.is-reference .doc { max-width: none; margin: 0; }
.doc-head { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 13px; font-weight: 650; color: var(--tone, var(--accent)); }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; color: var(--text); }
h1 { margin: 0; font-size: 34px; line-height: 1.18; font-weight: 650; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
h1 .method { font-size: 13px; padding: 3px 8px; }
.lead { margin: 12px 0 0; font-size: 17px; line-height: 1.6; color: var(--text-soft); max-width: 820px; }
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 { margin: 44px 0 12px; font-size: 22px; line-height: 1.3; font-weight: 620; }
.doc-body h3 { margin: 30px 0 8px; font-size: 17px; line-height: 1.35; font-weight: 620; }
.doc-body h2, .doc-body h3 { position: relative; scroll-margin-top: calc(var(--topbar) + 20px); }
.anchor { margin-left: 8px; color: var(--muted); opacity: 0; font-weight: 500; text-decoration: none; transition: opacity .12s ease; }
h2:hover .anchor, h3:hover .anchor, .field:hover .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--accent); text-decoration: none; }
.doc-body p, .doc-body li { color: var(--text-soft); }
.doc-body p { margin: 0 0 16px; }
.doc-body strong { color: var(--text); font-weight: 650; }
.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 22px; }
.doc-body li { margin: 6px 0; padding-left: 2px; }
.doc-body li::marker { color: var(--muted); }
code { font-family: var(--font-mono); font-size: .86em; }
:not(pre) > code { padding: 2px 6px; border-radius: 5px; background: var(--inline-code-bg); color: var(--text); border: 1px solid var(--border); overflow-wrap: anywhere; }
.is-target { animation: target 1.8s ease; border-radius: 8px; }
@keyframes target { 0%, 30% { background: var(--accent-bg); } 100% { background: transparent; } }

/* Tables */
.table-wrap { margin: 0 0 22px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--highlight); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
tr:last-child > * { border-bottom: 0; }
thead th { font-size: 12px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); }
tbody th { font-weight: 600; color: var(--text); white-space: nowrap; width: 1%; }
td { color: var(--text-soft); }

/* Fields */
.fields { margin: 0 0 24px; border-top: 1px solid var(--border); }
.field { padding: 13px 4px 13px calc(4px + var(--indent, 0px)); border-bottom: 1px solid var(--border); }
.field[data-depth="1"] { --indent: 18px; }
.field[data-depth="2"] { --indent: 36px; }
.field[data-depth="3"], .field[data-depth="4"] { --indent: 54px; }
.field-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.field-name { font-size: 13.5px; font-weight: 650; color: var(--text); background: none !important; border: 0 !important; padding: 0 !important; overflow-wrap: anywhere; }
.field-parent { color: var(--muted); font-weight: 500; }
.field-type { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.field-req { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #ff9b6b; }
[data-theme="light"] .field-req { color: #c2410c; }
.field-desc { margin-top: 4px; font-size: 14px; color: var(--text-soft); }

/* Method badges */
.method {
  display: inline-flex; justify-content: center; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 6px; border-radius: 5px; line-height: 1.4;
  color: var(--m-get); background: color-mix(in srgb, var(--m-get) 14%, transparent);
}
.m-post { color: var(--m-post); background: color-mix(in srgb, var(--m-post) 14%, transparent); }
.m-put { color: var(--m-put); background: color-mix(in srgb, var(--m-put) 14%, transparent); }
.m-patch { color: var(--m-patch); background: color-mix(in srgb, var(--m-patch) 14%, transparent); }
.m-delete { color: var(--m-delete); background: color-mix(in srgb, var(--m-delete) 14%, transparent); }
.endpoint { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--highlight); overflow-x: auto; }
.endpoint code { font-size: 13.5px; color: var(--text); white-space: nowrap; background: none; border: 0; padding: 0; }
.endpoint-host { color: var(--muted); }
.endpoint-list { list-style: none; padding: 0 !important; margin: 0 0 24px !important; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--highlight); overflow: hidden; }
.endpoint-list li { margin: 0 !important; padding: 0 !important; border-bottom: 1px solid var(--border); }
.endpoint-list li:last-child { border-bottom: 0; }
.endpoint-list a { display: grid; grid-template-columns: 52px minmax(0, auto) 1fr; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text-soft); }
.endpoint-list a:hover { background: var(--surface-2); text-decoration: none; }
.endpoint-list code { color: var(--text); background: none; border: 0; padding: 0; font-size: 13px; overflow-wrap: anywhere; }
.endpoint-list span:last-child { font-size: 13.5px; color: var(--muted); text-align: right; }

/* Code */
.code { margin: 0 0 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--code-bg); box-shadow: var(--highlight); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--code-bg) 70%, var(--surface-2)); }
.code-title { font-size: 12.5px; font-weight: 650; color: var(--text); }
.code-lang { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { border: 0; background: none; padding: 9px 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.copy-code { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; background: none; color: var(--muted); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; cursor: pointer; }
.copy-code:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.copy-code svg { width: 14px; height: 14px; }
pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: var(--code-text); tab-size: 2; }
pre code { font-size: inherit; }
pre[hidden] { display: none; }
.tk-str { color: var(--tk-str); }
.tk-key { color: var(--tk-key); }
.tk-num { color: var(--tk-num); }
.tk-kw { color: var(--tk-kw); }
.tk-com { color: var(--tk-com); font-style: italic; }
.tk-flag { color: var(--tk-flag); }
mark.ph { background: color-mix(in srgb, var(--brand) 22%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; box-shadow: inset 0 -1px 0 var(--brand); }

/* Callouts and cards */
.callout { margin: 0 0 22px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--callout) 30%, transparent); border-radius: var(--radius); background: color-mix(in srgb, var(--callout) 8%, transparent); --callout: var(--brand); }
.callout > strong { display: block; font-size: 12.5px; letter-spacing: .02em; color: var(--callout-text, var(--accent)); margin-bottom: 2px; }
.callout p { margin: 0 !important; font-size: 14.5px; }
.callout-warning { --callout: #f2b55c; --callout-text: #f5c271; }
.callout-tip { --callout: #3ccf91; --callout-text: #5edaa5; }
.callout-soon { --callout: #c49bff; --callout-text: #cbb0ff; }
.callout-beta { --callout: var(--brand); }
[data-theme="light"] .callout-warning { --callout-text: #9a5600; }
[data-theme="light"] .callout-tip { --callout-text: #0b7a4f; }
[data-theme="light"] .callout-soon { --callout-text: #6d3fd1; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 4px 0 28px; }
.card {
  display: flex; flex-direction: column; gap: 4px; padding: 18px;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--card); box-shadow: var(--highlight); color: inherit;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--tone, var(--brand)) 50%, var(--border)); text-decoration: none; transform: translateY(-1px); box-shadow: var(--highlight), var(--shadow); }
.card-tile { width: 32px; height: 32px; border-radius: 9px; margin-bottom: 10px; }
.card-tile svg { width: 17px; height: 17px; }
.card-title { font-family: var(--font-head); font-weight: 620; font-size: 15px; color: var(--text); }
.card-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Copy page menu */
.copy-page { position: relative; display: flex; flex: none; margin-top: 4px; }
.btn-split { border-radius: var(--btn-radius) 0 0 var(--btn-radius); }
.btn-caret { border-radius: 0 var(--btn-radius) var(--btn-radius) 0; margin-left: -1px; padding: 0 10px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 290px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--highlight), var(--shadow); }
.menu [role="menuitem"] { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 13.5px; }
.menu [role="menuitem"]:hover, .menu [role="menuitem"]:focus-visible { background: var(--surface-2); text-decoration: none; outline: none; }
.menu svg { margin-top: 2px; color: var(--muted); width: 16px; height: 16px; }
.menu span { display: flex; flex-direction: column; min-width: 0; }
.menu strong { font-weight: 600; }
.menu small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Table of contents */
.toc { position: sticky; top: calc(var(--topbar) + 40px); align-self: start; max-height: calc(100vh - var(--topbar) - 60px); overflow-y: auto; font-size: 13px; }
.toc-label { margin: 0 0 10px; font-weight: 650; color: var(--text); font-size: 12.5px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); line-height: 1.4; }
.toc li a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.toc-h3 a { padding-left: 22px !important; }

/* Reference two-column */
.ref-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 44px; align-items: start; }
.ref-aside { min-width: 0; }
.ref-sticky { position: sticky; top: calc(var(--topbar) + 24px); max-height: calc(100vh - var(--topbar) - 48px); overflow-y: auto; scrollbar-width: thin; }
.ref-sticky .code pre { max-height: 460px; }
.ref-main .table-wrap tbody th { color: var(--muted); font-weight: 600; }

/* Footer */
.doc-foot { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--border); }
.updated { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.updated a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pager a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); box-shadow: var(--highlight); color: var(--text); font-weight: 600; font-size: 14.5px; }
.pager a:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); text-decoration: none; }
.pager small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.pager-next { justify-content: flex-end; text-align: right; grid-column: 2; }
.pager svg { color: var(--muted); }

/* Search */
.search { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding: 12vh 16px 16px; }
.search[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 12, 0.66); backdrop-filter: blur(8px); }
[data-theme="light"] .search-backdrop { background: rgba(15, 23, 42, 0.32); }
.search-panel { position: relative; width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column; border: 1px solid var(--border-strong); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--highlight), var(--shadow); overflow: hidden; }
.search-bar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--muted); }
.search-bar input { flex: 1; min-width: 0; height: 54px; border: 0; outline: none; background: none; color: var(--text); font: inherit; font-size: 16px; }
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-results a { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 9px; color: var(--text); }
.search-results a:hover { text-decoration: none; }
.search-results [aria-selected="true"] a { background: var(--accent-bg); }
.sr-kind { flex: none; width: 66px; margin-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sr-endpoint { color: var(--m-post); }
.sr-field { color: var(--m-put); }
.sr-body { display: flex; flex-direction: column; min-width: 0; }
.sr-title { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.sr-context { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-results mark { background: none; color: var(--accent); font-weight: 700; }
.search-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.search-foot { display: flex; gap: 16px; justify-content: flex-end; margin: 0; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.search-foot kbd { margin-right: 3px; }
body.search-open { overflow: hidden; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 12px); padding: 9px 14px; border-radius: 9px; background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1280px) {
  .main { grid-template-columns: minmax(0, 1fr); padding: 36px 40px 72px; }
  .toc { display: none; }
}
@media (max-width: 1120px) {
  .ref-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ref-sticky { position: static; max-height: none; overflow: visible; }
  .top-links a:not(:first-child) { display: none; }
  .search-trigger { width: min(300px, 30vw); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-grid; }
  .sidebar {
    position: fixed; top: var(--topbar); left: 0; bottom: 0; z-index: 50;
    width: min(340px, 88vw); height: auto;
    background: var(--drawer);
    border-right: 1px solid var(--border-strong);
    transform: translateX(-100%); transition: transform .22s ease, visibility 0s linear .22s; visibility: hidden;
    box-shadow: var(--shadow);
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: none; visibility: visible; transition: transform .22s ease, visibility 0s; }
  .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; z-index: 45; background: rgba(5, 7, 12, 0.6); backdrop-filter: blur(4px); }
  [data-theme="light"] .scrim { background: rgba(15, 23, 42, 0.3); }
  .scrim[hidden] { display: none; }
  .nav { padding: 6px 12px 20px; }
  .sidebar-search { display: block; padding: 14px 12px 8px; }
  .nav-search {
    display: flex; align-items: center; gap: 10px; width: 100%;
    height: var(--btn-h); margin: 0; padding: 0 10px 0 12px;
    border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--card); box-shadow: var(--highlight); color: var(--muted); cursor: pointer; font-size: 14.5px;
  }
  .nav-search span { flex: 1; text-align: left; }
  .nav-head { min-height: 44px; }
  .nav-list a, .nav-sub summary { min-height: 40px; font-size: 15px; }
  .nav-sub a { font-size: 14.5px; }
  .nav-extra { display: block; margin: 14px 0 0 !important; padding: 12px 0 0 !important; border-top: 1px solid var(--border); }
  .nav-extra a { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 5px 10px; border-radius: 8px; color: var(--text-soft); font-size: 15px; font-weight: 500; }
  .nav-extra a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
  .nav-extra svg { width: 15px; height: 15px; color: var(--muted); }
  .main { padding: 28px 24px 64px; }
  .search-trigger { margin-left: auto; width: auto; }
  .top-links { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand-docs { display: none; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .btn-app { display: none; }
  .nav-search kbd { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 14px 16px; }
  .card-tile { grid-row: span 2; margin: 2px 0 0; }
  .card > :only-child, .card-title:first-child, .card-text:nth-child(2):last-child { grid-column: 1 / -1; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .main { padding: 22px 16px 56px; }
  h1 { font-size: 27px; }
  .lead { font-size: 16px; }
  .title-row { flex-direction: column; gap: 14px; }
  .menu { left: 0; right: auto; width: min(290px, calc(100vw - 32px)); }
  .doc-body h2 { margin-top: 36px; font-size: 20px; }
  .endpoint-list a { grid-template-columns: 46px minmax(0, 1fr); }
  .endpoint-list span:last-child { grid-column: 2; text-align: left; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .search { padding: 10px; }
  .search-panel { max-height: 86vh; }
  .search-foot { display: none; }
  .sr-kind { width: 56px; }
  th, td { padding: 9px 11px; }
  pre { font-size: 12.5px; padding: 12px 14px; }
  .code-head { flex-wrap: wrap; column-gap: 6px; row-gap: 0; padding-left: 12px; }
  .code-title { flex-basis: 100%; padding-top: 9px; }
  .code-title + .tabs { margin-left: -9px; }
  .code-title ~ .copy-code { position: absolute; right: 8px; top: 4px; }
  .code { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .sidebar, .toc, .copy-page, .pager, .search { display: none !important; }
  .shell { display: block; }
}
