/* ============================================
   The Workspace Pro — v2 Design System
   Warm, editorial, human. Not a SaaS template.
   ============================================ */

:root {
  /* Palette — warm and confident */
  --c-bg: #faf8f5;
  --c-bg-alt: #f3efe9;
  --c-surface: #ffffff;
  --c-text: #1a1815;
  /* Three-step text ramp. Every step clears WCAG AA (4.5:1) against every
     light surface we paint on — #faf8f5, #ffffff, #f3efe9, #f5f2eb, #fffefa
     and the compare table's #edf3ee. The old --c-text-muted (#9a948c) sat at
     2.6–3.0:1 and was unreadable; --c-text-light moved down with it so the
     hierarchy between "secondary" and "quiet" survives the darkening. */
  --c-text-light: #5f5a54;
  --c-text-muted: #716b63;
  --c-border: #e8e2d9;
  --c-primary: #c2410c;
  --c-primary-light: #ea580c;
  --c-primary-dark: #9a3412;
  --c-primary-soft: #fed7aa;
  /* Terracotta has to do two incompatible jobs: ink on the page surface, and
     a filled band/button with light text on it. In light theme one value can
     serve both. In dark it cannot — ink on #1a1815 needs luminance ≥ .218,
     white-on-fill needs ≤ .183 — so `--c-primary` stays the *ink* token and
     filled surfaces take these two, which are always a matched pair. */
  --c-primary-fill: var(--c-primary);
  --c-primary-fill-hover: var(--c-primary-dark);
  --c-on-primary: #ffffff;
  /* Was #4a7c59, which is 4.0–4.5:1 as ink on the light surfaces it lands on —
     the compare tables' #f7f6f1 zebra stripe put `.comparison-table__check`
     at 4.49:1, and the pale `--c-accent-soft` badges at 3.7:1. Deepened one
     step so spruce clears AA on every light surface in the system while the
     two places that use it as a *fill* only gain white-on-green contrast. */
  --c-accent: #3f6b4c;
  --c-accent-soft: #d1e7d5;
  /* Price tiers in the comparison tables. Budget rides spruce; the other two
     were hardcoded (#2563eb / #b8860b) with a dark override only on the pair,
     so premium gold shipped at 2.7–3.2:1 on every light surface. Tokenised as
     a themed trio like the rest of the ramp. */
  --c-tier-budget: var(--c-accent);
  --c-tier-mid: #1d4ed8;
  --c-tier-premium: #806107;
  --c-dark: #1a1815;
  --c-dark-surface: #26221e;
  --c-dark-border: #3a3530;
  --c-dark-text: #e8e2d9;
  --c-dark-text-light: #a8a098;
  --c-warning: #b45309;
  --c-error: #b91c1c;

  /* Typography */
  --font-display: 'Fraunces Variable', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-prose: 720px;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26,24,21,0.04);
  --shadow-md: 0 4px 12px rgba(26,24,21,0.06);
  --shadow-lg: 0 12px 32px rgba(26,24,21,0.10);

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4,0,0.2,1);
  --t-med: 300ms cubic-bezier(0.4,0,0.2,1);
}

/* Dark mode */
[data-theme="dark"] {
  --c-bg: #1a1815;
  --c-bg-alt: #26221e;
  --c-surface: #2a2622;
  --c-text: #e8e2d9;
  --c-text-light: #a8a098;
  /* Was #78706a — 3.1–3.7:1 against the dark surfaces it is used on
     (#1a1815, #26221e, #2a2622), i.e. below AA everywhere it appeared.
     #9a938b clears 4.5:1 on the lightest of them and keeps the one-step
     drop below --c-text-light that the light ramp has. */
  --c-text-muted: #9a938b;
  --c-border: #3a3530;
  --c-primary: #f97316;
  --c-primary-light: #fb923c;
  --c-primary-dark: #ea580c;
  --c-primary-soft: #431407;
  /* Bright orange only works as ink here; white on it is 2.8:1. Filled
     terracotta drops to a deep tone that carries white at 6.4:1. */
  --c-primary-fill: #a83b0e;
  /* --c-primary-dark is #ea580c here, i.e. *lighter* than the fill; hovering
     onto it would drop white to 3.6:1. Hover deepens instead, as in light. */
  --c-primary-fill-hover: #8d3009;
  --c-on-primary: #ffffff;
  --c-accent: #86efac;
  --c-accent-soft: #14532d;
  --c-tier-mid: #60a5fa;
  --c-tier-premium: #f0c040;
  --c-dark: #0f0d0b;
  --c-dark-surface: #1a1815;
  --c-dark-border: #2a2622;
  --c-dark-text: #e8e2d9;
  --c-dark-text-light: #a8a098;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-med), color var(--t-med);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary-dark); }
/* `color: inherit` is load-bearing: the UA default is the system `buttontext`
   keyword, which is black in both themes. Every button that paints its own
   surface but not its own ink (.ehc-action-btn, .wsc-pain-btn) therefore
   rendered black-on-charcoal at 1.19:1 in dark. */
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* Typography */
/* Fraunces self-hosts only 500 & 700; 600 synthesized a faux bold. Match
   editorial-v4's true 500 weight. */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { max-width: var(--max-width-prose); }
.lead { font-size: 1.125rem; color: var(--c-text-light); line-height: 1.7; }

/* Layout helpers */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-xl); }
.container-prose { max-width: var(--max-width-prose); margin: 0 auto; padding: 0 var(--space-xl); }
.section { padding: var(--space-3xl) 0; }
.section-sm { padding: var(--space-2xl) 0; }
.section-alt { background: var(--c-bg-alt); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--c-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-text);
}
.logo:hover { color: var(--c-text); }
.logo__mark {
  width: 32px;
  height: 32px;
  background: var(--c-primary-fill);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-on-primary);
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font-body);
}
.nav { display: flex; align-items: center; gap: var(--space-xs); }
.nav__link {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-text-light);
  border-radius: var(--radius);
  transition: all var(--t-fast);
}
.nav__link:hover { color: var(--c-text); background: var(--c-bg-alt); }
.nav__link--active { color: var(--c-primary); }
.nav__cta {
  background: var(--c-primary-fill);
  color: var(--c-on-primary) !important;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
}
.nav__cta:hover { background: var(--c-primary-fill-hover); }

