/* site/site.css — assay's product surface.
 *
 * Layered on ./vendor/brand/tokens.css: the palette, type scale and spacing
 * below all resolve from assay's OWN generated tokens, so the site is still
 * dressed in the tool's output rather than in a hand-picked theme. What is
 * new here is the surface itself.
 *
 * The previous version of this file was a cream document: one 880px column,
 * hairline borders, no depth, no motion, and the tool's actual output shown
 * nowhere above the fold. It rendered like a printed README because that is
 * structurally what it was. This version is a dark instrument console —
 * layered surfaces, a chroma-bearing elevation ladder, a single ambient wash
 * built from the brand accent, and one easing curve — with the generated kits
 * themselves as the first thing on the page.
 *
 * Colour rule: every colour is declared once, here, and composed with var()
 * everywhere else. The three brand values (--color-ink / --color-paper /
 * --color-accent) come from tokens.css and are never restated.
 */

/* ============================================================ 1. FACES ==== */

/* Three faces, all already bundled by assay itself (fonts/ in the repo, each
   OFL 1.1 with its licence beside it) — so the site's type is drawn from the
   same registry the tool offers a config. Space Grotesk carries display,
   Manrope carries running prose, JetBrains Mono carries every number, path
   and command. Three roles, three faces, real contrast between them. */
@font-face {
  font-family: "JetBrains Mono";
  src: url("./vendor/fonts/JetBrainsMono[wght].woff2") format("woff2-variations");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./vendor/fonts/SpaceGrotesk[wght].woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("./vendor/fonts/Manrope[wght].woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}

/* ======================================================= 2. SUBSTRATE ===== */

:root {
  color-scheme: dark;

  /* Signal hue, taken from the brand accent (#0F7A5C) so the wash, the focus
     ring and the live dot are all the same green the tool generated. */
  --sig-h: 166;
  --sub-h: 214; /* the surface's own cool hue, one family away from signal */

  /* Substrate ladder. Chroma stays <= 0.016 so nothing here competes with a
     kit's palette when one is on screen. */
  --s-0: oklch(0.155 0.014 var(--sub-h));
  --s-1: oklch(0.196 0.014 var(--sub-h));
  --s-2: oklch(0.238 0.014 var(--sub-h));
  --s-3: oklch(0.288 0.013 var(--sub-h));
  --edge-lo: oklch(0.32 0.012 var(--sub-h));
  --edge-hi: oklch(0.44 0.014 var(--sub-h));

  --ink-1: oklch(0.965 0.004 var(--sub-h));
  --ink-2: oklch(0.80 0.010 var(--sub-h));
  --ink-3: oklch(0.665 0.012 var(--sub-h));

  --shadow-ink: oklch(0.08 0.03 262);

  --sig: oklch(0.74 0.15 var(--sig-h));
  --sig-ink: oklch(0.84 0.12 var(--sig-h));
  --sig-glow: oklch(0.86 0.18 var(--sig-h));
  --sig-wash: color-mix(in oklab, var(--sig) 13%, var(--s-1));

  --warn: oklch(0.78 0.15 75);
  --fail: oklch(0.72 0.17 27);
  --fail-wash: color-mix(in oklab, var(--fail) 14%, var(--s-1));

  /* Depth: a value step, a lit top edge, and a chroma-bearing contact
     shadow. Never black — a black shadow on a coloured ground reads as a
     hole rather than as height. */
  --lit: inset 0 1px 0 var(--edge-hi);
  --elev-1: 0 1px 2px -1px oklch(from var(--shadow-ink) l c h / 30%),
            0 4px 12px -4px oklch(from var(--shadow-ink) l c h / 34%);
  --elev-2: 0 2px 4px -2px oklch(from var(--shadow-ink) l c h / 36%),
            0 14px 34px -10px oklch(from var(--shadow-ink) l c h / 44%);
  --elev-3: 0 4px 8px -4px oklch(from var(--shadow-ink) l c h / 40%),
            0 30px 70px -16px oklch(from var(--shadow-ink) l c h / 52%);

  --r-panel: 12px;
  --r-control: 8px;
  --r-flush: 0px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms;
  --slow: 420ms;

  --f-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-data: "JetBrains Mono", ui-monospace, monospace;
  --f-text: "Manrope", ui-sans-serif, system-ui, "Segoe UI", sans-serif;

  --shell: 1180px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--s-0);
  color: var(--ink-1);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 640px) {
  .shell { padding-inline: 18px; }
}

/* ============================================================ 3. TYPE ===== */

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  margin: 0;
}

