/* ==========================================================================
   ASKA SQIP shared design tokens + components (system.css)
   Contract: identical on q26 (private guide) and sqip (public page).
   Each deploy keeps an independent copy:
     web/q26/css/system.css  +  web/sqip/css/system.css
   Canonical source for both copies: web/system.css (this file).
   Per-page sheets (guide.css / public.css) must NOT redefine these.
   No JavaScript required: every component is visible on first paint.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens (:root)
   -------------------------------------------------------------------------- */
:root {
  /* Surface — frontier dark is the default (ASKA Digital) */
  --bg: #11201e;
  --bg-raise: #182926;
  --bg-soft: #0d1917;
  --paper: #f4f2ec;
  --paper-raise: #ffffff;
  --paper-soft: #e9e6dc;

  /* Ink */
  --ink: #eef3f1;
  --ink-dim: rgba(238, 243, 241, .72);
  --ink-faint: rgba(238, 243, 241, .5);
  --ink-dark: #16211f;
  --ink-dark-dim: rgba(22, 33, 31, .72);
  --ink-dark-faint: rgba(22, 33, 31, .55);

  /* Accent — one accent only; primary CTA + active states */
  --accent: #c8f04a;
  --accent-hover: #d7f76a;
  --accent-active: #aed63a;
  --accent-ink: #11201e;

  /* Lines */
  --hairline: rgba(238, 243, 241, .06);
  --hairline-strong: rgba(238, 243, 241, .12);
  --hairline-dark: rgba(22, 33, 31, .10);
  --hairline-dark-strong: rgba(22, 33, 31, .18);

  /* Radius */
  --r-card: 20px;
  --r-block: 12px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-rest: 0 1px 0 rgba(0, 0, 0, .25), 0 12px 32px rgba(0, 0, 0, .28);
  --shadow-lift: 0 2px 0 rgba(0, 0, 0, .25), 0 20px 48px rgba(0, 0, 0, .36);
  --shadow-rest-light: 0 1px 2px rgba(22, 33, 31, .06), 0 12px 32px rgba(22, 33, 31, .08);
  --shadow-lift-light: 0 2px 4px rgba(22, 33, 31, .08), 0 20px 48px rgba(22, 33, 31, .12);

  /* Type */
  --font: "Geist", "Manrope", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Geist", "Manrope", "Poppins", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --t-display: clamp(2rem, 5vw, 3.5rem);
  --t-section: clamp(1.4rem, 2.6vw, 2rem);
  --t-lead: clamp(1.05rem, 1.6vw, 1.25rem);
  --t-body: 1rem;
  --t-small: .875rem;
  --t-xs: .78rem;
  --lh-display: 1.08;
  --lh-head: 1.25;
  --lh-body: 1.65;

  /* Spacing */
  --s-100: 4px;
  --s-200: 8px;
  --s-300: 16px;
  --s-400: 24px;
  --s-500: 32px;
  --s-600: 48px;
  --s-700: 64px;
  --s-900: 96px;

  /* Layout */
  --container: 1200px;
  --gutter: 48px;
  --gutter-mobile: 32px;

  /* Motion */
  --ease: ease;
  --dur: 200ms;
  --dur-fast: 160ms;
  --dur-slow: 220ms;

  /* Focus */
  --focus-ring: 0 0 0 3px rgba(200, 240, 74, .55);
}

/* --------------------------------------------------------------------------
   2. Base / reset (surface-agnostic; body variant chosen per page)
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

/* Default surface: frontier dark. Pages opt into light with body.on-light. */
body.on-dark {
  background: var(--bg);
  color: var(--ink);
}
body.on-light {
  background: var(--paper);
  color: var(--ink-dark);
}

h1, h2, h3, h4 { line-height: var(--lh-head); margin: 0 0 var(--s-300); font-weight: 600; }
h1 { font-size: var(--t-display); line-height: var(--lh-display); font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: var(--t-section); letter-spacing: -.01em; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 var(--s-300); }
p:last-child { margin-bottom: 0; }

