/* ==========================================================================
   base.css: the one stylesheet for every page (design direction "Data in motion", design/DIRECTION.md).
   1 tokens · 2 reset · 3 layout · 4 type · 5 header and footer · 6 buttons · 7 forms · 8 address box ·
   9 cards, stats, rows · 10 tabs · 11 records table · 12 JSON · 13 field list · 14 build timeline ·
   15 endpoint and code · 16 key box · 17 pills and markers · 18 notices and empty states · 19 toasts ·
   20 shells · 21 home sections · 22 home examples · 23 utilities · 24 motion
   White (light) or deep neutral (dark) pages, one accent for actions and live states, mono type only for data.
   Class names and examples: DESIGN.md. No external requests, no images, no fonts.
   ========================================================================== */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-sunk: #e9edf2;
  --surface: #ffffff;
  --ink: #0d1117;
  --ink-2: #414955;
  --ink-3: #5d6674;
  --line: #e7eaef;
  --line-2: #d5dae1;
  --line-strong: #858e9b;
  --accent: #2b4cf0;
  --accent-hover: #1d3bd4;
  --accent-ink: #ffffff;
  --accent-soft: #edf0fe;
  --accent-line: #c2cbfb;
  --ok: #117a42;
  --ok-soft: #e3f4ea;
  --warn: #975600;
  --warn-soft: #fff1d6;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --row-hover: #f2f5f9;
  --shadow-float: 0 1px 0 var(--line), 0 18px 32px -18px rgb(13 17 23 / 0.22);

  /* type: system fonts; sizes scale smoothly from 320 to 1920 px */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-2xs: clamp(0.71875rem, 0.7rem + 0.08vw, 0.78125rem);
  --fs-xs: clamp(0.78125rem, 0.76rem + 0.1vw, 0.84375rem);
  --fs-sm: clamp(0.84375rem, 0.82rem + 0.12vw, 0.90625rem);
  --fs-base: clamp(0.96875rem, 0.93rem + 0.17vw, 1.0625rem);
  --fs-md: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --fs-xl: clamp(1.75rem, 1.3rem + 2vw, 3.25rem);
  --fs-display: clamp(2.5rem, 1.2rem + 4.2vw, 4.75rem);
  --fs-stat: clamp(2.5rem, 1.6rem + 3vw, 4.25rem);
  --lh-text: 1.55;

  /* space: fixed steps for components, fluid steps for sections */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem;
  --sp-7: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  --sp-8: clamp(3rem, 1.9rem + 4.4vw, 6rem);
  --sp-9: clamp(4rem, 2.4rem + 6.4vw, 8.5rem);
  --gutter: clamp(1rem, -0.25rem + 3.2vw, 2.5rem);
  --wrap: 80rem;
  --header-h: 4rem;

  /* shape by role, motion */
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 22px; --r-pill: 999px;
  --dur-1: 140ms; --dur-2: 240ms; --dur-3: 420ms; --dur-4: 760ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --row-h: 2.875rem;
  --cell-x: 0.875rem;

  /* aliases for page code written against the first design; delete once no page uses them */
  --paper: var(--bg); --paper-2: var(--surface); --paper-3: var(--bg-soft);
  --signal: var(--accent); --signal-hover: var(--accent-hover); --signal-ink: var(--accent-ink);
  --signal-soft: var(--accent-soft); --signal-line: var(--accent-line); --line-3: var(--line-strong);
  --data: var(--ink-3); --data-soft: var(--bg-soft); --data-line: var(--line);
  --code-bg: var(--bg-soft); --code-fg: var(--ink); --code-muted: var(--ink-3); --code-line: var(--line); --code-focus: var(--accent);
  --ok-line: color-mix(in srgb, var(--ok) 35%, var(--bg)); --warn-line: color-mix(in srgb, var(--warn) 35%, var(--bg));
  --bad-line: color-mix(in srgb, var(--bad) 35%, var(--bg)); --bad-ink: var(--bg); --ok-inv: var(--ok); --bad-inv: var(--bad);
  --shadow: var(--shadow-float); --ease: var(--ease-out);
  --s-1: var(--sp-1); --s-2: var(--sp-2); --s-3: var(--sp-3); --s-4: var(--sp-4); --s-5: var(--sp-5);
  --s-6: var(--sp-6); --s-7: var(--sp-7); --s-8: var(--sp-8); --s-9: var(--sp-9);
  --r-1: var(--r-xs); --r-2: var(--r-sm); --r-3: var(--r-md);
  --fs-h1: var(--fs-xl); --fs-h2: var(--fs-lg); --fs-h3: var(--fs-md); --fs-h4: var(--fs-base);
  --fs-lead: var(--fs-md); --fs-body: var(--fs-base); --fs-data: var(--fs-xs);
}

