/* =============================================================
   VICEROY COMMERCE LLC — styles.css
   Managed e-commerce operations.
   Plain CSS. No build step, no dependencies, no framework.
   -------------------------------------------------------------
   DESIGN THESIS
   The brief was "multimillion dollar company". That is not
   achieved with more motion, more glow, or more gradient. It is
   achieved with restraint: hairlines instead of borders, a single
   metal accent used as a detail rather than a fill, editorial
   serif display type against a neutral grotesque, real data set
   in mono, and a great deal of empty space held with discipline.
   Selltrix is a dark agency page with orange orbs. This is
   deliberately the opposite register — a merchant bank that
   happens to run marketplace accounts.
   -------------------------------------------------------------
   REBRANDING THIS FILE
   Everything keys off section 1. When the real Viceroy logo
   lands, change --accent (and optionally --accent-soft /
   --accent-deep) and the entire site retunes. Nothing else in
   this stylesheet hardcodes a brand colour.
   -------------------------------------------------------------
    1. Tokens              9. Process / phases
    2. Reset + base       10. Tables + spec lists
    3. Layout + rhythm    11. Accordion / FAQ
    4. Typography         12. Forms
    5. Buttons + links    13. Placeholder + disclaimer
    6. Header + nav       14. Footer
    7. Cards + panels     15. Motion + responsive
    8. Figures + data
   ============================================================= */

/* ================= 1. TOKENS ================= */
:root {
  /* --- BRAND — sampled directly from the Viceroy pitch deck --- */
  --accent:       #c9b896;             /* champagne — a detail colour, never a large fill */
  --accent-soft:  #ddd0b4;
  --accent-deep:  #8c7b55;
  --accent-wash:  rgba(201, 184, 150, 0.10);
  --accent-line:  rgba(201, 184, 150, 0.34);

  /* --- ground --- */
  --ink:        #0a0a0a;
  --ink-2:      #0e0e0f;
  --ink-3:      #131315;
  --surface:    rgba(255, 255, 255, 0.028);
  --surface-2:  rgba(255, 255, 255, 0.055);
  --surface-3:  rgba(255, 255, 255, 0.085);

  /* --- hairlines: the primary structural device --- */
  --line:       rgba(255, 255, 255, 0.11);
  --line-soft:  rgba(255, 255, 255, 0.065);
  --line-faint: rgba(255, 255, 255, 0.035);

  /* --- type colour — deck values --- */
  --paper:      #f1eee8;               /* warm white, headlines */
  --text:       #e3e0da;
  --text-dim:   #9a9ca3;
  /* --muted is the quietest colour any text may use. The ground under it is
     not #0a0a0a once the grain and the top light are drawn: measured on the
     rendered page it runs from about #171717 to #1f2021, and a little lighter
     inside cards and bands. #8c8f98 keeps 4.5:1 (WCAG AA) on all of it; the
     old #6e717a gave 3.6:1. */
  --muted:      #8c8f98;
  /* decoration only (the moving strip of marketplace names, whose words the
     page also says in text, and the menu's 01 to 04): never for words a
     reader needs */
  --muted-deep: #55585f;
  /* the edge of a form field or tick box: 3:1 against the field and the
     ground around it (WCAG 1.4.11), so a field can be seen before it is used */
  --control-line: #75787f;

  /* --- radii: small. Sharp corners read institutional. --- */
  --r-xs: 2px;
  --r-sm: 4px;
  --r:    6px;
  --r-lg: 10px;

  /* --- depth: used sparingly and never coloured --- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:    0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.62);

  /* --- metrics --- */
  --maxw:      1200px;
  --maxw-text: 730px;
  --gutter:    28px;
  --header-h:  74px;

  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Type matched to the pitch deck, which sets Garamond against Century Gothic.
     Neither is a web font, so these are the faithful equivalents:
       EB Garamond — a direct digitisation of Garamond
       Jost        — geometric sans in the Futura / Century Gothic line
     JetBrains Mono is kept only for figures and data labels. */
  --font-display: "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;
  --font-sans:    "Jost", "Century Gothic", Questrial, -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  /* film grain, inlined so there is no extra request. Drives .ground::after. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================= 2. RESET + BASE ================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  /* Jost has a large x-height and wide geometric forms, so body copy wants a
     slightly smaller size and more leading than a humanist sans would. */
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.004em;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 0; }

