/* Munsit docs — shared theme (consolidated from the design templates) */
:root {
  --ground: oklch(0.985 0.004 300); --surface: oklch(0.995 0.002 300); --raise: oklch(0.975 0.005 300);
  --ink: oklch(0.25 0.03 295); --ink-2: oklch(0.44 0.03 295); --muted: oklch(0.57 0.02 295);
  --line: oklch(0.91 0.008 295); --line-2: oklch(0.86 0.01 295);
  --accent: oklch(0.55 0.20 288); --accent-2: oklch(0.47 0.20 288); --accent-tint: oklch(0.955 0.022 288); --accent-ink: oklch(0.995 0.002 300);
  --term: oklch(0.205 0.028 288); --term-2: oklch(0.255 0.03 288); --term-line: oklch(0.33 0.03 288); --term-ink: oklch(0.93 0.012 288); --term-muted: oklch(0.66 0.02 288);
  --term-inv: oklch(0.30 0.055 288);
  --ok: oklch(0.72 0.15 158); --warn: oklch(0.70 0.14 62); --danger: oklch(0.62 0.19 25);
  --m-post: oklch(0.55 0.20 288); --m-get: oklch(0.55 0.14 235); --m-wss: oklch(0.58 0.15 158);
  --c-kw: oklch(0.76 0.14 300); --c-str: oklch(0.82 0.11 168); --c-prop: oklch(0.80 0.09 235); --c-num: oklch(0.84 0.10 78); --c-com: oklch(0.60 0.02 288); --c-flag: oklch(0.78 0.06 288);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Code", "Roboto Mono", monospace;
  --r: 10px; --r-lg: 14px; --side: 262px; --toc: 236px; --topbar: 92px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ground: oklch(0.165 0.022 290); --surface: oklch(0.205 0.026 290); --raise: oklch(0.235 0.028 290);
  --ink: oklch(0.95 0.01 290); --ink-2: oklch(0.78 0.02 290); --muted: oklch(0.65 0.02 290);
  --line: oklch(0.30 0.02 290); --line-2: oklch(0.36 0.025 290);
  --accent: oklch(0.72 0.16 292); --accent-2: oklch(0.80 0.14 292); --accent-tint: oklch(0.27 0.045 290); --accent-ink: oklch(0.16 0.02 290);
  --term: oklch(0.135 0.02 290); --term-2: oklch(0.185 0.024 290); --term-line: oklch(0.28 0.025 290); --term-inv: oklch(0.24 0.05 290);
  --m-post: oklch(0.72 0.16 292); --m-get: oklch(0.70 0.12 235); --m-wss: oklch(0.72 0.14 158);
} }
:root[data-theme="dark"] {
  --ground: oklch(0.165 0.022 290); --surface: oklch(0.205 0.026 290); --raise: oklch(0.235 0.028 290);
  --ink: oklch(0.95 0.01 290); --ink-2: oklch(0.78 0.02 290); --muted: oklch(0.65 0.02 290);
  --line: oklch(0.30 0.02 290); --line-2: oklch(0.36 0.025 290);
  --accent: oklch(0.72 0.16 292); --accent-2: oklch(0.80 0.14 292); --accent-tint: oklch(0.27 0.045 290); --accent-ink: oklch(0.16 0.02 290);
  --term: oklch(0.135 0.02 290); --term-2: oklch(0.185 0.024 290); --term-line: oklch(0.28 0.025 290); --term-inv: oklch(0.24 0.05 290);
  --m-post: oklch(0.72 0.16 292); --m-get: oklch(0.70 0.12 235); --m-wss: oklch(0.72 0.14 158);
}
:root[data-theme="light"] {
  --ground: oklch(0.985 0.004 300); --surface: oklch(0.995 0.002 300); --raise: oklch(0.975 0.005 300);
  --ink: oklch(0.25 0.03 295); --ink-2: oklch(0.44 0.03 295); --muted: oklch(0.57 0.02 295);
  --line: oklch(0.91 0.008 295); --line-2: oklch(0.86 0.01 295);
  --accent: oklch(0.55 0.20 288); --accent-tint: oklch(0.955 0.022 288); --accent-ink: oklch(0.995 0.002 300);
  --term: oklch(0.205 0.028 288); --term-2: oklch(0.255 0.03 288); --term-line: oklch(0.33 0.03 288); --term-inv: oklch(0.30 0.055 288);
  --m-post: oklch(0.55 0.20 288); --m-get: oklch(0.55 0.14 235); --m-wss: oklch(0.58 0.15 158);
}

