/* ============================================================
   Colorado Financial Toolkit — Refactor v2
   Emerald & Slate / Inter + JetBrains Mono / Bento Dashboard
   ============================================================ */

:root {
  /* Palette — Emerald & Slate */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  --emerald-50:  #ECFDF5;
  --emerald-100: #D1FAE5;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065F46;

  --red-50:  #FEF2F2;
  --red-100: #FEE2E2;
  --red-500: #EF4444;
  --red-600: #DC2626;
  --red-700: #B91C1C;

  --amber-50:  #FFFBEB;
  --amber-500: #F59E0B;
  --amber-600: #D97706;

  --blue-50:   #EFF6FF;
  --blue-500:  #3B82F6;
  --blue-600:  #2563EB;

  /* Colorado flag palette */
  --co-red:   #BF0A30;
  --co-red-dark: #8C0720;
  --co-blue:  #003DA5;
  --co-blue-light: #1A56C4;
  --co-gold:  #FFD100;

  /* Tokens */
  --color-bg:          var(--slate-50);
  --color-surface:     #FFFFFF;
  --color-primary:     var(--slate-800);
  --color-text:        var(--slate-800);
  --color-muted:       var(--slate-500);
  --color-border:      var(--slate-200);
  --color-border-strong: var(--slate-400);

  --color-money:       #059669;
  --color-money-dark:  #047857;
  --color-risk:        var(--red-600);
  --color-warn:        var(--amber-600);

  /* Bucket colors — remapped to Emerald & Slate */
  --color-fixed:       var(--slate-700);
  --color-savings:     #2D5016;
  --color-invest:      var(--blue-600);
  --color-guiltfree:   var(--amber-500);

  /* Typography */
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

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

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadow (restrained) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.12);

  /* Focus */
  --focus-ring: 0 0 0 2px #003DA5;

  /* Layout */
  --sidebar-w: 340px;
  --bento-gap: 1.25rem;
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle slate texture: 1px grid of very low-contrast lines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 30%, transparent 80%);
}

#app {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg) 140px;
}

@media (max-width: 768px) {
  #app { padding: var(--space-md) var(--space-md) 260px; }
}

.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;
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.mountain-silhouette { display: none; } /* replaced by brand mark */

.site-header__content { display: flex; align-items: center; gap: var(--space-md); flex: 1; min-width: 0; }

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--slate-900);
}

.site-tagline {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-feature-settings: 'tnum';
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--co-red-dark);
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  border-radius: 999px;
  font-feature-settings: 'tnum';
  white-space: nowrap;
  flex-shrink: 0;
}
.verified-badge::before {
  content: "";
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--co-gold);
  box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.25);
}

@media (max-width: 640px) {
  .verified-badge span { display: none; }
  .verified-badge::after { content: "Apr 2026"; }
  .site-tagline { display: none; }
}

/* ============================================================
   Ad Slots (monetization)
   ============================================================ */

.ad-slot {
  position: relative;
  background: var(--color-surface);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Collapse when the slot div itself is empty (no ins tag yet) */
.ad-slot:empty {
  min-height: 0;
  border: none;
  padding: 0;
}

/* Hide dev chrome once an ad actually loads into the ins element */
.ad-slot:has(ins:not(:empty)) {
  border: none;
  background: transparent;
}
.ad-slot:has(ins:not(:empty))::after { display: none; }
.ad-slot:has(ins:not(:empty)) .ad-label { display: none; }

.ad-slot::after {
  content: "AD · responsive leaderboard 728×90";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--slate-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ad-slot > ins { width: 100%; min-height: 90px; }
.ad-slot > ins:not(:empty) + * { display: none; }

.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--rectangle   { min-height: 250px; max-width: 100%; }
.ad-slot--rectangle::after { content: "AD · medium rectangle 300×250"; }

.ad-slot--bottom { min-height: 90px; margin-top: var(--space-xl); }

.ad-label {
  position: absolute;
  top: 6px; left: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--slate-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ============================================================
   Calculator tabs (segmented jump nav)
   ============================================================ */

.calculator-tabs {
  display: inline-flex;
  gap: 0;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-xs);
}

.calc-tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
  transition: background 140ms ease, color 140ms ease;
}
.calc-tab:hover { color: var(--slate-900); }
.calc-tab.is-active {
  background: var(--co-blue);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 61, 165, 0.25);
}
.calc-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ============================================================
   Bento Layout: inputs (2/3) + sticky results sidebar (1/3)
   ============================================================ */

