/* Vehicle Tax Calculators — navy + lime system inspired by the reviewed reference */

:root {
  --navy: #022345;
  --navy-700: #033057;
  --navy-900: #011a34;
  --ink: #1c2733;
  --muted: #5c6b7a;
  --line: #dbe6ec;
  --line-strong: #c3d4de;
  --paper: #ffffff;
  --shell: #f4f8f9;
  --shell-2: #eaf3f6;
  --wash: #eaf5fb;
  --lime: #d0ff4b;
  --lime-deep: #bde93d;
  --sky: #a4dff5;
  --blue: #0878a4;
  --green: #1f7a4d;
  --danger: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(2, 35, 69, 0.10);
  --shadow-sm: 0 6px 20px rgba(2, 35, 69, 0.07);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Lato", -apple-system, "Segoe UI", Arial, sans-serif;
  --ui: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.22;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(34px, 4.2vw, 50px);
  line-height: 1.14;
}

h2 {
  font-size: clamp(26px, 2.8vw, 34px);
}

h3 {
  font-size: 21px;
}

p {
  margin: 0 0 18px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  display: block;
}

ul,
ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 820px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--lime);
  color: var(--navy);
  padding: 10px 16px;
  z-index: 100;
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  color: var(--navy);
  font-family: var(--ui);
}

.brand-text strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.main-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.main-nav a {
  color: var(--navy);
  font-family: var(--ui);
  font-size: 14.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--shell);
  text-decoration: none;
}

.header-state {
  display: flex;
  gap: 6px;
  align-items: center;
}

.header-state select {
  font-family: var(--ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  max-width: 150px;
}

.header-state button {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  background: var(--lime);
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ui);
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: var(--lime);
  color: var(--navy);
  border: 1px solid var(--lime-deep);
  padding: 14px 22px;
  font-size: 16px;
  box-shadow: 0 6px 0 rgba(2, 35, 69, 0.14);
}

.btn-primary:hover {
  background: var(--lime-deep);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-secondary {
  background: var(--paper);
  color: var(--navy);
  border: 1px solid var(--line-strong);
  padding: 11px 18px;
  font-size: 14.5px;
}

.btn-secondary:hover {
  background: var(--shell);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(164, 223, 245, 0.55), transparent 70%),
    linear-gradient(180deg, #f7fbfc 0%, var(--shell) 100%);
  border-bottom: 1px solid var(--line);
  padding: 58px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: start;
}

.eyebrow {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 12px;
}

.hero-copy h1 {
  max-width: 660px;
  margin-bottom: 18px;
}

.hero-lead {
  font-size: 19px;
  color: #34495c;
  max-width: 620px;
  margin-bottom: 20px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.hero-points li {
  position: relative;
  padding-left: 28px;
  margin: 0;
  font-size: 15.5px;
  color: #34495c;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lime);
  border: 1px solid var(--lime-deep);
}

.hero-points li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 11px;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(-45deg);
}

/* ---------- Calculator card ---------- */

.calc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.calc-card-large {
  padding: 28px;
}

.calc-head h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.calc-head p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 18px;
}

.calc-rules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: -6px 0 18px;
  font-family: var(--ui);
  font-size: 12px;
  color: var(--muted);
}

.calc-rules strong {
  color: var(--navy);
  font-weight: 600;
}

.rule-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--shell);
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 500;
}

.calc-group {
  display: grid;
  gap: 12px;
}

.group-title {
  margin: 2px 0 0;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.calc-group + .calc-group {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.calc-step {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  gap: 13px;
}

.calc-group.calc-step + .calc-step {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.step-no {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  background: var(--navy);
  border-radius: 50%;
  color: var(--paper);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
}

.step-head .group-title {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
}

.group-sub {
  margin: 2px 0 0;
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--muted);
}

.checks {
  display: grid;
  gap: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ui);
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}

.calc-form .check input {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.check strong {
  color: var(--navy);
}

/* Accordion calculator sections */
.acc-stack {
  display: grid;
  gap: 14px;
}

.acc {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--ui);
}

.acc-head:hover {
  background: var(--shell);
}

.acc-head-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.acc-badge {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
}

.acc-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.acc-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.acc-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
}

.acc-chevron {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.acc-open .acc-chevron {
  transform: rotate(180deg);
}

.acc-body {
  border-top: 1px solid var(--line);
}

.acc-body[hidden] {
  display: none;
}

.acc-inner {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.county-select {
  margin-top: 8px;
}

.flags-box {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--shell);
}

.finance-fields {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.finance-fields[hidden] {
  display: none;
}

/* Reference-style fee breakdown */
.ref-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.ref-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--shell);
}

.ref-title {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

.ref-sub {
  margin: 2px 0 0;
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--muted);
}

