/* Trust-and-measurement surfaces — /methodology and /metrics.
 *
 * The two routes are one system: Methodology is the constitutional explanation of how Stable Tape
 * measures, freezes, verifies and interprets the market; Metrics is the operational register of
 * what is measured today, at what status, from what source, on what cadence, and whether it enters
 * the frozen Daily Tape. They therefore share one stylesheet, so the pair cannot drift apart the
 * way two inline <style> blocks did.
 *
 * The grammar is the published-record family's, not a dashboard's: a 2px accent rule over the page
 * identity, hairline-ruled sections with small tracked headings, key/value registers instead of
 * panels, mono tabular figures, and status carried by a bordered stamp plus the word — never by
 * colour alone. It deliberately mirrors css/tape-history.css and css/tape-record.css rather than
 * the homepage Observatory composition, because these are reference documents, not readings.
 *
 * The `mx-*` and `meth-*` class vocabulary is preserved on purpose. css/tokens.css already wires
 * that vocabulary into the semantic type roles (LABEL FLOOR, SUPPORTING, METADATA) and into the
 * per-register badge inks, and scripts/test-contrast-accessibility.mjs and
 * scripts/test-copy-dedup.mjs both resolve those exact names. Renaming would silently drop the
 * pages out of the type floor and break the guards.
 *
 * Everything resolves through the shared semantic roles, so both routes follow the site-wide
 * System/Light/Dark selection with no per-theme literals of their own.
 */

/* ── Page frame ──────────────────────────────────────────────────────────────────────────────── */

body {
  background: var(--theme-surface-page);
  color: var(--theme-ink-primary);
  font-family: var(--sans);
  line-height: 1.55;
  margin: 0;
}

/* Width, gutter and box model come from the layout role registry in css/tokens.css, which claims
   `.mx-page` at (0,2,1) precisely so a page cannot quietly leave the shared spine. Only the block
   padding is set here. */
.mx-page {
  padding-block: 0;
}

.mx-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Page head ───────────────────────────────────────────────────────────────────────────────── */

/* The identity block, mirroring `.th-pagehead` and `.al-pagehead`: the accent rule above the
   eyebrow is what marks a page as part of the record family. */
/* The top clearance over the fixed navigation is the registry's, shared with every other route
   hero; only the closing edge belongs to this page. */
.mx-hero {
  padding-bottom: 0;
  border-bottom: 0;
}

.mx-hero-inner {
  border-top: 2px solid var(--theme-rule-strong);
  padding-top: .8rem;
}

.mx-hero-eyebrow {
  margin: 0 0 .35rem;
  color: var(--theme-ink-muted);
  text-transform: uppercase;
}

/* Size, weight and family are the sitewide PAGE TITLE role in css/tokens.css, the same role
   /tape, /developers, /partners and /support resolve. This is the one serif display slot on the
   page, and it is deliberately not overridden here: a route may not redefine a shared role. */
.mx-hero-title {
  margin: 0;
  color: var(--theme-ink-primary);
}

/* The stamped status line under the identity, mirroring `.th-coverage` and `.al-status`: what this
   document is, and what it currently covers. */
.mx-hero-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  margin: .7rem 0 0;
  font-size: .82rem;
  color: var(--theme-ink-secondary);
  font-variant-numeric: tabular-nums lining-nums;
}

.mx-hero-sub {
  margin: .9rem 0 0;
  max-width: 62ch;
  font-size: .93rem;
  color: var(--theme-ink-secondary);
}

.mx-hero-sub a { color: var(--theme-ink-link); }

/* Contents. Both routes are long reference documents rather than readings — Methodology answers
   sixteen separate questions — so the sections are addressable from the head instead of only by
   scrolling. It is a plain ruled list of routes, in the manner of the archive's month rail, not a
   sticky widget: it prints, it works without JavaScript, and it never follows the reader. */
.mx-contents {
  margin: 1.4rem 0 0;
  padding: .9rem 0 0;
  border-top: 1px solid var(--theme-rule-subtle);
}

.mx-contents-label {
  margin: 0 0 .5rem;
  color: var(--theme-ink-muted);
  text-transform: uppercase;
}

.mx-contents-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: mx-contents;
}

.mx-contents-list li { counter-increment: mx-contents; }

.mx-contents-list a {
  color: var(--theme-ink-secondary);
  text-decoration: none;
  font-size: .85rem;
}

.mx-contents-list a::before {
  content: counter(mx-contents, decimal-leading-zero) '\2009';
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--theme-ink-muted);
}

.mx-contents-list a:hover {
  color: var(--theme-ink-link);
  text-decoration: underline;
}

/* ── Sections ────────────────────────────────────────────────────────────────────────────────── */

/* One rule, one rhythm, for every region of both pages. Mirrors `.th-page > section`. */
.mx-section {
  margin: var(--rhythm-section) 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--theme-rule-standard);
}

.mx-section-head {
  margin-bottom: var(--rhythm-title-content);
}

/* The section label is a real heading. It used to be a <div>, which left the whole section
   structure of both pages invisible to assistive technology: a screen reader saw one h1 followed
   by a flat run of card titles with no grouping. Styling is unchanged in kind — small, tracked,
   uppercase — so the visual hierarchy is the same one the record family uses. */
