/* ==========================================================================
   Rone Arena: "field manual" design system
   --------------------------------------------------------------------------
   The API is presented like a printed reference: black ink on paper, ruled
   lines instead of boxes, condensed heavy headings, monospace data, and a
   single highlighter colour used the way a highlighter pen is used (behind
   key marks, never as text colour).

   Rules this file enforces (from the anti-"AI slop" research):
   - no gradients-as-decoration, glows, blur, or decorative motion
   - no cards-in-cards; sections are separated by rules, not shadows
   - one accent, used sparingly; data colours carry meaning only
   - one border OR one shadow per surface, never both
   - body text 16px, line length capped near 70ch
   ========================================================================== */

:root {
	color-scheme: light;

	--paper: #f7f7f4;
	--paper-2: #efefea;
	--paper-3: #e4e4dd;
	--ink: #121212;
	--ink-2: #3f4044;
	--ink-3: #66676c;
	--rule: #d6d6ce;

	/* Highlighter. Always paired with --mark-ink text for contrast. */
	--mark: #d4f53c;
	--mark-ink: #121212;

	--win: #17773a;
	--loss: #b8261a;
	--caution: #8a5a00;
	--info: #0b57d0;

	--font-sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	--measure: 70ch;
	--page: 1200px;
	--gutter: 20px;
	--radius: 3px;
	--nav-h: 56px;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--paper: #121310;
		--paper-2: #1b1c18;
		--paper-3: #26271f;
		--ink: #ecece5;
		--ink-2: #bdbeb6;
		--ink-3: #8f9088;
		--rule: #2f302a;
		--win: #56c27a;
		--loss: #ff7a6b;
		--caution: #e0b050;
		--info: #7fb0ff;
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--paper: #121310;
	--paper-2: #1b1c18;
	--paper-3: #26271f;
	--ink: #ecece5;
	--ink-2: #bdbeb6;
	--ink-3: #8f9088;
	--rule: #2f302a;
	--win: #56c27a;
	--loss: #ff7a6b;
	--caution: #e0b050;
	--info: #7fb0ff;
}

/* Screen tiers: mobile < 640, tablet 640+, laptop 1024+, monitor 1440+,
   extra 1920+. Type is in rem, so the root size scales every text size
   together and still follows the reader's browser setting. */
@media (min-width: 768px) {
	:root { --gutter: 32px; }
}
@media (min-width: 1440px) {
	:root { --page: 1320px; --gutter: 40px; }
}
@media (min-width: 1920px) {
	html { font-size: 106.25%; }
	:root { --page: 1480px; --gutter: 48px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	font-variation-settings: "wdth" 100;
	line-height: 1.55;
	font-kerning: normal;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	margin: 0;
	font-family: var(--font-sans);
	font-weight: 800;
	font-variation-settings: "wdth" 72;
	line-height: 1.02;
	letter-spacing: -0.005em;
	text-wrap: balance;
}
/* No one-word last lines in running text; figures line up in columns. */
p, li, dd, figcaption, blockquote { text-wrap: pretty; }
table, .mono, code, .method, .version { font-variant-numeric: tabular-nums; }

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
code, pre, kbd { font-family: var(--font-mono); font-size: 0.92em; }
pre { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Scrollbars ----------
   Invisible until the pointer is over the scrolling box, then an ink
   thumb on no track. The space stays reserved (thin), so nothing shifts
   when it appears. Chrome/Firefox use scrollbar-color; Safari the
   ::-webkit-scrollbar rules. */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: var(--ink-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
	background: transparent;
	border: 2px solid transparent;
	border-radius: var(--radius);
	background-clip: padding-box;
}
:hover::-webkit-scrollbar-thumb { background-color: var(--ink-3); }
:hover::-webkit-scrollbar-thumb:hover { background-color: var(--ink); }
:hover::-webkit-scrollbar-thumb:active { background-color: var(--mark); }
::selection { background: var(--mark); color: var(--mark-ink); }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); }
.quiet { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; }
.measure { max-width: var(--measure); }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }

/* Highlighter mark behind a word or number. */
.hl {
	background: var(--mark);
	color: var(--mark-ink);
	padding: 0 0.08em;
}

