/*
 * intarget base layer: reset, design tokens, type, layout primitives, components.
 * Shared by every landing page. Do not edit for one page: override tokens and classes in docs/<slug>/page.css.
 * Contract and markup for every component: DESIGN.md at the repo root.
 *
 * Rules kept here so page authors can restyle freely:
 *   - flat, single-class selectors (`.card`, `.card__title`, `.btn--primary`); no ids, no !important
 *   - everything that varies per page is a custom property on :root
 *   - element defaults are wrapped in :where() so they have zero specificity
 */

/* ------------------------------------------------------------------------------------------------
 * 1. Tokens. Override these on :root in page.css. Defaults: a neutral light theme (used by the hub).
 * ---------------------------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Surfaces and text */
  --bg: #f4f5f7;          /* page */
  --bg-2: #ffffff;        /* raised: cards, nav when scrolled */
  --bg-3: #e9ebee;        /* sunken: code, table heads, chips */
  --fg: #17181b;          /* body text            (>= 15:1 on --bg) */
  --fg-muted: #484b52;    /* secondary text       (>= 7:1)  */
  --fg-subtle: #63666d;   /* captions, meta       (>= 4.5:1 on all three surfaces) */
  --line: #d5d8dd;        /* hairlines, borders (decorative, not text) */

  /* Brand */
  --accent: #2f4fd6;      /* links, primary buttons; must be >= 4.5:1 on --bg */
  --accent-2: #0d7a5f;    /* secondary highlight */
  --accent-fg: #ffffff;   /* text on --accent;     must be >= 4.5:1 on --accent */

  /* Status */
  --ok: #18794a;
  --warn: #9a5b00;
  --danger: #b42318;

  /* Type */
  --font-display: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 700;
  --display-tracking: -0.025em;
  --heading-weight: 650;

  /* Shape */
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgb(20 20 30 / 0.06), 0 8px 24px -8px rgb(20 20 30 / 0.12);
  --maxw: 72rem;          /* .wrap width */
  --measure: 66ch;        /* comfortable line length for prose */

  /* The always-light panel that hosts the Google Form (Google renders a white form; keep it light). */
  --sheet-bg: #ffffff;
  --sheet-fg: #1b1c1f;
  --sheet-line: #dcdfe4;
  --sheet-accent: #2f4fd6; /* buttons inside the sheet; set to a dark-enough page accent */

  /* Fluid type scale: 360px -> 1440px viewport */
  --step--2: clamp(0.78rem, 0.76rem + 0.09vw, 0.84rem);
  --step--1: clamp(0.875rem, 0.85rem + 0.12vw, 0.95rem);
  --step-0: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
  --step-1: clamp(1.18rem, 1.11rem + 0.33vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.28rem + 0.55vw, 1.75rem);
  --step-3: clamp(1.7rem, 1.5rem + 0.9vw, 2.3rem);
  --step-4: clamp(2rem, 1.7rem + 1.45vw, 3rem);
  --step-5: clamp(2.35rem, 1.85rem + 2.3vw, 4rem);
  --step-6: clamp(2.6rem, 1.85rem + 3.6vw, 5.5rem);

  /* Fluid spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
  --space-m: clamp(1.5rem, 1.4rem + 0.4vw, 1.75rem);
  --space-l: clamp(2rem, 1.8rem + 0.9vw, 2.5rem);
  --space-xl: clamp(3rem, 2.6rem + 1.6vw, 4rem);
  --space-2xl: clamp(4rem, 3.2rem + 3.4vw, 6.5rem);
  --space-3xl: clamp(5rem, 3.8rem + 5vw, 9rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: 2px solid var(--accent);
}

/* ------------------------------------------------------------------------------------------------
 * 2. Reset and element defaults (zero specificity)
 * ---------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

:where(html) {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* anchors land below the sticky nav */
}

:where(body) {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote, pre, table) { margin: 0; }

:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
:where(h1) { font-size: var(--step-5); letter-spacing: var(--display-tracking); line-height: 1.05; }
:where(h2) { font-size: var(--step-4); letter-spacing: -0.02em; line-height: 1.08; }
:where(h3) { font-size: var(--step-2); }
:where(h4) { font-size: var(--step-1); }
:where(h5, h6) { font-size: var(--step-0); }

