/* Ister palette (Sanzo Wada #2): /access and the API pages (/docs/api, /docs/mcp). System fonts only: these pages load nothing from outside.
   The API's pages (body.api: /docs/api, /docs/mcp, /v1/docs) re-set the colours below the old rules, from option C
   that Ciril picked on 11 Nov 2026: paper and graphite, its fonts served from /fonts/ (SIL OFL 1.1, licences there): latin
   subsets in WOFF2 from Fontsource (cdn.jsdelivr.net/fontsource/fonts/, fetched 11 Nov 2026): Inter and Plus Jakarta Sans
   variable, IBM Plex Mono 400 and 600. */
:root {
  --bg: #0C0B14; --panel: #12101E; --fg: #F5F4FA; --muted: #9B96B2; --line: #2A2640; --accent: #A992E8; --accent-ink: #0F0B12;
  --bad: #F29385; --ok: #68C4AF;
  color-scheme: dark;
  font: 14.5px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
body.login { min-height: 100vh; padding: 16vh 16px 32px; background: radial-gradient(900px 520px at 70% 40%, rgba(128,113,158,.22), rgba(107,194,172,.06) 55%, transparent 76%), var(--bg); }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 17px; margin: 28px 0 8px; }
.muted { color: var(--muted); margin: 0 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 12.5px; color: var(--muted); }
.brand b { color: var(--fg); letter-spacing: .15em; font-size: 14px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.brand .tag { border-left: 1px solid var(--line); padding-left: 10px; }
.box { max-width: 400px; margin: 0 auto; padding: 30px; background: rgba(18,16,30,.85); border: 1px solid var(--line); border-radius: 14px; }
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
input { width: 100%; padding: 10px 11px; font: inherit; color: inherit; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; letter-spacing: .04em; }
button { font: inherit; font-weight: 600; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button.ghost { background: transparent; color: var(--accent); }
button:disabled { opacity: .6; cursor: default; }
.box button[type="submit"] { margin-top: 14px; width: 100%; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row input { flex: 1 1 260px; width: auto; }
.row button { margin: 0; width: auto; }
.err { color: var(--bad); min-height: 1.2em; margin: 8px 0 0; font-size: 13px; }
/* /access (#451): the account's steps in the login page's box */
.box label + input { margin-bottom: 10px; }
.box label.check { display: flex; gap: 8px; align-items: flex-start; color: var(--fg); font-size: 13px; margin: 8px 0 0; }
.box label.check input { width: auto; margin-top: 2px; }
.box .links { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 0; font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pw { margin-top: 12px; padding: 12px; border: 1px dashed var(--ok); border-radius: 8px; }
.pw p { margin: 0 0 6px; }
.pw code { font-size: 18px; letter-spacing: .06em; }
.pw .copy { margin-left: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 550; }
td.num { font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.tag { font-size: 11.5px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.tag.bad { color: var(--bad); border-color: var(--bad); }
.brand .tag { border: 0; border-left: 1px solid var(--line); border-radius: 0; font-size: 12.5px; padding: 0 0 0 10px; }
header.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }

/* ---- The API's pages (#228, #263): /docs/api, /docs/mcp and /v1/docs, option C (Ciril, 11 Nov 2026) ---- */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
body.api {
  --bg: #FAFAF7; --band: #F1F0EB; --panel: #FFFFFF; --fg: #141414; --muted: #5F5E58; --line: #E2E0D8; --line2: #CFCDC4;
  --accent: #141414; --accent-ink: #FFFFFF; --link: #1B6C50; --ok: #1B6C50; --bad: #B0354A; --thead: #F6F5F1; --toc-on: #ECEBE5;
  --code-bg: #1A1A1A; --code-fg: #EDEDE8; --code-muted: #8D8C85; --code-line: #2C2C2C;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --f-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light; background: var(--bg); color: var(--fg); font: 14.5px/1.55 var(--f-body); -webkit-font-smoothing: antialiased;
}
.api a { color: var(--link); }
.api h1, .api h2, .api h3 { font-family: var(--f-head); letter-spacing: -0.015em; line-height: 1.2; }
.api code { font: .92em var(--f-mono); }
.api p code, .api td code, .api li code, .api dd code { background: #EFEEE8; padding: 1px 5px; border-radius: 4px; }
.api .muted { color: var(--muted); }
.api .small { font-size: 12.5px; }
.api .label { font: 600 11.5px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; }
.api .tag { display: inline-block; font: 500 11px/1.4 var(--f-body); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); vertical-align: middle; letter-spacing: 0; text-transform: none; }
.api .tag.live { color: var(--ok); border-color: #A2D0BF; }
.api .tag.bad { color: var(--bad); border-color: var(--bad); }
.api label { font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; }
.api input, .api select { width: 100%; padding: 10px 11px; font: inherit; color: inherit; background: #FFFFFF; border: 1px solid var(--line2); border-radius: 8px; letter-spacing: 0; }
.api label.check { display: flex; gap: 8px; align-items: center; color: var(--fg); font-size: 14px; margin-top: 14px; }
.api label.check input { width: auto; }
.api input:focus, .api select:focus, .api button:focus-visible, .api a:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.api button, .api a.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px/1 var(--f-body); padding: 11px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; white-space: nowrap; cursor: pointer; }
.api button.ghost, .api a.button.ghost { background: #FFFFFF; color: var(--fg); border-color: var(--line2); }
.api .ok { color: var(--ok); } .api .err { color: var(--bad); }
.api .ok:empty, .api .err:empty { min-height: 0; margin: 0; }
.api table { font-size: 13.5px; }
.api th, .api td { padding: 9px 12px; border-bottom-color: var(--line); }
.api thead th, .api table tr:first-child > th { background: var(--thead); color: var(--muted); font-weight: 600; }
.api .card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.api .card.flush { padding: 0; overflow: hidden; }
.api .card h2 { font-size: 20px; margin: 0 0 6px; }
.api .card > .muted { margin: 0 0 14px; }
/* The band under the bar: a page's title, and on /docs/api the keys box beside it */
.api .band { background: var(--band); border-bottom: 1px solid var(--line); }
.api .band-in { max-width: 1240px; margin: 0 auto; padding: 56px 24px 52px; }
.api .band-in.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.api .band h1 { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 12px; }
.api .lead { color: var(--muted); font-size: 17px; margin: 0; max-width: 620px; }
.api .links { display: flex; gap: 22px; flex-wrap: wrap; margin: 22px 0 0; }
.api .links a { color: var(--fg); font-weight: 600; text-decoration: none; }
.api .band .card { box-shadow: 0 14px 40px rgba(20,20,20,.08); }
.api .wrap { max-width: 1240px; margin: 0 auto; padding: 8px 24px 96px; }
.api .wrap.narrow { max-width: 920px; }
.api .band-in.col, .api .wrap.col { max-width: 780px; }
.api .band-in.col .lead { max-width: none; }
.api .sec { margin-top: 56px; }
.api .sec > h2 { font-size: 26px; margin: 0 0 18px; }
/* Forms end with their button; two short fields share a row */
.api form { display: flex; flex-direction: column; }
.api form > button[type="submit"], .api form > .actions { margin-top: 14px; align-self: flex-start; }
.api .fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.api form .small { margin: 8px 0 0; }
/* Boxes in a row share one height; a box's button sits at its foot */
.api .row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.api .row-2 > .card, .api .row-2 > .card + .card { display: flex; flex-direction: column; margin: 0; }
.api .plan h3 { font-size: 18px; margin: 0 0 14px; }
.api .plan .price { font: 800 34px/1 var(--f-head); margin: 0 0 20px; }
.api .plan .price span { font: 500 13px var(--f-body); color: var(--muted); margin-left: 6px; }
.api .plan > .button { margin-top: auto; }
.api ul.ticks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.api ul.ticks li { padding-left: 26px; position: relative; }
.api ul.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
/* The Free/Paid table */
.api table.compare { table-layout: fixed; min-width: 0; }
.api table.compare col.what { width: 40%; }
.api table.compare thead th { color: var(--fg); font: 600 15px/1.3 var(--f-head); padding: 14px 12px; }
.api table.compare thead th:not(:first-child), .api table.compare td { text-align: center; }
.api table.compare .tag { margin-left: 6px; }
.api table.compare tbody th { font-weight: 500; color: var(--fg); background: none; }
.api table.compare tr:last-child > * { border-bottom: 0; }
.api .yes { color: var(--ok); font-weight: 700; } .api .no { color: var(--muted); }
/* Numbered steps: the quick start, the MCP page's setup, signed out and in */
.api ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: block; }
.api ol.steps[hidden] { display: none; }
.api ol.steps > li { counter-increment: s; position: relative; padding: 0 0 26px 44px; border-left: 1px solid var(--line); margin-left: 13px; }
.api ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.api ol.steps > li::before { content: counter(s); position: absolute; left: -14px; top: -2px; width: 27px; height: 27px; border-radius: 50%; background: var(--fg); color: var(--bg); font: 600 13px/27px var(--f-body); text-align: center; }
.api ol.steps h3 { font-size: 16px; margin: 0 0 8px; }
.api ol.steps p { margin: 0 0 10px; } .api ol.steps p:last-child { margin-bottom: 0; }
.api ul.steps { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
/* Code: graphite blocks, with their Copy button under them */
.api pre.cmd, .api main.doc pre { margin: 0; overflow-x: auto; font: 12.5px/1.6 var(--f-mono); background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--code-line); border-radius: 8px; padding: 14px; }
.api .code { background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 8px; overflow: hidden; min-width: 0; }
.api .code .bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 14px; border-bottom: 1px solid var(--code-line); font: 600 11px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--code-muted); }
.api .code .bar .copy { background: transparent; color: var(--code-muted); border: 1px solid var(--code-line); border-radius: 6px; padding: 3px 9px; font: 500 11.5px var(--f-body); letter-spacing: 0; text-transform: none; }
.api .code .bar .copy:hover { color: var(--code-fg); }
.api .code pre.cmd, .api main.doc .code pre { border: 0; border-radius: 0; margin: 0; }
.api .pw { border-color: var(--ok); background: #F3F8F5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.api .pw p { flex: 1 0 100%; margin: 0; }
.api .pw code { font-size: 14px; word-break: break-all; }
.api .pw .copy { margin: 0; }
.api .pw[hidden] { display: none; }
.api .row { align-items: stretch; }
/* /docs/mcp */
/* /docs/mcp's band: the text and the add-it lines left, the showcase right (Ciril, 11 Nov 2026) */
.api .band-in.mcp-hero { max-width: 1160px; align-items: stretch; gap: 48px; }
.api .tabs { margin-top: 26px; }
.api .tablist { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.api .tablist [role="tab"] { background: transparent; color: var(--muted); border: 1px solid transparent; padding: 6px 12px; font-size: 13px; border-radius: 999px; }
.api .tablist [role="tab"][aria-selected="true"] { background: var(--panel); color: var(--fg); border-color: var(--line2); }
.api .tabs .small { margin: 10px 0 0; }
.api .showcase { margin: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(20,20,20,.10); overflow: hidden; min-height: 360px; }
.api .show-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.api .show-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(20,20,20,.45); }
.api .show-bar .tag { margin-left: auto; }
.api .convo { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 22px 18px; animation: show-in .35s ease; }
.api .convo[hidden] { display: none; }
.api .msg { margin: 0; padding: 11px 14px; border-radius: 14px; max-width: 86%; font-size: 14.5px; line-height: 1.5; }
.api .msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.api .msg.bot { align-self: flex-start; background: var(--band); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.api .msg.bot b { font-family: var(--f-head); font-size: 17px; }
.api .chip { align-self: flex-start; margin: 0; padding: 4px 10px; border: 1px dashed var(--line2); border-radius: 999px; font: 12px var(--f-mono); color: var(--muted); }
.api .chip code { background: none; padding: 0; color: var(--link); font-weight: 600; margin-right: 6px; }
.api .show-foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.api .dots { display: flex; gap: 6px; flex: none; }
.api .show-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; background: var(--line2); border: 0; }
.api .show-dot[aria-pressed="true"] { background: var(--accent); }
@keyframes show-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* /access's tallest view, the request form: less room above it on a short window, so it fits with no scroll */
body.login.tall { padding-top: max(16px, min(16vh, calc(100vh - 880px))); padding-bottom: 16px; }
body.login.tall .box { padding-top: 22px; padding-bottom: 22px; }
.box .legal-links { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.box .legal-links a { color: var(--muted); }
/* /terms and /privacy, bare (15 Nov 2026): the box widened for the text */
.box.doc { max-width: 720px; }
.legal h1 { font-size: 22px; margin: 0 0 12px; }
.legal h2 { font-size: 16px; margin: 22px 0 6px; }
.legal p, .legal ul { margin: 0 0 10px; color: var(--fg); line-height: 1.55; }
.legal code { font-size: 12.5px; }
/* /access: a red star by each required field (15 Nov 2026), from the field's own required state; the star is left out of
   the label's accessible name (the "/ ''" form), and "* required" is said once, hidden from screen readers, which hear
   "required" from the field itself */
.box label:has(+ input[required])::after, .box label.check:has(input[required]) > span::after { content: " *"; content: " *" / ""; color: var(--bad); }
.box .req-note { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.box .req-note span { color: var(--bad); }
/* /access on a phone: the card keeps off the screen's edges, with no band above it */
@media (max-width: 520px) { body.login { padding: 20px 12px 24px; } .box { padding: 22px 18px; } }
@media (prefers-reduced-motion: reduce) { .api .convo { animation: none; } }
.api #tools-note:empty { display: none; }
.api #setup:empty { display: none; }
.api #setup ol.steps .code + p.small { margin-top: 8px; }
.api .card + .card { margin-top: 16px; }

/* ---- The Documentation area (#464): /docs, /console, /docs/api, /docs/mcp and /v1/docs. On top, the site's dark header
   as pages/site.css draws it on the site's other pages (lib/site.js writes the same links); under it the area's light tabs,
   which stay in view; then the page in the API pages' light design. ---- */
.api .site-head { --hero-fg: #F5F4FA; --hero-muted: #9B96B2; --hero-border: rgba(228, 224, 245, 0.095); --hero-term: #A992E8; --hero-od: #68C4AF;
  color: var(--hero-fg); padding: 20px 48px 16px; font: 14px/1.5 var(--f-body);
  background: radial-gradient(980px 300px at 78% 0%, rgba(128, 113, 158, 0.25), rgba(107, 194, 172, 0.08) 54%, transparent 76%), #0C0B14; }
.api .site-head a { color: inherit; text-decoration: none; }
.api .site-head .site-in { max-width: 1340px; margin: 0 auto; }
.api .site-head .site-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.api .site-head .brand { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 14px; color: var(--hero-fg); }
.api .site-head .brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hero-term); box-shadow: 0 0 14px var(--hero-term); }
.api .site-head .brand-name { font: 800 15.5px var(--f-head); letter-spacing: 0.15em; }
.api .site-head .brand-tag { font-size: 12.5px; color: var(--hero-muted); border-left: 1px solid var(--hero-border); padding-left: 12px; white-space: nowrap; }
.api .site-head .nav-links { display: flex; align-items: center; justify-content: center; gap: 30px; font-size: 13.5px; color: var(--hero-muted); }
.api .site-head .nav-links a { padding: 4px 2px; border-bottom: 1.5px solid transparent; white-space: nowrap; }
.api .site-head .nav-links a:hover { color: var(--hero-fg); }
.api .site-head .nav-links a[aria-current="page"] { color: var(--hero-fg); border-bottom-color: var(--hero-term); }
.api .site-head .nav-links .sep { width: 1px; height: 14px; background: var(--hero-border); }
.api .site-head .nav-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.api .site-head .btn { padding: 7px 15px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #0F0B12; white-space: nowrap; }
.api .site-head .btn-term { background: var(--hero-term); }
.api .site-head .btn-od { background: var(--hero-od); }
.api .site-head .btn:hover { filter: brightness(1.08); }
.api .area-tabs { position: sticky; top: 0; z-index: 10; padding: 0 48px; background: rgba(250,250,247,.96); border-bottom: 1px solid var(--line); }
.api .area-in { max-width: 1340px; margin: 0 auto; display: flex; align-items: center; gap: 26px; font-size: 14px; overflow-x: auto; }
.api .area-tabs a, .api .area-tabs .tab { padding: 15px 0 13px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; }
.api .area-tabs .area-name { font: 700 15px var(--f-head); color: var(--fg); margin-right: 10px; }
.api .area-tabs a:hover { color: var(--fg); }
.api .area-tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--fg); }
.api .area-tabs a.tab[aria-current="page"] { font-weight: 600; }
.api .area-tabs .tab.off { color: var(--line2); }
.api .coming { display: inline-block; font: 500 10px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 999px; padding: 0 6px; vertical-align: 1px; white-space: nowrap; }
/* /docs: the overview, two cards of entries */
.api .dcard h2 { margin-bottom: 10px; }
.api .drow { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.api .drow b { font-size: 14.5px; font-weight: 600; }
.api .drow-text { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.api .drow .ar { color: var(--link); font-weight: 600; }
.api a.drow:hover b { color: var(--link); }
.api .drow.off b { color: var(--muted); }
/* /console: its keys in one card */
.api .console { margin-top: 40px; }
.api .console[hidden] { display: none; }
.api .console h2 { font-size: 18px; margin: 28px 0 10px; }
.api .console h2:first-of-type { margin-top: 4px; }
.api .console p { margin: 0 0 10px; }
.api .console .console-who { color: var(--fg); }
.api .console .pw .cmd { flex: 1 1 100%; margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; }
.api .console pre.cmd { margin: 0 0 12px; white-space: pre-wrap; word-break: break-all; }
.api .console .note { margin-top: 24px; font-size: 12.5px; color: var(--muted); }
.api .console td button.ghost { padding: 7px 12px; margin-right: 6px; }
.api .console td .ask { margin-right: 10px; color: var(--fg); }     /* Revoke's question, in its row (#496) */
.api .console td .until { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }     /* a replaced key's end (#496) */
@media (max-width: 1100px) {
  .api .site-head .site-nav { grid-template-columns: 1fr auto; }
  .api .site-head .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; flex-wrap: wrap; gap: 8px 22px; }
}
@media (max-width: 900px) {
  .api .site-head { padding: 16px 20px 12px; }
  .api .site-head .brand-tag { display: none; }
  .api .area-tabs { padding: 0 16px; }
  .api .area-in { gap: 18px; }
  .api .area-tabs .area-name { margin-right: 2px; }
}
/* a phone: the tabs only, so the four fit; the header's Documentation leads to the overview */
@media (max-width: 600px) { .api .area-tabs .area-name { display: none; } }

/* /v1/docs: the contents on the left (a line above each group's bold header), one reading column, and the key facts on the right */
.api .docs-layout { display: grid; grid-template-columns: 260px minmax(0, 760px) 260px; gap: 56px; max-width: 1440px; margin: 0 auto; padding: 0 24px; justify-content: center; }
.api .toc-wrap { position: sticky; top: 53px; height: calc(100vh - 53px); }     /* under the area's tabs (#464), 53px tall */
.api .toc-wrap > summary { display: none; }
.api nav.toc { height: 100%; overflow-y: auto; padding: 32px 8px 40px 0; border-right: 1px solid var(--line); }
.api .toc-group { font: 700 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--fg); margin: 22px 0 4px; padding: 14px 10px 0; border-top: 1px solid var(--line2); }
.api .toc-group:first-child { margin-top: 0; }
.api nav.toc ul { list-style: none; margin: 0; padding: 0; }
.api nav.toc ul ul { padding: 0 0 0 12px; }
.api nav.toc a { display: block; padding: 7px 10px; color: var(--muted); text-decoration: none; font-size: 14px; }
.api nav.toc li li a { padding: 3px 10px; font-size: 13px; }
.api nav.toc a:hover { color: var(--fg); }
.api nav.toc a[aria-current] { color: var(--fg); background: var(--toc-on); font-weight: 600; }
.api nav.toc code { font-size: 13px; background: none; padding: 0; }
.api main.doc { padding: 40px 0 140px; min-width: 0; }
.api main.doc section { scroll-margin-top: 70px; }
.api main.doc > section { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--line); }
.api main.doc > section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.api main.doc > section:first-child h1 { font-size: 36px; margin: 0 0 12px; letter-spacing: -0.03em; }
.api main.doc h2 { font-size: 24px; margin: 0 0 12px; }
.api main.doc h3 { font-size: 17px; margin: 28px 0 10px; }
.api main.doc .anchor { margin-left: 8px; color: var(--line2); text-decoration: none; font-weight: 400; opacity: 0; }
.api main.doc :is(h1, h2, h3):hover .anchor, .api main.doc .anchor:focus { opacity: 1; }
.api main.doc table { margin: 12px 0 16px; }
.api main.doc pre { margin: 14px 0; }
.api main.doc .code { margin: 14px 0; }
.api .verb { font: 600 12px var(--f-mono); color: var(--link); margin-right: 4px; }
.api .glance { padding-top: 40px; }
.api .glance .card { position: sticky; top: 93px; padding: 18px; }
.api .glance dl { margin: 0 0 16px; display: grid; gap: 2px; font-size: 13px; }
.api .glance dt { color: var(--muted); margin-top: 8px; font-size: 12px; }
.api .glance dd { margin: 0; overflow-wrap: anywhere; }

/* /docs/methodology (#465): the method in /v1/docs's reading column; a rule's name heads its row; wide tables scroll in their box */
.api main.doc li { margin: 6px 0; line-height: 1.55; }
.api main.doc li > ul { margin: 6px 0 0; }
.api main.doc blockquote { margin: 12px 0 16px; padding: 12px 16px; border-left: 3px solid var(--line2); background: var(--band); }
.api main.doc tbody th { background: none; color: var(--fg); font-weight: 600; }
.api main.doc table.method:has(th:nth-child(3)) { min-width: 560px; }
.api main.doc table.versions { width: auto; min-width: 280px; }

@media (max-width: 1280px) { .api .docs-layout { grid-template-columns: 240px minmax(0, 760px); } .api .glance { display: none; } }
@media (max-width: 900px) {
  .api .band-in { padding: 36px 16px 32px; }
  .api .band-in.split, .api .row-2 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .api .band h1 { font-size: 30px; }
  .api .wrap { padding: 0 16px 80px; }
  .api .sec { margin-top: 44px; }
  .api .docs-layout { display: block; padding: 0; }
  .api .toc-wrap { position: sticky; top: 53px; z-index: 5; height: auto; background: var(--bg); border-bottom: 1px solid var(--line); }
  .api .toc-wrap > summary { display: flex; gap: 8px; align-items: baseline; padding: 10px 16px; cursor: pointer; font-weight: 600; list-style: none; }
  .api .toc-wrap > summary::-webkit-details-marker { display: none; }
  .api .toc-wrap > summary::after { content: "\25BE"; margin-left: auto; color: var(--muted); }
  .api .toc-here { color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .api nav.toc { height: auto; max-height: 60vh; padding: 4px 16px 16px; border-right: 0; }
  .api main.doc { padding: 24px 16px 100px; }
  .api main.doc section { scroll-margin-top: 108px; }
}
@media (max-width: 600px) {
  .api .fields-2 { grid-template-columns: minmax(0, 1fr); }
  .api .card { padding: 20px; }
  .api table.compare { font-size: 12.5px; }
  .api table.compare col.what { width: 38%; }
  .api table.compare th, .api table.compare td { padding: 8px 6px; }
  .api table.compare thead th { font-size: 13.5px; }
  .api table.compare thead th .tag { display: block; width: max-content; margin: 4px auto 0; }
}