/* Dark tokens appear twice on purpose: once for the system setting, once for the header toggle. Keep them equal. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d10;
    --bg-soft: #121519;
    --bg-sunk: #1b2027;
    --surface: #181c22;
    --ink: #edf0f4;
    --ink-2: #b3bbc7;
    --ink-3: #8b94a1;
    --line: #22272f;
    --line-2: #2d333c;
    --line-strong: #6a7280;
    --accent: #8da2ff;
    --accent-hover: #a9b8ff;
    --accent-ink: #0b0d10;
    --accent-soft: #1a2142;
    --accent-line: #34407a;
    --ok: #5ccb8a;
    --ok-soft: #10261a;
    --warn: #f0b456;
    --warn-soft: #2b200d;
    --bad: #ff8a7a;
    --bad-soft: #2e1512;
    --row-hover: #1d2128;
    --shadow-float: 0 1px 0 var(--line), 0 18px 32px -18px rgb(0 0 0 / 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-soft: #121519;
  --bg-sunk: #1b2027;
  --surface: #181c22;
  --ink: #edf0f4;
  --ink-2: #b3bbc7;
  --ink-3: #8b94a1;
  --line: #22272f;
  --line-2: #2d333c;
  --line-strong: #6a7280;
  --accent: #8da2ff;
  --accent-hover: #a9b8ff;
  --accent-ink: #0b0d10;
  --accent-soft: #1a2142;
  --accent-line: #34407a;
  --ok: #5ccb8a;
  --ok-soft: #10261a;
  --warn: #f0b456;
  --warn-soft: #2b200d;
  --bad: #ff8a7a;
  --bad-soft: #2e1512;
  --row-hover: #1d2128;
  --shadow-float: 0 1px 0 var(--line), 0 18px 32px -18px rgb(0 0 0 / 0.6);
}

/* ── 2. Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; interpolate-size: allow-keywords; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 400 var(--fs-base)/var(--lh-text) var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
main { flex: 1 0 auto; min-width: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, pre { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color var(--dur-1) var(--ease-out); }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
table { border-collapse: collapse; }
hr { height: 1px; margin: var(--sp-6) 0; border: 0; background: var(--line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }
.icon { width: 1em; height: 1em; flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip, .skip-link {
  position: absolute; left: var(--gutter); top: 0; z-index: 60; transform: translateY(-130%); padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm); background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transition: transform var(--dur-2) var(--ease-out);
}
.skip:focus, .skip-link:focus { transform: translateY(var(--sp-2)); color: var(--bg); }

/* ── 3. Layout ─────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(46rem + 2 * var(--gutter)); }
.section { padding-block: var(--sp-8); }
.section-tight { padding-block: var(--sp-7); }
.section-alt { background: var(--bg-soft); }
.hero { padding-block: var(--sp-5) var(--sp-7); }
.hero .lead { margin-top: var(--sp-4); }
.hero .urlbar, .hero .address { margin-top: var(--sp-6); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-5); }
.grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 40rem) and (max-width: 63.99rem) { .grid > .span-3, .grid > .span-4, .grid > .span-6 { grid-column: span 6; } }
@media (min-width: 64rem) {
  .grid > .span-3 { grid-column: span 3; } .grid > .span-4 { grid-column: span 4; } .grid > .span-5 { grid-column: span 5; }
  .grid > .span-6 { grid-column: span 6; } .grid > .span-7 { grid-column: span 7; } .grid > .span-8 { grid-column: span 8; }
  .grid > .span-9 { grid-column: span 9; } .grid-lg { gap: var(--sp-7); }
}
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: var(--sp-5); }
.grid-auto > * { min-width: 0; }
.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-5); }
.split > * { min-width: 0; }

/* ── 4. Type ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, .display { color: var(--ink); text-wrap: balance; overflow-wrap: break-word; }
.display { font-size: var(--fs-display); font-weight: 760; line-height: 1.02; letter-spacing: -0.04em; }
h1, .h1 { font-size: var(--fs-xl); font-weight: 720; line-height: 1.08; letter-spacing: -0.03em; }
h2, .h2 { font-size: var(--fs-lg); font-weight: 700; line-height: 1.15; letter-spacing: -0.022em; }
h3, .h3 { font-size: var(--fs-md); font-weight: 650; line-height: 1.3; letter-spacing: -0.012em; }
h4, .h4 { font-size: var(--fs-base); font-weight: 650; line-height: 1.35; }
p { text-wrap: pretty; }
.lead { max-width: 38rem; font-size: var(--fs-md); line-height: 1.55; color: var(--ink-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; color: var(--ink-2); }
.live-dot { position: relative; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--ok); animation: yx-ripple 1.8s var(--ease-out) 2; opacity: 0; }
.small { font-size: var(--fs-sm); line-height: 1.5; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.mono { font-family: var(--font-mono); font-size: 0.9em; }
.num { font-variant-numeric: tabular-nums; }
.mark { padding: 0 0.2em; border-radius: 3px; background: var(--accent-soft); color: inherit; }
code, kbd { font-family: var(--font-mono); font-size: 0.875em; }
:not(pre) > code { padding: 0.1em 0.35em; border-radius: var(--r-xs); background: var(--bg-soft); overflow-wrap: anywhere; }
kbd { padding: 0.05em 0.35em; border-radius: var(--r-xs); background: var(--bg-soft); box-shadow: inset 0 -1px 0 var(--line-2); }
.prose { max-width: 46rem; }
.prose > * + * { margin-top: 1em; }
.prose > h2 { margin-top: var(--sp-7); } .prose > h3 { margin-top: var(--sp-5); } .prose > h4 { margin-top: var(--sp-5); }
.prose > :first-child { margin-top: 0; }
.prose ul:not([class]), .prose ol:not([class]) { padding-left: 1.3em; }
.prose :is(ul, ol):not([class]) > li + li { margin-top: 0.35em; }
.prose .code, .prose .records, .prose .table-wrap, .prose .endpoint { margin-block: var(--sp-5); }
.list-yes, .list-no { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
.list-yes > li, .list-no > li { position: relative; padding-left: 1.6rem; }
.list-yes > li::before { content: ""; position: absolute; left: 0.2rem; top: 0.55em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); }
.list-no > li::before { content: ""; position: absolute; left: 0.2rem; top: 0.55em; width: 0.5rem; height: 0.5rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); background: linear-gradient(135deg, transparent 42%, var(--ink-3) 42% 58%, transparent 58%); }
.numbered { counter-reset: n; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.numbered > li { counter-increment: n; display: grid; grid-template-columns: 2rem minmax(0, 1fr); }
.numbered > li::before { content: counter(n); display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); font: 600 var(--fs-2xs)/1 var(--font-sans); color: var(--ink-2); }

/* ── 5. Header and footer ──────────────────────────────────────────────── */
/* the mount point itself is the header, so its space is kept before the script runs */
[data-site-header], .site-header { position: sticky; top: 0; z-index: 50; min-height: var(--header-h); background: var(--bg); transition: box-shadow var(--dur-2) var(--ease-out); }
.site-header.is-scrolled, .site-header[data-open="true"] { box-shadow: 0 1px 0 var(--line); }
.header-row { display: flex; align-items: center; gap: var(--sp-5); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; color: var(--ink); font-size: 1.125rem; font-weight: 620; letter-spacing: -0.025em; text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 1.5rem; height: 1.5rem; flex: none; fill: var(--ink); }
.brand-mark .brand-dot { fill: var(--accent); transform-origin: 19.5px 12px; transition: transform var(--dur-3) var(--ease-out); }
.brand:hover .brand-dot { transform: translateX(-2px) scale(1.15); }
.brand-name:empty { min-width: 3.6em; }
.brand-tag { padding: 0.15rem 0.35rem; border-radius: var(--r-xs); background: var(--bg-soft); font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.04em; color: var(--ink-2); }
.site-nav { display: flex; align-items: center; gap: 0.125rem; flex: 1; min-width: 0; }
.nav-link {
  position: relative; padding: 0.45rem 0.75rem; border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 520;
  text-decoration: none; white-space: nowrap; transition: color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: -0.15rem; height: 2px; border-radius: 2px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
.nav-console { margin-right: var(--sp-2); }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2);
  cursor: pointer; transition: color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.icon-btn:hover { color: var(--ink); background: var(--bg-soft); }