.display {
  font-size: clamp(2.3rem, 1.35rem + 4.2vw, 4.15rem);
  line-height: 1.0;
  letter-spacing: -0.042em;
  font-weight: 700;
  text-wrap: balance;
}

.display em {
  font-style: normal;
  color: var(--sig-ink);
}

h2.section-title {
  font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.eyebrow {
  font-family: var(--f-data);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.lede {
  font-size: clamp(1.02rem, 0.97rem + 0.24vw, 1.18rem);
  color: var(--ink-2);
  max-width: 54ch;
  margin: 14px 0 0;
}

.note {
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 74ch;
}

code, .mono, .data {
  font-family: var(--f-data);
  font-variant-numeric: tabular-nums;
}

a { color: var(--sig-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-1); }

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

/* ========================================================== 4. HEADER ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--s-0) 92%, transparent);
  border-bottom: 1px solid var(--edge-lo);
}

.site-header__in {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.site-header img { width: 26px; height: 26px; flex: none; }

.wordmark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  font-family: var(--f-data);
  font-size: 0.8rem;
}

.site-header nav a {
  color: var(--ink-3);
  text-decoration: none;
  padding: 8px 12px;
  min-height: 30px;
  border-radius: var(--r-control);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.site-header nav a:hover { color: var(--ink-1); background: var(--s-2); }

/* Below the tablet breakpoint the full nav cannot fit on one row: it wrapped
   to two lines and pushed "source" past the right edge, which is both ugly
   and a WCAG 2.2 target failure (a control clipped at the viewport edge).
   The two section jumps are the ones a phone reader least needs — the page is
   short enough to scroll — so they are dropped rather than shrunk. */
@media (max-width: 700px) {
  .site-header nav a[data-optional] { display: none; }
  .site-header nav a { padding: 8px 10px; font-size: 0.76rem; }
}

/* ============================================================ 5. BANDS ==== */

.band {
  padding-block: clamp(56px, 4vw, 96px);
  border-top: 1px solid var(--edge-lo);
  position: relative;
}

.band--tone { background: var(--s-1); }

.band__head { margin-bottom: 28px; }
.band__head .eyebrow { display: block; margin-bottom: 10px; }

/* The one ambient wash on the page: a soft bloom in the brand's own hue
   behind the hero. Two cheap radial gradients, painted once — no blur
   filter, no blend mode, both of which measured a double-digit fps cost on
   a sibling project today. */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(34px, 2.6vw, 46px) clamp(56px, 5vw, 96px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 150%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52% 46% at 16% 4%, oklch(from var(--sig-glow) l c h / 20%), transparent 68%),
    radial-gradient(44% 40% at 92% 0%, oklch(0.7 0.14 250 / 13%), transparent 70%);
}

/* An interior page's hero carries a title and one line, not a console, so it
   does not need the home page's vertical room. */
.hero--page { padding-block: clamp(30px, 2.4vw, 42px) clamp(30px, 2.6vw, 46px); }

/* ============================================================ 6. HERO ===== */

.hero__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); align-items: end; gap: 40px; }
}

.hero__claims {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.claim {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--s-2);
  box-shadow: var(--lit);
  font-family: var(--f-data);
  font-size: 0.78rem;
  color: var(--ink-2);
}

.claim b {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-data);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sig);
  box-shadow: 0 0 0 3px oklch(from var(--sig) l c h / 22%);
}

/* ========================================================= 7. CONSOLE ===== */

.console {
  border-radius: var(--r-panel);
  background: var(--s-1);
  box-shadow: var(--lit), var(--elev-3);
  overflow: hidden;
}

