/* Page-level layout of the Worker-rendered pages (platforms, endpoints, pricing, docs, status, legal, 404).
   Components (nav, footer, section heads, terminal, code box, tables, badges, chips, questions, calculator) are the
   home page's own, in ui/ui.css; this file only places them. Every colour, type size, radius and duration is a
   variable from ui/tokens.css (test/site-render.test.ts checks this file writes none of its own). */

/* nothing on a page may widen it sideways; clip makes no scroll box, so sticky still works */
#main { overflow-x: clip; }

/* the page head: the home page's first screen in small. Label and h1 on the left, lead and ways on the right, on one
   baseline; the facts or the price card run across the width under them */
.phead { padding: calc(var(--nav-h) + var(--s-7)) 0 var(--s-8); border-bottom: 1px solid var(--line-2); }
.ph-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-5) var(--s-8); align-items: end; }
.ph-grid.solo { grid-template-columns: minmax(0, 1fr); }
.ph-main { display: grid; gap: var(--s-4); justify-items: start; min-width: 0; }
.ph-words { display: grid; gap: var(--s-4); justify-items: start; min-width: 0; }
.ph-words .t-lead { margin: 0; }
.ph-main .kicker a { color: var(--fg-2); text-decoration: none; }
.ph-main .kicker a:hover { color: var(--fg); }
.ph-strip { margin-top: var(--s-7); min-width: 0; }
.ph-strip .facts { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.ph-strip .facts li { border-top: 0; border-left: 1px solid var(--line-2); }
.ph-strip .facts li:first-child { border-left: 0; }
.ph-strip .facts li:only-child, .ph-strip .facts li:nth-child(odd):last-child { grid-column: auto; }
.dim.tone-ok { color: var(--ok); }
.dim.tone-warn { color: var(--warn); }
:lang(zh) .ph-main .t-h2 { word-break: keep-all; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-6); padding: 0; list-style: none; font: var(--t-label); color: var(--fg-3); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--fg-3); }
.crumbs a { color: var(--fg-2); text-decoration: none; transition: color var(--t-fast) var(--e-std); }
.crumbs a:hover { color: var(--fg); }
.crumbs [aria-current] { color: var(--fg-2); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0; }
.marks { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; }
.hint { margin: 0; }

/* facts: the home page's numbers, smaller, in a framed row (two columns on a phone) */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.facts li { display: grid; gap: var(--s-1); align-content: start; padding: var(--s-4) var(--s-5); border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); min-width: 0; }
.facts li:nth-child(odd) { border-left: 0; }
.facts li:nth-child(-n + 2) { border-top: 0; }
.facts li:only-child, .facts li:nth-child(odd):last-child { grid-column: 1 / -1; }
.facts b { font: var(--t-stat); letter-spacing: var(--ls-stat); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.facts span { font: var(--t-ui); color: var(--fg-2); }

/* sections: the home page's rhythm, a little tighter on reference pages */
.sec.tight { padding: var(--s-8) 0 var(--s-9); border-top: 0; }
.sec-head { margin-bottom: var(--s-6); }
.t-h4.sub { margin: var(--s-7) 0 var(--s-4); }
.more-row { margin: var(--s-5) 0 0; }
.wrap.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.wrap.two > div { display: grid; gap: var(--s-4); min-width: 0; }

/* /platforms: groups of platform cards */
.pgroup + .pgroup { margin-top: var(--s-8); }
.pgroup > h2 { margin: 0 0 var(--s-4); }
.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.pcard { position: relative; display: grid; gap: var(--s-1); height: 100%; padding: var(--s-4) var(--s-7) var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-3); background: var(--bg-1); color: var(--fg); text-decoration: none; transition: border-color var(--t-fast) var(--e-std), background-color var(--t-fast) var(--e-std); }
.pcard:hover { border-color: var(--control); background: var(--bg-2); }
.pcard b { font: var(--t-h4); letter-spacing: var(--ls-h4); }
.pcard span { font: var(--t-code); color: var(--fg-2); }
.pcard small { font: var(--t-label); color: var(--fg-3); }
.pcard .arrow, .ep-row .arrow { position: absolute; right: var(--s-4); top: 50%; margin-top: -7px; color: var(--fg-3); transition: transform var(--t-move) var(--e-out), color var(--t-fast) var(--e-std); }
.pcard:hover .arrow, .ep-row:hover .arrow { transform: translateX(3px); color: var(--fg); }