.icon-btn .icon { width: 1.2rem; height: 1.2rem; }
.theme-toggle .icon { transition: transform var(--dur-3) var(--ease-out); }
.theme-toggle:hover .icon { transform: rotate(-18deg); }
.nav-toggle { display: none; }
@media (max-width: 47.99rem) {
  .nav-toggle { display: inline-grid; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-1) var(--gutter) var(--sp-4); background: var(--surface); box-shadow: var(--shadow-float); }
  .site-nav[data-open="true"] { display: flex; animation: yx-drop var(--dur-2) var(--ease-out); }
  .nav-link { display: flex; align-items: center; min-height: 3rem; padding: 0 0.25rem; border-radius: 0; font-size: var(--fs-base); box-shadow: inset 0 -1px 0 var(--line); }
  .nav-link:last-child { box-shadow: none; }
  .nav-link:hover { background: transparent; }
  .nav-link[aria-current="page"]::after { left: 0.25rem; right: auto; bottom: 0.55rem; width: 1.5rem; }
}
@media (max-width: 22.49rem) { .header-row { gap: var(--sp-3); } .nav-console { margin-right: 0; padding-inline: 0.625rem; } }
[data-site-footer], .site-footer { margin-top: var(--sp-7); padding-block: var(--sp-6); box-shadow: inset 0 1px 0 var(--line); color: var(--ink-3); font-size: var(--fs-xs); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-6); }
.brand-sm { font-size: 0.9375rem; }
.brand-sm .brand-mark { width: 1.125rem; height: 1.125rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.footer-nav a, .footer-support a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover, .footer-support a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { margin-left: auto; }
@media (max-width: 47.99rem) { .footer-note { flex-basis: 100%; margin-left: 0; } }

/* ── 6. Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 2.875rem; padding: 0 1.125rem; border: 0; border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font: 620 var(--fs-sm)/1 var(--font-sans); white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.btn:hover { background: var(--bg-soft); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-quiet { background: transparent; color: var(--accent); box-shadow: none; }
.btn-quiet:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-danger { color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-sm { height: 2.25rem; padding: 0 0.875rem; gap: 0.4rem; border-radius: var(--r-sm); font-size: var(--fs-xs); }
.btn-lg { height: 3rem; padding: 0 1.375rem; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn .arrow, .link-arrow svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arrow, .link-arrow:hover svg { transform: translateX(3px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.btn[aria-busy="true"] > * { visibility: hidden; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; width: 1rem; height: 1rem; margin: auto; border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: yx-spin 0.7s linear infinite; }
.btn-primary[aria-busy="true"]::after { border-color: color-mix(in srgb, var(--accent-ink) 35%, transparent); border-top-color: var(--accent-ink); }
.btn-glyph { display: inline-flex; }
.btn-glyph .icon { width: 1rem; height: 1rem; }
.btn-copy[data-copied="true"] { color: var(--ok); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }
@media (pointer: coarse) { .btn-sm { height: 2.5rem; } }

/* ── 7. Forms ──────────────────────────────────────────────────────────── */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; min-width: 0; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.label .mono { font-size: 1em; }
.opt { margin-left: 0.4rem; font-weight: 400; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; border: 0; border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: var(--fs-base); line-height: 1.4; transition: box-shadow var(--dur-1) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-soft); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--bad); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: 0.6; cursor: not-allowed; }
.input-mono { font-family: var(--font-mono); font-size: var(--fs-sm); }
.textarea { min-height: 6rem; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.8rem) 50%; background-size: 0.3rem 0.3rem; background-repeat: no-repeat;
}
.hint { font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-3); }
.field-error { font-size: var(--fs-sm); font-weight: 500; color: var(--bad); }
.check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: var(--fs-sm); cursor: pointer; }
.check input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0; accent-color: var(--accent); }
.switch { display: inline-flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 2.4rem; height: 1.4rem; margin: 0; border-radius: var(--r-pill); background: var(--line-2); cursor: pointer; transition: background-color var(--dur-2) var(--ease-out); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.4rem - 4px); height: calc(1.4rem - 4px); border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform var(--dur-2) var(--ease-out); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(1rem); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--sp-4); align-items: start; }
.input-group { display: flex; gap: var(--sp-2); min-width: 0; }
.input-group > .input { min-width: 0; }

/* ── 8. Address box (the main action; .urlbar is the older name) and chips ── */
.address { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); max-width: 38rem; }
.address-label, .urlbar-label { font-size: var(--fs-sm); font-weight: 620; color: var(--ink); }
.address-row, .urlbar {
  display: flex; align-items: center; gap: var(--sp-2); padding: 0.3125rem; border-radius: calc(var(--r-md) + 2px); background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow var(--dur-2) var(--ease-out);
}
.address-row:hover, .urlbar:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.address-row:focus-within, .urlbar:focus-within { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-soft); }
.address-row.is-flash { animation: yx-flash-ring var(--dur-4) var(--ease-out); }
.address-input, .urlbar-input { flex: 1; min-width: 0; height: 2.875rem; padding: 0 0.75rem; border: 0; outline: 0; background: transparent; color: var(--ink); font: 450 var(--fs-base)/1 var(--font-sans); }
.address-input::placeholder, .urlbar-input::placeholder { color: var(--ink-3); opacity: 1; }
.address-input:focus-visible, .urlbar-input:focus-visible { outline: 0; }
.address-input[aria-invalid="true"], .urlbar-input[aria-invalid="true"] { color: var(--bad); }
.address-row .btn, .urlbar .btn { flex: none; }
.address-note, .urlbar-note { font-size: var(--fs-xs); color: var(--ink-3); }
.urlbar-note { margin-top: var(--sp-2); }
.address-error { font-size: var(--fs-sm); color: var(--bad); }
@media (max-width: 39.99rem) {
  .address-row, .address-row:hover, .address-row:focus-within, .urlbar, .urlbar:hover, .urlbar:focus-within { flex-direction: column; align-items: stretch; padding: 0; background: transparent; box-shadow: none; }
  .address-input, .urlbar-input { flex: none; height: 3rem; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow var(--dur-2) var(--ease-out); }
  .address-input:focus, .urlbar-input:focus { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-soft); }
  .address-row .btn, .urlbar .btn { height: 3rem; }
}
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.chips-label { margin-right: var(--sp-1); font-size: var(--fs-xs); color: var(--ink-3); }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; max-width: 100%; height: 2rem; padding: 0 0.875rem; border: 0; border-radius: var(--r-pill);
  background: var(--bg-soft); color: var(--ink-2); font: 520 var(--fs-xs)/1 var(--font-sans); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.chip:hover { background: var(--bg-sunk); color: var(--ink); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: var(--bg); }

