/* DriversLicenseFee — Apple-inspired redesign 2026-05 */
/* Fonts loaded via <link> in HTML head (Inter + Manrope). Removed duplicate
 * @import that was double-loading Inter and unused Archivo Black. */

:root {
  accent-color: #047857;
  --primary: #047857;
  --primary-dark: #064e3b;
  --primary-soft: #ecfdf5;
  --accent: #10b981;

  --ink: #0a0a0b;
  --ink-2: #1d1d1f;
  --ink-3: #424245;
  --ink-4: #6e6e73;
  --ink-5: #6e6e73; /* WCAG AA: 5.0:1 on white. Was #86868b (~3.5:1, fails AA). */
  --ink-6: #d2d2d7;

  --bg: #ffffff;
  --bg-soft: #fbfbfd;
  --bg-medium: #f5f5f7;
  --bg-dark: #161617;
  --bg-darker: #000000;

  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);

  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-lg: 0 24px 60px -16px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-glass: 0 8px 32px rgba(0,0,0,0.12);

  --container: 1080px;
  --container-narrow: 720px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Containers */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }

/* Headings */
h1, h2, h3, h4 {
  color: var(--ink);
  letter-spacing: -0.022em;
  font-weight: 600;
  line-height: 1.1;
}
h1 { font-weight: 700; letter-spacing: -0.03em; }

/* Header — sticky, semi-opaque (no backdrop-filter so dropdowns escape stacking context) */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.nav-links {
  flex: 1;
  margin-left: 64px;
  justify-content: space-between;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
  line-height: 1;
}
@media (hover: hover) {
  .logo:hover { opacity: 0.85; }
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(4, 120, 87, 0.18));
}
.logo-text {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.035em;
  line-height: 1;
  background: linear-gradient(95deg, var(--primary) 0%, #059669 50%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-accent { color: inherit; }
.logo-text .logo-accent { -webkit-text-fill-color: #10b981; background: none; color: #10b981; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  color: var(--ink-3);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  position: relative;
  padding: 4px 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(95deg, var(--primary) 0%, #059669 50%, var(--primary-dark) 100%);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}
@media (hover: hover) {
  .nav-link:hover {
    background: linear-gradient(95deg, var(--primary) 0%, #059669 50%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .nav-link:hover::after { transform: scaleX(1); }
  .nav-item:hover .nav-link::after { transform: scaleX(1); }
}
@media (hover: hover) {
  .nav-item:hover .nav-link {
  background: linear-gradient(95deg, var(--primary) 0%, #059669 50%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
}

.nav-link .caret {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  opacity: 1;
  transition: transform 0.25s var(--ease);
  -webkit-text-fill-color: var(--primary);
  display: inline-block;
  line-height: 1;
  margin-left: 2px;
  position: relative;
  top: -2px;
}
@media (hover: hover) {
  .nav-link:hover .caret, .nav-item:hover .nav-link .caret {
  -webkit-text-fill-color: var(--primary-dark);
  color: var(--primary-dark);
}
}

.nav-item { position: relative; }
/* Narrow hover bridge that ONLY covers the nav-item's own width, not the
   wider dropdown — prevents adjacent nav-items from re-triggering hover and
   causing flicker. */
.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
  pointer-events: none;
}
@media (hover: hover) {
  .nav-item:hover::after { pointer-events: auto; }
}

.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  min-width: 320px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 24px 64px -16px rgba(0,0,0,0.22), 0 8px 16px -8px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease) 0.05s, transform 0.22s var(--ease) 0.05s, visibility 0s linear 0.23s;
  z-index: 1100;
}
@media (hover: hover) {
  .nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.18s var(--ease), transform 0.22s var(--ease), visibility 0s;
}
}

.dropdown-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px 8px;
}
.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.dropdown-grid a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  font-weight: 500;
}
@media (hover: hover) {
  .dropdown-grid a:hover { background: var(--bg-medium); color: var(--primary); }
}

.dropdown-list { display: flex; flex-direction: column; gap: 2px; }
/* Multi-column variant for Calculators dropdown (13 items — too tall as single col) */
.dropdown-list-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  min-width: 540px;
}
.dropdown-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
@media (hover: hover) {
  .dropdown-list a:hover { background: var(--bg-medium); }
  .dropdown-list a:hover .dd-title { color: var(--primary); }
  .dropdown-list a:hover .dd-desc { color: var(--primary); }
}

.dd-title { font-size: 14px; font-weight: 600; color: var(--ink); transition: color 0.15s; }
.dd-desc { font-size: 12px; color: var(--ink-4); transition: color 0.15s; }
.dropdown-all {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark); /* AA contrast on white */
  text-decoration: none;
  border-top: 1px solid var(--border);
  text-align: center;
}
@media (hover: hover) {
  .dropdown-all:hover { color: var(--primary-dark); }
}

/* Mobile nav — hamburger drawer */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  justify-content: center;
  align-items: center;
}
.nav-mobile-toggle .nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav.nav-open .nav-mobile-toggle .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.nav-open .nav-mobile-toggle .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav.nav-open .nav-mobile-toggle .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-mobile-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    background: #ffffff;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.18), 0 4px 8px -4px rgba(0, 0, 0, 0.06);
    padding: 12px 0 20px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 100;
  }
  .nav.nav-open .nav-links { display: flex; }
  /* Uniform top-level title style for ALL nav items (Calculators, Deadlines, By state, Guides, About) */
  .nav-link, .nav-item > .nav-link {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    padding: 14px 24px 6px;
    width: 100%;
    text-transform: none;
    letter-spacing: -0.015em;
    pointer-events: auto;
  }
  .nav-item { width: 100%; }
  .nav-link .caret { display: none; }

  /* In mobile drawer, expand dropdowns inline below the section title */
  .nav-item .dropdown {
    display: block;
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0 24px 12px;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: auto;
  }
  .nav-item .dropdown::before { display: none; }
  .dropdown-eyebrow { display: none; }
  .dropdown-grid { grid-template-columns: 1fr 1fr; gap: 4px; }
  .dropdown-grid a { padding: 10px 12px; font-size: 14px; }
  .dropdown-list a { padding: 10px 0; }
  .dropdown-list .dd-title { font-size: 15px; font-weight: 500; }
  .dropdown-list .dd-desc { font-size: 12px; }
}

