/* Pym "Graphite & Cobalt" (docs/team/designs/2026-09-26-website-redesign.md).
   Sections: tokens → @font-face → base → layout/shells → components → pages → utilities → reduced motion.
   Colours are referenced ONLY through tokens; hex literals live in the token blocks alone (tests enforce this).
   Every pair used below was measured in design 2.2 / judge r2; re-measure any colour you add or change. */

/* == tokens ================================================================================= */
:root {
  color-scheme: light dark;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #EEF0F4;
  --border: #DCE0E6;
  --border-strong: #7C8594;
  --text: #13161B;
  --text-2: #4B5363;
  --accent: #3B4BD8;
  --accent-hover: #2C3AB8;
  --on-accent: #FFFFFF;
  --accent-text: #2F3FC4;
  --accent-soft: #ECEEFD;
  --focus: #3B4BD8;
  --success: #17784A;
  --success-soft: #E6F4EC;
  --warn: #8A4B00;
  --warn-soft: #FFF3DB;
  --warn-border: #B4690E;
  --danger: #B4232F;
  --danger-soft: #FCEBEC;
  --on-danger: #FFFFFF;
  --code-bg: #0F1218;
  --code-text: #E3E7EE;
  --code-2: #A3ACBB;
  --code-accent: #9FAEFF;
  --code-border: #2A303B;
  --code-focus: #9FAEFF;
  --shadow-1: 0 1px 2px rgb(16 20 28 / .06);
  --shadow-2: 0 8px 24px rgb(16 20 28 / .14);

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --type-display: clamp(2.25rem, 1.5rem + 3vw, 3.25rem);
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-24: 96px;
  --r-control: 6px; --r-card: 10px; --r-pill: 999px;
  --header-h: 60px; --sidebar-w: 232px; --content-max: 1120px; --app-max: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0E12;
    --surface: #14171D;
    --surface-2: #1B1F27;
    --border: #2A2F39;
    --border-strong: #6E7788;
    --text: #ECEEF2;
    --text-2: #A3ABB9;
    --accent: #8E9CFF;
    --accent-hover: #A9B4FF;
    --on-accent: #0C0E12;
    --accent-text: #A3AFFF;
    --accent-soft: #1E2340;
    --focus: #A3AFFF;
    --success: #5BCB8F;
    --success-soft: #11261B;
    --warn: #F2BE62;
    --warn-soft: #2A2012;
    --warn-border: #C98A2B;
    --danger: #FF8D95;
    --danger-soft: #2C1518;
    --on-danger: #0C0E12;
    --shadow-1: none;
    --shadow-2: none;
  }
}

/* == @font-face (self-hosted IBM Plex, SIL OFL 1.1: /static/fonts/LICENSE.txt) ============== */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/static/fonts/IBMPlexSansVar-Roman-Latin1.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2");
}

/* == base ================================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5rem;
}
h1, h2, h3, h4 { margin: 0 0 var(--s-3); font-weight: 600; }
h1 { font-size: 1.75rem; line-height: 2.25rem; }
h2 { font-size: 1.25rem; line-height: 1.75rem; }
h3, h4 { font-size: 1rem; line-height: 1.5rem; }
p { margin: 0 0 var(--s-3); }
a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd, .mono { font-family: var(--font-mono); }
code { font-size: 0.8125rem; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0 0 var(--s-3); padding-left: 1.25rem; }
hr.rule { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
time { white-space: nowrap; }

/* == layout / shells ======================================================================= */
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--surface); color: var(--accent-text); padding: var(--s-2) var(--s-4);
  border: 2px solid var(--focus); border-radius: var(--r-control);
}
.skip-link:focus { top: var(--s-2); }

