/* Voxmith docs. Tokens mirror the Voxmith design system: blue = the one action colour, ink navy text, greys elsewhere. */
:root {
  --bg: #fff; --fg: #13222c; --head: #13222c; --muted: #667085; --faint: #98a2b3;
  --line: #e4e8f0; --surface: #f7f9fc; --hover: #f1f4f9;
  --primary: #026cfe; --primary-ink: #0258d6; --primary-soft: #eef5ff; --primary-line: #b8d4ff;
  --tip: #0b6e4f; --tip-soft: #ecf8f3; --tip-line: #b6e3d2; --warn: #8a5300; --warn-soft: #fff7e8; --warn-line: #f2d49a;
  --code-bg: #f7f9fc; --shadow: 0 8px 30px rgba(19, 34, 44, .12);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --top: 96px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root[data-theme="system"] { --dark: 1; } }
:root[data-theme="dark"], :root[data-theme="system"] { }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0a1016; --fg: #b4bfc9; --head: #e6ebf0; --muted: #8b98a5; --faint: #5f6d7a; --line: rgba(255,255,255,.1);
    --surface: #101922; --hover: #141f29; --primary: #4c97ff; --primary-ink: #7fb4ff; --primary-soft: rgba(2,108,254,.14); --primary-line: rgba(76,151,255,.3);
    --tip: #5fd3a6; --tip-soft: rgba(11,110,79,.18); --tip-line: rgba(95,211,166,.3); --warn: #f0b95a; --warn-soft: rgba(138,83,0,.2); --warn-line: rgba(240,185,90,.3);
    --code-bg: #0e1720; --shadow: 0 8px 30px rgba(0,0,0,.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1016; --fg: #b4bfc9; --head: #e6ebf0; --muted: #8b98a5; --faint: #5f6d7a; --line: rgba(255,255,255,.1);
  --surface: #101922; --hover: #141f29; --primary: #4c97ff; --primary-ink: #7fb4ff; --primary-soft: rgba(2,108,254,.14); --primary-line: rgba(76,151,255,.3);
  --tip: #5fd3a6; --tip-soft: rgba(11,110,79,.18); --tip-line: rgba(95,211,166,.3); --warn: #f0b95a; --warn-soft: rgba(138,83,0,.2); --warn-line: rgba(240,185,90,.3);
  --code-bg: #0e1720; --shadow: 0 8px 30px rgba(0,0,0,.5); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.i { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
kbd { font: 500 11px var(--sans); color: var(--muted); margin-left: auto; padding-left: 10px; }

/* logos swap by theme */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; } :root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .logo-light { display: none; } :root[data-theme="system"] .logo-dark { display: block; } }
.logo { height: 22px; width: auto; display: block; } .logo-dark { height: 36px; margin-block: -7px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar, .tabs-bar, .shell { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.bar { display: flex; align-items: center; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; min-width: 200px; text-decoration: none; }
.search-wrap { display: flex; gap: 8px; flex: 1; justify-content: center; }
.search-btn { white-space: nowrap; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; background: var(--bg); }
.search-btn { width: 355px; max-width: 100%; } .search-btn:hover { background: var(--hover); }
.actions { white-space: nowrap; display: flex; align-items: center; gap: 8px; min-width: 200px; justify-content: flex-end; font-size: 14px; }
.actions .link { padding: 6px 12px; text-decoration: none; color: var(--muted); font-weight: 500; } .actions .link:hover { color: var(--head); }
.cta { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 14px; background: var(--primary); color: #fff; border-radius: 12px; text-decoration: none; font-weight: 500; }
.cta:hover { background: var(--primary-ink); } .cta .i { width: 14px; height: 14px; }
.soon { opacity: .55; cursor: default; }
.theme-btn, .menu-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); } .theme-btn:hover, .menu-btn:hover { background: var(--hover); }
.theme-btn .i:nth-child(n+2) { display: none; }
:root[data-theme="light"] .theme-btn .i:nth-child(1), :root[data-theme="dark"] .theme-btn .i:nth-child(1) { display: none; }
:root[data-theme="light"] .theme-btn .i:nth-child(2) { display: block; } :root[data-theme="dark"] .theme-btn .i:nth-child(3) { display: block; }
.menu-btn { display: none; }
.tabs-bar { display: flex; gap: 24px; height: 40px; }
.tabs-bar a { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-bar a:hover { color: var(--head); } .tabs-bar a.active { color: var(--head); border-color: var(--primary); }

/* shell */
.shell { display: block; }
.main { display: grid; grid-template-columns: minmax(0, 1fr) 196px; gap: 56px; margin-left: 256px; }
.sidebar { position: fixed; top: var(--top); bottom: 0; width: 200px; overflow-y: auto; padding: 28px 0 40px; scrollbar-width: thin; left: max(20px, calc((100vw - 1120px) / 2 + 20px)); }
.sb-group { margin-bottom: 28px; } .sb-group h5 { margin: 0 0 8px 12px; font-size: 14px; font-weight: 600; color: var(--head); }
.sb-group ul { list-style: none; margin: 0; padding: 0; }
.sb-group a { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); text-decoration: none; }
.sb-group a:hover { background: var(--hover); color: var(--head); }
.sb-group a.active { background: var(--primary-soft); color: var(--primary-ink); font-weight: 500; }
.method { font: 600 10px/1 var(--mono); padding: 3px 5px; border-radius: 5px; letter-spacing: .02em; background: var(--primary-soft); color: var(--primary-ink); }
.m-get { background: var(--tip-soft); color: var(--tip); }

/* content */
.content { padding: 40px 0 96px; min-width: 0; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--primary-ink); margin-bottom: 8px; }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h1 { margin: 0; font-size: 36px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: var(--head); }
.lede { margin: 8px 0 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.prose { margin-top: 28px; }
.prose > *:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 16px 0; }
.prose ul, .prose ol { padding-left: 24px; } .prose li { margin: 6px 0; } .prose li::marker { color: var(--faint); }
.prose h2, .prose h3, .prose h4 { color: var(--head); font-weight: 600; position: relative; }
.prose h2 { font-size: 24px; margin: 48px 0 12px; letter-spacing: -.01em; } .prose h3 { font-size: 20px; margin: 32px 0 8px; } .prose h4 { font-size: 16px; margin: 20px 0 6px; }
.anchor { position: absolute; left: -26px; top: 50%; transform: translateY(-50%); opacity: 0; color: var(--faint); padding: 4px; text-decoration: none; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; } .anchor .i { width: 14px; height: 14px; }
.prose a { color: var(--primary-ink); text-decoration: underline; text-decoration-color: var(--primary-line); text-underline-offset: 3px; font-weight: 500; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--head); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
:not(pre) > code { font: 500 .875em var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--head); }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.6; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); } tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--head); background: var(--surface); }