.mx-section-title {
  margin: 0 0 .35rem;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--theme-ink-secondary);
}

/* The lead section of each page carries the accent, exactly as `/tape/history` accents its own
   lead entry. Everything after it is secondary ink, so the page has one emphasis, not eight. */
.mx-section--lead > .mx-section-head > .mx-section-title { color: var(--theme-ink-primary); }

.mx-section-desc {
  margin: 0;
  max-width: var(--layout-measure-reading);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--theme-ink-secondary);
}

.mx-section-desc a { color: var(--theme-ink-link); }

/* ── Chapters ────────────────────────────────────────────────────────────────────────────────── */

/* The six-chapter grouping that condenses Methodology's default reading path (V2 section 9): each
   chapter opens with a plain-English lead before its existing subsections, which keep their own
   .mx-section rule and .mx-section-title label unchanged underneath. A chapter needs to outrank
   that small uppercase label visually, so it borrows the page's one serif display role rather than
   inventing a second heading style. */
.mx-chapter {
  margin: calc(var(--rhythm-section) * 1.6) 0 0;
  padding: 1.6rem 0 0;
  border-top: 2px solid var(--theme-rule-strong);
}

.mx-chapter:first-child { margin-top: 0; }

.mx-chapter-eyebrow {
  margin: 0 0 .5rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--theme-ink-muted);
}

.mx-chapter-title {
  margin: 0 0 .6rem;
  font-family: var(--serif-display, var(--serif));
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--theme-ink-primary);
}

.mx-chapter-lead {
  margin: 0;
  max-width: var(--layout-measure-reading);
  font-size: .98rem;
  line-height: 1.65;
  color: var(--theme-ink-secondary);
}

.mx-chapter-lead a { color: var(--theme-ink-link); }

.mx-chapter > .mx-section:first-of-type { margin-top: 1.6rem; }

/* ── Entries ─────────────────────────────────────────────────────────────────────────────────── */

/* What used to be `.mx-card`: a floating panel with its own gradient, radius and border. It is now
   a ruled entry in a column, so a page of them reads as one document rather than a tray of tiles.
   The class name is kept because css/tokens.css scopes ink roles to it.
 *
 * css/tokens.css lists `.mx-card` among the deferred components with deliberately opaque dark
 * surfaces and pins 49 custom properties to their dark values there, so paper ink never lands on a
 * dark panel. /currencies still needs that. These two routes no longer have a panel at all — the
 * entry is transparent and sits on the page surface — so every pinned property is released back to
 * the active theme. Without this release the whole document renders dark ink on cream, at ratios
 * down to 1.04:1. Only the shared release belongs here; nothing is re-pointed at a literal. */
.mx-card {
  --theme-ink-primary: revert;
  --theme-ink-secondary: revert;
  --theme-ink-muted: revert;
  --theme-ink-link: revert;
  --theme-ink-link-hover: revert;
  --theme-rule-subtle: revert;
  --theme-rule-standard: revert;
  --theme-rule-focus: revert;
  --theme-focus-ring: revert;
  --st-bg: revert;
  --st-surface-1: revert;
  --st-surface-2: revert;
  --st-surface-3: revert;
  --st-border: revert;
  --st-grid: revert;
  --st-text: revert;
  --st-text-secondary: revert;
  --st-text-muted: revert;
  --st-blue: revert;
  --st-blue-strong: revert;
  --st-blue-mid: revert;
  --st-blue-soft: revert;
  --st-blue-surface: revert;
  --st-mint: revert;
  --st-mint-strong: revert;
  --st-mint-mid: revert;
  --st-mint-soft: revert;
  --st-red: revert;
  --st-red-strong: revert;
  --st-red-mid: revert;
  --st-red-soft: revert;
  --st-red-surface: revert;
  --st-amber: revert;
  --st-neutral: revert;
  --st-neutral-surface: revert;
  --bg: revert;
  --bg-deep: revert;
  --bg-card: revert;
  --bg-ui: revert;
  --border: revert;
  --border-hairline: revert;
  --text: revert;
  --text-secondary: revert;
  --text-muted: revert;
  --text-faint: revert;
  --label-muted: revert;
  --accent: revert;
  --accent-light: revert;
  --accent-dim: revert;

  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mx-card + .mx-card {
  margin-top: var(--rhythm-section-compact);
  padding-top: 1.25rem;
  border-top: 1px solid var(--theme-rule-subtle);
}

.mx-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: .6rem .75rem;
  padding: 0;
}

/* Entry titles resolve the shared SUBSECTION TITLE role, as they did before, so a metric entry here
   is set at the same scale as a report title or a partner heading. Only colour is asserted. */
.mx-card-title {
  margin: 0;
  color: var(--theme-ink-primary);
}

.mx-card-body {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: .75rem 0 0;
}

/* An entry with no title of its own sits directly under the section heading, which already
   supplies the separation. */
.mx-card > .mx-card-body:first-child { padding-top: 0; }

.mx-card-desc {
  margin: 0;
  max-width: var(--layout-measure-reading);
  color: var(--theme-ink-secondary);
}

.mx-card-desc a,
.mx-card-note a { color: var(--theme-ink-link); }

.mx-card-desc strong { color: var(--theme-ink-primary); }

/* Fine print: the qualification that travels with an entry. Flat, ruled on its leading edge, never
   a boxed warning — an unavailable or research metric is a state, not a failure. */
