/* ============================================================
   AI SpeedForce — system stylesheet
   Layers, in cascade order:
     1 fonts   2 reset   3 base   4 layout   5 components   6 utilities
   Rules are single-class where possible. No !important anywhere.
   Section rhythm is owned by .section alone so paddings never
   cancel each other.
   ============================================================ */

/* ── 1 · FONTS ─────────────────────────────────────────────
   Self-hosted, latin subset, woff2. The three "Fallback" faces
   below re-metric Arial so the swap causes no reflow: overrides
   are pre-divided by size-adjust, computed from each font's
   OS/2 xAvgCharWidth and typo metrics against Arial (upm 2048,
   asc 1854, desc 434, avg 904).
   ------------------------------------------------------- */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-display-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 112.82%;
  ascent-override: 82.43%;
  descent-override: 23.93%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-400i-latin.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-500-latin.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/plex-sans-600-latin.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 120.75%;
  ascent-override: 84.89%;
  descent-override: 22.77%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/plex-mono-500-latin.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono Fallback";
  src: local("Courier New"), local("Liberation Mono");
  size-adjust: 135.93%;
  ascent-override: 75.41%;
  descent-override: 20.23%;
  line-gap-override: 0%;
}

/* ── 2 · RESET ───────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul {
  margin: 0;
}
ol[class], ul[class] { list-style: none; padding: 0; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

:target { scroll-margin-top: calc(var(--header-h) + var(--sp-5)); }

/* ── 3 · BASE ────────────────────────────────────────────── */

body {
  background: var(--c-ink);
  color: var(--c-chrome);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-prose);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  text-wrap: balance;
}
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-3xl); }
h3 {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-snug);
}
h4 {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: var(--lh-snug);
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration-color: var(--c-accent-edge); }
a:hover { text-decoration-color: var(--c-accent); }

/* Inline links inside prose: forcing a 44px box would wreck the line rhythm,
   so grow the hit area with padding and cancel it with an equal negative
   margin. Layout is unchanged. 11px each side keeps a 22px line box clear of
   the neighbouring line's zone, so adjacent rows cannot overlap. */
.lg__body p a, .prose p a, .faq__a a, .measure a, .card__out a, .muted a {
  padding-block: 0.34rem;
  margin-block: -0.34rem;
}

strong { font-weight: 600; color: var(--c-chrome); }

::selection { background: var(--c-fill-rose); color: var(--c-on-accent); }

/* the default tap flash is invisible on plum; use our own pressed states */
a, button, label, summary, [tabindex] { -webkit-tap-highlight-color: rgba(241, 121, 105, 0.18); }

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 2px;
  /* second ring in ink so the amber stays visible over accent fills too */
  box-shadow: 0 0 0 5px var(--c-ink);
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -4rem;
  z-index: var(--z-skip);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-fill-warm);
  color: var(--c-on-accent);
  font-weight: 600;
  border-radius: var(--r-sm);
  /* translate, never top: animating a layout property was the one existing
     violation of the transform-and-opacity rule */
  top: var(--sp-3);
  translate: 0 -400%;
  transition: translate var(--dur) var(--ease);
}
.skip-link:focus { translate: 0 0; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── 4 · LAYOUT ──────────────────────────────────────────── */

.container {
  width: min(100% - var(--sp-5) * 2, var(--container));
  margin-inline: auto;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}
@media (min-width: 48em) {
  .container { width: min(100% - var(--sp-7) * 2, var(--container)); }
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--surface { background: var(--c-surface); }
.section--edge { border-top: var(--bd-soft); }

/* The instrument rail: mono step label in a left gutter, content
   in the wide column. Below 62em the rail becomes a top line. */
.rail {
  display: grid;
  /* explicit, so the implicit `auto` track cannot be widened by a wide
     descendant. This is what let the capability matrix push the whole
     document to 704px at a 375px viewport. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
}
@media (min-width: 62em) {
  .rail {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: var(--sp-7);
  }
}

.rail__label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}
.rail__label::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--c-line-bright);
  translate: 0 -0.28em;
  flex: none;
}
@media (min-width: 62em) {
  .rail__label {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-5));
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
    align-self: start;
  }
  .rail__label::before { translate: 0; width: 2.5rem; }
}
.rail__num { color: var(--c-accent); }

.stack   { display: flex; flex-direction: column; gap: var(--sp-4); align-items: flex-start; min-width: 0; }
.stack-5 { display: flex; flex-direction: column; gap: var(--sp-5); align-items: flex-start; min-width: 0; }
.stack-6 { display: flex; flex-direction: column; gap: var(--sp-6); align-items: flex-start; min-width: 0; }
/* a flex/grid child's default min-width:auto is min-content, which is how a
   wide descendant escapes its container. Cap it once, here. */
.stack > *, .stack-5 > *, .stack-6 > *, .rail > *, .grid > * { min-width: 0; max-width: 100%; }

.measure { max-width: var(--measure); }

.grid { display: grid; gap: var(--sp-5); }
@media (min-width: 40em)  { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52em)  { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 40em)  { .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em)  { .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.section-head { display: flex; flex-direction: column; gap: var(--sp-4); align-items: flex-start; }

/* The bolt cut. One 45deg chamfer, top-right, other corners soft.
   Applied only to instrumented surfaces. */
.is-cut {
  position: relative;
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    0 100%
  );
}
.is-cut--bl {
  position: relative;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%,
    var(--cut) 100%, 0 calc(100% - var(--cut))
  );
}

/* the chamfer's own hairline: clip-path removes the border along the
   diagonal, so paint it back. length = cut * sqrt(2), pivoted at its
   left end so it lands exactly on (100%, cut). */
.is-cut::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: calc(var(--cut) * 1.41421356);
  height: 1px;
  background: var(--c-line);
  transform-origin: 0 0;
  translate: calc(var(--cut) * -1) 0;
  rotate: 45deg;
  pointer-events: none;
}

/* ── 5 · COMPONENTS ──────────────────────────────────────── */

/* -- 5.1 mono label / eyebrow -- */
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
}
.label--accent { color: var(--c-accent); }

/* -- 5.2 lead + muted text -- */
.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-prose);
  color: var(--c-mauve);
}
.muted { color: var(--c-mauve); }

/* -- 5.3 buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.72em 1.15em;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              translate var(--dur) var(--ease);
}
.btn:hover { translate: 0 -1px; }
.btn:active { translate: 0 0; }

/* ink on accent, never white on accent: white on the rose stop is
   3.54:1 and fails AA for body text. */
.btn--primary {
  background: var(--grad-bolt-x);
  color: var(--c-on-accent);
  box-shadow: var(--sh-accent);
}
.btn--primary:hover { filter: brightness(1.07); }

.btn--ghost {
  border: var(--bd);
  color: var(--c-chrome);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--c-surface-2);
  border-color: var(--c-line-bright);
}

.btn--quiet {
  color: var(--c-mauve);
  padding-inline: 0;
}
.btn--quiet:hover { color: var(--c-accent); }

.btn--lg { font-size: var(--fs-base); padding: 0.85em 1.4em; }
.btn--block { width: 100%; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* -- 5.4 pill / chip -- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4em 0.85em;
  border-radius: var(--r-pill);
  border: var(--bd);
  background: var(--c-surface);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  color: var(--c-mauve);
}
.pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  flex: none;
}

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); min-width: 0; }
.chip {
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
  border: var(--bd-soft);
  border-radius: var(--r-sm);
  padding: 0.25em 0.55em;
}

/* -- 5.4b split lockup: cropped icon + live wordmark --
   PROPOSAL. Not wired into the header or footer yet; rendered on /brand/ for
   review. The name is real text, so it scales, is selectable, inherits the
   type system and costs no bytes. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  flex: none;
}
.lockup__icon {
  height: var(--icon-h-sm);
  width: auto;
  flex: none;
  display: block;
}
.lockup__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lockup-sm);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--c-chrome);
  white-space: nowrap;
  /* optical, not mathematical: the icon's mass sits below its box centre
     because the sphere arc is bottom-heavy, so the name lifts a hair to sit
     against the bolt rather than the box */
  translate: 0 -1px;
}
.lockup__name em { font-style: normal; }
.lockup--accent .lockup__name em { color: var(--c-accent); }
@media (min-width: 62em) {
  .lockup__icon { height: var(--icon-h-lg); }
  .lockup__name { font-size: var(--fs-lockup-lg); }
}
/* footer scale */
.lockup--ftr .lockup__icon { height: var(--icon-h-sm); }
.lockup--ftr .lockup__name { font-size: var(--fs-lockup-sm); }