/* a platform's real answer: the terminal on the left, the endpoint it came from on the right */
.try { display: grid; gap: var(--s-4); max-width: 52rem; }
.try-ans { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.try-ans .try-res { max-height: 32rem; }
.try-term .term-bar span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.try-term .term-bar .btn { height: 30px; padding: 0 var(--s-3); font: var(--t-label); background: var(--code-btn); border-color: var(--code-btn); color: var(--code-btn-fg); }
.try-term pre { white-space: pre; tab-size: 2; }
.try-term .try-req { white-space: pre; overflow-x: auto; }
.try-res { max-height: 26rem; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--code-bg-2) transparent; color: var(--code-fg-2); }
.try-res .s { color: var(--code-str); } .try-res .n { color: var(--code-num); }
.try-foot { margin: 0; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--code-line); font: var(--t-label); color: var(--code-fg-2); }
.try-foot.ok { color: var(--code-ok); }
.try-foot.bad { color: var(--code-bad); }
.try-term [aria-busy="true"] { opacity: .6; }

/* endpoint lists: one row per endpoint, the whole row a link */
.ep-group + .ep-group { margin-top: var(--s-7); }
.ep-group > h3 { margin: 0 0 var(--s-3); }
.ep-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ep-list > li { border-bottom: 1px solid var(--line-2); }
.ep-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem) 9rem; gap: var(--s-2) var(--s-6); align-items: center; padding: var(--s-4) var(--s-7) var(--s-4) var(--s-2); color: var(--fg); text-decoration: none; border-radius: var(--r-1); transition: background-color var(--t-fast) var(--e-std); }
.ep-row:hover { background: var(--bg-1); }
.ep-name { display: grid; gap: 2px; min-width: 0; }
.ep-name b { font: var(--t-btn); }
.ep-name span { font: var(--t-label); color: var(--fg-2); }
.ep-path { font: var(--t-code); color: var(--fg-3); overflow-wrap: anywhere; }
.ep-price { display: grid; justify-items: end; text-align: right; }
.ep-price b { font: var(--t-code); color: var(--fg); }
.ep-price small { font: var(--t-label); color: var(--fg-3); }

/* what it is used for: four cards, each with the endpoints it runs on */


/* an endpoint's price card */
.price-card { display: grid; gap: var(--s-4); padding: var(--s-6); background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-4); }
.pc-big { margin: 0; display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.pc-big b { font: var(--t-h2s); letter-spacing: var(--ls-h2s); font-variant-numeric: tabular-nums; }
.pc-big span { font: var(--t-ui); color: var(--fg-2); }
.pc-events { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-1); font: var(--t-ui); color: var(--fg-2); }
.pc-events li { display: flex; justify-content: space-between; gap: var(--s-4); }
.pc-events b { color: var(--fg); font: var(--t-code); }
.pc-rows { margin: 0; display: grid; border-top: 1px solid var(--line); }
.pc-rows div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-2); font: var(--t-ui); }
.pc-rows dt { color: var(--fg-2); }
.pc-rows dd { margin: 0; font: var(--t-code); color: var(--fg); }
.pc-rows dd.min-note { font: var(--t-label); color: var(--fg-3); text-align: right; }
.endpoint-line { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-2) 0 0; font: var(--t-code); min-width: 0; max-width: 100%; }
.endpoint-line code { overflow-wrap: anywhere; }
.endpoint-line .method { color: var(--ok); background: var(--ok-bg); }
.cost-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cost-list li { padding: var(--s-3) 0; border-bottom: 1px solid var(--line-2); font: var(--t-code); color: var(--fg); }

/* code boxes outside the demo (ui.css .code): the head's tabs, the copy button, never wider than the column */
.code { min-width: 0; }
.code .code-head .tabs, .code .code-head > .grow { flex: 1; min-width: 0; }
.code .tab { height: 28px; }
.code .btn.quiet { background: transparent; color: var(--code-fg); border-color: var(--code-line); }
.code .btn.quiet:hover { background: var(--code-bg-2); }
.code pre { max-height: 32rem; scrollbar-width: thin; scrollbar-color: var(--code-bg-2) transparent; }
.code pre code { font: inherit; }

/* tables: long text wraps inside its cell; the table scrolls in its own box when narrow */
.table .wrapcell { white-space: normal; min-width: 14rem; max-width: 34rem; padding-top: var(--s-2); padding-bottom: var(--s-2); overflow-wrap: anywhere; }
.table td.mono { font: var(--t-code); }
.table td a { text-decoration: none; }
.table td a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--control); }
.table .ep { white-space: normal; min-width: 14rem; padding-top: var(--s-3); padding-bottom: var(--s-3); }
.table .ep a { font-weight: 500; color: var(--fg); }
.table .ep .path { display: block; font: var(--t-code); color: var(--fg-3); margin-top: 2px; }

