/* CarRegFee — 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. */

/* ---------- z-index bands (single source of truth) ----------
 * Skip-link (always on top):       9999  (.skip-link:focus)
 * Modal / full overlay (reserved): 1500-2000
 * Sticky header:                   1000  (header)
 * Mega-dropdown / popover:         1100 (.dropdown)
 * Mobile drawer (in header ctx):   100   (.nav-links @media)
 * In-page popover (autocomplete):  50
 * Inline element stacking:         1-2
 * --------------------------------------------------------------- */

:root {
  accent-color: #0f766e;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #f0fdfa;
  /* Design upgrade 2026-05-22: secondary accent for word-painting + mono section labels */
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-soft: #ffedd5;

  --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;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);

  --success: #15803d;
  --warning: #ea580c;
  --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);
  --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: clamp(64px, 12vh, 88px);
  scrollbar-gutter: stable;
  overflow-x: clip;
  /* Brand-blue scrollbar (Firefox) */
  scrollbar-color: var(--primary) var(--bg-medium);
}
/* Brand-blue scrollbar (WebKit / Chromium / Safari) */
html::-webkit-scrollbar { width: 12px; height: 12px; }
html::-webkit-scrollbar-track { background: var(--bg-medium); }
html::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 6px;
  border: 2px solid var(--bg-medium);
}
html::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

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;
  overflow-x: clip;
}

/* 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;
  display: flex;
  align-items: center;
  gap: 24px;
}
.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(30, 64, 175, 0.18));
}
.logo-text {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(95deg, var(--primary) 0%, #2563eb 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: var(--accent); background: none; color: var(--accent); }
.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%, #2563eb 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%, #2563eb 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%, #2563eb 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;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 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 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; }

/* Mega-menu: 4-column dropdown for Calculators (12 tools, categorized) */
.dropdown.dropdown-mega { min-width: 880px; max-width: calc(100vw - 32px); padding: 24px; }
.dropdown-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 4px;
}
.dropdown-col { display: flex; flex-direction: column; gap: 2px; }
.dropdown-col .dropdown-eyebrow { padding: 0 0 6px 0; }
.dropdown-col a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
@media (hover: hover) {
  .dropdown-col a:hover { background: var(--bg-medium); }
  .dropdown-col a:hover .dd-title { color: var(--primary); }
  .dropdown-col a:hover .dd-desc { color: var(--primary); }
}
.dropdown-col .dd-title { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.dropdown-col .dd-desc { font-size: 12px; color: var(--ink-4); line-height: 1.35; }
@media (max-width: 1100px) {
  .dropdown.dropdown-mega { min-width: 640px; padding: 18px; }
  .dropdown-mega-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}
@media (max-width: 768px) {
  .dropdown.dropdown-mega { min-width: 0; padding: 12px; }
  .dropdown-mega-grid { grid-template-columns: 1fr; gap: 22px; }
}
.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: 10px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  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);
}

/* Mobile-only search button — sits in the header to the left of the hamburger.
   Hidden on desktop; the existing in-drawer .nav-search-btn handles desktop. */
.nav-search-btn-mobile { display: none; }

@media (max-width: 768px) {
  /* Show the header search button, push it + the hamburger to the right edge */
  .nav .nav-search-btn-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--ink);
    padding: 0;
    margin-left: auto;
  }
  /* Bump hamburger to 44x44 tap target and remove its auto-margin (search has it now) */
  .nav .nav-mobile-toggle { width: 44px; height: 44px; margin-left: 4px; }
  /* Hide the original in-drawer search button on mobile — header version replaces it.
     !important is necessary because the original button carries an inline style attribute
     that wins the cascade for some properties; we force display:none regardless. */
  .nav-links button.nav-search-btn:not(.nav-search-btn-mobile) { display: none !important; }

  .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(100dvh - 70px); max-height: calc(100vh - 70px); /* fallback */;
    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).
     Specificity bumped to .nav-links .nav-link (0,2,0) to beat the inline critical-CSS desktop .nav-link
     rule (0,1,0) that loads AFTER style.css in every HTML file. */
  .nav-links .nav-link {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    padding: 6px 24px 6px;
    width: 100%;
    text-transform: none;
    letter-spacing: -0.015em;
    pointer-events: auto;
  }
  /* Keep the search icon button compact — higher specificity beats the rule above */
  .nav-links .nav-search-btn.nav-link { display: inline-flex; width: auto; padding: 14px 24px; }
  .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 2px;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: auto;
  }
  .nav-item .dropdown::before { display: none; }
  /* Show ALL category titles on mobile with their amber underline (mega-menu + Popular states + Most popular) */
  .dropdown-eyebrow { display: block; }
  .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; }

  /* Thin gentle blue hairline between each mobile dropdown entry */
  .dropdown-col a,
  .dropdown-list a,
  .dropdown-grid a {
    border-bottom: 1px solid rgba(30, 64, 175, 0.10);
  }
  .dropdown-col a:last-child,
  .dropdown-list a:last-child { border-bottom: 0; }
  .dropdown-grid a:nth-last-child(-n+2) { border-bottom: 0; }
}