.calculator-pane {}
.calculator-pane[hidden] { display: none; }

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  gap: var(--bento-gap);
  align-items: start;
}

@media (max-width: 880px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }
}

/* Input column (the bento grid of input cards) */
#panel-inputs,
#panel-inputs-insurance,
#panel-inputs-risk {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--bento-gap);
  min-width: 0;
}

/* ============================================================
   Input cards
   ============================================================ */

.input-card {
  grid-column: span 12;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xs);
  position: relative;
  min-width: 0;
}

.input-card--half { grid-column: span 6; }
.input-card--third { grid-column: span 4; }

@media (max-width: 768px) {
  .input-card--half, .input-card--third { grid-column: span 12; }
}

.input-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-bottom: var(--space-sm);
}
.input-card__eyebrow::before {
  content: "";
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--co-red);
}

.input-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--slate-900);
  margin: 0 0 var(--space-md);
}

.input-card__title + .form-helper {
  margin-top: -0.4rem;
  margin-bottom: var(--space-md);
}

/* Collapsible */
.input-card--collapsible { padding: 0; }
.collapsible-toggle {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate-800);
  min-height: 48px;
  border-radius: var(--radius-lg);
}
.collapsible-toggle:hover { background: var(--slate-50); }
.collapsible-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.collapsible-toggle .chevron { transition: transform 180ms ease; color: var(--slate-500); }
.collapsible-toggle.is-expanded .chevron { transform: rotate(180deg); }

.collapsible-body { padding: 0 var(--space-lg) var(--space-lg); }

/* ============================================================
   Forms
   ============================================================ */

.form-group { margin-bottom: var(--space-md); }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: 0.375rem;
}

.form-helper {
  font-size: 0.8125rem;
  color: var(--slate-500);
  margin: 0.375rem 0 0;
  line-height: 1.45;
}
.form-helper--warn { color: var(--red-600); }

.form-input,
.form-select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  min-height: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--slate-900);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.form-input::placeholder { color: var(--slate-400); }

.form-input:hover,
.form-select:hover { border-color: var(--slate-500); }

.form-input:focus,
.form-select:focus,
.form-input:focus-visible,
.form-select:focus-visible {
  outline: none;
  border-color: #003DA5;
  box-shadow: var(--focus-ring);
}

/* Dollar inputs — mono for precision */
#input-takehome,
#input-takehome-annual,
#input-rent-override,
#input-mortgage,
#input-hoa,
#input-split-rent,
#input-custom-rent,
#input-custom-groceries,
#input-custom-transport,
#wi-coverage-amount,
#wi-year-built {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
  letter-spacing: -0.01em;
}

.form-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  appearance: none;
  -webkit-appearance: none;
}

.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.input-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--slate-500);
  pointer-events: none;
  font-size: 0.9375rem;
}
.form-input--prefixed { padding-left: 1.75rem; }

/* Radio group: stacked tile style */
.radio-group {
  display: grid;
  gap: 0.5rem;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  min-height: 44px;                 /* WCAG 2.1 AA target — 44px exceeds 24px min */
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--slate-800);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.radio-option:hover {
  border-color: #2D5016;
  background: rgba(45, 80, 22, 0.04);
}
.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid var(--slate-400);
  border-radius: 50%;
  background: white;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: border-color 140ms ease;
}
.radio-option input[type="radio"]:checked {
  border-color: #2D5016;
}
.radio-option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #2D5016;
}
.radio-option input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.radio-option:has(input:checked) {
  border-color: #2D5016;
  background: rgba(45, 80, 22, 0.08);
  color: var(--slate-900);
  font-weight: 500;
}

/* Segmented control (household) */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--slate-100);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
@media (max-width: 480px) {
  .segmented-control { grid-template-columns: repeat(2, 1fr); }
}
.segmented-control__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 0.5rem;
  min-height: 40px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate-600);
  border-radius: calc(var(--radius-md) - 4px);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.segmented-control__option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented-control__option:hover { color: var(--slate-900); }
.segmented-control__option:has(input:checked) {
  background: var(--color-surface);
  color: var(--slate-900);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}
.segmented-control__option:has(input:focus-visible) { box-shadow: var(--focus-ring); }