/* HERO — Apple-style: massive type, full bleed, generous space */
.hero {
  padding: 36px 24px 28px;
  text-align: center;
  background: var(--bg);
  position: relative;
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 .gradient {
  background: linear-gradient(95deg, var(--primary) 0%, #059669 50%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--ink-3);
  max-width: 580px;
  margin: 0 auto 8px;
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.45;
}
.hero .meta {
  font-size: 13px;
  color: var(--ink-5);
  margin-top: 18px;
  letter-spacing: 0.01em;
}
.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: linear-gradient(95deg, var(--primary) 0%, #059669 50%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(4, 120, 87, 0.25);
}
@media (hover: hover) {
  .btn-primary:hover {
  background: linear-gradient(95deg, var(--primary-dark) 0%, #059669 50%, #022c22 100%);
  box-shadow: 0 6px 16px -2px rgba(4, 120, 87, 0.35);
}
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
@media (hover: hover) {
  .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
}

.btn-accent {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-dark);
  font-weight: 600;
}
@media (hover: hover) {
  .btn-accent:hover {
    background: #d1fae5;
    border-color: var(--primary-dark);
    color: var(--primary-dark);
  }
}


@media (max-width: 640px) {
  .hero { padding: 28px 24px 24px; }
}

/* Reveal animation (Intersection Observer adds .in-view) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.calc-heading {
  max-width: var(--container-narrow);
  margin: 16px auto 20px;
  padding: 0 24px;
  text-align: center;
}
.calc-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.1;
}

/* Calculator — the hero "product" */
.calc-wrap {
  margin: 0;
  padding: 64px 24px;
  background:
    radial-gradient(ellipse 1100px 520px at 50% 0%, rgba(5, 150, 105, 0.18) 0%, rgba(5, 150, 105, 0.10) 35%, transparent 70%),
    linear-gradient(180deg, rgba(4, 120, 87, 0.06) 0%, rgba(4, 120, 87, 0.10) 50%, rgba(4, 120, 87, 0.06) 100%);
}
.calc {
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: visible;
  max-width: var(--container-narrow);
  margin: 0 auto;
}
.calc::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(4, 120, 87, 0.04) 0%, transparent 50%);
  border-radius: var(--r-lg);
  pointer-events: none;
}
.calc-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark); /* AA contrast on white */
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.calc h2 {
  font-size: 28px;
  margin-bottom: 28px;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.field { margin-bottom: 18px; position: relative; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.field .hint {
  display: block;
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 13px 16px;
  font-size: 17px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-feature-settings: "tnum";
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.12);
}
.field input::placeholder { color: var(--ink-5); }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 20px;
  cursor: pointer;
}
.toggle input { width: 18px; height: 18px; cursor: pointer; }

@media (max-width: 640px) {
  .calc { padding: 28px 22px; }
  .calc h2 { font-size: 22px; }
}

/* Results — big numbers, dramatic */
/* Dead .results block removed (was overridden by the rule below at the
   "Results panel" section). Kept .results h3 since it's still used. */