.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--content-max); height: 100%; margin: 0 auto; padding: 0 var(--s-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.brand { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.header-nav { display: flex; align-items: center; gap: var(--s-6); }
.header-nav > a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; padding: var(--s-2) 0; }
.header-nav > a:not(.btn):hover, .header-nav > a[aria-current="page"] { color: var(--accent-text); text-decoration: underline; }

.menu { position: relative; display: none; }
.menu-button {
  list-style: none; cursor: pointer; min-width: 44px; min-height: 44px; padding: 0 var(--s-4);
  display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-control);
  background: var(--surface); font-weight: 500;
}
.menu-button::-webkit-details-marker { display: none; }
.menu-button::before { content: "≡"; margin-right: var(--s-2); font-size: 1.1rem; }
.menu[open] .menu-button { background: var(--surface-2); }
.menu-panel {
  position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 30;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2);
  padding: var(--s-4) var(--s-6) var(--s-6); display: grid; gap: var(--s-1);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.menu-panel > a { padding: var(--s-3) 0; color: var(--text); font-weight: 500; }

.public-main { max-width: var(--content-max); margin: 0 auto; padding: var(--s-10) var(--s-6) var(--s-16); }
.public-body > .banner-demo, .public-body > .banner-booking { max-width: var(--content-max); margin: var(--s-4) auto 0; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner {
  max-width: var(--content-max); margin: 0 auto; padding: var(--s-6);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6);
  color: var(--text-2); font-size: 0.8125rem; line-height: 1.25rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.footer-note { margin: 0 0 0 auto; }
.footer-version { font-family: var(--font-mono); margin-left: var(--s-2); }

/* app shell: sidebar ≥ 960px, header + Menu below */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: var(--s-5) var(--s-4); display: flex; flex-direction: column; gap: var(--s-6);
}
.sidebar > .app-nav { flex: 1; }
.app-header { display: none; grid-column: 1 / -1; }
.app-column { min-width: 0; display: flex; flex-direction: column; }
.app-column > .banner-demo, .app-column > .banner-booking { margin: var(--s-4) var(--s-8) 0; max-width: var(--app-max); }
.app-main { flex: 1; width: 100%; max-width: calc(var(--app-max) + 2 * var(--s-8)); padding: var(--s-8); }
.app-column > .site-footer { margin-top: auto; }
.app-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.app-nav a {
  display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-control);
  color: var(--text); text-decoration: none; font-weight: 500; border-left: 3px solid transparent;
}
.app-nav a:hover { background: var(--surface-2); }
.app-nav a[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600; border-left-color: var(--accent);
}
.app-nav-secondary { margin-top: var(--s-4) !important; padding-top: var(--s-4) !important; border-top: 1px solid var(--border); }
.app-account { border-top: 1px solid var(--border); padding-top: var(--s-4); display: grid; gap: var(--s-3); }
.account-email { margin: 0; color: var(--text-2); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-panel .app-account { margin-top: var(--s-3); }
.menu-panel .account-email { white-space: normal; overflow-wrap: anywhere; }

/* auth shell */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: var(--s-8) var(--s-4); gap: var(--s-6); }
.auth-header { display: flex; align-items: center; gap: var(--s-2); }
.auth-shell > .banner-demo, .auth-shell > .banner-booking { width: 100%; max-width: 420px; }
.auth-main { width: 100%; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; }
.auth-split { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 420px); gap: var(--s-10); align-items: start; }
.auth-facts { padding-top: var(--s-6); }
.auth-facts ul { padding-left: 1.1rem; display: grid; gap: var(--s-3); color: var(--text-2); }
.auth-aside { margin-top: var(--s-4); }
.auth-switch { margin: var(--s-4) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--border); }
.auth-footer { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); color: var(--text-2); font-size: 0.8125rem; }

