/* GoodAiUX — the reference instantiation of the DESIGN.md color contract.
   DESIGN.md ships semantic roles + WCAG targets (no baked-in hex); these are
   the resolved values for THIS brand. Every text pair clears 4.5:1, every
   UI boundary clears 3:1 — the site practices what the file preaches. */

/* self-hosted fonts — Inter + JetBrains Mono · latin · VARIABLE: one woff2 per
   family covers the whole weight axis (Inter 400-800, Mono 400-600), replacing
   the eight per-weight static files (336 KB -> 80 KB). Files in /fonts (see _headers). */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/inter-var-latin.woff2) format('woff2');}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/jetbrains-mono-var-latin.woff2) format('woff2');}
/* metric-matched fallbacks (capsize) — system font scaled to the webfont's box,
   so font-display:swap causes no layout shift (CLS). */
@font-face{font-family:'Inter Fallback';src:local('Arial'),local('ArialMT');ascent-override:90.4365%;descent-override:22.518%;line-gap-override:0%;size-adjust:107.1194%;}
@font-face{font-family:'JetBrains Mono Fallback';src:local('Courier New'),local('CourierNewPSMT');ascent-override:102.0166%;descent-override:30.0049%;size-adjust:99.9837%;}
:root {
  /* brand (was "primary") */
  --primary: #0F172A;        /* on white: ~17.9:1 (AAA) */
  --primary-hover: #1E293B;
  --on-primary: #FFFFFF;
  --secondary: #475569;      /* on white: ~7.6:1 */
  --accent: #DC2626;         /* on white: ~4.83:1 (single hero CTA / urgency) */
  --accent-hover: #B91C1C;
  --on-accent: #FFFFFF;
  /* status — held to their WCAG-passing tones (match DESIGN.md's contract) */
  --success: #15803D;        /* on white: ~4.54:1 (was #16A34A ~3.4:1 — failed) */
  --warning: #B45309;        /* on white: ~5.0:1  (was #F59E0B ~2.2:1 — failed) */
  --danger:  #B91C1C;        /* on white: ~5.9:1; deeper red than accent so error != sale */
  --info:    #1D4ED8;
  /* tinted status containers (the "*-surface" roles) */
  --success-surface: #F0FDF4;
  --warning-surface: #FEF3C7;
  --on-warning-surface: #92400E;
  --danger-surface:  #FEF2F2;
  --danger-border:   #FECACA;
  --success-border:  #BBF7D0;
  /* surfaces & lines */
  --neutral: #F8FAFC;        /* page-bg */
  --surface: #FFFFFF;
  --on-surface: #0F172A;
  --surface-muted: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --muted: #5E6A7E;          /* white ~5.5:1, surface-muted ~5.0:1 (was #94A3B8 ~2.6:1 — failed for text) */
  --link: #1D4ED8;
  /* special roles */
  --scrim: rgba(15, 23, 42, 0.55);
  --shadow-color: 15, 23, 42;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-full: 9999px;

  --shadow-1: 0 1px 2px rgba(var(--shadow-color), 0.06);
  --shadow-2: 0 4px 12px rgba(var(--shadow-color), 0.08);
  --shadow-3: 0 12px 32px rgba(var(--shadow-color), 0.16);

  --font-sans: 'Inter', 'Inter Fallback', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'JetBrains Mono Fallback', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--on-surface);
  background: var(--neutral);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* WCAG 2.4.1 Bypass Blocks — skip link, visible only on keyboard focus */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 14px;
  transition: top 120ms ease;
}
.skip-link:focus { top: 12px; text-decoration: none; outline: 2px solid #fff; outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ===== Benefit bar (Pattern #45) ===== */
.benefit-bar {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 500;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
}
.benefit-bar .items { display: flex; align-items: center; gap: 0; }
.benefit-bar .item { padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; }
.benefit-bar .dot { color: rgba(255,255,255,0.45); }
.benefit-bar .check { color: #4ade80; font-weight: 700; }
/* Visibility over discovery: never crop the benefits on small screens — wrap. */
@media (max-width: 760px) {
  .benefit-bar { height: auto; min-height: 40px; padding: 6px 10px; white-space: normal; }
  .benefit-bar .items { flex-wrap: wrap; justify-content: center; row-gap: 2px; }
  .benefit-bar .item { padding: 0 8px; }
  .benefit-bar .dot { display: none; }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .row {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--primary); font-weight: 800; font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px; height: 30px;
  background: var(--primary); color: var(--on-primary);
  border-radius: var(--r-md);
  display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
}
.brand-name b { color: var(--accent); }

/* Pattern #14 — visible nav, never hamburger on desktop */
.nav { display: flex; gap: 28px; align-items: center; }
/* WCAG 2.2 SC 2.5.8 — padding lifts each link past the 24px target floor */
.nav a { color: var(--secondary); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; min-height: 28px; padding: 4px 0; }
.nav a:hover { color: var(--primary); text-decoration: none; }

.header-cta-wrap { display: flex; align-items: center; gap: 14px; }
.header-price-note { font-size: 13px; color: var(--secondary); font-weight: 500; }
.header-price-note s { color: var(--muted); margin-right: 6px; }

@media (max-width: 860px) {
  .nav, .header-price-note { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 16px; line-height: 1;
  border-radius: var(--r-md); border: 0;
  cursor: pointer;
  transition: background-color 100ms ease, transform 100ms ease, box-shadow 100ms ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: var(--on-primary); padding: 14px 22px; height: 48px; }
.btn-primary:hover { background: var(--primary-hover); }

/* Pattern #85 + #141 — hero CTA, gentle radius, accent fill */
.btn-hero {
  background: var(--accent);
  color: var(--on-accent);
  font-size: 18px; font-weight: 700;
  padding: 0 32px;
  height: 60px;
  border-radius: var(--r-lg);
  box-shadow: 0 6px 0 0 #7f1d1d, 0 14px 28px -10px rgba(220, 38, 38, 0.55);
}
.btn-hero:hover { background: var(--accent-hover); }
.btn-hero:active { box-shadow: 0 2px 0 0 #7f1d1d, 0 6px 14px -6px rgba(220, 38, 38, 0.55); transform: translateY(4px); }

.btn-secondary {
  background: var(--surface); color: var(--primary);
  padding: 14px 22px; height: 48px;
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-muted); }

/* ===== Typography ===== */
h1, h2, h3 { margin: 0; color: var(--primary); font-family: var(--font-sans); }
.h-display {
  font-size: clamp(2.4rem, 4.6vw, 3.75rem);
  font-weight: 800; line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.h-display em { font-style: normal; color: var(--accent); }
.h-section {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--r-full);
}
/* DESIGN.md motion mechanics: animate transform/opacity only (compositor),
   so the ring is a scaled pseudo-element, not an animated box-shadow. */
.eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  position: relative;
}
.eyebrow .pulse::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.6;
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0%        { transform: scale(1); opacity: 0.6; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

.lede { font-size: 18px; line-height: 1.6; color: var(--secondary); max-width: 56ch; text-wrap: pretty; }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-dark { background: var(--primary); color: var(--on-primary); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--on-primary); }
.section-muted { background: var(--surface-muted); }

.section-head { text-align: center; margin: 0 auto 48px; max-width: 720px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head p { color: var(--secondary); font-size: 17px; margin-top: 14px; }

/* ===== Hero ===== */
.hero { padding: 64px 0 48px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.hero h1 { margin-top: 18px; }
.hero .lede { margin: 20px 0 28px; }

/* Pattern #117 — logo strip */
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  margin-top: 32px;
}
.hero-meta .count { color: var(--secondary); font-weight: 500; font-size: 14px; }
.hero-meta .sep { width: 1px; height: 18px; background: var(--border-strong); }

/* Hero CTA row */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.cta-row .micro { font-size: 13px; color: var(--secondary); }
.cta-row .micro b { color: var(--primary); font-weight: 600; }

/* Hero card preview */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: 22px;
  position: relative;
}
.hero-card::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(220,38,38,0.18), rgba(15,23,42,0.0) 60%);
  pointer-events: none;
}
.code-window {
  background: #0b1220;
  color: #e2e8f0;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  overflow: hidden;
  position: relative;
}
.code-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: #111a2e;
  border-bottom: 1px solid #1e293b;
}
.code-chrome .dot { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.code-chrome .dot.r { background: #ef4444; }
.code-chrome .dot.y { background: #f59e0b; }
.code-chrome .dot.g { background: #22c55e; }
.code-chrome .file {
  margin-left: 10px;
  font-size: 12px;
  color: #94a3b8;
  display: inline-flex; align-items: center; gap: 6px;
}
.code-body { padding: 16px 18px 18px; max-height: 360px; overflow: hidden; }
.code-body .ln { display: block; }
.code-body .c-key { color: #93c5fd; }
.code-body .c-str { color: #fca5a5; }
.code-body .c-com { color: #64748b; font-style: italic; }
.code-body .c-tag { color: #34d399; }
.code-body .c-prim { color: #f472b6; }
.code-body .indent { display: inline-block; width: 1ch; }

.hero-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
  padding: 4px 4px 0;
  font-size: 13px; color: var(--secondary);
}
.hero-card-foot b { color: var(--primary); }

/* Floating side annotations */
.hero-card .anno {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-card .anno .pill {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--success); color: #fff;
  font-family: var(--font-mono); font-size: 11px;
  border-radius: var(--r-full);
  padding: 2px 8px;
}
.hero-card .anno.a1 { top: 24px; right: -18px; }
.hero-card .anno.a2 { bottom: 60px; left: -22px; }
@media (max-width: 980px) {
  .hero-card .anno.a1 { right: 8px; }
  .hero-card .anno.a2 { left: 8px; }
}

/* ===== Social proof bar ===== */
.social-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0;
}
.social-bar .inner {
  display: flex; align-items: center; justify-content: center; gap: 18px 36px;
  flex-wrap: wrap;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.social-bar .label { color: var(--muted); }
.social-bar .tool {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary);
  opacity: 0.85;
}
.social-bar .tool .glyph {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--on-primary);
  display: inline-grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ===== Problem / Solution split ===== */
.split-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 760px) { .split-grid { grid-template-columns: 1fr; } }
.split-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}
.split-card.bad { border-color: var(--danger-border); background: var(--danger-surface); }
.split-card.good { border-color: var(--success-border); background: var(--success-surface); }
.split-card h3, .split-card h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 16px;
}
/* --danger (deeper red) clears 4.5:1 on the tinted danger-surface; --accent did not */
.split-card.bad h3, .split-card.bad h2 { color: var(--danger); }
.split-card.good h3, .split-card.good h2 { color: var(--success); }
.split-card .icon-circle {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px;
}
.split-card.bad .icon-circle { background: var(--accent); }
.split-card.good .icon-circle { background: var(--success); }
.split-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.split-card li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  font-size: 15px;
  color: var(--primary);
  line-height: 1.5;
  align-items: start;
}
.split-card li .mark {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.split-card.bad li .mark { color: var(--danger); }
.split-card.good li .mark { color: var(--success); }
.split-card li b { font-weight: 700; }

/* ===== How it works ===== */
.steps {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
}
.step .num {
  width: 36px; height: 36px;
  background: var(--primary); color: var(--on-primary);
  border-radius: var(--r-full);
  display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 15px;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.step p { margin: 0; color: var(--secondary); font-size: 15px; }
.step .prompt {
  margin-top: 16px;
  background: #0b1220;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  line-height: 1.55;
  overflow: hidden;
}
.step .prompt .you { color: #93c5fd; }
.step .prompt .ai { color: #fca5a5; }

/* ===== Patterns grid ===== */
.patterns {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .patterns { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .patterns { grid-template-columns: 1fr; } }
.pattern {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex; flex-direction: column;
  gap: 8px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.pattern:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.pattern .pid {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.pattern h3 {
  margin: 0;
  font-size: 15px; font-weight: 600;
  color: var(--primary);
  line-height: 1.35;
}
.pattern .delta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 600;
  color: var(--success);
}
.pattern .delta.neg { color: var(--accent); }
.pattern .delta .bar {
  flex: 1; height: 4px; background: var(--surface-muted); border-radius: var(--r-full);
  overflow: hidden; min-width: 40px;
}
.pattern .delta .fill { display: block; height: 100%; background: var(--success); }
.pattern .delta.neg .fill { background: var(--accent); }

.patterns-foot { text-align: center; margin-top: 32px; color: var(--secondary); }
.patterns-foot b { color: var(--primary); }

/* ===== Comparison table ===== */
.compare {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 15px;
}
.compare th {
  background: var(--surface-muted);
  font-weight: 600;
  font-size: 13px;
  color: var(--secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compare th.us { color: var(--primary); }
.compare tr:last-child td { border-bottom: 0; }
.compare td.row-head { font-weight: 600; color: var(--primary); width: 36%; }
.compare td .ok { color: var(--success); font-weight: 700; }
.compare td .no { color: var(--accent); font-weight: 700; }
.compare td .neutral { color: var(--muted); }
/* DESIGN.md table rule: horizontal scroll with a visible affordance on mobile —
   never silently crop columns. */
.compare-hint { display: none; }
@media (max-width: 720px) {
  .compare { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .compare table { min-width: 560px; }
  .compare th, .compare td { padding: 12px 14px; font-size: 14px; }
  .compare-hint { display: block; text-align: center; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
}

/* ===== Pricing / Buy card (Pattern #114, #21, #46, #63, #103) ===== */
.buy-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 980px) { .buy-grid { grid-template-columns: 1fr; gap: 32px; } }

.buy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-2);
}
.buy-card .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-sale { background: var(--accent); color: #fff; }
.badge-new { background: var(--primary); color: #fff; }

.buy-card .product-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
.buy-card .product-sub { color: var(--secondary); margin-top: 6px; font-size: 15px; }

.price-row {
  display: flex; align-items: baseline; gap: 14px;
  margin: 22px 0 8px;
}
.price-large {
  font-size: 3rem; font-weight: 800;
  letter-spacing: -0.025em; line-height: 1;
  color: var(--primary);
}
.price-strike {
  font-size: 1.15rem; color: var(--muted);
  text-decoration: line-through;
}
.price-save {
  display: inline-flex;
  font-size: 13px; font-weight: 700;
  background: var(--warning-surface); color: var(--on-warning-surface);
  padding: 3px 8px;
  border-radius: var(--r-sm);
}

.delivery-note {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--secondary);
  margin-bottom: 18px;
}
.delivery-note b { color: var(--success); }

/* Pattern #46 — pay-later */
.paylater {
  font-size: 13px; color: var(--secondary);
  margin-bottom: 22px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border-radius: var(--r-sm);
}
.paylater b { color: var(--primary); }

.buy-card .checks {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: grid; gap: 10px;
}
.buy-card .checks li {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  font-size: 14.5px; color: var(--primary);
}
.buy-card .checks li::before {
  content: '✓'; color: var(--success); font-weight: 700; line-height: 22px;
}

/* Trust strip */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 20px;
}
.trust-seal {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-muted);
  color: var(--secondary);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600;
}
.trust-seal .glyph { color: var(--success); font-weight: 700; }

/* Side preview of file contents */
.file-preview {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-3);
}
.file-preview .head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.file-preview .head .ico {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-md);
  display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
}
.file-preview .meta { font-size: 13px; color: #94a3b8; }
.file-preview .meta b { color: #fff; }
.file-preview h3 { font-size: 1.1rem; margin: 0; color: #fff; }
.file-preview .toc {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 2px;
  font-family: var(--font-mono); font-size: 13px;
}
.file-preview .toc li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: #cbd5e1;
}
.file-preview .toc li:hover { background: rgba(255,255,255,0.05); color: #fff; }
.file-preview .toc .hash { color: var(--accent); }
.file-preview .toc .count { margin-left: auto; color: #64748b; font-size: 12px; }

/* ===== Testimonials (Pattern #4, #48) ===== */
.testi-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) { .testi-grid { grid-template-columns: 1fr; } }
.testi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.testi .quote {
  font-size: 17px; line-height: 1.55; color: var(--primary);
  font-weight: 500;
  text-wrap: pretty;
}
.testi .quote b { background: linear-gradient(transparent 62%, #fef3c7 62%); padding: 0 2px; }

/* ===== FAQ ===== */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0;
  overflow: hidden;
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 22px; color: var(--secondary);
  transition: transform 200ms ease;
  line-height: 1;
}
.faq details[open] summary::after { content: '−'; }
.faq .ans { padding: 0 22px 20px; color: var(--secondary); font-size: 15.5px; line-height: 1.65; }
.faq .ans p { margin: 0 0 10px; }
.faq .ans p:last-child { margin: 0; }

/* ===== Final CTA (Pattern #60) ===== */
.final-cta {
  text-align: center;
  padding: 80px 0 100px;
}
.final-cta .h-section { margin-bottom: 14px; }
.final-cta .lede { margin: 0 auto 28px; }
.final-cta .cta-row { justify-content: center; }
.final-cta .guarantee {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--secondary);
}
.final-cta .guarantee .shield {
  width: 28px; height: 28px;
  background: var(--success); color: #fff;
  border-radius: var(--r-full);
  display: inline-grid; place-items: center;
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px; color: var(--secondary);
}
.site-footer .row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
/* WCAG 2.2 SC 2.5.8 — keep footer links above the 24px target floor */
.site-footer .links a { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 0; }

/* ===== Sticky mobile CTA (Pattern #41) ===== */
.sticky-mobile {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -8px 24px -8px rgba(15,23,42,0.15);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(120%);
  transition: transform 220ms ease;
}
.sticky-mobile.show { transform: translateY(0); }
.sticky-mobile .inner {
  display: flex; align-items: center; gap: 12px;
}
.sticky-mobile .info { flex: 1; min-width: 0; }
.sticky-mobile .info .t { font-size: 14px; font-weight: 600; color: var(--primary); }
.sticky-mobile .info .p { font-size: 13px; color: var(--secondary); }
.sticky-mobile .info .p b { color: var(--primary); }
.sticky-mobile .info .p s { color: var(--muted); margin-right: 4px; }
.sticky-mobile .btn { height: 50px; padding: 0 18px; }
@media (min-width: 760px) { .sticky-mobile { display: none; } }
@media (max-width: 759px) {
  body.has-sticky { padding-bottom: 90px; }
}

/* ===== WCAG 2.2 SC 2.4.11 — Focus Appearance =====
   2px outline, 3px offset, high-contrast against any background.
   Use :focus-visible so mouse clicks don't trigger the indicator. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus { outline: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.btn-hero:focus-visible,
.btn-primary:focus-visible {
  outline-color: #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--link);
}
.faq summary:focus-visible {
  outline-offset: 0;
  outline: 2px solid var(--link);
}

/* ===== Respect user motion preferences (WCAG 2.3.3) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .eyebrow .pulse::after { animation: none; opacity: 0; }
}

/* ===== Checkout error toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 140%);
  z-index: 200;
  max-width: min(92vw, 440px);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  padding: 14px 18px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  pointer-events: none;
}
.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
@media (max-width: 759px) {
  body.has-sticky .toast { bottom: 96px; }
}

/* Lite-edition email gate + checkout email modal share the same form styling. */
.lite-form {
  margin: 28px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}
.lite-form-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}
.lite-form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lite-form-input {
  width: 100%;
  box-sizing: border-box;
  height: 52px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--primary);
  transition: border-color .12s ease, box-shadow .12s ease;
}
/* When the input shares a row with the submit button (e.g. /lite), let it
   grow to fill the row instead of stretching the column-flex parent vertically. */
.lite-form-row .lite-form-input {
  flex: 1 1 220px;
  min-width: 0;
  width: auto;
}
/* Focus ring stays the system's blue focus hue (DESIGN.md focus-ring role) —
   red is reserved for accent/danger, and a red glow reads as an error. */
.lite-form-input:focus-visible {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.22);
}
.lite-form-note {
  font-size: 13px;
  color: #475569;
  margin: 0;
  line-height: 1.55;
}
.lite-form-status {
  font-size: 14px;
  margin: 4px 0 0;
  min-height: 1.2em;
}
.lite-form-status.is-ok { color: var(--success, #15803D); font-weight: 600; }
.lite-form-status.is-error { color: var(--accent); font-weight: 600; }

/* Pre-Stripe email + newsletter modal. */
.modal-backdrop {
  position: fixed; inset: 0;
  background: var(--scrim);
  display: none;
  align-items: center; justify-content: center;
  z-index: 80;
  padding: 16px;
}
.modal-backdrop.show { display: flex; }
.modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35);
}
.modal-card h3 { margin: 0 0 8px; font-size: 22px; }
.modal-card .modal-sub {
  margin: 0 0 18px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}
.modal-card .lite-form { margin: 0; max-width: none; }
/* In the checkout modal the input sits directly in .lite-form (a COLUMN flex),
   so the row-oriented `flex: 1 1 220px` would turn 220px into the input HEIGHT.
   Pin it to its own 52px height here (the Lite page keeps the row behaviour). */
.modal-card .lite-form-input { flex: 0 0 auto; }
.modal-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  margin: 4px 0 2px;
  line-height: 1.5;
}
.modal-checkbox input {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.modal-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 6px;
}
.modal-actions .btn { flex: 1 1 auto; }
.modal-close {
  background: none; border: 0; padding: 6px 8px;
  color: #64748b; cursor: pointer; font-size: 14px;
  align-self: flex-end;
}
.modal-close:hover { color: var(--primary); }