::selection { background: rgba(200, 169, 106, 0.30); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 300;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.9rem;
}
.skip-link:focus { left: 16px; }
/* the skip link moves focus to <main tabindex="-1">; main is not a control,
   so it takes focus without drawing a ring around the whole page */
main[tabindex="-1"]:focus { outline: none; }

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

/* The request form's spam trap (apply.html): off the page and out of reach,
   but never display:none alone, which some scripts read as "skip this one".
   Screen readers skip it by its aria-hidden, the keyboard by inert. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* --- page ground: a quiet vertical fall of light, plus film grain.
   No orbs, no colour blooms. Richness comes from texture, not hue. --- */
.ground {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 78% at 50% -12%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #0c0e10 0%, var(--ink) 46%, #08090a 100%);
}
.ground::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  background-image: var(--grain);
}

/* ================= 3. LAYOUT + RHYTHM ================= */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container.narrow { max-width: 880px; }
.container.text   { max-width: var(--maxw-text); }

.section { padding: 108px 0; position: relative; }
.section.tight  { padding: 74px 0; }
.section.pad-lg { padding: 134px 0; }

/* a band is separated by hairlines, not a colour slab —
   the ground gradient continues through it */
.band {
  border-top: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
  background: rgba(255, 255, 255, 0.013);
}
.band-top    { border-top: 1px solid var(--line-faint); }
.band-bottom { border-bottom: 1px solid var(--line-faint); }

.section-head { max-width: 770px; margin: 0 0 58px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin: 18px 0 20px; }
.section-head p  { color: var(--text-dim); font-size: 1.07rem; }

/* section index — the 01 / 02 / 03 editorial device */
.index-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 16px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line-soft);
}
.index-row .idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  flex: none;
}
.index-row .idx-label {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.stack-sm > * + * { margin-top: 12px; }
.stack    > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 34px; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-1  { gap: 1px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 70px;
  align-items: start;
}
.split.lean   { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split.lean-r { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.center { align-items: center; }

.sticky-col { position: sticky; top: calc(var(--header-h) + 44px); }

/* ================= 4. TYPOGRAPHY ================= */
h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.018em;
  color: var(--paper);
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.55rem, 5.5vw, 4.3rem); }
h2 { font-size: clamp(1.95rem, 3.5vw, 2.85rem); }

h3, h4, h5 {
  font-family: var(--font-sans);
  color: var(--paper);
  letter-spacing: -0.012em;
  line-height: 1.3;
}
h3 { font-size: 1.22rem; font-weight: 600; }
h4 { font-size: 1.01rem; font-weight: 600; }
h5 { font-size: 0.91rem; font-weight: 600; }

/* Heading levels follow the page outline (h1, then h2, then h3, never a
   skipped level). Where a heading sits higher in the outline than it looks,
   these keep its look: an h2 with .as-h4 reads exactly like an h4. */
.as-h3, .as-h4 {
  font-family: var(--font-sans);
  color: var(--paper);
  letter-spacing: -0.012em;
  line-height: 1.3;
  font-weight: 600;
}
.as-h3 { font-size: 1.22rem; }
.as-h4 { font-size: 1.01rem; }

/* italic serif accent — one or two per page, never more */
.accent-italic {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.lede {
  font-size: clamp(1.09rem, 1.7vw, 1.27rem);
  line-height: 1.6;
  color: var(--text-dim);
  font-weight: 380;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-line);
  flex: none;
}
.eyebrow.bare::before { display: none; }
.eyebrow.dim { color: var(--muted); }
.eyebrow.dim::before { background: var(--line); }

.small  { font-size: 0.9rem; }
.tiny   { font-size: 0.8rem; }
.dim    { color: var(--text-dim); }
.muted  { color: var(--muted); }
.paper-c{ color: var(--paper); }
.accent-c { color: var(--accent); }
.mono   { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.upper  { text-transform: uppercase; letter-spacing: 0.16em; }
.balance{ text-wrap: balance; }
.pretty { text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

.prose p + p { margin-top: 1.05em; }
.prose h3, .prose .as-h3 { margin: 2.2em 0 0.7em; }
.prose h4 { margin: 1.8em 0 0.5em; }
.prose ul { margin: 1em 0; }
.prose li { position: relative; padding-left: 22px; margin-bottom: 0.55em; color: var(--text-dim); }
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 7px; height: 1px;
  background: var(--accent);
}
.prose strong { color: var(--paper); font-weight: 600; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--accent-soft); }

blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.2vw, 1.7rem);
  line-height: 1.42;
  color: var(--paper);
  letter-spacing: -0.012em;
}