/* == components ============================================================================ */
.wordmark { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; color: var(--text); }
.wordmark-text { font-family: var(--font-mono); font-weight: 500; font-size: 1.25rem; letter-spacing: -0.02em; }
.wordmark-cursor { display: inline-block; width: 0.55em; height: 1.05em; background: var(--accent); border-radius: 1px; transform: translateY(1px); }
.wordmark-small .wordmark-text { font-size: 1rem; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: var(--r-pill);
  font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500; white-space: nowrap; vertical-align: middle;
}
.badge-demo { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-border); }
.badge-active { color: var(--success); padding-left: 0; }
.badge-revoked { color: var(--text-2); padding-left: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot-hollow { background: transparent; border: 1.5px solid currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-control); border: 1px solid transparent;
  font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-danger:hover { background: var(--danger); color: var(--on-danger); text-decoration: underline; }
.btn-link { color: var(--accent-text); text-decoration: underline; font-weight: 500; background: none; border: 0; padding: var(--s-2) 0; cursor: pointer; }
.btn-large { min-height: 44px; padding: 0 var(--s-5); }
.btn-block { width: 100%; }
.btn[aria-busy="true"] { cursor: progress; }
@media (pointer: coarse) { .btn, .input { min-height: 44px; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-1); padding: var(--s-6); min-width: 0;
}
.app-main > .card, .docs-body > .card { margin: 0 0 var(--s-6); }
.grid-2 > .card { margin: 0; }
.card-title { margin-bottom: var(--s-4); }
.card-actions { margin-top: var(--s-4); }
.section { margin-top: var(--s-10); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-6); margin-bottom: var(--s-6); }
.grid-single { grid-template-columns: minmax(0, 1fr); }

/* forms */
.form { display: grid; gap: var(--s-5); margin-top: var(--s-4); }
.form.narrow { max-width: 420px; }
.field { display: grid; gap: var(--s-1); min-width: 0; }
.field-label { font-weight: 500; }
.field-help { margin: 0; color: var(--text-2); font-size: 0.8125rem; line-height: 1.25rem; }
.field-error { margin: 0; color: var(--danger); font-weight: 500; display: flex; gap: var(--s-2); align-items: baseline; }
.field-error-icon {
  flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: var(--on-danger);
  font-size: 0.75rem; line-height: 16px; text-align: center; font-weight: 600;
}
.input-row { display: flex; gap: var(--s-2); }
.input {
  width: 100%; min-width: 0; height: 44px; padding: 0 var(--s-3); font-size: 1rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-control);
}
select.input { padding-right: var(--s-2); }
.input::placeholder { color: var(--text-2); }
.field-invalid .input { border: 2px solid var(--danger); background: var(--danger-soft); }
.btn-show { flex: none; height: 44px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.inline-form .field { flex: 1 1 260px; }

.error-summary {
  border-left: 4px solid var(--danger); background: var(--danger-soft); border-radius: var(--r-control);
  padding: var(--s-4) var(--s-5); margin: var(--s-4) 0;
}
.error-summary-title { font-size: 1rem; margin-bottom: var(--s-2); }
.error-summary p:last-child, .error-summary-list { margin-bottom: 0; }
.error-summary a { color: var(--danger); font-weight: 500; }

/* alerts */
.alert {
  display: flex; gap: var(--s-3); align-items: flex-start; border-radius: var(--r-control);
  padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-5); border: 1px solid var(--border); background: var(--surface);
}
.alert-body { min-width: 0; }
.alert-body p:last-child { margin-bottom: 0; }
.alert-icon {
  flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600;
}
.alert-info { background: var(--accent-soft); border-color: var(--accent-soft); }
.alert-info .alert-icon { background: var(--accent-text); color: var(--surface); }
.alert-success { background: var(--success-soft); border-color: var(--success-soft); }
.alert-success .alert-icon { background: var(--success); color: var(--surface); }
.alert-warning { background: var(--warn-soft); border-color: var(--warn-border); }
.alert-warning .alert-icon { background: var(--warn); color: var(--surface); }
.alert-warning a, .alert-warning strong { color: var(--warn); }
.alert-danger { background: var(--danger-soft); border-color: var(--danger); }
.alert-danger .alert-icon { background: var(--danger); color: var(--surface); }
.alert-danger strong { color: var(--danger); }
.alert :focus-visible { outline-offset: 1px; }
.tls-note code { background: var(--surface); }