a { text-underline-offset: 3px; }
.on-dark a { color: var(--accent); }
.on-light a { color: #3d6b12; }
.on-light a:visited { color: #33590f; }

img, svg { max-width: 100%; height: auto; }
pre { font-family: var(--font-mono); font-size: var(--t-small); line-height: 1.7; }

/* Fluid container — sections breathe, never cage */
.section, .wrap {
  width: min(100% - var(--gutter), var(--container));
  margin-inline: auto;
  padding-block: var(--s-600);
}

/* Visible focus on both surfaces */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

/* Skip link: visible on focus, works without JS */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   3. Nav — .nav.on-dark / .nav.on-light
   Contract: brand wordmark (display face allowed here only) + grouped links
   with explicit gap + at most one CTA. Surface class mandatory.
   -------------------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 50; }
.nav.on-dark { background: rgba(13, 25, 23, .92); border-bottom: 1px solid var(--hairline); }
.nav.on-light { background: rgba(244, 242, 236, .94); border-bottom: 1px solid var(--hairline-dark); }

.nav-inner {
  width: min(100% - var(--gutter), var(--container));
  margin-inline: auto;
  display: flex; align-items: center; gap: var(--s-300);
  padding-block: 14px;
  min-height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name {
  font-family: var(--font-brand);
  font-weight: 600; font-size: 1.05rem; letter-spacing: .01em;
}
.nav.on-dark .brand-name { color: var(--ink); }
.nav.on-light .brand-name { color: var(--ink-dark); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .85rem;
}

.nav-links { display: inline-flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: var(--t-small); font-weight: 500;
  transition: color var(--dur) var(--ease);
}
.nav.on-dark .nav-links a { color: var(--ink-dim); }
.nav.on-dark .nav-links a:hover { color: var(--ink); }
.nav.on-light .nav-links a { color: var(--ink-dark-dim); }
.nav.on-light .nav-links a:hover { color: var(--ink-dark); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav.on-dark .nav-links a[aria-current="page"] { color: var(--accent); }
.nav.on-light .nav-links a[aria-current="page"] { color: #3d6b12; }

/* CTA separated from the link group by real margin, never just gap */
.nav-links + .cta, .nav-links + .nav-cta-slot { margin-left: 16px; }

/* Mobile drawer toggle: hidden on desktop, plain button (progressive enhancement) */
.nav-toggle {
  display: none; margin-left: auto;
  min-width: 44px; min-height: 44px;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.nav.on-dark .nav-toggle { color: var(--ink); border-color: var(--hairline-strong); }
.nav.on-light .nav-toggle { color: var(--ink-dark); border-color: var(--hairline-dark-strong); }

/* --------------------------------------------------------------------------
   4. CTA button — .cta.on-dark / .cta.on-light
   Contract: ONE primary action per surface. Label names the destination
   outcome. Secondary links are plain text links, never second buttons.
   -------------------------------------------------------------------------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 48px;
  padding: 12px 28px; border-radius: var(--r-pill);
  font-family: var(--font); font-weight: 600; font-size: var(--t-body);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.cta.on-dark {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px rgba(200, 240, 74, .22);
}
.cta.on-dark:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(200, 240, 74, .3); }
.cta.on-dark:active { background: var(--accent-active); transform: translateY(0); }
.cta.on-light {
  background: var(--ink-dark); color: var(--paper);
  box-shadow: var(--shadow-rest-light);
}
.cta.on-light:hover { background: #243634; transform: translateY(-2px); box-shadow: var(--shadow-lift-light); }
.cta.on-light:active { transform: translateY(0); }

/* Secondary action: plain text link, visually distinct from .cta */
.cta-secondary { font-weight: 500; font-size: var(--t-small); }
.on-dark .cta-secondary { color: var(--ink-dim); }
.on-dark .cta-secondary:hover { color: var(--ink); }
.on-light .cta-secondary { color: var(--ink-dark-dim); }
.on-light .cta-secondary:hover { color: var(--ink-dark); }

/* --------------------------------------------------------------------------
   5. Hero
   sqip: frontier dark, layered radial glows + masked grid, capability proof.
   q26:  light functional tool surface, no decoration that hurts scanning.
   Surface class mandatory on every instance.
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero-inner {
  position: relative; z-index: 1;
  width: min(100% - var(--gutter), var(--container));
  margin-inline: auto;
  padding-block: var(--s-700) var(--s-600);
}
.hero-eyebrow {
  display: inline-block; font-size: var(--t-small); font-weight: 600;
  letter-spacing: .04em; margin-bottom: var(--s-300);
  padding: 6px 14px; border-radius: var(--r-pill);
}
.hero-title { max-width: 20ch; text-wrap: balance; }
.hero-lede { font-size: var(--t-lead); line-height: 1.6; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-300); margin-top: var(--s-400); }

/* --- 5a. sqip hero: frontier dark with depth (default hero) --- */
.hero.on-dark { background: var(--bg); color: var(--ink); }
.hero.on-dark::before {
  /* Layered radial glows at opposite corners over the frontier base */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 82% 12%, rgba(200, 240, 74, .12), transparent 62%),
    radial-gradient(45% 40% at 12% 88%, rgba(64, 140, 120, .30), transparent 60%),
    linear-gradient(160deg, #182926 0%, var(--bg) 55%, var(--bg-soft) 100%);
}
.hero.on-dark::after {
  /* Masked engineering grid, fading below the fold */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(238, 243, 241, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 243, 241, .05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 10%, #000 40%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 50% 10%, #000 40%, transparent 100%);
}
.hero.on-dark .hero-eyebrow { background: rgba(200, 240, 74, .12); color: var(--accent); border: 1px solid rgba(200, 240, 74, .3); }
.hero.on-dark .hero-lede { color: var(--ink-dim); }

/* Split-hero axis agreement: row halves ↔ 90deg background, column ↔ 180deg.
   .hero-split defaults to side-by-side; the ≤720px tier stacks it AND
   rotates the tint axis so text never crosses onto the wrong half. */
.hero-split { display: flex; flex-direction: row; gap: var(--s-600); align-items: center; }
.hero-split > * { flex: 1 1 0; min-width: 0; }
.hero-split-tint { border-radius: var(--r-card); }

/* --- 5b. q26 hero: light functional tool surface --- */
.hero.on-light { background: var(--paper); color: var(--ink-dark); border-bottom: 1px solid var(--hairline-dark); }
.hero.on-light .hero-inner { padding-block: var(--s-600) var(--s-500); }
.hero.on-light .hero-eyebrow { background: rgba(22, 33, 31, .06); color: var(--ink-dark); border: 1px solid var(--hairline-dark-strong); }
.hero.on-light .hero-lede { color: var(--ink-dark-dim); }
/* Tool meta row: clock warning + progress live here, scannable, undecorated */
.hero-toolmeta {
  display: flex; flex-wrap: wrap; gap: var(--s-200);
  margin-top: var(--s-300); font-size: var(--t-small);
}
.hero-toolmeta .meta-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline-dark-strong);
  background: var(--paper-raise); color: var(--ink-dark);
}
.meta-chip.warn { border-color: #9a6a00; background: #fdf3d7; color: #5c3f00; font-weight: 600; }

/* --------------------------------------------------------------------------
   6. Card — .card.on-dark / .card.on-light
   Contract: hairline border, 20px radius, resting shadow, hover lift.
   Cards sit IN the page grid, never float detached.
   -------------------------------------------------------------------------- */
.card {
  border-radius: var(--r-card);
  padding: var(--s-400);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur-slow) var(--ease);
}
.card.on-dark {
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-rest);
  color: var(--ink);
}
.card.on-dark:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card.on-light {
  background: var(--paper-raise);
  border: 1px solid var(--hairline-dark);
  box-shadow: var(--shadow-rest-light);
  color: var(--ink-dark);
}
.card.on-light:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift-light); }
.card-title { font-size: 1.125rem; font-weight: 600; margin: 0 0 var(--s-200); }
.card p { font-size: var(--t-body); }
.on-dark .card-sub { color: var(--ink-dim); }
.on-light .card-sub { color: var(--ink-dark-dim); }

.card-grid {
  display: grid; gap: var(--s-400);
  grid-template-columns: repeat(3, 1fr);
}

/* Paste block shell (reuses card spacing, mono surface) */
.paste-block {
  border-radius: var(--r-block);
  padding: var(--s-300);
  overflow-x: auto;
}
.paste-block.on-dark { background: var(--bg-soft); border: 1px solid var(--hairline-strong); color: var(--ink); }
.paste-block.on-light { background: var(--paper-soft); border: 1px solid var(--hairline-dark-strong); color: var(--ink-dark); }
.paste-block pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* [NEEDS INPUT] flag: accent outline + label, never silent (q26 only ships it) */
.needs-input {
  display: block; margin-top: var(--s-200);
  padding: 10px 14px; border-radius: var(--r-block);
  font-size: var(--t-small); font-weight: 600;
  border: 2px dashed var(--accent);
}
.needs-input.on-dark { background: rgba(200, 240, 74, .07); color: var(--accent); }
.needs-input.on-light { background: #fbf8df; border-color: #7a9a1e; color: #3d5a0c; }
.needs-input::before { content: "Needs input — "; font-weight: 600; }

/* --------------------------------------------------------------------------
   7. Footer — .footer.on-dark / .footer.on-light
   -------------------------------------------------------------------------- */
.footer { margin-top: var(--s-700); }
.footer.on-dark { background: var(--bg-soft); border-top: 1px solid var(--hairline); color: var(--ink-dim); }
.footer.on-light { background: var(--paper-soft); border-top: 1px solid var(--hairline-dark); color: var(--ink-dark-dim); }
.footer-inner {
  width: min(100% - var(--gutter), var(--container));
  margin-inline: auto;
  padding-block: var(--s-500);
  display: flex; flex-wrap: wrap; gap: var(--s-300) var(--s-600);
  align-items: baseline; justify-content: space-between;
  font-size: var(--t-small);
}
.footer-lines { display: grid; gap: 6px; max-width: 60ch; }
.footer-nav { display: inline-flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-honesty { font-size: var(--t-small); max-width: 64ch; }
.on-dark .footer-honesty { color: var(--ink-faint); }
.on-light .footer-honesty { color: var(--ink-dark-faint); }

/* --------------------------------------------------------------------------
   8. q26 question block — .qblock.on-light (default) / .qblock.on-dark
   Order per card: number + verbatim question / option row / paste <pre> +
   copy button / [NEEDS INPUT] slots / source line.
   -------------------------------------------------------------------------- */
.qblock { border-radius: var(--r-card); padding: var(--s-400); }
.qblock.on-light {
  background: var(--paper-raise); border: 1px solid var(--hairline-dark);
  box-shadow: var(--shadow-rest-light); color: var(--ink-dark);
}
.qblock.on-dark {
  background: var(--bg-raise); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-rest); color: var(--ink);
}
.qblock-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: var(--s-200); }
.qblock-num {
  flex: none; min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-weight: 600; font-size: var(--t-small);
}
.on-light .qblock-num { background: var(--ink-dark); color: var(--paper); }
.on-dark .qblock-num { background: var(--accent); color: var(--accent-ink); }
.qblock-q { font-weight: 600; font-size: 1.05rem; margin: 0; }
.qblock-option {
  display: block; margin: 0 0 var(--s-200); padding: 8px 12px;
  border-radius: var(--r-block); font-size: var(--t-small); font-weight: 600;
}
.on-light .qblock-option { background: var(--paper-soft); border: 1px solid var(--hairline-dark-strong); }
.on-dark .qblock-option { background: var(--bg-soft); border: 1px solid var(--hairline-strong); color: var(--accent); }
.qblock-copy {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px; margin-top: var(--s-200);
  border-radius: var(--r-pill); font-weight: 600; font-size: var(--t-small);
  cursor: pointer; border: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.on-light .qblock-copy { background: var(--ink-dark); color: var(--paper); }
.on-light .qblock-copy:hover { background: #243634; }
.on-dark .qblock-copy { background: var(--accent); color: var(--accent-ink); }
.on-dark .qblock-copy:hover { background: var(--accent-hover); }
.qblock-source { display: block; margin-top: var(--s-300); font-size: var(--t-xs); font-family: var(--font-mono); }
.on-light .qblock-source { color: var(--ink-dark-faint); }
.on-dark .qblock-source { color: var(--ink-faint); }

/* Progress meter + checklist rows (q26) */
.progress-meter { height: 10px; border-radius: var(--r-pill); overflow: hidden; }
.on-light .progress-meter { background: var(--paper-soft); border: 1px solid var(--hairline-dark); }
.on-dark .progress-meter { background: var(--bg-soft); border: 1px solid var(--hairline); }
.progress-meter > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.check-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px dashed transparent;
}
.on-light .check-row { border-bottom-color: var(--hairline-dark); }
.on-dark .check-row { border-bottom-color: var(--hairline); }
.check-row input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: #7a9a1e; }
.check-row label { font-size: var(--t-body); }

/* Prev/next pager (q26) */
.pager { display: flex; justify-content: space-between; gap: var(--s-300); margin-top: var(--s-600); }
.pager a { min-height: 44px; display: inline-flex; align-items: center; }

/* --------------------------------------------------------------------------
   9. sqip pipeline proof — .proof.on-dark (default) / .proof.on-light
   Static-by-default capability visual. NEVER labeled live; static visuals
   carry a "static illustration" caption. Visible without JS.
   -------------------------------------------------------------------------- */
.proof { border-radius: var(--r-card); padding: var(--s-400); }
.proof.on-dark {
  background: rgba(13, 25, 23, .85);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-rest);
  color: var(--ink);
}
.proof.on-light {
  background: var(--paper-raise); border: 1px solid var(--hairline-dark);
  box-shadow: var(--shadow-rest-light); color: var(--ink-dark);
}
.proof-head { display: flex; align-items: center; gap: 8px; margin-bottom: var(--s-300); }
.proof-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.proof-dot.r { background: #e0685c; } .proof-dot.y { background: #e0b45c; } .proof-dot.g { background: #7fd08a; }
.proof-title { font-family: var(--font-mono); font-size: var(--t-small); }
.on-dark .proof-title { color: var(--ink-dim); }
.on-light .proof-title { color: var(--ink-dark-dim); }
/* Seven pipeline stages: frame → research → architect → design → build → verify → report */
.proof-stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.proof-stage {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; font-size: var(--t-small);
  border-bottom: 1px dashed transparent;
}
.on-dark .proof-stage { border-bottom-color: var(--hairline); }
.on-light .proof-stage { border-bottom-color: var(--hairline-dark); }
.proof-stage:last-child { border-bottom: 0; }
.proof-check { color: var(--accent); font-weight: 700; flex: none; }
.proof.on-light .proof-check { color: #4d7a0e; }
.proof-stage-name { font-family: var(--font-mono); font-weight: 600; min-width: 96px; }
.proof-stage-desc { flex: 1; }
.on-dark .proof-stage-desc { color: var(--ink-dim); }
.on-light .proof-stage-desc { color: var(--ink-dark-dim); }
.proof-caption { margin-top: var(--s-300); font-size: var(--t-xs); font-style: italic; }
.on-dark .proof-caption { color: var(--ink-faint); }
.on-light .proof-caption { color: var(--ink-dark-faint); }
/* Honesty limit line rides inside or beside every proof instance */
.proof-limit {
  margin-top: var(--s-200); padding: 10px 14px;
  border-radius: var(--r-block); font-size: var(--t-small);
}
.on-dark .proof-limit { border-left: 3px solid var(--accent); background: rgba(200, 240, 74, .06); color: var(--ink-dim); }
.on-light .proof-limit { border-left: 3px solid #7a9a1e; background: #f6f3e6; color: var(--ink-dark-dim); }

/* --------------------------------------------------------------------------
   10. Mobile tiers — apply to both surfaces
   Tier 1 ≤900px: grids collapse. Tier 2 ≤720px: stacks + drawer + fluid
   hero. Tier 3 ≤480px: type steps down, 44px targets, overflow guard.
   Gate: 390px emulation pass per surface.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .hero-split { gap: var(--s-400); }
}

@media (max-width: 720px) {
  .section, .wrap, .nav-inner, .hero-inner, .footer-inner {
    width: min(100% - var(--gutter-mobile), var(--container));
  }
  .card-grid { grid-template-columns: 1fr; }
  /* Split hero stacks; tint axis rotates with it (180deg vertical) */
  .hero-split { flex-direction: column; align-items: stretch; }
  .hero-inner { padding-block: var(--s-600) var(--s-500); }
  /* Nav collapses to CTA-only bar; drawer is progressive enhancement.
     Links stay in the DOM and reachable — JS only toggles display. */
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-200) var(--s-300) var(--s-300);
  }
  .nav.on-dark .nav-links { background: var(--bg-soft); border-bottom: 1px solid var(--hairline); }
  .nav.on-light .nav-links { background: var(--paper); border-bottom: 1px solid var(--hairline-dark); }
  .nav-links a { padding: 12px 4px; min-height: 44px; display: inline-flex; align-items: center; }
  .nav[data-open="true"] .nav-links { display: flex; }
  /* No-JS fallback: with JS disabled the toggle never renders open state,
     so keep the CTA reachable — the bar keeps brand + CTA visible. */
  .pager { flex-direction: column; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(1.6rem, 8vw, 2rem); }
  h2 { font-size: clamp(1.2rem, 5.5vw, 1.4rem); }
  .hero-lede { font-size: 1rem; }
  .card, .qblock, .proof { padding: var(--s-300); }
  .cta { width: 100%; min-height: 48px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .cta-secondary { text-align: center; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .qblock-copy { min-height: 44px; }
  .proof-stage-name { min-width: 0; }
}

/* --------------------------------------------------------------------------
   11. Motion + accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
