/* developers.sntlabs.io — SNT Labs house system (ivory / near-black / one emerald accent),
   IBM Plex Sans + Mono. Light and dark are token swaps on [data-theme]. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-display: swap; src: url("fonts/playfair-display-400.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 500; font-display: swap; src: url("fonts/playfair-display-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --bg: #fbfaf7;
  --bg-elev: #ffffff;
  --surface: #f3f1ec;
  --surface-2: #ebe8e1;
  --border: #e4e1d9;
  --border-strong: #d4d0c6;
  --heading: #16151b;
  --text: #3b3943;
  --muted: #6b6875;
  --faint: #9a97a3;
  --accent: #047857;
  --accent-bar: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.1);
  --link: #047857;
  --code-bg: #f6f4ef;
  --code-text: #24222b;
  --inline-code-bg: #efece6;
  --topbar-bg: rgba(251, 250, 247, 0.82);
  --shadow: 0 1px 2px rgba(20, 18, 30, 0.04), 0 8px 24px rgba(20, 18, 30, 0.06);
  --overlay: rgba(20, 18, 30, 0.35);
  --mark: #16151b;

  --hl-keyword: #9333ea;
  --hl-string: #047857;
  --hl-number: #b45309;
  --hl-attr: #1d4ed8;
  --hl-comment: #9a97a3;
  --hl-title: #be123c;

  --note: #2563eb;
  --tip: #059669;
  --warning: #b45309;
  --important: #7c3aed;

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --topbar-h: 106px;
  --topbar-row: 60px;
  --sidebar-w: 284px;
  --toc-w: 232px;
  --content-w: 760px;
  --radius: 10px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-elev: #111118;
  --surface: #101017;
  --surface-2: #17171f;
  --border: #1f1f29;
  --border-strong: #2c2c38;
  --heading: #eae6dc;
  --text: #b3b0bd;
  --muted: #85828f;
  --faint: #5f5c6b;
  --accent: #34d399;
  --accent-bar: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.1);
  --link: #6ee7b7;
  --code-bg: #0e0e15;
  --code-text: #dcd8ce;
  --inline-code-bg: #1a1a23;
  --topbar-bg: rgba(10, 10, 15, 0.78);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
  --overlay: rgba(0, 0, 0, 0.6);
  --mark: #eae6dc;

  --hl-keyword: #c4b5fd;
  --hl-string: #6ee7b7;
  --hl-number: #fcd34d;
  --hl-attr: #93c5fd;
  --hl-comment: #6b6878;
  --hl-title: #fda4af;

  --note: #60a5fa;
  --tip: #34d399;
  --warning: #fbbf24;
  --important: #a78bfa;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.7 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
::selection { background: var(--accent-soft); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg-elev); padding: 8px 12px; border-radius: 8px; }

/* ---- Top bar ------------------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: var(--topbar-row); display: flex; align-items: center; gap: 16px; padding: 0 24px; max-width: 1480px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); white-space: nowrap; }
/* The landing page's SNT Counsel wordmark as a mask, so it takes the theme's heading colour. */
.brand-logo {
  display: block; height: 22px; aspect-ratio: 688.62 / 74.88;
  background: var(--heading);
  -webkit-mask: url("/assets/snt-counsel.svg") no-repeat center / contain;
  mask: url("/assets/snt-counsel.svg") no-repeat center / contain;
}
.brand-divider { color: var(--faint); font-weight: 300; font-size: 18px; }
.brand-sub { color: var(--muted); font-size: 16px; }

.search-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  width: 260px; height: 36px; padding: 0 8px 0 12px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: 9px;
  font: inherit; font-size: 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.search-btn:hover { border-color: var(--border-strong); }