/* code surfaces: dark in both modes; focus ring drawn INSIDE (judge S8) */
.code {
  background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-border);
  border-radius: var(--r-card); margin: 0 0 var(--s-4); min-width: 0;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-2) var(--s-3) var(--s-2) var(--s-4); border-bottom: 1px solid var(--code-border);
  color: var(--code-2); font-size: 0.8125rem; min-height: 44px;
}
.code-body {
  margin: 0; padding: var(--s-4); overflow-x: auto; white-space: pre;
  font-size: 0.8125rem; line-height: 1.35rem; color: var(--code-text);
}
.code-body code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; color: inherit; }
.code :focus-visible { outline: 2px solid var(--code-focus); outline-offset: -4px; }
.btn-code-copy {
  min-height: 32px; padding: 0 var(--s-3); background: transparent; color: var(--code-text);
  border: 1px solid var(--code-2); border-radius: var(--r-control); cursor: pointer; font-weight: 500;
}
.btn-code-copy:hover { background: var(--code-border); }
.btn-inline-copy { background: var(--surface); color: var(--text); border-color: var(--border-strong); margin-left: var(--s-2); }
.btn-inline-copy:hover { background: var(--surface-2); }
.copy-status { font-size: 0.8125rem; color: var(--code-2); padding: 0 var(--s-4); }
.copy-status:empty { display: none; }
.copy-status:not(:empty) { padding-bottom: var(--s-2); }
.facts .copy-status { color: var(--text-2); padding: 0 0 0 var(--s-2); }
.key-value { white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; font-size: 0.875rem; }
.key-reveal { border-color: var(--code-accent); }

/* snippets: stacked without JS, tabs with JS */
.snippets { margin: var(--s-4) 0; }
.snippet-title { font-size: 0.9375rem; margin: var(--s-4) 0 var(--s-2); }
.snippets.is-tabbed .snippet-title { display: none; }
.tablist { display: flex; gap: var(--s-1); margin-bottom: -1px; position: relative; }
.tab {
  min-height: 40px; padding: 0 var(--s-4); cursor: pointer; font-weight: 500;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); border-bottom: 0;
  border-radius: var(--r-control) var(--r-control) 0 0;
}
.tab[aria-selected="true"] { background: var(--code-bg); color: var(--code-text); border-color: var(--code-border); }
.snippets.is-tabbed .code { border-top-left-radius: 0; }

/* receipt: the signature component */
.receipt { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--code-text); }
.receipt caption { text-align: left; color: var(--code-2); font-family: var(--font-sans); padding: var(--s-3) var(--s-4) var(--s-2); }
.receipt th { text-align: left; font-weight: 400; padding: var(--s-1) var(--s-4); color: var(--code-2); }
.receipt td { text-align: right; padding: var(--s-1) var(--s-4); white-space: pre; }
.receipt tfoot th, .receipt tfoot td { border-top: 1px solid var(--code-2); color: var(--code-text); font-weight: 500; padding-top: var(--s-2); padding-bottom: var(--s-3); }
.receipt .receipt-note td { border-top: 0; text-align: left; white-space: normal; color: var(--code-2); font-weight: 400; font-family: var(--font-sans); }
.receipt-surface { position: relative; overflow-x: auto; }