:where(p, li, dd, figcaption) { text-wrap: pretty; }
:where(ul, ol) { padding-inline-start: 1.25em; }
:where(li + li) { margin-block-start: 0.35em; }
:where(strong, b) { font-weight: 650; }
:where(small) { font-size: var(--step--1); }
:where(hr) { border: 0; border-block-start: 1px solid var(--line); margin-block: var(--space-l); }

:where(a) {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 0.15s, color 0.15s;
}
:where(a:hover) { text-decoration-thickness: 2px; }

:where(img, svg, video, canvas, iframe) { display: block; max-width: 100%; }
:where(img, video) { height: auto; }
:where(svg) { flex-shrink: 0; }

:where(input, button, textarea, select) { font: inherit; color: inherit; }
:where(button) { cursor: pointer; }

:where(code, kbd, samp, pre) { font-family: var(--font-mono); font-size: 0.9em; font-variant-ligatures: none; }
:where(:not(pre) > code) {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--fg);
  font-size: 0.86em;
  white-space: break-spaces;
}

:where(table) { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
:where(th, td) { padding: 0.65em 0.9em; text-align: start; vertical-align: top; border-block-end: 1px solid var(--line); }
:where(th) { font-weight: 600; }
:where(thead th) { font-size: var(--step--1); color: var(--fg-muted); border-block-end-color: var(--fg-subtle); }
:where(caption) { caption-side: bottom; padding-block-start: var(--space-2xs); font-size: var(--step--1); color: var(--fg-subtle); text-align: start; }

:where(blockquote) { padding-inline-start: var(--space-s); border-inline-start: 3px solid var(--accent); color: var(--fg-muted); }

::selection { background: var(--accent); color: var(--accent-fg); }

:focus-visible { outline: var(--focus); outline-offset: 3px; border-radius: 2px; }
:where([tabindex="-1"]):focus { outline: none; }

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

.skip-link {
  position: absolute;
  z-index: 100;
  inset-block-start: var(--space-2xs);
  inset-inline-start: var(--space-2xs);
  padding: 0.6em 1em;
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.15s;
}
.skip-link:focus { transform: none; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }
.nums { font-variant-numeric: tabular-nums; }
.measure { max-width: var(--measure); }
.center { text-align: center; margin-inline: auto; }

/* ------------------------------------------------------------------------------------------------
 * 4. Layout primitives
 * ---------------------------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: calc(48rem + 2 * var(--gutter)); }

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }

/* Section heading block: eyebrow + h2 + lead */
.section__head { max-width: var(--measure); margin-block-end: var(--space-xl); }
.section__head > * + * { margin-block-start: var(--space-s); }

/* Vertical rhythm: set --gap on the element to change it */
.stack { display: flex; flex-direction: column; justify-content: flex-start; }
.stack > * { margin-block: 0; }
.stack > * + * { margin-block-start: var(--gap, var(--space-s)); }

/* Horizontal group that wraps */
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--space-xs)); }

/* Auto-fit grid: set --min for the narrowest column */
.grid {
  display: grid;
  gap: var(--gap, var(--space-m));
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 16rem), 100%), 1fr));
}

/* Two columns that collapse to one below ~52rem. --split sets the ratio (default 1fr 1fr) */
.split { display: grid; gap: var(--gap, var(--space-xl)); align-items: var(--align, start); }
@media (min-width: 52rem) {
  .split { grid-template-columns: var(--split, 1fr 1fr); }
}

/* ------------------------------------------------------------------------------------------------
 * 5. Components
 * ---------------------------------------------------------------------------------------------- */

/* --- Nav: brand mark + one CTA ---------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-block-end: 1px solid transparent;
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  transition: border-color 0.2s;
}
.nav.is-scrolled { border-block-end-color: var(--line); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: 4rem;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav__inner > .btn { flex: 0 1 auto; min-width: 0; padding-inline: 0.9em; }
.nav__brand { flex: none; }
.nav__brand svg { width: 1.5em; height: 1.5em; color: var(--accent); }
.nav__by { color: var(--fg-subtle); font-family: var(--font-body); font-size: var(--step--1); font-weight: 500; letter-spacing: 0; }
@media (max-width: 30rem) { .nav__by { display: none; } }
/* Words a narrow nav button can drop: <span>Take the <span class="nav__wide">4-minute </span>survey</span>
   (the outer span keeps the label one flex item, so .btn's gap does not open up between the words). */
@media (max-width: 40rem) { .nav__wide { display: none; } }