/* Inline text link: ink with an underline, never coloured. */
.link {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.link:hover { text-decoration-thickness: 2px; }
.ext::after { content: " \2197"; font-family: var(--font-mono); font-size: 0.85em; }

/* ---------- Controls ---------- */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 38px;
	padding: 7px 14px;
	/* Borderless: a soft paper fill carries the shape. The transparent border
	   keeps every variant the same size. */
	border: 1.5px solid transparent;
	border-radius: var(--radius);
	background: var(--paper-3);
	color: var(--ink);
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.12s ease, color 0.12s ease;
}
.button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
/* Highlighter button. --mark-ink is dark in both themes, so the label stays
   readable on the green; on hover the colours swap onto that same dark. */
.button--mark { background: var(--mark); border-color: var(--mark); color: var(--mark-ink); }
.button--mark:hover:not(:disabled) { background: var(--mark-ink); border-color: var(--mark); color: var(--mark); }
.button--danger { background: color-mix(in srgb, var(--loss) 12%, transparent); color: var(--loss); }
.button--danger:hover:not(:disabled) { background: var(--loss); color: var(--paper); }
.button--small { min-height: 32px; padding: 4px 10px; font-size: 0.8125rem; }
.button--bare { background: transparent; }
.button--bare:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }

.input, .select, .textarea {
	width: 100%;
	min-height: 38px;
	padding: 6px 10px;
	border: 1.5px solid var(--ink-3);
	border-radius: var(--radius);
	background: var(--paper);
	color: var(--ink);
	font-size: 1rem;
	outline: none;
	transition: border-color 0.12s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--mark); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
/* With a mouse there is no zoom to avoid, so controls can drop to 15px. */
/* Touch keeps ~38px targets and 16px field text (iOS zooms below 16px).
   With a mouse, controls tighten to 32-34px and 14px text. */
@media (min-width: 768px) and (pointer: fine) {
	.input, .select { min-height: 32px; padding-block: 4px; font-size: 0.875rem; }
	.button { min-height: 34px; padding: 5px 12px; }
	.button--small { min-height: 28px; padding: 3px 9px; }
}
.textarea { min-height: 128px; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; resize: vertical; }
.select {
	appearance: none;
	padding-right: 36px;
	background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
	background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	cursor: pointer;
}
.is-invalid, .is-invalid:hover, .is-invalid:focus { border-color: var(--loss) !important; box-shadow: inset 0 -3px 0 var(--loss) !important; }

/* Checkbox group rendered as toggle tags. */
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle { position: relative; display: inline-flex; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle label {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 3px 10px;
	border: 1.5px solid transparent;
	border-radius: var(--radius);
	background: var(--paper-2);
	color: var(--ink-2);
	font-size: 0.875rem;
	cursor: pointer;
	user-select: none;
}
@media (min-width: 768px) and (pointer: fine) {
	.toggle label { min-height: 28px; padding: 2px 9px; font-size: 0.8125rem; }
}
.toggle label:hover { background: var(--paper-3); color: var(--ink); }
.toggle input:checked + label { background: var(--mark); border-color: var(--mark); color: var(--mark-ink); font-weight: 600; }
.toggle input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.toggles.is-invalid { outline: 1.5px solid var(--loss); outline-offset: 4px; }

/* Text tabs with an underline for the active one. */
.tabs { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
	flex: none;
	padding: 10px 0;
	border: 0;
	border-bottom: 3px solid transparent;
	background: none;
	color: var(--ink-2);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* Code-language picker: a row of mono words. */
.langs { display: flex; flex-wrap: wrap; gap: 4px 2px; }
.lang {
	padding: 2px 7px;
	border: 0;
	border-radius: var(--radius);
	background: none;
	color: var(--ink-2);
	font-family: var(--font-mono);
	font-size: 0.75rem;
}
.lang:hover { color: var(--ink); background: var(--paper-2); }
.lang.is-active { background: var(--ink); color: var(--paper); }

/* HTTP method: coloured mono word, no pill. */
.method {
	display: inline-block;
	min-width: 3.4em;
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.method--get { color: var(--win); }
.method--post { color: var(--info); }
.method--put, .method--patch { color: var(--caution); }
.method--delete { color: var(--loss); }

/* Plain inline tag for status words (Deprecated, Auth). */
.tag {
	display: inline-block;
	padding: 0 4px;
	border: 1px solid currentColor;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0.01em;
	vertical-align: 0.1em;
	white-space: nowrap;
}
.tag--caution { color: var(--caution); }
.tag--info { color: var(--info); }

.note {
	padding: 10px 14px;
	border-left: 3px solid var(--caution);
	background: var(--paper-2);
	color: var(--ink);
	font-size: 0.9375rem;
	max-width: var(--measure);
}
.note--ink { border-left-color: var(--ink); }

/* ---------- Header ---------- */
.masthead { border-bottom: 1.5px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 40; }
.masthead-row { display: flex; align-items: center; gap: 12px; min-height: var(--nav-h); }
@media (min-width: 900px) { .masthead-row { gap: 28px; } }
.wordmark {
	font-weight: 900;
	font-variation-settings: "wdth" 62;
	font-size: 1.3125rem;
	text-decoration: none;
	text-transform: uppercase;
	line-height: 1;
	white-space: nowrap;
}
.wordmark span { font-weight: 400; }
@media (min-width: 480px) { .wordmark { font-size: 1.5rem; } }
.nav { display: none; gap: 22px; }
.nav a { font-weight: 600; font-size: 0.9375rem; text-decoration: none; color: var(--ink-2); padding-block: 4px; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--mark); }
.masthead-end { margin-left: auto; display: flex; align-items: center; gap: 4px; min-width: 0; }
@media (min-width: 640px) { .masthead-end { gap: 8px; } }
.version { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); margin-right: 6px; text-decoration: none; }
.version:hover { color: var(--ink); }
.only-wide { display: none !important; }
/* The theme switch lives in the drawer on phones. */
.from-tablet { display: none !important; }
@media (min-width: 640px) { .from-tablet { display: inline-flex !important; } }
.menu-toggle { display: inline-flex; }
@media (min-width: 900px) {
	.nav { display: flex; }
	.only-wide { display: inline-flex !important; }
	.menu-toggle { display: none; }
}
.drawer { border-top: 1px solid var(--rule); padding-block: 4px 16px; }
.drawer a, .drawer button { display: block; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left; font-weight: 600; font-size: 1rem; text-decoration: none; }
.drawer a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--mark); padding-left: 12px; }
@media (min-width: 640px) { .drawer .drawer-theme { display: none; } }
@media (min-width: 900px) { .drawer { display: none !important; } }