.mx-card-note {
  max-width: var(--layout-measure-reading);
  margin: 0;
  padding: 0 0 0 .7rem;
  border-left: 2px solid var(--theme-rule-standard);
  color: var(--theme-ink-muted);
}

.mx-card-note--warn { border-left-color: var(--theme-status-warning-ink); }

.mx-card-link {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--theme-ink-link);
  text-decoration: none;
}

.mx-card-link:hover { color: var(--theme-ink-link-hover); text-decoration: underline; }

.mx-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

/* ── Status stamps ───────────────────────────────────────────────────────────────────────────── */

/* The canonical status vocabulary of docs/design/contemporary-benchmark-programme.md section 8,
   rendered the way the record family renders it: a border, static type and the word itself. Colour
   is a second channel only — remove it entirely and every status is still readable, which is what
   the print rules below rely on. */
.mx-badge {
  display: inline-block;
  padding: .16rem .48rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.35;
}

.mx-badge-dot { display: none; }

/* LIVE and FROZEN are the two production registers, so both take the accent border and the
   positive ink. FROZEN replaces the former "Daily", which named a cadence where a status belonged
   and sat outside the published vocabulary. */
.mx-badge--live,
.mx-badge--bootstrap {
  color: var(--theme-status-neutral-ink);
  border-color: currentColor;
  background: var(--theme-status-neutral-surface);
}

/* Research beta: a published reading with quality gates. Dashed, so it can never be mistaken for a
   canonical stamp in a screenshot. */
.mx-badge--beta {
  color: var(--theme-ink-link);
  border-style: dashed;
  border-color: currentColor;
  background: transparent;
}

/* Research: a defined methodology and no public reading. */
.mx-badge--research {
  color: var(--theme-status-warning-ink);
  border-style: dashed;
  background: var(--theme-status-warning-surface);
}

/* Planned: named and scoped, no complete methodology. Deliberately the quietest register — a
   planned metric is not a broken one. */
.mx-badge--planned,
.mx-badge--context {
  color: var(--theme-status-neutral-ink);
  border-style: dotted;
  background: transparent;
}

/* Historical: superseded by a later version. Distinct from "planned" (not yet reached) even though
   both use muted ink — a historical candidate is not a future one. */
.mx-badge--historical {
  color: var(--theme-ink-muted);
  border-style: dotted;
  background: transparent;
}

/* ── Key/value registers ─────────────────────────────────────────────────────────────────────── */

/* The archive-coverage pattern from `/tape/history`: a label, a figure, a hairline. This is the
   page's principal quantitative device and replaces the former nested value panels. */
.mx-cv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.mx-cv-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem 1rem;
  min-width: 0;
  padding: .55rem 0;
  border-top: 1px solid var(--theme-rule-subtle);
  background: transparent;
}

.mx-cv-label {
  display: block;
  margin: 0;
  color: var(--theme-ink-muted);
  text-transform: uppercase;
}

/* The register rows are a <dl>, so the browser's default dd indent has to go or every figure sits
   40px in from its own rule. */
.mx-cv dt,
.mx-cv dd,
.meth-def-list dt,
.meth-def-list dd { margin-inline-start: 0; }

.mx-cv dd { margin: 0; }

.mx-cv-val {
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--theme-ink-primary);
  font-variant-numeric: tabular-nums lining-nums;
  overflow-wrap: anywhere;
}

.mx-cv-val--accent { color: var(--theme-ink-link); }

.mx-card-source {
  color: var(--theme-ink-muted);
  overflow-wrap: anywhere;
}

/* ── Formulas ────────────────────────────────────────────────────────────────────────────────── */

/* A formula is quoted material, so it is set on a rule like a quotation rather than inside a tinted
   chip. `white-space: normal` plus `overflow-wrap` is what keeps a long expression inside a 320px
   viewport instead of forcing the page sideways. */
.mx-card-formula,
.meth-formula-block {
  display: block;
  width: auto;
  max-width: var(--layout-measure-reading);
  margin: 0;
  padding: .5rem 0 .5rem .7rem;
  border: 0;
  border-left: 2px solid var(--theme-rule-strong);
  border-radius: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--theme-ink-primary);
  white-space: normal;
  overflow-wrap: anywhere;
}

.meth-formula-text {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--theme-ink-primary);
  overflow-wrap: anywhere;
}

.meth-formula-op { color: var(--theme-ink-primary); }

.meth-formula-note {
  margin: .4rem 0 0;
  color: var(--theme-ink-muted);
}

/* ── Source ledger ───────────────────────────────────────────────────────────────────────────── */