.header-actions { display: flex; align-items: center; gap: var(--space-sm); }
.theme-toggle, .menu-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--c-text-light);
  transition: all var(--t-fast);
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--c-bg-alt); color: var(--c-text); }
.menu-toggle { display: none; }

/* Mobile menu */
.mobile-nav {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--c-surface);
  border-left: 1px solid var(--c-border);
  z-index: 200;
  transform: translateX(100%);
  transition: transform var(--t-med);
  overflow-y: auto;
}
.mobile-nav.open { display: flex; flex-direction: column; transform: translateX(0); }
.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--c-border);
}
.mobile-nav__link {
  display: block;
  padding: var(--space-md) var(--space-lg);
  color: var(--c-text);
  font-weight: 500;
  border-bottom: 1px solid var(--c-border);
}
.mobile-nav__link:hover { background: var(--c-bg-alt); }
.mobile-nav__cta {
  margin: var(--space-lg);
  background: var(--c-primary-fill);
  color: var(--c-on-primary);
  text-align: center;
  padding: var(--space-md);
  border-radius: var(--radius);
  font-weight: 600;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}
.mobile-overlay.open { display: block; }

/* Hero */
.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-primary);
  margin-bottom: var(--space-md);
}
.hero__title {
  margin-bottom: var(--space-lg);
}
.hero__title em {
  font-style: italic;
  color: var(--c-primary);
}
.hero__desc {
  font-size: 1.125rem;
  color: var(--c-text-light);
  margin-bottom: var(--space-xl);
  max-width: 540px;
}
.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--c-border);
}
.stat__number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-text);
}
.stat__label {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Assessment tool card */
.assessment-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.assessment-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 4px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.assessment-card__header {
  margin-bottom: var(--space-xl);
}
.assessment-card__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}
.assessment-card__desc {
  color: var(--c-text-light);
  font-size: 0.9375rem;
}
.assessment-card__time {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin-top: var(--space-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-primary-fill);
  color: var(--c-on-primary);
}
.btn--primary:hover { background: var(--c-primary-fill-hover); color: var(--c-on-primary); transform: translateY(-1px); }
.btn--secondary {
  background: var(--c-bg-alt);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn--secondary:hover { background: var(--c-border); }
.btn--ghost {
  color: var(--c-text-light);
  padding: var(--space-sm) var(--space-md);
}
.btn--ghost:hover { color: var(--c-text); }
.btn--lg { padding: var(--space-lg) var(--space-2xl); font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

/* Assessment steps */
.assessment-step { display: none; }
.assessment-step.active { display: block; }
.step-indicator {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}
.step-dot {
  flex: 1;
  height: 4px;
  background: var(--c-border);
  border-radius: 2px;
  transition: background var(--t-med);
}
.step-dot.active { background: var(--c-primary); }
.step-dot.done { background: var(--c-accent); }
.step-label {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin-bottom: var(--space-sm);
}
.step-question {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

/* Choice cards */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.choice-card {
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--c-surface);
  text-align: left;
}
.choice-card:hover { border-color: var(--c-primary-light); background: var(--c-bg-alt); }
.choice-card.selected {
  border-color: var(--c-primary);
  background: color-mix(in srgb, var(--c-primary) 5%, var(--c-surface));
}
.choice-card__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}
.choice-card__label {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: var(--space-xs);
}
.choice-card__desc {
  font-size: 0.8125rem;
  color: var(--c-text-light);
}

/* Range slider */
.range-group { margin-bottom: var(--space-xl); }
.range-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-weight: 500;
}
.range-value {
  color: var(--c-primary);
  font-weight: 700;
  font-family: var(--font-mono);
}
input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--c-border);
  border-radius: 3px;
  appearance: none;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--c-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--c-surface);
  box-shadow: var(--shadow-md);
}
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--c-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--c-surface);
  box-shadow: var(--shadow-md);
}

/* Text input */
.text-input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 1rem;
  transition: border-color var(--t-fast);
}
.text-input:focus { outline: none; border-color: var(--c-primary); }

/* Assessment navigation */
.assessment-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
}