.theme-dark-label { display: none; }
:root[data-theme="dark"] .theme-dark-label { display: inline; }
:root[data-theme="dark"] .theme-light-label { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-dark-label { display: inline; }
	:root:not([data-theme="light"]) .theme-light-label { display: none; }
}

/* User menu */
.menu-anchor { position: relative; min-width: 0; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--paper-3); box-shadow: 0 0 0 1.5px var(--rule); }
.user-button { display: inline-flex; align-items: center; gap: 8px; min-width: 40px; min-height: 40px; padding: 4px; border: 0; border-radius: var(--radius); background: none; font-weight: 600; font-size: 0.875rem; }
.user-button:hover, .user-button[aria-expanded="true"] { background: var(--paper-2); }
.user-button:hover .avatar, .user-button[aria-expanded="true"] .avatar { box-shadow: 0 0 0 1.5px var(--ink); }
.user-button .name { display: none; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 640px) { .user-button { padding-right: 10px; } .user-button .name { display: block; } }
.menu {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 60;
	width: 270px;
	border: 1.5px solid var(--ink);
	border-radius: var(--radius);
	background: var(--paper);
}
.menu-meta { padding: 12px 14px; border-bottom: 1px solid var(--rule); font-size: 0.875rem; }
.menu-item { display: block; width: 100%; padding: 11px 14px; border: 0; background: none; text-align: left; font-size: 0.9375rem; font-weight: 600; }
.menu-item:hover { background: var(--paper-2); }
.menu-item + .menu-item { border-top: 1px solid var(--rule); }
.menu-item--danger { color: var(--loss); }