.ref-badge {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8f7ee;
  color: #1c7c48;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ref-context {
  margin: 16px 20px 2px;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.ref-rule {
  margin: 0 20px 10px;
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--muted);
}

.ref-section {
  padding: 12px 20px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--shell);
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.ref-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--ui);
  font-size: 13.5px;
  color: var(--ink);
}

.ref-row strong {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ref-total {
  border-top: 2px solid var(--navy);
  background: var(--shell);
  font-weight: 700;
  font-size: 15px;
}

.ref-total strong {
  font-size: 18px;
}

.ref-otd {
  background: #eef7fb;
  font-weight: 700;
}

.ref-otd strong {
  font-size: 16px;
}

.ref-warn {
  display: grid;
  gap: 5px;
  margin: 16px 20px 0;
  padding-left: 18px;
  font-family: var(--ui);
  font-size: 12px;
  color: var(--muted);
}

.ref-note {
  margin: 14px 20px 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--shell);
  font-family: var(--ui);
  font-size: 12px;
  color: var(--muted);
}

.calc-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.field[hidden] {
  display: none;
}

.field label {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.label-note {
  color: var(--muted);
  font-weight: 500;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-row.one {
  grid-template-columns: 1fr;
}

.calc-form select,
.calc-form input {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: #fbfdfe;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  min-height: 48px;
}

.calc-form input:focus,
.calc-form select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 120, 164, 0.14);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > span {
  position: absolute;
  left: 13px;
  color: var(--muted);
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}

.input-wrap > span:last-child {
  left: auto;
  right: 13px;
}

.input-wrap input {
  padding-left: 29px;
}

.input-wrap input:last-child {
  padding-right: 40px;
}

.field-help {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.calc-form .btn-primary {
  margin-top: 4px;
  width: 100%;
}

.micro {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.advanced {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.advanced summary {
  cursor: pointer;
  font-family: var(--ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
  list-style: none;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary::after {
  content: " +";
  font-weight: 700;
}

.advanced[open] summary::after {
  content: " −";
}

.advanced .field-row {
  margin-top: 12px;
}

/* ---------- Results ---------- */

.calc-results {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.result-head {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}

.result-head > span:first-child {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.result-head strong {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
  color: var(--navy);
}

.result-sub {
  font-size: 13px;
  color: var(--muted);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.result-table th,
.result-table td {
  padding: 8px 0;
  border-bottom: 1px solid #edf2f5;
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}

.result-table td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding-left: 12px;
}

.result-table th {
  color: #34495c;
}

.result-table .subtotal th,
.result-table .subtotal td {
  color: var(--muted);
  font-size: 13px;
  background: #fafcfd;
  font-weight: 600;
}

.result-table .credit td {
  color: var(--green);
}

.result-table .grand th,
.result-table .grand td {
  border-bottom: 0;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  padding: 11px 10px;
}

.result-table .grand th {
  border-radius: 8px 0 0 8px;
}

.result-table .grand td {
  border-radius: 0 8px 8px 0;
  color: var(--lime);
}

.row-note {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.row-rate {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--shell-2);
  color: var(--blue);
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}

.result-annual {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfe;
  overflow: hidden;
}

.annual-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--shell);
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
}

.annual-head span:last-child {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.result-annual .result-table th,
.result-annual .result-table td {
  padding-left: 12px;
  padding-right: 12px;
}

.result-annual .result-table tr:last-child th,
.result-annual .result-table tr:last-child td {
  border-bottom: 0;
}

.annual-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.annual-total strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.result-notes {
  margin: 12px 0 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 12.5px;
}

.result-notes li + li {
  margin-top: 4px;
}

.result-monthly {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--wash);
  border-radius: var(--radius-sm);
}

.result-monthly > span:first-child {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.result-monthly strong {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--navy);
}

.result-monthly .row-note {
  grid-column: 1 / -1;
}

.result-note {
  margin: 14px 0 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.result-link {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
}

.vtc-wp-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 15px;
  padding: 11px 0;
  border-bottom: 1px solid #e4f1f5;
  color: #022345;
  font: inherit;
}

.vtc-wp-share-social {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}

.vtc-wp-share-label {
  font-weight: 700;
  font-size: 0.77rem;
  color: #64748b;
  margin-right: 2px;
}

.vtc-wp-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #d8e6ee;
  color: #022345;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

.vtc-wp-share-icon:hover,
.vtc-wp-share-icon:focus-visible {
  background: #e4f1f5;
  border-color: #a3c8d9;
  color: #03668b;
}

.vtc-wp-share-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.vtc-wp-share-pdf {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  background: #022345;
  color: #fff;
  border: 1px solid #022345;
  border-radius: 7px;
  padding: 9px 12px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
}

.vtc-wp-share-pdf:hover,
.vtc-wp-share-pdf:focus-visible {
  background: #033e6c;
}

.vtc-wp-share-status {
  width: 100%;
  font-size: 0.74rem;
  line-height: 1.35;
  color: #03668b;
}

.vtc-wp-share-status:empty {
  display: none;
}

@media (max-width: 480px) {
  .vtc-wp-share {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .vtc-wp-share-social {
    gap: 6px;
    flex-wrap: nowrap;
  }
  .vtc-wp-share-pdf {
    width: auto;
    margin-left: auto;
  }
}

.field input:disabled {
  background: var(--shell);
  color: var(--muted);
  cursor: not-allowed;
}

.result-error {
  margin: 0;
  padding: 12px 14px;
  background: #fef3f2;
  border: 1px solid #f5c6c0;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 14.5px;
}

/* ---------- Trust row ---------- */

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.stat {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  display: block;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 3px;
}

.stat strong {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--navy);
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
}

.section-tint {
  background: var(--shell);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-tight {
  padding-top: 40px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head p:last-child {
  color: #40566a;
}

.section-head-split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-head-split > div:first-child {
  max-width: 680px;
}

.state-search {
  max-width: 560px;
  margin-top: 26px;
}

.state-search input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.state-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 120, 164, 0.14);
}

.state-count {
  margin: 12px 0 20px;
  font-family: var(--ui);
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- State directory ---------- */

.state-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.state-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.state-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--sky);
  box-shadow: var(--shadow-sm);
}

.state-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.state-flag {
  width: 42px;
  height: 28px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.state-card-rate {
  font-family: var(--ui);
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  text-align: right;
}

.state-card-title {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.35;
  color: var(--navy);
}

.state-card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.state-card-btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 7px 11px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.12s ease, color 0.12s ease;
}

.state-card:hover .state-card-btn {
  background: var(--blue);
  color: var(--paper);
}

.state-empty {
  margin-top: 18px;
  color: var(--muted);
}

/* ---------- Info cards ---------- */

.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sky);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-size: 22px;
}

.info-card p {
  color: #40566a;
  font-size: 16px;
}

.info-card a {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
}

.info-icon {
  display: inline-block;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--wash);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 12px;
}

/* ---------- Source list ---------- */

.source-list {
  margin: 0 0 22px;
  padding-left: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 26px;
  font-size: 0.94rem;
}

.source-list li {
  margin: 0;
}

/* ---------- Steps / callout ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 22px 0 26px;
  display: grid;
  gap: 14px;
}

.steps li {
  position: relative;
  padding-left: 48px;
  margin: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--lime);
  border-radius: 50%;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
}

.callout {
  background: var(--wash);
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  padding: 20px 22px;
}

.callout h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.split-grid h3 {
  font-size: 23px;
}

.split-grid p {
  color: #40566a;
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 46px 16px 18px;
  position: relative;
  font-family: var(--ui);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--navy);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 18px 16px;
  border-top: 1px solid #eef3f6;
}

.faq-answer p {
  margin: 12px 0 0;
  color: #40566a;
  font-size: 16px;
}

/* ---------- CTA ---------- */

.cta-section {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #dbe8f1;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 6px;
}

.cta-section p {
  margin: 0;
  color: #c6d9e6;
}

.cta-section .btn-primary {
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: center;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  padding-top: 18px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--ui);
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs li {
  margin: 0;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--blue);
}

/* ---------- State page ---------- */

.state-hero {
  padding: 26px 0 30px;
  background: linear-gradient(180deg, #f7fbfc, var(--shell));
  border-bottom: 1px solid var(--line);
}

.state-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.state-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.state-hero-flag {
  flex-shrink: 0;
  width: 66px;
  height: 44px;
  margin-top: 4px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(2, 35, 69, 0.08);
}

.state-hero h1 {
  font-size: clamp(30px, 3.4vw, 42px);
  max-width: 780px;
}

.state-lead {
  max-width: 760px;
  color: #40566a;
  margin: 0;
}

.state-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  white-space: nowrap;
}

.chip strong {
  font-weight: 700;
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.75fr);
  gap: 32px;
  align-items: start;
}