/* Results */
.results-screen { display: none; }
.results-screen.active { display: block; }
.result-hero {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.result-persona {
  display: inline-block;
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}
.result-title {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}
.result-summary {
  color: var(--c-text-light);
  font-size: 1.0625rem;
  max-width: 540px;
  margin: 0 auto;
}
.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}
.recommendation {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: box-shadow var(--t-fast);
}
.recommendation:hover { box-shadow: var(--shadow-md); }
.recommendation__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--c-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.recommendation__content { flex: 1; }
.recommendation__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  font-weight: 600;
}
.recommendation__name {
  font-weight: 600;
  font-size: 1.0625rem;
  margin: var(--space-xs) 0;
}
.recommendation__why {
  font-size: 0.875rem;
  color: var(--c-text-light);
}
.recommendation__price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-accent);
  font-size: 1rem;
}
.recommendation__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Checklist */
.checklist {
  background: var(--c-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}
.checklist__title {
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
}
.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.9375rem;
}
.checklist__item::before {
  content: '✓';
  color: var(--c-accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Cards / Features */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--t-med);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--c-primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}
.card__title {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}
.card__desc {
  font-size: 0.9375rem;
  color: var(--c-text-light);
}

/* Guide cards */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}
.guide-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--t-med);
  display: flex;
  flex-direction: column;
}
.guide-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--c-primary-light);
}
.guide-card__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-primary);
  margin-bottom: var(--space-sm);
}
.guide-card__title {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  color: var(--c-text);
}
.guide-card:hover .guide-card__title { color: var(--c-primary); }
.guide-card__desc {
  font-size: 0.9375rem;
  color: var(--c-text-light);
  flex: 1;
  margin-bottom: var(--space-md);
}
.guide-card__meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}

/* Article layout */
.article-header {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--space-xl);
}
.article-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-bottom: var(--space-md);
}
.article-title { margin-bottom: var(--space-md); }
.article-lead {
  font-size: 1.125rem;
  color: var(--c-text-light);
  margin-bottom: var(--space-lg);
}
.article-body { font-size: 1.0625rem; line-height: 1.8; }
.article-body h2 { margin: var(--space-2xl) 0 var(--space-md); }
.article-body h3 { margin: var(--space-xl) 0 var(--space-sm); }
.article-body p { margin-bottom: var(--space-md); }
.article-body ul, .article-body ol { margin-bottom: var(--space-md); padding-left: var(--space-xl); }
.article-body li { margin-bottom: var(--space-sm); }
.article-body img { border-radius: var(--radius-lg); margin: var(--space-lg) 0; }
.article-body blockquote {
  border-left: 4px solid var(--c-primary);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--c-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
}
.article-body th, .article-body td {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--c-border);
  text-align: left;
}
.article-body th { background: var(--c-bg-alt); font-weight: 600; }

/* Newsletter */
.newsletter-bar {
  background: var(--c-dark);
  color: var(--c-dark-text);
  padding: var(--space-xl) 0;
  text-align: center;
  /* Deliberately-dark surface: publish the ink this band expects so the
     generic prose/heading rules in later sheets (editorial-v4's
     `.editorial-shell h1,h2,h3`, premium-studio's `.ps-utility :where(p,li)`)
     paint light text here instead of the page's dark ink. Both tokens
     resolve to the same value in either theme, so this needs no dark
     counterpart. */
  --surface-ink: var(--c-dark-text);
  --surface-ink-soft: var(--c-dark-text-light);
}
[data-theme="dark"] .newsletter-bar { background: var(--c-surface); }
.newsletter-bar__title { color: var(--c-dark-text); margin-bottom: var(--space-sm); }
[data-theme="dark"] .newsletter-bar__title { color: var(--c-text); }
.newsletter-bar__desc { color: var(--c-dark-text-light); margin-bottom: var(--space-lg); }
[data-theme="dark"] .newsletter-bar__desc { color: var(--c-text-light); }
.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form__input {
  flex: 1;
  padding: var(--space-md);
  border: none;
  border-radius: var(--radius);
  background: var(--c-dark-surface);
  color: var(--c-dark-text);
  /* 16px minimum: below this iOS auto-zooms the viewport on focus. */
  font-size: 1rem;
}
[data-theme="dark"] .newsletter-form__input {
  background: var(--c-bg-alt);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
/* Placeholder sits on the dark input, so it tracks the dark-surface ramp —
   not --c-text-muted, which is tuned for light surfaces. */
.newsletter-form__input::placeholder { color: var(--c-dark-text-light); }

/* Footer */
.site-footer {
  background: var(--c-dark);
  color: var(--c-dark-text-light);
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}
[data-theme="dark"] .site-footer { background: var(--c-dark); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.footer-brand { color: var(--c-dark-text); }
[data-theme="dark"] .footer-brand { color: var(--c-text); }
.footer-brand p { font-size: 0.875rem; margin-top: var(--space-sm); color: var(--c-dark-text-light); }
[data-theme="dark"] .footer-brand p { color: var(--c-text-light); }
.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-dark-text);
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-weight: 600;
}
[data-theme="dark"] .footer-col h4 { color: var(--c-text); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-sm); }
.footer-col a { color: var(--c-dark-text-light); font-size: 0.875rem; }
.footer-col a:hover { color: var(--c-primary-light); }
[data-theme="dark"] .footer-col a { color: var(--c-text-light); }
.site-footer__bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding: var(--space-lg) var(--space-xl) 0;
  border-top: 1px solid var(--c-dark-border);
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}

