/* docs.invariant-ai.com theme.
   Layout, spacing and radii follow docs.mireye.ai (Mintlify), measured with computed styles on 2026-11-22:
   1408 px shell, 288 px sidebar with 12 px-radius pill links, 64 px top bar + 48 px tab row, 16 px-radius
   cards and code blocks, a sticky right column of request/response cards on API pages.
   Colours come from the Invariant website (Figma Website Final Design v1 and www.invariant-ai.com),
   listed in the token block below; faces from the brand book (org/brand.md).
   DIN for headlines, Geist for body and UI, Geist Mono for labels, badges and code. */

@font-face { font-family: 'Geist'; src: url('/kit/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/kit/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'D-DIN'; src: url('/kit/fonts/D-DIN.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

/* ---------- tokens: the Invariant website palette (Figma Website Final Design v1, kit/house.css,
   and www.invariant-ai.com computed styles 2026-11-22). Paper, ink #303030, navy #123C73, orange
   #FB4D03 for eyebrows and numbers, blue #022FDB for links, icons and active states, site button blue
   #1939A6, hairline #D7DFFF, blue tint #EEF2FF; green and red only for GET/DELETE and status;
   ground #030713 for dark mode. ---------- */
:root {
  --paper: #FFFFFF; --ink: #303030; --navy: #123C73; --orange: #FB4D03; --blue: #022FDB; --blue-mid: #3F73E3;
  --site-blue: #1939A6; --site-blue-hover: #163392; --hairline: #D7DFFF; --hairline-g: #EBEBEB; --blue-tint: #EEF2FF;
  --row-tint: #F1F4F7; --green: #0E8A3E; --red: #E2011F; --ground: #030713;

  --bg: var(--paper);
    --fg: var(--ink); --text: var(--ink); --muted: rgba(48, 48, 48, .62); --faint: #B9B9B9;
    --line: var(--hairline-g); --line-2: var(--hairline);
    --tint: var(--blue-tint); --well: #F7F9FF;
    --primary: var(--site-blue); --primary-hover: var(--site-blue-hover); --on-primary: #FFFFFF; --link: var(--blue);
    --accent: var(--blue); --eyebrow: var(--orange); --head: var(--ink);
    --code-inline-bg: var(--row-tint);
    --shadow: 0 1px 2px rgba(18, 60, 115, .05);
    --shadow-lg: 0 24px 64px -12px rgba(18, 60, 115, .30);
    --scrim: rgba(3, 7, 19, .40);
    --tok-k: var(--navy); --tok-s: var(--blue); --tok-n: var(--orange); --tok-c: #B9B9B9; --tok-f: var(--orange);
    --post-bg: var(--blue-tint); --post-fg: var(--blue); --post-on: var(--blue);
    --get-bg: rgba(14, 138, 62, .10); --get-fg: var(--green); --get-on: var(--green);
    --del-bg: rgba(226, 1, 31, .08); --del-fg: var(--red); --del-on: var(--red);
    --req-bg: rgba(251, 77, 3, .08); --req-fg: #C23C02;
    --ok: var(--green); --bad: var(--red);

  --din: 'DIN', 'D-DIN', 'Helvetica Neue', Arial, sans-serif;
  --geist: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --top-h: 64px; --tabs-h: 48px; --head-h: calc(var(--top-h) + var(--tabs-h));
  --shell: 1408px; --side-w: 288px; --toc-w: 304px; --rc-w: 448px;
  --r-sm: 6px; --r: 12px; --r-lg: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ground); --fg: #FFFFFF; --text: #EBEBEB; --muted: #B9B9B9; --faint: #757575;
    --line: rgba(215, 223, 255, .10); --line-2: rgba(215, 223, 255, .18);
    --tint: rgba(63, 115, 227, .14); --well: #070E22;
    --primary: var(--blue-mid); --primary-hover: #5A88EA; --on-primary: #FFFFFF; --link: #7EA1EE;
    --accent: var(--blue-mid); --eyebrow: var(--orange); --head: #FFFFFF;
    --code-inline-bg: rgba(215, 223, 255, .08); --shadow: none; --scrim: rgba(0, 0, 0, .6);
    --tok-k: var(--hairline); --tok-s: #7EA1EE; --tok-n: #FF7A3D; --tok-c: #757575; --tok-f: #FF7A3D;
    --post-bg: rgba(63, 115, 227, .18); --post-fg: #7EA1EE; --post-on: var(--blue-mid);
    --get-bg: rgba(14, 138, 62, .20); --get-fg: #4CC27D; --get-on: var(--green);
    --del-bg: rgba(226, 1, 31, .18); --del-fg: #FF5C70; --del-on: var(--red);
    --req-bg: rgba(251, 77, 3, .16); --req-fg: #FF7A3D;
    --ok: #4CC27D; --bad: #FF5C70; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: var(--ground); --fg: #FFFFFF; --text: #EBEBEB; --muted: #B9B9B9; --faint: #757575;
    --line: rgba(215, 223, 255, .10); --line-2: rgba(215, 223, 255, .18);
    --tint: rgba(63, 115, 227, .14); --well: #070E22;
    --primary: var(--blue-mid); --primary-hover: #5A88EA; --on-primary: #FFFFFF; --link: #7EA1EE;
    --accent: var(--blue-mid); --eyebrow: var(--orange); --head: #FFFFFF;
    --code-inline-bg: rgba(215, 223, 255, .08); --shadow: none; --scrim: rgba(0, 0, 0, .6);
    --tok-k: var(--hairline); --tok-s: #7EA1EE; --tok-n: #FF7A3D; --tok-c: #757575; --tok-f: #FF7A3D;
    --post-bg: rgba(63, 115, 227, .18); --post-fg: #7EA1EE; --post-on: var(--blue-mid);
    --get-bg: rgba(14, 138, 62, .20); --get-fg: #4CC27D; --get-on: var(--green);
    --del-bg: rgba(226, 1, 31, .18); --del-fg: #FF5C70; --del-on: var(--red);
    --req-bg: rgba(251, 77, 3, .16); --req-fg: #FF7A3D;
    --ok: #4CC27D; --bad: #FF5C70; color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--geist); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: var(--fg); }
kbd { font-family: var(--geist); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; padding: 8px 12px; background: var(--primary); color: var(--on-primary); border-radius: var(--r); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { max-width: var(--shell); margin: 0 auto; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 16px; }
.logo { display: flex; align-items: center; flex: none; }
.logo img { height: 24px; width: auto; }
.logo-d { display: none; }
:root[data-theme="dark"] .logo-l { display: none; } :root[data-theme="dark"] .logo-d { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none; } :root:not([data-theme="light"]) .logo-d { display: block; } }
.top-mid { flex: 1; display: flex; justify-content: center; }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 280px; height: 36px; padding: 0 12px 0 14px; border-radius: var(--r);
  background: var(--bg); color: var(--muted); font-size: 14px; box-shadow: 0 0 0 1px var(--line-2), var(--shadow); transition: box-shadow .15s; }
.search-btn:hover { box-shadow: 0 0 0 1px var(--faint), var(--shadow); }
.search-btn svg { width: 16px; height: 16px; flex: none; }
.search-btn span { flex: 1; text-align: left; }
.search-btn kbd { font-size: 12px; font-weight: 500; color: var(--muted); }
.top-links { display: flex; gap: 24px; font-size: 14px; font-weight: 500; color: var(--muted); }
.top-links a:hover { color: var(--fg); }
.cta { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 14px; border-radius: var(--r); background: var(--primary); color: var(--on-primary);
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; flex: none; transition: background .15s; }
.cta:hover { background: var(--primary-hover); }
.cta svg { width: 12px; height: 12px; stroke-width: 1.8; }
.theme-btn, .d-menu { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r); color: var(--muted); flex: none; }
.theme-btn:hover, .d-menu:hover { background: var(--tint); color: var(--fg); }
.theme-btn svg, .d-menu svg { width: 18px; height: 18px; }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; } :root[data-theme="dark"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: none; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: block; } }
.d-menu { display: none; margin-left: -6px; }

