/* QuantSet documentation. Standalone: the marketing stylesheet is not loaded here. */

@font-face { font-family: "Geist"; src: url("/assets/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/Newsreader-Variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --tint: #f6f6f9;
  --ink: #05070a;
  --ink-2: #4b4f58;
  --ink-3: #7b7e8a;
  --line: #e6e7ec;
  --line-2: #cdcfd8;
  --accent: #ffb224;
  --accent-ink: #1f1300;
  --ok: #1f8a4c;
  --warn: #a56a00;
  --bad: #c8402f;
  --code-bg: #0a0d12;
  --code-bar: #11151b;
  --code-line: rgba(255, 255, 255, 0.09);
  --code-ink: #c9ced8;
  --code-dim: #7a8290;
  --text: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --top: 60px;
  --side: 272px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 24px); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); }
body { font: 400 16px/24px var(--text); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre, kbd { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 12px; background: var(--ink); color: #fff; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color 300ms var(--ease), border-color 300ms var(--ease), transform 300ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffc04d; }
.btn-line { border-color: var(--line-2); background: #fff; }
.btn-line:hover { border-color: var(--ink); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: var(--top); padding: 0 24px; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 18px; height: 18px; }
.brand-tag { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); }
.top-links { display: flex; gap: 4px; margin-left: 16px; }
.top-links a { padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: color 300ms var(--ease), background-color 300ms var(--ease); }
.top-links a:hover { color: var(--ink); background: var(--tint); }
.top-links a[aria-current] { color: var(--ink); }
.top-space { flex: 1; }

.search-btn { display: inline-flex; align-items: center; gap: 8px; width: 240px; height: 36px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--tint); font-size: 14px; line-height: 20px; color: var(--ink-3); transition: border-color 300ms var(--ease); }
.search-btn:hover { border-color: var(--line-2); }
.search-btn svg { width: 16px; height: 16px; flex: none; }
.search-btn span { flex: 1; text-align: left; }
kbd { padding: 2px 4px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; font-size: 12px; line-height: 16px; color: var(--ink-2); }

/* API key chip and popover */
.keybox { position: relative; }
.key-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); transition: border-color 300ms var(--ease); }
.key-chip:hover, .key-chip[aria-expanded="true"] { border-color: var(--ink); }
.key-chip code { font-size: 13px; color: var(--ink); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.key-chip[data-own="true"] .key-dot { background: var(--ok); }
.key-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 336px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 16px 40px rgba(5, 7, 10, 0.12); }
.key-pop label { display: block; margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.key-pop input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; font: 400 13px/20px var(--mono); }
.key-pop input:focus { outline: none; border-color: var(--ink); }
.key-pop p { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.key-pop-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.link-btn { padding: 0; border: 0; background: none; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link-btn:hover { text-decoration-color: var(--ink); }

.menu-btn { display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; align-items: center; justify-content: center; }
.menu-btn svg { width: 18px; height: 18px; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); align-items: start; }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 24px 16px 48px 24px; border-right: 1px solid var(--line); overscroll-behavior: contain; }
.side-title { margin: 24px 0 8px; padding: 0 8px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-3); }
.side-title:first-child { margin-top: 0; }
.side a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--ink-2); text-decoration: none; transition: color 300ms var(--ease), background-color 300ms var(--ease); }
.side a:hover { color: var(--ink); background: var(--tint); }
.side a[aria-current] { color: var(--ink); font-weight: 600; background: var(--tint); }
.side-group summary { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--ink-2); cursor: pointer; list-style: none; transition: color 300ms var(--ease), background-color 300ms var(--ease); }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary:hover { color: var(--ink); background: var(--tint); }
.side-group summary::after { content: ""; width: 6px; height: 6px; margin-right: 4px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform 300ms var(--ease); }
.side-group[open] summary::after { transform: rotate(45deg); }
.side-group[open] summary { color: var(--ink); }
.side-group a { margin-left: 12px; padding-left: 12px; border-radius: 0 8px 8px 0; box-shadow: inset 1px 0 0 var(--line); }
.side-group a[aria-current] { box-shadow: inset 2px 0 0 var(--ink); }
.side-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-only-mobile { display: none; }

.main { min-width: 0; padding: 48px 56px 96px; }
.page { display: grid; grid-template-columns: minmax(0, 760px) 208px; gap: 64px; justify-content: space-between; max-width: 1120px; }
.page-wide { display: block; max-width: 1180px; }