/* Toggle switch */
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--slate-700);
  cursor: pointer;
  min-height: 32px;
}
.toggle-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px; height: 20px;
  background: var(--slate-300);
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 180ms ease;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease;
}
.toggle-checkbox:checked + .toggle-switch { background: var(--co-red); }
.toggle-checkbox:checked + .toggle-switch::after { transform: translateX(16px); }
.toggle-checkbox:focus-visible + .toggle-switch { box-shadow: var(--focus-ring); }

/* Sliders */
.form-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(
    to right,
    #1B2D4F 0%,
    #1B2D4F var(--slider-fill, 50%),
    var(--slate-200) var(--slider-fill, 50%),
    var(--slate-200) 100%
  );
}
.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #1B2D4F;
  border: none;
  box-shadow: var(--shadow-sm);
  cursor: grab;
}
.form-slider::-webkit-slider-thumb:active { cursor: grabbing; }
.form-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #1B2D4F;
  border: none;
  box-shadow: var(--shadow-sm);
  cursor: grab;
}
.form-slider::-moz-range-thumb:active { cursor: grabbing; }
.form-slider::-moz-range-progress { background: #1B2D4F; border-radius: 999px; }
.form-slider:focus-visible { box-shadow: var(--focus-ring); }

.advanced-guiltfree-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.875rem;
  background: var(--amber-50);
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
}
.guiltfree-pct { font-family: var(--font-mono); color: var(--amber-600); }

/* Email capture */
.input-card--email {
  background: #FFF8F5;
  color: var(--slate-900);
  border-color: var(--color-border);
  border-left: 4px solid var(--co-red);
}
.input-card--email .input-card__title { color: var(--slate-900); }
.email-subtext { color: var(--slate-600); font-size: 0.875rem; margin: 0 0 var(--space-md); }
.email-form-row { display: flex; gap: 0.5rem; }
.email-form-row .form-input {
  background: white;
  border-color: var(--color-border-strong);
  color: var(--slate-900);
}
.email-form-row .form-input::placeholder { color: var(--slate-400); }
.email-form-row .form-input:focus { border-color: #003DA5; box-shadow: var(--focus-ring); }
.btn-email-submit {
  appearance: none;
  padding: 0.625rem 1rem;
  min-height: 44px;
  background: var(--co-red);
  color: white;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease;
}
.btn-email-submit:hover { background: var(--co-red-dark); }
.btn-email-submit:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.input-card--email .form-helper { color: var(--slate-500); }
.email-success { color: var(--color-money); font-size: 0.9rem; }

/* ============================================================
   Results column — sticky sidebar (desktop) / bottom sheet (mobile)
   ============================================================ */

#panel-results,
#panel-results-insurance,
#panel-results-risk {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: var(--bento-gap);
  max-height: calc(100vh - 120px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  min-width: 0;
}
#panel-results::-webkit-scrollbar,
#panel-results-insurance::-webkit-scrollbar,
#panel-results-risk::-webkit-scrollbar { width: 6px; }
#panel-results::-webkit-scrollbar-thumb,
#panel-results-insurance::-webkit-scrollbar-thumb,
#panel-results-risk::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }

/* Mobile: fixed bottom sheet */
@media (max-width: 880px) {
  #panel-results,
  #panel-results-insurance,
  #panel-results-risk {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    top: auto;
    max-height: 55vh;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    box-shadow: 0 -12px 32px -8px rgba(15, 23, 42, 0.15);
    padding: var(--space-md) var(--space-md) var(--space-lg);
    z-index: 50;
    gap: var(--space-md);
  }
  /* drag handle */
  #panel-results::before,
  #panel-results-insurance::before,
  #panel-results-risk::before {
    content: "";
    position: sticky; top: 0;
    display: block;
    width: 40px; height: 4px;
    background: var(--slate-300);
    border-radius: 2px;
    margin: 0 auto var(--space-sm);
  }
}

/* Each result card (summary, bar, buckets, breakdown, verdict, compare, wildfire) */
#panel-results > div,
#panel-results-insurance > div,
#panel-results-risk > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-xs);
  min-width: 0;
  max-width: 100%;
}
#panel-results > div:empty,
#panel-results-insurance > div:empty,
#panel-results-risk > div:empty { display: none; }

/* The ad-slot already has its own dashed style — don't double-card it */
#panel-results > .ad-slot { background: var(--color-surface); box-shadow: none; }

/* Placeholder (initial state) */
.results-placeholder {
  padding: var(--space-md);
  text-align: center;
  color: var(--slate-500);
}
.results-placeholder__text {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
}