/* tab row */
.tabs-row { max-width: var(--shell); margin: 0 auto; padding: 0 16px; }
.d-tabs { display: flex; gap: 24px; height: var(--tabs-h); overflow-x: auto; scrollbar-width: none; }
.d-tabs a { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 1.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.d-tabs a:hover { color: var(--fg); border-bottom-color: var(--line-2); }
.d-tabs a[aria-current="page"] { color: var(--fg); font-weight: 600; border-bottom-color: var(--accent); }
.d-tabs a[aria-current="page"] .ic { color: var(--accent); }
.d-tabs .ic { width: 16px; height: 16px; }

/* ---------- three-column shell ---------- */
.docs { max-width: var(--shell); margin: 0 auto; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); }
.l-guide.no-toc .docs { grid-template-columns: var(--side-w) minmax(0, 1fr) 0; }
.l-api .docs { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--rc-w); }

/* sidebar */
.d-side-in { position: sticky; top: var(--head-h); max-height: calc(100vh - var(--head-h)); overflow-y: auto; padding: 32px 16px 48px 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.d-group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 24px; }
.d-group-t { padding: 0 16px 8px; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--fg); }
.d-link { display: flex; align-items: flex-start; gap: 10px; padding: 6px 12px 6px 16px; border-radius: var(--r); font-size: 14px; line-height: 24px; color: var(--text); opacity: .92; transition: background .12s, color .12s; overflow-wrap: anywhere; }
.d-link:hover { background: var(--tint); color: var(--fg); opacity: 1; }
.d-link[aria-current="page"] { background: var(--tint); color: var(--link); font-weight: 600; opacity: 1; }
.d-ep .mtag { margin-top: 4px; }