/* -- 5.5 header -- */
.hdr {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--c-veil);
  backdrop-filter: blur(12px);
  border-bottom: var(--bd-soft);
  padding-top: env(safe-area-inset-top);
}
/* NOTE: backdrop-filter above makes .hdr a containing block for any
   position:fixed DESCENDANT. The drawer therefore lives as the last child of
   <body>, never inside the header. Do not move it back. */
.hdr__bar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
@media (min-width: 40em) { .hdr__bar { gap: var(--sp-5); } }
.brand { display: flex; align-items: center; flex: none; }
/* sized by height only, so the 558x447 intrinsic ratio is never touched */
.brand img { height: var(--logo-h-sm); width: auto; max-width: none; }
@media (min-width: 62em) { .brand img { height: var(--logo-h-lg); } }

.hdr__nav { display: none; }
@media (min-width: 62em) {
  .hdr__nav {
    display: flex;
    align-items: center;
    /* tight gap here, roomy at --bp-2xl; see the pair at the end of the sheet */
    gap: var(--sp-3);
    margin-inline-start: var(--sp-3);
  }
}
.hdr__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-mauve);
  text-decoration: none;
  /* 44px hit area from padding, not height, so the bar keeps its 80px */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--sp-2);
  position: relative;
  transition: color var(--dur) var(--ease);
}
.hdr__link:hover { color: var(--c-chrome); }
.hdr__link[aria-current="page"] { color: var(--c-chrome); }
.hdr__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: var(--sp-2); right: var(--sp-2); bottom: 0.6rem;
  height: 2px;
  background: var(--grad-bolt-x);
  border-radius: 2px;
}
/* Platforms mega panel (desktop nav only, >= 62em).
   Opens on hover, and on the chevron button for keyboard and touch; aisf.js
   (initMega) owns aria-expanded, Esc and outside clicks. With JS off, hover
   still works and "Platforms" is a plain link to the hub. Closing waits a
   beat (transition-delay on visibility) so crossing the gap never drops it. */
.hdr__dd { position: relative; display: flex; align-items: center; }
/* The panel holds every platform in three groups, so from 62em it is anchored
   to the header bar (full container width) rather than to the nav item. */
.hdr__bar { position: relative; }
@media (min-width: 62em) { .hdr__dd { position: static; } }
.hdr__dd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; min-height: 44px;
  color: var(--c-mauve);
  border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease);
}
.hdr__dd-btn svg { width: 14px; height: 14px; transition: rotate var(--dur) var(--ease); }
.hdr__dd:hover .hdr__dd-btn, .hdr__dd-btn:hover { color: var(--c-chrome); }
.hdr__dd-btn[aria-expanded="true"] svg { rotate: 180deg; }

.mega {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: var(--z-header);
  width: min(60rem, 100%);
  padding: var(--sp-4);
  background: var(--c-surface);
  border: var(--bd);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  visibility: hidden;
  opacity: 0;
  translate: 0 6px;
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease),
              visibility 0s linear var(--dur);
}
/* invisible bridge over the gap between the nav item and the panel */
.mega::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--sp-6); }
.hdr__dd:hover .mega,
.hdr__dd.is-open .mega,
.mega:focus-within {
  visibility: visible;
  opacity: 1;
  translate: 0 0;
  transition-delay: 0s;
}
.mega__h {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
  padding: var(--sp-1) var(--sp-3) var(--sp-3);
}
.mega__cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-4); }
.mega__col { min-width: 0; }
.mega__col + .mega__col { border-left: var(--bd-soft); padding-left: var(--sp-4); }
.mega__col .mega__grid + .mega__h { margin-top: var(--sp-3); }
.mega__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1); }
.mega__grid--one { grid-template-columns: minmax(0, 1fr); }
.plogo--mega { width: 32px; height: 32px; padding: 3px; border-radius: 7px; }
.mega__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r);
  text-decoration: none;
  transition: background var(--dur) var(--ease);
}
.mega__item:hover, .mega__item[aria-current="page"] { background: var(--c-surface-2); }
.mega__item:hover .plogo, .mega__item[aria-current="page"] .plogo { border-color: var(--c-accent-edge); }
.mega__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mega__name { font-size: var(--fs-sm); font-weight: 600; color: var(--c-chrome); }
.mega__use { font-size: var(--fs-xs); color: var(--c-mauve); line-height: var(--lh-normal); }
.mega__all {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-3) var(--sp-1);
  border-top: var(--bd-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  color: var(--c-accent);
  text-decoration: none;
}
.mega__all::after { content: "\2192"; transition: translate var(--dur) var(--ease); }
.mega__all:hover::after { translate: 3px 0; }

.hdr__end { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-3); }
.hdr__cta { display: none; min-height: 44px; }
@media (min-width: 40em) { .hdr__cta { display: inline-flex; } }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: var(--bd);
  border-radius: var(--r-sm);
  color: var(--c-chrome);
  cursor: pointer;
  flex: none;
  -webkit-tap-highlight-color: transparent;
}
.burger:active { background: var(--c-surface-2); }

/* Theme toggle. Same 44px target and hairline as the burger. It shows the
   theme you would switch TO: a sun while dark, a moon while light. The button
   is [hidden] in markup and revealed by aisf.js, so it never appears without
   the script that makes it work. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: var(--bd);
  border-radius: var(--r-sm);
  color: var(--c-chrome);
  flex: none;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--c-line-bright); color: var(--c-accent); }
.theme-toggle:active { background: var(--c-surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }
@media (min-width: 62em) { .burger { display: none; } }

/* The disclosure checkbox. Visually hidden but FOCUSABLE, so the menu opens
   with the keyboard and with JS off. JS only enhances it. */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.nav-toggle:focus-visible ~ .hdr .burger {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}
.burger svg { width: 18px; height: 18px; }

/* -- 5.6 mobile drawer -- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: var(--c-ink);
  padding: calc(var(--sp-5) + env(safe-area-inset-top)) var(--sp-5)
           calc(var(--sp-5) + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: none;
  flex-direction: column;
  gap: var(--sp-6);
}
/* SINGLE SOURCE OF TRUTH for open/closed: the #nav-toggle checkbox.
   Base state is closed. Nothing else may open or close this element, and in
   particular no [hidden] attribute and no JS class. Insurance below in case a
   future edit reintroduces [hidden]: it must still mean closed. */
.drawer[hidden] { display: none; }
.nav-toggle:checked ~ .drawer { display: flex; }
/* never leave it open past the breakpoint, even if the box is still checked */
@media (min-width: 62em) {
  .nav-toggle:checked ~ .drawer { display: none; }
}
/* progressive: lock background scroll without JS where :has() is supported */
@supports selector(:has(*)) {
  html:has(.nav-toggle:checked) { overflow: hidden; }
}
@media (min-width: 62em) {
  @supports selector(:has(*)) {
    html:has(.nav-toggle:checked) { overflow: visible; }
  }
}
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__close {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 44px; height: 44px;
  border: var(--bd);
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-chrome);
}
.drawer__close svg { width: 18px; height: 18px; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__link {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: var(--tr-snug);
  text-decoration: none;
  padding-block: var(--sp-4);
  border-bottom: var(--bd-soft);
  color: var(--c-chrome);
}
.drawer__link:hover { color: var(--c-accent); }
/* platform shortcuts under "Platforms" in the drawer, two columns */
.drawer__link:has(+ .drawer__sub) { border-bottom: 0; padding-bottom: var(--sp-2); }
.drawer__sub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-1) var(--sp-3);
  padding-block: var(--sp-3);
  border-bottom: var(--bd-soft);
}
.drawer__sublink {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-mauve);
  text-decoration: none;
}
.drawer__sublink:hover, .drawer__sublink[aria-current="page"] { color: var(--c-chrome); }
.drawer__sublink:hover .plogo, .drawer__sublink[aria-current="page"] .plogo { border-color: var(--c-accent-edge); }

/* -- 5.7 hero -- */
.hero { padding-block: clamp(2.5rem, 1.4rem + 5vw, 5.5rem) var(--section-y); }
.hero h1 { max-width: 17ch; }
.hero__lead { max-width: 52ch; }
/* hero copy beside the agent-core figure from 62em; figure below before */
.hero__top { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 62em) { .hero__top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--sp-8); } }
.hero__art { margin: 0; width: 100%; max-width: 28rem; justify-self: center; }

/* -- 5.8 THE RUN TRACE — the signature element --
   A vertical trace at every width: a spine on the left, steps
   resolving down it, a mono readout on the right. The parallel
   tool calls are an indented branch with their own stubs. */