/* ================= 5. BUTTONS + LINKS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.93rem;
  font-weight: 550;
  letter-spacing: -0.006em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }

/* primary is paper on ink. High contrast reads more expensive than a coloured fill. */
.btn-primary { background: var(--paper); color: #0a0b0c; font-weight: 600; }
.btn-primary:hover { background: #ffffff; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--surface-3); background: var(--surface); color: var(--paper); }

.btn-accent { background: transparent; color: var(--accent); border-color: var(--accent-line); }
.btn-accent:hover { background: var(--accent-wash); border-color: var(--accent); }

.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.855rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* text link with a travelling underline */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  font-weight: 500;
  font-size: 0.93rem;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease), gap 0.22s var(--ease);
}
.link:hover { border-color: var(--accent); color: var(--accent); gap: 12px; }
.link .arw { transition: transform 0.22s var(--ease); }
.link:hover .arw { transform: translateX(2px); }

.link-quiet { color: var(--text-dim); border-bottom-color: transparent; }
.link-quiet:hover { color: var(--paper); border-bottom-color: var(--line); }

/* ================= 6. HEADER + NAV ================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  /* solid, and the same colour as the theme-color meta: phone browsers tint the
     strip above the page from it, so the strip and the header always match */
  background: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line-soft);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

/* --- BRAND LOCKUP — real artwork.
   The supplied horizontal lockup has a tall crown against a short, wide
   wordmark (mark 0.48 aspect, wordmark 9.36). Scaled as one image to fit a
   header bar the wordmark lands at about 5px tall and is unreadable, so the
   two are placed separately and sized independently.
   The wordmark is the genuine artwork rather than type set to resemble it:
   wordmark-white.png is the exact crop of logo-horizontal-white.png
   (image 2400x1298, wordmark at x730 y563, 1629x174), saved at 431x46 so
   the header loads 7 KB instead of the whole 85 KB lockup. --- */
.brand { display: inline-flex; align-items: center; gap: 13px; flex: none; }

.brand-mark {
  height: 32px;
  width: auto;
  flex: none;
  display: block;
}