/* --- Type components --------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.display {
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.02;
  text-wrap: balance;
}

.lead {
  max-width: var(--measure);
  color: var(--fg-muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

/* --- Buttons ----------------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 2.75rem; /* 44px touch target */
  padding: 0.55em 1.15em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { border-color: var(--fg-subtle); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--fg)); border-color: transparent; }

.btn--ghost { background: transparent; border-color: color-mix(in srgb, var(--fg) 28%, transparent); }
.btn--ghost:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); border-color: var(--fg-muted); }

.btn--lg { min-height: 3.25rem; padding: 0.75em 1.5em; font-size: var(--step-0); border-radius: calc(var(--radius) + 2px); }
.btn__arrow { transition: transform 0.15s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* --- Tag --------------------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.2em 0.65em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.tag--accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }

/* --- Card -------------------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  color: var(--fg);
}
.card__title { font-size: var(--step-1); line-height: 1.25; }
.card__body { color: var(--fg-muted); }
.card__foot { margin-block-start: auto; padding-block-start: var(--space-xs); }
/* Whole-card link: put .card__link on the one <a> inside; its ::after covers the card */
.card--link { position: relative; transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s var(--ease); }
.card--link:hover { border-color: var(--fg-subtle); box-shadow: var(--shadow); transform: translateY(-2px); }
.card__link { color: inherit; text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link:focus-within { outline: var(--focus); outline-offset: 3px; }
.card__link:focus-visible { outline: none; }

/* --- KPI: big figure + label + footnote marker ------------------------------------------------- */
.kpi { display: flex; flex-direction: column; gap: var(--space-2xs); }
.kpi__figure {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: var(--display-weight);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
}
.kpi__unit { margin-inline-start: 0.12em; font-size: 0.42em; font-weight: 500; letter-spacing: 0; color: var(--fg-muted); }
.kpi__label { max-width: 28ch; color: var(--fg-muted); font-size: var(--step--1); line-height: 1.45; }

/* Footnote reference marker, used in .kpi and in prose: <sup class="fnref"><a href="#fn-1" id="fnref-1">1</a></sup> */
.fnref { font-size: 0.72em; line-height: 0; vertical-align: super; font-family: var(--font-mono); font-weight: 500; }
.fnref a { padding-inline: 0.15em; text-decoration: none; }
.fnref a::before { content: "["; }
.fnref a::after { content: "]"; }

/* --- Steps: numbered how-it-works -------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--space-l) var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li { counter-increment: step; margin: 0; padding-block-start: var(--space-s); border-block-start: 1px solid var(--line); }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-block-end: var(--space-xs);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.steps__title { font-size: var(--step-1); margin-block-end: var(--space-2xs); }
.steps > li p { color: var(--fg-muted); }

/* --- Status: "Works today" / "Building next" --------------------------------------------------- */
.status {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
}
.status__col { padding: var(--space-m); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); }
.status__col--next { background: transparent; border-style: dashed; }
.status__title { display: flex; align-items: center; gap: 0.6em; margin-block-end: var(--space-s); font-size: var(--step-1); }
.status__title::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.status__col--next .status__title::before { background: transparent; border: 2px solid var(--warn); box-shadow: none; }
.status__list { padding: 0; list-style: none; }
.status__list > li { position: relative; margin: 0; padding-block: 0.55em; padding-inline-start: 1.5em; border-block-start: 1px solid var(--line); color: var(--fg-muted); }
.status__list > li:first-child { border-block-start: 0; padding-block-start: 0; }
.status__list > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.2em;
  inset-block-start: calc(0.55em + 0.55em);
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--ok);
}
.status__list > li:first-child::before { inset-block-start: 0.55em; }
.status__col--next .status__list > li::before { background: transparent; border: 1.5px solid var(--warn); }
.status__list strong { color: var(--fg); }