.calc-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.calc-side {
  display: grid;
  gap: 16px;
}

.sticky {
  position: sticky;
  top: 86px;
}

.side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.side-card h2 {
  font-size: 21px;
  margin-bottom: 12px;
}

.side-list {
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
}

.side-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef3f6;
}

.side-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.side-list dt {
  color: var(--muted);
  font-size: 13.5px;
}

.side-list dd {
  margin: 0;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
}

.side-jump {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.side-jump label {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.side-jump select {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fbfdfe;
}

.side-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.side-cta {
  background: var(--wash);
  border-color: #cfe8f4;
}

.side-cta p {
  margin: 0;
  font-size: 14.5px;
  color: #34495c;
}

.content-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  min-width: 0;
}

.content-card h2 {
  font-size: 29px;
}

.content-card h3 {
  margin-top: 24px;
}

.content-card p {
  color: #34495c;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.example {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fbfdfe;
}

.example h3 {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  margin: 0 0 10px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mini-table th,
.mini-table td {
  padding: 5px 0;
  text-align: left;
  font-weight: 400;
  border-bottom: 1px solid #edf2f5;
}

.mini-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mini-table .total th,
.mini-table .total td {
  border-bottom: 0;
  font-weight: 700;
  color: var(--navy);
  padding-top: 9px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0 6px;
}

.stat-block {
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.stat-block span {
  display: block;
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 3px;
}

.stat-block strong {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--navy);
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.fee-table caption {
  text-align: left;
  font-family: var(--ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 8px;
}

.fee-table th,
.fee-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #edf2f5;
  text-align: left;
  font-weight: 400;
}

.fee-table th {
  color: #34495c;
  background: #fbfdfe;
}

.fee-table td {
  text-align: right;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.fee-table tr:last-child th,
.fee-table tr:last-child td {
  border-bottom: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-link {
  font-family: var(--ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
}

.chip-link:hover {
  background: var(--wash);
  border-color: var(--sky);
  text-decoration: none;
}

.chip-link-all {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.chip-link-all:hover {
  background: #0b3a63;
  border-color: #0b3a63;
  color: #fff;
}

/* ---------- State rate table ---------- */

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 16px 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rate-table {
  margin: 0;
  min-width: 560px;
  font-size: 13.5px;
}

.rate-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #34495c;
  background: #fbfdfe;
}

.rate-table tbody th,
.rate-table tbody td {
  padding: 9px 10px;
}

.rate-table tbody th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--navy);
}

.rate-table tbody tr:nth-child(even) {
  background: #fcfdfe;
}

.rate-table tbody tr:hover {
  background: var(--wash);
}

.rate-table caption {
  padding: 12px 14px 0;
}

.table-hint {
  display: none;
}

@media (max-width: 760px) {
  .table-hint {
    display: block;
    margin: 8px 0 0;
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--muted);
  }

  .rate-table tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--paper);
  }

  .rate-table thead th:first-child {
    left: 0;
    z-index: 3;
  }
}

/* ---------- Info pages ---------- */

.prose h1 {
  font-size: clamp(32px, 3.8vw, 44px);
}

.prose .lead {
  font-size: 20px;
  color: #34495c;
  margin-bottom: 30px;
}

.page-meta {
  font-size: 13.5px;
  color: #6b7f90;
  margin: -18px 0 28px;
}

.prose h2 {
  margin-top: 38px;
  font-size: 28px;
}

.prose p,
.prose li {
  color: #34495c;
}

.prose ul {
  padding-left: 20px;
}

.not-found {
  padding: 90px 0 110px;
  max-width: 640px;
}

.not-found p {
  color: #40566a;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: #b9cbd9;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 36px;
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 1.3fr 1.1fr;
  align-items: start;
  gap: 36px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand .brand-text {
  color: #fff;
}

.footer-brand .brand-text span {
  color: var(--sky);
}

.footer-brand p {
  font-size: 14px;
  color: #a8bccb;
  margin: 0;
  max-width: 380px;
}

.footer-title {
  font-family: var(--ui);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 6px 0 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}

.footer-links--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: #c3d4e0;
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-bottom p {
  margin: 0;
  font-size: 12.5px;
  color: #8fa5b6;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-calc {
    max-width: 620px;
  }

  .state-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }

  .sticky {
    position: static;
  }

  .calc-side {
    grid-template-columns: 1fr 1fr;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  body {
    font-size: 17px;
  }

  [id] {
    scroll-margin-top: 128px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    margin-left: 0;
    padding-bottom: 2px;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .header-state {
    margin-left: auto;
  }

  .trust-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .card-grid.three,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-head-split {
    flex-direction: column;
    align-items: stretch;
  }

  .state-search input {
    width: 100%;
  }

  .state-hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .state-hero-main {
    gap: 14px;
  }

  .state-hero-flag {
    width: 54px;
    height: 36px;
  }

  .state-chips {
    justify-content: flex-start;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .container {
    padding: 0 18px;
  }

  .hero {
    padding-top: 36px;
  }

  .section {
    padding: 54px 0;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .state-grid {
    grid-template-columns: 1fr;
  }

  .calc-side {
    grid-template-columns: 1fr;
  }

  .card-grid.three,
  .stats-grid,
  .trust-row {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .content-card,
  .calc-card-large {
    padding: 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-bottom {
    display: grid;
  }

  .header-state {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .calc-side,
  .cta-section {
    display: none;
  }

  body {
    font-size: 12pt;
  }
}