/* ============================================================
   Results — Summary
   ============================================================ */

.results-summary {
  text-align: left;
}
.results-summary__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}
.results-summary__income {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.6rem;
  word-break: break-all;
  color: var(--co-red-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-feature-settings: 'tnum';
}
.results-summary__subtitle {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--slate-500);
}

/* ============================================================
   Results — Stacked Bar
   ============================================================ */

.results-bar {}
.bar-track {
  position: relative;
  display: flex;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--slate-100);
  border: 1px solid var(--color-border);
}
.bar-seg { transition: width 400ms ease; }
.bar-seg--fixed     { background: var(--color-fixed); }
.bar-seg--savings   { background: var(--color-savings); }
.bar-seg--invest    { background: var(--color-invest); }
.bar-seg--guiltfree { background: var(--color-guiltfree); }
.bar-seg--overflow  { background: repeating-linear-gradient(45deg, var(--red-600) 0 6px, var(--red-700) 6px 12px); }

.bar-markers { position: relative; height: 0; }
.bar-marker {
  position: absolute;
  top: -32px;
  width: 2px; height: 32px;
  background: rgba(15, 23, 42, 0.35);
}
.bar-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--slate-600);
}
.bar-legend__item { display: flex; align-items: baseline; gap: 0.4em; }
.bar-legend__item::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
  transform: translateY(1px);
}
.bar-legend__item--fixed::before     { background: var(--color-fixed); }
.bar-legend__item--savings::before   { background: var(--color-savings); }
.bar-legend__item--invest::before    { background: var(--color-invest); }
.bar-legend__item--guiltfree::before { background: var(--color-guiltfree); }
.bar-legend__item strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--slate-900);
  margin-left: auto;
  font-feature-settings: 'tnum';
}

/* ============================================================
   Results — Bucket cards (2x2)
   ============================================================ */

.results-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-sm);
}
.bucket-card {
  padding: 0.75rem 0.875rem;
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-left-width: 3px;
}
.bucket-card--fixed     { border-left-color: var(--color-fixed); }
.bucket-card--savings   { border-left-color: var(--color-savings); }
.bucket-card--invest    { border-left-color: var(--color-invest); }
.bucket-card--guiltfree { border-left-color: var(--color-guiltfree); }

.bucket-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.bucket-card__name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bucket-card__amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  word-break: break-all;
  color: var(--slate-900);
  letter-spacing: -0.01em;
  font-feature-settings: 'tnum';
}
.bucket-card__amount.amount--negative { color: var(--red-600); }
.bucket-card__pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--slate-500);
  margin-top: 0.15rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.chip--green  { background: var(--emerald-50);  color: var(--co-red-dark); }
.chip--yellow { background: var(--amber-50);    color: var(--amber-600); }
.chip--red    { background: var(--red-50);      color: var(--red-700); }

/* ============================================================
   Results — Line item breakdown
   ============================================================ */

.breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}
.breakdown-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-900);
}
.btn-reset-overrides {
  appearance: none;
  background: transparent;
  border: 1px solid var(--color-border-strong);
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  color: var(--slate-600);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 28px;
}
.btn-reset-overrides:hover { border-color: var(--co-red); color: var(--co-red-dark); }
.btn-reset-overrides:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.breakdown-table thead th {
  text-align: left;
  font-weight: 500;
  color: var(--slate-500);
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.breakdown-table thead th:nth-child(2),
.breakdown-table thead th:nth-child(3) { text-align: right; }
.breakdown-table tbody td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-800);
}
.breakdown-table tbody td:nth-child(2),
.breakdown-table tbody td:nth-child(3) { text-align: right; }

.breakdown-amount { font-family: var(--font-mono); color: var(--slate-900); font-feature-settings: 'tnum'; }
.breakdown-pct    { font-family: var(--font-mono); color: var(--slate-500); font-feature-settings: 'tnum'; font-size: 0.75rem; }
.breakdown-label  { font-weight: 500; }

.editable-value {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--slate-300);
  padding: 0.1rem 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--slate-900);
  cursor: pointer;
  font-feature-settings: 'tnum';
}
.editable-value:hover { border-bottom-color: var(--co-red); color: var(--co-red-dark); }
.editable-value:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

.inline-edit-input {
  width: 90px;
  padding: 0.15rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  border: 1px solid var(--co-red);
  border-radius: 3px;
  text-align: right;
  box-shadow: var(--focus-ring);
  outline: none;
}