/* --- Compare: responsive comparison table ------------------------------------------------------ */
/* Wrapper scrolls horizontally on narrow screens; the first column stays put. */
.compare {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  -webkit-overflow-scrolling: touch;
}
.compare table { min-width: 36rem; font-size: var(--step--1); }
.compare th, .compare td { padding: 0.85em 1em; }
.compare thead th { background: var(--bg-3); color: var(--fg); font-size: var(--step--1); white-space: nowrap; }
.compare tbody th { font-weight: 600; }
.compare th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--bg-2); box-shadow: inset -1px 0 0 var(--line); }
.compare thead th:first-child { background: var(--bg-3); }
.compare tr:last-child > * { border-block-end: 0; }
.compare__us { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.yes, .no, .part { display: inline-flex; align-items: baseline; gap: 0.4em; white-space: nowrap; }
.yes::before, .no::before, .part::before { font-family: var(--font-mono); font-weight: 700; }
.yes::before { content: "\2713"; color: var(--ok); }
.no::before { content: "\2715"; color: var(--danger); }
.part::before { content: "~"; color: var(--warn); }

/* --- FAQ: <details> accordion ------------------------------------------------------------------ */
.faq { border-block-start: 1px solid var(--line); }
.faq details { border-block-end: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  padding-block: var(--space-s);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 1em;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 400;
  text-align: center;
  transition: transform 0.2s var(--ease);
}
.faq details[open] > summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq__a { max-width: var(--measure); padding-block-end: var(--space-m); color: var(--fg-muted); }
.faq__a > * + * { margin-block-start: var(--space-xs); }

/* --- Codeblock with copy button (button is added by site.js) ----------------------------------- */
.codeblock {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-3);
}
.codeblock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  min-height: 2.5rem;
  padding-inline: var(--space-s) var(--space-2xs);
  border-block-end: 1px solid var(--line);
  color: var(--fg-subtle);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.04em;
}
.codeblock pre { margin: 0; padding: var(--space-s); overflow-x: auto; font-size: var(--step--1); line-height: 1.65; tab-size: 2; }
.codeblock code { color: var(--fg); }
.codeblock__copy {
  min-height: 2rem;
  padding: 0.25em 0.75em;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
}
.codeblock__copy:hover { background: var(--bg-2); border-color: var(--line); color: var(--fg); }
.codeblock__copy.is-copied { color: var(--ok); }
/* Without a bar, the button floats top-right */
.codeblock > .codeblock__copy { position: absolute; inset-block-start: var(--space-2xs); inset-inline-end: var(--space-2xs); }
.tok-c { color: var(--fg-subtle); }       /* optional hand-marked comment */
.tok-k { color: var(--accent); }          /* optional keyword / prompt */
.tok-s { color: var(--accent-2); }        /* optional string */

/* --- Callout ----------------------------------------------------------------------------------- */
.callout {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-s) var(--space-m);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg-muted);
}
.callout__title { color: var(--fg); font-family: var(--font-body); font-size: var(--step-0); font-weight: 650; }
.callout--warn { border-inline-start-color: var(--warn); }
.callout--ok { border-inline-start-color: var(--ok); }

/* --- Footnotes: numbered sources --------------------------------------------------------------- */
.footnotes { padding-block: var(--space-l); border-block-start: 1px solid var(--line); color: var(--fg-subtle); font-size: var(--step--1); }
.footnotes__title { margin-block-end: var(--space-s); color: var(--fg-muted); font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.footnotes ol { max-width: 80ch; padding-inline-start: 2em; font-variant-numeric: tabular-nums; }
.footnotes li { padding-inline-start: 0.3em; }
.footnotes li::marker { font-family: var(--font-mono); color: var(--fg-subtle); }
.footnotes li:target { color: var(--fg); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 4px; }
.footnotes a { color: var(--fg-muted); word-break: break-word; }
.footnotes__back { margin-inline-start: 0.35em; text-decoration: none; }

/* --- Footer ------------------------------------------------------------------------------------ */
.footer { padding-block: var(--space-xl) var(--space-l); border-block-start: 1px solid var(--line); color: var(--fg-subtle); font-size: var(--step--1); }
.footer__inner { display: grid; gap: var(--space-m) var(--space-xl); grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); align-items: start; }
.footer__brand { display: inline-flex; align-items: center; gap: 0.5em; color: var(--fg); font-family: var(--font-display); font-size: var(--step-0); font-weight: 700; text-decoration: none; }
.footer__brand svg { width: 1.4em; height: 1.4em; color: var(--accent); }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-m); padding: 0; list-style: none; }
.footer__links li { margin: 0; }
.footer__links a { color: var(--fg-muted); }
.footer__note { max-width: 52ch; }
.footer__legal { grid-column: 1 / -1; padding-block-start: var(--space-s); border-block-start: 1px solid var(--line); }

