/* VetPayCalculator — mobile-first, navy / red / white, no decoration for decoration's sake. */
@import url("fonts.css");

:root {
  --navy: #0c1a2e;
  --navy-mid: #15283f;
  --navy-soft: #1e3a5c;
  --red: #9e1b32;
  --red-deep: #7a1527;
  --cream: #f3f0ea;
  --paper: #fffcf7;
  --ink: #161c27;
  --muted: #5a6370;
  --line: #d5cfc4;
  --line-soft: #e7e2d8;
  --ad: #e8e6e1;
  --ad-text: #8a857e;
  --focus: #245a96;
  --ok-ink: #143d2c;
  --shadow: 0 1px 2px rgba(12, 26, 46, 0.05), 0 10px 28px rgba(12, 26, 46, 0.06);
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 70rem;
  --gutter: 1.25rem;
  --header-h: 3.75rem;
  --radius: 0.5rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--navy-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--red); }

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--navy);
  color: #fff;
  padding: 0.4rem 0.8rem;
  z-index: 100;
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 3px solid var(--red);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1;
  flex-shrink: 0;
}
.wordmark:hover { color: #fff; }

.wordmark-mark {
  width: 0.7rem;
  height: 1.25rem;
  background: var(--red);
  border-radius: 1px;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.15rem;
}
.nav a {
  color: #e8e4dc;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45rem 0;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
}
.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--red);
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  padding: 2.25rem 0 2.75rem;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0d4d8;
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 5.6vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  max-width: 18ch;
}

.hero .lede {
  margin: 0 0 1.35rem;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #d9dfe8;
  max-width: 38rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f0ea;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}
.badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 0.35rem;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 2.75rem;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-deep);
  color: #fff;
  border-color: var(--red-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.hero .btn-primary { box-shadow: 0 1px 0 rgba(0,0,0,0.15); }

/* Sections */
main { flex: 1; }

.section {
  padding: 2.5rem 0;
}
.section-head {
  margin: 0 0 1.35rem;
}
.section-head h2,
.prose h2,
.calc-intro h2,
.results-panel h2,
.page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.4rem;
}
.section-head h2 { font-size: 1.55rem; }
.section-head p,
.lede-plain {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

/* Cards */
.card-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
a.card:hover {
  border-color: var(--navy-soft);
  color: inherit;
}
a.card:hover h3 { color: var(--red); }

.card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--navy);
}
.card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
  flex: 1;
}
.pill {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}
.pill-ready {
  background: #e4eee8;
  color: var(--ok-ink);
}
.pill-soon {
  background: var(--line-soft);
  color: var(--muted);
}

/* Ad slot */
.ad-slot {
  background: var(--ad);
  color: var(--ad-text);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 5.5rem;
  margin: 0.5rem 0;
  user-select: none;
}
.ad-slot.ad-tall { min-height: 10rem; }

/* Honesty / sources strip */
.points {
  display: grid;
  gap: 1rem;
}
.point h3 {
  font-size: 1.02rem;
  font-weight: 650;
  margin: 0 0 0.25rem;
  color: var(--navy);
}
.point p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.band {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Page chrome */
.page-head {
  padding: 1.75rem 0 0.25rem;
}
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.35rem); }
.page-head .meta {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.prose { max-width: 42rem; }
.prose h2 { font-size: 1.35rem; margin: 1.75rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin: 0 0 0.35rem; }

/* Coming soon */
.soon-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow);
  max-width: 36rem;
}
.soon-box p:last-child { margin-bottom: 0; }

/* Calculator */
.calc-layout {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 2.75rem;
}
.calc-panel,
.results-panel,
.results-empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.results-panel { border-left: 4px solid var(--red); }

.calc-intro p { color: var(--muted); margin: 0 0 1rem; }

.rating-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.field label,
.dep-grid label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

select, input[type="number"] {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  padding: 0.55rem 0.65rem;
  width: 100%;
  min-height: 2.75rem;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%235A6370' stroke-width='1.6' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2rem;
}
input[type="number"] {
  background-image: none;
  padding-right: 0.65rem;
}
select:hover, input[type="number"]:hover { border-color: #b4ad9f; }
select:focus, input[type="number"]:focus, input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--navy-soft);
}

.btn-remove {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--red-deep);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  padding: 0.45rem 0.7rem;
  min-height: 2.5rem;
  cursor: pointer;
  width: 100%;
}
.btn-remove:hover { border-color: var(--red); background: #f8eef0; }

#add-rating {
  margin-top: 0.85rem;
  width: 100%;
  background: #fff;
  color: var(--navy);
  border: 1px dashed var(--navy-soft);
}
#add-rating:hover { background: #f6f3ee; }

.hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.deps {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.deps h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  color: var(--navy);
}
.deps .hint { margin-top: 0; margin-bottom: 0.85rem; }

.dep-grid {
  display: grid;
  gap: 0.75rem;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.98rem;
  padding: 0.2rem 0;
}
.check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--navy);
}
.check:has(input:disabled) {
  opacity: 0.55;
}

.results-empty { color: var(--muted); }
.results-empty p { margin: 0; }