/* Article type */
.crumb { margin: 0 0 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-3); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
h1 { margin: 0; font: 400 48px/1 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.lead { margin: 16px 0 0; font-size: 18px; line-height: 28px; color: var(--ink-2); text-wrap: pretty; }
.doc h2 { margin: 64px 0 0; padding-top: 32px; border-top: 1px solid var(--line); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.015em; scroll-margin-top: calc(var(--top) + 16px); }
.doc h3 { margin: 40px 0 0; font-size: 18px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; scroll-margin-top: calc(var(--top) + 16px); }
.doc p, .doc li { color: var(--ink-2); text-wrap: pretty; }
.doc p { margin: 12px 0 0; }
.doc p.crumb { margin: 0 0 12px; color: var(--ink-3); }
.doc p.lead { margin-top: 16px; }
.doc p.note { margin-top: 16px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul, .doc ol { margin: 12px 0 0; padding-left: 20px; }
.doc li { margin-top: 8px; }
.doc a:not(.btn):not(.card) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); transition: text-decoration-color 300ms var(--ease); }
.doc a:not(.btn):not(.card):hover { text-decoration-color: var(--ink); }
:not(pre) > code { padding: 2px 4px; border-radius: 4px; background: var(--tint); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.steps { counter-reset: step; }
.steps > h2 { counter-increment: step; }
.steps > h2::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 12px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; line-height: 20px; font-weight: 600; vertical-align: 3px; }

.note { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.note strong { color: var(--ink); }

/* Sample listing chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips code { padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; line-height: 20px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.card { display: block; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color 300ms var(--ease), transform 500ms var(--ease); }
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card b { display: block; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); }
.card span { display: block; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* Tables */
.table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.table th { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-2); text-align: left; font-weight: 600; color: var(--ink); white-space: nowrap; }
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table-wrap { overflow-x: auto; }
.table td code { white-space: nowrap; }
.status { display: inline-block; min-width: 40px; font: 500 13px/20px var(--mono); color: var(--ink); }

