/* ==========================================================================
   CompareBabyStuff — Design System "Astra"
   Source of truth: comparebabystuff-frontend-redesign-specification-astra.zip
   (FRONTEND-REDESIGN-SPEC.md §2–§12, FRONTEND-COMPONENT-MAP.md geometry)
   Visual layer only: content, URLs, schema and commerce markup unchanged.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (spec §3.1 color contract — allowed pairs only)
   -------------------------------------------------------------------------- */
:root {
  --canvas: #ffffff;
  --surface-warm: #f7f6f2;
  --surface-sage: #edf1eb;
  --ink: #263e33;
  --ink-strong: #193b2d;
  --text: #37483f;
  --text-muted: #626b63;
  --line: #dedfd6;
  --control-border: #7c877c;
  --brand: #294d3c;
  --brand-hover: #1b392b;
  --accent: #8a6849;
  --focus: #365ee8;
  --verified-fg: #285b3d;
  --verified-bg: #eaf2e9;
  --source-fg: #355647;
  --source-bg: #eef3ee;
  --info-fg: #275269;
  --info-bg: #edf4f8;
  --warning-fg: #785112;
  --warning-bg: #fff5dc;
  --critical-fg: #942d28;
  --critical-bg: #fff0ec;
  --critical-border: #b7473d;
  --unknown-fg: #62615b;
  --unknown-bg: #f1f0eb;
  --advantage-fg: #285b3d;
  --advantage-bg: #edf4ec;
  --tie-fg: #565f59;
  --tie-bg: #f1f3ef;
  --commerce-fg: #294d3c;
  --affiliate-bg: #294d3c;
  --affiliate-fg: #ffffff;

  /* display + working aliases */
  --forest: #294d3c;
  --forest-dark: #1b392b;
  --muted: #626b63;
  --warm: #f7f6f2;
  --sage: #edf1eb;
  --critical: #942d28;
  --display: 'DM Serif Display', Georgia, serif;

  /* spacing scale (spec §3.3) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --sp-20: 80px; --sp-24: 96px;

  /* z-layers (spec §3.4) */
  --z-header: 20; --z-ctx: 15; --z-menu: 40; --z-dialog: 60;

  /* Legacy v2 custom-property shim: page-scoped styles and generated
     fragments may still reference these names; map them to Astra tokens. */
  --card: #ffffff;
  --ink-900: #263e33; --ink-700: #37483f; --ink-500: #626b63; --ink-400: #626b63;
  --accent-dark: #294d3c;
  --warn-bg: #fff5dc;
  --r-card: 12px; --r-card-inner: 8px; --r-input: 8px; --r-pill: 8px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', Arial, sans-serif;
  --font-mono: 'DM Sans', Arial, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px;
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; min-width: 320px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 17px; line-height: 1.75;
  color: var(--text); background: var(--canvas);
  font-synthesis: none; font-weight: 400;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; background: none; border: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea { min-width: 0; }
img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
p, h1, h2, h3, h4, ul, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: #dce6d5; color: var(--forest-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }

h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.035em; }
h1 { font-size: 48px; line-height: 1.15; }
h2 { font-size: 34px; line-height: 1.2; }
h3 { font-weight: 600; line-height: 1.35; font-size: 21px; }
p { line-height: 1.75; }
ul, ol { padding: 0; }
table { font-variant-numeric: tabular-nums; }

.container { width: min(1240px, 100% - 80px); margin-inline: auto; }
.wrap { width: min(1240px, 100% - 80px); margin-inline: auto; }

.skip-link {
  position: fixed; top: 8px; left: 16px; z-index: 100;
  padding: 12px 20px; background: var(--forest); color: #fff;
  border-radius: 6px; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* typography helpers */
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .13em;
  line-height: 1.5; color: #62715b; text-transform: uppercase;
}
.small-note, .note { font-size: 12px; line-height: 1.65; color: var(--muted); }
.meta-dot {
  height: 3px; width: 3px; border-radius: 50%; background: #8b9b82;
  display: inline-block; flex-shrink: 0;
}
main { display: block; }
main.wrap { padding-block: 8px 64px; }
h2.section {
  font-size: 34px; margin: 56px 0 20px; letter-spacing: -0.03em;
  scroll-margin-top: 104px;
}
.lede { font-size: 18px; line-height: 1.65; color: var(--text); max-width: 760px; }
.sub {
  font-size: 14px; line-height: 1.7; color: var(--muted);
  max-width: 860px; margin-block: 10px;
}
.sub + .sub { margin-top: 6px; }
.sub em { font-style: italic; }
.related-links { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 48px; }
.related-links a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* links + buttons (spec §3.4) */
.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.5;
  min-height: 36px; color: var(--brand);
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 13px 22px;
  font-size: 15px; font-weight: 600; line-height: 1.4;
  border: 1px solid transparent; border-radius: 8px;
  transition: background .18s ease, border-color .18s ease;
}
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-hover); }
.button-secondary { border-color: var(--control-border); background: transparent; color: var(--brand); }
.button-secondary:hover { background: var(--surface-sage); }