/* method badges */
.mtag { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 34px; height: 16px; padding: 0 5px; border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.m-post { background: var(--post-bg); color: var(--post-fg); }
.m-get { background: var(--get-bg); color: var(--get-fg); }
.m-delete, .m-del { background: var(--del-bg); color: var(--del-fg); }
.d-link[aria-current="page"] .mtag.m-post { background: var(--post-on); color: #FFFFFF; }
.d-link[aria-current="page"] .mtag.m-get { background: var(--get-on); color: #FFFFFF; }
.d-link[aria-current="page"] .mtag.m-delete { background: var(--del-on); color: #FFFFFF; }

/* article */
.d-main { min-width: 0; }
.d-article { max-width: 768px; padding: 40px 48px 0; margin: 0 auto 0 0; }
.l-api .d-article { max-width: 680px; padding: 40px 40px 0 48px; }
.d-head { margin-bottom: 32px; }
.eyebrow { display: block; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--eyebrow); line-height: 20px; }
.d-title-row { display: flex; align-items: flex-start; gap: 16px; margin-top: 8px; }
.d-title { flex: 1; margin: 0; font-family: var(--din); font-weight: 500; font-size: 38px; line-height: 1.12; letter-spacing: -.02em; color: var(--fg); overflow-wrap: anywhere; }
.copy-page { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 10px; margin-top: 4px; border-radius: var(--r); font-size: 13px; font-weight: 500; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.copy-page:hover { color: var(--fg); background: var(--tint); }
.copy-page svg { width: 14px; height: 14px; }
.d-lead { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.d-lead:empty { display: none; }

/* ---------- prose ---------- */
.md { font-size: 16px; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 20px; }
.md h2 { margin: 48px 0 16px; font-family: var(--din); font-weight: 500; font-size: 26px; line-height: 1.25; letter-spacing: -.015em; color: var(--head); }
.md h3 { margin: 32px 0 12px; font-family: var(--geist); font-weight: 600; font-size: 19px; line-height: 1.4; letter-spacing: -.01em; color: var(--fg); }
.md h4 { margin: 24px 0 8px; font-weight: 600; font-size: 16px; color: var(--fg); }
.md strong { color: var(--fg); font-weight: 600; }
.md a { color: var(--link); font-weight: 500; text-decoration: underline; text-decoration-color: var(--faint); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--link); text-decoration-thickness: 2px; }
.md ul, .md ol { margin: 0 0 20px; padding-left: 24px; }
.md li { margin: 8px 0; padding-left: 4px; }
.md li::marker { color: var(--faint); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.md blockquote { margin: 0 0 20px; padding: 2px 0 2px 16px; border-left: 2px solid var(--line-2); color: var(--muted); }
.md code { font-family: var(--mono); font-size: .875em; padding: 2px 6px; border-radius: var(--r-sm); background: var(--code-inline-bg); color: var(--fg); overflow-wrap: anywhere; }
.md a code { color: inherit; }
.md p.soft { margin-top: -8px; font-size: 14px; }
.md h2 .count { display: inline-flex; vertical-align: middle; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--tint); font-family: var(--mono); font-size: 12px; line-height: 22px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* code blocks: white, 16 px radius, hairline (Mintlify) */
.md pre { position: relative; margin: 0 0 24px; padding: 16px 20px; border-radius: var(--r-lg); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: var(--fg); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.md pre code { display: block; padding: 0; background: none; border-radius: 0; font-size: inherit; color: inherit; white-space: pre; overflow-wrap: normal; word-break: normal; }
.copy-btn { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-2); font-family: var(--geist); font-size: 12px; font-weight: 500; color: var(--muted); opacity: 0; transition: opacity .12s; }
.md pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--fg); }
/* copy: icon button pinned to the block's corner (wrapper, not the scrolling pre) */
.pre-wrap { position: relative; margin: 0 0 24px; }
.pre-wrap > pre { margin: 0; padding-right: 52px; }
.copy-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 8px; color: var(--muted); background: var(--bg); transition: color .12s, background .12s; }
.pre-wrap > .copy-ic { position: absolute; top: 9px; right: 9px; box-shadow: inset 0 0 0 1px var(--line); opacity: .75; }
.pre-wrap:hover > .copy-ic, .copy-ic:focus-visible { opacity: 1; }
.copy-ic:hover { color: var(--link); background: var(--tint); }
.copy-ic svg { width: 15px; height: 15px; }
.copy-ic .i-done { display: none; }
.copy-ic.done { color: var(--ok); }
.copy-ic.done .i-copy { display: none; } .copy-ic.done .i-done { display: block; }
.code-bar .copy-ic { margin-left: auto; background: transparent; }
.lang-sel ~ .copy-ic { margin-left: 0; }
.tok-k { color: var(--tok-k); } .tok-s { color: var(--tok-s); } .tok-n { color: var(--tok-n); } .tok-c { color: var(--tok-c); } .tok-f { color: var(--tok-f); }

/* tables: rounded frame */
.md table { width: 100%; margin: 0 0 24px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; font-size: 14px; line-height: 1.6; }
.md th, .md td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.md tr:last-child td { border-bottom: 0; }
.md th { background: var(--tint); font-weight: 600; color: var(--fg); font-size: 13px; }
.md thead th:empty { padding: 0; height: 0; border: 0; }
.md td:first-child { color: var(--fg); }
.md td code { white-space: nowrap; }
.md .tbl, .md .table-wrap { overflow-x: auto; }

/* cards (Mintlify card group: 2 columns, 16 px radius, icon, title, text) */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 8px 0 28px; }
.card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 24px 22px; border-radius: var(--r-lg); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .15s, background .15s; }
.md a.card { color: inherit; font-weight: 400; text-decoration: none; }
a.card:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.card-ic { width: 24px; height: 24px; margin-bottom: 12px; color: var(--accent); stroke-width: 1.5; }
.card .t { font-family: var(--geist); font-weight: 600; font-size: 16px; line-height: 1.5; color: var(--fg); }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.card .eyebrow, .card .tk { display: none; }