/* ── 9. Cards (rare), stats, facts, rows ───────────────────────────────── */
.card { display: block; min-width: 0; padding: var(--sp-5); border-radius: var(--r-md); background: var(--bg-soft); color: inherit; }
a.card { text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
a.card:hover { background: var(--bg-sunk); color: inherit; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) var(--sp-4); box-shadow: inset 0 -1px 0 var(--line); }
.card-body { padding: var(--sp-4); }
.card-foot { padding: var(--sp-3) var(--sp-4); box-shadow: inset 0 1px 0 var(--line); color: var(--ink-3); font-size: var(--fs-sm); }
.card-title { font-size: var(--fs-md); font-weight: 650; line-height: 1.3; letter-spacing: -0.012em; }
.api-card { display: flex; flex-direction: column; gap: 0.4rem; height: 100%; }
.api-card-name { font-size: var(--fs-md); font-weight: 620; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); }
.api-card-domain { overflow: hidden; color: var(--ink-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.api-card-desc { display: -webkit-box; overflow: hidden; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.api-card-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin-top: auto; padding-top: var(--sp-3); color: var(--ink-3); font-size: var(--fs-xs); }
.api-card-top, .api-card-sub { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); min-width: 0; }
.api-card-sub { align-items: center; min-height: 1.4rem; }
.api-card-top .pill, .api-card-sub .badge { flex: none; }
.stat, .stat-value { font-size: var(--fs-stat); font-weight: 300; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: var(--sp-2); color: var(--ink-2); font-size: var(--fs-sm); }
.kv { display: grid; grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr); font-size: var(--fs-sm); }
.kv dt, .kv dd { padding-block: 0.6rem; box-shadow: inset 0 -1px 0 var(--line); }
.kv dt { padding-right: var(--sp-5); color: var(--ink-3); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; }
.price-amount { font-size: var(--fs-xl); font-weight: 680; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.price-unit { color: var(--ink-3); font-size: var(--fs-sm); }
.price-line { max-width: 30ch; font-size: var(--fs-xl); font-weight: 680; line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.price-line .soft { color: var(--ink-3); }
.rows > * { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem var(--sp-4); padding: 0.8rem 0; box-shadow: inset 0 -1px 0 var(--line); }
.rows > :first-child { box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.badge, .tag { display: inline-flex; align-items: center; height: 1.375rem; padding: 0 0.5rem; border-radius: var(--r-pill); background: var(--bg-soft); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; }

/* ── 10. Tabs and two-way switch ───────────────────────────────────────── */
.tabs { display: flex; gap: var(--sp-1); box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; appearance: none; padding: 0.75rem 0.875rem; border: 0; background: none; color: var(--ink-3); font: 600 var(--fs-sm)/1 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: color var(--dur-1) var(--ease-out); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--ink); }
.tab::after { content: ""; position: absolute; left: 0.875rem; right: 0.875rem; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform var(--dur-2) var(--ease-out); }
.tab[aria-selected="true"]::after, .tab[aria-current="page"]::after { transform: scaleX(1); }
.tab-panel { padding-top: var(--sp-5); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--bg-soft); }
.seg-btn { padding: 0.3rem 0.8rem; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font: 600 var(--fs-xs)/1.4 var(--font-sans); cursor: pointer; transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.records .seg { background: var(--surface); }
.records .seg-btn[aria-pressed="true"] { background: var(--bg-sunk); box-shadow: none; }

/* ── 11. Records table: typed data on a surface inside a soft panel ────── */
.records { min-width: 0; padding: 0.375rem; border-radius: var(--r-md); background: var(--bg-soft); }
.records-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); padding: 0.25rem 0.25rem 0.625rem 0.5rem; }
.records-title { margin-right: 0.6rem; font-size: var(--fs-sm); font-weight: 650; }
.records-count { color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
.records-hint { display: inline-block; margin-left: 0.6rem; color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; }
.records-hint::before { content: "\2194\00a0"; }
.records-tools { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
/* the only boxes that may scroll sideways: .table-scroll, .json, .code-pre */
.table-scroll { position: relative; max-height: var(--table-max, 28rem); overflow: auto; border-radius: calc(var(--r-md) - 0.375rem); background: var(--surface); overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.data th { position: sticky; top: 0; z-index: 1; height: 3.25rem; padding: 0.35rem var(--cell-x); background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); font-weight: 400; text-align: left; vertical-align: middle; white-space: nowrap; transition: background-color var(--dur-4) var(--ease-out); }
.th-name { display: block; color: var(--ink); font: 600 var(--fs-xs)/1.25 var(--font-mono); }
.data th .type { display: block; margin-top: 0.15rem; }
.data td { max-width: 22rem; height: var(--row-h); padding: 0 var(--cell-x); box-shadow: inset 0 -1px 0 var(--line); color: var(--ink-2); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color var(--dur-4) var(--ease-out); }
@media (max-width: 39.99rem) { .data td { max-width: 12.5rem; } } /* phones: a long title leaves room for price and currency */
.data tbody tr:last-child td { box-shadow: none; }
.data tbody tr:hover td { background: var(--row-hover); transition-duration: var(--dur-1); }
.data .is-num { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.data .is-mono { color: var(--ink-2); font: 400 var(--fs-2xs)/1.3 var(--font-mono); }
.data .cell-title { color: var(--ink); font-weight: 560; }
.cell-null { color: var(--ink-3); }
.cell-link { color: var(--ink-3); font: 400 var(--fs-2xs)/1.3 var(--font-mono); text-decoration: none; }
.cell-link:hover { color: var(--accent); text-decoration: underline; }
.cell-img { display: inline-block; width: 2rem; height: 2rem; border-radius: var(--r-xs); background: var(--bg-soft); object-fit: cover; vertical-align: middle; }
.cell-bool { color: var(--ink-2); font: 500 var(--fs-2xs)/1.3 var(--font-mono); }
.data tr.is-new { animation: yx-rise var(--dur-3) var(--ease-out); }
.data tr.is-new td { animation: yx-fresh var(--dur-4) var(--ease-out); }
.data th.is-flagged, .data td.is-flagged { background: var(--warn-soft); }
.data th.is-rebound, .data td.is-rebound { background: var(--ok-soft); }
.data th.is-flagged { box-shadow: inset 0 -2px 0 var(--warn); }
.data th.is-rebound { box-shadow: inset 0 -2px 0 var(--ok); }
.data th.is-flagged .type, .data th.is-rebound .type { font-size: 0; }
.data th.is-flagged .type::after { content: "missing"; color: var(--warn); font-size: var(--fs-2xs); font-weight: 600; }
.data th.is-rebound .type::after { content: "found again"; color: var(--ok); font-size: var(--fs-2xs); font-weight: 600; }
.records-foot { padding: 0.5rem 0.5rem 0.125rem; color: var(--ink-3); font-size: var(--fs-xs); }
.records > .empty { padding: var(--sp-6) var(--sp-5); border-radius: calc(var(--r-md) - 0.375rem); background: var(--surface); }
.type { display: inline-block; color: var(--ink-3); font: 450 var(--fs-2xs)/1.3 var(--font-sans); white-space: nowrap; vertical-align: baseline; }

/* ── 12. JSON view ─────────────────────────────────────────────────────── */
.json { max-height: var(--table-max, 28rem); margin: 0; padding: var(--sp-4) var(--sp-5); overflow: auto; border-radius: var(--r-md); background: var(--bg-soft); color: var(--ink-2); font: 400 var(--fs-xs)/1.65 var(--font-mono); white-space: pre; tab-size: 2; }
.records .json { border-radius: calc(var(--r-md) - 0.375rem); background: var(--surface); }
.j-key { color: var(--ink); font-weight: 600; }
.j-str { color: var(--ink-2); }
.j-num, .j-bool { color: var(--accent); }
.j-null, .j-punc { color: var(--ink-3); }

/* ── 13. Field list ────────────────────────────────────────────────────── */
.fields { display: grid; grid-template-columns: minmax(0, 1fr); box-shadow: inset 0 1px 0 var(--line); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 12rem); gap: 0.25rem var(--sp-5); padding: var(--sp-3) 0; box-shadow: inset 0 -1px 0 var(--line); }
.field-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; grid-column: 1; min-width: 0; }
.field-name { color: var(--ink); font: 600 var(--fs-sm)/1.4 var(--font-mono); overflow-wrap: anywhere; }
.field-desc { grid-column: 1; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.field-side { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.25rem; grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.field-example { overflow: hidden; color: var(--ink-3); font: 400 var(--fs-2xs)/1.5 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.coverage { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink-3); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.coverage-bar { width: 3rem; height: 4px; overflow: hidden; border-radius: 2px; background: var(--line-2); }
.coverage-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ink-3); }
.coverage-bar.is-full > i { background: var(--ok); }
.req { padding: 0.05rem 0.4rem; border-radius: var(--r-xs); background: var(--bg-soft); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: 600; }
@media (max-width: 39.99rem) { .field-row { grid-template-columns: minmax(0, 1fr); } .field-side { grid-column: 1; grid-row: auto; } }

/* ── 14. Build timeline ────────────────────────────────────────────────── */
.timeline { display: grid; grid-template-columns: minmax(0, 1fr); }
.timeline .step { position: relative; display: grid; grid-template-columns: 0.875rem minmax(0, 1fr) auto; gap: 0 var(--sp-3); align-items: start; padding: 0.55rem 0; }
.timeline .step::before { content: ""; position: absolute; left: calc(0.4375rem - 0.5px); top: 1.6rem; bottom: -0.55rem; width: 1px; background: var(--line-2); }
.timeline .step:last-child::before { display: none; }
.timeline .step-mark { position: relative; z-index: 1; width: 0.875rem; height: 0.875rem; margin-top: 0.3rem; border-radius: 50%; background: var(--timeline-bg, var(--bg)); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: 0; transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.timeline .step-body { min-width: 0; }
.timeline .step-label { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 560; transition: color var(--dur-2) var(--ease-out); }
.timeline .step-detail, .timeline .step-note { margin-top: 0.1rem; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; overflow-wrap: anywhere; }
.timeline .step-time { padding-top: 0.2rem; color: var(--ink-3); font: 500 var(--fs-2xs)/1.4 var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.timeline .step[data-state="active"] .step-mark { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.timeline .step[data-state="active"] .step-mark::after { content: ""; position: absolute; inset: 0; border: 1.5px solid transparent; border-top-color: var(--accent); border-radius: 50%; animation: yx-spin 0.7s linear infinite; }
.timeline .step[data-state="active"] .step-label, .timeline .step[data-state="done"] .step-label { color: var(--ink); }
.timeline .step[data-state="active"] .step-time { color: var(--accent); }
.timeline .step[data-state="done"] .step-mark { background: var(--ok); box-shadow: none; }
.timeline .step[data-state="done"] .step-mark::after { content: ""; position: absolute; left: 0.29rem; top: 0.16rem; width: 0.22rem; height: 0.42rem; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); animation: yx-pop var(--dur-2) var(--ease-out); }
.timeline .step[data-state="fail"] .step-mark { background: var(--bad); box-shadow: none; }
.timeline .step[data-state="fail"] .step-mark::before, .timeline .step[data-state="fail"] .step-mark::after { content: ""; position: absolute; left: 0.2rem; right: 0.2rem; top: calc(50% - 0.75px); height: 1.5px; background: var(--bg); transform: rotate(45deg); }
.timeline .step[data-state="fail"] .step-mark::after { transform: rotate(-45deg); }
.timeline .step[data-state="fail"] .step-label, .timeline .step[data-state="fail"] .step-detail { color: var(--bad); }
.timeline .step[data-state="skipped"] .step-mark { border: 1.5px dashed var(--line-strong); box-shadow: none; }
.timeline .step[data-state="skipped"] .step-label { font-weight: 450; }

/* ── 15. Endpoint and code blocks ──────────────────────────────────────── */
.endpoint { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; min-height: 2.875rem; padding: 0.25rem 0.25rem 0.25rem var(--sp-4); border-radius: var(--r-md); background: var(--bg-soft); }
.endpoint-label { margin-bottom: 0.4rem; color: var(--ink-3); font-size: var(--fs-xs); }
.method { flex: none; color: var(--accent); font: 650 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.02em; }
.method-get { color: var(--ok); } .method-post { color: var(--accent); } .method-delete { color: var(--bad); } .method-patch, .method-put { color: var(--warn); }
.endpoint-url { flex: 1; min-width: 0; overflow-x: auto; color: var(--ink); font: 500 var(--fs-sm)/1.6 var(--font-mono); white-space: nowrap; scrollbar-width: none; }
.endpoint-url::-webkit-scrollbar { display: none; }
.code { min-width: 0; overflow: hidden; border-radius: var(--r-md); background: var(--bg-soft); color: var(--ink); }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: 2.75rem; padding: 0 0.375rem 0 var(--sp-2); box-shadow: inset 0 -1px 0 var(--line); }
.code-tabs { position: relative; display: flex; gap: 0.125rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tabs::after { content: ""; position: absolute; left: 0; bottom: 0; width: var(--tab-w, 0); height: 2px; border-radius: 2px; background: var(--accent); transform: translateX(var(--tab-x, 0)); transition: transform var(--dur-2) var(--ease-out), width var(--dur-2) var(--ease-out); }
.code-tab { appearance: none; padding: 0.875rem 0.75rem; border: 0; background: transparent; color: var(--ink-3); font: 600 var(--fs-xs)/1 var(--font-sans); white-space: nowrap; cursor: pointer; transition: color var(--dur-1) var(--ease-out); }
.code-tab:hover, .code-tab[aria-selected="true"] { color: var(--ink); }
.code-title { padding: 0.875rem 0.25rem; color: var(--ink-3); font: 600 var(--fs-xs)/1 var(--font-sans); }
.code-pre { max-height: 26rem; margin: 0; padding: var(--sp-4) var(--sp-5); overflow: auto; color: var(--ink); font: 400 var(--fs-xs)/1.65 var(--font-mono); white-space: pre; tab-size: 2; }
.code-pre .c { color: var(--ink-3); }
@media (max-width: 39.99rem) {
  .endpoint { flex-wrap: wrap; row-gap: 0.25rem; padding-block: 0.5rem; }
  .endpoint-url { flex: 1 1 calc(100% - 4rem); overflow-wrap: anywhere; white-space: normal; line-height: 1.45; }
  .code-tab { padding-inline: 0.5rem; }
  .code-bar .btn-copy > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ── 16. Key box: shown once, masked afterwards ────────────────────────── */
.keybox { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); background: var(--bg-soft); }
.keybox-label { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.keybox-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.keybox-value { flex: 1 1 14rem; min-width: 0; padding: 0.6rem 0.75rem; border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 600 var(--fs-sm)/1.4 var(--font-mono); word-break: break-all; user-select: all; }
.keybox-note { color: var(--warn); font-size: var(--fs-sm); line-height: 1.5; }
.keybox[data-masked="true"] .keybox-value { color: var(--ink-3); user-select: none; }
.keybox[data-masked="true"] .keybox-note { color: var(--ink-2); }

/* ── 17. Pills and markers: each state has its own shape, so colour is never the only signal ── */
.pill { display: inline-flex; align-items: center; gap: 0.45rem; height: 1.5rem; padding: 0 0.625rem 0 0.5rem; border-radius: var(--r-pill); background: var(--pill-bg, var(--bg-soft)); color: var(--pill-fg, var(--ink-3)); font: 560 var(--fs-xs)/1 var(--font-sans); white-space: nowrap; vertical-align: middle; }
.pill::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.pill-healthy { --pill-fg: var(--ok); --pill-bg: var(--ok-soft); }
.pill-degraded { --pill-fg: var(--warn); --pill-bg: var(--warn-soft); }
.pill-degraded::before { border-radius: 1px; transform: rotate(45deg) scale(0.85); }
.pill-failing { --pill-fg: var(--bad); --pill-bg: var(--bad-soft); }
.pill-failing::before { border-radius: 1px; }
.pill-building { --pill-fg: var(--accent); --pill-bg: var(--accent-soft); }
.pill-building::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; animation: yx-pulse 0.9s var(--ease-in-out) infinite alternate; }
.pill-unknown { --pill-fg: var(--ink-3); --pill-bg: var(--bg-soft); }
.pill-unknown::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.live { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--accent); font-size: var(--fs-xs); font-weight: 600; }
.live::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; animation: yx-pulse 0.9s var(--ease-in-out) infinite alternate; }
.spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; vertical-align: -0.15em; animation: yx-spin 0.7s linear infinite; }
.skeleton { min-height: 1em; border-radius: var(--r-xs); background: var(--bg-soft); color: transparent; animation: yx-pulse 0.9s var(--ease-in-out) infinite alternate; }
.kind { display: inline-block; flex: none; width: 0.5rem; height: 0.5rem; }
.kind-hand { border-radius: 2px; background: var(--ink); }
.kind-page { border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); }