/* tables */
/* position: relative keeps absolutely positioned (visually hidden) descendants inside the scroll box (B4). */
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; }
.table caption:not(.visually-hidden) { text-align: left; font-weight: 600; padding-bottom: var(--s-2); }
.table th, .table td { padding: var(--s-3) var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table thead th { background: var(--surface-2); color: var(--text-2); font-weight: 500; font-size: 0.8125rem; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table td.mono { font-size: 0.8125rem; white-space: pre; }
.amount-credit { color: var(--success); }
.nowrap { white-space: nowrap; }
/* admin catalog (MC-1): state and proof badges are text + symbol, never colour alone; existing tokens only */
.catalog-table .catalog-model { font-weight: 400; min-width: 12rem; }
.catalog-table summary { cursor: pointer; }
.catalog-facts { margin-top: var(--s-2); font-size: 0.8125rem; }
.catalog-history-title { margin: var(--s-2) 0 0; font-size: 0.8125rem; color: var(--text-2); }
.catalog-history { margin: 0; padding-left: var(--s-4); font-size: 0.8125rem; }
.catalog-state { border: 1px solid var(--border-strong); color: var(--text); }
.catalog-state-published { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.catalog-state-failed { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.catalog-proof-pass { color: var(--success); background: var(--success-soft); border: 1px solid var(--success); }
.catalog-proof-missing { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-border); }
/* admin onboarding runs (MC-2): run and stage badges are text + symbol, never colour alone; existing tokens only */
.onb-badge { border: 1px solid var(--border-strong); color: var(--text); white-space: nowrap; }
.onb-passed { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.onb-failed { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.onb-needs_review { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
/* MC-3: the publish workflow's licence text scrolls inside its own box, never the page. */
.licence-text { max-height: 24rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--border-strong); padding: 0.75rem; }
.onboarding-stages { list-style: none; margin: 0; padding: 0; }
.onboarding-stages > li { border-top: 1px solid var(--border); padding: var(--s-3) 0; overflow-wrap: anywhere; }
.onboarding-stages .stage-head { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: baseline; }
.onboarding-stages .stage-name { font-weight: 600; }
.onboarding-stages .stage-sub { margin: var(--s-1) 0 0; font-size: 0.8125rem; }
.row-receipt summary { cursor: pointer; color: var(--accent-text); min-height: 24px; display: inline-block; font-size: 0.8125rem; }
.row-receipt[open] summary { margin-bottom: var(--s-2); }
.row-receipt .code { margin: 0; min-width: 320px; }
.hold-table caption { font-size: 0.8125rem; color: var(--text-2); font-weight: 500 !important; }
/* models (multi-model design 3.1, 7.2, 13): ids never break inside tables; prose ids use .break-anywhere */
.models-table .model-cell { white-space: nowrap; font-weight: 400; }
.model-name { display: block; color: var(--text-2); font-size: 0.8125rem; white-space: normal; }
.models-table .cell-label { display: none; }
/* S12: the dashboard's seven columns clipped the hold at 1280 px; its headers wrap rather than force width. */
.models-table-status thead th { white-space: normal; }
/* H-B4: numeric cells default to white-space: pre (.table td.mono), which forces a wide minimum content width per
   column; a status table already wraps its headers, so let its data cells wrap too rather than force page/inner
   scroll at >= 1024 px. */
.models-table-status td.mono { white-space: normal; }
.models-table-status th, .models-table-status td { padding-left: var(--s-3); padding-right: var(--s-3); }
.models-footnote { margin-top: var(--s-2); }
.table-scroll > .table > caption:not(.visually-hidden) { padding: var(--s-3) var(--s-4) var(--s-2); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.status-glyph { font-size: 1em; }
.status-available { color: var(--success); }
.status-unavailable { color: var(--danger); }
.status-unknown { color: var(--text-2); }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-4); }
.status-line p { margin: 0; line-height: 1.5rem; }
.check-again { margin: 0; }
.btn-small { min-height: 32px; padding: 0 var(--s-3); font-size: 0.8125rem; }
.row-note { display: block; color: var(--text-2); font-size: 0.8125rem; }
/* FT-1: an error file's problems (line, lead, fix), inside the Status cell. */
.file-problems { margin: 0.25rem 0 0; padding-left: 1.1rem; font-size: 0.875rem; max-width: 40rem; }
.file-problems li { margin: 0.25rem 0; }
.row-form { margin: 0; }
.receipt-note { color: var(--text-2); font-size: 0.8125rem; margin: var(--s-2) 0 0; max-width: 60ch; }
.receipt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin: var(--s-4) 0; }
.receipt-grid > .code { margin: 0; }
.streaming-rule ul { margin-top: var(--s-2); }
.small { font-size: 0.8125rem; }
.policy-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: var(--s-6); align-items: start; margin: var(--s-4) 0; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-4); }
.pager a { padding: var(--s-2) 0; }

/* keys */
.keys-table .cell-label { display: none; }
.row-action { display: inline-block; padding: var(--s-1) var(--s-2); margin-left: var(--s-2); min-height: 24px; }
.revoke-row td { background: var(--surface-2); }
.revoke-confirm { border-left: 3px solid var(--danger); padding: var(--s-2) var(--s-4); }
.revoke-confirm .actions { margin: 0; }
.title-icon { color: var(--success); }
.create-panel .inline-form .btn { margin-bottom: 0; }
/* B2: the key scope radios (native controls; the label and its hint are the 24 px+ target) and the scope badge */
.choice-group { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-2); min-width: 0; }
.choice-group legend { padding: 0; margin-bottom: var(--s-1); }
.choice { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s-2); align-items: start; }
.choice input[type="radio"], .choice input[type="checkbox"] { width: 20px; height: 20px; margin: 2px; accent-color: var(--accent); }
.choice label { font-weight: 500; display: inline-block; min-height: 24px; }
.form-actions { display: flex; gap: var(--s-3); }
.badge-scope { color: var(--text-2); border: 1px solid var(--border-strong); }
.badge-scope-manage { color: var(--text); font-weight: 600; }
/* MC-4 catalog pages (design §11): neutral outlined badges, built from existing tokens, text --text not --text-2
   (badge-scope's muted 600-weight reads as "scope", not as a catalog fact), so Development only and Dedicated
   deployment only aren't confused with Demo (amber stays reserved for Demo) or with the scope badges. */