.brand-word {
  display: block;
  flex: none;
  --bw: 122px;
  width: var(--bw);
  height: calc(var(--bw) / 9.362);
  background-image: url("../assets/brand/wordmark-white.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* full stacked lockup, used in the footer where there is room for it */
.brand-lockup { width: 158px; height: auto; display: block; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 9px 13px;
  font-size: 0.905rem;
  font-weight: 450;
  color: var(--text-dim);
  border-radius: var(--r-sm);
  transition: color 0.2s var(--ease);
}
.nav a:hover { color: var(--paper); }
.nav a.is-current { color: var(--paper); }
.nav a.is-current::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 1px;
  background: var(--accent);
}

.header-cta { display: flex; align-items: center; gap: 12px; flex: none; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 17px; height: 1.5px; background: var(--paper); position: relative; transition: background 0.2s var(--ease); }
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute; left: 0;
  width: 17px; height: 1.5px;
  background: var(--paper);
  transition: transform 0.26s var(--ease);
}
.nav-toggle span::before { top: -5.5px; }
.nav-toggle span::after  { top: 5.5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: rgba(8, 9, 10, 0.975);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px var(--gutter) 44px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 2px;
  font-size: 1.14rem;
  color: var(--text);
  border-bottom: 1px solid var(--line-faint);
}
.mobile-nav a .n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted-deep); }
.mobile-nav a.is-current { color: var(--accent); }
.mobile-nav .btn { margin-top: 28px; }
/* the menu’s link rule above outranks .btn-primary, so the button takes its own look back */
.mobile-nav a.btn { justify-content: center; padding: 15px 26px; font-size: 1rem; border-bottom: 0; }
.mobile-nav a.btn-primary { color: #0a0b0c; }
body.nav-open { overflow: hidden; }

/* ================= 7. CARDS + PANELS ================= */
.card {
  position: relative;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.card:hover { border-color: var(--line); background: var(--surface-2); }
.card h3 { margin-bottom: 10px; }
.card p  { color: var(--text-dim); font-size: 0.95rem; }
.card.flat:hover { border-color: var(--line-soft); background: var(--surface); }
.card.pad-sm { padding: 24px; }
.card.pad-lg { padding: 40px; }

/* hairline grid — cells divided by rules rather than gaps.
   Reads like a printed table; very hard to make look cheap. */
.rule-grid {
  display: grid;
  border: 1px solid var(--line-faint);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--line-faint);
  gap: 1px;
}
.rule-grid > * {
  background: var(--ink);
  padding: 34px 30px;
  transition: background 0.25s var(--ease);
}
.rule-grid > *:hover { background: var(--ink-2); }
.rule-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rule-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rule-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rule-grid.quiet > *:hover { background: var(--ink); }

.panel {
  padding: 40px;
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
}
.panel-accent {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-wash) 0%, rgba(255, 255, 255, 0.014) 100%);
}

/* small mark used at the head of a card */
.card-mark {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  color: var(--accent);
  margin-bottom: 20px;
}
.card-mark svg { width: 17px; height: 17px; }

/* numbered marker */
.num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.chip-accent { border-color: var(--accent-line); color: var(--accent); }
.chip-dot::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* live status dot */
.pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  position: relative;
  flex: none;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.4);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ================= 8. FIGURES + DATA ================= */
/* Figures are set in mono and framed by rules. Every figure on
   this site must be a real, defensible number — see README. */
.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.figures.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figure {
  padding: 30px 26px;
  border-left: 1px solid var(--line-faint);
}
.figure:first-child { border-left: 0; }
.figure .val {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.figure .val .unit { color: var(--accent); font-size: 0.5em; vertical-align: super; margin-left: 2px; }
.figure .lbl {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

/* inline key/value pair */
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line-faint); }
.kv:last-child { border-bottom: 0; }
.kv dt { font-size: 0.9rem; color: var(--muted); }
.kv dd { margin: 0; font-size: 0.93rem; color: var(--paper); font-weight: 500; text-align: right; }
.kv dd.mono { font-family: var(--font-mono); font-size: 0.86rem; }

/* ================= 9. PROCESS / PHASES ================= */
.phases { border-top: 1px solid var(--line-soft); }
.phase {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.phase .phase-n {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 5px;
}
.phase h3 { margin-bottom: 8px; }
.phase .phase-when {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.phase .phase-body { color: var(--text-dim); font-size: 0.95rem; }
.phase ul { margin-top: 14px; }
.phase li { position: relative; padding-left: 20px; margin-bottom: 7px; font-size: 0.91rem; color: var(--text-dim); }
.phase li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.66em;
  width: 6px; height: 1px;
  background: var(--accent);
}

/* two-column responsibility split */
.raci { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-faint); border: 1px solid var(--line-faint); border-radius: var(--r); overflow: hidden; }
.raci > div { background: var(--ink); padding: 30px 28px; }
.raci h3, .raci h4 { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.raci ul li { position: relative; padding-left: 22px; margin-bottom: 9px; font-size: 0.91rem; color: var(--text-dim); }
.raci ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
}
.raci .them ul li::before { border-color: var(--line); }