* { box-sizing: border-box; }
body { margin: 0; }
.page { background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; letter-spacing: -0.004em; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 620; text-wrap: balance; }
h1 { font-size: 2.1rem; line-height: 1.1; }
h2 { font-size: 1.22rem; line-height: 1.25; }
h3 { font-size: 13px; font-weight: 600; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 5px; }
.acc { color: var(--accent); font-weight: 550; }
code.i { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }

/* ---- top bar ---- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.tb-in { display: flex; align-items: center; gap: 18px; height: 54px; padding: 0 22px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
.brand .dot { width: 19px; height: 19px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); }
.brand .dot svg { width: 11px; height: 11px; display: block; }
.search { flex: 1; max-width: 400px; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: var(--ground); border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 10px; color: var(--muted); font-size: 13px; }
.search .k { margin-left: auto; font-family: var(--mono); font-size: 10.5px; border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.tb-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--ground); color: var(--ink-2); cursor: pointer; padding: 0; flex: none; }
.theme-btn:hover { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, var(--line-2)); }
.theme-btn svg { width: 16px; height: 16px; display: block; }
.tb-right a.q { font-size: 13.5px; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 550; font-size: 13px; padding: 7px 12px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-lg { font-size: 14.5px; padding: 11px 18px; border-radius: 10px; }
.tabrow { display: flex; align-items: center; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tabrow a { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 550; color: var(--muted); padding: 9px 12px 10px; border-bottom: 2px solid transparent; }
.tabrow a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---- shell / sidebar / toc ---- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--toc); align-items: start; }
.side { border-right: 1px solid var(--line); padding: 22px 14px 60px; position: sticky; top: var(--topbar); max-height: calc(100vh - var(--topbar)); overflow-y: auto; }
.sgrp { margin-bottom: 20px; }
.sgrp .st { font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0 10px; margin-bottom: 7px; }
.sgrp a { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding: 5px 10px; border-radius: 7px; }
.sgrp a:hover { background: var(--accent-tint); color: var(--accent); }
.sgrp a[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 550; }
.sgrp a .m { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; }

.main { padding: 34px 40px 80px; min-width: 0; max-width: 860px; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 7px; align-items: center; margin-bottom: 12px; }
.crumb b { color: var(--ink-2); font-weight: 500; }
.lede { color: var(--ink-2); font-size: 1.02rem; margin-top: 12px; max-width: 62ch; }
.sec { margin-top: 40px; scroll-margin-top: calc(var(--topbar) + 14px); }
[id] { scroll-margin-top: calc(var(--topbar) + 14px); }
.sec-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.sec-h .n { font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 600; border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--line-2)); background: var(--accent-tint); border-radius: 5px; padding: 1px 6px; }
.sec-p { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; max-width: 68ch; }
.sec-p b { color: var(--ink); }

.toc { padding: 34px 24px 60px 28px; position: sticky; top: var(--topbar); max-height: calc(100vh - var(--topbar)); overflow-y: auto; }
.toc .tt { font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 13px; }
.toc a { display: block; font-size: 12.5px; line-height: 1.45; color: var(--muted); padding: 6px 0 6px 14px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--accent); }
.toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); }

/* ---- code console ---- */
.console { border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; background: var(--ground); }
.tabs, .langs { display: flex; gap: 2px; padding: 7px 7px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab, .lang { font: inherit; font-size: 12.5px; font-weight: 550; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lang { font-family: var(--mono); }
.tab:hover, .lang:hover { color: var(--accent); }
.tab[aria-selected="true"], .lang[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab .verb { font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: var(--raise); color: var(--muted); border: 1px solid var(--line-2); font-weight: 500; }
.tab[aria-selected="true"] .verb { background: var(--accent-tint); color: var(--accent); border-color: color-mix(in oklab, var(--accent) 35%, var(--line-2)); }
.term { background: var(--term); font-family: var(--mono); font-size: 12.5px; line-height: 1.75; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--term-line); }
.term-bar .lbl { font-size: 10.5px; color: var(--term-muted); }
.legend { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; color: var(--term-muted); margin-left: 14px; }
.legend .sw { display: block; width: 18px; height: 10px; border-radius: 3px; background: var(--term-inv); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent); flex: none; }
.term-bar .copy { margin-left: auto; font: inherit; font-size: 10.5px; color: var(--term-muted); background: transparent; border: 1px solid var(--term-line); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.code { padding: 16px; color: var(--term-ink); white-space: pre; overflow-x: auto; }
.code[hidden] { display: none; }
.code .ln { display: block; }
.inv { background: var(--term-inv); border-radius: 4px; padding: 1px 3px; box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent); }
.term-out { border-top: 1px solid var(--term-line); padding: 12px 16px 14px; background: var(--term-2); }
.term-out .lbl { font-size: 10px; color: var(--term-muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.term-out .body { color: var(--term-ink); white-space: pre; overflow-x: auto; font-size: 12px; line-height: 1.7; }
.kw { color: var(--c-kw); } .str { color: var(--c-str); } .pj, .prop-j { color: var(--c-prop); } .num { color: var(--c-num); } .com { color: var(--c-com); } .flag { color: var(--c-flag); } .fn { color: var(--term-ink); }
.ar { unicode-bidi: isolate; direction: rtl; }
.keyline { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--raise); border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.keyline .lnk { margin-left: auto; color: var(--accent); font-weight: 550; }

/* ---- tables ---- */
.wrapx { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--raise); padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td code, .tbl td .mono { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.tbl td b { color: var(--ink); font-weight: 600; }
.tbl td a { color: var(--accent); font-weight: 550; }

/* ---- callouts ---- */
.call { border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--surface); padding: 13px 15px; font-size: 13px; color: var(--ink-2); display: flex; gap: 11px; }
.call.warn { border-left-color: var(--danger); }
.call svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent); }
.call.warn svg { color: var(--danger); }
.call b { color: var(--ink); font-weight: 600; }
.call code { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.call a { color: var(--accent); font-weight: 550; }

/* ---- AI / Markdown note (foot of every page, from scripts/chrome.mjs) ---- */
.ai-note { display: flex; gap: 11px; align-items: flex-start; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.ai-note svg { width: 14px; height: 14px; flex: none; margin-top: 5px; color: var(--accent); }
.ai-note b { color: var(--ink); font-weight: 600; }
.ai-note code { font-family: var(--mono); font-size: 11.5px; padding: 1px 5px; border-radius: 5px; background: var(--accent-tint); color: var(--accent); }
.ai-note a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.ai-note a:hover { color: var(--accent); }

/* ---- format chips ---- */
.fmts { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt { font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--raise); border: 1px solid var(--line-2); color: var(--ink-2); }
.fmt.hi { background: var(--accent-tint); border-color: color-mix(in oklab, var(--accent) 35%, var(--line-2)); color: var(--accent); font-weight: 550; }

/* ---- next / branch cards ---- */
.nextgrid, .branch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.nx, .br { border: 1px solid var(--line-2); border-radius: var(--r); padding: 13px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.nx:hover, .br:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--line-2)); }
.nx .t, .br .t { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.nx .d, .br .d { font-size: 12px; color: var(--muted); }
.nx .p, .br .p { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-top: 3px; }
.br .ic, .nx .ic { width: 14px; height: 14px; color: var(--accent); flex: none; }

/* ---- endpoint map (introduction) ---- */
/* Was `repeat(3, 1fr)`: grid items default to min-width:auto, so those tracks
   were pinned open by their longest endpoint path and could not shrink. Three
   columns wanted 812px inside a .main capped at 860px — .map tops out at 780px —
   so the grid overflowed at every viewport width and overflow:hidden silently
   ate the third column.
   auto-fit sizes off the space actually available rather than the viewport,
   which matters because .main gets *wider* below 1180px when the TOC hides:
   three columns at full width, two when the TOC squeezes it, one on a phone —
   and never four, since 780px cannot hold four 230px tracks. The path spans
   below wrap so they no longer set a floor, and overflow-x is a backstop so
   content can never again be clipped out of reach. */
.map { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; overflow-y: hidden; }
.map .grp { background: var(--ground); padding: 15px 15px 17px; margin: 0; min-width: 0; }
.map .grp .gh { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; border-radius: 6px; padding: 2px 5px; margin-left: -5px; }
.map .grp .gh:hover { background: var(--accent-tint); }
.map .grp .gh h3 { color: var(--ink); }
.map .grp .gh .ga { font-family: var(--mono); font-size: 11px; color: var(--muted); opacity: 0; transition: opacity .12s ease; }
.map .grp .gh:hover .ga { opacity: 1; color: var(--accent); }
.map .grp .sub { font-size: 11px; color: var(--muted); font-family: var(--mono); margin: 0 0 11px 0; }
.map .grp ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.map .grp li a { display: flex; align-items: baseline; gap: 7px; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.map .grp li a:hover { background: var(--accent-tint); color: var(--accent); }
/* Endpoint paths are long and mono with no natural break points, so they are
   what forced the grid open. Let them wrap — a path spilling onto a second line
   reads fine; a column sliced off the page does not. */
.map .grp li a .p { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: auto; min-width: 0; overflow-wrap: anywhere; }

/* ---- path cards (introduction) ---- */
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.path { border: 1px solid var(--line-2); border-radius: var(--r); padding: 15px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 5px; }
.path:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--line-2)); }
.path .t { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.path .d { font-size: 12.5px; color: var(--muted); }
.path .c { font-family: var(--mono); font-size: 11.5px; color: var(--accent); margin-top: 5px; }
.path .ic { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* ---- deploy strip ---- */
.deploy { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raise); padding: 14px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.deploy .t { font-size: 13px; color: var(--ink-2); }
.deploy .t b { color: var(--ink); font-weight: 600; }
.deploy .ls { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.deploy .ls a { font-size: 12.5px; color: var(--accent); font-weight: 550; }

/* ---- numbered steps (quickstart, audio narrative) ---- */
/* `position: relative` on both of these is load-bearing, and the base `.steps` rule had
   gone missing — only the mobile override at the bottom of this file was left, which is
   why it still declares a padding for a rule that no longer existed. Without them the
   rail and every badge resolve against `.main` (positioned, for the Copy Page button):
   the rail stretched the whole page and all the badges stacked in one spot off to the
   left. The 46px gutter is what lines the two up — the rail sits at left:15px inside it
   and each badge is pulled back to left:-46px, so both centre on the same 18px. */
/* margin-top mirrors `.sec`: on a .sec page the first section's own margin is what
   separates it from the lede, and .steps stands in that same slot on quickstart —
   without it the first step butted straight into the lede. */
.steps { position: relative; margin-top: 40px; padding-left: 46px; }
/* padding, not margin, so the gap stays inside .steps and the rail runs through it.
   The last step trims this inline (`style="padding-bottom:8px"` in quickstart.html),
   which is the only reason that attribute is there. 40px matches `.sec`. */
.step { position: relative; padding-bottom: 40px; }
.steps::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 60px; width: 2px; background: var(--line); border-radius: 2px; }
/* `>`, not a descendant selector: `.num` is *also* the syntax highlighter's class for a
   numeric literal (see .num under "syntax" above), so `.step .num` was turning every
   200 and 4.56 in a step's own code sample into a purple badge. */
.step > .num { position: absolute; left: -46px; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.step > .num.done { background: var(--ok); }
/* The step heading and body mirror .sec-h / .sec-p, which is the rhythm every other
   page uses. `.step-p b` below is what gives this away: it only means something if
   .step-p itself is muted, exactly as .sec-p b pairs with .sec-p. */
.step-h { margin-bottom: 6px; }
.step-p { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; max-width: 68ch; }
.step-p b { color: var(--ink); }
.regions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.regions button.br { font: inherit; text-align: left; width: 100%; background: var(--surface); color: inherit; cursor: pointer; }
.regions .br { cursor: pointer; }
.br[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.br[aria-selected="true"] .t { color: var(--accent); }

/* ---- HTTP verb pills ---- */
.verb { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; color: var(--accent-ink); }
.verb.post { background: var(--m-post); } .verb.get { background: var(--m-get); } .verb.wss { background: var(--m-wss); } .verb.del { background: var(--danger); }

/* ---- single endpoint shown in the terminal box ---- */
.ep-term { position: relative; }
.ep-term .code { padding-right: 70px; }
.ep-copy-in { position: absolute; top: 9px; right: 10px; z-index: 1; font: inherit; font-size: 10px; color: var(--term-muted); background: var(--term); border: 1px solid var(--term-line); border-radius: 5px; padding: 3px 8px; cursor: pointer; }
.ep-copy-in:hover { color: var(--accent-2); border-color: color-mix(in oklab, var(--accent) 45%, var(--term-line)); }
.code .ep-base { color: var(--term-muted); }
.code .ep-p { color: var(--term-ink); }

/* ---- endpoint list rendered inside the terminal box ---- */
.term-bar .count { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--term-muted); }
.eplist { padding: 6px; }
.ep { display: block; padding: 9px 12px; border-radius: 8px; }
.ep + .ep { margin-top: 1px; }
.ep:hover { background: var(--term-2); }
.ep-top { display: flex; align-items: center; gap: 10px; }
.ep .verb { flex: none; }
.ep-path { font-family: var(--mono); font-size: 12.5px; color: var(--term-ink); overflow-wrap: anywhere; }
.ep-arrow { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--term-muted); opacity: 0; transition: opacity .12s ease; flex: none; }
.ep:hover .ep-arrow { opacity: 1; color: var(--accent-2); }
.ep-d { font-family: var(--font); font-size: 12px; color: var(--term-muted); margin-top: 3px; }

/* ---- endpoint example blocks (reference pages) ---- */
.exgrp { margin-bottom: 34px; }
.exgrp-h { display: flex; align-items: baseline; gap: 11px; margin-bottom: 4px; flex-wrap: wrap; }
.exgrp-h .c { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.exgrp-p { font-size: 13px; color: var(--muted); margin-bottom: 15px; }
.ex { border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px; background: var(--surface); }
.ex-h { display: flex; align-items: center; gap: 11px; padding: 11px 14px; flex-wrap: wrap; }
.ex-h .nm { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ex-h .ds { font-size: 12.5px; color: var(--muted); }
.ex-h .meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.ex-h .path { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.ex-code { background: var(--term); font-family: var(--mono); font-size: 12px; line-height: 1.75; position: relative; }
.ex-code pre { margin: 0; padding: 14px 16px; color: var(--term-ink); white-space: pre; overflow-x: auto; }
.ex-code .cp { position: absolute; top: 9px; right: 10px; font: inherit; font-size: 10px; color: var(--term-muted); background: var(--term); border: 1px solid var(--term-line); border-radius: 5px; padding: 2px 7px; cursor: pointer; }
.ex-code .cp:hover { color: var(--accent-2); }

/* ---- search box + modal ---- */
.search { cursor: pointer; }
.search:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--line-2)); color: var(--accent); }
.sm { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; font-family: var(--font); letter-spacing: -0.004em; -webkit-font-smoothing: antialiased; color: var(--ink); }
.sm[hidden] { display: none; }
.sm-back { position: absolute; inset: 0; background: color-mix(in oklab, black 45%, transparent); backdrop-filter: blur(2px); }
.sm-panel { position: relative; width: 100%; max-width: 580px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 30px 80px -30px color-mix(in oklab, black 60%, transparent); overflow: hidden; display: flex; flex-direction: column; max-height: 72vh; }
.sm-in { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.sm-in svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.sm-in input { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; outline: none; }
.sm-in input::placeholder { color: var(--muted); }
.sm-esc { font-family: var(--mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 6px; }
.sm-results { overflow-y: auto; padding: 6px; }
.sm-msg { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.sm-r { display: block; padding: 9px 12px; border-radius: var(--r); border: 1px solid transparent; }
.sm-r + .sm-r { margin-top: 2px; }
.sm-r .sm-r-u { font-size: 11px; color: var(--muted); font-family: var(--mono); margin-bottom: 2px; }
.sm-r .sm-r-t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sm-r .sm-r-x { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.sm-r .sm-r-x mark { background: var(--accent-tint); color: var(--accent); border-radius: 3px; padding: 0 2px; }
.sm-r.sel, .sm-r:hover { background: var(--accent-tint); border-color: color-mix(in oklab, var(--accent) 30%, var(--line-2)); }
.sm-r.sel .sm-r-t { color: var(--accent); }
.sm-foot { display: flex; align-items: center; gap: 16px; padding: 9px 15px; border-top: 1px solid var(--line); background: var(--raise); font-size: 11px; color: var(--muted); }
.sm-foot .sp { margin-left: auto; }
.sm-foot b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); }
html[data-view="mobile"] .search { display: none; }

/* ---- video hero ---- */
.video-hero { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--term); aspect-ratio: 16 / 9; }
.video-hero iframe { width: 100%; height: 100%; display: block; border: 0; }
.toc .video-hero { margin: 0 0 24px; }
/* intro page gives the right rail extra room for the intro video */
.page-intro { --toc: 400px; }

/* ---- empty state ---- */
.empty { margin-top: 40px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); padding: 54px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.empty svg { width: 30px; height: 30px; color: var(--muted); }
.empty .t { font-size: 15px; font-weight: 600; color: var(--ink); }
.empty .d { font-size: 13px; color: var(--muted); max-width: 46ch; }

/* ---- motion / responsive ---- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.16s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; } }

/* ---- mobile nav: hamburger + drawer scrim (base; the max-width:900px query flips display) ---- */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; flex: none; background: transparent; border: 1px solid var(--line-2); border-radius: 9px; color: var(--ink-2); cursor: pointer; }
.nav-toggle:hover { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 40%, var(--line-2)); background: var(--accent-tint); }
.nav-toggle svg { width: 18px; height: 18px; display: block; }
.nav-scrim { position: fixed; inset: var(--topbar) 0 0 0; z-index: 55; background: color-mix(in oklab, black 45%, transparent); opacity: 0; visibility: hidden; transition: opacity .2s ease; }
html.nav-open .nav-scrim { opacity: 1; visibility: visible; }
html.nav-open { overflow: hidden; }

@media (max-width: 1180px) { .shell { grid-template-columns: var(--side) minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  /* sidebar becomes an off-canvas drawer, opened by the hamburger */
  .side {
    position: fixed; top: var(--topbar); left: 0; bottom: 0; z-index: 60;
    width: 300px; max-width: 84vw; max-height: none;
    background: var(--surface); border-right: 1px solid var(--line);
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 20px 60px -20px color-mix(in oklab, black 55%, transparent);
  }
  html.nav-open .side { transform: translateX(0); }
  .main { padding: 22px 18px 50px; }
  .map, .paths, .nextgrid, .branch, .regions { grid-template-columns: 1fr; }
  .steps { padding-left: 38px; }
  .step > .num { left: -38px; width: 26px; height: 26px; font-size: 12px; }
  /* the badge shrinks to 26px here, so the rail has to move in with it to stay centred */
  .steps::before { left: 12px; }
  body { overflow-x: hidden; }               /* guard against any stray horizontal scroll */
  .tb-in { gap: 12px; padding: 0 14px; }
  .tabrow { padding: 0 14px; }
}
/* phones: the topbar row can't fit hamburger + logo + Dashboard + CTA + theme */
@media (max-width: 560px) {
  .tb-in { gap: 9px; padding: 0 12px; }
  .tb-right { gap: 7px; }
  .tb-right a.q { display: none; }           /* drop secondary "Dashboard" link (nav covers it) */
  .tb-in .btn-primary { padding: 7px 10px; font-size: 12.5px; }
  .brand .brand-logo { height: 22px; }
  .nav-toggle { width: 34px; height: 34px; }
}

html[data-view="mobile"] .page { width: 402px; margin: 0 auto; overflow-x: hidden; }
html[data-view="mobile"] .shell { grid-template-columns: 1fr; }
html[data-view="mobile"] .side, html[data-view="mobile"] .toc, html[data-view="mobile"] .search { display: none; }
html[data-view="mobile"] .main { padding: 22px 18px 50px; }
html[data-view="mobile"] .map, html[data-view="mobile"] .paths, html[data-view="mobile"] .nextgrid, html[data-view="mobile"] .branch, html[data-view="mobile"] .regions { grid-template-columns: 1fr; }
/* Changelog stacks the same way it does under the real @media rule below —
   the preview sets a page width, which never triggers a viewport media query. */
html[data-view="mobile"] .cl-entry { grid-template-columns: 1fr; gap: 10px; padding: 20px 0; }
html[data-view="mobile"] .cl-change { grid-template-columns: 1fr; gap: 6px; }
html[data-view="mobile"] .cl-type { justify-self: start; }
html[data-view="mobile"] .cl-type-cont { display: none; }
html[data-view="mobile"] .term { font-size: 10.5px; }

/* ---- sidebar search (moved above Get started) ---- */
.side .search { max-width: none; width: 100%; margin: 0 0 16px; }


/* ---- Introduction "whole surface": visible arrow so items read as clickable ---- */
.map .grp li a::after { content: "→"; margin-left: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); opacity: .5; flex: none; }
.map .grp li a:hover::after { opacity: 1; color: var(--accent); }


/* ---- "Copy Page" dropdown (top-right of every page) ---- */
.main { position: relative; }
.copy-page { position: absolute; top: 30px; right: 40px; z-index: 6; display: inline-flex; align-items: stretch; }
.copy-page .cp-main { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-right: 0; border-radius: 8px 0 0 8px; padding: 6px 11px; cursor: pointer; }
.copy-page .cp-caret { display: inline-flex; align-items: center; justify-content: center; width: 28px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 0 8px 8px 0; color: var(--muted); cursor: pointer; padding: 0; }
.copy-page .cp-main:hover, .copy-page .cp-caret:hover { background: var(--accent-tint); border-color: color-mix(in oklab, var(--accent) 40%, var(--line-2)); color: var(--accent); }
.copy-page .cp-main svg { width: 14px; height: 14px; flex: none; }
.copy-page .cp-caret svg { width: 13px; height: 13px; }
.cp-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 216px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 22px 55px -26px color-mix(in oklab, black 60%, transparent); padding: 5px; z-index: 30; }
.cp-menu[hidden] { display: none; }
.cp-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; font: inherit; font-size: 13px; color: var(--ink-2); background: transparent; border: 0; border-radius: 7px; padding: 7px 9px; cursor: pointer; }
.cp-item:hover { background: var(--accent-tint); color: var(--accent); }
.cp-item svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.cp-item:hover svg { color: var(--accent); }
/* keep Copy Page absolute + top-right on mobile so the dropdown anchors to the button */
@media (max-width: 900px) { .copy-page { top: 16px; right: 16px; } }