/* Page header */
.page-header {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--space-xl);
}
.page-header__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-primary);
  margin-bottom: var(--space-sm);
}
.page-header__title { margin-bottom: var(--space-sm); }
.page-header__desc { font-size: 1.125rem; color: var(--c-text-light); }

/* Tips list */
.tip-list { display: flex; flex-direction: column; gap: var(--space-md); }
.tip-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: box-shadow var(--t-fast);
}
.tip-item:hover { box-shadow: var(--shadow-md); }
.tip-number {
  /* Mono plate numeral — matches .path-card__number's instrument voice
     (mono stack, tabular, ink/spruce at ~50% opacity) instead of the
     legacy display-serif treatment. */
  font-family: var(--ps-font-data, var(--font-mono), monospace);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  color: color-mix(in srgb, var(--ps-text, var(--c-text)) 50%, transparent);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
}
.tip-content h3 { font-size: 1.125rem; margin-bottom: var(--space-xs); }
.tip-content p { font-size: 0.9375rem; color: var(--c-text-light); }

/* Podcast grid */
.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}
.podcast-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--t-med);
}
.podcast-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.podcast-card__name { font-size: 1.125rem; margin-bottom: var(--space-xs); }
.podcast-card__host { font-size: 0.875rem; color: var(--c-text-muted); margin-bottom: var(--space-sm); }
.podcast-card__desc { font-size: 0.9375rem; color: var(--c-text-light); margin-bottom: var(--space-md); }
.podcast-card__links { display: flex; gap: var(--space-sm); }
.podcast-card__link {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  background: var(--c-bg-alt);
  color: var(--c-text);
  transition: all var(--t-fast);
}
.podcast-card__link:hover { background: var(--c-primary-fill); color: var(--c-on-primary); }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: var(--space-md); max-width: 560px; }
.form-group { display: flex; flex-direction: column; gap: var(--space-xs); }
.form-label { font-weight: 500; font-size: 0.9375rem; }
.form-hint { font-size: 0.8125rem; color: var(--c-text-muted); }
textarea.text-input { min-height: 120px; resize: vertical; }

/* Alert / disclosure */
.disclosure-box {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  font-size: 0.9375rem;
}
.disclosure-box--info { border-left: 4px solid var(--c-primary); }

/* CTA section */
.cta-section {
  background: var(--c-primary-fill);
  color: var(--c-on-primary);
  /* Saturated terracotta surface — see .newsletter-bar for why these exist.
     0.85 alpha composited onto the light-theme fill is 4.16:1; 0.92 clears AA
     on both fills while still reading as secondary. */
  --surface-ink: var(--c-on-primary);
  --surface-ink-soft: rgba(255,255,255,0.92);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  margin: var(--space-2xl) 0;
}
.cta-section h2 { color: var(--c-on-primary); margin-bottom: var(--space-md); }
.cta-section p { color: var(--surface-ink-soft); margin: 0 auto var(--space-lg); }
.cta-section .btn { max-width: 100%; white-space: normal; text-align: center; }
.cta-section .btn--secondary { background: white; color: var(--c-primary-fill); }
.cta-section .btn--secondary:hover { background: rgba(255,255,255,0.9); }

/* 404 */
.error-page {
  text-align: center;
  padding: var(--space-3xl) 0;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1;
}

/* Utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .hero { padding: var(--space-2xl) 0; }
  .section { padding: var(--space-2xl) 0; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  .container, .container-prose { padding: 0 var(--space-md); }
  .newsletter-form { flex-direction: column; }
  .choice-grid { grid-template-columns: 1fr; }
  .recommendation { flex-direction: column; }
  .tip-item { flex-direction: column; }
  .tip-number { width: auto; }
  .site-footer__bottom { flex-direction: column; gap: var(--space-sm); }
  body { font-size: 16px; }
}

@media (max-width: 480px) {
  .cta-section { padding: var(--space-xl) var(--space-md); }
  .btn--lg {
    max-width: 100%;
    padding: var(--space-md) var(--space-lg);
    white-space: normal;
    text-align: center;
  }
  .site-footer__grid { grid-template-columns: 1fr; }
  .assessment-card { padding: var(--space-lg); }
  .hero__stats { flex-direction: column; gap: var(--space-md); }
}

/* ============================================
   Comparison Table — bold product comparison
   Used inside guide articles
   ============================================ */

.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-2xl) 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  background: var(--c-surface);
}

.comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
  background: var(--c-surface);
}

/* ---- Sticky first column ---- */
.comparison-table th:first-child,
.comparison-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--c-surface);
  min-width: 180px;
}

.comparison-table thead th:first-child {
  z-index: 3;
}

/* ---- Table header ---- */
.comparison-table thead {
  background: var(--c-bg-alt);
}

.comparison-table thead th {
  padding: var(--space-lg) var(--space-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  vertical-align: bottom;
  border-bottom: 2px solid var(--c-border);
  color: var(--c-text);
  white-space: nowrap;
}

.comparison-table thead th:first-child {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  font-weight: 600;
  border-bottom: 2px solid var(--c-border);
}

/* ---- Header product name ---- */
.comparison-table__product-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--space-xs);
}

.comparison-table__product-sub {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--c-text-muted);
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  margin-top: 2px;
}

/* ---- Badges ---- */
.comparison-table__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-top: var(--space-xs);
  white-space: nowrap;
}