/* code */
.code-block { position: relative; margin: 20px 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 14px; }
.code-block pre { margin: 0; padding: 14px 52px 14px 16px; overflow-x: auto; font: 13px/1.7 var(--mono); background: transparent !important; }
.code-block code { font: inherit; }
.shiki span { color: var(--shiki-light); }
:root[data-theme="dark"] .shiki span { color: var(--shiki-dark); }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .shiki span { color: var(--shiki-dark); } }
.code-title { padding: 8px 16px; border-bottom: 1px solid var(--line); font: 500 12px var(--mono); color: var(--muted); }
.copy { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); z-index: 2; }
.copy:hover { background: var(--hover); color: var(--head); } .copy .i:nth-child(2) { display: none; } .copy.done .i:nth-child(1) { display: none; } .copy.done .i:nth-child(2) { display: block; color: var(--tip); }
.code-group > .tab-list { padding: 0 12px; border-bottom: 1px solid var(--line); }
.code-group > .copy { top: 5px; }
.tab-list { display: flex; gap: 4px; overflow-x: auto; }
.tab-list button { padding: 9px 10px; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab-list button:hover { color: var(--head); } .tab-list button[aria-selected="true"] { color: var(--primary-ink); border-color: var(--primary); }
.tabs { margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; } .tabs > .tab-list { padding: 0 14px; border-bottom: 1px solid var(--line); }
.tabs > .tab-panel { padding: 4px 18px 8px; } .tab-panel[hidden] { display: none; } .tabs .code-block { margin: 12px 0; }

/* callouts + cards */
.callout { display: flex; gap: 12px; margin: 20px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--primary-line); background: var(--primary-soft); color: var(--head); font-size: 15px; line-height: 1.6; }
.callout > .i { margin-top: 4px; color: var(--primary-ink); } .callout > div > :first-child { margin-top: 0; } .callout > div > :last-child { margin-bottom: 0; }
.callout.tip { background: var(--tip-soft); border-color: var(--tip-line); } .callout.tip > .i { color: var(--tip); }
.callout.warning { background: var(--warn-soft); border-color: var(--warn-line); } .callout.warning > .i { color: var(--warn); }
.cards { display: grid; gap: 16px; margin: 20px 0; } .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); text-decoration: none !important; color: inherit !important; margin: 20px 0; }
.cards .card { margin: 0; } a.card:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.card-icon { display: block; margin-bottom: 14px; color: var(--muted); } .card-icon .i { width: 22px; height: 22px; }
.card h4 { margin: 0 0 4px; font-size: 16px; color: var(--head); font-weight: 600; }
.card-body { font-size: 15px; line-height: 1.6; color: var(--muted); font-weight: 400; } .card-body p { margin: 0 !important; }
.steps .step { margin: 16px 0; padding-left: 16px; border-left: 2px solid var(--line); }
.accordion { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; } .accordion summary { cursor: pointer; font-weight: 500; color: var(--head); }