/* --- Reveal on scroll: only hides when site.js is running and motion is OK --------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--delay, 0s); }
  .reveal-on .reveal.is-in { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------------------------------------
 * 6. Survey component (.gform). Rendered by site.js; see DESIGN.md "Form component".
 * ---------------------------------------------------------------------------------------------- */
.gform { --gform-h: clamp(560px, 82vh, 880px); max-width: 52rem; margin-inline: auto; color: var(--fg); }
.gform > noscript p { padding: var(--space-m); border: 1px dashed var(--line); border-radius: var(--radius-lg); text-align: center; }

/* The light sheet that frames every state */
.gform__sheet {
  overflow: hidden;
  border: 1px solid var(--sheet-line);
  border-radius: var(--radius-lg);
  background: var(--sheet-bg);
  color: var(--sheet-fg);
  box-shadow: var(--shadow);
  color-scheme: light;
  --g-muted: color-mix(in srgb, var(--sheet-fg) 72%, var(--sheet-bg));
}
.gform__head, .gform__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-s);
  padding: var(--space-xs) var(--space-m);
  font-family: var(--font-body);
  font-size: var(--step--1);
}
.gform__head { border-block-end: 1px solid var(--sheet-line); }
.gform__foot { border-block-start: 1px solid var(--sheet-line); }
.gform__label { display: inline-flex; align-items: center; gap: 0.55em; font-weight: 650; }
.gform__label::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: #1e8e3e; }
.gform__host { color: var(--g-muted); font-weight: 400; }
.gform__sheet a { color: var(--sheet-accent); }
.gform__newtab { font-weight: 600; }

.gform__frame { position: relative; height: var(--gform-h); background: var(--sheet-bg); }
.gform__frame iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; background: transparent; }
.gform__frame.is-loading iframe { opacity: 0; }

/* Loading skeleton, shown until the iframe's first load */
.gform__skeleton { position: absolute; inset: 0; z-index: 0; display: grid; align-content: start; gap: 1rem; padding: var(--space-l) var(--space-m); }
.gform__skeleton span { display: block; height: 0.9rem; border-radius: 4px; background: color-mix(in srgb, var(--sheet-fg) 8%, var(--sheet-bg)); }
.gform__skeleton span:nth-child(1) { width: 55%; height: 1.6rem; }
.gform__skeleton span:nth-child(2) { width: 85%; }
.gform__skeleton span:nth-child(3) { width: 100%; height: 5.5rem; margin-block-start: 1rem; border-radius: 8px; }
.gform__skeleton span:nth-child(4) { width: 100%; height: 5.5rem; border-radius: 8px; }
.gform__skeleton span:nth-child(5) { width: 30%; height: 2.5rem; border-radius: 8px; }
.gform__frame:not(.is-loading) .gform__skeleton { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .gform__skeleton span { animation: gform-pulse 1.4s ease-in-out infinite; }
  @keyframes gform-pulse { 50% { opacity: 0.45; } }
}