/* ================= 10. TABLES + SPEC LISTS ================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-faint); border-radius: var(--r); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
  min-width: 560px;
}
table.data th,
table.data td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line-faint);
  vertical-align: top;
}
table.data thead th {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  background: var(--surface);
  white-space: nowrap;
}
table.data tbody tr:last-child td,
table.data tbody tr:last-child th { border-bottom: 0; }
table.data tbody tr:hover td,
table.data tbody tr:hover th { background: rgba(255, 255, 255, 0.018); }
/* .k is the row's own name, marked up as a row header (th scope="row") */
table.data .k { color: var(--paper); font-weight: 500; white-space: nowrap; }
table.data td { color: var(--text-dim); }
table.data td .mono { font-size: 0.85rem; }

/* spec list — label above, hairline below */
.specs { border-top: 1px solid var(--line-soft); }
.spec {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-faint);
}
.spec dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.spec dd { margin: 0; color: var(--text-dim); font-size: 0.95rem; }
.spec dd strong { color: var(--paper); font-weight: 600; }

/* ================= 11. ACCORDION / FAQ ================= */
.faq { border-top: 1px solid var(--line-soft); }
.faq-item { border-bottom: 1px solid var(--line-soft); }
/* Each question is a heading (h3) holding its button, and each group's label
   an h2, so the page has an outline. Neither changes how anything looks. */
.faq-h { margin: 0; font: inherit; letter-spacing: inherit; color: inherit; }
.index-row h2.idx-label { margin: 0; font-weight: inherit; line-height: inherit; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.42;
  transition: color 0.2s var(--ease);
}
.faq-q:hover { color: var(--accent); }
.faq-icon {
  flex: none;
  width: 20px; height: 20px;
  position: relative;
  margin-top: 4px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.faq-icon::before { width: 13px; height: 1.5px; }
.faq-icon::after  { width: 1.5px; height: 13px; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

/* Answers fold away only once main.js is running (the .js class on <html>),
   so without JavaScript every answer stays open and readable. main.js also
   sets hidden on a closed answer, so screen readers skip it as well. */
.faq-a {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.34s var(--ease);
}
.faq-a > div { overflow: hidden; }
.js .faq-a { grid-template-rows: 0fr; }
.js .faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a[hidden] { display: none; }
.faq-a p { color: var(--text-dim); font-size: 0.96rem; padding-bottom: 26px; max-width: 76ch; }
.faq-a p + p { padding-bottom: 26px; margin-top: -12px; }
.faq-a .inner > p + p { margin-top: 14px; }

/* ================= 12. FORMS ================= */
.field { display: block; margin-bottom: 20px; }
/* `:not(.check)` matters. A consent checkbox's label is a direct child of
   .field but it is body copy, not a field caption: the risk acknowledgement and
   the marketing-consent wording run to 50-odd words each. Without the guard this
   rule caught them and rendered all three as 11px uppercase letter-spaced mono
   at about 4:1 contrast, and its display:block killed .check's flex row. Consent
   has to be legible to be consent. */
.field > label:not(.check),
.field-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.field .req { color: var(--accent); }

.input,
.select,
.textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: var(--r-sm);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-dim); }
/* focus keeps the site's accent ring (the :focus-visible outline) as well as
   the accent edge, so the field being typed in is never in doubt */
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.045);
}
.textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%237b7f82' stroke-width='1.4' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 11px;
  padding-right: 40px;
  cursor: pointer;
}
.select option { background: var(--ink-3); color: var(--text); }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.field-error {
  display: none;
  margin-top: 7px;
  font-size: 0.82rem;
  color: #f87171;
}
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: #f87171; }
.field.has-error .field-error { display: block; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.check input {
  appearance: none;
  flex: none;
  width: 17px; height: 17px;
  margin-top: 2px;
  border: 1px solid var(--control-line);
  border-radius: var(--r-xs);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.check input:hover { border-color: var(--text-dim); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after {
  content: "";
  display: block;
  width: 4px; height: 8px;
  margin: 1.5px auto 0;
  border: solid #0a0b0c;
  border-width: 0 1.7px 1.7px 0;
  transform: rotate(45deg);
}

.form-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.form-status {
  display: none;
  margin-top: 18px;
  padding: 15px 18px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  border: 1px solid var(--line);
}
.form-status.is-visible { display: block; }
.form-status.ok { border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.07); color: #bbf7d0; }
.form-status.err { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.07); color: #fecaca; }

/* ================= 13. PLACEHOLDER + DISCLAIMER ================= */
/* Anything not yet substantiated is marked. See README —
   these classes are the removal checklist before launch. */
.placeholder-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  margin-bottom: 34px;
  border: 1px dashed var(--accent-line);
  border-radius: var(--r);
  background: var(--accent-wash);
  font-size: 0.88rem;
  color: var(--accent-soft);
  line-height: 1.6;
}
.placeholder-banner strong { color: var(--accent); font-weight: 600; }
.placeholder-banner svg { flex: none; width: 17px; height: 17px; margin-top: 2px; }

.is-placeholder .card,
.card.is-placeholder,
.is-placeholder .quote,
.is-placeholder .portrait,
.is-placeholder .mini,
.is-placeholder .figure { border-style: dashed; border-color: var(--accent-line); }
.is-placeholder .figures { border-top-style: dashed; border-bottom-style: dashed; border-color: var(--accent-line); }
.is-placeholder .figure .val { color: var(--muted-deep); }

.chip-example {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px dashed var(--accent-line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* standing disclaimer — never shrink, hide, or delete. */
.disclaimer {
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.845rem;
  line-height: 1.72;
  color: var(--muted);
  max-width: 100%;
}
.disclaimer strong { color: var(--text-dim); font-weight: 600; }
.disclaimer p + p { margin-top: 12px; }

.quote { padding: 34px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface); }
.quote blockquote { font-size: 1.06rem; line-height: 1.55; font-family: var(--font-sans); color: var(--text); font-weight: 400; }
.quote figcaption { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-faint); }
.quote .who { color: var(--paper); font-size: 0.91rem; font-weight: 600; }
.quote .role { color: var(--muted); font-size: 0.83rem; }

/* ================= 14. FOOTER ================= */
.footer { border-top: 1px solid var(--line-soft); padding: 72px 0 36px; margin-top: 0; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-bottom: 52px;
}
/* the small label over each footer list: an h2 in the outline, styled as before */
.footer-h {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 18px;
}
.footer-links li { margin-bottom: 11px; }
.footer-links a { color: var(--text-dim); font-size: 0.92rem; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--paper); }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 18px; max-width: 42ch; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line-faint);
  font-size: 0.83rem;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text-dim); }