/* pricing */
.price-words { align-self: start; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: var(--s-4); align-items: end; margin-bottom: var(--s-4); }
.filters .hint { padding-bottom: var(--s-3); white-space: nowrap; }
.filters .input { height: 44px; }
.price-table tr[hidden] { display: none; }
.pt-plat { color: var(--fg-2); }
.rule-cards { display: grid; gap: var(--s-4); }
.rule-card { max-width: none; align-content: start; padding: var(--s-6); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-4); }
.rule-card h2 { margin: 0 0 var(--s-2); }
.faq-side .prose { max-width: none; }

/* long text (legal, docs): a contents list beside a column of comfortable measure */
.longform { display: grid; grid-template-columns: 15rem minmax(0, 46rem); gap: var(--s-9); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + var(--s-6)); display: grid; gap: var(--s-3); max-height: calc(100vh - var(--nav-h) - var(--s-8)); overflow: auto; scrollbar-width: none; }
.toc-h { margin: 0; font: var(--t-micro); letter-spacing: var(--ls-micro); text-transform: uppercase; color: var(--fg-3); }
:lang(zh) .toc-h { letter-spacing: 0; }
.toc ol, .toc ul { margin: 0 0 var(--s-4); padding: 0; list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; font: var(--t-ui); color: var(--fg-2); text-decoration: none; padding: var(--s-1) var(--s-4); margin-left: -1px; border-left: 1px solid transparent; transition: color var(--t-fast) var(--e-std), border-color var(--t-fast) var(--e-std); }
.toc a:hover, .toc a[aria-current="true"] { color: var(--fg); border-left-color: var(--fg); }
.legal-meta { display: grid; gap: var(--s-1); }
.legal-meta .meta { margin: 0; font: var(--t-label); color: var(--fg-3); }
.legal { max-width: 46rem; }
.prose.legal h2, .prose.wide h2 { margin: var(--s-7) 0 0; scroll-margin-top: calc(var(--nav-h) + var(--s-5)); }
.prose.legal > h2:first-child, .doc-part:first-child > h2 { margin-top: 0; }
.prose.wide { max-width: 46rem; }
.doc-part { display: grid; gap: var(--s-3); }
.doc-part + .doc-part { margin-top: var(--s-5); padding-top: var(--s-2); }
.prose .code, .prose .tablewrap { margin: var(--s-2) 0; }
.prose code.inline, .prose code { color: var(--fg); }
.prose code:not(.inline):not(pre code) { font: var(--t-code); background: var(--bg-2); padding: 1px var(--s-1); border-radius: var(--r-1); }
.todo { font: var(--t-code); border: 1px dashed var(--fg); border-radius: var(--r-1); padding: 0 var(--s-1); color: var(--fg); }

/* status */
.st-sum { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; justify-content: flex-end; }
.st-sum li { display: inline-flex; align-items: center; gap: var(--s-2); font: var(--t-ui); }
.st-sum b { font: var(--t-h4); }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); align-items: start; }
.st-card { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--bg-1); }
.st-card summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: var(--s-3); align-items: center; min-height: 56px; padding: 0 var(--s-4); cursor: pointer; list-style: none; }
.st-card summary::-webkit-details-marker { display: none; }
.st-card summary b { font: var(--t-btn); }
.st-card .status-list { padding: 0 var(--s-4) var(--s-2); }
.status-list { margin: 0; list-style: none; border-top: 1px solid var(--line-2); }
.status-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-4); align-items: center; min-height: 44px; border-bottom: 1px solid var(--line-2); font: var(--t-ui); }
.status-list li:last-child { border-bottom: 0; }
.status-list a { color: var(--fg); text-decoration: none; }
.status-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.status-list .n { color: var(--fg-3); white-space: nowrap; }