.results h3 {
  font-size: 13px;
  margin-bottom: 16px;
  color: var(--ink-4);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
@media (max-width: 480px) { .result-grid { grid-template-columns: 1fr; } }
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.result-row:last-child { border-bottom: none; }
.result-row .label { color: var(--ink-4); }
.result-row .value { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.result-total {
  margin-top: 20px;
  padding: 20px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-total.takehome { background: var(--primary); }
.result-total .label { opacity: 0.85; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.result-total .value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; }

.quarterly-list {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.quarterly-item {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
@media (hover: hover) {
  .quarterly-item:hover {
  box-shadow: 0 4px 8px -2px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  background: var(--bg-soft);
}
}

.quarterly-item .q {
  font-size: 11px;
  color: var(--ink-4);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.quarterly-item .due { font-size: 11px; color: var(--ink-5); margin-top: 3px; white-space: nowrap; }
.quarterly-item .amt {
  font-size: clamp(15px, 3.2vw, 20px);
  font-weight: 700;
  color: var(--ink);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

/* Filing-status pill buttons (inline replacement for <select>) */
.filing-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filing-pill {
  flex: 1 1 0;
  min-width: 92px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
  text-align: center;
  line-height: 1.25;
}
@media (hover: hover) {
  .filing-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
}

.filing-pill.selected {
  background: rgba(4, 120, 87, 0.08);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

/* SECTIONS — full-bleed alternating */
.section {
  padding: 64px 24px;
}
.section.alt { background: var(--bg-medium); }
.section.dark {
  background: var(--bg-dark);
  color: var(--ink-6);
}
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p { color: rgba(255, 255, 255, 0.7); }
.section.dark a { color: #fff; }

.section.dark .section-eyebrow,
.section.dark .section-tag { color: #34d399; }  /* light blue eyebrow on dark bg */

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark); /* AA contrast on white: ~5.0:1 (was --primary, 3.74:1) */
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.05;
}
.section .lead {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.4;
  max-width: 720px;
  margin-bottom: 32px;
}
.section h3 { font-size: 22px; margin: 28px 0 10px; font-weight: 600; }
.section p { margin-bottom: 14px; color: var(--ink-3); }
.section ul { margin: 14px 0 18px 22px; }
.section li { margin-bottom: 8px; color: var(--ink-3); }
.section a:not(.card):not(.btn):not(.state-list a) { color: var(--primary-dark); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
@media (hover: hover) {
  .section a:not(.card):not(.btn):not(.state-list a):hover { color: var(--primary-dark); }
}


@media (max-width: 768px) {
  .section { padding: 36px 20px; }
  .calc-wrap { padding: 32px 16px; margin-bottom: 0; }
  .calc { padding: 24px 18px; }
  .hero { padding: 24px 20px 12px; }
  .section h2 { margin-bottom: 16px; }
  .section .lead { margin-bottom: 22px; }
  .section h3 { margin: 22px 0 8px; }
  .calc h2 { font-size: 22px; margin-bottom: 18px; }
  .results-title { font-size: 22px; }
  /* tighten card grids */
  .card-grid { gap: 12px; }
  .features-grid { gap: 12px; }
  .steps-grid { gap: 6px; margin-top: 16px; }
  .steps-grid .step-card { padding: 12px 14px 14px; background: var(--bg-soft); border-radius: 12px; }
  .steps-grid .step-num {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 8px;
    font-size: 11px;
    background: var(--primary-dark); /* AA contrast: white-on-primary fails 4.5:1 */
    color: #fff;
    padding: 2px 7px;
    border-radius: 6px;
    vertical-align: middle;
    letter-spacing: 0.02em;
  }
  .steps-grid .step-card-title { font-size: 16px; margin-bottom: 2px; display: inline; }
  .steps-grid .step-card-desc { font-size: 13.5px; line-height: 1.45; margin-top: 4px; }
  /* footer + breakdown spacing */
  footer { padding: 40px 20px 24px; }
  .footer-bottom { padding-top: 20px; margin-top: 28px; }
  .breakdown-section { margin: 24px 0; }
}

/* Cards — Apple-quality */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
/* Collapsible articles grid: show first 8 cards by default; "Read more" reveals rest */
.articles-collapsible.is-collapsed > .card:nth-child(n+9) { display: none; }
@media (max-width: 768px) {
  .articles-collapsible.is-collapsed > .card:nth-child(n+5) { display: none; }
}
/* Category heading inside grouped articles section */
.articles-cat-heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 36px 0 14px;
  color: var(--ink-2);
}
.articles-cat-heading:first-of-type { margin-top: 8px; }
.articles-toggle {
  display: block;
  margin: 12px auto 0;
  padding: 10px 18px;
  background: none;
  border: none;
  color: var(--primary-dark); /* AA contrast on alt section bg */
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: color 0.15s var(--ease);
}
@media (hover: hover) {
  .articles-toggle:hover { color: var(--primary); }
}

.articles-toggle .toggle-arrow {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s var(--ease);
}
.articles-toggle[aria-expanded="true"] .toggle-arrow { transform: rotate(180deg); }
.card {
  background: var(--bg);
  border-radius: 20px;
  padding: 28px 28px 32px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.55), 0 1px 3px rgba(4, 120, 87, 0.08);
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  border: none;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "→";
  position: absolute;
  right: 22px;
  bottom: 22px;
  font-size: 18px;
  color: var(--ink-5);
  opacity: 0;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
  font-weight: 400;
}
@media (hover: hover) {
  .card:hover {
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 4px rgba(4, 120, 87, 0.12);
  background: rgba(4, 120, 87, 0.03);
}
}

@media (hover: hover) {
  .card:hover::after {
  opacity: 1;
  color: var(--primary);
}
}

@media (hover: hover) {
  .card:hover .card-title { color: var(--primary-dark); }
}

.card .card-title {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}
.card .card-desc {
  color: var(--ink-4);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  flex-grow: 1;
  margin: 0;
  padding-right: 28px;
}

/* Affiliate panel — premium feel */
.affiliate-panel {
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px;
  margin: 36px 0;
}
.affiliate-panel h3 { font-size: 22px; margin-bottom: 6px; font-weight: 600; }
.affiliate-panel p { font-size: 15px; color: var(--ink-4); margin-bottom: 20px; }
@media (max-width: 640px) { .affiliate-panel { padding: 24px; } }

/* AdSense placeholder — see canonical rule near end of file */

/* FAQ — card-style accordion */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq details {
  background: var(--bg);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
@media (hover: hover) {
  .faq details:hover {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
}
}

.faq details[open] {
  box-shadow: 0 0 0 1.5px var(--primary), 0 4px 16px rgba(4, 120, 87, 0.08);
  background: rgba(4, 120, 87, 0.02);
}
.faq summary {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--ink-4);
  border-bottom: 2px solid var(--ink-4);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
  margin-left: 16px;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--primary);
  margin-bottom: -2px;
}
.faq details[open] summary { color: var(--primary-dark); }
.faq details p { margin-top: 14px; color: var(--ink-3); font-size: 15px; line-height: 1.6; }

/* Light footer rules removed — overridden by dark footer below */

/* State list — refined chip-style grid */
/* Flexbox layout: items wrap to fixed-fraction widths; last incomplete row
   auto-centers via justify-content. Works for 51 (50 states + DC) or any
   future count without per-row positioning rules. */
.state-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  list-style: none;
  margin: 16px 0;
  padding: 0;
}
.state-list li {
  flex: 0 0 calc((100% - 5 * 5px) / 6);
}
@media (max-width: 900px) {
  .state-list li { flex-basis: calc((100% - 3 * 5px) / 4); }
}
@media (max-width: 600px) {
  .state-list li { flex-basis: calc((100% - 2 * 5px) / 3); }
}
@media (max-width: 420px) {
  .state-list li { flex-basis: calc((100% - 5px) / 2); }
}
.state-list a {
  display: block;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (hover: hover) {
  .state-list a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
}


/* State chips in the dark section — proper dark-mode colors */
.section.dark .state-list a {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  font-weight: 500;
}
@media (hover: hover) {
  .section.dark .state-list a:hover {
  background: rgba(4, 120, 87, 0.18);
  color: #fff;
  border-color: var(--primary);
}
}



/* Article body — generous reading space */
article.container-narrow {
  padding-top: 96px;
  padding-bottom: 96px;
}
@media (max-width: 640px) {
  article.container-narrow {
    padding-top: 56px;
    padding-bottom: 72px;
  }
}
article h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 760px;
}
article .meta-line {
  font-size: 13px;
  color: var(--ink-4);
  margin-bottom: 44px;
  letter-spacing: 0.01em;
}
article p, article li {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 16px;
}
article ul, article ol { margin: 14px 0 22px 24px; }
article li { margin-bottom: 8px; }
article h2 {
  margin-top: 48px;
  margin-bottom: 14px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
article h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
}
article a {
  color: var(--primary-dark); /* AA contrast: was --primary (3.74:1, fails AA) */
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
@media (hover: hover) {
  article a:hover { color: var(--primary); }
}

article strong { color: var(--ink); font-weight: 600; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-medium);
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: -0.005em;
}
td { color: var(--ink-2); }
@media (hover: hover) {
  table tr:hover td { background: var(--bg-soft); }
}


/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 32px;
  row-gap: 8px;
  padding: 18px 20px;
  background: var(--bg-medium);
  margin: 0;
}
.trust-item {
  font-size: 13px;
  color: var(--ink-4);
  font-weight: 500;
}
.trust-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Stats row (Apple-style numbers) */
/* removed dead .stats block */
/* ---------------- Multi-step calculator ---------------- */

.progress-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 32px;
  padding: 0 4px;
}
.progress-line {
  position: absolute;
  top: 50%;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--bg-medium);
  border-radius: 2px;
  transform: translateY(-50%);
  z-index: 1;
}
.progress-line-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0;
  transition: width 0.4s var(--ease);
}
.progress-dot {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-4);
  transition: all 0.3s var(--ease);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
@media (hover: hover) {
  .progress-dot:hover { border-color: var(--primary); color: var(--primary); }
}

@media (hover: hover) {
  .progress-dot.active:hover, .progress-dot.done:hover { color: #fff; }
}

.progress-dot:disabled { cursor: not-allowed; opacity: 0.5; }
@media (hover: hover) {
  .progress-dot:disabled:hover { border-color: var(--border-strong); color: var(--ink-4); }
}

.progress-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(4, 120, 87, 0.12);
}
.progress-dot.done {
  background: var(--primary);
  border-color: var(--primary);
  color: transparent;
}
.progress-dot.done::after {
  content: '✓';
  position: absolute;
  color: #fff;
  font-size: 14px;
}

.calc-steps {
  position: relative;
  min-height: 280px;
}
.step-panel {
  display: none;
  animation: stepIn 0.45s var(--ease);
}
.step-panel.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
.step-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.step-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  color: var(--ink);
}
.step-sub {
  font-size: 15px;
  color: var(--ink-4);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Filing-status cards */
.filing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 700px) { .filing-grid { grid-template-columns: 1fr; } }
.filing-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
@media (hover: hover) {
  .filing-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px -8px rgba(4, 120, 87, 0.18);
}
}