.console__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--s-2);
  border-bottom: 1px solid var(--edge-lo);
}

.console__title {
  font-family: var(--f-data);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.console__tabs {
  display: flex;
  gap: 4px;
  padding: 10px 10px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* On a phone the five tabs do not fit on one row. Scrolling them left the
   last two sitting outside the viewport — reachable by swipe, but a control
   clipped at the edge is a WCAG 2.2 target-size failure and, more simply,
   nobody discovers a tab they cannot see. They wrap instead. */
@media (max-width: 700px) {
  .console__tabs { flex-wrap: wrap; overflow-x: visible; padding-bottom: 4px; }
  .tab { border-radius: var(--r-control); }
  .tab[aria-selected="true"] { box-shadow: inset 0 0 0 1px var(--sig); }
}

.tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--f-data);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  padding: 9px 13px;
  min-height: 34px;
  border-radius: var(--r-control) var(--r-control) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.tab:hover { color: var(--ink-1); background: var(--s-2); }

.tab[aria-selected="true"] {
  color: var(--ink-1);
  background: var(--s-2);
  box-shadow: inset 0 2px 0 var(--sig);
}

.tab__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
  box-shadow: 0 0 0 1px oklch(from var(--ink-1) l c h / 22%);
}

.console__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--edge-lo);
  border-top: 1px solid var(--edge-lo);
}

@media (min-width: 780px) {
  .console__body { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
}

.pane {
  background: var(--s-1);
  padding: 20px;
}

.pane--out { background: var(--s-0); }

.pane__label {
  font-family: var(--f-data);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* --- input pane: the real config ---------------------------------------- */

.cfg {
  font-family: var(--f-data);
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.emits {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--edge-lo);
}

.emits__list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.emits__list span {
  font-family: var(--f-data);
  font-size: 0.68rem;
  color: var(--ink-3);
  background: var(--s-2);
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.cfg .k { color: var(--ink-3); }
.cfg .v { color: var(--ink-1); }

.swatch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-family: var(--f-data);
  font-size: 0.8rem;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
  box-shadow: inset 0 0 0 1px oklch(from var(--ink-1) l c h / 24%);
}

.swatch-line .role { color: var(--ink-3); width: 4.2em; }
.swatch-line .hex { color: var(--ink-1); letter-spacing: 0.02em; }

/* --- output pane: the generated kit -------------------------------------- */

.stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

@media (max-width: 420px) {
  .stage { grid-template-columns: 1fr; }
}

.stage__mark {
  width: 128px;
  height: 128px;
  border-radius: var(--r-panel);
  background: var(--s-2);
  box-shadow: var(--lit), var(--elev-1);
  display: grid;
  place-items: center;
  padding: 18px;
}

.stage__mark img { width: 100%; height: 100%; display: block; }

.variants { display: flex; gap: 10px; flex-wrap: wrap; }

.variant {
  width: 54px;
  border-radius: var(--r-control);
  padding: 9px;
  text-align: center;
  box-shadow: var(--lit);
}

.variant img { width: 100%; height: auto; display: block; }
.variant--paper { background: var(--ink-1); }
.variant--ink { background: var(--s-3); }

.variant span {
  display: block;
  margin-top: 7px;
  font-family: var(--f-data);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.variant--paper span, .variant--ink span { color: var(--ink-3); }

.favrow {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--r-control);
  background: var(--s-1);
  box-shadow: var(--lit);
}

.fav { text-align: center; }
.fav img { display: block; margin: 0 auto 6px; image-rendering: pixelated; }
.fav span {
  font-family: var(--f-data);
  font-size: 0.6rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.fav--16 img { width: 16px; height: 16px; }
.fav--32 img { width: 32px; height: 32px; }
.fav--48 img { width: 48px; height: 48px; }

.favrow__note {
  margin-left: auto;
  font-family: var(--f-data);
  font-size: 0.65rem;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.5;
  max-width: 15em;
}

/* --- contrast gate readout ---------------------------------------------- */

.gate { margin-top: 18px; }

.gate__row {
  display: grid;
  grid-template-columns: 7.6em 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-family: var(--f-data);
  font-size: 0.76rem;
  border-top: 1px solid var(--edge-lo);
}

.gate__row:first-of-type { border-top: 0; }
.gate__pair { color: var(--ink-3); }

.gate__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--s-2);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px oklch(from var(--ink-1) l c h / 8%);
}

.gate__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--sig);
  transform-origin: left center;
  transition: width var(--slow) var(--ease);
}