.row-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  background: var(--red-100);
  color: var(--red-700);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.35em;
}
.row-note {
  font-size: 0.65rem;
  color: var(--slate-500);
  margin-left: 0.35em;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.row--warning td { background: var(--red-50); }

.breakdown-total td {
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
  font-weight: 600;
  color: var(--slate-900);
}
.breakdown-total td:nth-child(2) {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
}

.breakdown-note {
  font-size: 0.7rem;
  color: var(--slate-500);
  margin: var(--space-sm) 0 0;
  font-style: italic;
}

/* ============================================================
   Results — Verdict
   ============================================================ */

.results-verdict { text-align: left; }
.verdict-light {
  width: 48px; height: 48px;
  border-radius: 50%;
  margin-bottom: var(--space-sm);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.15), 0 0 0 3px white, 0 0 0 4px var(--color-border);
}
.verdict-light--green  { background: radial-gradient(circle at 30% 30%, #34D399, var(--co-red)); }
.verdict-light--yellow { background: radial-gradient(circle at 30% 30%, #FCD34D, var(--amber-600)); }
.verdict-light--red    { background: radial-gradient(circle at 30% 30%, #F87171, var(--red-600)); }

.verdict-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--slate-900);
  letter-spacing: -0.01em;
}
.verdict-message {
  font-size: 0.8125rem;
  color: var(--slate-600);
  margin: 0.35rem 0 var(--space-md);
  line-height: 1.5;
}

.gap-card {
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.gap-card--shortfall { background: var(--red-50); border-color: #FECACA; }
.gap-card--surplus   { background: var(--emerald-50); border-color: var(--emerald-100); }
.gap-card__label {
  font-size: 0.7rem;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.gap-card__amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--slate-900);
  margin-top: 0.2rem;
  font-feature-settings: 'tnum';
}
.gap-card--shortfall .gap-card__amount { color: var(--red-700); }
.gap-card--surplus   .gap-card__amount { color: var(--co-red-dark); }
.gap-card__sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--slate-500);
  margin-top: 0.25rem;
}

.alternatives { margin-top: var(--space-md); }
.alternatives__title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--slate-800);
}
.alternatives-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.alternatives-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}
.alt-city { color: var(--slate-800); font-weight: 500; }
.alt-savings {
  font-family: var(--font-mono);
  color: var(--co-red-dark);
  font-size: 0.75rem;
  font-feature-settings: 'tnum';
}

/* ============================================================
   Results — Compare (renders in left/input column)
   ============================================================ */

#results-compare:empty { display: none; }
#results-compare .results-compare {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--co-blue);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.compare-title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-900);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}
.compare-col {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.compare-city-name { font-weight: 600; font-size: 0.875rem; color: var(--slate-900); margin-bottom: 0.3rem; }
.compare-verdict {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}
.verdict-chip--green  { background: var(--emerald-50); color: var(--co-red-dark); }
.verdict-chip--yellow { background: var(--amber-50); color: var(--amber-600); }
.verdict-chip--red    { background: var(--red-50); color: var(--red-700); }

.compare-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--slate-600);
  padding: 0.15rem 0;
}
.compare-stat strong {
  font-family: var(--font-mono);
  color: var(--slate-900);
  font-feature-settings: 'tnum';
}
.compare-diff {
  margin-top: var(--space-sm);
  padding: 0.5rem 0.65rem;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--slate-600);
}
.compare-diff strong {
  font-family: var(--font-mono);
  color: var(--slate-900);
  font-feature-settings: 'tnum';
}

/* ============================================================
   Wildfire results
   ============================================================ */

.wildfire-results { display: flex; flex-direction: column; gap: var(--space-md); }