/* numbered steps */
.steps { counter-reset: step; list-style: none; padding: 0 !important; margin: 0 0 24px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 20px 44px !important; margin: 0 !important; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 999px; background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--line-2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--eyebrow); }
.steps > li::after { content: ''; position: absolute; left: 14px; top: 34px; bottom: 6px; width: 1px; background: var(--line-2); }
.steps > li:last-child::after { display: none; }

/* callouts */
.note { display: block; margin: 0 0 24px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--tint); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; line-height: 1.6; }
.note .mono-s { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
.note.warn { background: var(--req-bg); box-shadow: inset 0 0 0 1px rgba(251, 77, 3, .25); }
.note.warn .mono-s { color: var(--req-fg); }
.note p { margin: 0; }

/* utility labels from the old kit, kept for existing content */
.mono-s { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.soft { color: var(--muted); }
.blue { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* code tabs container (.code[data-tabs]) inside the article */
.md .code { margin: 0 0 24px; border-radius: var(--r-lg); background: var(--well); box-shadow: inset 0 0 0 1px var(--line-2); padding: 3px; }
.code-bar { display: flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 8px 0 12px; }
.code-bar .label { font-size: 13px; font-weight: 600; color: var(--fg); }
.seg { display: flex; align-self: stretch; gap: 2px; }
.seg button { padding: 0 8px; border-bottom: 1.5px solid transparent; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { color: var(--link); border-bottom-color: var(--accent); }
.seg[hidden] { display: none !important; }
.code-bar .copy-btn { position: static; opacity: 1; margin-left: auto; box-shadow: none; background: transparent; height: 26px; }
.code-bar .copy-btn:hover { background: var(--tint); }
.lang-sel { margin-left: auto; height: 26px; padding: 0 22px 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
  appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 4 5 1.5 7.5 4M2.5 6 5 8.5 7.5 6' fill='none' stroke='%23757575' stroke-width='1.1'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; background-size: 10px; }
.lang-sel:hover { background-color: var(--tint); color: var(--fg); }
.lang-sel ~ .copy-btn { margin-left: 0; }
.code .pane { border-radius: 13px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.code .pane[hidden] { display: none; }
.code .pane pre { margin: 0; box-shadow: none; background: transparent; }
.code .pane pre .copy-btn { display: none; }

/* ---------- API pages ---------- */
/* endpoint bar: [POST / v1 / fetch] [Try it ▶] */
.ep2 { display: flex; gap: 6px; padding: 4px; margin: 0 0 32px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--bg); }
.ep2-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 8px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.ep2-m { flex: none; padding: 2px 8px; border-radius: 8px; font-family: var(--mono); font-weight: 600; font-size: 13px; line-height: 20px; letter-spacing: .02em; background: var(--post-bg); color: var(--post-fg); }
.ep2-m.m-get { background: var(--get-bg); color: var(--get-fg); } .ep2-m.m-delete { background: var(--del-bg); color: var(--del-fg); }
.ep2-p { font-family: var(--mono); font-size: 14px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep2-s { color: var(--faint); margin: 0 5px; }
.ep2-s:first-child { margin-left: 0; }
.ep2-try { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 38px; padding: 0 14px; border-radius: var(--r); background: var(--primary); color: var(--on-primary); font-family: var(--mono); font-weight: 500; font-size: 14px; transition: background .15s; }
.ep2-try:hover { background: var(--primary-hover); }
.ep2-try svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }

/* parameter sections */
.ph { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 48px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.md .ph h2 { margin: 0; font-family: var(--geist); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.ph-meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.params { margin: 0 0 8px; }
.pf { padding: 20px 0; border-bottom: 1px solid var(--line); }
.pf-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.md .pf-n { padding: 0; background: none; font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--link); }
.pf-t, .pf-req { padding: 0 7px; border-radius: var(--r-sm); font-family: var(--mono); font-size: 12px; line-height: 22px; }
.pf-t { background: var(--tint); color: var(--muted); }
.pf-req { background: var(--req-bg); color: var(--req-fg); }
.pf-d { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--text); }
.pf-c { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* right column on API pages: sticky stack of request / response cards */
.d-toc { min-width: 0; }
.rcards { position: sticky; top: var(--head-h); max-height: calc(100vh - var(--head-h)); overflow-y: auto; padding: 40px 0 32px 8px; scrollbar-width: none; }
.rc-stack { display: flex; flex-direction: column; gap: 24px; }
.rcards .code { margin: 0; padding: 3px; border-radius: var(--r-lg); background: var(--well); box-shadow: inset 0 0 0 1px var(--line-2); }
.rcards pre { font-size: 12.5px; line-height: 1.8; padding: 14px 16px; max-height: calc((100vh - var(--head-h) - 200px) / 2); overflow: auto; }
.rcards .code:first-child pre { max-height: 40vh; }

/* try-it form on POST /v1/fetch */
.try { margin: 8px 0 32px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; background: var(--bg); }
.try-in { padding: 20px 22px 22px; }
.try-out { background: var(--well); border-top: 1px solid var(--line); }
.try-out .code-bar { border-bottom: 1px solid var(--line); }
.try-empty { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 24px; font-family: var(--geist); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--muted); text-align: center; }
.try-out .result { margin: 0; }
.try-out pre { margin: 0; border-radius: 0; box-shadow: none; max-height: 520px; }

/* forms (get a key, try it, playground) */
.panel { margin: 8px 0 28px; padding: 22px 24px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--bg); }
.panel .card-t { font-weight: 600; font-size: 18px; color: var(--fg); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label, .play label { display: flex; flex-direction: column; gap: 6px; }
.form-grid label > span, .play label > span { font-size: 13px; font-weight: 500; color: var(--fg); }
.form-grid input, .play input, .play textarea { width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; outline: none; transition: box-shadow .12s; }
.form-grid input:focus, .play input:focus, .play textarea:focus { box-shadow: inset 0 0 0 1.5px var(--primary); }
.play textarea { height: auto; min-height: 150px; padding: 10px 12px; font-family: var(--mono); font-size: 13px; line-height: 1.6; resize: vertical; }
::placeholder { color: var(--faint); }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.status { font-size: 13px; font-weight: 500; color: var(--muted); }
.status.ok { color: var(--ok); } .status.bad { color: var(--bad); font-weight: 600; }
.result { margin-top: 16px; }
.result pre { max-height: 520px; overflow: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r); background: var(--primary); color: var(--on-primary);
  font-family: var(--mono); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--primary-hover); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.arrow::after { content: '\203A'; font-size: 16px; line-height: 1; }
.btn-line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-line:hover { background: var(--tint); }
.md a.btn { color: var(--on-primary); text-decoration: none; }
.md a.btn-line { color: var(--fg); }
.keybox { display: flex; align-items: stretch; margin-top: 12px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--primary); overflow: hidden; }
.md .keybox code { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 0; background: var(--tint); font-size: 14px; overflow-wrap: anywhere; }
.keybox .btn { border-radius: 0; height: auto; }
.key-meta { margin: 8px 0 12px; }

/* ---------- right: on this page ---------- */
.toc-in { position: sticky; top: var(--head-h); max-height: calc(100vh - var(--head-h)); overflow-y: auto; padding: 40px 16px 32px 40px; scrollbar-width: none; }
.toc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--fg); }
.toc-h svg { width: 15px; height: 15px; }
.toc-in a { display: block; padding: 5px 0; font-size: 14px; line-height: 1.45; color: var(--muted); transition: color .12s; }
.toc-in a:hover { color: var(--fg); }
.toc-in a.on { color: var(--link); font-weight: 500; }

/* ---------- pager and footer ---------- */
.pn-row { display: flex; justify-content: space-between; gap: 16px; margin: 64px 0 0; }
.pn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.pn:hover { color: var(--fg); }
.pn svg { width: 12px; height: 12px; stroke-width: 1.8; }
.d-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 40px; padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.d-foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.d-foot a:hover { color: var(--fg); }
.d-foot-c { font-family: var(--mono); font-size: 12px; }

/* ---------- Ask a question (sticky at the foot of the article, like Mintlify's assistant bar) ---------- */
.ask { position: sticky; bottom: 16px; z-index: 30; margin: 40px 0 0; }
.ask-in { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 16px; border-radius: var(--r-lg); background: var(--bg); box-shadow: 0 0 0 1px var(--line-2), 0 8px 24px -8px rgba(18, 60, 115, .18); }
.ask-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 15px; }
.ask-in button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--primary); color: var(--on-primary); flex: none; }
.ask-in button svg { width: 16px; height: 16px; stroke-width: 2; }
.ask-out { margin-bottom: 8px; max-height: min(52vh, 460px); overflow-y: auto; padding: 14px 16px; border-radius: var(--r-lg); background: var(--bg); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-lg); font-size: 14px; line-height: 1.6; }
.ask-out[hidden] { display: none; }
.ask-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--eyebrow); }
.ask-h button { font-family: var(--geist); font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.ask-p { display: block; padding: 10px 12px; margin: 0 -4px; border-radius: var(--r); }
.ask-p:hover { background: var(--tint); }
.ask-p b { display: block; font-weight: 600; color: var(--fg); }
.ask-p span { display: block; color: var(--muted); }
.ask-p mark { background: rgba(251, 77, 3, .16); color: inherit; border-radius: 3px; }
.ask-src { display: block; margin-top: 2px; font-size: 12px; color: var(--link); }

/* ---------- search and playground dialogs ---------- */
.search, .play-dlg { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search[hidden], .play-dlg[hidden] { display: none; }
.search-scrim, .play-scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(2px); }
.search-box, .play { position: relative; width: 100%; max-width: 640px; border-radius: var(--r-lg); background: var(--bg); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-lg); overflow: hidden; }
.search-in { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-in svg { width: 18px; height: 18px; flex: none; }
.search-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 16px; }
.search-in input::-webkit-search-cancel-button { display: none; }
.search-in kbd { padding: 2px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 11px; color: var(--muted); cursor: pointer; }
.search-res { max-height: min(60vh, 480px); overflow-y: auto; padding: 8px; }
.search-res:empty { display: none; }
.sr { display: block; padding: 10px 12px; border-radius: var(--r); }
.sr[aria-selected="true"], .sr:hover { background: var(--tint); }
.sr-g { display: block; font-size: 12px; color: var(--muted); }
.sr-t { display: block; font-size: 15px; font-weight: 600; color: var(--fg); }
.sr-d { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr mark { background: rgba(251, 77, 3, .16); color: inherit; border-radius: 3px; }
.sr-empty { padding: 24px 12px; text-align: center; font-size: 14px; color: var(--muted); }

.play { max-width: 760px; display: flex; flex-direction: column; max-height: 80vh; }
.play-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.play-h .ep2-p { flex: 1; }
.play-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--muted); }
.play-x:hover { background: var(--tint); color: var(--fg); }
.play-x svg { width: 16px; height: 16px; }
.play-b { display: flex; flex-direction: column; gap: 14px; padding: 16px; overflow-y: auto; }
.play-out { border-radius: var(--r); background: var(--well); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.play-out .code-bar { border-bottom: 1px solid var(--line); }
.play-out pre { margin: 0; padding: 14px 16px; max-height: 40vh; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--fg); background: var(--bg); }
.play-out pre code { white-space: pre; }
.play-note { font-size: 13px; color: var(--muted); margin: 0; }
.play-note a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .docs, .l-guide.no-toc .docs { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .d-toc { display: none; }
  .l-api .docs { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .l-api .d-toc { display: block; grid-column: 2; }
  .l-api .rcards { position: static; max-height: none; padding: 0 40px 40px 48px; max-width: 680px; }
  .rcards pre, .rcards .code:first-child pre { max-height: 420px; }
}
@media (max-width: 1023px) {
  .top-links { display: none; }
}
@media (max-width: 899px) {
  :root { --side-w: 0px; }
  .d-menu { display: inline-flex; }
  .docs, .l-api .docs, .l-guide.no-toc .docs { grid-template-columns: minmax(0, 1fr); }
  .l-api .d-toc { grid-column: 1; }
  .top-in, .tabs-row { padding: 0 16px; }
  .top-mid { justify-content: flex-end; }
  .search-btn { width: 36px; padding: 0; justify-content: center; box-shadow: none; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn:hover { background: var(--tint); box-shadow: none; }
  .cta { font-size: 12px; padding: 0 10px; }
  .d-side { position: fixed; top: var(--head-h); bottom: 0; left: 0; z-index: 70; width: min(86vw, 320px); background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .2s ease; }
  .d-side.open { transform: none; }
  .d-side-in { position: static; max-height: none; height: 100%; padding: 20px 12px 40px; }
  .d-scrim { position: fixed; inset: var(--head-h) 0 0 0; z-index: 65; background: var(--scrim); }
  .d-article, .l-api .d-article { padding: 28px 16px 0; max-width: none; }
  .l-api .rcards { padding: 0 16px 32px; max-width: none; }
  .d-title { font-size: 30px; }
  .copy-page span { display: none; }
  .cards, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .md table { display: block; overflow-x: auto; }
  .search, .play-dlg { padding-top: 8vh; }
}
@media (max-width: 479px) {
  .cta { display: none; }
}