.trace {
  min-width: 0;
  max-width: 100%;
  border: var(--bd);
  background:
    radial-gradient(120% 90% at 88% -10%, var(--c-wash-faint), transparent 62%),
    var(--c-surface);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  width: 100%;
}
@media (min-width: 40em) {
  .trace { padding: var(--sp-6) var(--sp-6) var(--sp-5); }
}

.trace__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-bottom: var(--sp-4);
  border-bottom: var(--bd-soft);
  margin-bottom: var(--sp-2);
}
.trace__title {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve);
}
.trace__status {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.trace__flow { position: relative; }
.trace__list { position: relative; }

/* --- the connector wire ---
   An SVG laid over the step list. The track is the resting hairline; the live
   path carries the --bolt ramp as a userSpaceOnUse gradient so the colour maps
   to real vertical position rather than to the path's own bounding box, and
   advances by stroke-dashoffset with pathLength normalised to 1.

   stroke-dashoffset is a PAINT property: no layout, no reflow, no CLS. It is
   the one property outside transform/opacity used here, and only because
   drawing a line along its own path cannot be expressed as either. */
.trace__wire {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.trace__wire path { fill: none; stroke-width: 1.5px; stroke-linecap: round; }
.trace__wire .wire-track { stroke: var(--c-line); }
.trace__wire .wire-live {
  stroke: url(#aisf-wire-grad);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset var(--trace-wire) var(--ease-wire);
}
/* the SVG replaces the CSS fallback spine once JS has measured it */
.trace.has-wire .step::before { display: none; }
.step__marker, .step__body, .branch { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .trace__wire .wire-live { transition: none; stroke-dashoffset: 0; }
}

.step {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  position: relative;
}
/* the spine */
.step::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--c-line);
  translate: -0.5px 0;
}
.step:first-child::before { top: 1.6rem; }
.step:last-child::before  { bottom: calc(100% - 1.6rem); }

.step__marker {
  grid-column: 1;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: var(--z-base);
  margin-top: 0.1rem;
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.step__marker svg {
  width: 12px; height: 12px;
  stroke: var(--c-mauve-dim);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--dur) var(--ease);
}

.step__body {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
}
.step__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-mauve);
  transition: color var(--dur) var(--ease);
}
.step__detail {
  font-size: var(--fs-xs);
  color: var(--c-mauve-dim);
  line-height: 1.45;
  flex-basis: 100%;
}
.step__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
  margin-inline-start: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* resolved + active states, driven by JS classes */
.step.is-done .step__marker { border-color: var(--c-accent-edge); background: var(--c-surface-2); }
.step.is-done .step__marker svg { stroke: var(--c-accent); }
.step.is-done .step__name { color: var(--c-chrome); }
.step.is-done::before { background: linear-gradient(180deg, var(--c-accent-edge), var(--c-line)); }

.step.is-active .step__marker {
  border-color: var(--c-accent);
  background: var(--c-accent-quiet);
  box-shadow: 0 0 0 4px var(--c-accent-ring);
}
.step.is-active .step__marker svg { stroke: var(--c-accent-warm); }
.step.is-active .step__name { color: var(--c-chrome); }

/* the human gate: visibly waits */
.step--gate.is-active .step__marker { border-color: var(--c-wait); }
.step--gate.is-active .step__marker svg { stroke: var(--c-wait); }
.step--gate.is-active .step__meta { color: var(--c-wait); }

/* parallel branch */
.branch {
  grid-column: 2;
  margin-top: var(--sp-3);
  padding-left: var(--sp-4);
  border-left: 1px dashed var(--c-line);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.branch__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
  position: relative;
  transition: color var(--dur) var(--ease);
}
.branch__item::before {
  content: "";
  position: absolute;
  left: calc(var(--sp-4) * -1);
  top: 0.6em;
  width: var(--sp-3);
  height: 1px;
  background: var(--c-line);
}
.branch__item.is-done { color: var(--c-mauve); }
.branch__tool { color: var(--c-accent); }
.branch__item.is-done .branch__tool { color: var(--c-accent-warm); }
.branch__ms { margin-inline-start: auto; font-variant-numeric: tabular-nums; }

.trace__foot {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: var(--bd-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
}
.trace__replay {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  min-width: 44px;
  color: var(--c-mauve);
  border: var(--bd-soft);
  border-radius: var(--r-sm);
  padding: 0.4em 0.9em;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.trace__replay:hover { color: var(--c-accent); border-color: var(--c-accent-edge); }
.trace__replay svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.trace-fig { width: 100%; margin-top: var(--sp-6); }
.trace-fig__cap { display: block; margin-top: var(--sp-3); }

/* -- 5.9 cards -- */
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--c-surface);
  border: var(--bd);
  border-radius: var(--r);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease),
              translate var(--dur) var(--ease);
}
a.card:hover {
  border-color: var(--c-line-bright);
  background: var(--c-surface-2);
  translate: 0 -2px;
}
.card__title { font-size: var(--fs-xl); font-weight: 600; letter-spacing: var(--tr-snug); }
.card__out { color: var(--c-mauve); font-size: var(--fs-sm); }
.card__link {
  margin-top: auto;
  padding-top: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
a.card:hover .card__link { color: var(--c-accent-warm); }
.card__link::after { content: "\2192"; transition: translate var(--dur) var(--ease); }
a.card:hover .card__link::after { translate: 3px 0; }

/* raised panel variant: larger radius, no chamfer. The cut is reserved
   for the trace, the matrix and the CTA band. */
.card--panel { border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-5); }

/* -- 5.10 capability matrix -- */
.matrix-wrap {
  position: relative;
  border: var(--bd);
  background: var(--c-surface);
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
/* the scroll container, never the clipped element: .is-cut goes on the wrap */
.matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
/* right-edge affordance, removed at scroll end by initScrollHint */
.matrix-wrap::after,
.lg-table-wrap::after {
  content: "";
  position: absolute;
  inset-block: 0;
  right: 0;
  width: 2.5rem;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--c-surface));
  opacity: 1;
  transition: opacity var(--dur) var(--ease);
}
.matrix-wrap.is-scroll-end::after,
.lg-table-wrap.is-scroll-end::after,
.matrix-wrap.is-no-scroll::after,
.lg-table-wrap.is-no-scroll::after { opacity: 0; }
.matrix { font-size: var(--fs-xs); min-width: 44rem; }
.matrix th, .matrix td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: var(--bd-soft);
  vertical-align: top;
}
.matrix thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
  font-weight: 500;
  white-space: nowrap;
  background: var(--c-ink);
  position: sticky;
  top: 0;
}
.matrix tbody th { font-weight: 600; color: var(--c-chrome); white-space: nowrap; }
.matrix td { color: var(--c-mauve); overflow-wrap: anywhere; }
.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--c-accent);
}

/* -- 5.10b matrix as stacked cards (PROPOSAL, demoed on /brand/) --
   Same <table> markup, different presentation below 48em: one block per agent
   type with READS / WRITES / HUMAN GATE as labelled rows. Needs data-label on
   each <td>. No horizontal scroll, so no fade and no scroll container. */
.matrix--cards { min-width: 0; width: 100%; }
.matrix--cards thead {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.matrix--cards tbody tr {
  display: block;
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  border-bottom: var(--bd-soft);
}
.matrix--cards tbody tr:last-child { border-bottom: 0; }
.matrix--cards tbody th {
  display: block;
  padding: 0 0 var(--sp-3);
  border: 0;
  font-size: var(--fs-base);
  color: var(--c-chrome);
}
.matrix--cards tbody td {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border: 0;
  align-items: baseline;
}
.matrix--cards tbody td::before {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
}
.matrix-wrap--cards::after { display: none; }
@media (min-width: 48em) {
  /* wide enough for the real table again */
  .matrix--cards { min-width: 44rem; }
  .matrix--cards thead { position: static; width: auto; height: auto; clip-path: none; }
  .matrix--cards tbody tr { display: table-row; padding: 0; border-bottom: 0; }
  .matrix--cards tbody th,
  .matrix--cards tbody td {
    display: table-cell;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: var(--bd-soft);
  }
  .matrix--cards tbody td::before { content: none; }
  .matrix-wrap--cards::after { display: block; }
}

/* -- 5.11 platform tiles -- */
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: var(--bd);
  border-radius: var(--r);
  background: var(--c-surface);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease),
              translate var(--dur) var(--ease);
}
.tile:hover {
  border-color: var(--c-line-bright);
  background: var(--c-surface-2);
  translate: 0 -2px;
}
.tile__glyph { width: 40px; height: 40px; }
.tile__glyph {
  stroke: var(--c-mauve);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--dur) var(--ease);
}
.tile:hover .tile__glyph { stroke: var(--c-accent); }
.tile:hover .plogo { border-color: var(--c-accent-edge); }