/* ---------- Dialog ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(18, 18, 18, 0.55); }
.dialog {
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
	border: 1.5px solid var(--ink);
	border-radius: var(--radius);
	background: var(--paper);
}
.dialog h2 { font-size: 2rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.dialog-lede { margin-top: 10px; }
.signin-steps { display: grid; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: signin; }
.signin-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding-block: 18px; border-top: 1px solid var(--rule); counter-increment: signin; transition: opacity 0.15s; }
.signin-step::before {
	content: counter(signin);
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 1.5px solid var(--ink);
	border-radius: 50%;
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	font-weight: 600;
}
.signin-step.is-waiting { opacity: 0.45; }
.signin-step-body { display: grid; gap: 12px; min-width: 0; }
.signin-step-title { padding-top: 3px; font-weight: 700; }
.field { display: grid; gap: 4px; min-width: 0; }
.field-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); }
.field-pair { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; }
.field-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.field-row .input { flex: 1 1 140px; width: auto; min-width: 0; }
.field-row .help { flex: 1 1 180px; margin: 0; font-size: 0.8125rem; }
.signin-step input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.signin-step input[type="number"]::-webkit-inner-spin-button,
.signin-step input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dialog .status-line { padding-top: 14px; margin-top: 0; border-top: 1px solid var(--rule); }
.status-line { min-height: 22px; margin-top: 16px; font-size: 0.875rem; color: var(--ink-2); }
.status-line[data-variant="success"] { color: var(--win); }
.status-line[data-variant="error"] { color: var(--loss); }
.status-line[data-variant="info"] { color: var(--info); }
.status-line[data-variant="warn"] { color: var(--caution); }
.plain-list { margin-top: 18px; }
.plain-list > li { list-style: none; border-top: 1px solid var(--rule); }
.plain-list > li:last-child { border-bottom: 1px solid var(--rule); }
.plain-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; text-decoration: none; font-weight: 600; }
.plain-list a span { font-weight: 400; color: var(--ink-3); font-family: var(--font-mono); font-size: 0.8125rem; overflow-wrap: anywhere; text-align: right; }
.plain-list a:hover { background: var(--paper-2); }

/* ---------- Page structure ---------- */
main { flex: 1 0 auto; }

/* A section: heading in the left margin column, content on the right. */
/* minmax(0, 1fr) lets wide tables scroll inside their column instead of widening the page. */
.section { padding-block: 40px; border-top: 1.5px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 960px) {
	.section { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding-block: 56px; }
}
.section-title { font-size: 2.125rem; }
.section-aside { display: flex; flex-direction: column; gap: 12px; }
.section-aside p { font-size: 0.9375rem; color: var(--ink-2); }
.section-aside .link { font-size: 0.9375rem; font-weight: 600; }

.lede { font-size: 1.25rem; line-height: 1.5; max-width: 58ch; color: var(--ink-2); }

/* Front page opening */
.opening { padding-block: 44px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 960px) {
	.opening { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; padding-block: 64px; align-items: start; }
}
.opening h1 { font-size: clamp(2.875rem, 4.4vw + 1.25rem, 5.25rem); text-transform: uppercase; }
.opening .lede { margin-top: 20px; }
.opening .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.base-url { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.875rem; }
.base-url code { font-size: 0.9375rem; overflow-wrap: anywhere; }

/* ---------- Ruled tables ---------- */
.ruled { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.ruled caption { caption-side: top; text-align: left; padding-bottom: 12px; }
.ruled caption strong { display: block; font-size: 1.375rem; font-weight: 800; font-variation-settings: "wdth" 72; }
.ruled caption span { font-size: 0.875rem; color: var(--ink-2); }
.ruled th {
	padding: 8px 14px 8px 0;
	border-bottom: 1.5px solid var(--ink);
	text-align: left;
	font-size: 0.8125rem;
	font-weight: 700;
	font-variation-settings: "wdth" 80;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-2);
	white-space: nowrap;
}
.ruled td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ruled th:last-child, .ruled td:last-child { padding-right: 0; }
.ruled .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ruled th.num { font-family: var(--font-sans); }
.ruled tbody tr:hover td { background: var(--paper-2); }
.ruled .group-row td { padding-top: 28px; border-bottom: 1.5px solid var(--ink); background: none !important; }
.ruled .group-row h3 { display: inline; font-size: 1.5rem; }
.ruled .group-row span { margin-left: 10px; font-size: 0.875rem; color: var(--ink-3); }
.ruled a { text-decoration: none; }
.ruled a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ruled .path { font-family: var(--font-mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }

.hero-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.hero-cell img { width: 34px; height: 34px; border-radius: 50%; background: var(--paper-3); object-fit: cover; flex: none; }
.rank-no { font-family: var(--font-mono); color: var(--ink-3); width: 2ch; }
.win { color: var(--win); font-weight: 600; }
.request-line { display: block; margin-top: 12px; font-size: 0.8125rem; color: var(--ink-3); overflow-wrap: anywhere; }

/* Code block: paper-2 panel with an ink rule on the left. */
.code {
	max-height: 460px;
	overflow: auto;
	padding: 14px 16px;
	border-left: 3px solid var(--ink);
	background: var(--paper-2);
	font-size: 0.8438rem;
	line-height: 1.65;
	white-space: pre;
	tab-size: 4;
}

/* ---------- Products built on the API ---------- */
.product { display: grid; gap: 16px 32px; padding-block: 28px; border-bottom: 1px solid var(--rule); }
.product:first-child { padding-top: 0; }
@media (min-width: 760px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.product h3 { font-size: 2.375rem; }
.product h3 a { text-decoration: none; }
.product h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.product .domain { margin-top: 4px; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-3); }
.product .about { margin-top: 12px; color: var(--ink-2); max-width: 52ch; }
.product .shows { margin-top: 12px; font-size: 0.9375rem; max-width: 52ch; }
.uses-title { font-size: 0.8125rem; font-weight: 700; font-variation-settings: "wdth" 80; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 6px; border-bottom: 1.5px solid var(--ink); }
.uses li { list-style: none; display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: 0.8438rem; }
.uses li a { text-decoration: none; overflow-wrap: anywhere; }
.uses li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.uses .what { grid-column: 2; font-family: var(--font-sans); font-size: 0.875rem; color: var(--ink-2); }

.feature-map { margin-top: 8px; }
.feature-map td:first-child { font-weight: 600; width: 34%; }
.byline { font-size: 0.9375rem; }
.product .byline { margin-top: 8px; color: var(--ink-2); }

/* Showcase submission */
.page-head .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.submit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; min-width: 0; }
.steps { counter-reset: step; display: grid; gap: 14px; max-width: var(--measure); }
.steps li { list-style: none; counter-increment: step; position: relative; padding-left: 2.2em; }
.steps li::before { content: counter(step); position: absolute; left: 0; font-family: var(--font-mono); font-weight: 600; }
.submit-block h3 { font-size: 1.375rem; }
.submit-block > h3 { margin-bottom: 10px; }
.submit-block .pane-tools { margin-bottom: 10px; }
.submit-block .code { max-height: 420px; }
.code--wrap { white-space: pre-wrap; }
.fields td:first-child { font-weight: 600; width: 30%; }