/* HERO — Apple-style: massive type, full bleed, generous space */
.hero {
  padding: 32px 24px 24px;
  text-align: center;
  background: var(--bg);
  position: relative;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 800;
  text-transform: uppercase;
}
.hero h1 .gradient {
  background: linear-gradient(95deg, var(--primary) 0%, #2563eb 50%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Design upgrade 2026-05-22: solid amber accent for word-painting alongside .gradient */
.hero h1 .accent {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  background: none;
}
.hero p {
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--ink-3);
  max-width: 580px;
  margin: 0 auto 20px;
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.55;
}
.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: 36px;
  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%, #2563eb 50%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(30, 64, 175, 0.25);
}
@media (hover: hover) {
  .btn-primary:hover {
  background: linear-gradient(95deg, var(--primary-dark) 0%, #1d4ed8 50%, #172554 100%);
  box-shadow: 0 6px 16px -2px rgba(30, 64, 175, 0.35);
}
}

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


@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: 0 auto 48px;
  padding: 0 24px;
  text-align: center;
}
/* When .calc-heading sits inside the blue .calc-wrap, add top breathing room */
.calc-wrap > .calc-heading {
  margin-top: 16px;
  margin-bottom: 48px;
}
/* Calculator eyebrow specifically: 2x the standard 18px size for hero prominence.
   Centering behavior inherited from the .section-eyebrow default. */
.calc-heading .section-eyebrow {
  font-size: 36px;
  margin-bottom: 20px;
}
.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: 32px 24px 64px;
  background:
    radial-gradient(ellipse 1100px 520px at 50% 0%, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0.10) 35%, transparent 70%),
    linear-gradient(180deg, rgba(30, 64, 175, 0.06) 0%, rgba(30, 64, 175, 0.10) 50%, rgba(30, 64, 175, 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(30, 64, 175, 0.04) 0%, transparent 50%);
  border-radius: var(--r-lg);
  pointer-events: none;
}
.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;
}
@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;
}

@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. */
@media (max-width: 480px) { .result-grid { grid-template-columns: 1fr; } }

/* Fieldset reset for accessible radio groups (e.g., Fuel type) — strip browser default border/padding */
.calc-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.calc-fieldset .calc-label { display: block; }

/* Print stylesheet — hide UI chrome, optimize for paper */
@media print {
  header, footer, .ad-slot, .nav-mobile-toggle, .nav-search-btn-mobile,
  .nav-links, header button, .articles-toggle, .nav-search-btn, .cookie-banner, #crf-cookie-banner, #crf-search-modal { display: none !important; }
  .articles-collapsible.is-collapsed > .card { display: block !important; }
  body { font-size: 11pt; line-height: 1.4; color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .calc-result, .fee-table, .card { break-inside: avoid; page-break-inside: avoid; }
  .section { padding: 12pt 0; }
  h1, h2, h3 { color: #000; }
}






/* Filing-status pill buttons (inline replacement for <select>) */



/* SECTIONS — full-bleed alternating */
.section {
  padding: 36px 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; text-decoration: underline; text-underline-offset: 3px; }

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

/* Design upgrade 2026-05-22: mono section labels with `// ` prefix.
   Default behavior: `// LABEL` is inline as one unit. Aligns with the
   heading below in left-aligned sections. */
.section-eyebrow {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: "// ";
  color: var(--accent);
}
/* Centered-word treatment — opt-in for hero-centered eyebrows only
   (.calc-heading on homepage + #states 'By state' eyebrow). When applied,
   the WORD centers on the page and `// ` floats off to its left via
   absolute positioning without shifting the word's optical center. */
.calc-heading .section-eyebrow,
#states .section-eyebrow {
  position: relative;
  display: inline-block;
}
.calc-heading .section-eyebrow::before,
#states .section-eyebrow::before {
  position: absolute;
  right: 100%;
  margin-right: 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) { color: var(--primary-dark); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
@media (hover: hover) {
  .section a:not(.card):not(.btn):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; }
  /* tighten card grids */
  .card-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; }
}