.tile__name { font-size: var(--fs-lg); font-weight: 600; letter-spacing: var(--tr-snug); }
.tile__use { font-size: var(--fs-xs); color: var(--c-mauve); }

/* -- 5.12 commitments strip (replaces the old stats) -- */
.commit {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 40em) { .commit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .commit { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.commit__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 2px solid var(--c-line);
}
.commit__item:nth-child(1) { border-image: var(--grad-bolt-x) 1; }
.commit__k {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-accent);
}
.commit__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  margin-bottom: var(--sp-1);
  border-radius: var(--r);
  border: 1px solid var(--c-accent-edge);
  background: var(--c-accent-quiet);
  color: var(--c-accent);
}
.commit__ico svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.commit__v { font-size: var(--fs-base); font-weight: 500; line-height: var(--lh-normal); }
.commit__note { font-size: var(--fs-xs); color: var(--c-mauve-dim); }

/* -- 5.13 placeholder slot -- */
.slot {
  border: 1px dashed var(--c-line-bright);
  border-radius: var(--r);
  padding: var(--sp-5);
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 10px,
    var(--c-hatch) 10px 20px
  );
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-start;
}
.slot__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
  color: var(--c-on-accent);
  background: var(--c-fill-warm);
  padding: 0.3em 0.6em;
  border-radius: var(--r-sm);
}
.slot__body { color: var(--c-mauve); font-size: var(--fs-sm); }

/* -- 5.14 FAQ accordion (native <details>) -- */
.faq { border-top: var(--bd-soft); width: 100%; }
.faq__item { border-bottom: var(--bd-soft); }
.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  cursor: pointer;
  list-style: none;
  color: var(--c-chrome);
  transition: color var(--dur) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--c-accent); }
.faq__q h3 { font-size: var(--fs-base); font-weight: 600; line-height: var(--lh-snug); }
.faq__q::after {
  content: "";
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.25rem;
  background:
    linear-gradient(var(--c-accent), var(--c-accent)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) center / 1.5px 100% no-repeat;
  transition: rotate var(--dur) var(--ease);
}
.faq__item[open] .faq__q::after {
  background: linear-gradient(var(--c-accent), var(--c-accent)) center / 100% 1.5px no-repeat;
  rotate: 180deg;
}
.faq__a { padding-bottom: var(--sp-5); color: var(--c-mauve); max-width: var(--measure); overflow-wrap: anywhere; }

/* -- 5.15 CTA band -- */
.cta {
  position: relative;
  padding: var(--sp-7) var(--sp-5);
  background:
    radial-gradient(110% 130% at 100% 0%, var(--c-wash), transparent 60%),
    var(--c-surface);
  border: var(--bd);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
@media (min-width: 52em) {
  .cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-8) var(--sp-7);
    gap: var(--sp-7);
  }
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-bolt-x);
}
.cta h2 { max-width: 18ch; }
.cta__sub { color: var(--c-mauve); max-width: 46ch; margin-top: var(--sp-3); }

/* -- 5.16 footer --
   Mobile-first: centred and folded below 52em, left-aligned and fully
   expanded at 52em and up. Link groups are native <details> shipping the
   `open` attribute, so no-JS visitors and crawlers see every URL. */
.ftr {
  background: var(--c-ink-deep);
  border-top: var(--bd-soft);
  padding-block: var(--sp-7) calc(var(--sp-6) + env(safe-area-inset-bottom));
  /* No margin-top: every page ends with a section that already carries bottom
     padding, so a footer margin double-counted it. */
}
.ftr__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
  text-align: center;
  min-width: 0;
}
.ftr__brand { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.ftr__intro {
  color: var(--c-mauve); font-size: var(--fs-sm);
  max-width: 34ch; margin: var(--sp-4) auto 0; overflow-wrap: anywhere;
}

.ftr__group { min-width: 0; border-top: var(--bd-soft); }
.ftr__sum {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; width: 100%;
  cursor: pointer; list-style: none;
  color: var(--c-mauve);
  transition: color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.ftr__sum::-webkit-details-marker { display: none; }
.ftr__sum:hover { color: var(--c-chrome); }
.ftr__sum:active { color: var(--c-accent); }
.ftr__sum:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; border-radius: var(--r-sm); }
/* chevron immediately after the label, never pinned to the edge */
.ftr__sum::after {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  rotate: 45deg; translate: 0 -0.15em;
  transition: rotate var(--dur) var(--ease);
}
.ftr__group[open] .ftr__sum::after { rotate: -135deg; translate: 0 0.1em; }

.ftr__h {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: inherit; margin: 0;
}
.ftr__list {
  display: flex; flex-direction: column; gap: var(--sp-1);
  align-items: center; padding: 0 0 var(--sp-3);
  list-style: none; min-width: 0;
}
.ftr__list li { list-style: none; min-width: 0; }
.ftr__list a {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; font-size: var(--fs-sm);
  overflow-wrap: anywhere; color: var(--c-mauve);
  text-decoration: none; transition: color var(--dur) var(--ease);
}
.ftr__list a:hover { color: var(--c-chrome); }
/* platform links carry a logo badge; beats the desktop display:block below */
.ftr__list a.ftr__plink { display: inline-flex; align-items: center; gap: var(--sp-2); }

.ftr__base {
  overflow-wrap: anywhere;
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: var(--bd-soft);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  color: var(--c-mauve-dim); min-width: 0;
}
.ftr__base a {
  overflow-wrap: anywhere;
  max-width: 100%;
  /* standalone control: full 44px without changing the row's rhythm */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 52em) {
  .ftr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); text-align: start; }
  .ftr__brand { align-items: flex-start; }
  .ftr__intro { margin-inline: 0; }
  .ftr__group { border-top: 0; }
  .ftr__sum {
    justify-content: flex-start; min-height: 0;
    cursor: default; pointer-events: none;
    margin-bottom: var(--sp-4); color: var(--c-mauve-dim);
  }
  .ftr__sum::after { display: none; }
  .ftr__list { align-items: flex-start; gap: var(--sp-3); padding-bottom: 0; }
  .ftr__list a { display: block; min-height: 0; }
  .ftr__base {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    justify-content: space-between; text-align: start;
    gap: var(--sp-4); margin-top: var(--sp-7);
  }
}
@media (min-width: 64em) {
  .ftr__grid { grid-template-columns: 1.2fr 1fr 1.7fr 1fr 1fr; }
  /* thirteen platforms: two short columns instead of one long one */
  .ftr__list--plat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-4); }
}

/* -- 5.17 page header band (service + platform pages) --
   Not chamfered: it is an editorial masthead, not an instrument. */
.pagehead {
  padding-block: calc(var(--section-y) * 0.75) var(--section-y);
  border-bottom: var(--bd-soft);
  background:
    radial-gradient(90% 120% at 100% 0%, var(--c-wash-soft), transparent 62%),
    var(--c-surface);
}
.pagehead__inner { display: flex; flex-direction: column; gap: var(--sp-4); align-items: flex-start; }
.pagehead__glyph {
  width: 52px; height: 52px;
  stroke: var(--c-accent);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: var(--sp-2);
}
.pagehead h1 { max-width: 22ch; }
/* One row above the title: a small icon badge (or platform logo) and the
   breadcrumb. Replaces the old stack of breadcrumb, 52px glyph and a mono
   label that repeated the breadcrumb. */
.pagehead__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.pagehead__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-accent-edge);
  background: var(--c-accent-quiet);
}
.pagehead__glyph.pagehead__icon { width: 1.25rem; height: 1.25rem; margin: 0; stroke-width: 2.2; }
.plogo--md { width: 36px; height: 36px; padding: 4px; border-radius: var(--r-sm); }
.pagehead__lead { color: var(--c-mauve); font-size: var(--fs-lg); max-width: 56ch; }

/* -- 5.17b illustrations (build/figures/render.py) --
   Inline SVG coloured only through these classes, so every figure follows the
   theme. Instrument look: hairline panel, dot grid, mono labels, one accent.
   The page-header figure sits beside the heading from 62em, below it before. */
.pagehead__grid { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 62em) {
  .pagehead__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--sp-8); }
}
.pagehead__art, .art-figure { margin: 0; min-width: 0; }
.pagehead__art { width: 100%; max-width: 30rem; justify-self: center; }
.art-figure { max-width: 34rem; }
.art { display: block; width: 100%; height: auto; font-family: var(--font-body); }