/* ---------- Playground ---------- */
.workbench { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .workbench { grid-template-columns: 270px minmax(0, 1fr); gap: 40px; } }

.index {
	display: none;
	position: sticky;
	top: calc(var(--nav-h) + 1.5px);
	max-height: calc(100vh - var(--nav-h) - 2px);
	overflow-y: auto;
	padding-block: 28px;
	padding-right: 14px;
	border-right: 1px solid var(--rule);
}
@media (min-width: 1024px) { .index { display: block; } }
.index-groups { display: grid; margin-bottom: 18px; border-top: 1.5px solid var(--ink); }
.index-groups a { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--rule); font-weight: 800; font-variation-settings: "wdth" 76; font-size: 1.125rem; text-decoration: none; }
.index-groups a span { font-family: var(--font-mono); font-weight: 400; font-size: 0.8125rem; color: var(--ink-3); font-variation-settings: normal; }
.index-groups a:hover { background: var(--paper-2); }
.index-groups a[aria-current="page"] { box-shadow: inset 5px 0 0 var(--mark); padding-left: 12px; }
.filter-hint { display: none; margin-top: 6px; font-size: 0.75rem; color: var(--ink-3); }
.filter-hint kbd { padding: 0 4px; border: 1px solid var(--rule); border-radius: var(--radius); font-size: 0.6875rem; color: var(--ink-2); }
@media (pointer: fine) { .filter-hint { display: block; } }
.index-list { display: grid; margin-top: 10px; }
.index-list a { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 4px; padding: 6px 6px; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.4; text-decoration: none; color: var(--ink-2); }
.index-list a:hover { background: var(--paper-2); color: var(--ink); }
.index-list a[aria-current="page"] { background: var(--mark); color: var(--mark-ink); }
.index-list a[aria-current="page"] .method { color: var(--mark-ink); }
.index-list .method { padding-top: 2px; }
.index-list .entry { display: grid; gap: 1px; min-width: 0; }
.index-list .name { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; line-height: 1.3; color: var(--ink); }
.index-list .path { font-size: 0.75rem; color: var(--ink-3); overflow-wrap: break-word; }
.index-list a[aria-current="page"] .name, .index-list a[aria-current="page"] .path { color: var(--mark-ink); }
.index-list a.is-deprecated .name { color: var(--ink-3); text-decoration: line-through; }

