/* Constellation Data Labs docs.
   Layout: black brand bar + product tabs on top; three columns below
   (product nav | article | on-this-page rail), collapsing to one column
   with a drawer under 1024px. Tokens follow the cdatalabs.com site. */
:root {
  --paper: #ffffff;
  --stone: #f3f1ec;
  --stone-line: #e2ddd3;
  --ink: #0a0a0a;
  --body: #262626;
  --ink-2: #525252;
  --ink-3: #6b6b6b;
  --line: #e5e5e5;
  --surface: #f5f5f5;
  --accent: #1f5be0;
  --accent-soft: rgba(31, 91, 224, 0.08);
  --night: #000000;
  --night-line: #1f1f1f;
  --night-mute: #a3a3a3;
  --glow: #7fa6ff;
  --code-bg: #0a0a0a;
  --code-fg: #d4d4d4;
  --code-line: #262626;
  --ok: #17804a;
  --ok-soft: #e8f6ee;
  --warn: #9a5b00;
  --warn-soft: #fff6e5;
  --danger: #c0362c;
  --shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --display: Figtree, "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --bar-h: 64px;
  --tabs-h: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0a0a0a; --stone: #111111; --stone-line: #1f1f1f; --ink: #ffffff; --body: #d4d4d4;
    --ink-2: #a3a3a3; --ink-3: #8a8a8a; --line: #262626; --surface: #161616; --accent: #7fa6ff;
    --accent-soft: rgba(127, 166, 255, 0.12); --code-bg: #141414; --code-line: #262626;
    --ok: #3ddc84; --ok-soft: rgba(61, 220, 132, 0.12); --warn: #f0c38e; --warn-soft: rgba(240, 195, 142, 0.1);
    --danger: #ff8a80; --shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.9);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a0a0a; --stone: #111111; --stone-line: #1f1f1f; --ink: #ffffff; --body: #d4d4d4;
  --ink-2: #a3a3a3; --ink-3: #8a8a8a; --line: #262626; --surface: #161616; --accent: #7fa6ff;
  --accent-soft: rgba(127, 166, 255, 0.12); --code-bg: #141414; --code-line: #262626;
  --ok: #3ddc84; --ok-soft: rgba(61, 220, 132, 0.12); --warn: #f0c38e; --warn-soft: rgba(240, 195, 142, 0.1);
  --danger: #ff8a80; --shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.9);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar-h) + var(--tabs-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 15.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--night); }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 999px; }
.gutter { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

/* ---------- brand bar ---------- */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--night); color: #fff; }
.bar-in { height: var(--bar-h); display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex: none; }
.brand svg { display: block; }
.brand-name { font: 600 15px/1.1 var(--display); letter-spacing: -0.01em; }
.brand-tag { font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--night-mute); border-left: 1px solid #333; padding-left: 12px; }
.search-btn {
  flex: 1; max-width: 440px; margin: 0 auto; height: 40px; display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 14px; border: 1px solid #2a2a2a; border-radius: 999px; background: #111; color: #8a8a8a;
  cursor: pointer; text-align: left; transition: border-color .2s, background-color .2s;
}
.search-btn:hover { border-color: #444; background: #161616; }
.search-btn span { flex: 1; font-size: 14px; }
kbd { font: 500 11px var(--mono); padding: 3px 7px; border-radius: 6px; border: 1px solid #333; color: #bfbfbf; background: #0a0a0a; }
.bar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.ver { display: flex; align-items: center; gap: 8px; }
.ver { position: relative; }
.ver-label { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #8a8a8a; }
.ver-btn, .icon-btn, .pill {
  height: 38px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: transparent; color: #fff;
  cursor: pointer; transition: background-color .2s, border-color .2s;
}
.ver-btn { display: inline-flex; align-items: center; gap: 10px; padding: 0 14px; font: 600 13.5px var(--sans); }
.ver-btn .chev { opacity: .7; transition: transform .2s; }
.ver-btn[aria-expanded="true"] { background-color: rgba(255,255,255,.08); border-color: var(--glow); }
.ver-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.ver-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; width: 280px; padding: 6px; background: #0a0a0a; border: 1px solid #262626; border-radius: 14px; box-shadow: 0 24px 48px -24px rgba(0,0,0,.7); animation: ver-in .16s ease-out; }
.ver-menu[hidden] { display: none; }
@keyframes ver-in { from { opacity: 0; transform: translateY(-4px); } }
.ver-menu small { display: block; padding: 8px 12px 6px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8a8a8a; }
.ver-menu a { position: relative; display: grid; gap: 2px; padding: 10px 36px 10px 12px; border-radius: 9px; text-decoration: none; color: #fff; outline: none; }
.ver-menu a b { font-weight: 600; font-size: 14px; }
.ver-menu a span { font-size: 12.5px; color: #8a8a8a; }
.ver-menu a:hover, .ver-menu a:focus-visible { background: #1a1a1a; }
.ver-menu a:focus-visible { box-shadow: inset 0 0 0 1px var(--glow); }
.ver-menu .ck { position: absolute; right: 12px; top: 50%; margin-top: -7px; color: var(--glow); display: none; }
.ver-menu a[aria-current="page"] .ck { display: block; }
.icon-btn { width: 38px; display: grid; place-items: center; padding: 0; }
.ver-btn:hover, .icon-btn:hover, .pill:hover { background-color: rgba(255,255,255,.08); border-color: var(--glow); }
.pill { display: inline-flex; align-items: center; padding: 0 16px; font-weight: 600; font-size: 14px; text-decoration: none; }
.pill-w { background: #fff; color: #0a0a0a; border-color: #fff; }
.pill-w:hover { background: #fff; opacity: .88; border-color: #fff; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme]) .theme-btn .i-moon { display: none; }
}

/* product tabs */
.tabs { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar-h)); z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs-in { height: var(--tabs-h); display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tabs a, .menu-btn { position: relative; display: flex; align-items: center; padding: 0 12px; white-space: nowrap; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-3); transition: color .2s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.menu-btn { display: none; gap: 8px; border: 0; background: none; cursor: pointer; color: var(--ink); font-weight: 600; padding-left: 0; border-right: 1px solid var(--line); margin-right: 6px; padding-right: 14px; }

/* ---------- three-column docs layout ---------- */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 48px; max-width: 1480px; margin: 0 auto; }
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar-h) + var(--tabs-h)); align-self: start; height: calc(100vh - var(--bar-h) - var(--tabs-h)); overflow-y: auto; padding: 28px 0 48px; scrollbar-width: thin; }
.side h2 { margin: 0 0 8px; padding-left: 12px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.side > div + div { margin-top: 26px; }
.side > div[hidden] { display: none; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; color: var(--ink-2); transition: background-color .15s, color .15s; }
.side a:hover { background: var(--surface); color: var(--ink); }
.side a[aria-current="page"], .side a.on { background: var(--ink); color: var(--paper); font-weight: 600; }
.side a small { font: 500 10.5px var(--mono); color: var(--ink-3); }
.side a[aria-current="page"] small { color: inherit; opacity: .7; }
.side .filter { width: 100%; height: 36px; margin: 0 0 16px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: 13.5px var(--sans); }

.main { min-width: 0; padding: 32px 0 80px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font: 500 12px var(--mono); letter-spacing: .04em; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.page-head { padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.page-head h1 { margin: 10px 0 0; font: 600 clamp(32px, 4vw, 46px)/1.04 var(--display); letter-spacing: -0.04em; color: var(--ink); text-wrap: balance; }
.lead { margin: 16px 0 0; max-width: 680px; font-size: 17.5px; line-height: 1.6; color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; color: var(--ink-2); background: var(--paper); text-decoration: none; }
a.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip-k { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- prose (ported content) ---------- */
.prose { max-width: 820px; overflow-wrap: anywhere; }
.prose > section + section, .prose section > section { margin-top: 8px; }
.prose h1 { display: none; } /* the page head carries the single h1 */
.prose h2 { margin: 56px 0 14px; font: 600 28px/1.15 var(--display); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.prose h3 { margin: 36px 0 10px; font: 600 20px/1.25 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.prose h4, .prose h5, .prose h6 { margin: 28px 0 8px; font: 600 16px/1.3 var(--display); color: var(--ink); }
.prose > :first-child, .prose > section:first-child > :first-child { margin-top: 28px; }
.prose p, .prose li { color: var(--body); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; display: grid; gap: 6px; }
.prose li::marker { color: var(--ink-3); }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; font-weight: 500; }
.prose a:hover { text-decoration-color: currentColor; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.anchor { margin-left: 8px; opacity: 0; text-decoration: none !important; color: var(--ink-3) !important; font-weight: 400; transition: opacity .15s; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }

.prose :not(pre) > code { font: 0.86em var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); overflow-wrap: anywhere; }
.prose .val { font-family: var(--mono); font-size: .9em; color: var(--ink); }

.code { margin: 16px 0 22px; border: 1px solid var(--code-line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--code-line); font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #8a8a8a; }
.copy { height: 28px; padding: 0 10px; border: 1px solid #2a2a2a; border-radius: 7px; background: transparent; color: #d4d4d4; font: 500 12px var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.copy:hover { border-color: var(--glow); color: #fff; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; max-height: 560px; font: 13px/1.75 var(--mono); color: var(--code-fg); tab-size: 2; }
.code pre code { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
.tk-k { color: #9ec1ff; } .tk-s { color: #f0c38e; } .tk-n { color: #b5e8b0; } .tk-f { color: #8a8a8a; } .tk-u { color: #fff; }

.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }
.table-tools input { flex: 1; max-width: 320px; height: 36px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: 13.5px var(--sans);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat; }
.table-tools span { font: 500 12px var(--mono); color: var(--ink-3); }
.table-wrap { margin: 8px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--paper); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.prose th { text-align: left; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--body); overflow-wrap: break-word; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: var(--surface); }
.prose td:first-child { color: var(--ink); font-weight: 500; }
.prose .dict td:first-child { font-family: var(--mono); font-size: 13px; }
.prose td [style], .prose th [style] { text-align: inherit; }

.prose blockquote, .callout { margin: 20px 0; padding: 14px 18px; border: 1px solid var(--stone-line); background: var(--stone); border-radius: var(--radius); color: var(--body); }
.prose blockquote p:last-child { margin: 0; }
.prose .warning, .prose .alert { margin: 20px 0; padding: 14px 18px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-soft); color: var(--body); }
.prose .warning p { margin: 0; }
.prose .text-danger { color: var(--danger); }
.prose .api-summary { font-size: 17px; color: var(--ink-2); }

/* legacy tab sets on dictionary pages */
.prose .tab-content { display: none; }
.prose .tab-content.active { display: block; }
.prose .tab, .prose .dict-tabs__tab { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; margin: 0 6px 8px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2); font: 500 13.5px var(--sans); cursor: pointer; }
.prose .tab:hover, .prose .dict-tabs__tab:hover { color: var(--ink); border-color: var(--ink-3); }
.prose .tab.on, .prose .dict-tabs__tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.prose .dict-tabs { display: flex; flex-wrap: wrap; margin: 24px 0 8px; }
.prose .dict-panel[hidden], .prose [hidden] { display: none !important; }


/* prev / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; max-width: 820px; }
.pager a { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s; }
.pager a:hover { border-color: var(--ink); }
.pager small { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.pager b { font: 600 17px var(--display); color: var(--ink); letter-spacing: -0.01em; }
.pager .next { text-align: right; grid-column: 2; }

/* on this page */
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar-h) + var(--tabs-h)); align-self: start; max-height: calc(100vh - var(--bar-h) - var(--tabs-h)); overflow-y: auto; padding: 32px 0 40px; font-size: 13.5px; }
.toc h2 { margin: 0 0 12px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-3); line-height: 1.4; transition: color .15s, border-color .15s; }
.toc a.sub { padding-left: 26px; font-size: 13px; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--ink); font-weight: 600; }
.toc .help { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.toc .help a { padding: 0; border: 0; color: var(--ink-2); }
.toc .help a:hover { color: var(--ink); }

/* ---------- search palette ---------- */
.palette[hidden] { display: none; }
.palette { position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.palette-box { width: min(640px, 100%); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-in input { flex: 1; height: 56px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 16px var(--sans); }
.palette-in kbd { background: var(--surface); border-color: var(--line); color: var(--ink-3); }
.results { list-style: none; margin: 0; padding: 8px; max-height: min(60vh, 460px); overflow-y: auto; }
.results li a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.results li a i { grid-row: span 2; align-self: center; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); color: var(--ink-3); font: normal 600 11px var(--mono); }
.results li a b { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.results li a span { color: var(--ink-3); font-size: 12.5px; }
.results li a[aria-selected="true"], .results li a:hover { background: var(--surface); }
.results mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; }
.results .empty { padding: 28px 12px; text-align: center; color: var(--ink-3); }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.palette-foot kbd { background: var(--surface); border-color: var(--line); color: var(--ink-3); }

/* ---------- footer ---------- */
.foot { background: var(--night); color: #8a8a8a; font-size: 14px; }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 56px 40px; max-width: 1480px; margin: 0 auto; }
.foot b { display: block; color: #fff; margin-bottom: 12px; font-weight: 600; }
.foot a { display: block; padding: 3px 0; text-decoration: none; transition: color .2s; }
.foot a:hover { color: #fff; }
.foot p { margin: 14px 0 0; max-width: 280px; font-size: 13.5px; color: #737373; }
.foot-b { border-top: 1px solid var(--night-line); padding-block: 20px 28px; font-size: 12.5px; color: #8a8a8a; max-width: 1480px; margin: 0 auto; }

/* ---------- docs home ---------- */
.hero { position: relative; overflow: hidden; background: var(--night); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); }
.hero::after { content: ""; position: absolute; right: -200px; top: -260px; width: 760px; height: 760px; border-radius: 50%; background: radial-gradient(circle, rgba(127,166,255,.22), transparent 62%); pointer-events: none; }
.hero-in { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding-block: 88px 80px; }
.hero .eyebrow { color: #8a8a8a; }
.hero h1 { margin: 16px 0 18px; max-width: 820px; font: 600 clamp(40px, 6vw, 72px)/1 var(--display); letter-spacing: -0.045em; text-wrap: balance; }
.grad { background: linear-gradient(100deg, #fff 0%, #c9d8ff 35%, #7fa6ff 65%, #c9d8ff 85%, #fff 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: grad 9s ease-in-out infinite alternate; }
@keyframes grad { to { background-position: 100% 0; } }
.hero p { margin: 0; max-width: 560px; font-size: 18px; color: var(--night-mute); }
.hero .search-btn { width: 100%; margin: 36px 0 0; max-width: 560px; height: 54px; padding-left: 18px; font-size: 15px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 14px; color: #8a8a8a; }
.hero-links a { color: #d4d4d4; text-decoration: none; }
.hero-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.band { padding-block: 88px; }
.band-in { max-width: 1240px; margin: 0 auto; }
.band-stone { background: var(--stone); border-block: 1px solid var(--stone-line); }
.band h2 { margin: 12px 0 0; font: 600 clamp(30px, 3.6vw, 44px)/1.05 var(--display); letter-spacing: -0.04em; color: var(--ink); text-wrap: balance; }
.band .sub { margin: 14px 0 0; max-width: 560px; color: var(--ink-2); font-size: 16.5px; }
.band-top { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: 40px; }

.products { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.product { grid-column: span 2; display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; background: var(--paper); transition: border-color .2s, transform .2s; min-width: 0; }
.product:hover { border-color: var(--ink); }
.product.wide { grid-column: span 3; }
.product small { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.product h3 { margin: 4px 0 0; font: 600 22px/1.2 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.product p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.product ul { list-style: none; margin: auto 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.product li { font: 500 11.5px var(--mono); padding: 3px 8px; border-radius: 6px; background: var(--surface); color: var(--ink-2); }
.product .go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
.product .go i { font-style: normal; transition: transform .2s; }
.product:hover .go i { transform: translateX(4px); }

.qs { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.qs > * { min-width: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--ink); }
.steps button { width: 100%; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; padding: 20px 4px; border: 0; border-bottom: 1px solid var(--stone-line); background: none; text-align: left; cursor: pointer; color: var(--ink-3); }
.steps button em { grid-row: span 2; font: 500 12px var(--mono); font-style: normal; padding-top: 4px; }
.steps button b { font: 600 19px var(--display); letter-spacing: -0.02em; }
.steps button span { font-size: 14.5px; }
.steps button[aria-selected="true"], .steps button:hover { color: var(--ink); }
.steps button[aria-selected="true"] span { color: var(--ink-2); }
.qs .code { margin: 0; box-shadow: var(--shadow); }
.qs .code pre { min-height: 260px; }

.dicts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dicts a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; transition: background-color .2s; min-width: 0; }
.dicts a span { font: 500 11.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.dicts a:hover { background: var(--surface); }

.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help-grid > div { padding: 24px; border: 1px solid var(--stone-line); border-radius: 18px; background: var(--paper); }
.help-grid h3 { margin: 0 0 6px; font: 600 18px var(--display); color: var(--ink); letter-spacing: -0.01em; }
.help-grid p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.help-grid a { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.help-grid a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: 248px minmax(0, 1fr); gap: 40px; }
  .toc { display: none; }
}
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: flex; }
  .side { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); height: auto; padding: 24px 24px 48px max(24px, env(safe-area-inset-left, 0px)); background: var(--paper); border-right: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .25s; }
  .side a { margin-left: 0; }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.45); }
  .scrim[hidden] { display: none; }
  .brand-tag { display: none; }
  .products .product, .products .product.wide { grid-column: span 3; }
  .qs { grid-template-columns: 1fr; }
  .dicts { grid-template-columns: repeat(2, 1fr); }
  .help-grid { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --bar-h: 58px; }
  .gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .bar-in { gap: 10px; }
  .brand-name { display: none; }
  .search-btn { height: 38px; }
  .search-btn kbd, .bar .pill { display: none; }
  .ver-label { display: none; }
  .ver-menu { right: -48px; width: min(280px, calc(100vw - 32px)); }
  .products .product, .products .product.wide { grid-column: span 6; }
  .dicts { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .band { padding-block: 64px; }
  .hero-in { padding-block: 64px 56px; }
  .prose h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (min-width: 1241px) { .prose, .pager { max-width: 1100px; } }

/* calmer pass: fewer borders and fills competing with the content */
.page-head { padding-bottom: 24px; }
.page-head h1 { margin-top: 0; }
.prose tbody tr:hover td { background: transparent; }
.prose th { background: transparent; }
.table-wrap { border-radius: 10px; }
.product { padding: 24px; gap: 8px; }
.product small { color: var(--ink-3); }
.side a { color: var(--ink-3); }
.side a:hover { color: var(--ink); }

/* thin scrollbars that match the theme (code blocks keep a dark track) */
.side, .toc, .table-wrap, .results, .tabs-in {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.code pre {
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.side::-webkit-scrollbar, .toc::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .results::-webkit-scrollbar, .code pre::-webkit-scrollbar { width: 8px; height: 8px; }
.side::-webkit-scrollbar-track, .toc::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, .results::-webkit-scrollbar-track, .code pre::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb, .toc::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .results::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.code pre::-webkit-scrollbar-thumb { background: #333; border-radius: 8px; border: 2px solid var(--code-bg); }
.code pre::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }
.code pre::-webkit-scrollbar-corner { background: transparent; }
.code pre:hover { scrollbar-color: #4a4a4a transparent; }

/* breadcrumb row with page actions on the right */
.crumb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.crumb-row .crumbs { margin: 0; }
.updated { margin: 14px 0 0; font: 500 12px var(--mono); letter-spacing: .02em; color: var(--ink-3); }

/* language tabs inside code headers */
.lang-tabs { display: flex; gap: 2px; height: 100%; align-items: stretch; margin-left: -8px; }
.lang-tabs button { position: relative; padding: 0 10px; border: 0; background: none; color: #8a8a8a; font: 500 12px var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.lang-tabs button:hover { color: #d4d4d4; }
.lang-tabs button[aria-selected="true"] { color: #fff; }
.lang-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--glow); }

/* changelog */
.prose .cl { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 28px; padding: 22px 0; border-top: 1px solid var(--line); }
.prose .cl:first-of-type { border-top: 0; }
.prose .cl > :not(.cl-meta) { grid-column: 2; }
.cl-meta { grid-row: span 4; display: grid; align-content: start; gap: 8px; padding-top: 3px; }
.cl-meta time { font: 500 12.5px var(--mono); color: var(--ink-3); }
.prose .cl-prod { justify-self: start; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; font: 500 12px var(--sans); color: var(--ink-2); text-decoration: none; }
.prose .cl-prod:hover { color: var(--ink); border-color: var(--ink-3); }
.prose .cl h3 { margin: 0 0 6px; font-size: 18px; }
.prose .cl p { margin: 0 0 8px; }
@media (max-width: 720px) {
  .prose .cl { grid-template-columns: 1fr; }
  .prose .cl > :not(.cl-meta) { grid-column: 1; }
  .cl-meta { grid-row: auto; grid-auto-flow: column; justify-content: start; align-items: center; margin-bottom: 8px; }
}

/* API & version picker at the top of the sidebar */
.side .ver { display: grid; gap: 8px; margin: 0 0 24px; }
.side .ver-label { padding-left: 12px; color: var(--ink-3); }
.side .ver-btn { width: 100%; height: 40px; justify-content: space-between; border-radius: 10px; border-color: var(--line); background: var(--paper); color: var(--ink); }
.side .ver-btn:hover, .side .ver-btn[aria-expanded="true"] { background: var(--surface); border-color: var(--ink-3); }
.side .ver-menu { left: 0; right: 0; width: auto; top: calc(100% + 6px); background: var(--paper); border-color: var(--line); box-shadow: 0 24px 48px -24px rgba(0,0,0,.35); }
.side .ver-menu a { display: grid; color: var(--ink); padding: 10px 36px 10px 12px; }
.side .ver-menu a span { color: var(--ink-3); font-size: 12px; }
.side .ver-menu a:hover, .side .ver-menu a:focus-visible { background: var(--surface); color: var(--ink); }
.side .ver-menu a[aria-current="page"] { background: transparent; color: var(--ink); font-weight: inherit; }
.side .ver-menu small { color: var(--ink-3); }
.side .ver-menu .ck { color: var(--accent); }
/* collapsible sidebar groups */
.side details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.side details > summary::-webkit-details-marker { display: none; }
.side details > summary h2 { margin-bottom: 0; }
.side details > summary::after { content: ""; width: 6px; height: 6px; margin-right: 14px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s; }
.side details[open] > summary { margin-bottom: 8px; }
.side details[open] > summary::after { transform: rotate(45deg); }
.side details > summary:hover h2 { color: var(--ink); }