.social { display: flex; gap: 8px; }
.social a {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.social a:hover { color: var(--accent); border-color: var(--accent-line); }
.social svg { width: 15px; height: 15px; }

/* ================= 14b. PEOPLE ================= */
/* Portraits are 4:5. Until real headshots exist, .portrait renders
   a monogram plate — see README, "The team section". */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.people.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.person { display: flex; flex-direction: column; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(165deg, var(--ink-3) 0%, var(--ink) 100%);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  transition: border-color 0.3s var(--ease);
}
.person:hover .portrait { border-color: var(--line); }
/* Absolutely positioned, not just width/height 100%. .portrait is a grid whose
   own height comes from aspect-ratio, so a percentage height on the image is a
   cyclic dependency and resolves to auto: the image then sizes to its natural
   ratio, overflows, aligns to the top and is simply clipped, and object-fit has
   nothing left to do. inset: 0 pins it to the box, so the crop is real. */
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* monogram plate stand-in */
.portrait .monogram {
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0.55;
  line-height: 1;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}
.portrait.has-photo .monogram { display: none; }

.person .p-name { font-size: 1.06rem; font-weight: 600; color: var(--paper); letter-spacing: -0.012em; }
.person .p-name-row { display: flex; align-items: center; gap: 10px; }
.person .p-link {
  flex: none;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.person .p-link:hover, .person .p-link:focus-visible { color: var(--accent); border-color: var(--accent-line); }
.person .p-link svg { width: 13px; height: 13px; }
.person .p-role {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.person .p-bio { margin-top: 14px; font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; }
.person .p-meta {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

/* compact strip used on the home page */
.people-strip { display: flex; flex-wrap: wrap; gap: 14px; }
.people-strip .mini {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 18px 11px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  background: var(--surface);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.people-strip .mini:hover { border-color: var(--accent-line); background: var(--surface-2); }
.people-strip .mini .av {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-3);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent);
  flex: none;
  overflow: hidden;
}
.people-strip .mini .av img { width: 100%; height: 100%; object-fit: cover; }
.people-strip .mini .nm { display: block; font-size: 0.88rem; color: var(--paper); font-weight: 550; line-height: 1.2; }
.people-strip .mini .rl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

/* ================= 15. MOTION + RESPONSIVE ================= */
/* Blocks start hidden only when scripts run (the .js class is set in each
   page's <head>), so with JavaScript off the whole page is still there. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.marquee { position: relative; overflow: hidden; border-top: 1px solid var(--line-faint); border-bottom: 1px solid var(--line-faint); padding: 18px 0; }
/* main.js lays a pause button over the strip (WCAG 2.2.2): click, tap, or
   Tab to it and press Enter. Invisible until it has keyboard focus. */
.marquee-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.marquee-toggle:focus-visible { outline-offset: -3px; }
.marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: slide 42s linear infinite; }
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-deep);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.marquee-track span::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); opacity: 0.6; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