/* Messages above / inside the sheet */
.gform__msg { margin-block-end: var(--space-s); padding: var(--space-xs) var(--space-m); border-radius: var(--radius); font-size: var(--step--1); }
.gform__msg--thanks { display: flex; align-items: center; gap: 0.6em; background: color-mix(in srgb, var(--ok) 14%, var(--bg)); color: var(--fg); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); font-weight: 600; }
.gform__msg--thanks::before { content: "\2713"; color: var(--ok); font-weight: 700; }
.gform__slow { padding: var(--space-xs) var(--space-m); border-block-end: 1px solid var(--sheet-line); background: #fff8e6; color: #5c3d00; font-size: var(--step--1); }

/* Consent card (data-load="click") */
.gform__consent { display: grid; justify-items: center; gap: var(--space-s); padding: var(--space-xl) var(--space-m); text-align: center; }
.gform__consent p { max-width: 44ch; color: var(--g-muted); }
.gform__consent .gform__title { color: var(--sheet-fg); font-family: var(--font-display); font-size: var(--step-2); font-weight: 650; line-height: 1.2; }
.gform__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 3rem;
  padding: 0.7em 1.4em;
  border: 0;
  border-radius: var(--radius);
  background: var(--sheet-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 650;
}
.gform__btn:hover { background: color-mix(in srgb, var(--sheet-accent) 85%, #000); }
.gform__btn:focus-visible { outline: 2px solid var(--sheet-accent); outline-offset: 3px; }
.gform__fine { color: var(--g-muted); font-size: var(--step--2); }

/* Not-connected placeholder */
.gform__sheet--setup { border: 1.5px dashed color-mix(in srgb, var(--sheet-fg) 35%, var(--sheet-bg)); box-shadow: none; }
.gform__setup { display: grid; gap: var(--space-s); padding: var(--space-m); }
.gform__badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  background: #fff4d6;
  color: #6b4400;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gform__badge::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; border: 1.5px solid currentColor; }
.gform__setup .gform__title { color: var(--sheet-fg); font-family: var(--font-display); font-size: var(--step-2); font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; }
.gform__setup p { max-width: 60ch; color: var(--g-muted); font-size: var(--step--1); }
.gform__setup code { white-space: nowrap; background: color-mix(in srgb, var(--sheet-fg) 7%, var(--sheet-bg)); color: var(--sheet-fg); }
.gform__qs { display: grid; gap: 0; margin-block-start: var(--space-2xs); padding: 0; list-style: none; counter-reset: q; border-block-start: 1px solid var(--sheet-line); }
.gform__q { counter-increment: q; display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.15rem var(--space-2xs); margin: 0; padding-block: var(--space-s); border-block-end: 1px solid var(--sheet-line); }
.gform__q > * { grid-column: 2; }
.gform__q::before { content: counter(q, decimal-leading-zero); grid-column: 1; grid-row: 1 / span 4; padding-block-start: 0.15em; color: var(--g-muted); font-family: var(--font-mono); font-size: var(--step--1); }
.gform__qtitle { color: var(--sheet-fg); font-size: var(--step-0); font-weight: 600; line-height: 1.4; }
.gform__req { color: #b42318; font-weight: 700; }
.gform__qmeta { color: var(--g-muted); font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.02em; }
.gform__opts { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-block-start: 0.4rem; padding: 0; list-style: none; }
.gform__opts li { margin: 0; padding: 0.15em 0.6em; border: 1px solid var(--sheet-line); border-radius: 999px; color: color-mix(in srgb, var(--sheet-fg) 85%, var(--sheet-bg)); font-size: var(--step--1); line-height: 1.5; }
.gform__note { color: var(--g-muted); font-size: var(--step--2); }

.gform.is-submitted .gform__frame { height: min(var(--gform-h), 28rem); }

/* Shown beside the thank-you once the survey is submitted (built by site.js from the page's .share block).
   It sits on the page background, outside the light sheet, so its buttons are .btn, never .gform__btn. */
.gform__share {
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
  margin-block-end: var(--space-m);
  padding: var(--space-s) var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg);
}
.gform__share-line { font-family: var(--font-display); font-size: var(--step-1); font-weight: var(--heading-weight); line-height: 1.25; }
.gform__share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); min-width: 0; }
.gform__share-more { color: var(--accent); font-size: var(--step--1); font-weight: 600; }
.gform__share-status { min-width: 0; min-height: 1.5em; font-size: var(--step--1); font-weight: 600; overflow-wrap: anywhere; }

/* The way into a page's hidden game (DESIGN.md §14; built by site.js from the mount's data-egg-* words).
   It appears beside the thank-you once the survey is submitted, and above the survey (--back) for a reader
   who answered on an earlier visit. On the page background like .gform__share, so its link is a .btn. */
.gform__egg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-m);
  min-width: 0;
  margin-block-end: var(--space-m);
  padding: var(--space-s) var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg);
}
.gform__egg-line { flex: 1 1 16rem; min-width: 0; font-family: var(--font-display); font-size: var(--step-1); font-weight: var(--heading-weight); line-height: 1.25; overflow-wrap: anywhere; }
.gform__egg-link { flex: 0 1 auto; min-width: 0; }
.gform__egg--back { max-width: 52rem; margin-inline: auto; }
/* The graphic a page listens on for the secret knock: five quick taps must not zoom the page. */
[data-egg-knock] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ------------------------------------------------------------------------------------------------
 * 7. Share component (.share): "Share this with someone who…". Wired by site.js; see DESIGN.md.
 *    Structure only. The heading block, the look of the lines and of the note are each page's own:
 *    nothing here sets type on the title, and nothing here targets .btn (pages restyle both).
 *    site.js hooks on data-share-* attributes, never on these classes.
 * ---------------------------------------------------------------------------------------------- */
.share { display: grid; gap: var(--space-m); min-width: 0; }
/* .btn is inline-flex and the rows below are flex, which would otherwise defeat the hidden attribute. */
.share [hidden], .gform__share [hidden] { display: none; }