.filing-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.12);
}
.filing-icon {
  color: var(--primary);
  margin-bottom: 4px;
}
.filing-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.filing-desc {
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.4;
}

/* State quick chips */
.state-typeahead, .state-typeahead-wrap { position: relative; }
.state-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 12px 32px -8px rgba(0, 0, 0, 0.18), 0 4px 8px -4px rgba(0, 0, 0, 0.06);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  padding: 4px 0;
}
.state-suggestions.show { display: block; }
.state-suggestion {
  padding: 12px 18px;
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  letter-spacing: -0.01em;
}
.state-suggestion:last-child { border-bottom: none; }
@media (hover: hover) {
  .state-suggestion:hover, .state-suggestion.highlighted {
  background: var(--bg-medium);
  color: var(--primary-dark);
}
}

.state-suggestion .match { font-weight: 700; color: var(--ink); }
@media (hover: hover) {
  .state-suggestion:hover .match { color: var(--primary-dark); }
}

.state-suggestion-empty {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--ink-5);
  text-align: center;
  font-style: italic;
}

.state-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.state-chip {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 980px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
}
@media (hover: hover) {
  .state-chip:hover { border-color: var(--primary); color: var(--primary); }
}

.state-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Step nav buttons */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}
.step-nav .btn { min-width: 120px; justify-content: center; }

/* Results panel — premium */
.results {
  margin-top: 32px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.results-title {
  font-size: 32px;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
}
.btn-link {
  background: transparent;
  border: none;
  color: var(--ink-4);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s;
}
@media (hover: hover) {
  .btn-link:hover { color: var(--primary); background: var(--primary-soft); }
}


.results-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
#btn-save-estimate {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.1s var(--ease);
  letter-spacing: -0.01em;
}
@media (hover: hover) {
  #btn-save-estimate:hover { background: var(--primary-dark); }
}

#btn-start-over {
  font-size: 15px;
  color: var(--ink-3);
  font-weight: 500;
}
@media (hover: hover) {
  #btn-start-over:hover { color: var(--ink); background: transparent; }
}