.meth-sources {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meth-source-row {
  padding: .85rem 0;
  border: 0;
  border-top: 1px solid var(--theme-rule-subtle);
  border-radius: 0;
  background: transparent;
}

.meth-source-name {
  font-family: var(--sans);
  font-weight: 650;
  color: var(--theme-ink-primary);
  overflow-wrap: anywhere;
}

.meth-source-name a { color: var(--theme-ink-link); }

.meth-source-detail {
  margin-top: .25rem;
  max-width: var(--layout-measure-reading);
  font-size: .88rem;
  line-height: 1.55;
  color: var(--theme-ink-secondary);
}

.meth-source-meta {
  margin-top: .35rem;
  color: var(--theme-ink-muted);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* ── Lists ───────────────────────────────────────────────────────────────────────────────────── */

.meth-limits {
  list-style: none;
  max-width: var(--layout-measure-reading);
  padding: 0;
  margin: 0;
}

.meth-limits > li {
  position: relative;
  padding: .55rem 0 .55rem 1rem;
  border-top: 1px solid var(--theme-rule-subtle);
  color: var(--theme-ink-secondary);
  font-size: .9rem;
  line-height: 1.6;
}

.meth-limits > li::before {
  content: '';
  position: absolute;
  top: 1.1rem;
  left: 0;
  width: .4rem;
  border-top: 1px solid var(--theme-rule-strong);
}

.meth-limits > li strong { color: var(--theme-ink-primary); }

.mx-data-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.mx-data-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--theme-ink-secondary);
  line-height: 1.55;
}

.mx-data-list li::before {
  content: '·';
  position: absolute;
  left: .25rem;
  color: var(--theme-ink-muted);
}

/* ── Signal method ───────────────────────────────────────────────────────────────────────────── */

.signal-method-steps,
.signal-method-ladder {
  list-style: none;
  margin: 0;
  padding: 0;
}

.signal-method-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.signal-method-steps li {
  padding: .7rem 0 0;
  border-top: 2px solid var(--theme-rule-strong);
  background: transparent;
}

.signal-method-steps strong,
.signal-method-steps span { display: block; }
.signal-method-steps strong { color: var(--theme-ink-primary); font-size: .85rem; font-weight: 650; }
.signal-method-steps span { margin-top: .25rem; color: var(--theme-ink-secondary); font-size: .8rem; line-height: 1.5; }

.signal-method-ladder-title {
  margin: 0 0 .55rem;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--theme-ink-secondary);
}

.signal-method-ladder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  counter-reset: signal-rule;
}

.signal-method-ladder li {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: 0 .5rem;
  padding: .6rem 0;
  border: 0;
  border-top: 1px solid var(--theme-rule-subtle);
  background: transparent;
  counter-increment: signal-rule;
}

.signal-method-ladder li::before {
  content: counter(signal-rule, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--theme-ink-muted);
  font-variant-numeric: tabular-nums;
}

.signal-method-ladder strong,
.signal-method-ladder span { grid-column: 2; display: block; }
.signal-method-ladder strong { color: var(--theme-ink-primary); font-size: .85rem; font-weight: 650; }
.signal-method-ladder span { margin-top: .1rem; color: var(--theme-ink-secondary); font-size: .8rem; line-height: 1.45; }

.signal-method-transition { margin-top: 1rem; }

/* ── Definition lists ────────────────────────────────────────────────────────────────────────── */

.meth-def-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  margin: 0;
}

.meth-def-list > div {
  padding: .8rem 0;
  border-top: 1px solid var(--theme-rule-subtle);
  min-width: 0;
}

.meth-def-list dt {
  font-family: var(--sans);
  font-weight: 650;
  color: var(--theme-ink-primary);
}

.meth-def-list dd {
  margin: .2rem 0 0;
  color: var(--theme-ink-secondary);
  font-size: .88rem;
  line-height: 1.6;
}

.meth-def-list dd a { color: var(--theme-ink-link); }

/* ── Citation ────────────────────────────────────────────────────────────────────────────────── */

.meth-citation {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem 1rem;
  max-width: var(--layout-measure-reading);
  padding: .8rem 0 .8rem .7rem;
  border: 0;
  border-left: 2px solid var(--theme-rule-standard);
  border-radius: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.6;
  color: var(--theme-ink-secondary);
  overflow-wrap: anywhere;
}

.meth-citation > span { min-width: 0; }

.meth-citation button {
  position: static;
  flex-shrink: 0;
  min-height: 2rem;
  padding: 0 .7rem;
  border: 1px solid var(--theme-rule-standard);
  border-radius: 3px;
  background: transparent;
  color: var(--theme-ink-link);
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.meth-citation button:hover { border-color: var(--theme-rule-focus); }

/* ── Boundary note ───────────────────────────────────────────────────────────────────────────── */

.mx-boundary {
  max-width: var(--layout-measure-reading);
  padding: .1rem 0 .1rem .8rem;
  border: 0;
  border-left: 2px solid var(--theme-rule-strong);
  border-radius: 0;
  background: transparent;
}

.mx-boundary-label {
  margin: 0 0 .35rem;
  color: var(--theme-ink-primary);
  text-transform: uppercase;
}

.mx-boundary p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--theme-ink-secondary);
}

.mx-boundary p a { color: var(--theme-ink-link); }

/* ── Tables ──────────────────────────────────────────────────────────────────────────────────── */

.meth-table-wrap,
.mx-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

/* The register's scroll container is focusable so the four fields past the fold are reachable by
   keyboard as well as by touch, and it is described by the instruction below rather than being
   given a role — a named region here would add a landmark to a page whose landmark set is asserted
   elsewhere. */
.mx-table-wrap:focus-visible {
  outline: 2px solid var(--theme-focus-ring);
  outline-offset: 2px;
}