/* ── 18. Notices, error states, empty states ───────────────────────────── */
.notice { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.3rem; padding: var(--sp-4) var(--sp-4) var(--sp-4) 2.5rem; border-radius: var(--r-md); background: var(--notice-bg, var(--bg-soft)); }
.notice::before { content: ""; position: absolute; left: 1.05rem; top: 1.3rem; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--notice-fg, var(--ink-3)); }
.notice-title { color: var(--ink); font-weight: 620; line-height: 1.4; }
.notice-body { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.notice-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.notice-meta { margin-top: 0.2rem; color: var(--ink-3); font: 400 var(--fs-2xs)/1.5 var(--font-mono); overflow-wrap: anywhere; }
.notice-info { --notice-bg: var(--accent-soft); --notice-fg: var(--accent); }
.notice-info::before { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.notice-ok { --notice-bg: var(--ok-soft); --notice-fg: var(--ok); }
.notice-warn { --notice-bg: var(--warn-soft); --notice-fg: var(--warn); }
.notice-warn::before { border-radius: 1px; transform: rotate(45deg) scale(0.9); }
.notice-error { --notice-bg: var(--bad-soft); --notice-fg: var(--bad); }
.notice-error::before { border-radius: 1px; }
.empty { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: var(--sp-2); padding: var(--sp-6) 0; text-align: left; }
.empty-title { font-size: var(--fs-md); font-weight: 650; letter-spacing: -0.012em; }
.empty-text { max-width: 36rem; color: var(--ink-2); }
.empty-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }

/* ── 19. Toasts: confirmations only ────────────────────────────────────── */
.toasts { position: fixed; z-index: 100; right: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px)); left: var(--gutter); display: grid; justify-items: end; gap: var(--sp-2); pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 0.625rem; max-width: min(26rem, 100%); padding: 0.75rem 1rem; border: 0; border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float); font: 500 var(--fs-sm)/1.45 var(--font-sans); text-align: left; pointer-events: auto; cursor: pointer;
  animation: yx-toast-in var(--dur-3) var(--ease-out); transition: opacity var(--dur-2) var(--ease-in), transform var(--dur-2) var(--ease-in);
}
.toast::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin-top: 0.42rem; border-radius: 50%; background: var(--ink-3); }
.toast-ok::before { background: var(--ok); }
.toast-error::before { border-radius: 1px; background: var(--bad); }
.toast[data-leaving="true"] { opacity: 0; transform: translateY(8px); }
@media (max-width: 39.99rem) { .toasts { justify-items: center; } }