.bench-head { padding-block: 28px 8px; }
.bench-head .tabs { margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.bench-head h1 { font-size: clamp(2.5rem, 3vw + 1.375rem, 4rem); }
.bench-head .lede { margin-top: 12px; font-size: 1.125rem; }
.bench-base { margin-top: 16px; font-size: 0.875rem; color: var(--ink-2); }
.bench-base code { color: var(--ink); overflow-wrap: anywhere; }

.jump { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 16px; }
.jump a { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; background: var(--paper-2); border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none; }
.jump a .method { min-width: 0; font-size: 0.6875rem; }
.jump a:hover { background: var(--paper-3); }
.jump a[aria-current="page"] { background: var(--mark); color: var(--mark-ink); }
.jump a[aria-current="page"] .method { color: var(--mark-ink); }
@media (min-width: 1024px) { .jump-block { display: none; } }

/* One endpoint = one ruled section. */
.endpoint { padding-block: 34px 40px; border-top: 1.5px solid var(--ink); scroll-margin-top: calc(var(--nav-h) + 8px); min-width: 0; }
.endpoint-route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-family: var(--font-mono); font-size: 0.9375rem; }
.endpoint-route .method { font-size: 0.9375rem; }
.endpoint-route code { font-size: 0.9375rem; overflow-wrap: anywhere; }
.endpoint-title { margin-top: 10px; font-size: 2.375rem; }
.endpoint-title .tag { margin-left: 6px; font-variation-settings: normal; vertical-align: 0.35em; }
.endpoint.is-deprecated .endpoint-title { color: var(--ink-3); }
.endpoint-tools { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 0.875rem; }
.endpoint .note { margin-top: 16px; }

.prose { max-width: var(--measure); color: var(--ink-2); font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.prose p { margin: 0 0 8px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul { margin: 4px 0 10px; padding-left: 20px; }
.prose ul ul { margin: 2px 0; }
.prose li { margin: 2px 0; }
.prose code { padding: 0 4px; border-radius: var(--radius); background: var(--paper-2); color: var(--ink); }
.desc { margin-top: 18px; position: relative; overflow: hidden; }
.desc-fade { position: absolute; inset: auto 0 0; height: 56px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }

details.example { margin-top: 16px; max-width: 900px; }
details.example summary { cursor: pointer; width: fit-content; font-weight: 600; font-size: 0.9375rem; padding: 6px 0; }
details.example summary:hover { text-decoration: underline; text-underline-offset: 3px; }
details.example .code { margin-top: 8px; max-height: 320px; }

/* Parameters: a ruled form, label column + control column. */
.params { margin-top: 26px; border-top: 1px solid var(--rule); max-width: 980px; }
.param { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .param { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; } }
.param-name { display: flex; flex-direction: column; gap: 2px; }
@media (min-width: 760px) { .param-name { padding-top: 4px; } }
.param-name .label { font-weight: 700; font-size: 0.9375rem; }
.param-name .req { color: var(--loss); margin-left: 2px; }
.param-name code { font-size: 0.75rem; color: var(--ink-3); }
.param-control { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.param-control .input, .param-control .select { max-width: 340px; }
.param-control .textarea { max-width: 620px; }
.help { font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; max-width: 62ch; }
.help code { padding: 0 3px; background: var(--paper-2); border-radius: var(--radius); font-size: 0.75rem; }
.help .limit { font-family: var(--font-mono); font-size: 0.7812rem; color: var(--ink-3); white-space: nowrap; }

.run { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; }
.run-target { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); overflow-wrap: anywhere; }
.form-error { margin-top: 12px; color: var(--loss); font-weight: 600; font-size: 0.9375rem; }

/* Response */
.response { margin-top: 28px; min-width: 0; }
.response-bar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 4px 20px; border-bottom: 1px solid var(--rule); }
.response-status { padding-bottom: 10px; font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; }
.response-status[data-tone="ok"] { color: var(--win); }
.response-status[data-tone="warn"] { color: var(--caution); }
.response-status[data-tone="error"] { color: var(--loss); }
.response-pane { padding-top: 14px; }
.pane-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; font-size: 0.875rem; color: var(--ink-2); }