.gate__fill--warn { background: var(--warn); }
.gate__fill--fail { background: var(--fail); }

.gate__val { color: var(--ink-1); font-weight: 600; letter-spacing: 0.01em; }

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--f-data);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.verdict--pass { background: color-mix(in oklab, var(--sig) 18%, var(--s-1)); color: var(--sig-ink); }
.verdict--warn { background: color-mix(in oklab, var(--warn) 18%, var(--s-1)); color: var(--warn); }
.verdict--fail { background: var(--fail-wash); color: var(--fail); }

/* --- the refusal state --------------------------------------------------- */

.refusal {
  border-radius: var(--r-control);
  background: var(--fail-wash);
  padding: 20px;
  box-shadow: var(--lit);
}

.refusal__big {
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--fail);
  font-variant-numeric: tabular-nums;
}

.refusal__msg {
  font-family: var(--f-data);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-1);
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--r-control);
  background: oklch(from var(--s-0) l c h / 70%);
  overflow-wrap: anywhere;
}

.refusal__msg::before {
  content: "$ assay gen --config case-study/shipgauge/brand.config.json";
  display: block;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.refusal__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* fade the output pane in when the tab changes */
@keyframes pane-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.pane--out > * { animation: pane-in var(--slow) var(--ease) both; }

/* =========================================================== 8. FAMILY ==== */

.families { display: grid; gap: 16px; }

.family {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--r-panel);
  background: var(--s-1);
  box-shadow: var(--lit), var(--elev-1);
  transition: box-shadow var(--slow) var(--ease), transform var(--slow) var(--ease);
}

.family:hover { box-shadow: var(--lit), var(--elev-2); transform: translateY(-2px); }

@media (min-width: 760px) {
  .family { grid-template-columns: 15.5rem minmax(0, 1fr); gap: 24px; }
}

.family__name {
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.family__desc { font-size: 0.85rem; color: var(--ink-3); margin: 6px 0 0; line-height: 1.5; }

.family__strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.spec {
  border-radius: var(--r-control);
  padding: 14px;
  text-align: center;
  box-shadow: var(--lit);
  transition: transform var(--fast) var(--ease);
}

.spec:hover { transform: translateY(-2px); }
.spec img { width: 100%; max-width: 96px; height: auto; display: block; margin: 0 auto; }
/* The 16px raster is the artifact that decides whether a mark survives, so it
   is shown magnified with its real pixel grid intact rather than smoothly
   resampled — smoothing would hide exactly the defect the proof exists for. */
.spec img.pixel { image-rendering: pixelated; }

.spec span {
  display: block;
  margin-top: 10px;
  font-family: var(--f-data);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.72;
}

/* ========================================================== 9. NUMBERS ==== */

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

@media (min-width: 860px) {
  .readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.readout {
  padding: 20px;
  border-radius: var(--r-panel);
  background: var(--s-1);
  box-shadow: var(--lit), var(--elev-1);
}

.readout__n {
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
}

.readout__l {
  margin-top: 10px;
  font-family: var(--f-data);
  font-size: 0.72rem;
  color: var(--ink-3);
  line-height: 1.5;
}

/* ============================================================ 10. CLI ===== */

pre.cli {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--r-panel);
  background: var(--s-1);
  box-shadow: var(--lit), var(--elev-1);
  overflow-x: auto;
  font-family: var(--f-data);
  font-size: 0.82rem;
  line-height: 1.85;
  color: var(--ink-2);
}

@media (max-width: 560px) {
  pre.cli { font-size: 0.72rem; padding: 14px 16px; }
}

pre.cli .p { color: var(--sig-ink); user-select: none; }
pre.cli .c { color: var(--ink-3); }
pre.cli b { color: var(--ink-1); font-weight: 600; }

/* ========================================================= 11. DETAILS ==== */

details.more {
  margin-top: 18px;
  border-radius: var(--r-control);
  background: var(--s-1);
  box-shadow: var(--lit);
  overflow: hidden;
}

details.more > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-data);
  font-size: 0.78rem;
  color: var(--ink-2);
  transition: background-color var(--fast) var(--ease);
}