.art__panel { fill: var(--c-ink); stroke: var(--c-line); stroke-width: 1; }
.art__grid { fill: var(--c-line); opacity: 0.55; }
.art__rule { stroke: var(--c-line-soft); stroke-width: 1; }
.art__led { fill: var(--c-line-bright); }
.art__led--on { fill: var(--c-ok); }

.art__node { fill: var(--c-surface); stroke: var(--c-line-bright); stroke-width: 1; }
.art__node--gate { stroke: var(--c-wait); stroke-dasharray: 4 3; }
.art__node--out { fill: var(--c-accent-quiet); stroke: var(--c-accent); }
.art__bar { fill: var(--c-surface-2); stroke: none; }
.art__row { fill: var(--c-ink); stroke: var(--c-line); stroke-width: 1; }
.art__row--sel { fill: var(--c-accent-quiet); stroke: var(--c-accent-edge); }
.art__skel { fill: var(--c-line); }
.art__btn { fill: none; stroke: var(--c-line-bright); stroke-width: 1; }
.art__btn--ok { fill: var(--c-fill-warm); stroke: none; }

.art__core { fill: var(--c-surface); stroke-width: 2; }
.art__orbit { fill: none; stroke: var(--c-line); stroke-width: 1; stroke-dasharray: 2 5; }

.art__wire { fill: none; stroke: var(--c-line-bright); stroke-width: 1.4; }
/* runs a few cycles then rests: an endless stroke-dashoffset loop cannot be
   composited and cost mobile Lighthouse up to 1.2s of blocking time */
.art__wire--live { stroke: var(--c-accent); stroke-dasharray: 3 5; animation: art-flow 1.6s linear 3; }
.art__orbit--live { stroke: var(--c-accent-edge); animation: art-flow 3s linear 2; }
@keyframes art-flow { to { stroke-dashoffset: -16; } }
@media (prefers-reduced-motion: reduce) {
  .art__wire--live, .art__orbit--live { animation: none; }
}
.art__dot { fill: var(--c-ink); stroke: var(--c-accent); stroke-width: 2; }
.art__dot--gate { stroke: var(--c-wait); }

.art__gauge { fill: none; stroke: var(--c-line); stroke-width: 12; }
.art__gauge-val { fill: none; stroke-width: 12; stroke-linecap: round; }
.art__pill { stroke: none; }
.art__pill--pass { fill: var(--c-ok); }
.art__pill--warn { fill: var(--c-wait); }
.art__pill--fail { fill: var(--c-accent); }
.art__logo-bg { fill: var(--c-logo-bg); stroke: var(--c-line); stroke-width: 1; }
.art__stop1 { stop-color: var(--c-accent-warm); }
.art__stop2 { stop-color: var(--c-accent); }
.art__stop3 { stop-color: var(--c-accent-mag); }

.art__t { fill: var(--c-chrome); font-size: 13px; font-weight: 600; }
.art__t--sm { font-size: 11.5px; font-weight: 500; }
.art__t--core { font-size: 14px; }
.art__t--btn { fill: var(--c-on-accent); font-size: 11px; }
.art__t--btn2 { fill: var(--c-mauve); font-size: 11px; font-weight: 500; }
.art__n { fill: var(--c-mauve); font-size: 10.5px; }
.art__k { fill: var(--c-mauve-dim); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; }
.art__tag { fill: var(--c-wait); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.08em; }
.art__code { fill: var(--c-accent); font-family: var(--font-mono); font-size: 10.5px; }

/* -- instrument charts in the home reliability cards (build/figures/render.py)
   Illustrative data, labelled as such on every chart. One axis, 2px lines,
   recessive grid, status fills only for state, tooltip on every mark. */
.card__chart {
  align-self: stretch;
  width: 100%;
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) var(--sp-2) var(--sp-1);
  border: var(--bd-soft);
  border-radius: var(--r);
  background: var(--c-ink);
}
.chart { display: block; width: 100%; height: auto; font-family: var(--font-mono); overflow: visible; }
.chart__grid { stroke: var(--c-line-soft); stroke-width: 1; }
.chart__ax { fill: var(--c-mauve-dim); font-size: 9px; }
.chart__ax--row { fill: var(--c-mauve); }
.chart__note { fill: var(--c-mauve-dim); font-size: 7.5px; letter-spacing: 0.08em; }
.chart__line { fill: none; stroke: var(--c-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--c-accent); stroke: var(--c-ink); stroke-width: 2; }
.chart__dot--muted { fill: var(--c-mauve-dim); }
.chart__dot--stop { fill: var(--c-chart-stop); }
.chart__hit { fill: transparent; }
.chart__mark:hover .chart__dot, .chart__mark:hover .chart__bar, .chart__mark:hover [class^="chart__fill"] { filter: brightness(1.15); }
.chart__mark:hover .chart__hit { fill: var(--c-accent-quiet); }
.chart__ref { stroke: var(--c-mauve-dim); stroke-width: 1.2; stroke-dasharray: 4 3; }
.chart__ref--stop { stroke: var(--c-chart-stop); }
.chart__ref--event { stroke: var(--c-chart-held); stroke-dasharray: 2 3; }
.chart__reflabel { fill: var(--c-mauve); font-size: 8.5px; letter-spacing: 0.06em; }
.chart__callout { fill: var(--c-chrome); font-family: var(--font-body); font-size: 9.5px; font-weight: 600; }
.chart__callout--in { fill: var(--c-on-accent); }
.chart__bar { fill: var(--c-accent); }
.chart__bar--held { fill: var(--c-chart-held); }
.chart__fill--good { fill: var(--c-chart-good); }
.chart__fill--held { fill: var(--c-chart-held); }
.chart__fill--stop { fill: var(--c-chart-stop); }

/* home: agent-readiness promo, text beside the report illustration */
.check-split { align-items: center; gap: var(--sp-7); }
.check-split__art { margin: 0; width: 100%; max-width: 30rem; justify-self: center; }

/* mini flow at the top of a service card */
.card__art { display: block; width: 100%; margin-bottom: var(--sp-2); }
.art--mini { display: block; width: 100%; height: auto; }
.art__t--mini { font-size: 10.5px; font-weight: 600; }
a.card:hover .art--mini .art__node { stroke: var(--c-accent-edge); }

/* platform tiles grouped by kind (home, platforms hub); build/platforms */
.plat-groups { display: flex; flex-direction: column; gap: var(--sp-6); width: 100%; }
.plat-group { display: flex; flex-direction: column; gap: var(--sp-3); }
.plat-group__h {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve);
}
.grid-4 { display: grid; gap: var(--sp-4); }
@media (min-width: 40em) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* small line glyph on legal pages */
.art-glyph {
  width: 56px; height: 56px;
  fill: none;
  stroke: var(--c-mauve);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: var(--sp-3);
}
.art-glyph .art__glyph-accent { stroke: var(--c-accent); }

/* -- 5.17c agent-readiness scanner (/agent-ready/) --
   The report markup is rendered server-side by agent-ready/_lib/render.php. */
.scan-form { max-width: 44rem; }
.scan-form--hero { width: 100%; max-width: 36rem; margin-top: var(--sp-2); gap: var(--sp-3); }
.scan-form__note { font-size: var(--fs-sm); color: var(--c-mauve); }
.scan-form__note a { color: var(--c-chrome); }
.scan-result[hidden] { display: none; }
.scan-form__row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.scan-form__row input { flex: 1 1 16rem; min-width: 0; }
.scan-form__row .btn { flex: none; }
.scan-out:empty { display: none; }
.scan-out:focus, .scan-out [tabindex="-1"]:focus { outline: none; box-shadow: none; }
.scan-out.is-loading { opacity: 0.45; transition: opacity var(--dur) var(--ease); }

.scan-error {
  border: var(--bd);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r);
  background: var(--c-surface);
  padding: var(--sp-4) var(--sp-5);
  color: var(--c-chrome);
}
.scan-report { display: flex; flex-direction: column; gap: var(--sp-6); }
.scan-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-5) var(--sp-6);
  padding: var(--sp-5);
  border: var(--bd);
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 120% at 100% 0%, var(--c-wash-soft), transparent 62%),
    var(--c-surface);
}
.scan-sum__text { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.scan-sum__h { font-size: var(--fs-2xl); overflow-wrap: anywhere; }
.scan-sum__meta { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--c-mauve); }
.scan-sum__note { font-size: var(--fs-sm); color: var(--c-mauve); max-width: 60ch; }
.scan-gauge { width: 8.5rem; height: 8.5rem; flex: none; }
.scan-gauge__track { fill: none; stroke: var(--c-line); stroke-width: 10; }
.scan-gauge__value { fill: none; stroke: var(--c-accent); stroke-width: 10; stroke-linecap: round; }
.scan-gauge__num { fill: var(--c-chrome); font-family: var(--font-display); font-size: 34px; font-weight: 700; }

