/* =========================================================
   US Vehicle Tax Calculator — main stylesheet
   Minimal: white page, near-black type, one blue accent.
   ========================================================= */

:root {
  --ink: #0a0a0a;
  --ink-soft: #5f6368;
  --ink-faint: #9aa0a6;
  --paper: #ffffff;
  --surface: #ffffff;
  --subtle: #f7f7f8;
  --line: #ebebed;
  --line-strong: #d9d9de;
  --accent: #2554e8;
  --accent-soft: #eef2fe;
  --ok: #137a43;
  --ok-bg: #e8f5ee;
  --warn: #8a5a00;
  --warn-bg: #fff7e6;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font); line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.center { text-align: center; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(1.8) blur(12px);
  -webkit-backdrop-filter: saturate(1.8) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 700 1.1rem var(--font); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: auto; height: 38px; }
.brand-footer img { height: 32px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: var(--subtle); text-decoration: none; }
.nav-toggle { display: none; }
.jump select { min-width: 180px; padding: 8px 34px 8px 12px; font-size: .9rem; }

@media (max-width: 860px) {
  .jump { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 .95rem var(--font); cursor: pointer;
  }
  .nav ul { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; padding: 8px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav-open .nav ul { display: flex; }
}

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2b2b2b; color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-block { width: 100%; }

input, select {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 500 1rem var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f6368' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
input:hover, select:hover { border-color: var(--ink-faint); }
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="search"] { border-radius: 999px; padding-left: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 500; font-size: .85rem; color: var(--ink-soft); }
.field small { color: var(--ink-faint); font-size: .78rem; line-height: 1.4; }

/* ---------- state code tag ---------- */
.plate {
  display: inline-grid; place-items: center; min-width: 44px; height: 30px; padding: 0 8px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--subtle);
  color: var(--ink); font: 600 .8rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em;
}
.plate-lg { min-width: 72px; height: 72px; font-size: 1.4rem; border-radius: 18px; }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 19ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 24px;
  border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--ink-soft);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.lede { font-size: 1.125rem; line-height: 1.6; color: var(--ink-soft); max-width: 60ch; }