/* The register is the one element on either route that scrolls sideways, and on a narrow screen its
   last three columns — source, cadence and frozen-record inclusion — sit entirely past the fold
   with nothing to suggest they exist. A line of ordinary type on the page's own rhythm: not a card,
   a pill, a badge, an icon or a callout.
 *
 * Hidden by default and revealed below the width at which the six columns stop fitting. The
 * register's natural width is 805px, so it overflows its container continuously from 320px and the
 * fit point measures at 869/870px — a boundary that moves by a sub-pixel with the scrollbar. The
 * rule is therefore bound to the 900px breakpoint the rest of this file already uses, erring on the
 * side of showing it: a redundant line above a table that just fits costs a reader nothing, whereas
 * a missing one above a table that scrolls hides three columns. Above 900px it never scrolls and
 * the instruction is never shown. It is excluded from print, where nothing scrolls. */
.mx-scroll-hint {
  display: none;
}

@media (max-width: 899.98px) {
  .mx-scroll-hint {
    display: block;
    max-width: var(--layout-measure-reading);
    margin: 0 0 .5rem;
    font-family: var(--sans);
    font-size: .8rem;
    line-height: 1.5;
    color: var(--theme-ink-muted);
  }
}

.meth-table,
.mx-layer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}

.meth-table th,
.meth-table td,
.mx-layer-table th,
.mx-layer-table td {
  text-align: left;
  vertical-align: top;
  padding: .65rem 1.25rem .65rem 0;
  border-bottom: 1px solid var(--theme-rule-subtle);
  line-height: 1.5;
}

.meth-table thead th,
.mx-layer-table thead th {
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--theme-ink-muted);
  border-bottom: 1px solid var(--theme-rule-standard);
  white-space: nowrap;
}

.meth-table tbody td,
.mx-layer-table tbody td { color: var(--theme-ink-secondary); }

.meth-table tbody td:first-child,
.mx-layer-table .mx-lt-product {
  color: var(--theme-ink-primary);
  font-weight: 650;
}

/* The register's benchmark names are links to the surfaces they describe. They used to be painted
   with the surrounding ink and no underline, which made a whole column of destinations
   indistinguishable from plain text. */
.mx-layer-table .mx-lt-product a {
  color: var(--theme-ink-link);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.mx-layer-table .mx-lt-product a:hover { color: var(--theme-ink-link-hover); }

.mx-layer-table .mx-lt-frozen,
.mx-layer-table .mx-lt-cadence {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--theme-ink-secondary);
  white-space: nowrap;
}

.mx-layer-table td.mx-lt-status { white-space: nowrap; }

/* The metric name is the row's handle: it never wraps mid-word, and it holds a column wide enough
   to stay one or two lines at every width the table is scrolled to. */
.mx-layer-table .mx-lt-product {
  min-width: 9.5rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.mx-layer-note {
  max-width: var(--layout-measure-reading);
  margin-top: 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-ink-secondary);
}

.mx-layer-note a { color: var(--theme-ink-link); }

/* ── Lens grid (supply comparisons, supporting layers, roadmap) ──────────────────────────────── */

.mx-lenses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 2.5rem;
}

.mx-lens {
  min-width: 0;
  padding: .9rem 0 1.1rem;
  border: 0;
  border-top: 1px solid var(--theme-rule-subtle);
  border-radius: 0;
  background: transparent;
}

.mx-lens-label {
  margin: 0 0 .4rem;
  color: var(--theme-ink-muted);
  text-transform: uppercase;
}

/* Held below the section heading's 12.48px (.78rem) so the guard in
   scripts/test-contrast-accessibility.mjs — "Metrics formula remains subordinate to its section
   heading" — stays true, and so a formula never competes with the structure around it. */
.mx-lens-formula {
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--theme-ink-secondary);
  overflow-wrap: anywhere;
}

.mx-lens-formula > span { color: var(--theme-ink-muted); }

.mx-lens-source {
  margin-top: .45rem;
  color: var(--theme-ink-muted);
  overflow-wrap: anywhere;
}

.mx-lenses-note {
  max-width: var(--layout-measure-reading);
  margin-top: 1.1rem;
  color: var(--theme-ink-muted);
}

/* ── Unavailable states ──────────────────────────────────────────────────────────────────────── */

/* An unavailable input states its reason in words on a dotted rule. It is deliberately not a
   red-edged alert: nothing here has failed, the data contract simply does not exist yet. */
.mx-unavail {
  max-width: var(--layout-measure-reading);
  padding: .1rem 0 .1rem .8rem;
  border: 0;
  border-left: 2px dotted var(--theme-rule-standard);
  border-radius: 0;
  background: transparent;
  color: var(--theme-ink-muted);
}

.mx-unavail strong { color: var(--theme-ink-secondary); font-weight: 650; }

.mx-active-grid,
.mx-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
}

.mx-active-half {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-width: 0;
  padding: .9rem 0 0;
  border-top: 1px solid var(--theme-rule-subtle);
}

.mx-active-label {
  color: var(--theme-ink-muted);
  text-transform: uppercase;
}

.mx-provider-list {
  color: var(--theme-ink-secondary);
  line-height: 1.7;
}

/* ── Velocity readout ────────────────────────────────────────────────────────────────────────── */

.mx-velocity-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 0 2.5rem;
  align-items: start;
}

.mx-velocity-readout {
  min-height: 0;
  padding: .9rem 0 0;
  border: 0;
  border-top: 1px solid var(--theme-rule-subtle);
  border-radius: 0;
  background: transparent;
}