.comparison-table__badge--best-value {
  background: var(--c-accent-soft);
  color: var(--c-accent);
}

[data-theme="dark"] .comparison-table__badge--best-value {
  background: color-mix(in srgb, var(--c-accent) 20%, transparent);
  color: var(--c-accent);
}

.comparison-table__badge--top-pick {
  background: var(--c-primary-soft);
  color: var(--c-primary);
}

[data-theme="dark"] .comparison-table__badge--top-pick {
  background: color-mix(in srgb, var(--c-primary) 25%, transparent);
  color: var(--c-primary-light);
}

/* ---- Table cells ---- */
.comparison-table td {
  padding: var(--space-md);
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-light);
  transition: background var(--t-fast);
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--c-text);
  border-right: 1px solid var(--c-border);
  box-shadow: 2px 0 8px rgba(26,24,21,0.03);
}

/* ---- Hover row highlighting ---- */
.comparison-table tbody tr:hover td {
  background: var(--c-bg-alt);
}

.comparison-table tbody tr:hover td:first-child {
  background: var(--c-bg-alt);
}

/* ---- Price column ---- */
.comparison-table__price {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  display: block;
}

.comparison-table__price--budget {
  color: var(--c-tier-budget);
}

.comparison-table__price--mid {
  color: var(--c-tier-mid);
}

.comparison-table__price--premium {
  color: var(--c-tier-premium);
}

/* ---- Checkmark & cross ---- */
.comparison-table__check {
  font-size: 1.125rem;
  font-weight: 700;
}

.comparison-table__check--yes {
  color: var(--c-accent);
}

.comparison-table__check--no {
  color: var(--c-text-muted);
  opacity: 0.5;
}

/* ---- Score circles ---- */
.comparison-table__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  line-height: 1;
}

/* Score gradient: 0-4 red, 4-6 orange, 6-8 yellow-green, 8-10 green */
.comparison-table__score[data-score="10"],
.comparison-table__score[data-score="9"]  { background: #16a34a; }
.comparison-table__score[data-score="8"]  { background: #22c55e; }
.comparison-table__score[data-score="7"]  { background: #65a30d; }
.comparison-table__score[data-score="6"]  { background: #ca8a04; }
.comparison-table__score[data-score="5"]  { background: #d97706; }
.comparison-table__score[data-score="4"]  { background: #ea580c; }
.comparison-table__score[data-score="3"]  { background: #dc2626; }
.comparison-table__score[data-score="2"]  { background: #b91c1c; }
.comparison-table__score[data-score="1"]  { background: #991b1b; }
.comparison-table__score[data-score="0"]  { background: #7f1d1d; }

/* ---- Star ratings ---- */
.comparison-table__stars {
  display: inline-flex;
  gap: 2px;
  font-size: 1rem;
  letter-spacing: 2px;
  color: #eab308;
}

[data-theme="dark"] .comparison-table__stars {
  color: #facc15;
}

.comparison-table__stars .star-empty {
  color: var(--c-text-muted);
  opacity: 0.3;
}

/* ---- Feature label group rows ---- */
.comparison-table__group-label td {
  padding: var(--space-sm) var(--space-md);
  background: var(--c-bg-alt);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}

/* ---- Action / CTA cells ---- */
.comparison-table__action {
  margin-top: var(--space-sm);
}

.comparison-table__action .btn {
  font-size: 0.8125rem;
  padding: var(--space-sm) var(--space-md);
}

/* ---- Responsive (horizontal scroll at <768px) ---- */
@media (max-width: 768px) {
  .comparison-table-wrapper {
    margin: var(--space-lg) calc(-1 * var(--space-md));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .comparison-table-wrapper .container-prose & {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
  }

  .comparison-table th:first-child,
  .comparison-table td:first-child {
    min-width: 140px;
  }

  .comparison-table__product-name {
    font-size: 1rem;
  }

  .comparison-table__score {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
  }
}

/* ============================================
   v2.1 Improvements — a11y, tools, filters
   ============================================ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  /* Ink chip, not --c-primary: terracotta is only 5.2:1 with white in light
     and 2.8:1 in dark. --c-dark / --c-dark-text clear AA in both themes. */
  background: var(--c-dark);
  color: var(--c-dark-text);
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
  outline: 2px solid var(--c-text);
  outline-offset: 2px;
}

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

/* How it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}
.how-step {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
}
.how-step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary-fill);
  color: var(--c-on-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-family: var(--font-display);
}
.how-step__title {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}
.how-step__desc {
  color: var(--c-text-light);
  font-size: 0.9375rem;
  max-width: none;
}

/* Tools grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  color: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.tool-card:hover {
  color: inherit;
  border-color: var(--c-primary);
  box-shadow: var(--shadow-md);
}
.tool-card__icon { font-size: 1.75rem; margin-bottom: var(--space-md); }
.tool-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  color: var(--c-text);
}
.tool-card__desc {
  color: var(--c-text-light);
  font-size: 0.9375rem;
  flex: 1;
  max-width: none;
  margin-bottom: var(--space-md);
}
.tool-card__cta {
  font-weight: 600;
  color: var(--c-primary);
  font-size: 0.9375rem;
}

/* Quotes */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.quote-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: 0;
}
.quote-card p {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--c-text);
  max-width: none;
  margin-bottom: var(--space-md);
}
.quote-card footer {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  border: none;
  padding: 0;
  background: none;
}

/* Newsletter inline form */
.newsletter-form--inline {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 480px;
  margin: var(--space-lg) auto 0;
}
.newsletter-form__input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
}
.newsletter-form__input:focus {
  outline: 2px solid var(--c-primary);
  outline-offset: 1px;
  border-color: var(--c-primary);
}
.newsletter-form__note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin-top: var(--space-sm);
  max-width: none;
}

/* Guide filters */
.guide-filters {
  margin-bottom: var(--space-xl);
}
.guide-search {
  width: 100%;
  max-width: 420px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  margin-bottom: var(--space-md);
}
.guide-search:focus {
  outline: 2px solid var(--c-primary);
  border-color: var(--c-primary);
}
.guide-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  /* 44px minimum touch target; visual height held by centered content. */
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-light);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--t-fast);
}
.filter-chip:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.filter-chip.is-active {
  background: var(--c-primary-fill);
  border-color: var(--c-primary-fill);
  color: var(--c-on-primary);
}
.guide-filter-count {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  max-width: none;
}

@media (max-width: 960px) {
  .how-grid,
  .quote-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tools-grid { grid-template-columns: 1fr; }
  .newsletter-form--inline { flex-direction: column; }
  .newsletter-form--inline .btn { width: 100%; }
}

/* Focus visibility for keyboard users */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
.nav__cta:focus-visible,
.btn--primary:focus-visible {
  outline-color: var(--c-primary-light);
}

/* Contact form stack on mobile */
@media (max-width: 768px) {
  .section .container > div[style*="grid-template-columns:1fr 1.5fr"],
  .section .container > div[style*="grid-template-columns: 1fr 1.5fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Body lock when mobile menu open */
body.menu-open {
  overflow: hidden;
}

/* Tools hub */
.tools-grid--hub {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}
.tool-card--featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--c-surface) 0%, color-mix(in srgb, var(--c-primary-soft) 40%, var(--c-surface)) 100%);
  border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-border));
  position: relative;
}
.tool-card__badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--c-primary-fill);
  color: var(--c-on-primary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}