@media (max-width: 1000px) {
  .ph-grid, .try, .wrap.two, .longform { grid-template-columns: minmax(0, 1fr); }
  .ph-grid { align-items: start; }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-cards { grid-template-columns: minmax(0, 1fr); }
  .longform { gap: var(--s-6); }
  .toc { position: static; max-height: none; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-sum { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .phead { padding: calc(var(--nav-h) + var(--s-5)) 0 var(--s-7); }
  .crumbs ol { margin-bottom: var(--s-4); }
  .crumbs a { display: inline-flex; min-height: 44px; align-items: center; }
  .crumbs ol { align-items: center; row-gap: 0; }
  .pcards, .uses-grid, .st-grid { grid-template-columns: minmax(0, 1fr); }
  .ep-row { grid-template-columns: minmax(0, 1fr) auto; padding-right: var(--s-6); }
  .ep-path { grid-column: 1 / -1; grid-row: 2; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filters .hint { padding-bottom: 0; }
  .toc ol { grid-template-columns: minmax(0, 1fr); }
  .toc a { min-height: 44px; display: flex; align-items: center; }
  .facts li { padding: var(--s-3) var(--s-4); }
  .status-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .status-list .n { display: none; }
  .actions .btn { flex: 1 1 auto; }
}

/* tables: on a phone each row is one block, every cell under its column's name (data-col) */
.price-wrap { border: 1px solid var(--line); border-radius: var(--r-3); }
.price-wrap .tablewrap { overflow: visible; border: 0; }
@media (max-width: 720px) {
  .tablewrap:has(.stack) { overflow: visible; }
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody { display: block; }
  .table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-1) var(--s-4); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-2); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { display: block; height: auto; padding: 0; border: 0; white-space: normal; min-width: 0; max-width: none; text-align: left; overflow-wrap: anywhere; }
  .table.stack td.lead, .table.stack td.wrapcell { grid-column: 1 / -1; }
  .table.stack td:not(.lead)::before { content: attr(data-col); margin-right: var(--s-2); font: var(--t-label); color: var(--fg-3); }
  .table.stack td.wrapcell::before { display: block; margin: 0; }
  .table.stack td.lead { font-weight: 500; }

}

/* a long endpoint list on a phone: the first few of each group and a button for the rest (pages.js) */
.more-eps { display: none; margin-top: var(--s-3); }
@media (max-width: 720px) {
  .js .ep-group:not(.open) .ep-list .extra { display: none; }
  .js .ep-group:not(.open) .more-eps { display: inline-flex; min-height: 44px; }
  .ep-name span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc ul, .toc ul + .toc-h, .toc ol + .toc-h { display: none; }
}

/* a code box wider than its column fades at the right edge until it is scrolled to the end (pages.js marks it) */
pre.can-scroll:not(.at-end) { -webkit-mask-image: linear-gradient(90deg, var(--opaque) calc(100% - var(--s-8)), transparent); mask-image: linear-gradient(90deg, var(--opaque) calc(100% - var(--s-8)), transparent); }

/* the price list on a phone: the first twenty rows and a button for the rest; a search shows every match */
.more-prices { display: none; margin-top: var(--s-3); }
/* the price list shows its first rows and a button for the rest, at every width; a search shows every match */
.js .price-table:not(.all) tbody tr:nth-child(n + 31) { display: none; }
.js #prices:not(.all) .more-prices { display: inline-flex; min-height: 44px; }

/* the price list: every kind of charged record on its own line; under the minimum, the page it covers */
.price-table .ev { display: block; white-space: nowrap; }
.price-table .ev b { font-weight: 500; }
.price-table .pp { display: block; font: var(--t-label); color: var(--fg-3); white-space: nowrap; }

/* an endpoint's price card across the page: the price, its figures side by side, the marks and the way in */
.ph-strip .price-card { grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: var(--s-6); align-items: center; padding: var(--s-5) var(--s-6); }
.pc-a, .pc-c { display: grid; gap: var(--s-3); min-width: 0; }
.pc-c { justify-items: end; }
.ph-strip .pc-rows { border-top: 0; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-5); }
.ph-strip .pc-rows div { display: grid; gap: 2px; padding: 0 0 0 var(--s-5); border-bottom: 0; border-left: 1px solid var(--line-2); }
.ph-strip .pc-rows dd { font: var(--t-h4); font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .ph-strip .price-card { grid-template-columns: minmax(0, 1fr); }
  .pc-c { justify-items: start; }
}
@media (max-width: 720px) {
  .ph-strip .pc-rows { grid-auto-flow: row; }
  .ph-strip .pc-rows div { display: flex; justify-content: space-between; padding: var(--s-3) 0; border-left: 0; border-bottom: 1px solid var(--line-2); }
  .ph-strip .pc-rows dd { font: var(--t-code); }
}