.hero .lede { margin: 8px auto 28px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 6vw, 64px); margin: 56px 0 0; padding: 0; }
.hero-facts li { display: grid; gap: 2px; }
.hero-facts strong { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; }
.hero-facts span { font-size: .85rem; color: var(--ink-soft); }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--subtle); }
.section-head { margin-bottom: 28px; }
.section-head h2 { margin-bottom: .3em; }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.field-filter { width: min(300px, 100%); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font: 600 .9rem var(--font); margin-bottom: 14px; }
.step h3 { margin-bottom: .35em; }
.step p { color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- state grid ---------- */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.state-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto 1fr; column-gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.state-card:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px rgba(10, 10, 10, .06); text-decoration: none; color: var(--ink); }
.state-card:hover .plate { background: var(--ink); color: #fff; border-color: var(--ink); }
.state-card .plate { grid-row: span 2; transition: background-color .15s ease, color .15s ease; }
.state-card-name { font-weight: 600; font-size: .95rem; }
.state-card-rate { font-size: .82rem; color: var(--ink-soft); }
.state-card-text { grid-column: 1 / -1; margin-top: 12px; font-size: .86rem; line-height: 1.5; color: var(--ink-soft); }
.state-card-cta { grid-column: 1 / -1; align-self: end; margin-top: 10px; font-size: .85rem; font-weight: 600; color: var(--accent); }
.state-card:hover .state-card-cta { text-decoration: underline; text-underline-offset: 3px; }
.state-card[hidden] { display: none; }

/* ---------- calculator ---------- */
.calc-shell { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3.5vw, 36px); box-shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 12px 40px rgba(10, 10, 10, .05); }
.card .calc-shell { box-shadow: none; padding: 0; border: 0; border-radius: 0; }
.field-state { max-width: 340px; margin-bottom: 24px; }
.calc-empty { margin: 0; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 4px; font-size: .92rem; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
.calc-result { margin-top: 24px; }
.total {
  display: grid; gap: 4px; padding: 22px 24px; border-radius: var(--radius); margin-bottom: 8px;
  background: var(--ink); color: #fff;
}
.total span { font-size: .78rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #a3a3a3; }
.total strong { font: 700 clamp(2.1rem, 5vw, 2.8rem)/1.1 var(--font); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.total em { font-style: normal; font-size: .9rem; color: #d4d4d4; }
.breakdown { width: 100%; border-collapse: collapse; }
.breakdown th, .breakdown td { padding: 11px 2px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.breakdown td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.breakdown th { font-weight: 400; }
.breakdown th small { display: block; color: var(--ink-faint); font-size: .8rem; }
.breakdown .group th { padding-top: 20px; font: 600 .72rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.calc-notes { margin: 16px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: .9rem; }
.calc-notes li { margin-bottom: 4px; }
.calc-foot { margin: 14px 0 0; font-size: .8rem; color: var(--ink-faint); }
.calc-link { margin: 18px 0 0; font-weight: 600; }

/* ---------- state page ---------- */
.crumbs { padding-top: 24px; font-size: .85rem; color: var(--ink-faint); }
.crumbs a { color: var(--ink-soft); }
.crumbs span { margin: 0 2px; }
.state-hero { padding: 28px 0 36px; }
.state-hero-inner { display: flex; gap: 24px; align-items: center; }
.state-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: .3em; }
.h1-sub { display: block; font-size: .42em; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-soft); margin-top: .45em; }
.state-hero .lede { font-size: 1rem; margin-bottom: .6em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .85rem; color: var(--ink-faint); margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 500; font-size: .78rem; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 600px) { .state-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; } .plate-lg { width: 56px; min-width: 56px; height: 56px; font-size: 1.1rem; border-radius: 14px; } }

.state-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 32px; padding-bottom: 64px; }
.state-main { display: grid; gap: 20px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3.5vw, 36px); }
.card > h2 { margin-bottom: .8em; }
.card-sticky { position: sticky; top: 88px; }
.h-small { font-size: 1rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li { position: relative; padding-left: 26px; margin-bottom: 10px; font-size: .92rem; color: var(--ink-soft); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
@media (max-width: 960px) { .state-layout { grid-template-columns: 1fr; } .card-sticky { position: static; } }

.formula { margin: 0; padding-left: 22px; }
.formula li { margin-bottom: 8px; padding-left: 4px; }
.formula li::marker { font-weight: 600; color: var(--ink-faint); }

.table-wrap { overflow-x: auto; }
.facts { width: 100%; border-collapse: collapse; font-size: .95rem; }
.facts th, .facts td { padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 40%; font-weight: 500; color: var(--ink-soft); }
.facts td { font-variant-numeric: tabular-nums; }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { padding: 2px 0; }
.kv .kv { padding-left: 14px; border-left: 1px solid var(--line-strong); margin: 4px 0; }
.kv-k { color: var(--ink-soft); }
.kv-k::after { content: ":"; }
details.more summary { cursor: pointer; font-weight: 500; color: var(--accent); }
details.more[open] summary { margin-bottom: 8px; }

.sources { padding-left: 18px; word-break: break-word; font-size: .92rem; }
.sources li { margin-bottom: 4px; }
.callout { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; font-size: .92rem; }
.callout-warn { background: var(--warn-bg); color: #5c3d00; border: 1px solid #f5e1b5; }

.prev-next { display: flex; justify-content: space-between; gap: 12px; font-weight: 500; }
.prev-next a { color: var(--ink); padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; }
.prev-next a:hover { border-color: var(--ink); text-decoration: none; }
.state-links { display: flex; flex-wrap: wrap; gap: 8px; }
.state-links a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: .85rem; }
.state-links a:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }

/* ---------- ad units ---------- */
.ad-slot { margin: 28px auto; min-height: 100px; text-align: center; }
.ad-slot::before { content: "Advertisement"; display: block; margin-bottom: 6px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.state-main > .ad-slot { margin: 0; }
.state-aside .ad-slot { margin-top: 20px; }

/* ---------- state guides ---------- */
.guide p { max-width: 70ch; }
.guide-lede { font-size: 1.1rem; color: var(--ink); }
.guide h3 { margin-top: .4em; }
.steps-list { padding-left: 22px; margin: 0 0 20px; }
.steps-list li { margin-bottom: 8px; padding-left: 4px; }
.steps-list li::marker { font-weight: 600; color: var(--ink-faint); }
.breakdown .grand th, .breakdown .grand td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 700; padding-top: 14px; }
.exc { padding: 18px 0; border-bottom: 1px solid var(--line); }
.exc:first-child { padding-top: 0; }
.exc:last-child { border-bottom: 0; padding-bottom: 0; }
.exc h3 { margin-bottom: 4px; }
.exc p { margin: 0; color: var(--ink-soft); }
.card[hidden] { display: none; }

/* ---------- FAQ & prose ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::after {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: no-repeat center/10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 1v8M1 5h8' stroke='%230a0a0a' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); max-width: 72ch; }
.section .faq h2, .section-alt .faq h2 { margin-bottom: .8em; }
.wrap.faq { max-width: 780px; }

.prose { max-width: 720px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: 80px; }
.prose h2 { margin-top: 1.8em; font-size: 1.3rem; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.contact-card { background: var(--subtle); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 28px 0; }
.contact-card h2 { margin-top: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 56px 0 24px; font-size: .92rem; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.brand-footer { color: var(--ink); margin-bottom: 12px; }
.brand-footer:hover { color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: 40px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-h { font: 600 .78rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-faint); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .state-card, .faq summary::after { transition: none; }
}
@media print {
  .site-header, .site-footer, .state-aside, .ad-slot { display: none; }
  .card { border: 0; padding: 0; }
}

/* ---------- homepage guide ---------- */
.home-guide { max-width: 780px; }
.home-guide > section { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.home-guide > section:first-child { padding-top: 0; }
.home-guide > section:last-child { border-bottom: 0; padding-bottom: 0; }
.home-guide h2 { font-size: clamp(1.3rem, 2.2vw, 1.55rem); margin-bottom: .6em; }
.home-guide h2 + p { font-size: 1.06rem; color: var(--ink); }
.home-guide p, .home-guide li { color: var(--ink-soft); }
.home-guide ul { padding-left: 20px; margin: 0 0 1em; }
.home-guide li { margin-bottom: 8px; }
.home-guide li strong { color: var(--ink); }
.home-guide .compare { margin: 4px 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.home-guide .compare th, .home-guide .compare td { padding: 12px 14px; }
.home-guide .compare thead th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); background: var(--subtle); }
.home-guide .compare th { width: auto; }
.home-guide .compare tbody th { color: var(--ink); }
.home-guide .compare tr:last-child th, .home-guide .compare tr:last-child td { border-bottom: 0; }
.home-guide .btn { margin-top: 4px; }

/* ---------- homepage rates table, glossary, proof ---------- */
.rates-table { font-size: .92rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.rates-table th, .rates-table td { padding: 11px 14px; width: auto; }
.rates-table thead th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); background: var(--subtle); position: sticky; top: 0; }
.rates-table tbody th { white-space: nowrap; color: var(--ink); font-weight: 500; }
.rates-table td:nth-child(3) { white-space: nowrap; font-weight: 600; color: var(--ink); }
.rates-table tr:last-child th, .rates-table tr:last-child td { border-bottom: 0; }
.glossary { margin: 8px 0 0; }
.glossary dt { font-weight: 600; color: var(--ink); margin-top: 18px; }
.glossary dd { margin: 4px 0 0; color: var(--ink-soft); }
.proof { list-style: none; padding: 0; }
.proof li { padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); position: relative; }
.proof li:last-child { border-bottom: 0; }
.proof li::before { content: ""; position: absolute; left: 0; top: 17px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok-bg); box-shadow: inset 0 0 0 4px var(--ok); }
@media (max-width: 640px) { .rates-table td:nth-child(2) { min-width: 200px; } }
.rates-table .badge { white-space: nowrap; }