.mx-velocity-kicker {
  margin: 0 0 .3rem;
  color: var(--theme-ink-muted);
  text-transform: uppercase;
}

/* A research-beta figure must never be the loudest number on a page that also carries the
   production benchmark. It was set at up to 76px in a serif display face — larger than anything on
   the ODS entry above it — which is exactly the screenshot-confusion failure the design programme
   bans. It is now a mono figure at subsection scale: legible, precise, and plainly subordinate. */
.mx-velocity-value {
  font-family: var(--mono);
  font-size: var(--type-subsection-title-size);
  font-weight: 500;
  line-height: 1.2;
  color: var(--theme-ink-primary);
  font-variant-numeric: tabular-nums lining-nums;
}

.mx-velocity-label {
  margin-top: .25rem;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--theme-ink-muted);
}

.mx-velocity-line {
  margin: .7rem 0 0;
  max-width: var(--layout-measure-reading);
  font-size: .9rem;
  line-height: 1.55;
  color: var(--theme-ink-secondary);
}

.mx-velocity-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.mx-velocity-fact {
  min-width: 0;
  padding: .55rem 0;
  border-top: 1px solid var(--theme-rule-subtle);
  background: transparent;
}

.mx-velocity-fact--wide { grid-column: 1 / -1; }

.mx-velocity-fact-label {
  display: block;
  margin-bottom: .2rem;
  color: var(--theme-ink-muted);
  text-transform: uppercase;
}

.mx-velocity-fact-value {
  display: block;
  color: var(--theme-ink-secondary);
  font-variant-numeric: tabular-nums lining-nums;
  overflow-wrap: anywhere;
}

/* Both of these carried a hard-coded pale mint (rgba(167,243,208,.72)) that the page's dark-only
   card scoping never re-themed, so on paper they measured 1.10:1 — a plain WCAG AA failure for the
   one sentence that tells a reader the figure above is not production. */