/* Email reminder card */
.reminder-card {
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg-soft) 100%);
  border-radius: 20px;
  padding: 36px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 768px) {
  .reminder-card { grid-template-columns: 1fr; padding: 24px 20px; gap: 16px; }
}
.reminder-text h2 { font-size: 26px; margin: 6px 0 8px; letter-spacing: -0.02em; }
.reminder-success {
  margin-top: 4px;
  padding: 12px 14px;
  background: rgba(4, 120, 87, 0.1);
  border-radius: 10px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.saved-banner {
  margin: 12px 0 -12px;
  padding: 8px 14px;
  background: var(--primary-soft);
  border-radius: 10px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  animation: fadeOut 4s ease 1.5s forwards;
}
@keyframes fadeOut { to { opacity: 0; } }

.resume-banner {
  max-width: var(--container-narrow);
  margin: 0 auto 24px;
  padding: 14px 20px;
  background: var(--bg-medium);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.resume-banner-text { color: var(--ink-3); font-size: 14px; }
.resume-banner-actions { display: flex; gap: 8px; align-items: center; }
.resume-banner .btn-primary { padding: 8px 16px; font-size: 14px; }

.result-hero {
  background: linear-gradient(135deg, var(--ink) 0%, #1a1a1c 100%);
  color: #fff;
  border-radius: var(--r-md);
  padding: 36px 32px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 100%;
  background: radial-gradient(circle at 30% 20%, rgba(4, 120, 87, 0.18) 0%, transparent 50%);
  pointer-events: none;
}
.result-hero-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
}
.result-hero-value {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.result-hero-sub {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  position: relative;
}

/* Breakdown bar */
.breakdown-section {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.breakdown-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}
.breakdown-bar {
  display: flex;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-medium);
  margin-bottom: 18px;
}
.seg {
  height: 100%;
  transition: width 0.6s var(--ease);
}
.seg-takehome { background: linear-gradient(90deg, #059669, #047857); }
.seg-fed { background: linear-gradient(90deg, #1d1d1f, #424245); }
.seg-se { background: linear-gradient(90deg, #6e6e73, #86868b); }
.seg-state { background: linear-gradient(90deg, #10b981, #047857); }
.seg-medicare { background: linear-gradient(90deg, #b91c1c, #dc2626); }

.breakdown-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px 18px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-label { font-weight: 500; min-width: 0; flex: 1; }
.legend-value { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.legend-value em { font-style: normal; color: var(--ink-5); font-weight: 500; margin-left: 4px; }

.result-detail {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.result-detail h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 14px;
  letter-spacing: -0.005em;
  text-transform: none;
}

.quarterly-section {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.quarterly-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.quarterly-sub {
  font-size: 13px;
  color: var(--ink-4);
  margin-bottom: 16px;
}

/* ---------------- Professional dark footer ---------------- */
footer {
  background: linear-gradient(180deg, #022c22 0%, #022c22 100%);
  padding: 72px 24px 36px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  border-top: none;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(4, 120, 87, 0.4) 50%, transparent 100%);
}
footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 32px;
  max-width: var(--container);
  margin: 0 auto 48px;
  justify-content: initial;
  flex-wrap: initial;
}
@media (max-width: 900px) { footer .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: span 2; } }
@media (max-width: 520px) { footer .footer-grid { grid-template-columns: 1fr; } .footer-brand { grid-column: span 1; } }
.footer-brand { padding-right: 24px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-logo-text {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.footer-logo-text .logo-accent {
  color: #ffffff;
  font-weight: 700;
  font-size: inherit;
  letter-spacing: inherit;
}
.footer-tagline {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  font-size: 13px;
  max-width: 280px;
}
.footer-col h4, .footer-col-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.18s var(--ease);
  display: inline-block;
}
@media (hover: hover) {
  .footer-col a:hover {
  color: #10b981;
}
}


footer .footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
  text-align: center;
  justify-content: initial;
}
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
  text-align: center;
}
.footer-divider {
  opacity: 0.5;
  color: rgba(255, 255, 255, 0.72);
}
footer .disclaimer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-top: 4px;
  max-width: none;
  text-align: center;
}
.footer-brand-link {
  text-decoration: none;
  display: block;
  transition: opacity 0.2s var(--ease);
}
@media (hover: hover) {
  .footer-brand-link:hover { opacity: 0.85; }
}

footer .disclaimer a { color: rgba(245, 158, 11, 0.85); }

/* ---------------- 1099 vs W-2 comparison ---------------- */
.comparison-results {
  margin-top: 32px;
}
.comparison-verdict {
  text-align: center;
  margin-bottom: 28px;
  padding: 24px;
  background: var(--bg-medium);
  border-radius: var(--r-md);
}
.verdict-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.verdict-1099 { background: var(--primary); color: #fff; }
.verdict-w2 { background: var(--ink); color: #fff; }
.verdict-tie { background: var(--ink-5); color: #fff; }
.verdict-text { font-size: 15px; color: var(--ink-3); max-width: 480px; margin: 0 auto; }

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 720px) { .comparison-grid { grid-template-columns: 1fr; } }
.cmp-col {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.cmp-col::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
}
.cmp-col.cmp-w2::before { background: var(--ink); }
.cmp-col.cmp-1099::before { background: var(--primary); }

/* State comparison tool — extra classes */
.cmp-col.cmp-winner { box-shadow: 0 0 0 2px var(--primary), 0 12px 32px -8px rgba(4, 120, 87,0.18); }
.cmp-col.cmp-winner::before { background: var(--primary); }
.cmp-eyebrow {
  font-size: 12px; color: var(--ink-5); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.cmp-state-name {
  font-size: 24px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.cmp-takehome-label { font-size: 12px; color: var(--ink-5); margin-bottom: 4px; }
.cmp-takehome {
  font-size: 36px; font-weight: 800; color: var(--primary-dark);
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1;
}
.cmp-monthly { font-size: 13px; color: var(--ink-4); margin: 6px 0 18px; }
.cmp-table { display: flex; flex-direction: column; gap: 6px; }
.cmp-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; color: var(--ink-3);
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row.total {
  font-weight: 700; color: var(--ink); padding-top: 10px;
  margin-top: 4px; border-top: 1px solid var(--border-strong); border-bottom: none;
}
.cmp-row span:last-child { font-variant-numeric: tabular-nums; }
.cmp-col-header { margin-bottom: 16px; }
.cmp-col-eyebrow {
  font-size: 12px;
  color: var(--ink-5);
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.cmp-col-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.cmp-takehome {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.cmp-takehome-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cmp-takehome-value {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.cmp-1099 .cmp-takehome-value { color: var(--primary); }
.cmp-takehome-monthly {
  font-size: 13px;
  color: var(--ink-4);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.cmp-detail { font-size: 14px; }
.cmp-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-variant-numeric: tabular-nums;
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row .label { color: var(--ink-4); }
.cmp-row .value { color: var(--ink); font-weight: 600; }
.cmp-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.cmp-row.total .label { color: var(--ink-2); font-weight: 600; }

.swing-section {
  background: var(--bg-medium);
  border-radius: var(--r-md);
  padding: 24px;
}
.swing-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.swing-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.swing-side-label {
  font-size: 12px;
  color: var(--ink-4);
  font-weight: 500;
  margin-bottom: 4px;
}
.swing-side-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.swing-1099 .swing-side-value { color: var(--primary); }
.swing-bar-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.swing-fill {
  height: 14px;
  border-radius: 4px;
  transition: width 0.6s var(--ease);
}
.swing-fill-w2 { background: linear-gradient(90deg, var(--ink), var(--ink-3)); }
.swing-fill-1099 { background: linear-gradient(90deg, var(--primary), #059669); }

/* ---------------- Affiliate cards (branded) ---------------- */
.affiliate-cards .card.affiliate-card {
  border: 1.5px solid rgba(4, 120, 87, 0.2);
  box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.affiliate-cards .card.affiliate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  background: var(--primary);
  transition: height 0.3s var(--ease);
}
@media (hover: hover) {
  .affiliate-cards .card.affiliate-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px rgba(4, 120, 87, 0.12);
  background: rgba(4, 120, 87, 0.03);
}
}

@media (hover: hover) {
  footer .disclaimer a:hover { color: #10b981; }
}

/* removed dead .brand-mark */
.brand-name, .brand-wordmark {
  font-size: 24px;
  letter-spacing: -0.025em;
  margin: 0 0 4px 0;
  line-height: 1.1;
}
.affiliate-card .card-desc {
  margin-top: 6px;
}

/* ---------------- 1099 vs W-2 comparison grid ---------------- */
.vs-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 28px;
}
.vs-row {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.vs-row.vs-header { background: var(--ink); }
.vs-row.vs-header .vs-cell { background: var(--ink); color: #fff; padding: 18px 22px; font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }
.vs-w2-head { border-right: 1px solid rgba(255,255,255,0.12); }
.vs-label {
  background: var(--bg);
  padding: 18px 22px;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
}
.vs-cell {
  background: var(--bg);
  padding: 18px 22px;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
}
@media (hover: hover) {
  .vs-row:not(.vs-header):hover .vs-cell,
.vs-row:not(.vs-header):hover .vs-label {
  background: var(--bg-soft);
}
}

@media (max-width: 720px) {
  .vs-row { grid-template-columns: 1fr; gap: 0; }
  .vs-row.vs-header { display: none; }
  .vs-label {
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12px;
  }
  .vs-cell { padding: 14px 22px; border-bottom: 1px solid var(--border); }
  .vs-cell::before {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .vs-cell:nth-child(2)::before { content: 'W-2'; }
  .vs-cell:nth-child(3)::before { content: '1099'; color: var(--ink-3); }
}

/* ---------------- Hero badge / How-it-works / Features / Deadlines ---------------- */

/* Plain text eyebrow with dot — was previously a pill button (heatmap showed
   visitors clicking on what is purely decorative copy). Now reads as label,
   not as an interactive affordance. */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: var(--ink-4);
  border: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* How-it-works steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
}
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  position: relative;
  padding: 28px 24px;
}
.step-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark); /* AA contrast on white: ~5.0:1 (was --primary, 3.74:1) */
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.step-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.018em;
  margin-bottom: 8px;
}
.step-card-desc {
  font-size: 15px;
  color: var(--ink-4);
  line-height: 1.55;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--bg);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.03);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(4, 120, 87, 0.12) 0%, rgba(4, 120, 87, 0.04) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}
.feature-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }
.feature-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.018em;
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 14px;
  color: var(--ink-4);
  line-height: 1.55;
}

/* Deadline cards */
.deadlines-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 720px) { .deadlines-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .deadlines-grid { grid-template-columns: 1fr; } }
.deadline-card {
  background: var(--bg);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease);
}
.deadline-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--primary);
}
.deadline-card.deadline-soon::before { background: var(--primary); }
.deadline-card.deadline-soon { box-shadow: 0 0 0 2px var(--primary), 0 12px 32px -8px rgba(4, 120, 87, 0.18); }
.deadline-card.deadline-today::before { background: var(--accent); }
.deadline-card.deadline-today { box-shadow: 0 0 0 2px var(--accent), 0 12px 32px -8px rgba(16, 185, 129, 0.18); }
.deadline-card.deadline-past {
  background: rgba(220, 38, 38, 0.04);
  opacity: 0.85;
}
.deadline-card.deadline-past::before { background: #dc2626; }

.deadline-q {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}
.deadline-card.deadline-past .deadline-q { color: #991b1b; }
.deadline-period {
  font-size: 11px;
  color: var(--ink-5);
  margin-top: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.deadline-date {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.022em;
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
}
.deadline-day {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 4px;
}
.deadline-status {
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 980px;
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  display: inline-block;
  border: 1px solid rgba(4, 120, 87, 0.22);
}
.deadline-card.deadline-soon .deadline-status {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.deadline-card.deadline-today .deadline-status {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.35);
}
.deadline-card.deadline-past .deadline-status {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.25);
}

/* Reduce-motion respect */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ========== Accessibility additions ========== */

/* Global focus ring for keyboard nav (was missing on buttons/pills/links). */
*:focus-visible {
  outline: 2px solid var(--primary, #047857);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip-to-main link — visually hidden (screen-reader-only) until keyboard-
 * focused. Standard clip pattern that survives any positioning context (the
 * previous `position: absolute; top: -40px` was leaking visible inside the
 * sticky header where `position: absolute` resolved to a different ancestor). */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 8px 16px;
  background: var(--primary, #047857);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  clip: auto;
  z-index: 10000;
}

/* === DriversLicenseFee calculator + cards (added 2026-05-05) === */

/* ---------- Hero refinements (sub-h1 + subtitle) ---------- */
.hero-h1-sub {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -0.02em;
  margin-top: 6px;
}
.hero-sub {
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--ink-3);
  max-width: 620px;
  margin: 0 auto 22px;
  line-height: 1.5;
}

/* ---------- Calculator card ---------- */
.calc-card {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin: 0 auto 16px;
}
.calc-title {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.022em;
  margin-bottom: 22px;
  line-height: 1.2;
}
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.calc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calc-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.calc-row-2col > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.calc-row-county { /* same vertical stack as default row */
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calc-row-county.hidden,
.calc-result.hidden,
.hidden {
  display: none !important;
}
.calc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  text-transform: none;
}
.calc-input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  line-height: 1.3;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
select.calc-input {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-4) 50%),
                    linear-gradient(135deg, var(--ink-4) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
@media (hover: hover) {
  .calc-input:hover {
  border-color: rgba(0, 0, 0, 0.28);
}
}

.calc-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18);
}
.calc-input::placeholder { color: var(--ink-5); }
.calc-help {
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.4;
  margin: 4px 0 0;
}
.calc-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.calc-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
  user-select: none;
}
@media (hover: hover) {
  .calc-radio:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
}

.calc-radio input[type="radio"] {
  margin: 0;
  accent-color: var(--primary);
}
.calc-btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 10px;
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(4, 120, 87, 0.12);
}
@media (hover: hover) {
  .calc-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 18px -6px rgba(4, 120, 87, 0.45), 0 0 0 1px rgba(4, 120, 87, 0.18);
}
}


.calc-disclaimer {
  font-size: 12.5px;
  color: var(--ink-4);
  text-align: center;
  margin: 14px auto 24px;
  max-width: 560px;
  line-height: 1.5;
}
.calc-disclaimer a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) {
  .calc-disclaimer a:hover { color: var(--primary-dark); }
}


/* ---------- Calculator result ---------- */
.calc-result {
  margin-top: 24px;
  padding: 26px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.result-header {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.result-state {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: -0.01em;
}
.result-total {
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.result-delta {
  font-size: 13px;
  color: var(--ink-4);
  font-weight: 500;
}
.result-delta.over {
  color: #b54708;
  background: rgba(234, 88, 12, 0.08);
  padding: 4px 10px;
  border-radius: 980px;
  display: inline-block;
}
.result-delta.under {
  color: var(--success);
  background: rgba(21, 128, 61, 0.08);
  padding: 4px 10px;
  border-radius: 980px;
  display: inline-block;
}

.result-breakdown { margin-bottom: 22px; }
.result-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.result-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.result-line:last-child { border-bottom: 0; }
.result-line-label {
  color: var(--ink-2);
  flex: 1;
  min-width: 0;
}
.result-line-amount {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.result-line-note {
  font-size: 12px;
  color: var(--ink-4);
  font-weight: 400;
}
.result-line-total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  font-size: 17px;
}
.result-line-total .result-line-amount { font-size: 18px; }

/* Cheapest states */
.result-cheapest { margin-bottom: 22px; }
.result-cheapest-list {
  list-style: none;
  counter-reset: cheap;
  padding: 0;
  margin: 0;
}
.result-cheapest-list li {
  counter-increment: cheap;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0 9px 32px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.result-cheapest-list li:last-child { border-bottom: 0; }
.result-cheapest-list li::before {
  content: counter(cheap);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cheapest-name { color: var(--ink-2); }
.cheapest-amount {
  font-weight: 600;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

/* CTA inside result */
.result-cta {
  background: var(--primary-soft);
  border: 1px solid rgba(4, 120, 87, 0.18);
  border-radius: var(--r-sm);
  padding: 18px;
  margin-bottom: 16px;
}
.result-cta h3,
.result-cta .result-section-title { margin-bottom: 10px; }
.result-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.result-cta-btn,
.result-cta-btn-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  line-height: 1.25;
}
.result-cta-btn {
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
}
@media (hover: hover) {
  .result-cta-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
}

.result-cta-btn-alt {
  color: var(--primary-dark);
  background: var(--bg);
  border: 1px solid var(--primary);
}
@media (hover: hover) {
  .result-cta-btn-alt:hover {
  background: var(--primary-soft);
}
}


.result-deductible {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-4);
  margin: 10px 0 6px;
  line-height: 1.5;
}
.result-source {
  font-size: 12.5px;
  color: var(--ink-4);
  margin: 6px 0 0;
}
.result-source a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) {
  .result-source a:hover { color: var(--primary-dark); }
}


/* State-comparison result grid */
.result-cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.result-cmp-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 20px;
  text-align: center;
}
.result-cmp-col .result-state { display: block; margin-bottom: 4px; }
.result-cmp-col .result-total {
  font-size: clamp(28px, 4.5vw, 36px);
  margin: 4px 0 12px;
}
.result-cmp-col .result-list { text-align: left; }
.result-cmp-delta {
  text-align: center;
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 10px 16px;
  border-radius: 980px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

/* ---------- Ad slot ----------
   Pre-AdSense-approval: hidden by default so visitors don't see empty
   "Advertisement" placeholders site-wide. The .visible class opts a slot
   in to a reserved-space block (gracefully filled by Auto Ads post-approval).
   .ad-slot-primary = below-calculator (highest-value placement, kept visible). */
.ad-slot {
  margin: 24px auto;
  min-height: 1px;
  display: none;
}
.ad-slot.visible {
  display: flex;
  padding: 28px 18px;
  background: var(--bg-medium);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm);
  text-align: center;
  color: var(--ink-5);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 100px;
  align-items: center;
  justify-content: center;
}
.ad-slot-primary {
  margin: 28px auto 36px;
  min-height: 250px;
  background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-soft) 100%);
}

/* ---------- Explainer / generic section subtitle ---------- */
.explainer { padding: 36px 0 12px; }
.explainer h2 { margin-bottom: 14px; }
.explainer ol,
.explainer ul { padding-left: 22px; margin: 12px 0; }
.explainer li { margin-bottom: 8px; line-height: 1.6; }

.section-sub {
  font-size: 16px;
  color: var(--ink-4);
  margin: -2px 0 22px;
  max-width: 640px;
  line-height: 1.5;
}

/* ---------- States grid (50 + DC) ---------- */
.state-grid-section,
.states-grid-section { padding: 32px 0; }
.state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.state-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
@media (hover: hover) {
  .state-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 22px -10px rgba(4, 120, 87, 0.28);
}
}

.state-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.state-card-meta {
  font-size: 12.5px;
  color: var(--ink-4);
  line-height: 1.4;
}

/* ---------- Article cards ---------- */
.articles-section { padding: 36px 0; }
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.article-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
@media (hover: hover) {
  .article-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
}

.article-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.card-meta {
  font-size: 12px;
  color: var(--ink-5);
  margin-top: auto;
  padding-top: 8px;
}
.article-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.article-card-desc {
  font-size: 14.5px;
  color: var(--ink-4);
  line-height: 1.5;
}

/* ---------- Affiliate panel ---------- */
.affiliate-panel-wrap { padding: 24px 0; }
.affiliate-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.affiliate-panel-header { margin-bottom: 18px; text-align: center; }
.affiliate-panel-header h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  margin-bottom: 8px;
}
.affiliate-panel-header p {
  font-size: 15px;
  color: var(--ink-4);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}
.affiliate-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.affiliate-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
@media (hover: hover) {
  .affiliate-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px -10px rgba(4, 120, 87, 0.25);
}
}

.affiliate-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.affiliate-card-desc {
  font-size: 13.5px;
  color: var(--ink-4);
  line-height: 1.45;
  flex: 1;
}
.affiliate-card-cta {
  align-self: flex-end;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 6px;
}
@media (hover: hover) {
  .affiliate-card:hover .affiliate-card-cta { color: var(--primary-dark); }
}

.affiliate-disclosure {
  font-size: 12px;
  font-style: italic;
  color: var(--ink-5);
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.5;
}

/* ---------- EV callout ---------- */
.ev-callout { padding: 24px 0; }
.ev-callout-card {
  background: var(--primary-soft);
  border: 1px solid rgba(4, 120, 87, 0.22);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-md);
  padding: 26px 28px;
}
.ev-callout-card h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.ev-callout-card p {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}
.ev-callout-card a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
@media (hover: hover) {
  .ev-callout-card a:hover { color: var(--primary-dark); }
}


/* ---------- Data tables (fee-table / data-table / state-table) ---------- */
.fee-table,
.data-table,
.state-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
}
.fee-table th,
.data-table th,
.state-table th {
  background: var(--bg-medium);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border-strong);
}
.fee-table td,
.data-table td,
.state-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  vertical-align: top;
}
.fee-table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even),
.state-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.fee-table tbody tr:last-child td,
.data-table tbody tr:last-child td,
.state-table tbody tr:last-child td { border-bottom: 0; }
@media (hover: hover) {
  .fee-table tbody tr:hover,
.data-table tbody tr:hover,
.state-table tbody tr:hover { background: var(--primary-soft); }
}