/* Code snippets */
.snippet { margin-top: 16px; border-radius: 12px; background: var(--code-bg); color: var(--code-ink); overflow: hidden; }
.snip-bar { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 8px 4px 12px; background: var(--code-bar); border-bottom: 1px solid var(--code-line); }
.snip-title { font-size: 14px; line-height: 20px; color: var(--code-dim); }
.snip-tabs { display: flex; gap: 4px; }
.snip-tab { height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: none; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--code-dim); transition: color 300ms var(--ease), background-color 300ms var(--ease); }
.snip-tab:hover { color: #fff; }
.snip-tab[aria-selected="true"] { color: #fff; background: rgba(255, 255, 255, 0.1); }
.snip-space { flex: 1; }
.snip-btn { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: none; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--code-ink); transition: color 300ms var(--ease), background-color 300ms var(--ease), border-color 300ms var(--ease); }
.snip-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.snip-btn svg { width: 14px; height: 14px; }
.snip-run { border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.snip-run:hover { border-color: #fff; }
.snip-run[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.snippet pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 22px; tab-size: 2; }
.snippet pre code { font-size: inherit; }
.snippet ::-webkit-scrollbar { width: 8px; height: 8px; }
.snippet ::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(255, 255, 255, 0.16); }
.snippet ::-webkit-scrollbar-corner { background: transparent; }
.snippet pre, .snip-out .csv { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.t-s { color: #e0b872; }
.t-p { color: #eef0f4; }
.t-n { color: #8fc0ff; }
.t-k { color: #8fc0ff; }
.t-c { color: #6b7380; }

.snip-out { border-top: 1px solid var(--code-line); }
.snip-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 12px 16px; font-size: 14px; line-height: 20px; color: var(--code-dim); }
.snip-status b { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/20px var(--mono); color: #fff; }
.snip-status b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4cc38a; }
.snip-status[data-tone="warn"] b::before { background: var(--accent); }
.snip-status[data-tone="bad"] b::before { background: #ff6b5c; }
.snip-hint { margin: 0; padding: 0 16px 12px; font-size: 14px; line-height: 20px; color: #e0b872; }
.snip-hint a { color: #fff; }
.snip-out pre { max-height: 360px; padding-top: 0; overflow: auto; }
.snip-out table { width: 100%; border-collapse: collapse; font: 400 13px/20px var(--mono); }
.snip-out .csv { max-height: 360px; overflow: auto; padding: 0 16px 16px; }
.snip-out th, .snip-out td { padding: 6px 16px 6px 0; border-bottom: 1px solid var(--code-line); text-align: left; white-space: nowrap; }
.snip-out th { position: sticky; top: 0; background: var(--code-bg); color: #fff; font-weight: 500; }
.snip-loading { padding: 16px; }
.snip-loading i { display: block; height: 12px; margin-bottom: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); animation: pulse 1.2s var(--ease) infinite alternate; }
.snip-loading i:nth-child(2) { width: 72%; }
.snip-loading i:nth-child(3) { width: 48%; margin-bottom: 0; }
@keyframes pulse { to { opacity: 0.4; } }

/* An endpoint's request before the page script takes over */
.snippet-pre { border-radius: 12px; background: var(--code-bg); color: var(--code-ink); overflow: hidden; }
.snippet-pre pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 22px; }
.ep-request { padding: 12px; overflow-x: auto; background: var(--code-bg); color: var(--code-ink); border-radius: 8px; }
.ep-more .snippet { margin-top: 12px; }
.ep-more .fields-note a { color: var(--ink); text-underline-offset: 3px; }
.ep-more .fields-note + .fields-note, .ep-more .snippet + .fields-note { margin-top: 20px; }
.ep-more .ref-list { margin-top: 12px; }
.ep-more .ref-row { grid-template-columns: minmax(0, 1fr) auto; }
.ep-more .ref-row code { grid-column: 1 / -1; grid-row: 2; }
.crumb a { color: inherit; }

/* Endpoint pages: measured coverage, described fields, which-to-use lists, questions */
.ep-cover { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 24px 0 0; border: 1px solid var(--line); border-radius: 12px; }
.ep-cover > div { padding: 12px 16px; border-left: 1px solid var(--line); }
.ep-cover > div:first-child { border-left: 0; }
.ep-cover dt { font-size: 13px; line-height: 20px; color: var(--ink-3); }
.ep-cover dd { margin: 2px 0 0; font-size: 18px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ep-cover-note { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.ep-cover-note a { color: var(--ink-2); text-underline-offset: 3px; }
.fields.fields-described { columns: 1; }
.fields.fields-described li { display: block; padding: 10px 0; }
.fields.fields-described li > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fields.fields-described li > div span { flex: none; text-align: right; }
.fields.fields-described p { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.choose-row { display: block; padding: 12px 16px; border-top: 1px solid var(--line); text-decoration: none; transition: background-color 300ms var(--ease); }
.choose-row:first-child { border-top: 0; }
.choose-row:hover { background: var(--tint); }
.choose-row[aria-current] { background: var(--tint); box-shadow: inset 2px 0 0 var(--ink); }
.choose-row b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.choose-row span { display: block; margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.faq { margin: 8px 0 0; }
.faq dt { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; line-height: 24px; font-weight: 600; }
.faq dt:first-child { border-top: 0; padding-top: 8px; }
.faq dd { margin: 4px 0 16px; font-size: 14px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }

/* On this page */
.rail { position: sticky; top: calc(var(--top) + 48px); align-self: start; font-size: 14px; line-height: 20px; }
.rail-title { margin: 0 0 8px; font-weight: 600; }
.rail a { display: block; padding: 4px 0 4px 12px; color: var(--ink-3); text-decoration: none; box-shadow: inset 1px 0 0 var(--line); transition: color 300ms var(--ease); }
.rail a:hover { color: var(--ink); }
.rail a.on { color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }

.next { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--ink-3); }

/* API reference */
.base { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.base > div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.base dt { font-size: 14px; line-height: 20px; font-weight: 600; }
.base dd { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.base dd code { display: inline-block; }
.ref-group { margin-top: 56px; scroll-margin-top: calc(var(--top) + 16px); }
.ref-group h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.ref-group > p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.ref-list { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ref-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); text-decoration: none; transition: background-color 300ms var(--ease); }
.ref-row:first-child { border-top: 0; }
.ref-row:hover { background: var(--tint); }
.ref-row b { font-size: 14px; line-height: 20px; font-weight: 600; }
.ref-row code { padding: 0; background: none; font-size: 13px; line-height: 20px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tag-ok { border-color: #cfe8d9; background: #f1faf4; color: var(--ok); }
.method { font: 600 12px/16px var(--mono); color: var(--ok); }

.ep {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr);
  grid-template-areas: "doc panel" "index panel" "more panel"; gap: 0 clamp(24px, 3vw, 48px); align-items: start;
  --code-bg: #f6f7f9; --code-bar: #fff; --code-line: #dce0e5; --code-ink: #252c35; --code-dim: #505862;
}
.ep-doc { grid-area: doc; min-width: 0; }
.ep-more { grid-area: more; min-width: 0; overflow-wrap: anywhere; }
.ep-index { grid-area: index; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 16px; padding: 8px 0; border-block: 1px solid var(--line); }
.ep-index p { display: none; }
.ep-index a, .ep-show-example { padding: 4px 0; color: var(--ink-2); font-size: 14px; text-underline-offset: 3px; }
.ep-index a { text-decoration: none; }
.ep-index a:hover, .ep-index a:focus-visible { color: var(--ink); text-decoration: underline; }
.ep-code-panel {
  grid-area: panel; position: sticky; top: calc(var(--top) + 24px); min-width: 0;
  display: flex; flex-direction: column; overflow: hidden; max-height: calc(100dvh - var(--top) - 48px);
  border: 1px solid #2b3038; border-radius: 12px; background: #101318; color: #e6e9ee;
  --code-bg: #101318; --code-bar: #181c23; --code-line: #313844; --code-ink: #e6e9ee; --code-dim: #b5bdc9;
}
.ep-code-switch { display: flex; flex: none; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--code-line); }
.ep-code-switch[hidden], .ep-code-panel > [hidden] { display: none; }
.ep-code-switch button { background: none; border: 0; padding: 12px 0; color: var(--code-dim); font-size: 14px; }
.ep-code-switch button[aria-selected="true"] { color: white; box-shadow: inset 0 -2px var(--accent); }
.ep-code-panel > div:not(.ep-code-switch) { min-height: 0; overflow: auto; scrollbar-width: thin; }
.ep-code-panel #response-example { padding: 0 16px; }
.ep .ep-code-panel .snippet, .ep .ep-code-panel .snippet-pre, .ep-code-panel .ep-contract pre { border: 0; margin: 0; border-radius: 0; }
.ep-code-panel .ep-contract pre { padding: 8px 0; }
.ep .ep-code-panel .snip-tab:is(:hover,[aria-selected="true"]), .ep .ep-code-panel .snip-btn:hover { color: #fff; background: #303744; }
.ep-code-panel .fields-note { color: var(--code-dim); }
.ep .ep-code-panel .t-k, .ep .ep-code-panel .t-n { color: #98c8ff; }
.ep .ep-code-panel .t-p { color: #e6e9ee; }
.ep .ep-code-panel .t-s { color: #e2be87; }
.ep .ep-code-panel .t-c { color: #a4adba; }
.ep .snippet, .ep .snippet-pre, .ep-contract pre, .ep-request { border: 1px solid var(--code-line); border-radius: 8px; }
.ep pre { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.ep .snip-tab:hover, .ep .snip-btn:hover, .ep .snip-tab[aria-selected="true"] { color: var(--ink); background: #e9edf2; }
.ep .t-k, .ep .t-n { color: #23558c; }
.ep .t-p { color: #262d38; }
.ep .t-s { color: #705119; }
.ep .t-c { color: #535f6e; }
.ep-contract { margin: 16px 0; }
.ep-json { position: relative; }
.ep-json-copy { position: absolute; top: 0; right: 0; }
.ep-contract.ep-json h3 { min-height: 28px; }
.ep-json-copy[hidden] { display: none; }
.ep-contract h3, .ep-contract summary, .ep-disclosure summary { margin: 0; font-size: 15px; font-weight: 600; }
.ep-contract summary, .ep-disclosure summary { cursor: pointer; padding: 8px 0; }
.ep-json h3, .ep-json summary { padding-right: 76px; }
.ep-contract pre { margin: 8px 0 0; padding: 16px; background: var(--code-bg); color: var(--code-ink); font: 13px/1.65 var(--mono); }
.ep .fields-described li > div { flex-wrap: wrap; }
.ep .fields-described li > div span { flex: 0 1 auto; max-width: 100%; text-align: left; }
.ep .fields code { white-space: normal; overflow-wrap: anywhere; }
.ep-path { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.ep-path code { flex: 1; min-width: 0; padding: 0; background: none; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); transition: color 300ms var(--ease), background-color 300ms var(--ease); }
.icon-btn:hover { color: var(--ink); background: var(--tint); }
.icon-btn svg { width: 16px; height: 16px; }
.ep-flag { margin: 16px 0 0; font-size: 14px; line-height: 24px; color: var(--ink-2); }
.ep-flag .tag { margin-right: 8px; }
.ep-flag a { color: var(--ink); text-underline-offset: 3px; }
.ep-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.btn-line { height: 32px; }
.ep h2 { margin: 48px 0 0; font-size: 18px; line-height: 28px; font-weight: 600; }
.params { margin-top: 8px; }
.param { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.param-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.param-name code { padding: 0; background: none; font-size: 14px; line-height: 20px; font-weight: 500; }
.param-name span { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.param-name .req { color: var(--bad); font-weight: 500; }
.param p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.param input[type="text"], .param select { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font: 400 13px/20px var(--mono); transition: border-color 300ms var(--ease); }
.param input[type="text"]:focus, .param select:focus { outline: none; border-color: var(--ink); }
.param input::placeholder { color: var(--ink-3); }
.fields { margin: 8px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.fields li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); break-inside: avoid; font-size: 14px; line-height: 20px; }
.fields code { padding: 0; background: none; white-space: nowrap; overflow-wrap: normal; }
.fields span { min-width: 0; color: var(--ink-3); font-size: 12px; line-height: 20px; text-align: right; overflow-wrap: anywhere; }
.fields-note { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.ep-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.ep-nav a { font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.ep-nav a:hover { color: var(--ink); }
.skeleton i { display: block; height: 16px; margin-top: 16px; border-radius: 4px; background: var(--tint); animation: pulse 1.2s var(--ease) infinite alternate; }
.skeleton i:first-child { width: 40%; height: 40px; }
.skeleton i:nth-child(3) { width: 64%; }

/* Search */
.search { width: min(560px, calc(100vw - 32px)); margin-top: 96px; padding: 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 64px rgba(5, 7, 10, 0.24); }
.search::backdrop { background: rgba(5, 7, 10, 0.32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.search input { width: 100%; height: 56px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 24px; }
.search input:focus { outline: none; }
.search ul { max-height: 360px; margin: 0; padding: 8px; overflow-y: auto; list-style: none; }
.search li a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; text-decoration: none; }
.search li a.on { background: var(--tint); }
.search li a span { min-width: 0; }
.search li code { display: block; padding: 0; background: none; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search li small { font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; }
.search-empty { padding: 24px 16px; font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* Entrance */
.js .main > * { animation: rise 600ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Responsive */
@media (max-width: 1320px) {
  .page { grid-template-columns: minmax(0, 760px); }
  .rail { display: none; }
}
@media (max-width: 1100px) {
  .ep { grid-template-columns: minmax(0, 1fr); grid-template-areas: "doc" "panel" "index" "more"; }
  .ep-code-panel { position: static; margin-top: 24px; max-height: none; }
  .ep-code-panel > div:not(.ep-code-switch) { overflow: visible; }
  .main { padding: 40px 32px 80px; }
  .search-btn { width: auto; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { padding: 0 10px; }
}
@media (max-width: 860px) {
  .top { padding: 0 16px; gap: 8px; }
  .top-links, .top .keybox, .top .btn-primary { display: none; }
  .menu-btn { display: inline-flex; }
  .shell { display: block; }
  .side { position: fixed; inset: var(--top) 0 0 0; z-index: 30; width: 100%; height: auto; padding: 16px 16px 48px; border-right: 0; background: #fff; transform: translateX(-100%); visibility: hidden; transition: transform 500ms var(--ease), visibility 0s 500ms; }
  body.menu-open { overflow: hidden; }
  body.menu-open .side { transform: none; visibility: visible; transition: transform 500ms var(--ease); }
  .side-only-mobile { display: block; margin-bottom: 24px; }
  .side-only-mobile .keybox { display: block; }
  .side-only-mobile .key-chip { width: 100%; justify-content: flex-start; height: 44px; }
  .side-only-mobile .key-pop { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .side-only-mobile .btn { width: 100%; height: 44px; margin-top: 8px; }
  .side a, .side-group summary { padding: 10px 8px; }
  .main { padding: 32px 16px 64px; }
  h1 { font-size: 36px; line-height: 40px; }
  .doc h2 { margin-top: 48px; font-size: 20px; line-height: 28px; }
  .cards, .base { grid-template-columns: minmax(0, 1fr); }
  .ref-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .ref-row code { grid-column: 1 / -1; grid-row: 2; }
  .param { grid-template-columns: minmax(0, 1fr); }
  .fields { columns: 1; }
  .snip-bar [data-act="copy"] span { display: none; }
  .snip-tab { padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