.tool-card h2.tool-card__title {
  font-size: 1.35rem;
}

/* Assessment results actions */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-2xl);
}
.result-actions__hint {
  text-align: center;
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-top: var(--space-md);
  max-width: none;
  min-height: 1.25em;
}
.result-save-btn {
  border: 2px solid var(--c-primary);
  background: transparent;
  color: var(--c-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.result-next-steps {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--c-bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
}
.result-next-steps__title {
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: 1.125rem;
}
.result-next-steps__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.result-next-steps__card {
  display: block;
  padding: var(--space-md) var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.result-next-steps__card:hover {
  border-color: var(--c-primary);
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

/* 404 */
.error-page {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  min-height: 50vh;
  display: flex;
  align-items: center;
}
.error-page .container { width: 100%; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--c-primary);
  opacity: 0.9;
}
.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-xl);
}
.error-links a {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  color: var(--c-text-light);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--c-surface);
}
.error-links a:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

@media print {
  .site-header,
  .mobile-nav,
  .mobile-overlay,
  .skip-link,
  .newsletter-bar,
  .site-footer,
  .deal-banner,
  .result-actions,
  .back-to-top,
  .theme-toggle,
  .menu-toggle {
    display: none !important;
  }
  .assessment-card,
  .results-screen {
    box-shadow: none !important;
    border: none !important;
  }
}

@media (max-width: 720px) {
  .tools-grid--hub { grid-template-columns: 1fr; }
  .tool-card--featured { grid-column: auto; }
  .result-next-steps__grid { grid-template-columns: 1fr; }
}

/* Honest trust cards (replaces fake testimonials) */
.honest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.honest-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.honest-card:hover {
  border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border));
  box-shadow: var(--shadow-sm);
}
.honest-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  margin-bottom: var(--space-sm);
  color: var(--c-text);
}
.honest-card__desc {
  font-size: 0.9375rem;
  color: var(--c-text-light);
  max-width: none;
  line-height: 1.55;
}

/* Research badge (guides) — not fake star ratings */
.research-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--c-accent-soft);
  border: 1px solid color-mix(in srgb, var(--c-accent) 25%, var(--c-border));
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--c-text-light);
}
.research-badge__icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  align-items: center;
  justify-content: center;
  background: var(--c-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}
.research-badge__text strong { color: var(--c-text); }

/* Deal banner without fake strikethrough clutter */
.deal-banner__price-old[style*="display: none"] + .deal-banner__price-new,
.deal-banner__price-new {
  font-weight: 600;
}
.deal-banner {
  align-items: center;
}

/* Product thumbs polish */
img.product-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  margin: 0 var(--space-sm) var(--space-sm) 0;
  vertical-align: middle;
  display: inline-block;
}

/* Guide cards slightly richer hover */
.guide-card {
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-fast);
}
.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--c-primary) 30%, var(--c-border));
}

@media (max-width: 960px) {
  .honest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .honest-grid { grid-template-columns: 1fr; }
}