/* Readable response tables: flat and ruled, nesting shown by a left rule. */
.readable { max-height: 620px; overflow: auto; }
.rt { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.rt th, .rt td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.rt th { position: sticky; top: 0; background: var(--paper); border-bottom: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 0.7812rem; font-weight: 600; white-space: nowrap; }
.rt .rt-key { width: 1%; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; }
.rt tr:last-child > td { border-bottom: 0; }
.rt .rt { border-left: 2px solid var(--rule); }
.rt .rt td:first-child, .rt .rt th:first-child { padding-left: 10px; }
.rv-null { font-family: var(--font-mono); color: var(--ink-3); }
.rv-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.rv-bool { font-family: var(--font-mono); }
.rv-bool--true { color: var(--win); }
.rv-bool--false { color: var(--caution); }
.rv-link { color: var(--info); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.rv-img { width: 48px; height: 48px; object-fit: contain; background: var(--paper-2); border-radius: var(--radius); }

/* ---------- Blog ---------- */
.page-head { padding-block: 44px 28px; }
.page-head h1 { font-size: clamp(2.75rem, 4vw + 1.25rem, 5rem); text-transform: uppercase; }
.page-head .lede { margin-top: 14px; }

.lead-post { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 32px 40px; border-top: 1.5px solid var(--ink); }
@media (min-width: 960px) { .lead-post { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; } }
/* height: auto lets the width/height attributes reserve space (no layout
   shift) without fixing the height; the cap keeps tall shots in view. */
.cover { width: 100%; height: auto; max-height: min(62vh, 520px); aspect-ratio: 16 / 9; object-fit: contain; background: var(--paper-2); border: 1px solid var(--rule); }
.lead-post h2 { font-size: clamp(2rem, 2vw + 1.25rem, 3rem); }
.lead-post h2 a { text-decoration: none; }
.lead-post h2 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.lead-post p { margin-top: 12px; color: var(--ink-2); max-width: 60ch; }
.lead-post ul { margin-top: 14px; padding-left: 20px; color: var(--ink-2); }
.lead-post .meta, .post-row .meta, .article .meta { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.lead-post .meta { margin-top: 12px; }

.post-list { border-top: 1.5px solid var(--ink); }
.post-row { display: grid; gap: 4px 24px; padding-block: 18px; border-bottom: 1px solid var(--rule); text-decoration: none; }
@media (min-width: 760px) { .post-row { grid-template-columns: 120px minmax(0, 1fr) 160px; align-items: baseline; } }
.post-row:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-row h3 { font-size: 1.625rem; }
.post-row p { font-size: 0.9375rem; color: var(--ink-2); margin-top: 6px; max-width: 70ch; }
.post-row .kind { font-size: 0.875rem; color: var(--ink-2); }
@media (min-width: 760px) { .post-row .kind { text-align: right; } }

.crumbs { padding-top: 28px; font-size: 0.875rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; }
.crumbs li { display: inline-flex; min-width: 0; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; padding-inline: 8px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current="page"] { display: block; max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Article + contents. One column below laptop; from 1024 the contents list
   sits in a sticky column beside the text. */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
	.article-layout { grid-template-columns: minmax(0, 760px) 240px; justify-content: space-between; gap: 56px; }
}
@media (min-width: 1440px) { .article-layout { grid-template-columns: minmax(0, 780px) 280px; } }
.article { max-width: 760px; padding-block: 16px 64px; min-width: 0; }
.article h1 { margin-top: 12px; font-size: clamp(2.375rem, 3vw + 1.375rem, 4rem); }
.article-body section { scroll-margin-top: calc(var(--nav-h) + 20px); }
.article-body h2 .anchor { color: inherit; text-decoration: none; }
.article-body h2 .anchor:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.article-note { margin-top: 8px; }
.article-end { margin-top: 48px; padding-top: 16px; border-top: 1.5px solid var(--ink); }

.toc-list { display: grid; list-style: none; counter-reset: toc; }
.toc-list li { counter-increment: toc; }
.toc-list a {
	display: grid;
	grid-template-columns: 2.2em minmax(0, 1fr);
	padding: 7px 8px 7px 0;
	border-left: 3px solid transparent;
	font-size: 0.9375rem;
	line-height: 1.35;
	color: var(--ink-2);
	text-decoration: none;
}
.toc-list a::before { content: counter(toc, decimal-leading-zero); padding-left: 10px; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.8; color: var(--ink-3); }
.toc-list a:hover { color: var(--ink); background: var(--paper-2); }
.toc-list a[aria-current="true"] { border-left-color: var(--mark); color: var(--ink); font-weight: 600; }
.toc--inline { margin-top: 28px; border-block: 1px solid var(--rule); }
.toc--inline summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-weight: 700; cursor: pointer; }
.toc--inline summary .faint { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; }
.toc--inline .toc-list { padding-bottom: 12px; }
.toc--side { display: none; }
@media (min-width: 1024px) {
	.toc--inline { display: none; }
	.toc--side {
		display: block;
		position: sticky;
		top: calc(var(--nav-h) + 24px);
		align-self: start;
		max-height: calc(100vh - var(--nav-h) - 48px);
		overflow-y: auto;
		margin-top: 16px;
		padding-top: 14px;
		border-top: 1.5px solid var(--ink);
	}
}
.toc-title { margin-bottom: 8px; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.article .lede { margin-top: 16px; }
.article .meta { margin-top: 14px; }
.article .cover { margin-top: 28px; }
.article-body { margin-top: 36px; display: grid; gap: 40px; }
.article-body h2 { font-size: 2rem; margin-bottom: 10px; }
.article-body p, .article-body li { font-size: 1.125rem; line-height: 1.65; color: var(--ink-2); }
.article-body ul { padding-left: 22px; margin-top: 10px; }
.article-body .note { margin-top: 16px; font-size: 1rem; }
.article-body figure { margin: 18px 0 0; }
.article-body figure img { width: 100%; height: auto; max-height: min(70vh, 640px); object-fit: contain; border: 1px solid var(--rule); background: var(--paper-2); }
.article-body figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--ink-3); }
.keypoints { margin-top: 28px; padding: 16px 18px; background: var(--paper-2); border-left: 3px solid var(--ink); }
.keypoints h2 { font-size: 1.25rem; }
.keypoints ul { padding-left: 18px; margin-top: 8px; color: var(--ink-2); }

/* ---------- Status page (maintenance / high traffic) ---------- */
.status { max-width: 760px; padding-block: 64px; }
.status h1 { font-size: clamp(2.75rem, 4vw + 1.25rem, 5rem); text-transform: uppercase; }
.status .lede { margin-top: 18px; }
.status dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 28px 0; padding-block: 14px; border-block: 1px solid var(--rule); }
.status dt { font-weight: 700; }
.status dd { margin: 0; font-family: var(--font-mono); overflow-wrap: anywhere; }
.status ul { padding-left: 20px; color: var(--ink-2); }
.status .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; border-top: 1.5px solid var(--ink); font-size: 0.9375rem; }
.footer-cols { display: grid; gap: 28px; padding-block: 36px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .footer-cols { grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); } }
.footer-cols .about { grid-column: 1 / -1; max-width: 42ch; color: var(--ink-2); }
.footer-cols .about .wordmark { display: inline-block; margin-bottom: 10px; color: var(--ink); }
@media (min-width: 900px) { .footer-cols .about { grid-column: auto; } }
.footer h2 { font-size: 0.875rem; font-variation-settings: "wdth" 80; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; line-height: 1.3; }
.footer ul { display: grid; gap: 6px; }
.footer li { list-style: none; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-base { display: grid; gap: 6px; padding-block: 16px 32px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--ink-3); }
@media (min-width: 900px) { .footer-base { grid-template-columns: auto 1fr; gap: 32px; } .footer-base p:last-child { text-align: right; } }