/* ── 20. Page shells: docs and console ─────────────────────────────────── */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
.shell-main { min-width: 0; max-width: 52rem; }
.shell-nav { display: flex; gap: 0.25rem; padding-bottom: var(--sp-2); overflow-x: auto; box-shadow: inset 0 -1px 0 var(--line); scrollbar-width: none; }
.side-title { display: none; }
.side-link { position: relative; display: block; padding: 0.45rem 0.75rem; border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; transition: color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.side-link:hover { color: var(--ink); background: var(--bg-soft); }
.side-link[aria-current] { color: var(--ink); font-weight: 600; }
.side-link[aria-current]::before { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
@media (min-width: 64rem) {
  .shell { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--sp-7); }
  .shell-nav { position: sticky; top: calc(var(--header-h) + var(--sp-5)); align-self: start; display: grid; gap: 0.1rem; max-height: calc(100vh - var(--header-h) - var(--sp-7)); padding: 0; overflow-y: auto; box-shadow: none; }
  .side-title { display: block; margin: var(--sp-4) 0 var(--sp-1); padding: 0 0.75rem; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; }
  .side-title:first-child { margin-top: 0; }
  .side-link { white-space: normal; }
  .side-link[aria-current]::before { left: 0; right: auto; top: 0.5rem; bottom: 0.5rem; width: 2px; height: auto; }
}
.table-wrap { position: relative; overflow-x: auto; }
.table-plain { width: 100%; font-size: var(--fs-sm); }
.table-plain th, .table-plain td { padding: 0.65rem 1rem 0.65rem 0; box-shadow: inset 0 -1px 0 var(--line); text-align: left; vertical-align: top; }
.table-plain th { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.table-plain td.is-num, .table-plain th.is-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── 21. Home sections: hero, categories, repair rules, proof strip, why, catalog index, price, questions ── */
.home-hero { --fs-hero: clamp(2.25rem, 0.9rem + 4vw, 4.25rem); }
.hero-title { font-size: var(--fs-hero); font-weight: 760; line-height: 1.04; letter-spacing: -0.04em; }
/* the rotating line: "such as" and the phrase share a line; every phrase sits in the same grid cell, which takes the
   rest of the line, so a long phrase wraps inside it and the line keeps the size of the longest one */
.hero-such { display: flex; align-items: baseline; gap: 0 0.26em; margin-top: 0.12em; color: var(--ink-3); font-size: calc(var(--fs-hero) * 0.72); font-weight: 400; line-height: 1.15; letter-spacing: -0.03em; }
.such-stack { display: grid; flex: 1 1 0; min-width: 0; }
.such-item { grid-area: 1 / 1; justify-self: start; color: var(--accent); font-weight: 620; text-decoration: underline 0.06em var(--accent-line); text-underline-offset: 0.14em; overflow-wrap: anywhere; opacity: 0; visibility: hidden; transform: translateY(0.35em); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3); }
.such-item:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.such-item:not(.is-current) { pointer-events: none; }
/* the leaving phrase is gone (140 ms) before the arriving one starts (160 ms): two values never show at once */
.such-item.is-current { opacity: 1; visibility: visible; transform: none; transition-delay: 160ms, 160ms, 0s; }
.such-item.is-prev { visibility: visible; transform: translateY(-0.35em); transition: opacity var(--dur-1) var(--ease-in), transform var(--dur-1) var(--ease-in), visibility 0s linear var(--dur-1); }
.such-stack.is-instant .such-item { transition: none; }
/* phones: the examples come before the second path (paste a page), as in the markup; wide screens: the paste box
   beside the lead. reading-flow lets keyboard focus follow the rows where browsers support it. */
.home-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "main" "panel" "form"; column-gap: var(--sp-8); reading-flow: grid-rows; }
.hero-copy { grid-area: copy; } .hero-main { grid-area: main; margin-top: var(--sp-6); } .home-hero .showcase { grid-area: panel; }
.home-hero .address { grid-area: form; margin-top: var(--sp-7); }
.hero-main .lead { margin-top: 0; max-width: 36rem; line-height: 1.5; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }
.hero-note { margin-top: var(--sp-3); color: var(--ink-3); font-size: var(--fs-xs); }
@media (min-width: 64rem) { .home-hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "copy copy" "main form" "panel panel"; align-items: start; } .home-hero .address { margin-top: var(--sp-6); } }
@media (max-width: 39.99rem) { .hero-ctas .btn-lg { height: 2.875rem; padding: 0 1rem; font-size: var(--fs-sm); } }
.cats { padding-block: var(--sp-7); }
.cats-line, .why-lead { max-width: 40rem; margin-top: var(--sp-3); color: var(--ink-2); }
.cat-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2) var(--sp-7); margin-top: var(--sp-6); }
@media (min-width: 40rem) { .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .cat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 39.99rem) { .cat-card-list > li:nth-child(n+3) { display: none; } }
.cat-card { display: flex; flex-direction: column; gap: var(--sp-2); padding-block: var(--sp-4) var(--sp-5); box-shadow: inset 0 1px 0 var(--line); }
.cat-card-name a { color: var(--ink); text-decoration: none; }
.cat-card-name a:hover { color: var(--accent); }
.cat-card-count { color: var(--ink-3); font-size: var(--fs-xs); }
.cat-card-count .num { color: var(--ink); font-weight: 650; }
.cat-card-list { display: grid; gap: 0.3rem; font-size: var(--fs-sm); }
.cat-card-list a { display: block; overflow: hidden; color: var(--ink-2); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.cat-card-list a:hover { color: var(--accent); text-decoration: underline; }
.cat-card-all { margin-top: auto; padding-top: var(--sp-1); font-size: var(--fs-xs); font-weight: 600; text-decoration: none; }
.cat-card-all:hover { text-decoration: underline; }
.proof { padding-block: var(--sp-6) var(--sp-7); }
.proof-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2) var(--sp-5); }
.proof-title { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; }
.proof-when { margin-left: 0.5rem; font-weight: 450; }
.proof-links { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); }
.proof-links a { font-weight: 560; text-decoration: none; }
.proof-links a:hover { text-decoration: underline; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--sp-5) var(--sp-7); margin-top: var(--sp-5); }
.proof-item { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--sp-2); }
.proof-num { font-size: var(--fs-stat); font-weight: 300; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.proof-label { max-width: 19rem; color: var(--ink-2); font-size: var(--fs-sm); text-wrap: pretty; }
.proof-item.is-empty .proof-num { display: none; }
.proof-item.is-empty .proof-label { padding-top: 0.6rem; box-shadow: inset 0 1px 0 var(--line); }
@media (max-width: 39.99rem) {
  .proof-grid { gap: var(--sp-4); }
  .proof-item { flex-direction: row-reverse; align-items: center; gap: var(--sp-4); }
  .proof-num { min-width: 3.25ch; font-size: var(--fs-lg); font-weight: 400; }
  .proof-item.is-empty .proof-label { padding-top: 0; box-shadow: none; }
}
.rules { padding-block: var(--sp-7); scroll-margin-top: var(--sp-6); }
.rules-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5) var(--sp-8); }
@media (min-width: 64rem) { .rules-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.rules-lead { max-width: 34rem; margin-top: var(--sp-4); color: var(--ink-2); text-wrap: pretty; }
.rules-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.rule { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); align-items: baseline; gap: var(--sp-3); padding-block: var(--sp-4); box-shadow: inset 0 -1px 0 var(--line); color: var(--ink-2); }
.rule:first-child { box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.rule strong { color: var(--ink); font-weight: 620; }
.rule-mark { display: block; width: 0.625rem; height: 0.625rem; transform: translateY(-0.05em); }
.rule-ok .rule-mark { border-radius: 50%; background: var(--ok); }
.rule-wait .rule-mark { width: 0.55rem; height: 0.55rem; background: var(--warn); transform: rotate(45deg); }
.rule-stop .rule-mark { border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); background: linear-gradient(135deg, transparent 44%, var(--ink-3) 44% 56%, transparent 56%); }
.why { padding-block: var(--sp-7); }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6) var(--sp-7); }
@media (min-width: 48rem) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .why-head { grid-column: 1 / -1; } }
@media (min-width: 75rem) { .why-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.why-item h3 { line-height: 1.25; }
.why-item p:not(.sample) { margin-top: var(--sp-2); color: var(--ink-2); }
.sample { display: inline-block; max-width: 100%; margin-bottom: var(--sp-4); padding-bottom: var(--sp-2); overflow-wrap: anywhere; color: var(--ink); font: 500 var(--fs-2xs)/1.4 var(--font-mono); background: linear-gradient(var(--accent), var(--accent)) left bottom / 1.5rem 2px no-repeat; transition: background-size var(--dur-3) var(--ease-out); }
.sample .k { color: var(--ink-3); }
.why-item:hover .sample { background-size: 100% 2px; }
.cat-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4) var(--sp-6); }
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); margin-top: var(--sp-3); color: var(--ink-3); font-size: var(--fs-xs); }
.legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.cat-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: 0 var(--sp-7); margin-top: var(--sp-6); }
.cat-index > li { box-shadow: inset 0 1px 0 var(--line); }
@media (max-width: 39.99rem) { .cat-index > li:nth-child(n+9) { display: none; } }
.cat { display: grid; gap: 0.3rem; padding-block: var(--sp-4); color: var(--ink); text-decoration: none; }
.cat:hover { color: var(--ink); }
.cat-name { display: inline-flex; align-items: flex-start; gap: 0.625rem; font-size: var(--fs-md); font-weight: 620; letter-spacing: -0.015em; line-height: 1.3; transition: color var(--dur-1) var(--ease-out); }
.cat-name .kind { margin-top: calc(0.65em - 0.25rem); }
.cat-name::after { content: "\2192"; margin-left: 0.125rem; opacity: 0; transform: translateX(-0.375rem); transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.cat:hover .cat-name::after, .cat:focus-visible .cat-name::after { opacity: 1; transform: none; }
.cat:hover .cat-name { color: var(--accent); }
.cat:hover .kind-hand { background: var(--accent); }
.cat:hover .kind-page { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cat-meta { padding-left: 1.125rem; overflow: hidden; color: var(--ink-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.price-section { padding-block: var(--sp-7); }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-4) var(--sp-6); }
.faq-section { padding-block: var(--sp-7) var(--sp-8); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5) var(--sp-7); }
@media (min-width: 64rem) { .faq-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.faq-list details { box-shadow: inset 0 -1px 0 var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-block: var(--sp-5); font-size: var(--fs-md); font-weight: 620; line-height: 1.25; letter-spacing: -0.012em; list-style: none; cursor: pointer; transition: color var(--dur-1) var(--ease-out); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--accent); }
.pm { position: relative; flex: none; width: 0.875rem; height: 0.875rem; }
.pm::before, .pm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px; border-radius: 1px; background: currentColor; transition: transform var(--dur-2) var(--ease-out); }
.pm::after { transform: rotate(90deg); }
details[open] > summary .pm::after { transform: rotate(0deg); }
.faq-a { max-width: 40rem; padding-bottom: var(--sp-5); color: var(--ink-2); }
.faq-a p + p { margin-top: var(--sp-3); }
.faq-list details::details-content { block-size: 0; overflow: clip; transition: block-size var(--dur-3) var(--ease-out), content-visibility var(--dur-3) allow-discrete; }
.faq-list details[open]::details-content { block-size: auto; }