/* Cards — Apple-quality */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}
@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}
/* 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: none; /* Conditionally shown via :has() rules below */
  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);
}
/* Desktop: show toggle only when cluster has 9+ cards (some hidden by default) */
.articles-collapsible:has(> .card:nth-child(9)) + .articles-toggle { display: block; }
/* Mobile: show toggle when cluster has 5+ cards (mobile clamps to 4) */
@media (max-width: 768px) {
  .articles-collapsible:has(> .card:nth-child(5)) + .articles-toggle { display: block; }
}
@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: 12px;
  padding: 16px 28px 18px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.08);
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  border: 1px solid var(--primary);
  border-top: 0;
  height: 135px;
  position: relative;
  overflow: hidden;
}

/* Cards with an eyebrow tag (.card-tag) need extra vertical room so 2-line
   title + 2-line desc still fits — the 135px budget assumes no eyebrow. */
.card:has(> .card-tag) {
  height: 160px;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  /* sRGB fallback for Safari <=15.3, Firefox <=112 which ignore `in oklab` */
  background: linear-gradient(to right, var(--accent), #eed4a0 40%, #d4dbf0 60%, var(--primary));
  background: linear-gradient(in oklab to right, var(--accent), #eed4a0 40%, #d4dbf0 60%, var(--primary));
  z-index: 2;
}
.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(30, 64, 175, 0.12);
  background: rgba(30, 64, 175, 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.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .card-desc {
  color: var(--ink-4);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;  /* default for 1-line titles; card-clamp.js drops to 2 when title wraps */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}

/* Affiliate panel — premium feel */
.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 var(--primary), 0 1px 3px rgba(30, 64, 175, 0.08);
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
@media (hover: hover) {
  .faq details:hover {
  box-shadow: 0 0 0 1px var(--primary-dark), 0 4px 12px rgba(30, 64, 175, 0.12);
}
}

.faq details[open] {
  box-shadow: 0 0 0 2px var(--primary), 0 4px 16px rgba(30, 64, 175, 0.08);
  background: rgba(30, 64, 175, 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(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
  margin-left: 16px;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
  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 (All 50 states) or any
   future count without per-row positioning rules. */
.state-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  list-style: none;
  /* Brute-force all horizontal properties so ul fills container exactly.
     !important required to override whatever leftover ul-inline padding the
     mobile browser is keeping (padding-inline-start: 40px default isn't
     reliably reset by the `padding: 0` shorthand on every engine). */
  margin: 16px 0 !important;
  padding: 0 !important;
  padding-inline-start: 0 !important;
  padding-inline-end: 0 !important;
  margin-inline-start: 0 !important;
  margin-inline-end: 0 !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.state-list li {
  flex: 0 0 calc((100% - 5 * 5px) / 6);
  min-width: 0;
}
@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);
  overflow: visible;
  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;
  text-decoration: none;
}
@media (hover: hover) {
  .section.dark .state-list a:hover {
  background: rgba(30, 64, 175, 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 — sits below hero CTA buttons, transparent (no gray bar) */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 28px;
  row-gap: 8px;
  padding: 36px 20px 8px;
  background: transparent;
  margin: 0;
}
.trust-item {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.trust-item .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  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 ---------------- */

@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Filing-status cards */
@media (max-width: 700px) { .filing-grid { grid-template-columns: 1fr; } }



/* State quick chips */
/* Step nav buttons */

/* Results panel — premium */
@media (hover: hover) {
  }


@media (hover: hover) {
  #btn-save-estimate:hover { background: var(--primary-dark); }
}

@media (hover: hover) {
  #btn-start-over:hover { color: var(--ink); background: transparent; }
}


/* Email reminder card */
@keyframes fadeOut { to { opacity: 0; } }



/* Breakdown bar */
/* ---------------- Professional dark footer ---------------- */
footer {
  background: linear-gradient(180deg, #0a1438 0%, #060d24 100%);
  padding: 72px 24px 36px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  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(30, 64, 175, 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: var(--accent);
  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.78);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.18s var(--ease);
  display: inline-block;
}
@media (hover: hover) {
  .footer-col a:hover {
  color: var(--accent);
}
}


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.78);
  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.78);
  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(96, 165, 250, 0.85); }

/* ---------------- 1099 vs W-2 comparison ---------------- */

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

/* State comparison tool — extra classes */


/* ---------------- Affiliate cards (branded) ---------------- */
.affiliate-cards .card.affiliate-card {
  border: 1.5px solid rgba(30, 64, 175, 0.2);
  box-shadow: 0 0 0 1px rgba(30, 64, 175, 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(30, 64, 175, 0.12);
  background: rgba(30, 64, 175, 0.03);
}
}

@media (hover: hover) {
  footer .disclaimer a:hover { color: #3b82f6; }
}

/* removed dead .brand-mark */
.affiliate-card .card-desc {
  margin-top: 6px;
}

/* ---------------- 1099 vs W-2 comparison grid ---------------- */


@media (max-width: 720px) {
}

/* ---------------- 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;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 0;
  background: transparent;
  color: var(--primary);
  border: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-badge-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
/* Pulse animation on the first badge bullet only (live/attention signal) */
.hero-badge-item:first-child::before {
  animation: hero-badge-pulse 1.6s ease-in-out infinite;
}
@keyframes hero-badge-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(0.4); opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-badge-item:first-child::before { animation: none; }
}

/* 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 */
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

/* Deadline cards */
@media (max-width: 720px) { .deadlines-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .deadlines-grid { grid-template-columns: 1fr; } }


/* 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). */
main:focus { outline: 2px solid var(--primary); outline-offset: 4px; }
*:focus-visible {
  outline: 2px solid var(--primary, #0f766e);
  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, #0f766e);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  clip: auto;
  z-index: 9999; /* top band — see header comment */
}

/* === CarRegFee 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 {
  display: none !important;
}
.hidden {
  display: none !important;
}
/* .calc-result is aria-live="polite" — must remain in DOM for screen readers to announce.
   Specificity wins because of the dual-class selector + !important on every property
   beats the generic .hidden { display:none !important } rule above. */
.calc-result.hidden {
  display: block !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !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(30, 64, 175, 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(30, 64, 175, 0.12);
}
@media (hover: hover) {
  .calc-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 18px -6px rgba(30, 64, 175, 0.45), 0 0 0 1px rgba(30, 64, 175, 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: 12px;
  font-weight: 500;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.result-total {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: clamp(36px, 6vw, 44px);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 6px 0 6px;
  font-variant-numeric: tabular-nums;
  /* Override the earlier .result-total rule (line 711) used by other tools — */
  /* on the homepage calc this is a single big number, not a label+value flex row */
  background: transparent;
  padding: 0;
  display: block;
  text-align: center;
}
.result-amount-sub {
  color: var(--ink-3);
  font-size: 15px;
  margin-bottom: 4px;
  font-weight: 400;
}
.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;
}

/* Cheapest states */
.cheapest-name { color: var(--ink-2); }
.cheapest-amount {
  font-weight: 600;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

/* CTA inside result */
.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 ---------- */


/* ---------- States grid (50 + DC) ---------- */
/* ---------- Article cards ---------- */
/* ---------- Affiliate panel ---------- */
.affiliate-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.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(30, 64, 175, 0.25);
}
}

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



/* ---------- EV callout ---------- */
.ev-callout { padding: 24px 0; }
/* ---------- Data tables (fee-table / data-table / state-table) ---------- */
.fee-table,
.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;
}


/* ---------- 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-cmp-grid { grid-template-columns: 1fr; }

  .affiliate-panel { padding: 20px 18px; }


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

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

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

/* ---------- Pagefind search modal — blue brand styling ---------- */
.pagefind-ui {
  --pagefind-ui-scale: 1 !important;
  --pagefind-ui-primary: #3b82f6 !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 #3b82f6 !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: #0f766e !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 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: #0f766e !important;
  background: #f0fdfa !important;
  border: 1.5px solid #3b82f6 !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: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #0f766e !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; }
}


/* Pre-AdSense: hide ad-slot placeholders. Revert when AdSense approves (use Auto Ads or replace .ad-slot with <ins class='adsbygoogle'>). */
.ad-slot { display: none !important; }

/* Dark mode preference handling — keep core layout, swap background/text/accents */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --bg-soft: #161617;
    --bg-medium: #1d1d1f;
    --ink: #f5f5f7;
    --ink-2: #e5e7eb;
    --ink-3: #c1c1c1;
    --ink-4: #9a9a9a;
    --border: rgba(255, 255, 255, 0.10);
  }
  body { background: var(--bg); color: var(--ink-2); }
  header { background: rgba(10, 10, 11, 0.96); border-bottom-color: var(--border); }
  .card { background: var(--bg-soft); border-color: rgba(96, 165, 250, 0.25); }
  .faq-item, .state-card, .state-typeahead-input, .state-suggestions { background: var(--bg-soft); border-color: var(--ink-4); color: var(--ink-2); }
  .state-suggestion:hover, .state-suggestion.highlighted { background: var(--bg-medium); }
  .section.alt { background: var(--bg-medium); }
  .calc-card, .calc-result, .result-hero { background: var(--bg-soft); }
  .faq details { background: var(--bg-soft); }
}


/* Section-link underline must NOT apply to state-list chips (selector hoisted out of :not() for Safari 14-15.3 compat) */
.section .state-list a { border-bottom: 0; }

/* ==========================================================
 * Re-added 2026-05-23 — these classes are used in JS-generated
 * calc result templates (state-comparison, out-of-state, cost-of-ownership)
 * and were incorrectly deleted in the dead-CSS sweep.
 * ========================================================== */
.result-line {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px;
  padding: 10px 4px; font-size: 14px; color: var(--ink-2);
}
.result-line:not(:last-child) { border-bottom: 1px solid var(--border); }
.result-list { list-style: none; margin: 8px 0 0; padding: 0; padding-inline-start: 0; }

/* .faq-item — used outside .faq parent in 14 tool files */
.faq-item {
  background: #fff; border-radius: 14px; padding: 18px 22px;
  margin: 12px 0; box-shadow: 0 0 0 1px var(--primary), 0 1px 3px rgba(30,64,175,0.06);
  transition: box-shadow 0.2s ease;
}
.faq-item[open] { box-shadow: 0 0 0 2px var(--primary), 0 4px 12px rgba(30,64,175,0.10); background: rgba(30,64,175,0.02); }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 16px; color: var(--ink); padding-right: 24px; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 0; top: 8px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); top: 12px; }
.faq-item p { margin: 12px 0 0; color: var(--ink-3); font-size: 15px; line-height: 1.55; }

/* .state-grid + .state-card — used by ev-surcharge-tracker JS */
.state-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; margin: 20px 0; padding: 0;
}
.state-card {
  display: block; padding: 12px 14px; background: #fff;
  border-radius: 10px; border: 1px solid var(--border);
  text-decoration: none; color: var(--ink-2); transition: border-color 0.15s, box-shadow 0.15s;
}
.state-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(30,64,175,0.08); }
.state-card-name { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.state-card-meta { display: block; font-size: 12px; color: var(--ink-4); margin-top: 2px; }

/* .state-typeahead-wrap — used on 8 tool pages + homepage */
.state-typeahead-wrap { position: relative; }
.state-typeahead-input {
  width: 100%; padding: 10px 14px; font-size: 15px;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 8px;
  color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.state-typeahead-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,0.18); }
.state-suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: #fff; border-radius: 8px; margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10); max-height: 280px; overflow-y: auto;
  display: none;
}
.state-suggestions.show { display: block; }
.state-suggestion {
  padding: 10px 14px; cursor: pointer; font-size: 14px; color: var(--ink-2);
}
.state-suggestion:hover, .state-suggestion.highlighted { background: var(--primary-soft); color: var(--primary-dark); }
.state-suggestion-empty { padding: 12px 14px; color: var(--ink-4); font-size: 13px; font-style: italic; }
.state-suggestion .match { font-weight: 600; color: var(--primary); }

/* Mobile drawer + dropdown in dark mode: override hardcoded #ffffff background */
@media (prefers-color-scheme: dark) {
  .dropdown { background: var(--bg-soft); color: var(--ink-2); }
  .nav-links { background: var(--bg-soft); }
  .calc-input { border-color: var(--ink-4); }
  .card { background: var(--bg-soft); }
}


/* Override .section a underline rule for state-list chips regardless of section type */
.section ul.state-list a, .section.dark ul.state-list a { border-bottom: 0 !important; }