/* ---- inline endpoint in the section header (lighter text) ---- */
.sec-h .ep-inline { font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-weight: 500; align-self: center; overflow-wrap: anywhere; }
.sec-h .ep-inline b { color: var(--ink-2); font-weight: 650; }

/* endpoint on its own line under the "Endpoint" heading */
.ep-line { font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-weight: 500; margin: 4px 0 2px; overflow-wrap: anywhere; }
.ep-line b { color: var(--ink-2); font-weight: 650; }

/* ---- purple hover everywhere (elements without an explicit hover) ---- */
.tabrow a:not([aria-current="page"]):hover { color: var(--accent); }
.tb-right a.q:hover { color: var(--accent); }
.brand:hover { color: var(--accent); }
.term-bar .copy:hover { color: var(--accent-2); border-color: color-mix(in oklab, var(--accent) 45%, var(--term-line)); }
/* `:not(.btn)` because a button is not a link for hover purposes: this rule was
   repainting the CTA's label to --accent-2 on top of its --accent background — 1.3:1,
   which reads as the text vanishing. A button shifts its background and keeps its ink. */
.crumb a:hover, .main a:not(.btn):hover { color: var(--accent-2); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--line-2)); color: var(--accent); }
.deploy .ls a:hover, .keyline .lnk:hover { color: var(--accent-2); }
.sm-esc, .search .k { transition: color .12s; }
.ep:hover { background: color-mix(in oklab, var(--accent) 14%, var(--term-2)); }