@media (max-width: 1040px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .split, .split.lean, .split.lean-r { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .sticky-col { position: static; }
  .rule-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(3) { border-left: 0; }
  .figure { border-top: 1px solid var(--line-faint); }
  .figure:nth-child(-n+2) { border-top: 0; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .phase { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 34px 0; }
  .phase .phase-n { padding-top: 0; }
  .rule-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .raci { grid-template-columns: minmax(0, 1fr); }
  .people, .people.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
}

@media (max-width: 680px) {
  :root { --gutter: 20px; --header-h: 66px; }
  .brand { gap: 10px; }
  .brand-mark { height: 27px; }
  .brand-word { --bw: 100px; }
  .section { padding: 74px 0; }
  .section.pad-lg { padding: 88px 0; }
  .section-head { margin-bottom: 40px; }
  .grid-2, .grid-3, .grid-4,
  .rule-grid.cols-2, .rule-grid.cols-3, .rule-grid.cols-4,
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .figures, .figures.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .card { padding: 26px; }
  .card.pad-lg { padding: 28px; }
  .panel { padding: 28px; }
  .rule-grid > * { padding: 26px 22px; }
  .btn-row .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .people, .people.four { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .people-strip .mini { width: 100%; }
  /* a three column table stacks into one card per row on a phone: the row’s name first, then each
     column under its own small label, so nothing needs scrolling sideways */
  .table-wrap.stack { overflow: visible; }
  .stack table.data { min-width: 0; font-size: 0.95rem; }
  .stack table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stack table.data, .stack table.data tbody, .stack table.data tr, .stack table.data td, .stack table.data tbody th { display: block; width: 100%; }
  .stack table.data tr { padding: 18px 20px; border-bottom: 1px solid var(--line-faint); }
  .stack table.data tbody tr:last-child { border-bottom: 0; }
  .stack table.data td, .stack table.data tbody th { padding: 0; border: 0; }
  .stack table.data tbody tr:hover td, .stack table.data tbody tr:hover th { background: none; }
  .stack table.data .k { white-space: normal; font-size: 1.02rem; }
  .stack table.data td[data-label] { margin-top: 12px; }
  .stack table.data td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
  /* the "on this page" links: an even two column grid on a phone, so no row runs past the others */
  .page-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-index .chip { min-width: 0; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .marquee-toggle { display: none; }
}

/* Windows contrast themes replace the page's colours. A home-made tick box
   could then look the same ticked and unticked, so hand it back to the system,
   which always draws its state. */
@media (forced-colors: active) {
  .check input { appearance: auto; width: auto; height: auto; border: 0; background: none; }
  .check input:checked::after { display: none; }
  .input, .select, .textarea { border-color: ButtonBorder; }
  .faq-icon::before, .faq-icon::after { background: CanvasText; }
}

@media print {
  .header, .mobile-nav, .ground, .footer, .btn, .marquee-toggle { display: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
}