.results-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
.results-rating {
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  line-height: 1;
  color: var(--navy);
  margin: 0 0 0.45rem;
  letter-spacing: -0.03em;
}
.results-rating span {
  font-size: 0.55em;
  color: var(--red);
}
.results-pay {
  font-size: 1.45rem;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 0.25rem;
}
.results-pay span {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
}
.results-year, .results-meta, .source, .note {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.7rem;
}
.results-panel h2 {
  font-size: 1.15rem;
  margin: 1.1rem 0 0.5rem;
}
.steps {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}
.steps li { margin: 0 0 0.55rem; }
.pay-breakdown {
  list-style: none;
  margin: 0.5rem 0 0.85rem;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}
.pay-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.95rem;
}
.pay-breakdown li span:last-child { font-weight: 600; white-space: nowrap; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: #c9d0d9;
  padding: 2rem 0 1.5rem;
  margin-top: auto;
  font-size: 0.92rem;
}
.site-footer a { color: #e8e4dc; }
.site-footer a:hover { color: #fff; }
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.footer-brand {
  font-family: var(--serif);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.15rem; }
.disclaimer {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1rem;
  color: #b7c0cb;
  margin: 0;
  max-width: 50rem;
}
.footer-copy {
  margin: 0.85rem 0 0;
  color: #8e99a6;
  font-size: 0.85rem;
}

/* Desktop */
@media (min-width: 720px) {
  :root { --gutter: 1.75rem; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .points { grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
  .hero { padding: 3.25rem 0 3.5rem; }
  .rating-row {
    grid-template-columns: 8.5rem minmax(0, 1fr) auto;
    align-items: end;
  }
  .btn-remove { width: auto; }
  #add-rating { width: auto; }
  .dep-grid { grid-template-columns: 1fr 1fr; }
  .dep-grid .field:last-child { grid-column: 1 / -1; }
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

@media (min-width: 960px) {
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
  .calc-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: 1.5rem;
  }
  .results-col { position: sticky; top: calc(var(--header-h) + 1rem); }
  .section { padding: 3rem 0; }
}

@media (max-width: 419px) {
  .nav a { font-size: 0.88rem; }
  .wordmark { font-size: 1.08rem; }
  .hero { padding: 1.85rem 0 2.15rem; }
}

/* State benefits hub and state pages */
.state-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.85rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.state-grid li { margin: 0; }
.state-grid a,
.state-grid .soon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.3rem;
  font-size: 0.98rem;
  box-sizing: border-box;
}
.state-grid a {
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
}
.state-grid a:hover { border-color: var(--navy-soft); color: var(--red); }
.state-grid .soon {
  color: var(--muted);
  border: 1px solid transparent;
}
.state-grid .soon span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.1rem;
}

.notice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0 0 1.5rem;
  max-width: 46rem;
}
.notice p { margin: 0 0 0.6rem; }
.notice p:last-child { margin-bottom: 0; }

.benefit {
  max-width: 46rem;
  margin: 0 0 2rem;
}
.benefit h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.5rem;
  padding-top: 0.4rem;
}
.benefit p { margin: 0 0 0.75rem; }
.benefit ul { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.benefit li { margin: 0 0 0.35rem; }

.cite, .verified {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.verified { margin-bottom: 0.85rem; }

.rules {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  background: var(--paper);
}
.rules th, .rules td {
  text-align: left;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  vertical-align: top;
}
.rules th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

.agency {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  margin: 0 0 2rem;
  max-width: 46rem;
  box-shadow: var(--shadow);
}
.agency h2 { margin-top: 0; }

.toc {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  max-width: 46rem;
}
.toc li { margin: 0 0 0.3rem; }

@media (min-width: 720px) {
  .state-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .state-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 419px) {
  .nav a { font-size: 0.82rem; }
}

.benefit h3 {
  font-family: var(--sans, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1rem 0 0.4rem;
}
.agency h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 0.85rem;
}
.table-scroll .rules { margin-bottom: 0; }
.states-heading {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.015em;
  margin: 1.5rem 0 0.75rem;
}
@media (max-width: 419px) {
  .rules { font-size: 0.9rem; }
  .rules th, .rules td { padding: 0.4rem 0.45rem; }
}

/* Keep all four nav links on one row under the wordmark on small screens */
@media (max-width: 599px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.15rem 0.7rem;
    min-height: auto;
    padding-top: 0.55rem;
  }
  .nav {
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 0.15rem 0.45rem;
    padding-bottom: 0.3rem;
    flex-wrap: nowrap;
  }
  .nav a { font-size: 0.88rem; }
}

/* Date inputs and rate-table pages */
input[type="date"] {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.5rem 0.65rem;
  width: 100%;
  max-width: 16rem;
  min-height: 2.6rem;
}
input[type="date"]:hover { border-color: #b4ad9f; }
input[type="date"]:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-color: var(--navy);
}

.rate-block {
  max-width: 70rem;
  margin: 0 0 2rem;
}
.rate-block h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.4rem;
}
.rate-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.1rem 0 0.45rem;
}
.rate-block p { margin: 0 0 0.7rem; }
.swipe-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.rules.rates td:first-child,
.rules.rates th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  font-weight: 600;
  min-width: 9.5rem;
  background: var(--paper);
}
.rules.rates thead th:first-child { background: var(--navy); color: #fff; }
.rules.rates tbody tr:nth-child(even) td:first-child { background: #f7f4ee; }
.rules.rates tbody tr:nth-child(even) td { background: #f7f4ee; }

.wordmark-text { white-space: nowrap; }
@media (max-width: 419px) {
  .wordmark { font-size: 1.02rem; }
}

.cola-note { max-width: 46rem; }

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