.badge-dev, .badge-dedicated { color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); }
/* B3 deployments (design §7): existing tokens only; every state is a glyph plus a word, never colour alone */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.narrow { max-width: 640px; }
.dstate { font-weight: 600; white-space: nowrap; }
.dstate-glyph { display: inline-block; min-width: 1em; }
.dstate-success { color: var(--success); }
.dstate-warn { color: var(--warn); }
.dstate-danger { color: var(--danger); }
.dstate-muted { color: var(--text-2); }
.dstate-line { margin-bottom: var(--s-2); }
.deployments-table th[scope="row"] { font-weight: 500; }
.deployments-table .cell-label { display: none; }
.scale-review { border-left: 3px solid var(--accent); padding: var(--s-2) var(--s-4); margin-top: var(--s-4); }
.danger-link { color: var(--danger); text-decoration: underline; margin-left: 0; padding-left: 0; }

/* dashboard */
.metric-label { margin: 0; color: var(--text-2); }
.metric { font-size: 2.25rem; line-height: 2.5rem; font-weight: 500; margin: var(--s-1) 0 var(--s-3); overflow-wrap: anywhere; }
.metric-inline { font-size: 1.25rem; font-weight: 500; }
.demo-note { color: var(--text); }
.checklist { list-style: none; padding: 0; display: grid; gap: var(--s-4); }
.checklist-step { display: flex; gap: var(--s-3); }
.checklist-icon { flex: none; width: 24px; text-align: center; font-weight: 600; color: var(--text-2); }
.checklist-done .checklist-icon { color: var(--success); }
.checklist-next .checklist-icon { color: var(--accent-text); }
.checklist-text p { margin-bottom: var(--s-2); }
.checklist-label { font-weight: 500; }
.checklist-state { color: var(--text-2); font-size: 0.8125rem; margin-left: var(--s-2); }
.checklist-next .checklist-state { color: var(--accent-text); font-weight: 600; }