/* the contents list on a narrow screen: one line that opens; the sticky list is for wide screens */
.toc-fold { display: none; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--bg-1); }
.toc-fold summary { display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: 0 var(--s-4); cursor: pointer; list-style: none; font: var(--t-btn); }
.toc-fold summary::-webkit-details-marker { display: none; }
.toc-fold summary .plus { margin-left: auto; }
.toc-fold ol { margin: 0; padding: 0 var(--s-4) var(--s-3); list-style: none; border-top: 1px solid var(--line-2); }
.toc-fold a { display: flex; align-items: center; min-height: 44px; color: var(--fg-2); text-decoration: none; font: var(--t-ui); border-bottom: 1px solid var(--line-2); }
.toc-fold li:last-child a { border-bottom: 0; }
@media (max-width: 1000px) {
  .longform > .toc { display: none; }
  .toc-fold { display: block; }
}
/* a heading that only labels the sections after it */
.prose h2.group { font: var(--t-micro); letter-spacing: var(--ls-micro); text-transform: uppercase; color: var(--fg-3); margin-bottom: calc(-1 * var(--s-3)); }
:lang(zh) .prose h2.group { letter-spacing: 0; }
/* inline code keeps itself together, and a long one wraps inside its own box instead of pushing past the column */
.prose code.inline { display: inline-block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; vertical-align: bottom; }

/* status: the platform cards flow in two columns, so an open card never leaves a hole beside it */
.st-grid { display: block; columns: 2; column-gap: var(--s-3); }
.st-grid > .st-card { break-inside: avoid; margin-bottom: var(--s-3); }
.st-name { margin: 0; font: var(--t-btn); }
.st-what { display: grid; gap: 2px; min-width: 0; }
.st-path { font: var(--t-code); color: var(--fg-3); }
.status-list li { grid-template-columns: minmax(0, 1fr) auto; padding: var(--s-2) 0; }
.status-list .n { font: var(--t-label); }
@media (max-width: 720px) {
  .st-grid { columns: 1; }
  .status-list .n { display: block; }
}
.ph-strip .st-sum { justify-content: flex-start; }
@media (max-width: 720px) { .price-table .ev, .price-table .pp { white-space: normal; } }
@media (max-width: 720px) {
  .ph-strip .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-strip .facts li:nth-child(odd) { border-left: 0; }
  .ph-strip .facts li:nth-child(n + 3) { border-top: 1px solid var(--line-2); }
  .ph-strip .facts li:nth-child(odd):last-child { grid-column: 1 / -1; }
}
/* Chinese body text fills the line and breaks between characters, as Chinese normally does (line-break: strict keeps
   punctuation off a line's start). Kept whole between punctuation, as headings are, a paragraph broke early after a
   comma and left the line half empty (2026-11-21). A run longer than its box still wraps rather than overflow. */
:lang(zh) main p, :lang(zh) main li, :lang(zh) main td, :lang(zh) main dd, :lang(zh) main dt { word-break: normal; overflow-wrap: anywhere; }
/* paging and cost, one under the other in a narrower column: side by side, the shorter one left a hole */
.wrap.stack-narrow > div { display: grid; gap: var(--s-4); max-width: 52rem; min-width: 0; }
.wrap.stack-narrow > div + div { margin-top: var(--s-7); }

/* the docs' worked examples (scripts/site/docs-extras.mjs): a request and its answer in the site's code boxes, notes as a
   two-column list, the bill as a table. Static. */
.dx { display: grid; gap: var(--s-3); margin-top: var(--s-5); min-width: 0; }
.dx > h3 { margin: var(--s-3) 0 0; }
.dx > p { margin: 0; color: var(--fg-2); }
.dx-case { margin: 0; display: grid; gap: 0; border-radius: var(--r-3); overflow: hidden; background: var(--code-bg); box-shadow: 0 0 0 1px var(--code-line); min-width: 0; }
.dx-case figcaption { padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--code-line); font: var(--t-label); color: var(--code-fg-2); }
.dx-req, .dx-ans { margin: 0; padding: var(--s-3) var(--s-4); font: var(--t-code); color: var(--code-fg); white-space: pre; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--code-bg-2) transparent; }
.dx-req { border-bottom: 1px solid var(--code-line); color: var(--code-fg-2); }
.dx-req b { color: var(--code-fg); font-weight: 500; }
.dx-ans .s { color: var(--code-str); } .dx-ans .n { color: var(--code-num); }
.dx-notes { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-2) var(--s-4); }
.dx-notes dt { font: var(--t-code); }
.dx-notes dd { margin: 0; color: var(--fg-2); }
.dx .table caption { text-align: left; padding: var(--s-2) var(--s-4); font: var(--t-label); color: var(--fg-3); }
.dx .table td { white-space: nowrap; }
.dx .table td code { font: var(--t-code); white-space: nowrap; }
.dx .table tfoot th { text-align: left; font: var(--t-ui); color: var(--fg-2); padding: 0 var(--s-4); height: 40px; }

/* /changelog: each day's counts above its table */
.cl-sum { margin: 0 0 var(--s-4); padding-left: 1.2em; display: grid; gap: var(--s-1); color: var(--fg-2); }