/* ── 22. Home examples: sample records of one ready-made API at a time (home.js, public/assets/showcase.js) ── */
.showcase { margin-top: var(--sp-6); padding: clamp(0.625rem, 0.3rem + 1.1vw, 1.25rem); border-radius: var(--r-lg); background: var(--bg-soft); }
.sc-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 2.5rem; padding: 0 0.25rem var(--sp-3); }
/* one line for the name and one for the meta (side by side from 48 rem), so the panel never changes height */
.sc-api { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0.15rem 0.625rem; min-width: 0; }
.sc-api .kind { align-self: center; }
.sc-name, .sc-meta { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-name { color: var(--ink); font-size: var(--fs-md); font-weight: 650; letter-spacing: -0.012em; text-decoration: none; }
.sc-name:hover { color: var(--accent); }
.sc-meta { color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
@media (min-width: 48rem) { .sc-api { grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr); } .sc-meta { grid-column: 3; } }
.sc-controls { display: flex; flex: none; gap: var(--sp-1); }
.sc-controls .icon-btn { background: var(--surface); }
.sc-controls svg { width: 0.875rem; height: 0.875rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sc-pause svg { fill: currentColor; stroke: none; }
.sc-pause .i-play, .sc-pause[data-paused="true"] .i-pause { display: none; }
.sc-pause[data-paused="true"] .i-play { display: block; }
.sc-table { height: calc(3.25rem + var(--row-h) * var(--sc-max, 2) + 2.5rem); overflow: hidden; border-radius: calc(var(--r-lg) - 0.625rem); background: var(--surface); }
/* switching examples: everything about the old one fades out, then the new one fades in and its records rise */
:is(.sc-api, .sc-table, .sc-note, .sc-call) { transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.showcase.is-out :is(.sc-api, .sc-table, .sc-note, .sc-call) { opacity: 0; transition-timing-function: var(--ease-in); }
.showcase.is-out .sc-table { transform: translateY(-4px); }
.showcase.is-in .sc-table tbody tr { animation: yx-rise var(--dur-3) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
.sc-data { table-layout: fixed; }
.sc-data th { position: static; }
.sc-data th:first-child { width: 34%; }
.sc-more { display: -webkit-box; margin: 0; padding: 0.75rem var(--cell-x) 0; overflow: hidden; color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.sc-table[data-room="1"] .sc-more { -webkit-line-clamp: 1; line-clamp: 1; }
.sc-more:empty { display: none; }
.sc-fields { color: var(--ink-2); font-family: var(--font-mono); font-size: 0.95em; }
.sc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-5); padding: var(--sp-3) 0.25rem 0; color: var(--ink-3); font-size: var(--fs-xs); }
.sc-note { display: flex; align-items: center; gap: 0.625rem; }
.sc-note .tag { background: var(--surface); }
.sc-call { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink-2); font: 500 var(--fs-2xs)/1.3 var(--font-mono); }
.sc-chips { margin-top: var(--sp-3); padding-inline: 0.25rem; }
.sc-chips .chip { background: var(--surface); }
.sc-chips .chip[aria-pressed="true"] { background: var(--ink); }
@media (max-width: 63.99rem) { .sc-data :is(th, td):nth-child(n+5) { display: none; } }
@media (max-width: 39.99rem) {
  .showcase { --cell-x: 0.625rem; }
  .sc-data :is(th, td):not(:first-child, .sc-key) { display: none; }
  .sc-data th:first-child { width: 58%; }
  .sc-call { display: none; }
}

/* ── 23. Utilities ─────────────────────────────────────────────────────── */
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); } .mt-8 { margin-top: var(--sp-8); }
@media (max-width: 39.99rem) { .hide-sm { display: none !important; } }
@media (min-width: 40rem) { .show-sm { display: none !important; } }