/* Two explicit columns (build/scan/render.py COLUMNS), each a stack, so short
   and tall groups never stretch to match each other and leave a hole. */
.scan-groups { display: grid; gap: var(--sp-5); width: 100%; align-items: start; }
.scan-col { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
@media (min-width: 62em) { .scan-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* "What the scan checks": one card per group, one icon row per check.
   Icons come from checks.json (24px stroke art, coloured here). */
.scan-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: var(--bd);
  border-radius: var(--r-lg);
  background: var(--c-surface);
}
.scan-group--unscored { background: transparent; border-style: dashed; }
.scan-group__head { display: flex; align-items: center; gap: var(--sp-3); padding-bottom: var(--sp-4); border-bottom: var(--bd-soft); }
.scan-group__h { font-size: var(--fs-lg); line-height: var(--lh-snug); }
.scan-group__meta { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--c-mauve-dim); margin-top: 2px; }
.scan-points { display: flex; flex-direction: column; gap: var(--sp-4); }
.scan-point { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.scan-point__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scan-point__t { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); font-weight: 600; color: var(--c-chrome); line-height: var(--lh-snug); }
.scan-point__d { font-size: var(--fs-sm); color: var(--c-mauve); line-height: var(--lh-normal); }

.scan-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--r-sm);
  border: var(--bd-soft);
  background: var(--c-ink);
  color: var(--c-accent);
}
.scan-ico svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.scan-ico--lg { width: 2.75rem; height: 2.75rem; border-radius: var(--r); background: var(--c-accent-quiet); border-color: var(--c-accent-edge); }
.scan-ico--lg svg { width: 1.375rem; height: 1.375rem; }
.scan-ico--sm { width: 1.75rem; height: 1.75rem; }
.scan-ico--sm svg { width: 1rem; height: 1rem; }
.scan-ico--xs { width: 1.5rem; height: 1.5rem; border-radius: 6px; }
.scan-ico--xs svg { width: 0.875rem; height: 0.875rem; }
.scan-cat__h .scan-ico { align-self: center; }
.scan-group--unscored .scan-ico { color: var(--c-mauve); }
.scan-group--unscored .scan-ico--lg { background: var(--c-surface-2); border-color: var(--c-line); }

.scan-tier {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  padding: 0.15em 0.55em;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-line);
  color: var(--c-mauve-dim);
  white-space: nowrap;
}
/* One rule per tier in build/scan/checks.json. The generator interpolates the
   tier straight into the class, so a tier with no rule here silently renders
   as the neutral base; --auth and --commerce were doing exactly that. */
.scan-tier--core { color: var(--c-accent); border-color: var(--c-accent-edge); }
.scan-tier--advanced { color: var(--c-mauve); }
.scan-tier--auth { color: var(--c-wait); border-color: var(--c-wait); }
.scan-tier--commerce { color: var(--c-ok); border-color: var(--c-ok); }
.scan-cat { display: flex; flex-direction: column; gap: var(--sp-3); }
.scan-cat__h { font-size: var(--fs-lg); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.scan-cat__note { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 400; color: var(--c-mauve-dim); }
.scan-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.scan-item { border: var(--bd); border-radius: var(--r); background: var(--c-surface); }
.scan-item details[open] { background: var(--c-surface-2); border-radius: var(--r); }
.scan-item__sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-2) var(--sp-3);
  align-items: baseline;
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  list-style: none;
}
.scan-item__sum::-webkit-details-marker { display: none; }
.scan-item__title { font-weight: 600; color: var(--c-chrome); display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; }
.scan-item__tier { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tr-wide); text-transform: uppercase; color: var(--c-mauve-dim); font-weight: 400; }
@media (min-width: 40em) {
  .scan-item__sum { grid-template-columns: 6.25rem minmax(0, 1fr); gap: var(--sp-1) var(--sp-3); }
  .scan-item__msg { grid-column: 2; }
}
.scan-item__msg { font-size: var(--fs-sm); color: var(--c-mauve); overflow-wrap: anywhere; }
.scan-item__body { padding: 0 var(--sp-4) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--c-mauve); }
.scan-item__body strong { color: var(--c-chrome); }
.scan-item__body a { color: var(--c-accent); }
.scan-item__ev { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--c-mauve-dim); overflow-wrap: anywhere; }
.scan-pill {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: var(--r-pill);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.scan-pill { justify-self: start; }
.scan-pill--pass { color: var(--c-ok); }
.scan-pill--warn { color: var(--c-wait); }
.scan-pill--fail { color: var(--c-accent); }
.scan-pill--info { color: var(--c-mauve-dim); }

/* -- 5.17d platform logo badge --
   Real platform logos (assets/img/platforms/, made by build/icons/render.py)
   always sit on a white badge, in both themes. Sizes: xs footer, sm drawer,
   default mega menu, lg tiles and page headers. */
.plogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px; height: 40px;
  padding: 4px;
  border-radius: var(--r-sm);
  background: var(--c-logo-bg);
  border: var(--bd-soft);
  box-shadow: var(--sh-sm);
}
.plogo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.plogo--xs { width: 20px; height: 20px; padding: 2px; border-radius: 5px; box-shadow: none; }
.plogo--sm { width: 28px; height: 28px; padding: 3px; border-radius: 7px; }
.plogo--lg { width: 56px; height: 56px; padding: 6px; border-radius: var(--r); }

/* -- 5.18 breadcrumbs -- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
}
/* inside the page-head row the breadcrumb sits in a slim pill */
.pagehead__eyebrow .crumbs, .lg__head .crumbs {
  padding: 0.4rem 0.8rem;
  border: var(--bd-soft);
  border-radius: var(--r-pill);
  background: var(--c-ink);
}
.crumbs [aria-current="page"] { color: var(--c-chrome); }
.crumbs a { color: var(--c-mauve); text-decoration: none; }
.crumbs a:hover { color: var(--c-accent); }
.crumbs li { display: flex; align-items: center; gap: var(--sp-2); }
.crumbs li + li::before { content: "/"; color: var(--c-line-bright); }

/* -- 5.19 mono definition list (what is included) -- */
.deflist { display: grid; gap: 0; width: 100%; min-width: 0; }
.deflist > * { min-width: 0; overflow-wrap: anywhere; }
/* --bp-md. Was 46em, an off-ladder value that split the term/definition
   columns 32px before the container gutter widened. */
@media (min-width: 48em) { .deflist { grid-template-columns: 15rem minmax(0, 1fr); } }
.deflist__t {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  color: var(--c-accent);
  padding-block: var(--sp-4) var(--sp-2);
  border-top: var(--bd-soft);
}
.deflist__d {
  color: var(--c-mauve);
  overflow-wrap: anywhere;
  font-size: var(--fs-sm);
  padding-block: var(--sp-2) var(--sp-4);
  margin: 0;
}
@media (min-width: 48em) {
  .deflist__t { padding-block: var(--sp-4); }
  .deflist__d { padding-block: var(--sp-4); border-top: var(--bd-soft); }
}

/* -- 5.20 use-case card (platform pages) --
   Instrumented: it names the records an agent reads and writes. */
.usecase {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--c-surface);
  border: var(--bd);
  border-radius: var(--r);
}
.usecase__name { font-size: var(--fs-lg); font-weight: 600; letter-spacing: var(--tr-snug); }
.usecase__what { color: var(--c-mauve); font-size: var(--fs-sm); }
.usecase__touch {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: var(--bd-soft);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.usecase__k {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
}
.usecase__v {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-accent);
  overflow-wrap: anywhere;
}
.usecase__gate { font-size: var(--fs-xs); color: var(--c-mauve); }

/* -- 5.21 process steps (only where the content really is sequential) -- */
.steps { counter-reset: step; display: flex; flex-direction: column; width: 100%; }
.steps__item {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-top: var(--bd-soft);
}
.steps__item::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-accent);
  padding-top: 0.15rem;
}
.steps__h { font-size: var(--fs-base); font-weight: 600; margin-bottom: var(--sp-2); }
.steps__p { color: var(--c-mauve); font-size: var(--fs-sm); }

/* -- 5.22 related links row -- */
.linkrow { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.linkrow a {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line-bright);
  padding-bottom: 2px;
}
.linkrow a:hover { color: var(--c-accent); border-color: var(--c-accent); }