.search-label { flex: 1; text-align: left; }
kbd {
  font: 500 11px/1 var(--font-mono);
  color: var(--muted); background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 5px; padding: 4px 6px;
}
.top-links { display: flex; gap: 18px; font-size: 14px; }
.top-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.top-links a:hover { color: var(--heading); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: transparent; color: var(--muted);
  border: 1px solid transparent; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.icon-btn:hover { color: var(--heading); background: var(--surface); border-color: var(--border); }
.menu-btn { display: none; margin-left: -8px; }
[data-theme="light"] .icon-moon, [data-theme="dark"] .icon-sun { display: none; }

/* ---- Layout ------------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1480px; margin: 0 auto;
}
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; padding: 28px 16px 48px 24px;
  scrollbar-width: thin;
}
.nav-group + .nav-group { margin-top: 26px; }
.nav-title { font-size: 12.5px; font-weight: 600; color: var(--heading); padding: 0 10px 8px; letter-spacing: 0.01em; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: block; padding: 6px 10px; margin: 1px 0;
  color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.45;
  border-radius: 7px; transition: color .12s, background .12s;
}
.sidebar li a:hover { color: var(--heading); background: var(--surface); }
.sidebar li a[aria-current="page"] { color: var(--heading); background: var(--surface-2); font-weight: 500; }

.main { min-width: 0; padding: 48px 56px 96px; }
.doc { max-width: var(--content-w); margin: 0 auto; }

.aside {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; padding: 52px 24px 48px 8px; font-size: 13px;
}
.aside .toc-title { font-weight: 600; color: var(--heading); margin-bottom: 10px; font-size: 12.5px; }
.aside ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.aside li a {
  display: block; padding: 4px 0 4px 14px; margin-left: -1px;
  color: var(--muted); text-decoration: none; line-height: 1.45;
  border-left: 1px solid transparent; transition: color .12s, border-color .12s;
}
.aside li.toc-3 a { padding-left: 26px; }
.aside li a:hover { color: var(--heading); }
.aside li a.active { color: var(--accent); border-left-color: var(--accent); }

/* ---- Content ------------------------------------------------------------------------------ */
.eyebrow { font-size: 13px; font-weight: 500; color: var(--accent); margin-bottom: 10px; }
.doc h1 { font-family: var(--font-serif); font-size: 42px; line-height: 1.12; letter-spacing: -0.01em; font-weight: 500; color: var(--heading); margin: 0 0 14px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0 0 36px; }
.doc h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; color: var(--heading); margin: 56px 0 14px; }
.doc h3 { font-size: 18px; line-height: 1.4; letter-spacing: -0.01em; font-weight: 600; color: var(--heading); margin: 36px 0 10px; }
.doc h4 { font-size: 15.5px; font-weight: 600; color: var(--heading); margin: 28px 0 8px; }
.doc h2, .doc h3 { position: relative; }
.anchor { position: absolute; left: -22px; color: var(--faint); text-decoration: none; opacity: 0; transition: opacity .12s; font-weight: 400; }
.doc h2:hover .anchor, .doc h3:hover .anchor { opacity: 1; }
.doc p { margin: 0 0 18px; }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--faint); }
.doc strong { color: var(--heading); font-weight: 600; }
.doc a:not(.card):not(.anchor):not(.pager a) { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .12s; }
.doc a:not(.card):not(.anchor):hover { text-decoration-color: var(--link); }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

