/* ============================================================
   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-5xl); }
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); }

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

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

/* 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-accent-warm);
  color: var(--c-ink);
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-3); }

.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-ink);
  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;
    gap: var(--sp-5);
    margin-inline-start: var(--sp-3);
  }
}
.hdr__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-mauve);
  text-decoration: none;
  padding-block: 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: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--grad-bolt-x);
  border-radius: 2px;
}
.hdr__end { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-3); }
.hdr__cta { display: none; }
@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); }
@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); }

/* -- 5.7 hero -- */
.hero { padding-block: clamp(2.5rem, 1.4rem + 5vw, 5.5rem) var(--section-y); }
.hero h1 { max-width: 15ch; }
.hero__lead { max-width: 52ch; }

/* -- 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__list { position: relative; }

.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;
  gap: var(--sp-2);
  color: var(--c-mauve);
  border: var(--bd-soft);
  border-radius: var(--r-sm);
  padding: 0.4em 0.7em;
  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;
  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__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;
  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__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-ink);
  background: var(--c-wait);
  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 -- */
.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 and left roughly a
     third of a screen empty above the footer. The border-top is the divider. */
}
.ftr__grid {
  display: grid;
  gap: var(--sp-7);
  justify-items: stretch;   /* columns span the container */
  text-align: start;        /* alignment without collapsing the width */
}
@media (min-width: 30em) { .ftr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) {
  .ftr__grid { grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: var(--sp-6); }
}
.ftr__intro { color: var(--c-mauve); font-size: var(--fs-sm); max-width: 34ch; margin-top: var(--sp-4); overflow-wrap: anywhere; }
.ftr__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-2);
}
@media (min-width: 64em) { .ftr__h { margin-bottom: var(--sp-4); } }
.ftr__list { display: flex; flex-direction: column; gap: var(--sp-1); }
.ftr__list a {
  display: flex;
  align-items: center;
  min-height: 44px;            /* tap target while stacked */
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
  color: var(--c-mauve);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
@media (min-width: 64em) {
  /* five columns side by side: back to a tight reading rhythm, pointer is fine */
  .ftr__list { gap: var(--sp-3); }
  .ftr__list a { min-height: 0; display: block; }
}
.ftr__list a:hover { color: var(--c-chrome); }
.ftr__base {
  overflow-wrap: anywhere;
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: var(--bd-soft);
  /* stacked and left on mobile; the email sits beneath the copyright, not
     pushed to the far edge by space-between */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--c-mauve-dim);
}


/* -- 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: 20ch; }
.pagehead__lead { color: var(--c-mauve); font-size: var(--fs-lg); max-width: 56ch; }

/* -- 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);
}
.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; }
@media (min-width: 46em) { .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: 46em) {
  .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); }
.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%; }