/* ---------- Standings simulator ---------- */
.field[hidden], .team-names[hidden] { display: none; }
.tag--win { color: var(--win); }
.tag--loss { color: var(--loss); }
.tool-stack { display: grid; gap: 18px; min-width: 0; align-content: start; }
.tool-stack .field-row { align-items: end; }
.tool-stack .field-row .field { flex: 0 1 220px; }
.tool-stack .help, .team-names .help { font-size: 0.8125rem; color: var(--ink-3); }
.team-names-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.standings-table td { vertical-align: middle; }
.standings-table .team-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.standings-table .team-cell img { width: 24px; height: 24px; border-radius: 50%; background: var(--paper-3); object-fit: cover; flex: none; }
.standings-table .tb { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 400; color: var(--ink-3); }
/* The playoff line: a heavy rule under the last team that goes through. */
.standings-table tr.cut td { border-bottom: 2.5px solid var(--ink); }
.standings-table tr.is-out td { color: var(--ink-3); }
.match-list { display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.match-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 124px minmax(0, 1fr);
	align-items: center;
	gap: 10px 14px;
	padding: 8px 0 8px 10px;
	border-bottom: 1px solid var(--rule);
}
.match-row .side { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.match-row .side:last-child { justify-content: flex-end; text-align: right; }
.match-row .side span { overflow-wrap: anywhere; }
.match-row .side img { width: 24px; height: 24px; border-radius: 50%; background: var(--paper-3); object-fit: cover; flex: none; }
.match-row .select { min-height: 36px; padding-left: 8px; padding-right: 28px; text-overflow: clip; }
/* A changed match carries the highlighter in its left margin. */
.match-row.is-edited { box-shadow: inset 4px 0 0 var(--mark); background: var(--paper-2); }
@media (max-width: 520px) {
	.match-row { grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); gap: 8px; }
	.match-row .side img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