/* -- 5.23 form -- */
.form { display: flex; flex-direction: column; gap: var(--sp-5); width: 100%; max-width: 34rem; }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field > label { font-size: var(--fs-sm); font-weight: 500; }
.field .req { color: var(--c-accent); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  background: var(--c-ink);
  border: var(--bd);
  border-radius: var(--r-sm);
  color: var(--c-chrome);
  /* never below 16px: iOS Safari zooms the viewport on focus otherwise */
  font-size: max(16px, var(--fs-sm));
  transition: border-color var(--dur) var(--ease);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--c-line-bright); }
.field input::placeholder, .field textarea::placeholder { color: var(--c-mauve-dim); }
.field__hint { font-size: var(--fs-xs); color: var(--c-mauve-dim); }
.field__error { font-size: var(--fs-xs); color: var(--c-accent); display: none; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--c-accent); }
.field.has-error .field__error { display: block; }

/* honeypot: off-screen, never display:none, so bots still fill it */
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  font-size: var(--fs-sm);
  padding: var(--sp-3) var(--sp-4);
  border: var(--bd);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--c-line-bright);
  color: var(--c-mauve);
}
.form-status:empty { display: none; }
.form-status.is-ok    { border-left-color: var(--c-ok);     color: var(--c-chrome); }
.form-status.is-error { border-left-color: var(--c-accent); color: var(--c-chrome); }
.form-status.is-busy  { border-left-color: var(--c-wait);   color: var(--c-mauve); }
.form-note { font-size: var(--fs-xs); color: var(--c-mauve-dim); }

/* -- 5.24 prose (about, long-form) -- */
.prose { max-width: var(--measure); color: var(--c-mauve); overflow-wrap: anywhere; }
.prose > * + * { margin-top: var(--sp-4); }
.prose h2 { color: var(--c-chrome); margin-top: var(--sp-7); }
.prose h3 { color: var(--c-chrome); margin-top: var(--sp-6); }
.prose strong { color: var(--c-chrome); }


/* -- 5.25 BANNER SYSTEM --
   Every banner is composed from tokens only: the bolt gradient, the plum
   surfaces, the grid mask and the chamfer. Change a token and all five
   restyle. No images, no raster art. */

.bnr {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--c-surface);
  border: var(--bd);
  color: var(--c-chrome);
}
/* shared grid mask, fades out toward the lower left */
.bnr::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--c-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 120% at 100% 0%, currentColor 10%, transparent 70%);
  opacity: 0.7;
}
/* shared bolt wash from the top right */
.bnr::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(90% 130% at 100% 0%, var(--c-wash-strong), transparent 62%);
}
.bnr__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-7) var(--sp-5);
}
@media (min-width: 52em) { .bnr__inner { padding: var(--sp-8) var(--sp-7); } }
.bnr__title { font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tr-tight); line-height: var(--lh-tight); }
.bnr__sub { color: var(--c-mauve); max-width: 48ch; }
.bnr__rule { width: 100%; height: 2px; background: var(--grad-bolt-x); }

/* a — full-width hero banner */
.bnr--hero .bnr__title { font-size: var(--fs-4xl); max-width: 18ch; }
.bnr--hero .bnr__inner { min-height: 20rem; justify-content: center; }

/* b — mid-page CTA band */
.bnr--cta .bnr__title { font-size: var(--fs-2xl); max-width: 22ch; }
@media (min-width: 52em) {
  .bnr--cta .bnr__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-6); }
}

/* c — thin announcement / ticker bar */
.bnr--ticker { border-inline: 0; border-top: 0; }
.bnr--ticker .bnr__inner {
  flex-direction: row;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  color: var(--c-mauve);
}
.bnr--ticker::before { background-size: 22px 22px; }
.bnr--ticker .bnr__title { font-size: var(--fs-2xs); font-family: var(--font-mono); letter-spacing: var(--tr-wide); text-transform: uppercase; color: var(--c-accent); }

/* d — platform page header band */
.bnr--platform .bnr__title { font-size: var(--fs-3xl); max-width: 20ch; }
.bnr--platform .bnr__glyph {
  width: 48px; height: 48px;
  stroke: var(--c-accent); fill: none;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

/* e — card-sized promo unit */
.bnr--promo { border-radius: var(--r); }
.bnr--promo .bnr__inner { padding: var(--sp-5); gap: var(--sp-3); min-height: 14rem; }
.bnr--promo .bnr__title { font-size: var(--fs-xl); max-width: 16ch; }
.bnr--promo::before { background-size: 28px 28px; }

/* -- 5.26 OG / social canvases --
   Fixed-size stages for screenshotting. Same token system, no page chrome. */
.og {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--c-ink);
  color: var(--c-chrome);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 72px;
}
.og::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--c-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(110% 120% at 100% 0%, currentColor 8%, transparent 66%);
}
.og::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(80% 120% at 100% 0%, var(--c-wash-strong), transparent 60%);
}
.og--wide   { width: 1200px; height: 630px; }
.og--square { width: 1080px; height: 1080px; }
.og--banner { width: 1500px; height: 500px; padding: 64px 80px; }
.og__mark { height: 64px; width: auto; }
.og__title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tr-tight);
  line-height: 1.04;
  font-size: 76px;
  max-width: 17ch;
}
.og--square .og__title { font-size: 88px; }
.og--banner .og__title { font-size: 60px; max-width: 22ch; }
.og__sub { color: var(--c-mauve); font-size: 28px; max-width: 40ch; }
.og__rule { width: 180px; height: 4px; background: var(--grad-bolt-x); }
.og__foot {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
}


/* ══ 5.27 · LEGAL PAGES ══
   Prose-first. No trace, no chamfer, no rail numbering. These are read and
   printed, not demoed. Header, footer and cross-links on legal pages are
   STATIC markup, never JS-injected, because reviewers fetch with JS off. */

.lg { padding-block: var(--sp-7) var(--section-y); }
.lg__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 62em) {
  .lg__grid { grid-template-columns: 16rem minmax(0, 1fr); gap: var(--sp-8); }
}

.lg__head { margin-bottom: var(--sp-6); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-3); row-gap: var(--sp-4); align-items: center; }
.lg__head > :not(.art-glyph):not(nav) { grid-column: 1 / -1; }
.lg__head nav { justify-self: start; }
.lg__head .art-glyph {
  width: 2.25rem; height: 2.25rem;
  padding: 0.45rem;
  margin: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-accent-edge);
  background: var(--c-accent-quiet);
  stroke: var(--c-accent);
}
.lg__head h1 { font-size: var(--fs-3xl); max-width: 22ch; }
.lg__intro {
  color: var(--c-mauve);
  font-size: var(--fs-lg);
  max-width: var(--measure-legal);
  margin-top: var(--sp-4);
  line-height: var(--lh-prose);
}

/* dates + version, sits directly under the h1 */
.lg__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: var(--bd-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
}
.lg__meta b { color: var(--c-mauve); font-weight: 500; }

/* sticky in-page table of contents */
.lg__toc { align-self: start; }
@media (min-width: 62em) {
  .lg__toc { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}
.lg__toc-h {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
  margin-bottom: var(--sp-3);
}
.lg__toc ol { display: flex; flex-direction: column; gap: var(--sp-1); counter-reset: toc; }
.lg__toc a {
  display: block;
  font-size: var(--fs-xs);
  color: var(--c-mauve);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  border-left: 2px solid var(--c-line);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.lg__toc a:hover { color: var(--c-chrome); border-left-color: var(--c-accent); }

/* the document body */
.lg__body { max-width: 100%; width: min(100%, var(--measure-legal)); line-height: var(--lh-legal); color: var(--c-mauve); overflow-wrap: anywhere; min-width: 0; }
.lg__body > * + * { margin-top: var(--sp-4); }
.lg__body h2 {
  font-size: var(--fs-xl);
  color: var(--c-chrome);
  margin-top: var(--sp-8);
  scroll-margin-top: calc(var(--header-h) + var(--sp-5));
}
.lg__body h3 {
  font-size: var(--fs-base);
  color: var(--c-chrome);
  margin-top: var(--sp-6);
  scroll-margin-top: calc(var(--header-h) + var(--sp-5));
}
.lg__body ul, .lg__body ol { padding-left: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.lg__body li { list-style: disc; }
.lg__body ol > li { list-style: decimal; }
.lg__body a { color: var(--c-chrome); text-decoration-color: var(--c-accent-edge); overflow-wrap: anywhere; }
.lg__body strong { color: var(--c-chrome); }

/* a defined term, always mono so definitions never drift visually */
.term {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--c-accent);
  overflow-wrap: anywhere;
}

/* data tables: categories, retention, subprocessors, changelog */
.lg-table-wrap { border: var(--bd); background: var(--c-surface); margin-top: var(--sp-5); }
.lg-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lg-table { font-size: var(--fs-xs); min-width: 34rem; }
.lg-table th, .lg-table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: var(--bd-soft);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.lg-table thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-mauve-dim);
  font-weight: 500;
  background: var(--c-ink);
  white-space: nowrap;
}
.lg-table td { color: var(--c-mauve); }
.lg-table tbody tr:last-child td { border-bottom: 0; }
.lg-table caption {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
  border-bottom: var(--bd-soft);
}