.doc :not(pre) > code {
  font: 500 0.86em/1 var(--font-mono);
  background: var(--inline-code-bg); color: var(--heading);
  padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

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

/* Code blocks */
.code { position: relative; margin: 0 0 24px; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.code-head { display: flex; align-items: center; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--border); font: 500 12px var(--font-mono); color: var(--muted); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 400 13.2px/1.65 var(--font-mono); color: var(--code-text); tab-size: 2; }
.code pre code { font: inherit; background: none; padding: 0; border: 0; }
.copy {
  position: absolute; top: 5px; right: 6px;
  display: inline-grid; place-items: center; width: 30px; height: 28px;
  color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.code:not(:has(.code-head)) .copy { top: 8px; }
.code:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { color: var(--heading); background: var(--surface-2); border-color: var(--border); }
.copy.copied { color: var(--accent); opacity: 1; }

.hljs-keyword, .hljs-built_in, .hljs-selector-tag, .hljs-literal { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-symbol { color: var(--hl-string); }
.hljs-number { color: var(--hl-number); }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-property { color: var(--hl-attr); }
.hljs-comment, .hljs-quote, .hljs-meta { color: var(--hl-comment); font-style: italic; }
.hljs-title, .hljs-section, .hljs-name, .hljs-type { color: var(--hl-title); }

/* Callouts */
.callout { margin: 0 0 24px; padding: 14px 18px; border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: var(--radius); background: color-mix(in srgb, var(--c) 6%, var(--bg)); }
.callout-title { font-size: 13px; font-weight: 600; color: var(--c); margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }
.callout-note { --c: var(--note); }
.callout-tip { --c: var(--tip); }
.callout-warning { --c: var(--warning); }
.callout-important { --c: var(--important); }
.doc blockquote { margin: 0 0 20px; padding: 2px 18px; border-left: 3px solid var(--border-strong); color: var(--muted); }

/* Tabs */
.tabs { margin: 0 0 28px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tab-list { display: flex; gap: 2px; padding: 0 8px; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab-list button {
  position: relative; flex: none;
  padding: 11px 12px; background: none; border: 0; cursor: pointer;
  font: 500 13.5px var(--font-sans); color: var(--muted); transition: color .12s;
}
.tab-list button:hover { color: var(--heading); }
.tab-list button[aria-selected="true"] { color: var(--heading); }
.tab-list button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab-pane { padding: 20px 22px 4px; }
.tab-pane .code { margin-left: 0; margin-right: 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 32px; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px; text-decoration: none;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.card-title { display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--heading); font-size: 15px; }
.card-arrow { color: var(--faint); transition: transform .15s, color .15s; }
.card:hover .card-arrow { color: var(--accent); transform: translateX(2px); }
.card-text { color: var(--muted); font-size: 14px; line-height: 1.55; }
.card-text code { font-size: 0.82em; }

/* Pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border); }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--heading); font-weight: 500; transition: border-color .15s; }
.pager a:hover { border-color: var(--border-strong); }
.pager a span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.pager-next { text-align: right; grid-column: 2; }

/* ---- Search ------------------------------------------------------------------------------- */
.search-dialog { position: fixed; inset: 0; z-index: 60; background: var(--overlay); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search-dialog[hidden] { display: none; }
.search-panel { width: 100%; max-width: 620px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.search-input-row input { flex: 1; height: 54px; border: 0; outline: 0; background: none; color: var(--heading); font: 400 16px var(--font-sans); }
.search-input-row input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 56vh; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; }
.search-results a[aria-selected="true"] { background: var(--surface-2); }
.sr-title { color: var(--heading); font-weight: 500; font-size: 14.5px; }
.sr-section { color: var(--faint); font-size: 12.5px; margin-left: 6px; }
.sr-text { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-text mark, .sr-title mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---- Responsive --------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .layout-guide .aside { display: none; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-grid; }
  .sidebar {
    position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; height: 100vh; width: min(300px, 86vw);
    background: var(--bg); border-right: 1px solid var(--border); padding-top: 24px;
    transform: translateX(-100%); transition: transform .22s ease;
  }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .scrim { position: fixed; inset: 0; z-index: 45; background: var(--overlay); }
  .main { padding: 32px 16px 72px; }
  .top-links, .brand-divider, .brand-sub { display: none; }
  .search-btn { width: auto; margin-left: auto; border: 0; background: none; padding: 0 6px; }
  .search-label, .search-kbd { display: none; }
  .topbar-inner { padding: 0 16px; gap: 6px; }
  .doc h1 { font-size: 30px; }
  .lead { font-size: 16.5px; }
  .cards { grid-template-columns: 1fr; }
  .anchor { display: none; }
  .tab-pane { padding: 16px 14px 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- Tab bar (Guides | API Reference) ----------------------------------------------------- */
.tabbar { height: calc(var(--topbar-h) - var(--topbar-row)); border-top: 1px solid var(--border); }
.tabbar-inner { height: 100%; display: flex; gap: 28px; padding: 0 24px; max-width: 1480px; margin: 0 auto; }
.tabbar a {
  position: relative; display: inline-flex; align-items: center;
  font-size: 14.5px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .12s;
}
.tabbar a:hover { color: var(--heading); }
.tabbar a[aria-current="page"] { color: var(--heading); }
.tabbar a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--heading); border-radius: 2px; }

/* ---- Sidebar method pills ----------------------------------------------------------------- */
.sidebar li a { display: flex; align-items: center; gap: 9px; }
.nav-pill {
  flex: none; width: 38px; text-align: center;
  font: 600 9.5px/1 var(--font-mono); letter-spacing: 0.04em;
  padding: 4px 0; border-radius: 5px;
}
.nav-pill-get { color: var(--accent); background: var(--accent-soft); }
.nav-pill-post { color: #2563eb; background: color-mix(in srgb, #2563eb 10%, transparent); }
[data-theme="dark"] .nav-pill-post { color: #93c5fd; background: color-mix(in srgb, #93c5fd 12%, transparent); }
.sidebar li a .nav-pill + span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- API layout: sidebar | content | examples --------------------------------------------- */
.layout-api .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) minmax(380px, 540px); }
.layout-api .main { padding: 48px 40px 96px 56px; }
.layout-api .doc { max-width: 720px; margin: 0; }
.layout-api .aside { height: auto; max-height: calc(100vh - var(--topbar-h)); align-self: start; padding: 48px 32px 32px 8px; display: flex; flex-direction: column; gap: 18px; font-size: 13px; }
.layout-api .aside > * { flex: none; }

.endpoint {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 12px 14px; margin: 0 0 32px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev);
  font: 500 14px var(--font-mono);
}
.method { font: 600 13px/1 var(--font-mono); padding: 6px 9px; border-radius: 7px; }
.method-get { color: #fff; background: #059669; }
[data-theme="dark"] .method-get { color: #0a0a0f; background: #34d399; }
.method-post { color: #fff; background: #2563eb; }
[data-theme="dark"] .method-post { color: #0a0a0f; background: #93c5fd; }
.endpoint-path { color: var(--heading); }
.endpoint-rpc { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.endpoint-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.endpoint-name { color: var(--heading); padding: 3px 8px; border-radius: 6px; background: var(--surface-2); }

.tool-notes { margin: -12px 0 28px; padding-left: 20px; color: var(--muted); font-size: 14.5px; }
.layout-api .doc h2 { font-size: 20px; margin: 44px 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.section-sub { color: var(--muted); font-size: 14px; margin: -2px 0 6px !important; padding-top: 10px; }
.muted { color: var(--muted); }

.param { padding: 16px 0; border-bottom: 1px solid var(--border); }
.param:last-child { border-bottom: 0; }
.param-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.param-name { font: 600 14px var(--font-mono) !important; color: var(--heading) !important; background: none !important; border: 0 !important; padding: 0 !important; }
.pill {
  font: 500 12px/1 var(--font-mono); color: var(--muted);
  padding: 5px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border);
}
.pill-required { color: #be123c; background: color-mix(in srgb, #e11d48 8%, transparent); border-color: color-mix(in srgb, #e11d48 18%, transparent); }
[data-theme="dark"] .pill-required { color: #fda4af; }
.pill-muted { color: var(--faint); background: transparent; }
.param-desc { margin-top: 8px; color: var(--text); font-size: 14.5px; line-height: 1.6; }
.param-enum { margin-top: 8px; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.param-children { margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 0 16px; }
.param-children > summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 500; color: var(--muted); list-style: none; }
.param-children > summary::before { content: "+ "; font-family: var(--font-mono); }
.param-children[open] > summary::before { content: "− "; }
.param-children[open] > summary { border-bottom: 1px solid var(--border); }

/* Example cards (right column) */
.example-card { margin: 0; background: var(--code-bg); box-shadow: var(--shadow); border-radius: 14px; }
.example-head { display: flex; align-items: center; gap: 10px; padding: 0 8px 0 16px; height: 46px; border-bottom: 1px solid var(--border); background: var(--surface); }
.example-title { font-weight: 600; color: var(--heading); font-size: 13.5px; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-lang { font: 500 12px var(--font-mono); color: var(--muted); }
.card-tabs { display: flex; gap: 2px; }
.card-tabs button { position: relative; padding: 6px 9px; background: none; border: 0; border-radius: 7px; cursor: pointer; font: 500 12.5px var(--font-sans); color: var(--muted); }
.card-tabs button:hover { color: var(--heading); }
.card-tabs button[aria-selected="true"] { color: var(--heading); background: var(--surface-2); }
.copy-card { position: static; opacity: 1; flex: none; }
.example-body pre { margin: 0; padding: 16px 18px; overflow: auto; max-height: 46vh; font: 400 12.6px/1.65 var(--font-mono); color: var(--code-text); }
.example-body .tab-pane { padding: 0; }

@media (max-width: 1240px) {
  .layout-api .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .layout-api .aside { position: static; max-height: none; grid-column: 2; padding: 0 56px 72px; max-width: 840px; }
  .layout-api .main { padding-bottom: 32px; }
}
@media (max-width: 900px) {
  .tabbar-inner { padding: 0 16px; gap: 22px; }
  .layout-api .layout { grid-template-columns: minmax(0, 1fr); }
  .layout-api .main { padding: 32px 16px 24px; }
  .layout-api .aside { grid-column: 1; padding: 0 16px 64px; }
}

/* ---- Design pass: page head, home, footer, top bar, icons ---------------------------------- */
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.doc-head .eyebrow { margin-bottom: 0; }
.copy-page {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  font: 500 12.5px var(--font-sans); color: var(--muted);
  background: transparent; border: 1px solid var(--border);
  transition: color .15s, border-color .15s, background .15s;
}
.copy-page:hover { color: var(--heading); border-color: var(--border-strong); background: var(--surface); }
.copy-page.copied { color: var(--accent); border-color: var(--accent); }

/* Top bar call to action */
.top-cta {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 34px; padding: 0 14px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  color: var(--bg); background: var(--heading);
  transition: opacity .15s, transform .15s;
}
.top-cta:hover { opacity: .88; }
.top-cta svg { transition: transform .15s; }
.top-cta:hover svg { transform: translateX(2px); }

/* Sidebar groups: collapsible, animated (grid rows 1fr ↔ 0fr) */
.sidebar .nav-title {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left; user-select: none;
  font-family: var(--font-sans);
}
.nav-chevron { margin-left: auto; color: var(--faint); transition: transform .22s ease; }
.nav-title:hover .nav-chevron { color: var(--muted); }
.nav-group.collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .24s ease, opacity .24s ease; }
.nav-items > ul { overflow: hidden; min-height: 0; }
.nav-group.collapsed .nav-items { grid-template-rows: 0fr; opacity: 0; }
.nav-group.no-anim .nav-items, .nav-group.no-anim .nav-chevron { transition: none; }

/* Cards with icons */
.card-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px;
  border-radius: 9px; color: var(--accent); background: var(--accent-soft);
}

/* Home */
.layout-home .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.layout-home .aside { display: none; }
.layout-home .doc { max-width: 1080px; }
.layout-home .pager { display: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; padding: 8px 0 40px; }
.hero-title { font-family: var(--font-serif) !important; font-size: 56px !important; line-height: 1.05 !important; font-weight: 500 !important; letter-spacing: -0.015em !important; margin: 0 0 16px !important; }
.hero-lead { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0 0 28px !important; max-width: 520px; }
.hero-search {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 460px; height: 48px; padding: 0 12px 0 16px;
  background: var(--bg-elev); color: var(--muted); border: 1px solid var(--border); border-radius: 12px;
  font: 400 15px var(--font-sans); cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s;
}
.hero-search:hover { border-color: var(--border-strong); }
.hero-search span { flex: 1; text-align: left; }
.hero-code .example-card { box-shadow: var(--shadow); }
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 48px; }
.path-card { padding: 24px 24px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); }
.path-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--accent); background: var(--accent-soft); }
.doc h2.path-title { font-family: var(--font-serif); font-size: 26px; font-weight: 500; margin: 14px 0 6px; padding: 0; border: 0; letter-spacing: -0.01em; }
.path-text { color: var(--muted); font-size: 15px; margin: 0 0 16px !important; }
.path-links { display: flex; flex-wrap: wrap; gap: 18px; }
.doc .path-links a { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-size: 14.5px; color: var(--heading) !important; text-decoration: none !important; }
.path-links a svg { color: var(--accent); transition: transform .15s; }
.path-links a:hover svg { transform: translateX(2px); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 24px; }
.footer-inner { max-width: 1480px; margin: 0 auto; padding: 40px 24px 48px calc(var(--sidebar-w) + 56px); display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-logo { height: 16px; }
.footer-brand p { color: var(--faint); font-size: 13px; margin: 12px 0 0; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links div { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.footer-links span { color: var(--heading); font-weight: 600; font-size: 12.5px; margin-bottom: 2px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color .12s; }
.footer-links a:hover { color: var(--heading); }

/* Search suggestions (before typing) */
.search-suggest { padding: 10px 8px 12px; }
.search-suggest[hidden] { display: none; }
.search-suggest-title { padding: 4px 12px 6px; font-size: 12px; font-weight: 600; color: var(--faint); }
.search-suggest a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--heading); text-decoration: none; font-size: 14.5px; }
.search-suggest a:hover { background: var(--surface-2); }

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 900px) {
  .layout-home .layout { grid-template-columns: minmax(0, 1fr); }
  .top-cta { display: none; }
  .hero-title { font-size: 40px !important; }
  .doc h1 { font-size: 32px; }
  .paths { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { padding: 32px 16px 40px; }
  .footer-links { gap: 32px; }
  .copy-page span { display: none; }
}

/* Inside a tab the tab already names the language. */
.tab-pane .code-head { display: none; }
