:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --border: #dde3ea;
  --text: #1a2230;
  --muted: #5a6577;
  --accent: #0b5cad;
  --accent-dark: #084585;
  --good: #11713a;
  --radius: 10px;
  --max: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); overflow-wrap: anywhere; }
a:hover { color: var(--accent-dark); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header: stays at the top while scrolling */
html { scroll-padding-top: 76px; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(16, 42, 74, 0.10);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
/* Brand logo: animated badge + wordmark */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark { display: block; flex: none; width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 4px 12px rgba(10, 79, 153, 0.30); }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.lw { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; }
.lw-a { color: #0b2a4a; }
.lw-b { background: linear-gradient(90deg, #0a4f99, #1a8cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lw-c { color: #7b8797; font-weight: 600; }
.lw-tag { margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #8a6200; }

/* Live animation: car drives in on load, wheels turn, road moves, tag sways, shine sweeps */
.logo-mark .lm-car { animation: lm-drive 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.logo-mark .lm-wheel { transform-box: fill-box; transform-origin: center; animation: lm-spin 1.1s linear infinite; }
.logo-mark .lm-road { animation: lm-road 0.9s linear infinite; }
.logo-mark .lm-tag { transform-box: fill-box; transform-origin: 50% 100%; animation: lm-drop 0.7s 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both, lm-sway 3.2s 1.2s ease-in-out infinite; }
.logo-mark .lm-shine { animation: lm-shine 6s 1.4s ease-in-out infinite; }
.logo:hover .lm-car { animation: lm-bounce 0.5s ease-in-out; }
.logo:hover .lm-tag { animation: lm-wiggle 0.6s ease-in-out; }
.logo:hover .lm-shine { animation: lm-shine 0.9s ease-in-out; }

@keyframes lm-drive { from { transform: translateX(-34px); } to { transform: translateX(0); } }
@keyframes lm-spin { to { transform: rotate(-360deg); } }
@keyframes lm-road { to { stroke-dashoffset: -14; } }
@keyframes lm-drop { from { transform: translateY(-16px) rotate(-12deg); opacity: 0; } to { transform: translateY(0) rotate(0); opacity: 1; } }
@keyframes lm-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes lm-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes lm-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-2px); } }
@keyframes lm-shine { 0% { transform: translateX(0) rotate(20deg); } 18%, 100% { transform: translateX(96px) rotate(20deg); } }

@media (prefers-reduced-motion: reduce) {
  .logo-mark * { animation: none !important; }
  .logo-mark .lm-shine { display: none; }
}
.nav { display: flex; gap: 2px; font-size: 15px; }
.nav a { color: var(--text); font-weight: 600; text-decoration: none; padding: 8px 10px; white-space: nowrap; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.nav a:hover { color: var(--accent); background: var(--surface); }

.site-footer { margin-top: 48px; padding: 24px 0 32px; border-top: 1px solid var(--border); background: var(--surface); font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }

/* Breadcrumbs */
.breadcrumbs { font-size: 14px; color: var(--muted); margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 4px; }
.breadcrumbs a { color: var(--muted); }

/* Typography */
h1 { font-size: 30px; line-height: 1.25; margin: 16px 0 8px; }
h2 { font-size: 23px; line-height: 1.3; margin: 36px 0 10px; }
h3 { font-size: 19px; margin: 24px 0 8px; }
.lead { font-size: 18px; color: var(--muted); margin-top: 0; }
.updated { font-size: 14px; color: var(--muted); }

/* Hero with animated illustration */
.hero {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: center;
  margin: 12px 0 0; padding: 20px; border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 60%, #eefaf3 100%);
}
.hero h1 { margin-top: 0; }
.hero .lead { margin-bottom: 8px; }
.hero .updated { margin: 0; }
.hero-art { min-width: 0; }
.hero-svg { display: block; width: 100%; height: auto; }

/* Bill of sale: the lines print one by one, the TAX PAID stamp lands, the calculator keys blink,
   the car key swings. Everything is fully visible when animation is off. */
.hero-svg .row { animation: hx-row 7s ease-out infinite; }
.hero-svg .r2 { animation-delay: 0.35s; }
.hero-svg .r3 { animation-delay: 0.7s; }
.hero-svg .r4 { animation-delay: 1.05s; }
.hero-svg .stamp { transform-box: fill-box; transform-origin: center; animation: hx-stamp 7s ease-out infinite; }
.hero-svg .press { animation: hx-press 2.4s ease-in-out infinite; }
.hero-svg .k2 { animation-delay: 1.2s; }
.hero-svg .caret { animation: hx-caret 1s steps(1) infinite; }
.hero-svg .fob { transform-origin: 322px 40px; animation: hx-sway 3.2s ease-in-out infinite; }
.hero-svg .pc { transform-box: fill-box; transform-origin: center; animation: float 3.4s ease-in-out infinite; }
.hero-svg .p2 { animation-delay: -1.7s; }
@keyframes hx-row { 0% { opacity: 0; transform: translateX(-6px); } 6%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes hx-stamp { 0%, 22% { opacity: 0; transform: scale(1.7); } 28% { opacity: 1; transform: scale(0.9); } 32%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes hx-press { 0%, 70%, 100% { opacity: 1; } 80% { opacity: 0.45; } }
@keyframes hx-caret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes hx-sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }

/* Calculator */
.calc {
  background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--accent);
  border-radius: var(--radius); padding: 20px; margin: 24px 0;
  box-shadow: 0 6px 24px rgba(11, 92, 173, 0.08);
}
.calc h2 { margin-top: 0; font-size: 21px; display: flex; align-items: center; gap: 8px; }
.calc h2::before { content: ""; width: 26px; height: 26px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='2' width='18' height='20' rx='3' fill='%230b5cad'/%3E%3Crect x='6' y='5' width='12' height='5' rx='1' fill='%23cfe6ff'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='8' cy='14' r='1.3'/%3E%3Ccircle cx='12' cy='14' r='1.3'/%3E%3Ccircle cx='16' cy='14' r='1.3'/%3E%3Ccircle cx='8' cy='18' r='1.3'/%3E%3Ccircle cx='12' cy='18' r='1.3'/%3E%3Ccircle cx='16' cy='18' r='1.3'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain; }
.field input, .field select { transition: border-color 0.15s, box-shadow 0.15s; }
.field input:hover, .field select:hover { border-color: #b8c6d6; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.field .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.field input, .field select {
  width: 100%; padding: 10px 12px; font-size: 17px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; }

.result { margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; min-height: 360px; }
.result tr.sec td { padding-top: 12px; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 0; }
.result tr.total td { font-size: 17px; }
.result tr.otd td { padding-top: 12px; font-weight: 800; font-size: 20px; color: var(--accent); border-top: 2px solid var(--accent); border-bottom: 0; }
.result td.muted { font-size: 13px; color: var(--muted); }
.result table { width: 100%; border-collapse: collapse; font-size: 16px; }
.result td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.result td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.result tr.total td { font-weight: 700; font-size: 19px; border-bottom: 0; color: var(--good); }
.result .note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* Content blocks */
.facts { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 16px; }
.facts th, .facts td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.facts th { width: 42%; color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.callout { border-left: 4px solid var(--accent); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.faq dt { font-weight: 700; margin-top: 16px; }
.faq dd { margin: 4px 0 0; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 16px; padding: 0; list-style: none; }
.state-grid a { text-decoration: none; }
.state-grid a:hover { text-decoration: underline; }
.related { padding-left: 20px; }

/* Home page: trust strip and popular states */
.trust { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.trust li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.trust strong { display: block; font-size: 18px; color: var(--accent); }
.trust span { font-size: 13px; color: var(--muted); }
.popular { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.popular a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.popular a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(11, 92, 173, 0.1); }
.popular span { font-size: 14px; }
.popular strong { font-size: 18px; color: var(--accent); }
@media (max-width: 560px) {
  .trust { grid-template-columns: repeat(2, 1fr); }
  .popular { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .popular a { transition: none; } .popular a:hover { transform: none; } }

/* State pages: formula, checklist, pager, muted notes */
.formula { background: #0b2a4a; color: #e8f2ff; border-radius: 10px; padding: 14px 16px; margin: 8px 0 16px; display: grid; gap: 6px; }
.formula code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; white-space: normal; }
.facts .muted, span.muted, p.muted { font-size: 13px; color: var(--muted); }
.res-warn { background: #fff4e0; border: 1px solid #f0b24a; color: #5a3a00; border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; font-size: 15px; }
.res-warn a { color: #8a4b00; font-weight: 700; }
.rel-guides { margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--border); }
.rel-guides .rel-tool { margin-top: 12px; }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding: 4px 0 4px 30px; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 18px; height: 18px; border-radius: 5px; background: var(--good); mask: none; }
.checklist li::after { content: ""; position: absolute; left: 8px; top: 11px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 0; }
.pager a { flex: 1; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; font-weight: 700; }
.pager a:last-child { text-align: right; }
.pager a:hover { border-color: var(--accent); background: var(--surface); }

/* Guides */
.byline { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.cover { margin: 0 0 24px; }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 12px; border: 1px solid var(--border); }
.guide-list li.has-thumb { display: flex; gap: 14px; align-items: center; }
.guide-list li.has-thumb img { flex: none; width: 160px; height: auto; aspect-ratio: 1200 / 630; border-radius: 8px; border: 1px solid var(--border); }
.guide-list li.has-thumb div { min-width: 0; }
@media (max-width: 560px) {
  .guide-list li.has-thumb { flex-direction: column; align-items: stretch; }
  .guide-list li.has-thumb img { width: 100%; }
}
.guide h1 { margin-top: 20px; }
.facts.data th { width: auto; }
.facts.data td:first-child { white-space: nowrap; }
/* Wide tables (3+ columns) turn into one card per row on phones: the first cell is the card's
   title, and every other cell shows its column heading on the left and the figure on the right. */
@media (max-width: 600px) {
  .facts.data td:first-child, .facts.data th:first-child { white-space: normal; }
  .facts td, .facts th { overflow-wrap: anywhere; }
  .facts.stack, .facts.stack tbody, .facts.stack tr, .facts.stack th, .facts.stack td { display: block; width: auto; }
  .facts.stack tr:first-child { display: none; }
  .facts.stack tr { border: 1px solid var(--border); border-radius: 10px; padding: 4px 14px; margin: 0 0 10px; }
  .facts.stack td, .facts.stack th { border-bottom: 1px solid var(--border); padding: 8px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; white-space: normal; }
  .facts.stack td:last-child { border-bottom: 0; }
  .facts.stack td::before, .facts.stack th::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 14px; text-align: left; flex: 1 1 50%; }
  .facts.stack tr > :first-child { display: block; text-align: left; font-weight: 700; font-size: 17px; color: var(--text, inherit); }
  .facts.stack tr > :first-child::before { content: none; }
  .facts.stack td::before, .facts.stack th::before { overflow-wrap: normal; word-break: normal; }
  .facts.stack-text td, .facts.stack-text th { display: block; text-align: left; }
  .facts.stack-text td::before, .facts.stack-text th::before { display: block; margin-bottom: 2px; font-size: 13px; }
}
.guide-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.guide-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; transition: border-color 0.15s, box-shadow 0.15s; }
.guide-list li:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(11, 92, 173, 0.08); }
.guide-list a { font-weight: 700; font-size: 18px; text-decoration: none; display: block; margin-bottom: 4px; }
.guide-list span { color: var(--muted); font-size: 15px; }

/* Ad slots: fixed height so pages don't jump when ads load */
.ad-slot { min-height: 280px; margin: 24px 0; text-align: center; }

.state-grid a { display: block; padding: 4px 8px; border-radius: 6px; transition: background 0.15s; }
.state-grid a:hover { background: var(--surface); text-decoration: none; }

/* Respect visitors who turn off motion */
@media (prefers-reduced-motion: reduce) {
  .hero-svg * { animation: none !important; transition: none !important; }
}

@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; padding: 16px; }
  .hero-art { width: 100%; max-width: 230px; margin: 0 auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  .row { grid-template-columns: 1fr; gap: 0; }

  /* Phones: smaller logo, no tagline */
  .logo { gap: 8px; }
  .logo-mark { width: 38px; height: 38px; border-radius: 10px; }
  .lw { font-size: 17px; }
  .lw-tag { display: none; }
}

/* Phones and tablets: logo + one big bold Menu button; the menu opens as a panel */
@media (max-width: 820px) {
  html { scroll-padding-top: 76px; }
  .site-header .wrap { flex-wrap: nowrap; min-height: 64px; position: relative; }
  .site-header .nav { display: none; }
  .site-header .mnav { display: block; }
}

/* Mobile menu (hidden on desktop): a drop-down panel under the header with a dimmed backdrop */
.mnav { display: none; }
.mnav summary {
  list-style: none; cursor: pointer; user-select: none; position: relative; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; color: #fff; background: var(--accent);
  padding: 10px 16px; min-height: 46px; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(11, 92, 173, 0.25); transition: background .2s;
}
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary:focus-visible { outline: 3px solid #8ec5ff; outline-offset: 2px; }
.mnav .bars, .mnav .bars::before, .mnav .bars::after { display: block; width: 20px; height: 3px; border-radius: 2px; background: #fff; transition: transform .25s, background .2s, top .25s; }
.mnav .bars { position: relative; }
.mnav .bars::before, .mnav .bars::after { content: ""; position: absolute; left: 0; }
.mnav .bars::before { top: -7px; }
.mnav .bars::after { top: 7px; }
.mnav .m-close { display: none; }
.mnav[open] summary { background: var(--accent-dark); }
.mnav[open] .m-open { display: none; }
.mnav[open] .m-close { display: inline; }
.mnav[open] .bars { background: transparent; }
.mnav[open] .bars::before { top: 0; transform: rotate(45deg); }
.mnav[open] .bars::after { top: 0; transform: rotate(-45deg); }
.mback { position: fixed; left: 0; right: 0; top: 64px; bottom: 0; background: rgba(10, 25, 45, 0.45); z-index: 1; animation: m-fade .2s ease-out; }
.mpanel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 2;
  background: #fff; border-radius: 0 0 18px 18px;
  box-shadow: 0 18px 40px rgba(16, 42, 74, 0.22);
  padding: 10px 14px 16px; max-height: calc(100vh - 80px); overflow-y: auto;
  animation: m-drop .22s cubic-bezier(.2, .8, .2, 1);
}
.mpanel nav { display: grid; gap: 4px; }
.mi { display: grid; grid-template-columns: 42px 1fr 12px; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--text); }
.mi::after { content: ""; width: 8px; height: 8px; border-right: 2px solid #9fb3c8; border-top: 2px solid #9fb3c8; transform: rotate(45deg); }
.mi:hover, .mi:active, .mi:focus-visible { background: var(--surface); }
.mi-ic { width: 42px; height: 42px; border-radius: 12px; background: #e8f2ff; display: grid; place-items: center; }
.mi-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mi b { display: block; font-size: 17px; line-height: 1.25; }
.mi small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.mpop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 10px 4px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.mpop a { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; background: #e8f2ff; padding: 6px 12px; border-radius: 999px; }
.msub { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 10px 0; font-size: 14px; }
.msub a { color: var(--muted); text-decoration: none; font-weight: 600; }
.msub a:hover { color: var(--accent); }
html.menu-open { overflow: hidden; }
@keyframes m-drop { from { transform: translateY(-10px); } to { transform: none; } }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mpanel, .mback { animation: none; } .mnav .bars, .mnav .bars::before, .mnav .bars::after { transition: none; } }
/* Cookie consent message (Accept all and Reject all are equally prominent) */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; max-width: 560px; margin: 0 auto;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(10, 30, 60, .2); padding: 18px 44px 18px 18px; font-size: 15px;
}
.consent p { margin: 0 0 14px; }
.consent-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-btns button {
  flex: 1 1 140px; min-height: 44px; font: inherit; font-weight: 700; cursor: pointer;
  color: #fff; background: var(--accent); border: 2px solid var(--accent); border-radius: 8px;
}
.consent-btns button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.consent-x {
  position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; font-size: 26px; line-height: 1;
  background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px;
}
.consent-x:hover { background: var(--surface); color: var(--text); }

/* ZIP lookup */
[hidden] { display: none !important; }
#c-zip { max-width: 12em; font-size: 18px; letter-spacing: .05em; }

/* Result animations: rows slide in, totals flash softly when they change */
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes total-flash { 0% { background: rgba(17, 113, 58, .16); } 100% { background: transparent; } }
@keyframes otd-flash { 0% { background: rgba(11, 92, 173, .16); } 100% { background: transparent; } }
.result.enter tr { animation: row-in .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@media (prefers-reduced-motion: reduce) {
  .result.enter tr, .result.enter .res-tiles li, .result .flash { animation: none !important; }
}
.result { overflow: hidden; }

/* Financing option */
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
label.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.result tr.pay td { font-weight: 800; font-size: 18px; color: var(--accent-dark); border-bottom: 0; padding-top: 10px; }

/* City comparison bar chart */
.citybars { margin: 16px 0 24px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.citybars figcaption { font-weight: 700; margin-bottom: 12px; }
.citybars ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.citybars li { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 10px; font-size: 15px; }
.citybars .bl { color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citybars .bl:hover { color: var(--accent); text-decoration: underline; }
.citybars .bt { display: flex; height: 16px; background: #fff; border-radius: 8px; overflow: hidden; }
.citybars .b1 { background: var(--accent); }
.citybars .b2 { background: #8ec5ff; }
.citybars .bv { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 5.5em; text-align: right; }
.citybars-key { margin: 12px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.citybars-key span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.citybars-key .k1 { background: var(--accent); }
.citybars-key .k2 { background: #8ec5ff; margin-left: 10px; }
@media (max-width: 560px) { .citybars li { grid-template-columns: 6em 1fr auto; font-size: 14px; } .citybars .bv { min-width: 4.8em; } }

/* Result: summary card, cost bar, tiles and a clean breakdown table */
.result { padding: 18px; min-height: 560px; }
.res-sum { margin-bottom: 14px; }
.res-top { background: linear-gradient(135deg, #0b5cad, #084585); color: #fff; border-radius: 12px; padding: 18px 20px; display: grid; gap: 4px; box-shadow: 0 6px 18px rgba(11, 92, 173, .22); }
.res-lbl { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.res-big { font-size: clamp(30px, 7vw, 42px); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.res-eq { font-size: 14px; opacity: .9; }
.res-bar { display: flex; height: 12px; margin: 14px 2px 6px; border-radius: 6px; overflow: hidden; background: #e6ecf3; }
.res-bar span { display: block; height: 100%; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.seg-car, .k-car { background: #9fb3c8; }
.seg-tax, .k-tax { background: var(--good); }
.seg-fee, .k-fee { background: #3b8de0; }
.res-key { display: flex; gap: 16px; margin: 0 2px 12px; font-size: 13px; color: var(--muted); }
.res-key span { display: inline-flex; align-items: center; gap: 6px; }
.res-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.res-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.res-tiles li { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; border-top: 4px solid var(--border); }
.res-tiles li.t-tax { border-top-color: var(--good); }
.res-tiles li.t-fee { border-top-color: #3b8de0; }
.res-tiles li.t-pay, .res-tiles li.t-car { border-top-color: var(--accent); }
.res-tiles span { font-size: 13px; color: var(--muted); font-weight: 600; }
.res-tiles strong { font-size: 21px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.res-tiles li.t-tax strong { color: var(--good); }
.res-tiles li.t-pay strong { color: var(--accent); }
.res-tiles em { font-style: normal; font-size: 12px; color: var(--muted); }
.res-details { border-top: 1px solid var(--border); padding-top: 6px; }
.res-details > summary { cursor: pointer; font-weight: 700; padding: 8px 0; color: var(--accent); list-style-position: inside; }
.result tr.total td, .result tr.otd td, .result tr.pay td { font-size: 16px; font-weight: 800; }
.result tr.total td { color: var(--good); border-bottom: 0; }
.result tr.otd td { color: var(--accent); border-top: 2px solid var(--accent); border-bottom: 0; padding-top: 10px; }
.result tr.pay td { color: var(--accent-dark); border-bottom: 0; }
@keyframes tile-flash { 0% { box-shadow: 0 0 0 3px rgba(17, 113, 58, .25); } 100% { box-shadow: 0 0 0 0 rgba(17, 113, 58, 0); } }
@keyframes top-flash { 0% { box-shadow: 0 0 0 4px rgba(59, 141, 224, .45), 0 6px 18px rgba(11, 92, 173, .22); } 100% { box-shadow: 0 6px 18px rgba(11, 92, 173, .22); } }
.res-tiles li.flash { animation: tile-flash 1s ease-out; }
.res-top.flash { animation: top-flash 1s ease-out; }
.result.enter .res-tiles li { animation: row-in .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@media (max-width: 560px) {
  .res-tiles { grid-template-columns: 1fr 1fr; }
  .res-tiles li:last-child { grid-column: 1 / -1; }
  .res-top { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .res-bar span { transition: none; } .res-tiles li.flash, .res-top.flash { animation: none; } }
.mpop > span { width: 100%; }
.mpop a { font-size: 13.5px; padding: 6px 11px; }

/* Very small phones (320-360px wide): compact logo and Menu button so the header fits */
@media (max-width: 360px) {
  .site-header .wrap { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .logo { gap: 6px; }
  .logo-mark { width: 32px; height: 32px; border-radius: 9px; }
  .lw { font-size: 15px; }
  .mnav summary { font-size: 15px; padding: 8px 11px; gap: 8px; min-height: 42px; }
  .mnav .bars, .mnav .bars::before, .mnav .bars::after { width: 18px; }
}
/* Tablets: the menu is a card under the Close button rather than a full-width sheet */
@media (min-width: 600px) and (max-width: 820px) {
  .mpanel { left: auto; right: 16px; width: 440px; top: calc(100% + 8px); border-radius: 16px; }
}

/* Calculator start panel (before a state and price are entered) */
.res-start { min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 12px; }
.rs-ic { width: 64px; height: 64px; border-radius: 18px; background: #e8f2ff; display: grid; place-items: center; margin-bottom: 14px; animation: rs-float 3s ease-in-out infinite; }
.rs-ic svg { width: 32px; height: 32px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rs-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: var(--text); }
.rs-sub { margin: 0 0 18px; color: var(--muted); max-width: 30em; }
.rs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rs-steps li { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; font-weight: 600; }
.rs-steps b { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; }
@keyframes rs-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .rs-ic { animation: none; } }