.facts { margin: 0 0 var(--s-4); display: grid; gap: var(--s-3); }
.facts > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s-4); }
.facts dt { color: var(--text-2); font-weight: 500; }
.facts dd { margin: 0; min-width: 0; }
.ledger-summary { margin: 0 0 var(--s-4); display: grid; gap: var(--s-3); }
.ledger-summary > div { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.ledger-summary dt { color: var(--text-2); }
.ledger-summary dd { margin: 0; text-align: right; }

/* == pages ================================================================================= */
.display { font-size: var(--type-display); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: var(--s-5); }
.lede { font-size: 1.125rem; line-height: 1.75rem; color: var(--text-2); max-width: 36rem; }
.lede-small { color: var(--text-2); max-width: 44rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-12); align-items: center; padding-bottom: var(--s-12); }
.hero .actions { margin: var(--s-6) 0 var(--s-4); }
.hero-note { color: var(--text-2); }
.hero-facts { color: var(--text-2); font-size: 0.8125rem; display: flex; flex-wrap: wrap; column-gap: var(--s-2); row-gap: var(--s-1); }
.hero-panel .code { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.hero-panel .snippets { margin: 0; }
.hero-panel .hero-receipt { border-top: 0; border-radius: 0 0 var(--r-card) var(--r-card); margin: 0; }
.band { border-top: 1px solid var(--border); padding: var(--s-10) 0; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.steps li { display: flex; gap: var(--s-3); }
.steps p { color: var(--text-2); }
.step-number {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 500;
}
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.check-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.check-list li { display: flex; gap: var(--s-2); }
.mark { flex: none; width: 20px; font-weight: 600; }
.mark-yes { color: var(--success); }
.mark-no { color: var(--text-2); }
.landing-flash { max-width: 720px; }

.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-10); align-items: start; }
.docs-toc {
  position: sticky; top: calc(var(--header-h) + var(--s-6));
  max-height: calc(100vh - var(--header-h) - 2 * var(--s-6)); overflow-y: auto;
}
.toc-title { font-size: 0.8125rem; color: var(--text-2); }
.docs-toc ul { list-style: none; padding: 0; display: grid; gap: var(--s-1); }
.docs-toc ul ul { padding-left: var(--s-3); }
.docs-toc a { display: block; padding: var(--s-1) 0; }
.docs-body h2[id], .docs-body h3[id] { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.docs-body section { margin-top: var(--s-10); }
.docs-body .facts > div { grid-template-columns: 180px minmax(0, 1fr); }
.errors-table td:first-child { white-space: nowrap; }

/* catch-up design 5.3: disclosed request examples, native details/summary, work without JS (§9 Names). */
.api-example summary { color: var(--accent-text); min-height: 24px; cursor: pointer; }
.api-example[open] summary { margin-bottom: var(--s-2); }
@media (pointer: coarse) { .api-example summary { min-height: 44px; display: inline-flex; align-items: center; } }

/* catch-up design 3.3: the activity Usage column, meter-generic. */
.usage-line { display: block; white-space: nowrap; }
.usage-line + .usage-line { margin-top: 2px; }

.error-main { max-width: 640px; margin: 0 auto; padding: var(--s-16) var(--s-6); min-height: 60vh; }
/* Error pages are short: keep the footer at the bottom of the viewport (audit N7). */
body[data-page="error"] { min-height: 100vh; display: flex; flex-direction: column; }
body[data-page="error"] .error-main { flex: 1 0 auto; width: 100%; }
.error-status { font-family: var(--font-mono); color: var(--text-2); font-size: 1.25rem; margin-bottom: var(--s-2); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-4); }
.plain-list { padding-left: 1.1rem; display: grid; gap: var(--s-2); }
.empty { color: var(--text-2); padding: var(--s-4) 0; }
.muted { color: var(--text-2); }
.h1-icon { color: var(--accent-text); }