/* api */
.endpoint { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow-x: auto; }
.endpoint code { font: 500 13px var(--mono); color: var(--head); white-space: nowrap; } .endpoint .method { font-size: 11px; padding: 4px 7px; }
.field { padding: 14px 0; border-bottom: 1px solid var(--line); } .field-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .field-head code { font: 600 13px var(--mono); color: var(--head); }
.ftype { font: 12px var(--mono); color: var(--muted); } .freq { font-size: 11px; font-weight: 600; color: #b02a2a; background: rgba(176,42,42,.1); padding: 2px 7px; border-radius: 6px; }
.fdesc { color: var(--muted); font-size: 14px; margin-top: 4px; } .field-head .fdesc { margin: 0; } .fnest { margin: 8px 0 0 14px; padding-left: 14px; border-left: 2px solid var(--line); }
.rail-card { margin-bottom: 16px; } .rail-title { font-size: 13px; font-weight: 600; color: var(--head); margin-bottom: -8px; } .rail .code-block pre { font-size: 12px; }

/* toc */
.toc-in, .rail { position: sticky; top: calc(var(--top) + 32px); max-height: calc(100vh - var(--top) - 48px); overflow-y: auto; padding-top: 40px; scrollbar-width: thin; }
.toc-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--head); margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; } .toc li a { display: block; padding: 4px 0; font-size: 14px; line-height: 1.5; color: var(--muted); text-decoration: none; } .toc li.l3 a { padding-left: 14px; }
.toc li a:hover { color: var(--head); } .toc li a.on { color: var(--primary-ink); font-weight: 500; }
.main:has(.has-api) { grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; }
td:last-child { min-width: 170px; }

/* chrome */
.copy-page { position: relative; display: flex; flex: none; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 500; margin-top: 6px; }
.cp-main { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px 0 0 12px; } .cp-more { padding: 0 8px; border-left: 1px solid var(--line); border-radius: 0 12px 12px 0; } .cp-main:hover, .cp-more:hover { background: var(--hover); }
.cp-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 270px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 20; }
.cp-menu > * { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; width: 100%; text-align: left; text-decoration: none; } .cp-menu > *:hover { background: var(--hover); }
.cp-menu b { display: block; font-weight: 500; color: var(--head); } .cp-menu small { color: var(--muted); font-size: 12px; } .cp-menu .i { margin-top: 3px; }
.feedback { display: flex; align-items: center; gap: 10px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.feedback button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; } .feedback button:hover { background: var(--hover); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; } .pager a:hover { border-color: var(--primary); }
.pager small { display: block; font-size: 12px; color: var(--muted); } .pager span { font-weight: 500; color: var(--head); } .pager .next { text-align: right; grid-column: 2; }
.foot { margin-top: 40px; display: flex; justify-content: flex-end; } .socials { display: flex; gap: 14px; color: var(--muted); } .socials a:hover { color: var(--head); }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(10,16,22,.45); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; } .modal[hidden] { display: none; }
.modal-box { width: min(640px, calc(100vw - 32px)); background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; } .modal-box.small { padding: 24px; } .modal-box.small h3 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; color: var(--head); }
.modal-box.small button { margin-top: 12px; padding: 8px 16px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 500; } .modal-box.small a { color: var(--primary-ink); }
.search-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); } .search-in input { flex: 1; border: 0; background: none; outline: 0; font: 16px var(--sans); color: var(--head); }
#search-results { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; } #search-results:empty { display: none; }
#search-results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; } #search-results a:hover, #search-results a.sel { background: var(--hover); }
#search-results b { display: block; color: var(--head); font-weight: 500; font-size: 15px; } #search-results small { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#search-results .none { padding: 16px; color: var(--muted); font-size: 14px; }

/* responsive */
@media (max-width: 1100px) { .main { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } .main:has(.has-api) { grid-template-columns: minmax(0, 1fr); } .main:has(.has-api) .toc { display: block; } .rail, .toc-in { position: static; } }
@media (max-width: 900px) {
  .brand { min-width: 0; } .search-btn span { display: none; } .search-btn { width: 36px; padding: 0; justify-content: center; } .search-btn kbd { display: none; } .search-wrap { justify-content: flex-end; }
  .actions { min-width: 0; } .actions .link { display: none; } .menu-btn { display: grid; }
  .main { margin-left: 0; } .sidebar { transform: translateX(-110%); transition: transform .2s; background: var(--bg); width: 280px; left: 0; padding-inline: 20px; z-index: 25; border-right: 1px solid var(--line); } body.nav-open .sidebar { transform: none; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; } h1 { font-size: 30px; } .title-row { flex-direction: column; } .anchor { display: none; }
  .tabs-bar { overflow-x: auto; gap: 18px; }
}
@media (max-width: 640px) { .cta { display: none; } .tabs-bar a { white-space: nowrap; } .brand { flex: 1; } .search-wrap { flex: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