/* ---- brand logo (real purple wordmark, works on both themes) ---- */
.brand .brand-logo { height: 26px; width: auto; display: block; }
.brand:hover .brand-logo { opacity: 0.82; }


/* ═══════════════ Changelog ═══════════════ */
.changelog { margin-top: 6px; }
/* Single column: a 150px date rail cost more width than it earned — the body was
   left with ~510px of a 860px page. Date and version sit inline above the title. */
.cl-entry { padding: 38px 0; border-top: 1px solid var(--line); }
.cl-entry:first-child { border-top: 0; padding-top: 12px; }
.cl-meta { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-bottom: 7px; }
.cl-date { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cl-ver { display: inline-block; width: fit-content; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--line-2)); }
.cl-title { font-size: 18px; margin: 0 0 14px; }
.cl-list { list-style: none; margin: 0; padding: 0 0 0 2px; display: flex; flex-direction: column; gap: 12px; }
/* Fixed label column: every row's text shares one left edge, whatever the label. */
.cl-change { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: start; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.cl-text > code { overflow-wrap: anywhere; }
.cl-type { justify-self: end; margin-top: 2px; font-size: 10px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; border: 1px solid transparent; }
/* Continuation rows in a group: keep the column, drop the repeated label. */
.cl-type-cont { padding: 0; border: 0; background: none; }
/* Extra air between type groups so each reads as one block. */
.cl-change + .cl-row-lead { margin-top: 14px; }
.cl-type-new { color: #16a34a; background: color-mix(in oklab, #22c55e 15%, transparent); }
.cl-type-improved { color: var(--accent); background: var(--accent-tint); }
.cl-type-fixed { color: #b45309; background: color-mix(in oklab, #f59e0b 17%, transparent); }
.cl-type-api { color: var(--ink); background: var(--raise); border-color: var(--line-2); }
.cl-type-deprecated { color: #dc2626; background: color-mix(in oklab, #ef4444 14%, transparent); }
@media (max-width: 700px) {
  .cl-entry { grid-template-columns: 1fr; gap: 10px; padding: 20px 0; }
  .cl-change { grid-template-columns: 1fr; gap: 5px; }
  .cl-type { justify-self: start; }
  .cl-type-cont { display: none; }
}

/* ═══════════════ Status ═══════════════ */
@keyframes st-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }




/* ── 90-day uptime bars ── */
.uptime { margin-top: 4px; }
.up-list { display: flex; flex-direction: column; gap: 22px; }
.up-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 8px; }
.up-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.up-region { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.up-pct { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
/* One flex track of 90 bars: they share the width, so it stays whole at any size. */
.up-bars { display: flex; gap: 2px; align-items: stretch; height: 34px; }
.up-b { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--line-2); transition: transform 0.08s ease; }
.up-bars .up-b:hover { transform: scaleY(1.12); }
.up-b-operational { background: var(--ok); }
.up-b-degraded { background: var(--warn); }
.up-b-down { background: var(--danger); }
.up-b-nodata { background: var(--line-2); }
.up-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.up-key { display: inline-flex; align-items: center; gap: 5px; }
.up-key .up-b { flex: none; width: 9px; height: 9px; border-radius: 2px; margin: 0 4px 0 12px; }
.up-key .up-b:first-child { margin-left: 0; }

/* ── incident history ── */
.inc-empty { display: flex; flex-direction: column; gap: 4px; padding: 26px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; }
.inc-empty .t { font-weight: 600; }
.inc-empty .d { font-size: 13.5px; color: var(--muted); }
.inc { padding: 24px 0; border-top: 1px solid var(--line); }
.inc:first-of-type { border-top: 0; padding-top: 6px; }
.inc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inc-title { font-size: 16px; font-weight: 620; }
.inc-sev { font-size: 10px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; flex: none; }
.inc-sev-outage { color: #dc2626; background: color-mix(in oklab, #ef4444 14%, transparent); }
.inc-sev-degraded { color: #b45309; background: color-mix(in oklab, #f59e0b 17%, transparent); }
.inc-sev-maintenance { color: var(--accent); background: var(--accent-tint); }
.inc-meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.inc-affected { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.inc-chip { font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: var(--raise); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 7px; }
.inc-updates { list-style: none; margin: 16px 0 0; padding: 0 0 0 15px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.inc-update { display: grid; grid-template-columns: 170px 96px minmax(0, 1fr); gap: 14px; align-items: start; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.inc-when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.inc-status { justify-self: start; font-size: 10px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-top: 1px; }
.inc-s-investigating { color: #b45309; background: color-mix(in oklab, #f59e0b 17%, transparent); }
.inc-s-identified { color: var(--accent); background: var(--accent-tint); }
.inc-s-monitoring { color: var(--m-get); background: color-mix(in oklab, oklch(0.55 0.14 235) 14%, transparent); }
.inc-s-resolved { color: #16a34a; background: color-mix(in oklab, #22c55e 15%, transparent); }
.inc-body a { color: var(--accent); font-weight: 550; }
@media (max-width: 700px) {
  .up-bars { height: 28px; gap: 1px; }
  .inc-update { grid-template-columns: 1fr; gap: 5px; }
}
html[data-view="mobile"] .up-bars { height: 28px; gap: 1px; }
html[data-view="mobile"] .inc-update { grid-template-columns: 1fr; gap: 5px; }

/* ── YouTube facade (click-to-load; no third-party cookies until play) ── */
.yt-lite { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: var(--term); }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-lite .yt-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; opacity: 0.92; transition: opacity 0.15s ease, transform 0.15s ease; }
.yt-lite:hover .yt-play { opacity: 1; transform: scale(1.06); }
.yt-lite .yt-play svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35)); }