/* == responsive ============================================================================ */
@media (max-width: 1199px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-toc { position: static; }
}
@media (max-width: 959px) {
  .header-nav > a:not(.header-cta) { display: none; }
  .menu { display: block; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .app-header { display: block; }
  .app-main { padding: var(--s-6) var(--s-4); }
  /* catch-up design 4.1: the TOC is already static under 1199px; below 960px hide the nested (h3) links so a
     phone sees the top-level entries only, not ~20 links. */
  .docs-toc ul ul { display: none; }
  .app-column > .banner-demo, .app-column > .banner-booking { margin: var(--s-4) var(--s-4) 0; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }
  .auth-split { grid-template-columns: minmax(0, 420px); }
  .auth-facts { display: none; }
  .policy-grid { grid-template-columns: minmax(0, 1fr); }
  .public-body > .banner-demo, .public-body > .banner-booking { margin: var(--s-4) var(--s-4) 0; }
}
@media (max-width: 639px) {
  .card { padding: var(--s-4); }
  .header-inner { padding: 0 var(--s-4); }
  .public-main { padding: var(--s-6) var(--s-4) var(--s-12); }
  .metric { font-size: 1.75rem; line-height: 2.25rem; }
  .steps, .support-grid { grid-template-columns: minmax(0, 1fr); }
  .facts > div, .docs-body .facts > div { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .footer-note { margin-left: 0; }
  /* keys table becomes stacked rows; explicit ARIA roles keep table semantics (judge S9) */
  .keys-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .keys-table, .keys-table tbody, .keys-table tr, .keys-table td { display: block; width: 100%; }
  .keys-table tr { border-bottom: 1px solid var(--border); padding: var(--s-2) 0; }
  .keys-table td { border: 0; padding: var(--s-1) 0; }
  .keys-table .cell-label { display: block; color: var(--text-2); font-size: 0.8125rem; }
  /* B3: the deployments table stacks the same way; its row header (the name) too */
  .deployments-table caption { display: block; text-align: left; }
  .deployments-table th[scope="row"], .deployments-table .num { display: block; width: 100%; border: 0; padding: var(--s-1) 0; text-align: left; }
  .deployments-table .cell-label { display: block; color: var(--text-2); font-size: 0.8125rem; }
  /* dashboard Models table: stacked rows, table roles kept explicitly (design 12) */
  .models-table-status thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .models-table-status, .models-table-status tbody, .models-table-status tr,
  .models-table-status th, .models-table-status td,
  .models-table-status .num { display: block; width: 100%; text-align: left; }
  .models-table-status caption { display: block; }
  .models-table-status tr { border-bottom: 1px solid var(--border); padding: var(--s-2) var(--s-4); }
  .models-table-status th, .models-table-status td { border: 0; padding: var(--s-1) 0; }
  .models-table-status .cell-label { display: inline; color: var(--text-2); font-family: var(--font-sans); }
  .models-table-status .status { font-size: 1rem; }
  .receipt-grid { grid-template-columns: minmax(0, 1fr); }
  .row-action { margin-left: 0; padding-left: 0; }
}
@media (max-width: 359px) {
  .header-cta { display: none; }
}
@media (max-height: 480px) {
  .site-header { position: static; }
  html { scroll-padding-top: 16px; }
  .menu-panel { position: absolute; top: 100%; }
}

/* MC-4 catalog pages: the capability filter (design §4, §11). Plain links; the active one carries a 2px underline
   plus bold text (1.4.1: never colour alone), set via aria-current, never a background pill (that would read as a
   button). >= 24px target height with 8px gaps (2.5.8). */
.filter-nav { display: flex; flex-wrap: wrap; gap: var(--s-4); margin: var(--s-4) 0; }
.filter-nav a {
  display: inline-flex; align-items: center; min-height: 24px; padding: var(--s-1) 0; color: var(--text);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.filter-nav a[aria-current="true"] { font-weight: 600; border-bottom-color: var(--accent); color: var(--accent-text); }
.filter-nav a:hover { text-decoration: underline; }

/* == utilities ============================================================================= */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.break-anywhere { overflow-wrap: anywhere; }

/* == reduced motion ======================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* == FT-3a: fine-tuning (spec 2026-10-02 §6.3: the loss chart; contrast pairs measured in the spec §10) ============ */
.ft-chart { margin: 0; max-width: 720px; }
.ft-chart svg { display: block; width: 100%; height: auto; }
.ft-line { stroke: var(--accent); stroke-width: 2; }
.ft-grid { stroke: var(--border); stroke-width: 1; }
.ft-resume { stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ft-tick { fill: var(--text-2); font-size: 12px; }
@media (max-width: 480px) { .ft-tick-thin { display: none; } }
.ft-booking p { margin: 0 0 var(--s-2); }