.mx-velocity-provenance,
.mx-velocity-beta-note {
  font-family: var(--mono);
  color: var(--theme-ink-muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mx-velocity-beta-note { color: var(--theme-status-warning-ink); }

/* ── Links and focus ─────────────────────────────────────────────────────────────────────────── */

/* Only the elements that actually carry unbreakable strings — routes, hashes, series identifiers,
   formulas and source names — are allowed to break inside a word. A blanket rule on every link
   fractured ordinary metric names down the middle of the word in the narrow register column. */
.mx-page a:focus-visible,
.mx-page button:focus-visible,
.mx-hero a:focus-visible {
  outline: 2px solid var(--theme-focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.mx-page code {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

/* ── Responsive ──────────────────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .signal-method-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .mx-lenses { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
  .mx-velocity-module { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

@media (max-width: 640px) {
  /* Deliberate mobile recomposition rather than a squeeze: every paired grid becomes one ruled
     column, so each row keeps its full label and figure instead of wrapping into a narrow well. */
  .mx-cv,
  .meth-def-list,
  .signal-method-steps,
  .signal-method-ladder,
  .mx-lenses,
  .mx-active-grid,
  .mx-flow-grid,
  .mx-velocity-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .mx-cv-cell {
    display: block;
  }

  .mx-cv-cell .mx-cv-val { margin-top: .15rem; }

  .mx-velocity-fact--wide { grid-column: auto; }

  .meth-citation { flex-direction: column; }

  /* The register is genuinely wide. It scrolls inside its own container rather than pushing the
     document sideways, and the guard below asserts the document itself never overflows. The width
     is set so every column stays usable when scrolled, rather than compressing the metric name
     into a two-character ribbon. */
  .mx-layer-table { min-width: 54rem; }

  .signal-method-steps li { border-top-width: 1px; }
}

/* ── Print ───────────────────────────────────────────────────────────────────────────────────── */

/* Neither route had any print treatment at all, so a printed copy carried the fixed navigation, the
   theme selector, the signup form and the footer, and lost every destination. The rules below
   mirror css/tape-history.css and css/tape-record.css: the chrome and the controls go, the
   document stays, and the routes that make a claim checkable are printed beside their text. */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
  }

  nav.nav,
  .nav-overlay,
  .site-footer,
  .signup-block,
  .skip-link,
  form,
  button,
  select,
  /* Paper does not scroll. */
  .mx-scroll-hint {
    display: none !important;
  }

  .mx-page {
    max-width: none;
    padding: 0;
  }

  .mx-hero { padding: 0; }

  .mx-hero-inner { border-top-width: 2pt; }

  .mx-hero-title { font-size: 22pt; }

  .mx-section {
    margin-top: 1.4rem;
    padding-top: .9rem;
    break-inside: auto;
    page-break-inside: auto;
  }

  .mx-card,
  .mx-cv-cell,
  .mx-lens,
  .meth-source-row,
  .meth-def-list > div,
  .meth-limits > li,
  .mx-velocity-fact,
  .signal-method-ladder li,
  .mx-layer-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Status survives the loss of colour: the border style already distinguishes the registers, and
     the word is printed regardless. */
  .mx-badge {
    color: #000 !important;
    border-color: #000 !important;
    background: transparent !important;
  }

  .mx-card-formula,
  .meth-formula-block,
  .mx-boundary,
  .mx-card-note,
  .mx-unavail,
  .meth-citation {
    border-left-color: #666 !important;
    background: transparent !important;
  }

  .meth-table-wrap,
  .mx-table-wrap { overflow: visible; }

  .mx-layer-table { min-width: 0; font-size: 8pt; }

  /* Useful destinations survive the loss of the link. `text-transform: none` matters: several of
     these links are set in uppercase, and a printed route a reader cannot retype is not a
     destination. */
  .mx-page a[href^="/"]::after,
  .mx-page a[href^="http"]::after {
    content: ' (' attr(href) ')';
    font-family: var(--mono);
    font-size: 8pt;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #444;
    overflow-wrap: anywhere;
  }

  /* The citation already prints its own URL; do not print it twice. */
  .meth-citation a::after { content: '' !important; }
}

/* Disclosure controls.
   The threshold tables, the numerator classification and the glossary are audit trail rather than
   reading flow. They stay on the page in full, one control away, so the section states its rule and
   the reader opens the machinery. The summary is a real control: it carries a visible focus ring and
   a hit area that clears 44px, because it is the only way into content that is otherwise unreachable
   without a pointer. */
.mx-disclosure {
  border-top: 1px solid var(--theme-rule-subtle);
}

.mx-disclosure-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .75rem;
  min-height: 44px;
  padding: .85rem 1.75rem .85rem 0;
  position: relative;
  cursor: pointer;
  list-style: none;
}

.mx-disclosure-summary::-webkit-details-marker { display: none; }

.mx-disclosure-summary:focus-visible {
  outline: 2px solid var(--theme-rule-focus);
  outline-offset: 2px;
}

/* The marker is drawn rather than inherited so it reads the same in both themes and does not
   depend on a platform glyph that changes size between browsers. */
.mx-disclosure-summary::after {
  content: '';
  position: absolute;
  right: .35rem;
  top: 1.35rem;
  width: .5rem;
  height: .5rem;
  border-right: 1.5px solid var(--theme-ink-muted);
  border-bottom: 1.5px solid var(--theme-ink-muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
}

.mx-disclosure[open] > .mx-disclosure-summary::after {
  transform: rotate(-135deg);
}

.mx-disclosure-title {
  font-family: var(--sans);
  font-size: var(--type-subsection-title-size);
  font-weight: 500;
  color: var(--theme-ink-primary);
}

.mx-disclosure-hint {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--theme-ink-muted);
}

.mx-disclosure-body {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 0 0 .5rem;
}

.mx-disclosure > .mx-card-body,
.mx-disclosure > .meth-def-list {
  padding-bottom: .5rem;
}

/* Inside a section that has no card frame of its own, the control supplies the only rule. */
.mx-disclosure--bare {
  border-top: 1px solid var(--theme-rule-standard);
  border-bottom: 1px solid var(--theme-rule-standard);
}

@media print {
  /* Nothing is hidden on paper. A printed methodology is the whole methodology. */
  .mx-disclosure > *:not(.mx-disclosure-summary) { display: block !important; }
  .mx-disclosure-summary::after { display: none; }
}

/* A deep link into a disclosure lands on the element that carries the address, and the nav is
   sticky. The allowance lives here rather than in the script so the nav height stays in one place. */
[data-disclosure-target],
.mx-disclosure {
  scroll-margin-top: 5rem;
}

/* ---- Methodology: chapter sections as closed disclosures --------------------------------
 *
 * The page reads as six short chapter summaries; each section beneath a chapter is a closed
 * disclosure that opens on demand. The disclosure itself is `.ref-disclose` from reference.css,
 * which /how-signals-work already uses and this page already loads, so nothing new is introduced
 * here. These two rules only let the section keep its real <h3> inside the summary: the heading
 * has to survive for document outline and heading navigation, and it has to inherit the summary's
 * type rather than fight it.
 */

.mx-disclose-title {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

.mx-disclose-lede {
  margin: 0 0 1rem;
  color: var(--theme-ink-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* The operating status in the Methodology hero. Two sentences a reader must not have to hunt for,
   set as a bordered aside in the same restrained treatment .mx-card-note already uses on this page
   rather than as a coloured alert: the facts are the emphasis, not the box. */

.mx-hero-state {
  margin: 1.4rem 0 0;
  max-width: 46rem;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--theme-rule-strong);
}

.mx-hero-state-line {
  margin: 0 0 0.5rem;
  color: var(--theme-ink-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.mx-hero-state-line:last-child { margin-bottom: 0; }
.mx-hero-state-line strong { color: var(--theme-ink-primary); }

/* ---- spacing once the sections are folded ------------------------------------------------
 *
 * .mx-section's rhythm was set for an expanded card: a large top margin plus 1.4rem of padding
 * before content that was always several paragraphs deep. Collapsed, that same rhythm draws a run
 * of single-line toggles separated by tall empty bands, which reads as a broken layout rather than
 * a list. A folded section keeps the rule that separates it and gives up the air that was there to
 * introduce a card.
 *
 * .ref-disclose brings its own border-top, so the section's border is dropped where a fold carries
 * one; two rules a pixel apart is the seam this avoids.
 */

.mx-section:has(> .mx-disclose) {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.mx-section > .mx-disclose { margin-top: 0; }

/* A chapter lead is now sometimes two paragraphs: the operating status, then the explanation. They
   were set as one block with no margin, so the two ran together into a single wall. */
.mx-chapter-lead + .mx-chapter-lead { margin-top: 0.85rem; }

/* ---- Methodology: making a folded section legible while still folded ----------------------
 *
 * The fold above did its job on length: with all 24 sections closed the page is 7.4 screens on a
 * 390px viewport. What it cost was the surface. Every closed section rendered as the same bare
 * uppercase mono row on a hairline, so a reader scanning the page saw 24 typographically identical
 * toggles and no way to tell the current v7 principle from a terminology footnote. That sameness,
 * not the length, is what reads as neglect.
 *
 * Nothing here adds a claim or a word. Each section already carries a one-line .mx-disclose-lede
 * written for exactly this purpose, and three sections already carry a status badge. Both were
 * sealed inside the closed disclosure where a scanning reader could never reach them. These rules
 * lift the existing lede onto the summary row and let the existing status vocabulary show while
 * closed, so the fold keeps its length and gets its hierarchy back.
 */

/* The row becomes a two-line block rather than a single line of small caps: the title in page ink
   at reading weight, the existing lede underneath it in secondary. The uppercase mono treatment
   .ref-disclose sets for the whole summary is therefore released here and re-asserted only on the
   parts that should keep it. */
details.mx-disclose > summary {
  flex-wrap: wrap;
  align-items: start;
  gap: 0 .9rem;
  padding: .7rem 0;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
}

/* The title resolves the shared subsection role rather than inheriting the summary's mono caps, so
   a section heading here is set at the same scale as one on /how-signals-work. */
details.mx-disclose > summary > .mx-disclose-title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--serif-display, var(--serif));
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--theme-ink-primary);
}

/* The summary preview: the section's own lede, shown while closed and hidden once the section is
   open, because the open body prints the same sentence as its first paragraph. Duplicating it on
   screen would read as a stutter, so only one of the two is ever visible. */
details.mx-disclose > summary > .mx-disclose-preview {
  flex: 1 1 100%;
  max-width: var(--layout-measure-reading);
  margin: .3rem 0 0;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
  text-transform: none;
  color: var(--theme-ink-secondary);

  /* A preview earns its place only while it stays a preview. Some of these ledes run to three
     sentences, and at 390px an unclamped run of 17 of them added 2.2 screens to the page, which
     would have traded the fold's whole gain for it. Two lines is enough to say what a section
     covers; the full sentence is one tap away and is never the only copy of itself.
     The clamp is declared on an inner box because a direct flex item blockifies -webkit-box to
     flow-root and silently drops the clamp; max-height is the fallback that survives that. */
  max-height: calc(.88rem * 1.55 * 2);
  overflow: hidden;
}

details.mx-disclose[open] > summary > .mx-disclose-preview { display: none; }

/* Status, shown on the closed row. .mx-badge is the page's existing status vocabulary and the same
   three values already sit inside these sections; this only makes them visible before the section
   is opened.
   Size is deliberately NOT set here. The LABEL FLOOR rule in css/tokens.css pins .mx-badge to the
   11px compact-label role, which is the constitution section J floor for essential text, and an
   earlier draft of this rule shrank it to 9.28px and broke that floor. A status word is essential
   text, so the badge keeps the shared role and only its placement is set here. */
details.mx-disclose > summary > .mx-badge {
  flex: 0 0 auto;
  align-self: center;
}

/* Legacy sections. The owner's requirement is that v5 and v6 stop dominating while every word stays
   reachable, so they are not moved and not cut: they keep their position and their full contents,
   and recede by weight alone. The title drops to secondary ink and the preview to muted, which is
   enough to separate them from the current material above without hiding anything. */
details.mx-disclose--legacy > summary > .mx-disclose-title { color: var(--theme-ink-secondary); }
details.mx-disclose--legacy > summary > .mx-disclose-preview { color: var(--theme-ink-muted); }

/* The focus ring. .ref-disclose's own ring is scoped to .ref-page, which this page does not use, so
   these 24 controls fell back to the UA outline: 1px of near-black that all but disappears against
   dark-theme ink. This restores the same ring the rest of the page already draws on links and
   buttons, which is a fix to an existing gap rather than a new treatment. */
details.mx-disclose > summary:focus-visible {
  outline: 2px solid var(--theme-rule-focus, var(--theme-ink-link));
  outline-offset: 3px;
}

/* The +/- affordance sits beside the title rather than centred against a now-two-line row. */
details.mx-disclose > summary::after {
  order: 3;
  align-self: center;
  flex: 0 0 auto;
}

@media (min-width: 900px) {
  /* On the wide viewport the preview moves out from under the title into the space the row already
     had spare, so a scanning reader gets title and description on one line. */
  details.mx-disclose > summary { flex-wrap: nowrap; }

  details.mx-disclose > summary > .mx-disclose-title { flex: 0 0 19rem; }

  details.mx-disclose > summary > .mx-disclose-preview {
    flex: 1 1 auto;
    margin-top: 0;
    align-self: center;
  }
}

@media print {
  /* Paper carries the whole methodology, so the preview never suppresses itself there. */
  details.mx-disclose[open] > summary > .mx-disclose-preview { display: block !important; }
}