/* ── 24. Motion: one set of durations and easings; reduced motion shows the calm final state ── */
@keyframes yx-spin { to { transform: rotate(360deg); } }
@keyframes yx-pulse { from { opacity: 1; } to { opacity: 0.25; } }
@keyframes yx-ripple { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes yx-drop { from { opacity: 0; transform: translateY(-6px); } }
@keyframes yx-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes yx-toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes yx-fresh { from { background-color: var(--accent-soft); } to { background-color: transparent; } }
@keyframes yx-pop { from { opacity: 0; transform: rotate(45deg) scale(0.4); } }
@keyframes yx-step-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes yx-msg-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes yx-flash-ring { from { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft); } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--dur-4); animation-timing-function: var(--ease-out); }
/* short laptop screens (1366 x 768 and similar): the examples panel stays on the first screen */
@media (min-width: 64rem) and (max-height: 50rem) {
  :root { --fs-display: clamp(2.5rem, 1rem + 3.2vw, 3.75rem); --row-h: 2.5rem; }
  .home-hero { --fs-hero: clamp(2.25rem, 0.8rem + 3vw, 3.5rem); }
  .hero { padding-block: var(--sp-3) var(--sp-6); }
  .hero-main, .home-hero .address { margin-top: var(--sp-4); } .home-hero .address { gap: var(--sp-2); }
  .showcase { margin-top: var(--sp-4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .sc-pause, .live-dot::after { display: none; }
}
