/*
 * docs.zanora.dev — a Mintlify-shaped layout in the console's palette
 * (design/zanora-console.html): Chakra Petch for display, IBM Plex Sans for
 * prose, JetBrains Mono for anything read character by character. Light and
 * dark from the same tokens; code blocks stay dark in both, as terminals do.
 */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #f3f6f9;
  --line: #e4e9ef;
  --line-2: #d3dbe4;
  --text: #0f1720;
  --text-2: #3a4756;
  --muted: #5b6b7c;
  --faint: #8594a4;
  --accent: #1675c9;
  --accent-strong: #0f5fa6;
  --accent-soft: rgba(22, 117, 201, 0.09);
  --accent-ink: #ffffff;
  --ok: #178a55;
  --ok-soft: rgba(23, 138, 85, 0.08);
  --warn: #a86b00;
  --warn-soft: rgba(214, 150, 20, 0.1);
  --bad: #c53b3b;
  --bad-soft: rgba(197, 59, 59, 0.08);
  --info: #5b6b7c;
  --info-soft: rgba(91, 107, 124, 0.08);
  --code-bg: #0d1219;
  --code-head: #121922;
  --code-line: #1f2b38;
  --code-text: #dde6ee;
  --inline-code-bg: #eef2f6;
  --inline-code-text: #1b3a57;
  --shadow: 0 1px 2px rgba(15, 23, 32, 0.05), 0 8px 24px rgba(15, 23, 32, 0.06);
  --topbar-bg: rgba(255, 255, 255, 0.86);

  --font-display: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --topbar-h: 58px;
  --tabs-h: 42px;
  --head-h: calc(var(--topbar-h) + var(--tabs-h));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e13;
    --bg-soft: #0d1219;
    --surface: #121922;
    --surface-2: #18212c;
    --line: #1f2b38;
    --line-2: #2a3847;
    --text: #e6edf3;
    --text-2: #c3cfdb;
    --muted: #8193a6;
    --faint: #5f7184;
    --accent: #62b4f5;
    --accent-strong: #8cc8f8;
    --accent-soft: rgba(98, 180, 245, 0.12);
    --accent-ink: #06121d;
    --ok: #4cc38a;
    --ok-soft: rgba(76, 195, 138, 0.1);
    --warn: #e5b04b;
    --warn-soft: rgba(229, 176, 75, 0.1);
    --bad: #ee6c6c;
    --bad-soft: rgba(238, 108, 108, 0.1);
    --info: #8193a6;
    --info-soft: rgba(129, 147, 166, 0.1);
    --code-bg: #0d1219;
    --code-head: #111820;
    --inline-code-bg: #18212c;
    --inline-code-text: #cfe3f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --topbar-bg: rgba(10, 14, 19, 0.86);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e13;
  --bg-soft: #0d1219;
  --surface: #121922;
  --surface-2: #18212c;
  --line: #1f2b38;
  --line-2: #2a3847;
  --text: #e6edf3;
  --text-2: #c3cfdb;
  --muted: #8193a6;
  --faint: #5f7184;
  --accent: #62b4f5;
  --accent-strong: #8cc8f8;
  --accent-soft: rgba(98, 180, 245, 0.12);
  --accent-ink: #06121d;
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, 0.1);
  --warn: #e5b04b;
  --warn-soft: rgba(229, 176, 75, 0.1);
  --bad: #ee6c6c;
  --bad-soft: rgba(238, 108, 108, 0.1);
  --info: #8193a6;
  --info-soft: rgba(129, 147, 166, 0.1);
  --code-bg: #0d1219;
  --code-head: #111820;
  --inline-code-bg: #18212c;
  --inline-code-text: #cfe3f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --topbar-bg: rgba(10, 14, 19, 0.86);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 var(--font-body);
  -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); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