/* unresolved variables. Deliberately loud: these must not ship unnoticed. */
.todo, .verify {
  display: inline;
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 500;
  padding: 0.15em 0.45em;
  border-radius: var(--r-sm);
  overflow-wrap: anywhere;
}
.todo   { color: var(--c-todo);   background: var(--c-todo-bg);   border: 1px solid var(--c-todo); }
.verify { color: var(--c-verify); background: var(--c-verify-bg); border: 1px solid var(--c-verify); }

.lg__warn {
  border: 1px solid var(--c-todo);
  background: var(--c-todo-bg);
  border-radius: var(--r);
  padding: var(--sp-4) var(--sp-5);
  color: var(--c-chrome);
  font-size: var(--fs-sm);
}

/* static header for legal pages: no burger, no JS, links always in the DOM */
/* .hdr--static / .ftr--static are retained as no-op aliases: chrome is static
   on every page now, so there is nothing for them to override. One header
   class, one behaviour: nav hidden below 62em, burger shown. */

/* Embeddable variant: same source, chrome removed for an explicit ?embed=1.
   Frame detection was removed from initEmbed on 2026-08-23: it made every
   iframed page lose its chrome, which silently invalidated the responsive rig.
   CAVEAT: .htaccess sets X-Frame-Options SAMEORIGIN. That header is currently
   inert because this LiteSpeed build ignores mod_headers, so embedding works
   today. If the host ever enables mod_headers, cross-origin embedding breaks
   and SAMEORIGIN must be replaced with a scoped
   Content-Security-Policy: frame-ancestors <platform origins>. */
.is-embed .lg-chrome { display: none; }
.is-embed .lg { padding-block: var(--sp-5); }
.is-embed .lg__toc { position: static; }

/* ══ 5.28 · PRINT ══
   Reviewers and lawyers print these. Ink-on-paper, links resolved. */
@media print {
  :root { --c-ink: #fff; --c-surface: #fff; --c-chrome: #111; --c-mauve: #222;
          --c-mauve-dim: #555; --c-line: #bbb; --c-accent: #444; }
  body { background: #fff; color: #111; font-size: 11pt; line-height: 1.5; }
  .lg-chrome, .hdr, .ftr, .lg__toc, .skip-link, .btn, .cta { display: none; }
  .lg__grid { display: block; }
  .lg__body { max-width: none; color: #111; }
  .lg__body h2 { break-after: avoid; page-break-after: avoid; margin-top: 18pt; }
  .lg__body a { color: #111; text-decoration: underline; }
  .lg__body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .lg-table, .lg-table-wrap { border-color: #bbb; }
  .lg-table-scroll { overflow: visible; }
  .lg-table { min-width: 0; }
  .lg-table thead { display: table-header-group; }
  .lg-table tr { break-inside: avoid; page-break-inside: avoid; }
  .todo, .verify { border: 1px solid #000; background: none; color: #000; }
}

/* ── 6 · UTILITIES (deliberately few) ────────────────────── */
.flow > * + * { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.w-full { width: 100%; }

/* ============================================================
   BLOG (build/blog/render.py)
   Cards, the article column, figures drawn from post META.
   ============================================================ */
.post-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 40em) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border: var(--bd);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  color: var(--c-chrome);
  text-decoration: none;
  min-width: 0;
  transition: border-color var(--dur) var(--ease), translate var(--dur) var(--ease);
}
.post-card:hover { border-color: var(--c-line-bright); translate: 0 -2px; }
.post-card:hover .card__link::after { translate: 3px 0; }
.post-card__art { display: block; margin-bottom: var(--sp-2); border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; }
.post-card__art .art { width: 100%; height: 100%; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--c-mauve-dim); }
.post-card__meta span { color: var(--c-accent); }
.post-card__title { font-family: var(--font-body); font-size: var(--fs-lg); font-weight: 600; line-height: var(--lh-snug); color: var(--c-chrome); }
.post-card__sum { font-size: var(--fs-sm); color: var(--c-mauve); line-height: var(--lh-normal); flex: 1; }

.post-cats { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.post-cats .chip { text-decoration: none; }
.post-cats .chip:hover { color: var(--c-chrome); border-color: var(--c-line-bright); }
.post-cats .chip[aria-current="page"] { color: var(--c-accent); border-color: var(--c-accent-edge); background: var(--c-accent-quiet); }
.post__rss { margin-top: var(--sp-6); font-family: var(--font-mono); font-size: var(--fs-xs); }
.post__rss a { color: var(--c-mauve); }

.post__meta { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--c-mauve-dim); }
.post__meta a { color: var(--c-accent); text-decoration: none; }

.post { padding-top: var(--sp-7); }
.post__grid { display: grid; gap: var(--sp-6); }
/* The side TOC only exists once there is a gutter to put it in, so it is
   hidden in the base layer and revealed at --bp-nav with the second column.
   It used to be shown by default and switched off by a max-width query, the
   one rule in the sheet that ran against the mobile-first grain. */
.post__toc { display: none; font-size: var(--fs-sm); }
@media (min-width: 62em) {
  .post__grid--toc { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--sp-8); }
  .post__toc { display: block; }
}

.post__body { max-width: 70ch; min-width: 0; line-height: var(--lh-prose); color: var(--c-mauve); font-size: var(--fs-base); }
.post__body > * + * { margin-top: var(--sp-4); }
.post__body > p:first-child { font-size: var(--fs-lg); color: var(--c-chrome); }
.post__body h2 { font-size: var(--fs-2xl); color: var(--c-chrome); margin-top: var(--sp-7); scroll-margin-top: calc(var(--header-h) + var(--sp-5)); }
.post__body h3 { font-size: var(--fs-lg); color: var(--c-chrome); margin-top: var(--sp-5); }
.post__body ul, .post__body ol { padding-left: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.post__body li { list-style: disc; }
.post__body ol > li { list-style: decimal; }
.post__body a { color: var(--c-chrome); text-decoration-color: var(--c-accent-edge); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.post__body a:hover { color: var(--c-accent); }
.post__body strong { color: var(--c-chrome); }
.post__body code { font-family: var(--font-mono); font-size: 0.9em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--c-surface-2); color: var(--c-chrome); overflow-wrap: anywhere; }
.post__body pre { padding: var(--sp-4); border: var(--bd-soft); border-radius: var(--r); background: var(--c-ink-deep); overflow-x: auto; }
.post__body pre code { padding: 0; background: none; font-size: var(--fs-sm); overflow-wrap: normal; }
.post__body blockquote { padding: var(--sp-3) var(--sp-4); border-left: 3px solid var(--c-accent); background: var(--c-surface); border-radius: 0 var(--r) var(--r) 0; color: var(--c-chrome); }
.post__body table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
.post__body th, .post__body td { text-align: left; vertical-align: top; padding: var(--sp-2) var(--sp-3); border-bottom: var(--bd-soft); }
.post__body th { color: var(--c-chrome); font-weight: 600; }

.post__fig { margin: var(--sp-6) 0; }
.post__fig .art { max-width: 34rem; }
.post__fig--compare { max-width: none; }
.post__cap { margin-top: var(--sp-2); font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--c-mauve-dim); }
.post__fignote { color: var(--c-mauve); }
.art__check { fill: none; stroke: var(--c-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* header: small "Log in" link to the app, wide screens only (the drawer has it below) */
.hdr__login { display: none; font-size: var(--fs-sm); font-weight: 500; color: var(--c-mauve); text-decoration: none; min-height: 44px; align-items: center; padding-inline: var(--sp-2); }
.hdr__login:hover { color: var(--c-chrome); }
@media (min-width: 62em) { .hdr__login { display: inline-flex; } }
/* Nav gap: tight as soon as the bar appears (set with the rest of .hdr__nav at
   --bp-nav), roomy once there is width for it. Was a 62em-to-74.99em range
   query, which put the wide-screen value in the base layer and made the
   narrow override undo it. Same rendering at every width, one direction. */
@media (min-width: 75em) { .hdr__nav { gap: var(--sp-5); } }