/* ---- Performance: content-visibility for long sections ---- */
.section, .guide-grid, .tools-grid {
  content-visibility: auto;
  /* Realistic placeholder height: a 480px estimate under-counts most of these
     sections, so as off-screen blocks render the page height corrected upward
     and the scrollbar jumped. ~1200px is closer to their real rendered size. */
  contain-intrinsic-size: 1px 1200px;
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Recommendation product thumbs (assessment results) */
.recommendation {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.recommendation__thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-bg-alt);
  flex-shrink: 0;
}
.recommendation__price-note {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* Sticky mobile CTA — drives quiz completions */
.sticky-quiz-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--c-surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.06);
}
.sticky-quiz-cta .btn {
  width: 100%;
}
@media (max-width: 768px) {
  .sticky-quiz-cta.is-visible { display: block; }
  body.has-sticky-cta { padding-bottom: 5rem; }
}

/* Quick tools strip (homepage traffic hooks) */
.quick-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-xl);
}
.quick-tools a {
  display: inline-flex;
  align-items: center;
  /* 44px minimum touch target. */
  min-height: 44px;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 0.875rem;
  font-weight: 500;
}
.quick-tools a:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* FAQ accordion (SEO + traffic long-tail) */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { border-bottom: 1px solid var(--c-border); }
.faq-item p {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  color: var(--c-text-light);
  max-width: none;
  margin: 0;
}

/* Assessment estimated total (class-based, theme-safe) */
.result-total {
  text-align: center;
  margin: var(--space-2xl) 0;
  padding: var(--space-xl);
  background: var(--c-bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
}
.result-total__label {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.result-total__amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.2;
  margin-top: var(--space-xs);
}
.result-total__note {
  margin: var(--space-sm) auto 0;
  font-size: 0.875rem;
  color: var(--c-text-muted);
  max-width: 36rem;
}

/* Back-to-top clears sticky mobile quiz CTA */
.back-to-top {
  bottom: calc(32px + var(--sticky-cta-offset, 0px)) !important;
}

/* Branded print — desk-fit one-pager */
@media print {
  body::before {
    content: "The Workspace Pro";
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  body::after {
    content: "Estimates only — not medical advice. theworkspacepro.com";
    display: block;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #666;
  }
  .sticky-quiz-cta,
  .trust-row,
  .hero-gradient { display: none !important; }
}

/* Guide TOC — intentionally stays in document flow so it cannot cover the article. */
.toc {
  position: relative;
  margin: var(--space-xl) 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--c-primary) 28%, var(--c-border));
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--c-primary) 12%, transparent), transparent 42%),
    var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.toc summary { cursor: pointer; font-weight: 700; }