/* ---------- Article / state body prose ---------- */
.page-prose {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}
.page-prose h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 36px 0 12px;
  letter-spacing: -0.022em;
}
.page-prose h3 {
  font-size: clamp(18px, 2vw, 22px);
  margin: 24px 0 8px;
  letter-spacing: -0.018em;
}
.page-prose p { margin: 0 0 16px; }
.page-prose ul,
.page-prose ol { padding-left: 22px; margin: 0 0 16px; }
.page-prose li { margin-bottom: 6px; }
.page-prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
@media (hover: hover) {
  .page-prose a:hover { color: var(--primary-dark); }
}

.page-prose blockquote {
  margin: 18px 0;
  padding: 10px 18px;
  border-left: 4px solid var(--primary);
  color: var(--ink-3);
  font-style: italic;
  background: var(--bg-soft);
}

.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0 0 22px;
  font-weight: 400;
  letter-spacing: -0.012em;
}
.byline {
  font-size: 13px;
  color: var(--ink-4);
  font-style: italic;
  margin: 0 0 18px;
}

.tldr {
  background: var(--primary-soft);
  border: 1px solid rgba(4, 120, 87, 0.18);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  margin: 18px 0 24px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.tldr strong { color: var(--primary-dark); }
.tldr p:last-child { margin-bottom: 0; }

.sources {
  margin: 32px 0 16px;
  padding: 18px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.55;
}
.sources h2,
.sources h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.sources ul li:last-child { border-bottom: 0; }
.sources a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
@media (hover: hover) {
  .sources a:hover { color: var(--primary-dark); }
}


/* ---------- Mobile (<= 768px) ---------- */
@media (max-width: 768px) {
  .calc-card { padding: 22px 18px; }
  .calc-row-2col { grid-template-columns: 1fr; gap: 14px; }
  .calc-radio-group { flex-direction: column; align-items: stretch; }
  .calc-radio { justify-content: flex-start; }

  .result-cta-grid { grid-template-columns: 1fr; }
  .result-cmp-grid { grid-template-columns: 1fr; }

  .state-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
  .affiliate-panel { padding: 20px 18px; }
  .affiliate-panel-grid { grid-template-columns: 1fr; }

  .ev-callout-card { padding: 20px 20px; }

  .calc-result { padding: 20px 18px; }
  .result-total { font-size: 38px; }

  .fee-table,
  .data-table,
  .state-table { font-size: 13.5px; }
  .fee-table th, .fee-table td,
  .data-table th, .data-table td,
  .state-table th, .state-table td { padding: 10px 10px; }
}

@media (max-width: 480px) {
  .state-grid { grid-template-columns: 1fr; }
}

/* ---------- Search button (header) — bare icon, brand-color underline on hover ---------- */
.nav-search-btn {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 6px 4px !important;
  border-bottom: 2px solid transparent !important;
  transition: border-bottom-color 0.15s var(--ease), color 0.15s var(--ease) !important;
}
@media (hover: hover) {
  .nav-search-btn:hover {
    border-bottom-color: var(--primary) !important;
    color: var(--primary) !important;
    background: transparent !important;
  }
}

/* ---------- Pagefind search modal — blue brand styling ---------- */
.pagefind-ui {
  --pagefind-ui-scale: 1 !important;
  --pagefind-ui-primary: #10b981 !important;
  --pagefind-ui-text: #1d1d1f !important;
  --pagefind-ui-background: #ffffff !important;
  --pagefind-ui-border: rgba(0, 0, 0, 0.10) !important;
  --pagefind-ui-tag: #f5f5f7 !important;
  --pagefind-ui-border-width: 2px !important;
  --pagefind-ui-border-radius: 12px !important;
  --pagefind-ui-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
/* Always-visible blue border on the search input itself.
   Targets both the bare class + Pagefind's hashed Svelte class for specificity. */
.pagefind-ui .pagefind-ui__search-input,
.pagefind-ui__search-input.svelte-e9gkc3 {
  border: 2px solid #10b981 !important;
  border-radius: 12px !important;
  font-weight: 500 !important;
  transition: box-shadow 0.18s var(--ease) !important;
}
.pagefind-ui .pagefind-ui__search-input:focus,
.pagefind-ui__search-input.svelte-e9gkc3:focus {
  outline: none !important;
  border-color: #047857 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18) !important;
}
.pagefind-ui__search-input::placeholder {
  opacity: 0.45 !important;
  font-weight: 400 !important;
}
/* "Clear" button — proper contained pill, centered text, full border on 4 sides.
   Pagefind's default makes it stretched-tall (height 58px) with asymmetric
   padding that pushes "Clear" off-center. Override to a compact pill button. */
.pagefind-ui .pagefind-ui__search-clear,
.pagefind-ui__search-clear.svelte-e9gkc3 {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  transform: none !important;
  height: 36px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #047857 !important;
  background: #ecfdf5 !important;
  border: 1.5px solid #10b981 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: 0.01em !important;
  cursor: pointer !important;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease) !important;
}
@media (hover: hover) {
  .pagefind-ui .pagefind-ui__search-clear:hover,
.pagefind-ui__search-clear.svelte-e9gkc3:hover {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
}
}


/* ---------- Article metadata (Last updated line) ---------- */
.article-meta {
  font-size: 13px;
  color: var(--ink-4);
  font-style: italic;
  margin: 4px 0 16px;
  letter-spacing: -0.005em;
}
.article-meta time { color: inherit; }

/* ---------- Article table of contents ---------- */
.toc {
  margin: 24px 0 32px;
  padding: 18px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.toc-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  margin: 0 0 8px;
}
.toc-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.8;
}
.toc-list li { margin: 0; }
.toc-list a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
@media (hover: hover) {
  .toc-list a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
  }
}
@media (max-width: 640px) {
  .toc { padding: 14px 18px; }
  .toc-list { font-size: 14.5px; line-height: 1.7; }
}