/* legacy .btn (comparison CTA rows, quiz CTA) → primary button geometry */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 48px; padding: 12px 20px; margin: 4px 6px 4px 0;
  font-size: 14.5px; font-weight: 600; line-height: 1.4; white-space: normal;
  background: var(--affiliate-bg); color: var(--affiliate-fg);
  border: 1px solid transparent; border-radius: 8px;
  transition: background .18s ease;
}
.btn:hover { background: var(--brand-hover); color: #fff; }

/* --------------------------------------------------------------------------
   3. HEADER (spec §4) — markup swapped site-wide; nav.js provides the
   <=1023px disclosure toggle, details/summary provides the category dropdown.
   -------------------------------------------------------------------------- */
.site-header {
  position: relative; z-index: 30;
  background: #fffefa; border-bottom: 1px solid #ebece5;
}
.header-inner {
  height: 80px; display: flex; align-items: center;
  justify-content: space-between; gap: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-size: 22px; font-weight: 700; letter-spacing: -0.04em;
  color: var(--forest-dark);
}
.brand-mark { width: 32px; height: 32px; }
.brand-dot { color: #93744f; }
.brand-light { color: #f2f4ea; }
.brand-light .brand-dot { color: #b5bd9c; }

.desktop-nav {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.desktop-nav > a { display: flex; align-items: center; min-height: 44px; }
.desktop-nav > a:hover { color: #657b51; }
.desktop-nav > a[aria-current="page"] {
  text-decoration: underline; text-underline-offset: 7px;
}
.category-menu { position: relative; }
.category-menu > summary {
  display: flex; gap: 7px; align-items: center; min-height: 44px;
  list-style: none; font-weight: 500;
}
.category-menu > summary::-webkit-details-marker { display: none; }
.category-menu > summary svg { transition: transform .18s ease; }
.category-menu[open] > summary svg { transform: rotate(180deg); }
.category-dropdown {
  position: absolute; top: 54px; left: -60px; width: 560px;
  background: #fffefa; border: 1px solid var(--line);
  box-shadow: 0 12px 32px #193b2d14; border-radius: 10px;
  padding: 24px; z-index: var(--z-menu);
}
.category-dropdown > .eyebrow { margin-bottom: 14px; }
.category-dropdown > div {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px;
}
.category-dropdown a {
  padding: 11px 8px; display: flex; align-items: center;
  justify-content: space-between; font-size: 14px; border-radius: 4px;
}
.category-dropdown a::after { content: "↗"; color: #8b9b82; font-size: 12px; }
.category-dropdown a:hover { background: var(--surface-sage); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.find-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 4px 0 22px; margin-left: 8px;
  border-left: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--brand);
}
.find-trigger:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 5px; }

/* nav.js injected toggle (mobile) */
.nav-toggle {
  display: none; width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 6px;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--ink-strong); }
.site-header.nav-open .nav-toggle { background: var(--surface-sage); }

/* --------------------------------------------------------------------------
   4. FOOTER (spec §4)
   -------------------------------------------------------------------------- */
.site-footer {
  background: #254331; color: #e9ede2;
  padding: 64px 0 21px;
}
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 45px;
}
.footer-brand p {
  font-family: var(--display); font-size: 24px; font-weight: 400;
  line-height: 1.45; color: #d6decc; margin-top: 24px; letter-spacing: -0.01em;
}
.footer-brand-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; margin-top: 24px; color: #c5d4ba; min-height: 44px;
}
.footer-brand-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-group h3 {
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  color: #e7ecdf; margin: 6px 0 14px; text-transform: uppercase;
}
.footer-group a {
  font-size: 13px; display: flex; align-items: center; gap: 6px;
  min-height: 36px; color: #c3d1b9; line-height: 1.5;
}
.footer-group a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-disclosure {
  margin-top: 42px; padding-top: 23px; border-top: 1px solid #567049;
  font-size: 12px; color: #bfceb6; line-height: 1.7;
}
.footer-disclosure p + p { margin-top: 8px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; margin-top: 23px; color: #d0dcc6; font-size: 12px; line-height: 1.7;
}
.footer-bottom a { color: #d0dcc6; }
.footer-bottom a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   5. BREADCRUMBS (spec §4)
   -------------------------------------------------------------------------- */
.breadcrumbs { padding-block: 26px 0; color: var(--muted); font-size: 12.5px; }
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 7px; list-style: none; line-height: 1.7;
}
.breadcrumbs li { display: flex; align-items: center; gap: 7px; }
.breadcrumbs li + li::before { content: "›"; color: #9aa79a; }
.breadcrumbs a { min-height: 28px; display: inline-flex; align-items: center; }
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs [aria-current] { color: #506448; }
/* legacy single-line breadcrumb kept as graceful fallback */
.breadcrumb {
  font-size: 12.5px; color: var(--muted); margin: 20px 0 8px;
}
.breadcrumb a { color: #506448; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   6. HUB HERO + DISCOVERY CARDS (spec §7.2)
   -------------------------------------------------------------------------- */
.hub-hero { padding: 14px 0 8px; max-width: 900px; }
.hub-hero h1 { max-width: 800px; }
.hub-hero .lede { margin-top: 18px; }

.card-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; margin: 20px 0 12px;
}
.card {
  display: flex; flex-direction: column; gap: 0;
  background: #fff; border: 1px solid #e0e3d9; border-radius: 10px;
  padding: 22px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: #a0af97; transform: translateY(-2px); }
.card .tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #62715b;
  background: var(--surface-sage); border-radius: 4px; padding: 4px 8px;
  margin-bottom: 14px;
}
.card h3 { font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
.card > p, .card p:not(.tag) { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin-top: 10px; flex: 1; }
.mini-facts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.mini-facts .fact { font-size: 12px; color: var(--muted); }
.mini-facts .fact strong { color: var(--ink-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.card-cta {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid #e9ebe3;
  font-size: 13px; font-weight: 600; color: var(--brand);
}
.card:hover .card-cta { text-decoration: underline; text-underline-offset: 4px; }

/* --------------------------------------------------------------------------
   7. COMPARISON PAGES (spec §7.3)
   -------------------------------------------------------------------------- */
.safety-note {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--info-bg); border: 1px solid #d7e3ea;
  border-left: 4px solid #275269;
  color: var(--info-fg); border-radius: 7px;
  padding: 20px 22px; font-size: 14.5px; line-height: 1.75;
  margin: 26px 0;
}
.safety-note::before { content: "ℹ"; font-size: 17px; line-height: 1.4; color: #275269; }
.safety-note strong { color: var(--info-fg); }

.table-scroll, .table-wrap {
  overflow-x: auto; margin: 18px 0;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
table.compare {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  font-size: 14px; min-width: 640px;
}
table.compare caption {
  caption-side: top; text-align: left; font-size: 12.5px;
  color: var(--muted); padding: 14px 16px 10px;
}
table.compare thead { background: var(--surface-sage); }
table.compare thead th {
  font-size: 13px; font-weight: 600; text-align: left;
  padding: 14px 16px; border-bottom: 1px solid #dfe5d9;
  color: var(--ink-strong);
}
table.compare thead th:first-child { width: 26%; color: #5d7750; }
table.compare th, table.compare td {
  padding: 15px 16px; vertical-align: top; text-align: left;
  line-height: 1.7; overflow-wrap: break-word;
}
table.compare tbody th { font-weight: 600; font-size: 13.5px; color: var(--ink-strong); }
table.compare tbody tr { border-bottom: 1px solid var(--line); }
table.compare tbody tr:last-child { border-bottom: 0; }
table.compare tbody td { border-left: 1px solid #f0f2ec; color: var(--text); }
table.compare tbody td:first-child { border-left: 0; }
table.compare tbody tr:nth-child(even) { background: #fcfcf8; }
td.win {
  background: var(--advantage-bg) !important;
  color: var(--advantage-fg); font-weight: 600;
}
td.win::before { content: "✓ "; color: var(--advantage-fg); }

/* table tools bar (diff toggle + group sort, from interactive.js) */
.table-tools {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px;
  margin: 18px 0 6px; font-size: 13.5px;
}
.diff-toggle, .sort-group label {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; position: relative; cursor: pointer;
}
.diff-toggle input, .sort-group input {
  width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0;
}
.sort-group select {
  min-height: 44px; border: 1px solid var(--control-border);
  border-radius: 6px; padding: 9px 32px 9px 12px;
  background: #fff; color: var(--ink-strong); font-size: 13.5px; cursor: pointer;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 8px 16px; border: 1px solid var(--control-border);
  border-radius: 8px; font-size: 13.5px; font-weight: 500;
  background: #fff; color: var(--text);
  transition: background .18s ease, border-color .18s ease;
}
.chip:hover { background: var(--surface-sage); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

/* quiz (rendered by interactive.js into .quiz-body) */
.quiz {
  margin: 32px 0; border: 1px solid #dfe5d8; border-radius: 11px;
  background: #f7f7f1; padding: 4px;
}
.quiz-body { padding: 24px; min-height: 120px; }
.quiz-body noscript p, .quiz-body noscript li { font-size: 13.5px; color: var(--muted); }
.quiz-body noscript ul { padding-left: 20px; margin: 10px 0; }
.quiz-progress {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; font-size: 12px; color: #647952;
}
.quiz-progress > div { display: flex; gap: 5px; }
.quiz-dot { width: 30px; height: 3px; border-radius: 1px; background: #dce3d3; }
.quiz-dot.done, .quiz-dot.current { background: #5f7b4f; }
.quiz-question { font-size: 17px; font-weight: 600; margin-bottom: 16px; color: var(--ink-strong); }
.quiz-options { display: flex; flex-direction: column; gap: 11px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid #a7b799; background: #fff; padding: 14px 15px;
  border-radius: 6px; font-size: 14px; line-height: 1.5; min-height: 48px;
  transition: border-color .18s ease, background .18s ease;
}
.quiz-option:hover { border-color: #6d865c; background: #f4f7ef; }
.quiz-result-title { font-size: 15px; font-weight: 600; margin: 14px 0 12px; color: var(--ink-strong); }
.quiz-result-card {
  border: 1px solid #d4ddc9; background: #fff; border-radius: 8px;
  padding: 18px; margin-bottom: 12px;
}
.quiz-result-card.top { border-color: #8ca577; background: #fbfdf9; }
.quiz-result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.quiz-result-row strong { font-size: 15.5px; color: var(--ink-strong); }
.quiz-pct { font-size: 12px; font-weight: 600; color: #5f7b4f; white-space: nowrap; }
.quiz-bar { flex: 1 1 120px; height: 5px; background: #e4e9da; border-radius: 3px; margin: 8px 0 0; }
.quiz-bar-fill { height: 5px; border-radius: 3px; background: var(--brand); }
.quiz-blurb { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 10px; }
.quiz-tie { font-size: 13.5px; color: var(--text); background: #fff; border: 1px dashed #b9c6ab; border-radius: 8px; padding: 14px; }
.quiz-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 13px; font-weight: 600; color: var(--brand); margin-top: 14px;
}
.quiz-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.quiz-cta { margin: 14px 0 0; }

/* verdict + purchase (spec §7.3/§8) */
.verdict {
  margin: 40px 0; padding: 28px 30px;
  background: var(--surface-sage); border: 1px solid #dfe5d9;
  border-radius: 11px;
}
.verdict h2 { font-size: 28px; margin-bottom: 16px; }
.verdict p { font-size: 15px; line-height: 1.8; margin-top: 12px; }
.verdict .pick {
  font-weight: 600; color: var(--ink-strong);
  border-bottom: 2px solid #8ca577; padding-bottom: 1px;
}
.cta-box {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; margin: 32px 0; background: #fff;
}
.cta-box > p { font-size: 14px; color: var(--text); margin-bottom: 16px; }
.cta-box .note { display: block; margin-top: 12px; max-width: 720px; }

/* sources + disclosure */
.sources { margin: 14px 0 26px; }
.sources ol { list-style: decimal; padding-left: 24px; max-width: 950px; }
.sources li {
  padding: 11px 0 11px 6px; font-size: 13px; line-height: 1.7;
  color: var(--muted); border-bottom: 1px solid #e8ede1;
}
.sources li:last-child { border-bottom: 0; }
.disclosure {
  font-size: 12.5px; line-height: 1.7; color: var(--muted);
  padding: 18px 0 8px; margin-top: 18px; border-top: 1px solid var(--line);
  max-width: 900px;
}

/* --------------------------------------------------------------------------
   8. HOMEPAGE (spec §7.1)
   -------------------------------------------------------------------------- */
.home-hero { position: relative; overflow: hidden; isolation: isolate; background: #eae7de; }
.hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: -1;
  animation: hero-settle 1.15s ease-out both;
}
.hero-inner { min-height: 520px; display: flex; align-items: center; }
.hero-copy { max-width: 600px; padding: 56px 0 62px; animation: copy-enter .55s ease both; }
.hero-copy > .eyebrow { margin-bottom: 22px; color: #516549; }
.hero-copy h1 { font-size: clamp(44px, 4.5vw, 62px); line-height: 1.09; color: #244532; }
.hero-copy h1 span { color: #536b4c; font-style: italic; }
.hero-description {
  font-size: 16.5px; line-height: 1.7; max-width: 420px;
  margin-top: 22px; color: #565f51;
}
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 28px; flex-wrap: wrap; }
.hero-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: #3c503b; min-height: 44px;
}
.hero-secondary:hover { text-decoration: underline; text-underline-offset: 5px; }

.section-heading { margin-bottom: 28px; }
.section-heading > .eyebrow { margin-bottom: 10px; }
.section-heading-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
}
.section-heading-row h2 { font-size: 33px; }
.section-description { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 720px; }

.home-section { padding-block: 64px; }
.comparisons-band { background: var(--surface-warm); border-block: 1px solid #f0f0e9; }

.category-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 21px;
}
.category-entry { display: block; min-width: 0; }
.category-image {
  display: block; /* span is inline by default: height/overflow need block */
  height: 150px; overflow: hidden; border-radius: 9px;
  background: #f5f4ef; border: 1px solid #e8e9e1;
}
/* decorative-crop variants keep reused category imagery visually distinct */
.category-image.crop-r img { object-position: 100% 30%; }
.category-image.crop-l img { object-position: 0% 68%; }
.category-image.crop-br img { object-position: 100% 60%; }
.category-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .18s ease;
}
.category-entry:hover .category-image img { transform: scale(1.05); }
.category-name {
  display: flex; align-items: center; justify-content: space-between;
  gap: 4px; margin-top: 14px;
}
.category-name h3 { font-size: 14.5px; font-weight: 600; }
.category-name::after { content: "↗"; color: #657456; font-size: 13px; }
.category-entry:hover .category-name h3 { text-decoration: underline; text-underline-offset: 4px; }
.category-entry > p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.img-note { font-size: 11px; color: var(--muted); margin-top: 26px; }

.featured-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
.featured-card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid #e0e3d9; border-radius: 10px; padding: 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.featured-card:hover { border-color: #a0af97; transform: translateY(-2px); }
.featured-card .tag {
  align-self: flex-start; font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #62715b;
  background: var(--surface-sage); border-radius: 4px; padding: 4px 8px;
}
.featured-card h3 { font-size: 19px; line-height: 1.45; margin-top: 14px; font-weight: 600; }
.featured-card h3 .vs { font-family: var(--display); font-style: italic; font-weight: 400; color: #687b58; display: block; font-size: 15px; margin: 2px 0; }
.featured-card > p { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin-top: 10px; flex: 1; }
.featured-card .card-cta { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e9ebe3; font-size: 13px; font-weight: 600; color: var(--brand); }
.featured-card:hover .card-cta { text-decoration: underline; text-underline-offset: 4px; }

.method-band { background: var(--surface-sage); padding-block: 72px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; }
.method-intro h2 { font-size: clamp(34px, 3vw, 42px); line-height: 1.15; }
.method-intro h2 span { font-style: italic; color: #687a59; }
.method-intro > p:not(.eyebrow) {
  font-size: 14.5px; color: var(--muted); max-width: 340px; margin-top: 20px;
}
.method-intro .text-link { margin-top: 22px; }
.method-principles > div {
  display: flex; gap: 22px; padding: 22px 0;
  border-bottom: 1px solid #d7dfd0;
}
.method-principles > div:first-child { padding-top: 8px; }
.method-principles > div:last-child { border: 0; padding-bottom: 0; }
.method-principles > div > span { font-size: 12px; color: #677b54; padding-top: 4px; font-variant-numeric: tabular-nums; }
.method-principles h3 { font-size: 17px; letter-spacing: -0.01em; }
.method-principles p { font-size: 13.5px; color: var(--muted); margin-top: 7px; max-width: 400px; line-height: 1.75; }

.tools-home { display: grid; grid-template-columns: .85fr 1.3fr; gap: 96px; padding-block: 76px; }
.tools-intro h2 { font-size: clamp(34px, 3vw, 42px); line-height: 1.15; }
.tools-intro h2 span { font-style: italic; color: #687a59; }
.tools-intro > p:not(.eyebrow) { font-size: 14.5px; color: var(--muted); max-width: 330px; margin-top: 20px; }
.tool-list { display: flex; flex-direction: column; }
.tool-entry {
  display: grid; grid-template-columns: 44px 1fr 24px; align-items: center;
  gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line);
}
.tool-entry:first-child { border-top: 1px solid var(--line); }
.tool-icon {
  width: 44px; height: 44px; background: #f1f3ed;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: #5d7452; font-size: 19px;
}
.tool-entry h3 { font-size: 16px; font-weight: 600; }
.tool-entry p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 5px; max-width: 400px; }
.tool-entry .tool-arrow { color: #617a4e; transition: transform .18s ease; }
.tool-entry:hover .tool-arrow { transform: translate(3px, -3px); }
.tool-entry:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

.safety-home {
  display: grid; grid-template-columns: 60px 1fr auto; gap: 24px;
  align-items: center; padding-block: 44px; border-top: 1px solid var(--line);
}
.safety-home-icon {
  width: 57px; height: 57px; display: flex; align-items: center;
  justify-content: center; color: #617b50; background: #f0f3ec;
  border-radius: 50%; font-size: 26px;
}
.safety-home h2 { font-size: 26px; letter-spacing: -0.02em; }
.safety-home p:not(.eyebrow) { font-size: 13px; color: var(--muted); margin-top: 8px; max-width: 610px; }
.safety-home .button { font-size: 13.5px; min-height: 44px; padding-inline: 18px; }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.guide-entry { padding: 24px 0 0; border-top: 1px solid #cbd3c3; }
.guide-entry > .eyebrow { margin-bottom: 13px; }
.guide-entry h3 {
  font-family: var(--display); font-size: 24px; font-weight: 400;
  letter-spacing: -0.01em; line-height: 1.3; max-width: 340px;
}
.guide-entry h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.guide-entry > p:not(.eyebrow) {
  font-size: 13.5px; color: var(--muted); margin-top: 15px;
  line-height: 1.75; max-width: 330px;
}
.guide-entry .text-link { font-size: 13px; margin-top: 18px; }

/* notices + empty states */
.notice {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 23px; border-radius: 7px;
  background: #eff3ec; border: 1px solid #dce5d5;
  font-size: 14px; color: #526547; line-height: 1.75; margin-bottom: 18px;
}
.notice-icon { padding-top: 2px; color: #5a774b; }
.notice h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: #3d5733; }
.notice a { text-decoration: underline; text-underline-offset: 3px; }
.notice-warning { background: var(--warning-bg); color: #795c21; border-color: #ead6a8; }
.notice-warning h3, .notice-warning .notice-icon { color: var(--warning-fg); }
.notice-critical {
  background: var(--critical-bg); color: #8a3930;
  border-color: #e4b6ab; border-left: 4px solid var(--critical-border);
}
.notice-critical h3, .notice-critical .notice-icon { color: var(--critical-fg); }
.empty-state {
  text-align: center; padding: 42px 25px;
  display: flex; align-items: center; flex-direction: column;
  gap: 13px; color: #5f774f;
}
.empty-state h3 {
  font-family: var(--display); font-size: 27px; font-weight: 400;
  color: #3e5734; letter-spacing: -0.01em;
}
.empty-state p { font-size: 14px; max-width: 500px; color: var(--muted); }

/* --------------------------------------------------------------------------
   9. TOOLS + RECALL REGISTER + POLICY PAGES (absorbed page-scoped styles,
   restated on Astra tokens; per-page CSS links removed at swap time)
   -------------------------------------------------------------------------- */
.calc-box, .calc-summary, .cost-card, .exp-card {
  background: #fff; border: 1px solid #dce3d4; border-radius: 10px;
  padding: 28px; margin: 18px 0 30px;
}
.calc-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.calc-row + .calc-row { margin-top: 14px; }
.calc-field, .cost-field, .exp-field {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 240px; flex: 1 1 240px; max-width: 100%;
}
.calc-field label, .cost-field label, .exp-field label {
  font-size: 13px; font-weight: 600; color: #4e6740; letter-spacing: 0;
  text-transform: none; line-height: 1.5;
}
.calc-field select, .calc-field input, .cost-field input,
.exp-field select, .exp-field input {
  width: 100%; min-height: 48px; font-size: 16px;
  padding: 11px 12px; border: 1px solid var(--control-border);
  border-radius: 8px; background: #fff; color: var(--ink-strong); line-height: 1.5;
}
.calc-field select { padding-right: 32px; }
.calc-btn {
  min-height: 48px; padding: 12px 26px; font-size: 15px; font-weight: 600;
  background: var(--brand); color: #fff; border: none;
  border-radius: 8px; cursor: pointer; transition: background .18s ease;
}
.calc-btn:hover { background: var(--brand-hover); }
.calc-error {
  margin-top: 14px; color: var(--warning-fg); background: var(--warning-bg);
  border: 1px solid #ead6a8; border-radius: 8px; padding: 12px 14px;
  font-size: 14px; line-height: 1.7;
}
.method-note {
  background: var(--warning-bg); border: 1px solid #ead6a8;
  border-radius: 8px; padding: 14px 18px; margin: 18px 0;
  font-size: 14px; color: var(--text); line-height: 1.7;
}
.compat-line { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 15px; }
.compat-ok { color: var(--verified-fg); font-weight: 600; }
.compat-adapter { color: var(--warning-fg); font-weight: 600; }
.compat-bad { color: var(--critical-fg); font-weight: 600; }
.compat-unknown { color: var(--muted); font-weight: 600; }
.compat-note { color: var(--muted); }
.cost-table, .exp-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14.5px; }
.cost-table th, .cost-table td, .exp-table th, .exp-table td {
  border-bottom: 1px solid var(--line); padding: 10px; text-align: left;
  vertical-align: top; line-height: 1.6;
}
.cost-table th, .exp-table th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600;
}
.cost-table td.num, .cost-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-table tr.total td { font-weight: 700; border-top: 2px solid var(--ink-strong); border-bottom: 0; font-size: 16.5px; }
.excl-note { color: var(--warning-fg); font-size: 13.5px; }
.calc-summary { padding: 22px 26px; }
.calc-summary-label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.calc-total { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 400; line-height: 1.1; color: var(--ink-strong); margin: 0; font-variant-numeric: tabular-nums; }
.calc-summary-meta { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.result-note, .cost-note { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.cost-out { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.cost-year { background: var(--surface-sage); border-radius: 8px; padding: 12px 18px; min-width: 130px; }
.cost-year .yr { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cost-year .amt { font-size: 21px; font-weight: 600; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.gap-flag {
  font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  background: var(--warning-bg); border: 1px solid #ead6a8; border-radius: 6px;
  padding: 3px 10px; color: var(--warning-fg); font-weight: 600;
}
.unit-toggle { display: inline-flex; font-size: 13.5px; }
.unit-toggle button {
  min-height: 44px; padding: 9px 18px; border: 1px solid var(--control-border);
  background: #fff; cursor: pointer; color: var(--muted);
}
.unit-toggle button:first-child { border-radius: 8px 0 0 8px; }
.unit-toggle button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.unit-toggle button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.calc-result { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 16px; }
.calc-result .big { font-size: 26px; font-weight: 600; color: var(--ink-strong); }
.calc-result .pct-line { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.exp-result { margin-top: 16px; border-radius: 8px; padding: 16px 18px; font-size: 15px; line-height: 1.65; }
.exp-result.rule { background: var(--verified-bg); border: 1px solid #bcd9bc; color: var(--text); }
.exp-result.unknown { background: var(--warning-bg); border: 1px solid #ead6a8; color: var(--text); }
.exp-result.error { background: var(--critical-bg); border: 1px solid #e7b8b0; color: var(--critical-fg); }
.exp-date { font-size: 24px; font-weight: 600; color: var(--ink-strong); display: block; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.exp-verbatim {
  font-size: 12.5px; letter-spacing: .02em; background: #f1f0eb;
  border-radius: 6px; padding: 4px 10px; display: inline-block; margin-top: 8px;
}
.exp-label-hint { margin-top: 10px; font-weight: 600; }
.pill {
  font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 6px; padding: 3px 10px; white-space: nowrap; font-weight: 600;
}
.pill.ok { background: var(--verified-bg); border: 1px solid #bcd9bc; color: var(--verified-fg); }
.pill.gap { background: var(--warning-bg); border: 1px solid #ead6a8; color: var(--warning-fg); }
.pick-card {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 24px; margin: 20px 0; background: #fff;
}
.pick-card h3 { margin-top: 0; }

/* recall register (generated rows) */
.rc-controls { margin: 16px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.rc-controls button {
  min-height: 40px; font: inherit; font-size: 13px; padding: 8px 16px;
  border: 1px solid var(--control-border); background: #fff;
  border-radius: 8px; cursor: pointer; color: var(--text);
}
.rc-controls button[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.rc-summary { font-weight: 600; }
table.rc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
table.rc-table th, table.rc-table td {
  border: 1px solid var(--line); padding: 10px 12px;
  vertical-align: top; text-align: left; line-height: 1.6;
}
table.rc-table th { background: var(--surface-sage); font-size: 12.5px; }
tr.rc-recalled { background: var(--critical-bg); }
tr.rc-recalled td.rc-prod { border-left: 4px solid var(--critical-border); }
tr.rc-history { background: var(--warning-bg); }
tr.rc-clear td.rc-prod { border-left: 4px solid #2e6b34; }
.rc-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  letter-spacing: .03em; padding: 3px 10px; border-radius: 6px; white-space: nowrap;
}
.rc-badge.recalled { background: var(--critical-border); color: #fff; }
.rc-badge.history-noted { background: #a86e00; color: #fff; }
.rc-badge.clear { background: var(--verified-bg); color: var(--verified-fg); }
ul.rc-links { margin: 0 0 8px; padding-left: 20px; }
ul.rc-links li { margin-bottom: 6px; font-size: 13.5px; }
ul.rc-links small { color: var(--muted); }
.rc-note { margin: 6px 0; font-size: 13.5px; }
.rc-src { margin: 4px 0; font-size: 13px; }
.rc-veto { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.rc-checked { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-method { font-size: 13.5px; color: var(--text); }

/* --------------------------------------------------------------------------
   10. MOTION (spec §3.4: three intentional motions only)
   -------------------------------------------------------------------------- */
@keyframes hero-settle { from { transform: scale(1.025); } to { transform: scale(1); } }
@keyframes copy-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes menu-enter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.category-dropdown[open] { animation: menu-enter .2s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-image, .hero-copy { transform: none !important; opacity: 1 !important; }
}

/* --------------------------------------------------------------------------
   11. RESPONSIVE (spec §3.3 breakpoints)
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .container, .wrap { width: min(1240px, 100% - 112px); }
}
@media (max-width: 1200px) {
  .container, .wrap { width: calc(100% - 80px); }
  .header-inner { gap: 20px; }
  .brand { font-size: 20px; }
  .desktop-nav { gap: 21px; font-size: 13px; }
  .find-trigger { padding-left: 16px; }
  .category-grid { gap: 17px; }
  .category-image { height: 138px; }
  .card-grid, .featured-grid { gap: 19px; }
  .method-grid, .tools-home { gap: 64px; }
}
@media (max-width: 1023px) {
  html { scroll-padding-top: 84px; }
  .container, .wrap { width: calc(100% - 64px); }
  .site-header { height: 68px; }
  .header-inner { height: 68px; }
  .nav-toggle { display: flex; }
  .desktop-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fffefa; border-bottom: 1px solid #dfe6d6;
    box-shadow: 0 12px 32px #193b2d14;
    padding: 10px 32px 22px; max-height: calc(100dvh - 68px); overflow: auto;
    z-index: var(--z-menu);
  }
  .site-header.nav-open .desktop-nav { display: flex; }
  .desktop-nav > a { min-height: 48px; border-bottom: 1px solid #edf0e6; font-size: 14.5px; }
  .category-menu > summary { min-height: 48px; border-bottom: 1px solid #edf0e6; }
  .category-dropdown {
    position: static; width: auto; box-shadow: none; border: 0;
    padding: 6px 0 12px; display: grid !important; grid-template-columns: 1fr 1fr; gap: 2px 22px;
  }
  .category-dropdown > .eyebrow { display: none; }
  .category-dropdown a { padding: 8px; font-size: 13px; min-height: 44px; }
  .find-trigger { border-left: 0; padding: 0 10px; margin-left: 0; font-size: 12.5px; }
  .find-trigger span { display: none; }
  .find-trigger::after { content: "⌕"; font-size: 21px; line-height: 1; }
  .hero-inner { min-height: 460px; }
  .hero-copy { max-width: 510px; }
  .hero-copy h1 { font-size: 46px; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
  .category-image { height: 170px; }
  .card-grid, .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .home-section { padding-block: 56px; }
  .method-grid, .tools-home { gap: 44px; grid-template-columns: .8fr 1.2fr; }
  .method-band { padding-block: 58px; }
  .safety-home { grid-template-columns: 55px 1fr; gap: 19px; }
  .safety-home > .button { grid-column: 2; justify-self: start; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px 45px; }
  h2.section { font-size: 30px; margin-top: 48px; }
}
@media (max-width: 850px) {
  .hero-inner { min-height: 430px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-description { max-width: 330px; font-size: 15px; }
  .method-grid, .tools-home { gap: 32px; }
  .guide-grid { gap: 22px; }
}
@media (max-width: 639px) {
  html { scroll-padding-top: 84px; }
  .container, .wrap { width: calc(100% - 40px); }
  body { font-size: 16px; }
  h1 { font-size: 34px; line-height: 1.16; }
  h2 { font-size: 28px; }
  .home-hero { background: #eeece4; padding-bottom: 240px; }
  .hero-image {
    object-position: 78% 82%; height: 260px; top: auto; bottom: 0;
    object-fit: cover;
  }
  .home-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 232px;
    height: 56px; background: linear-gradient(#eeece4, transparent);
    pointer-events: none;
  }
  .hero-inner { min-height: 0; }
  .hero-copy { padding: 40px 0 28px; max-width: none; width: 100%; position: relative; z-index: 1; }
  .hero-copy h1 { font-size: clamp(34px, 8.8vw, 44px); line-height: 1.12; }
  .hero-description { font-size: 15px; line-height: 1.7; max-width: 345px; margin-top: 16px; }
  .home-section { padding-block: 40px; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .category-image { height: 150px; }
  .card-grid, .featured-grid { grid-template-columns: 1fr; gap: 19px; }
  .method-grid, .tools-home { grid-template-columns: 1fr; gap: 28px; padding-block: 44px; }
  .method-principles > div { padding-block: 18px; gap: 18px; }
  .safety-home { padding-block: 34px; grid-template-columns: 44px 1fr; gap: 15px; }
  .safety-home-icon { width: 44px; height: 44px; font-size: 20px; align-self: start; }
  .guide-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-disclosure { font-size: 12px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-bottom span { max-width: 100%; }
  h2.section { font-size: 26px; margin: 40px 0 16px; }
  .lede { font-size: 16.5px; }
  .sub { font-size: 13px; }
  .hub-hero h1 { font-size: 32px; }
  table.compare { min-width: 560px; }
  .verdict { padding: 22px 20px; }
  .verdict h2 { font-size: 24px; }
  .cta-box { padding: 20px; }
  .quiz-body { padding: 18px; }
  .calc-box, .calc-summary, .cost-card, .exp-card { padding: 22px 18px; }
  .calc-field, .cost-field, .exp-field { min-width: 100%; flex: 1 1 100%; }
  .calc-btn { width: 100%; }
  .table-tools { gap: 10px 16px; }
  .safety-note { padding: 16px; font-size: 13.5px; }
}
@media (max-width: 374px) {
  .container, .wrap { width: calc(100% - 32px); }
  .brand { font-size: 17px; gap: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  .header-inner { gap: 8px; }
  .hero-copy h1 { font-size: 33px; }
  .home-hero { padding-bottom: 215px; }
  .hero-image { height: 235px; }
  .category-image { height: 132px; }
  .category-name h3 { font-size: 13px; }
}

/* --------------------------------------------------------------------------
   12. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .table-tools, .btn, .button, .quiz, .find-trigger { display: none !important; }
  .container, .wrap { width: 100%; max-width: none; }
  .verdict, .safety-note, .notice-critical { border: 2px solid var(--ink-strong) !important; print-color-adjust: exact; }
  table.compare tbody tr, .sources li { break-inside: avoid; }
  a { text-decoration: underline; }
}

/* --------------------------------------------------------------------------
   13. QA PASS 2026-09-15 — mobile spec-table affordances, search page,
       corrections report box, 404 page
   -------------------------------------------------------------------------- */

/* Mobile spec tables: sticky "Spec" label column + edge fades that show
   (and hide) as the table scrolls. Covers use local attachment so they
   travel with the content; shadows use scroll attachment so they stay
   pinned to the wrapper edges. Opaque sticky-cell backgrounds match the
   row striping so nothing shows through. */
@media (max-width: 719px) {
  .table-scroll, .table-wrap {
    background-image:
      linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)),
      linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)),
      linear-gradient(90deg, rgba(25, 59, 45, 0.28), rgba(25, 59, 45, 0)),
      linear-gradient(270deg, rgba(25, 59, 45, 0.28), rgba(25, 59, 45, 0));
    background-position: 0 0, 100% 0, 0 0, 100% 0;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-repeat: no-repeat;
    background-attachment: local, local, scroll, scroll;
  }
  table.compare th:first-child,
  table.compare td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
  }
  table.compare tbody tr:nth-child(even) th:first-child,
  table.compare tbody tr:nth-child(even) td:first-child {
    background: #fcfcf8;
  }
  table.compare thead th:first-child {
    background: var(--surface-sage);
    z-index: 3;
  }
}

/* Client-side search page (/search/) */
.search-hero { padding: 8px 0 2px; }
.search-box { margin: 22px 0 10px; }
.search-box input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  font: inherit;
  font-size: 17px;
  color: var(--ink-strong);
  background: #fff;
  border: 1.5px solid var(--control-border, #c9cfc4);
  border-radius: 10px;
  outline: none;
}
.search-box input[type="search"]:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(41, 77, 60, 0.14);
}
.search-status { font-size: 13px; color: var(--muted); margin: 6px 2px 18px; }
ul.search-results { list-style: none; margin: 0; padding: 0; }
ul.search-results li { border-bottom: 1px solid var(--line); }
ul.search-results li:last-child { border-bottom: 0; }
ul.search-results a {
  display: block;
  padding: 16px 12px;
  border-radius: 8px;
  text-decoration: none;
}
ul.search-results a:hover, ul.search-results a:focus-visible { background: var(--surface-sage); }
.sr-title { display: block; font-weight: 600; font-size: 15.5px; color: var(--ink-strong); }
.sr-meta { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sr-desc { display: block; margin-top: 5px; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.search-empty { padding: 26px 4px; font-size: 14.5px; color: var(--text); }
.search-empty strong { color: var(--ink-strong); }

/* Corrections page — reader report box */
.report-box {
  margin: 18px 0 26px;
  padding: 20px 22px;
  background: var(--surface-sage);
  border: 1px solid #d7dfd2;
  border-radius: 10px;
}
.report-box h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink-strong); }
.report-box p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text); }
.report-box a { word-break: break-word; }

/* 404 page */
.error-hero { padding: 26px 0 8px; }
.error-code {
  font-family: var(--font-display, "DM Serif Display", Georgia, serif);
  font-size: clamp(64px, 14vw, 120px);
  line-height: 1;
  color: var(--brand);
  margin: 0 0 6px;
}
.error-lede { font-size: 18px; line-height: 1.65; color: var(--text); max-width: 640px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 34px; }
.error-links { margin-top: 34px; }
.error-links h2 { font-size: 18px; margin-bottom: 12px; }
.error-links ul { list-style: none; margin: 0; padding: 0; }
.error-links li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.error-links li:last-child { border-bottom: 0; }

/* 14. Affiliate CTA rows (QA pass 2026-09-15, second batch) */
.buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 8px;
}
.buy-row .btn { margin: 0; }
.buy-note { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 6px 0 18px; }