details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { background: var(--s-2); }
details.more > summary::before { content: "+"; color: var(--sig-ink); font-weight: 700; }
details.more[open] > summary::before { content: "\2212"; }
details.more .body { padding: 0 16px 16px; font-size: 0.88rem; color: var(--ink-2); line-height: 1.65; }
details.more .body p { margin: 0 0 10px; max-width: 72ch; }
details.more .body p:last-child { margin-bottom: 0; }

/* ========================================================== 12. FOOTER ==== */

.site-footer {
  border-top: 1px solid var(--edge-lo);
  padding-block: 32px 44px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.site-footer nav a {
  color: var(--ink-3);
  text-decoration: none;
  padding: 7px 11px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-control);
  background: var(--s-1);
  font-family: var(--f-data);
  font-size: 0.76rem;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.site-footer nav a:hover { background: var(--s-2); color: var(--ink-1); }

/* attribution-kit v1 — the maker's mark inherits colour; the pin takes the signal */
.aj-attribution { margin: 0; font: inherit; line-height: 1.5; color: inherit; }
.aj-attribution__mark { display: inline-block; width: 20px; height: 20px; vertical-align: -0.3em; margin-right: 0.45em; }
.aj-attribution a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.aj-attribution a:hover { text-decoration-thickness: 2px; color: var(--ink-1); }
.aj-attribution a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.aj-attribution__sep { margin: 0 0.35em; }
.aj-attribution { --aj-attribution-signal: oklch(0.74 0.15 166); }

/* =================================================== 13. PROSE PAGES ====== */
/* limitations.html and any other reading page: same surface, one column. */

/* A reading page laid out as two columns: a sticky index on the left, the
   callouts on the right. The single centred 68ch column this replaced left
   a third of a 1440px viewport empty on both sides and read as an unstyled
   document dropped into a product. */
.docs {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 940px) {
  .docs { grid-template-columns: 15rem minmax(0, 1fr); gap: 56px; }
  .docs__index { position: sticky; top: 84px; }
}

.docs__index ol {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  counter-reset: idx;
}

.docs__index li { counter-increment: idx; }

.docs__index a {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  min-height: 34px;
  align-items: center;
  border-radius: var(--r-control);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.35;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.docs__index a::before {
  content: counter(idx);
  font-family: var(--f-data);
  font-size: 0.7rem;
  color: var(--sig-ink);
  flex: none;
}

.docs__index a:hover { background: var(--s-2); color: var(--ink-1); }

.prose { max-width: 68ch; }
.prose h2 { margin: 40px 0 12px; }
.prose h3 { font-size: 1.05rem; margin: 26px 0 8px; letter-spacing: -0.02em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 1.1em; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose code { background: var(--s-2); padding: 1px 5px; border-radius: 4px; font-size: 0.86em; }

.callout {
  padding: 16px 18px;
  border-radius: var(--r-panel);
  background: var(--s-1);
  box-shadow: var(--lit), var(--elev-1);
  margin: 0 0 22px;
}

.callout p:last-child { margin-bottom: 0; }

table.plain {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--f-data);
  font-size: 0.8rem;
  margin: 0 0 18px;
  display: block;
  overflow-x: auto;
}

table.plain th, table.plain td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--edge-lo);
  vertical-align: top;
}

table.plain th { color: var(--ink-3); font-weight: 600; white-space: nowrap; }

/* ==================================================== 14. REDUCED MOTION == */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .docs__index a { transition: none; }
  .pane--out > * { animation: none; }
  .family, .family:hover, .spec, .spec:hover { transform: none; transition: none; }
  .tab, .site-header nav a, .site-footer nav a, details.more > summary, .gate__fill {
    transition: none;
  }
}