/* The lines that finish the sentence. Native radios, restyled but never hidden: the focus ring and
   forced-colours mode keep working, and arrow keys move between lines without any script. */
.share__who { display: grid; gap: var(--space-2xs); min-width: 0; }
.share__opt {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
  min-width: 0;
  min-height: 2.75rem; /* 44px touch target */
  padding: 0.55em 0.85em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg);
  font-size: var(--step-1);
  line-height: 1.3;
  cursor: pointer;
}
.share__opt input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 1.1em;
  height: 1.1em;
  margin: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transform: translateY(0.14em);
}
/* The chosen line carries a mark, not only a colour. */
.share__opt input:checked { background: radial-gradient(circle, currentColor 0 42%, transparent 48%); }
:where(.share__opt:has(input:checked), .share__opt.is-picked) { border-color: var(--accent); }
.share__line { min-width: 0; }
@media (forced-colors: active) {
  .share__opt input { -webkit-appearance: auto; appearance: auto; }
}

/* The note the recipient will get: one opener per line (shown for the chosen line), the plain opener
   (shown when no line is chosen) and the pitch. Which opener shows is decided here, by position, so it
   works with JavaScript off: the nth opener belongs to the nth line. */
.share__note { min-width: 0; padding: var(--space-s) var(--space-m); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); }
.share__cap { margin-block-end: var(--space-2xs); color: var(--fg-subtle); font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.08em; text-transform: uppercase; }
.share__msg { min-width: 0; max-width: var(--measure); overflow-wrap: anywhere; }
.share__intro { display: none; }
.share__intro--plain { display: inline; }
.share:has(.share__opt:nth-of-type(1) input:checked) .share__intro:nth-of-type(1),
.share:has(.share__opt:nth-of-type(2) input:checked) .share__intro:nth-of-type(2),
.share:has(.share__opt:nth-of-type(3) input:checked) .share__intro:nth-of-type(3),
.share:has(.share__opt:nth-of-type(4) input:checked) .share__intro:nth-of-type(4) { display: inline; }
.share:has(.share__opt input:checked) .share__intro--plain { display: none; }
/* The same two states as site.js marks them, in rules of their own so a browser without :has() keeps them. */
.share__intro.is-picked { display: inline; }
.share[data-share-picked] .share__intro--plain { display: none; }

.share__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); min-width: 0; }
/* A quiet text button for the second-rank actions ("Copy the note with the link"). */
.share__more {
  min-height: 2.75rem;
  padding: 0.35em 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  text-align: start;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.share__more:hover { text-decoration-thickness: 2px; }
/* The exact address a button will copy ([data-share-link], filled in by site.js). A long address must wrap
   inside a grid or flex child instead of widening the page; the row stays away until there is one to show. */
.share__link { min-width: 0; color: var(--fg-muted); font-family: var(--font-mono); font-size: var(--step--2); overflow-wrap: anywhere; }
.share__link:has([data-share-link]:empty) { display: none; }
.share__status { min-width: 0; min-height: 1.6em; color: var(--fg); font-size: var(--step--1); font-weight: 600; overflow-wrap: anywhere; }
.share__manual, .share__why { max-width: var(--measure); color: var(--fg-muted); }
.share__fine { max-width: var(--measure); color: var(--fg-subtle); font-size: var(--step--2); }

/* A visitor who arrives through a shared link (?utm_source=share) gets one line at the top of <main>.
   It opens by sliding (site.js adds .is-in), so the hero is moved once, on purpose, not bumped. */
.share-hello { display: grid; grid-template-rows: 0fr; background: var(--accent); color: var(--accent-fg); transition: grid-template-rows 0.4s var(--ease); }
.share-hello.is-in { grid-template-rows: 1fr; }
.share-hello__text { min-height: 0; overflow: hidden; font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600; line-height: 1.45; text-align: center; }
.share-hello__pad { display: block; padding: 0.7em var(--gutter); }

/* ------------------------------------------------------------------------------------------------
 * 8. Motion and print
 * ---------------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  :where(html) { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms; animation-iteration-count: 1; transition-duration: 0.01ms; }
}

@media print {
  .nav, .skip-link, .gform, .gform__egg, .codeblock__copy, .share__actions, .share__status, .share-hello { display: none; }
  :where(body) { background: #fff; color: #000; }
}