.toc > :first-child { margin-top: 0; }
.toc > :last-child { margin-bottom: 0; }
.toc ol,
.toc ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.5rem;
  margin-bottom: 0;
  padding-left: 1.25rem;
}
.toc li { padding-left: 0.15rem; }
.toc a {
  display: inline-block;
  padding: 0.15rem 0;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
/* The shipped header (.editorial-header) is position:relative and scrolls
   away, so anchors only need a small breathing gap, not a sticky-header offset. */
.article-body [id] { scroll-margin-top: 16px; }

/* Thin, non-interactive article progress accent for long guides. */
.reading-progress {
  position: fixed;
  z-index: 95;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}
.reading-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--c-primary) 45%, transparent);
  transition: transform 80ms linear;
}
@media (max-width: 639px) {
  .toc ol,
  .toc ul { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reading-progress__bar { transition: none; }
}
@media print {
  .reading-progress { display: none !important; }
}

/* Compare matrix */
.matrix-filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: var(--space-md);
  align-items: end;
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}
.matrix-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
  margin-bottom: 0.35rem;
}
.matrix-input, .matrix-select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text);
}
.matrix-filters__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}
.matrix-count {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin: 0;
  text-align: center;
  max-width: none;
}
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}
.matrix-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.matrix-card:hover {
  border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-border));
  box-shadow: var(--shadow-sm);
}
.matrix-card__img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-bg-alt);
  flex-shrink: 0;
}
.matrix-card__img--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.matrix-card__cat {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-primary);
  margin-bottom: 0.25rem;
}
.matrix-card__title {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.matrix-card__blurb {
  font-size: 0.8125rem;
  color: var(--c-text-light);
  max-width: none;
  margin-bottom: 0.5rem;
}
.matrix-card__meta {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.matrix-card__price {
  font-weight: 700;
  color: var(--c-text);
}
.matrix-card__price-note {
  font-size: 0.7rem;
  color: var(--c-text-muted);
}
.matrix-card__link {
  font-weight: 600;
  font-size: 0.875rem;
}
.matrix-empty {
  grid-column: 1 / -1;
  color: var(--c-text-light);
  max-width: none;
}
@media (max-width: 900px) {
  .matrix-filters { grid-template-columns: 1fr; }
}

/* Citation / source notes */
.source-note {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  border-left: 3px solid var(--c-border);
  padding-left: var(--space-md);
  margin-top: var(--space-md);
  max-width: none;
}
/* ===== Deals page: value shortlist and filters ===== */
.deals-hero{position:relative;overflow:hidden;padding:clamp(3.5rem,8vw,6.5rem) 0 var(--space-2xl);background:radial-gradient(circle at 86% 18%,color-mix(in srgb,var(--c-accent) 18%,transparent) 0,transparent 28rem),linear-gradient(145deg,var(--c-bg-alt),var(--c-bg));border-bottom:1px solid var(--c-border)}
.deals-hero::after{content:"$";position:absolute;right:max(3vw,1rem);bottom:-.34em;color:color-mix(in srgb,var(--c-primary) 8%,transparent);font:700 clamp(12rem,30vw,25rem)/1 var(--font-display);pointer-events:none}
.deals-hero__inner{position:relative;z-index:1}
.deals-hero__eyebrow,.deals-section__eyebrow{display:inline-flex;align-items:center;gap:.5rem;margin-bottom:var(--space-md);color:var(--c-primary);font-size:.78rem;font-weight:750;letter-spacing:.1em;text-transform:uppercase}
.deals-hero__eyebrow::before{content:"";width:1.75rem;height:2px;background:currentColor}
.deals-hero h1{max-width:790px}.deals-hero__intro{max-width:700px;margin-top:var(--space-lg);color:var(--c-text-light);font-size:clamp(1.05rem,2vw,1.2rem)}
.deals-hero__meta{display:flex;flex-wrap:wrap;gap:var(--space-sm) var(--space-lg);margin-top:var(--space-xl);color:var(--c-text-light);font-size:.875rem}
.deals-hero__meta span{display:inline-flex;align-items:center;gap:.45rem}.deals-hero__meta span::before{content:"✓";color:var(--c-accent);font-weight:800}
.deals-disclosure{margin:var(--space-xl) 0 0;padding:var(--space-md) var(--space-lg);max-width:780px;border:1px solid color-mix(in srgb,var(--c-primary) 25%,var(--c-border));border-radius:var(--radius);background:color-mix(in srgb,var(--c-primary-soft) 38%,var(--c-surface));color:var(--c-text-light);font-size:.875rem}.deals-disclosure strong{color:var(--c-text)}
.deal-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:var(--space-md);align-items:end;margin-bottom:var(--space-md);padding:var(--space-lg);border:1px solid var(--c-border);border-radius:var(--radius-lg);background:var(--c-surface);box-shadow:var(--shadow-sm)}
.deal-filter__label{display:block;margin-bottom:.35rem;color:var(--c-text-light);font-size:.78rem;font-weight:700;letter-spacing:.055em;text-transform:uppercase}
.deal-filter__select{width:100%;min-height:46px;padding:.65rem 2.3rem .65rem .8rem;border:1px solid var(--c-border);border-radius:var(--radius);background:var(--c-bg);color:var(--c-text)}
.deal-filter__select:focus-visible,.deal-filter__reset:focus-visible,.deal-card__cta:focus-visible,.deals-related a:focus-visible{outline:3px solid color-mix(in srgb,var(--c-primary) 55%,transparent);outline-offset:3px}
.deal-filter__reset{min-height:46px;white-space:nowrap}.deal-count{margin:0 0 var(--space-xl);max-width:none;color:var(--c-text-muted);font-size:.875rem}
.deal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-lg)}
.deal-card{position:relative;display:flex;flex-direction:column;min-width:0;padding:var(--space-lg);border:1px solid var(--c-border);border-radius:var(--radius-lg);background:var(--c-surface);box-shadow:var(--shadow-sm);transition:transform var(--t-fast),border-color var(--t-fast),box-shadow var(--t-fast)}
.deal-card:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--c-primary) 32%,var(--c-border));box-shadow:var(--shadow-md)}.deal-card[hidden]{display:none}
.deal-card__topline{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);margin-bottom:var(--space-md)}
.deal-card__category{color:var(--c-primary);font-size:.72rem;font-weight:750;letter-spacing:.07em;text-transform:uppercase}.deal-card__budget{padding:.2rem .55rem;border-radius:var(--radius-full);background:var(--c-bg-alt);color:var(--c-text-light);font-size:.7rem;font-weight:650}
.deal-card__title{margin-bottom:var(--space-sm);font-size:1.3rem}.deal-card__desc{margin-bottom:var(--space-lg);max-width:none;color:var(--c-text-light);font-size:.9rem}
.deal-card__value{margin-top:auto;padding-top:var(--space-md);border-top:1px solid var(--c-border)}.deal-card__price-label{display:block;color:var(--c-text-muted);font-size:.72rem;letter-spacing:.045em;text-transform:uppercase}.deal-card__price{display:block;color:var(--c-text);font:700 1.55rem/1.25 var(--font-display)}.deal-card__price-note{display:block;margin:.2rem 0 var(--space-md);color:var(--c-text-muted);font-size:.72rem}.deal-card__cta{width:100%;justify-content:center}
.deal-empty{padding:var(--space-2xl);border:1px dashed var(--c-border);border-radius:var(--radius-lg);text-align:center;color:var(--c-text-light)}
.deals-related{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-lg);margin-top:var(--space-xl)}.deals-related a{display:block;padding:var(--space-lg);border:1px solid var(--c-border);border-radius:var(--radius-lg);background:var(--c-surface);color:var(--c-text)}.deals-related a:hover{border-color:var(--c-primary);color:var(--c-primary)}.deals-related strong{display:block;margin-bottom:var(--space-xs)}.deals-related span{color:var(--c-text-light);font-size:.875rem}
@media(max-width:900px){.deal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.deals-hero{padding-top:var(--space-2xl)}.deal-filters,.deal-grid,.deals-related{grid-template-columns:1fr}.deal-filter__reset{width:100%}}
@media(prefers-reduced-motion:reduce){.deal-card{transition:none}.deal-card:hover{transform:none}}