code, kbd, pre { font-family: var(--font-mono); font-variant-ligatures: none; }
.ic { width: 16px; height: 16px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 12px; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-row {
  height: var(--topbar-h);
  max-width: 1480px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 17px/1 var(--font-display);
}
.brand-name { font: 600 18px/1 var(--font-display); letter-spacing: 0.02em; }
.brand-sub {
  font: 500 11px/1 var(--font-mono); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 8px; margin-left: 2px;
}
.search-trigger {
  display: flex; align-items: center; gap: 10px;
  margin: 0 auto; width: min(420px, 100%);
  height: 38px; padding: 0 10px 0 12px;
  background: var(--bg-soft); color: var(--faint);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; text-align: left;
  transition: border-color 0.15s;
}
.search-trigger:hover { border-color: var(--line-2); }
.search-trigger span { flex: 1; }
kbd {
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; background: var(--surface);
}
.topbar-links { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar-links a.tl-quiet { color: var(--muted); font-size: 14px; padding: 6px 8px; border-radius: 6px; }
.topbar-links a.tl-quiet:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.btn-primary {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; margin-left: 4px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 14px;
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.07); }
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .ic { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.nav-toggle { display: none; }

.tabs {
  height: var(--tabs-h);
  max-width: 1480px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: flex; align-items: center; white-space: nowrap;
  color: var(--muted); font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout {
  max-width: 1480px; margin: 0 auto;
  display: grid; grid-template-columns: 272px minmax(0, 1fr);
}
.sidebar {
  position: sticky; top: var(--head-h);
  height: calc(100vh - var(--head-h));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 16px 48px 24px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.sidebar-tabs { display: none; }
.nav-group + .nav-group { margin-top: 26px; }
.nav-label {
  margin: 0 0 8px 10px;
  font: 600 12.5px/1.2 var(--font-body); color: var(--text); letter-spacing: 0.01em;
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a {
  display: block; padding: 6px 10px; border-radius: 8px;
  color: var(--muted); font-size: 14px; line-height: 1.45;
}
.nav-group a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-group a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 500; }

.content {
  display: grid; grid-template-columns: minmax(0, 760px) 232px;
  gap: 56px; justify-content: center;
  padding: 40px 40px 80px;
}
article { min-width: 0; }

/* ── Page head ───────────────────────────────────────────────────────────── */
.eyebrow { margin: 0 0 8px; font: 600 13px/1.3 var(--font-body); color: var(--accent); }
.title-row { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; }
h1 {
  margin: 0; font: 600 clamp(28px, 3.4vw, 36px)/1.15 var(--font-display);
  letter-spacing: 0.005em; text-wrap: balance;
}
.lede { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.page-head { padding-bottom: 8px; }
.page-menu { display: flex; flex: none; margin-top: 4px; position: relative; }
.page-btn, .page-more summary {
  display: inline-flex; align-items: center; gap: 6px; height: 32px;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--line-2); font-size: 13px;
}
.page-btn { border-radius: 8px 0 0 8px; padding: 0 10px; }
.page-btn:hover, .page-more summary:hover { background: var(--surface-2); }
.page-more summary { list-style: none; border-left: 0; border-radius: 0 8px 8px 0; padding: 0 8px; cursor: pointer; }
.page-more summary::-webkit-details-marker { display: none; }
.page-more-menu {
  position: absolute; right: 0; top: 38px; z-index: 10; width: 280px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px;
}
.page-more-menu a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.page-more-menu a:hover { background: var(--surface-2); text-decoration: none; }
.page-more-menu .ic { margin-top: 3px; color: var(--muted); }
.page-more-menu b { display: block; font-size: 13.5px; font-weight: 500; }
.page-more-menu small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── Prose ───────────────────────────────────────────────────────────────── */
.prose { margin-top: 28px; color: var(--text-2); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose h2, .prose h3, .prose h4 { color: var(--text); position: relative; scroll-margin-top: calc(var(--head-h) + 20px); }
.prose h2 { font: 600 24px/1.3 var(--font-display); margin: 48px 0 14px; letter-spacing: 0.01em; }
.prose h3 { font: 600 18.5px/1.4 var(--font-body); margin: 34px 0 10px; }
.prose h4 { font: 600 16px/1.4 var(--font-body); margin: 26px 0 8px; }
.anchor {
  position: absolute; left: -22px; top: 0; width: 20px;
  color: var(--faint); opacity: 0; font-weight: 400;
}
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, .endpoint-head:hover .anchor { opacity: 1; text-decoration: none; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; padding-left: 2px; }
.prose li > ul, .prose li > ol { margin: 6px 0 0; }
.prose li::marker { color: var(--faint); }
.prose ol > li::marker { font: 500 14px var(--font-mono); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose a { font-weight: 500; border-bottom: 1px solid var(--accent-soft); }
.prose a:hover { text-decoration: none; border-bottom-color: var(--accent); }
.ext { font-size: 0.8em; margin-left: 1px; opacity: 0.7; }
.prose :not(pre) > code {
  font-size: 0.86em; padding: 2px 6px; border-radius: 6px;
  background: var(--inline-code-bg); color: var(--inline-code-text);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.prose blockquote {
  margin: 0 0 18px; padding: 2px 0 2px 16px;
  border-left: 3px solid var(--line-2); color: var(--muted);
}

/* Tables */
.table-wrap {
  margin: 0 0 22px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 12px;
}
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; }
th {
  text-align: left; font-weight: 600; color: var(--text); white-space: nowrap;
  background: var(--bg-soft); padding: 10px 14px; border-bottom: 1px solid var(--line);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
td:first-child { color: var(--text); }

/* Code blocks */
.code {
  margin: 0 0 22px; border-radius: 12px; overflow: hidden;
  background: var(--code-bg); border: 1px solid var(--code-line);
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 38px; padding: 0 8px 0 14px;
  background: var(--code-head); border-bottom: 1px solid var(--code-line);
}
.code-title { font: 500 12px/1 var(--font-mono); color: #8da0b3; }
.copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: #8da0b3; font-size: 12px;
  padding: 5px 8px; border-radius: 6px;
}
.copy:hover { color: #e6edf3; background: rgba(255, 255, 255, 0.06); }
.copy .ic { width: 14px; height: 14px; }
.copy.done { color: #4cc38a; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code code {
  display: block; min-width: max-content;
  font-size: 13.2px; line-height: 1.7; color: var(--code-text);
}
.cg-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; align-self: stretch; }
.cg-tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: #8da0b3; font: 500 12px/1 var(--font-mono); padding: 0 10px; white-space: nowrap;
}
.cg-tab[aria-selected="true"] { color: #e6edf3; border-bottom-color: #62b4f5; }
.tk-c { color: #6c7f93; font-style: italic; }
.tk-s { color: #a5d6a0; }
.tk-k { color: #c9a8ff; }
.tk-n { color: #f2bb74; }
.tk-f { color: #82c8ff; }
.tk-t { color: #7fdac6; }
.tk-p { color: #82c8ff; }
.tk-v { color: #f2bb74; }
.tk-o { color: #e7a5cb; }

/* Callouts */
.callout {
  display: flex; gap: 12px; margin: 0 0 22px; padding: 14px 16px;
  border-radius: 12px; border: 1px solid; font-size: 15px; line-height: 1.65;
}
.callout-icon { margin-top: 3px; }
.callout-icon .ic { width: 17px; height: 17px; }
.callout-body { min-width: 0; flex: 1; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p { margin: 0 0 10px; }
.callout-title { font-weight: 600; color: var(--text); }
.callout-note { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.callout-note .callout-icon { color: var(--accent); }
.callout-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.callout-info .callout-icon { color: var(--info); }
.callout-tip, .callout-check { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.callout-tip .callout-icon, .callout-check .callout-icon { color: var(--ok); }
.callout-warning { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout-warning .callout-icon { color: var(--warn); }
.callout-danger { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.callout-danger .callout-icon { color: var(--bad); }

/* Steps */
.steps { margin: 8px 0 26px; }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 16px; position: relative; }
.step::before {
  content: ""; position: absolute; left: 14.5px; top: 34px; bottom: 4px; width: 1px; background: var(--line-2);
}
.step:last-child::before { display: none; }
.step-num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  font: 600 13px/1 var(--font-mono); position: relative; z-index: 1;
}
.step-body { padding-bottom: 14px; min-width: 0; }
.prose .step-title { margin: 3px 0 10px; font: 600 17px/1.45 var(--font-body); }

/* Cards */
.cards { display: grid; gap: 14px; margin: 4px 0 26px; }
.cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .card, .card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-weight: 400;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.prose .card:hover, .card:hover {
  border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow);
}
.card-icon {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px;
  border-radius: 9px; background: var(--accent-soft); color: var(--accent);
}
.card-icon .ic { width: 18px; height: 18px; }
.card-title { font: 600 15.5px/1.35 var(--font-body); color: var(--text); }
.card-body { font-size: 14px; line-height: 1.55; color: var(--muted); }
.card-body code { font-size: 0.85em; }

/* Accordion */
.accordion { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.accordion summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  list-style: none; cursor: pointer; font-weight: 500; color: var(--text);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .ic { transform: rotate(-90deg); transition: transform 0.15s; color: var(--muted); }
.accordion[open] summary .ic { transform: none; }
.accordion-body { padding: 0 16px 4px 42px; }

/* Endpoint */
.endpoint {
  margin: 30px 0 22px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  scroll-margin-top: calc(var(--head-h) + 20px);
}
.endpoint-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative;
  padding: 11px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.prose .endpoint-head code { font-size: 14px; color: var(--text); background: none; border: 0; padding: 0; overflow-wrap: anywhere; }
.endpoint-head .anchor { position: static; margin-left: auto; }
.endpoint-body { padding: 14px 16px 0; }
.endpoint-body > .code:last-child, .endpoint-body > .table-wrap:last-child { margin-bottom: 16px; }
.method {
  font: 600 11.5px/1 var(--font-mono); letter-spacing: 0.04em;
  padding: 5px 8px; border-radius: 6px;
}
.m-get { background: var(--ok-soft); color: var(--ok); }
.m-post { background: var(--accent-soft); color: var(--accent); }
.m-put, .m-patch { background: var(--warn-soft); color: var(--warn); }
.m-delete { background: var(--bad-soft); color: var(--bad); }

/* Pager + foot */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.pager a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; color: var(--text);
}
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager small { color: var(--muted); font-size: 12.5px; }
.pager span { font-weight: 500; }
.pager .next { text-align: right; grid-column: 2; }
.page-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--faint);
}
.page-foot a { color: var(--muted); }

/* On this page */
.toc {
  position: sticky; top: calc(var(--head-h) + 40px); align-self: start;
  max-height: calc(100vh - var(--head-h) - 60px); overflow-y: auto; scrollbar-width: thin;
  font-size: 13.5px;
}
.toc-label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 600; color: var(--text); font-size: 13px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a {
  display: block; padding: 4px 0 4px 14px; margin-left: -1px;
  border-left: 1px solid transparent; color: var(--muted); line-height: 1.45;
}
.toc li.d3 a { padding-left: 26px; font-size: 13px; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }

/* Search */
.search { position: fixed; inset: 0; z-index: 40; }
.search-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 12, 0.55); backdrop-filter: blur(2px); }
.search-panel {
  position: relative; margin: 10vh auto 0; width: min(640px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  overflow: hidden;
}
.search-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-input input {
  flex: 1; height: 54px; border: 0; outline: 0; background: none; color: var(--text); font: 16px var(--font-body);
}
.search-input input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 6px; max-height: min(60vh, 520px); overflow-y: auto; }
.search-results li a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.search-results li a:hover, .search-results li a[aria-selected="true"] { background: var(--accent-soft); text-decoration: none; }
.search-results .sr-section { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.search-results .sr-title { font-weight: 500; }
.search-results .sr-snippet { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.search-results mark { background: none; color: var(--accent); font-weight: 600; }
.search-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .content { grid-template-columns: minmax(0, 780px); }
  .toc { display: none; }
}
@media (max-width: 960px) {
  :root { --tabs-h: 0px; }
  .tabs { display: none; }
  .nav-toggle { display: grid; }
  .topbar-row { padding: 0 12px; gap: 10px; }
  .search-trigger { width: auto; flex: 1; }
  .search-trigger kbd, .tl-quiet { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0; z-index: 30;
    width: min(320px, 86vw); height: auto;
    background: var(--bg); box-shadow: var(--shadow);
    transform: translateX(-105%); transition: transform 0.2s ease;
    padding: 18px 16px 48px;
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 25; background: rgba(5, 8, 12, 0.45);
  }
  .sidebar-tabs { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .sidebar-tabs a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14.5px; }
  .sidebar-tabs a[aria-current] { color: var(--text); background: var(--surface-2); }
  .content { padding: 28px 16px 64px; }
  .anchor { display: none; }
}
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .btn-primary { display: none; }
  .cards.cols-2, .cards.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .title-row { flex-direction: column; gap: 12px; }
  .page-menu { margin-top: 0; }
  .page-more-menu { left: 0; right: auto; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .lede { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