.insurance-result-card {
  padding: var(--space-md);
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.insurance-result-header {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.risk-badge, .wui-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.risk-badge--low       { background: var(--emerald-50); color: var(--co-red-dark); }
.risk-badge--moderate  { background: var(--amber-50);   color: var(--amber-600); }
.risk-badge--high      { background: #FED7AA;            color: #9A3412; }
.risk-badge--very-high { background: var(--red-50);     color: var(--red-700); }
.wui-badge { background: var(--slate-800); color: white; }

.insurance-result-amounts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.insurance-result-block {
  padding: 0.6rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.insurance-result-label {
  display: block;
  font-size: 0.7rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.insurance-result-number {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--co-red-dark);
  font-feature-settings: 'tnum';
  letter-spacing: -0.01em;
}
.insurance-result-note {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin: 0;
}

.risk-score-bar {
  position: relative;
  height: 8px;
  background: var(--slate-200);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.risk-score-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD100 0%, #F97316 50%, #DC2626 100%);
  transform-origin: left center;
  transition: width 400ms ease;
}
.risk-score-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--slate-700);
  margin: 0 0 0.35rem;
}
.risk-score-label strong { font-weight: 600; color: var(--slate-900); }

.hb1182-notice {
  padding: 0.75rem 0.875rem;
  background: var(--blue-50);
  border: 1px solid #BFDBFE;
  border-left: 3px solid var(--blue-600);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--slate-800);
  line-height: 1.5;
}
.hb1182-notice strong { color: var(--blue-600); }

.mitigation-section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-900);
  margin: 0 0 var(--space-sm);
}
.mitigation-list, .risk-factors-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 0.5rem;
}
.mitigation-item, .risk-factor-item {
  padding: 0.55rem 0.7rem;
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.mitigation-row { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.mitigation-label { font-weight: 500; font-size: 0.8125rem; color: var(--slate-900); }
.mitigation-discount {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--co-red-dark);
  background: var(--emerald-50);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-feature-settings: 'tnum';
}
.mitigation-description {
  font-size: 0.75rem;
  color: var(--slate-600);
  margin: 0.3rem 0 0;
  line-height: 1.45;
}
.risk-factor-item { font-size: 0.8125rem; color: var(--slate-700); line-height: 1.5; }

.risk-insurance-impact {
  padding: var(--space-md);
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.risk-insurance-impact p { font-size: 0.8125rem; color: var(--slate-700); margin: 0.2rem 0; line-height: 1.5; }
.risk-insurance-impact strong {
  font-family: var(--font-mono);
  color: var(--slate-900);
  font-feature-settings: 'tnum';
}

.official-resource {
  padding: 0.75rem 0.875rem;
  background: var(--slate-100);
  border-radius: var(--radius-sm);
}
.official-resource__link {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-900);
  text-decoration: none;
}
.official-resource__link:hover { color: var(--co-red-dark); }

/* Affiliate callout (appears when risk is high / very-high via calc results) */
.affiliate-cta {
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--emerald-50), var(--slate-50));
  border: 1px solid var(--emerald-100);
  border-radius: var(--radius-md);
  position: relative;
}
.affiliate-cta.urgency-high {
  background: linear-gradient(135deg, var(--red-50), var(--amber-50));
  border-color: #FECACA;
}
.affiliate-cta__headline {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--slate-900);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}
.affiliate-cta__body { font-size: 0.8125rem; color: var(--slate-700); margin: 0 0 var(--space-sm); line-height: 1.5; }
.affiliate-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.55rem 0.9rem;
  min-height: 40px;
  background: var(--co-red);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: filter 140ms ease;
}
.affiliate-cta.urgency-high .affiliate-cta__link { background: var(--co-red); }
.affiliate-cta__link:hover { filter: brightness(0.9); }
.affiliate-cta.urgency-high .affiliate-cta__link:hover { filter: brightness(0.9); }
.affiliate-cta__link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.affiliate-cta__disclosure {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--slate-500);
  margin: 0.55rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   Content pages (about, privacy, contact)
   ============================================================ */

.back-nav {
  margin-bottom: var(--space-lg);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--co-blue);
  text-decoration: none;
  padding: 0.375rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 140ms ease, color 140ms ease;
}
.back-link:hover { color: var(--co-blue-light); border-bottom-color: var(--co-blue-light); }
.back-link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

.content-page {
  max-width: 720px;
}
.content-page h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  margin: 0 0 var(--space-sm);
}
.content-page .page-intro {
  font-size: 1rem;
  color: var(--color-muted);
  line-height: 1.65;
  margin: 0 0 var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}
.content-section {
  margin-bottom: var(--space-xl);
}
.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--slate-900);
  margin: 0 0 var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--co-red);
  display: inline-block;
}
.content-section p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--slate-700);
  margin: 0 0 var(--space-md);
}
.content-section p:last-child { margin-bottom: 0; }
.content-section ul {
  margin: 0 0 var(--space-md);
  padding-left: 1.25rem;
}
.content-section li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--slate-700);
  margin-bottom: 0.35rem;
}
.content-disclaimer {
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--slate-100);
  border-left: 3px solid var(--co-red);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--slate-500);
  line-height: 1.6;
}

/* ============================================================
   Blog index
   ============================================================ */

.blog-list {
  display: grid;
  gap: var(--space-lg);
}
.blog-card {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--co-red);
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.blog-card__meta time {
  font-size: 0.8125rem;
  color: var(--slate-500);
}
.blog-card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--co-red);
  background: #FEF2F2;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--slate-900);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}
.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 140ms ease;
}
.blog-card__title a:hover { color: var(--co-blue); }
.blog-card__title a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }
.blog-card__desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--slate-600);
  margin: 0 0 var(--space-md);
}
.blog-card__cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--co-red);
  text-decoration: none;
  transition: color 140ms ease;
}
.blog-card__cta:hover { color: var(--co-red-dark); }
.blog-card__cta:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

/* ============================================================
   Article / Blog
   ============================================================ */

.page-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}
.page-nav .back-link { margin-right: auto; }
.page-nav-links {
  display: flex;
  gap: var(--space-md);
}
.page-nav-links a {
  font-size: 0.8125rem;
  color: var(--slate-500);
  text-decoration: none;
  transition: color 140ms ease;
}
.page-nav-links a:hover { color: var(--co-blue-light); }
.page-nav-links a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

.article-page { max-width: 720px; }

.article-header { margin-bottom: var(--space-xl); }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--slate-900);
  margin: 0 0 var(--space-md);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--slate-500);
  margin-bottom: var(--space-md);
}
.article-meta time { font-weight: 500; }
.article-meta-sep { color: var(--slate-300); }
.article-lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--slate-600);
  margin: 0;
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.article-body { margin-top: var(--space-xl); }
.article-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--slate-700);
  margin: 0 0 var(--space-md);
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: var(--space-xl) 0 var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--co-red);
  display: inline-block;
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: var(--space-lg) 0 var(--space-xs);
  letter-spacing: -0.01em;
}
.article-body ul {
  margin: 0 0 var(--space-md);
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.article-body li {
  display: flex;
  gap: 0.6rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--slate-700);
}
.article-body li::before {
  content: "✓";
  color: var(--co-red);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05em;
}
.article-body strong { color: var(--slate-900); font-weight: 600; }

.article-cta {
  margin-top: var(--space-2xl);
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, #FFF8F5 0%, #FEF2F2 100%);
  border: 1px solid #FECACA;
  border-left: 4px solid var(--co-red);
  border-radius: var(--radius-lg);
}
.article-cta p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--slate-700);
  margin: 0 0 var(--space-md);
}
.article-cta a.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.6rem 1.25rem;
  background: var(--co-red);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 140ms ease;
}
.article-cta a.cta-btn:hover { background: var(--co-red-dark); }
.article-cta a.cta-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.contact-form .form-group { margin: 0; }
.contact-form textarea.form-input {
  resize: vertical;
  min-height: 130px;
  font-family: var(--font-body);
}
.btn-submit {
  appearance: none;
  align-self: flex-start;
  padding: 0.625rem 1.5rem;
  min-height: 44px;
  background: var(--co-red);
  color: white;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 140ms ease;
}
.btn-submit:hover { background: var(--co-red-dark); }
.btn-submit:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.footer-links {
  display: flex;
  gap: var(--space-md);
}
.footer-links a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 140ms ease;
}
.footer-links a:hover { color: var(--slate-600); }
.footer-links a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--slate-500);
}
.site-footer p { margin: 0; }
.footer-meta {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-400);
}

/* ============================================================
   Focus-visible policy — 3px emerald ring everywhere
   ============================================================ */

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

a:focus-visible {
  box-shadow: var(--focus-ring);
  border-radius: 3px;
}

/* Results-updated subtle pulse */
.results-updated { animation: resultsPulse 400ms ease; }
@keyframes resultsPulse {
  0%   { background-color: rgba(16, 185, 129, 0.04); }
  100% { background-color: transparent; }
}

/* ============================================================
   Print
   ============================================================ */

@media print {
  body::before, .ad-slot, .calculator-tabs, .input-card--email, .site-footer { display: none !important; }
  #app { padding: 0; max-width: none; }
  .calculator-layout { display: block; }
  #panel-results, #panel-results-insurance, #panel-results-risk {
    position: static;
    max-height: none;
    overflow: visible;
  }
}