/* Vehicle Registration Almanac — global.css */

:root {
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-accent: #1a3a5f;       /* Deep blue (vs PTA's forest green) */
  --color-accent-hover: #2a5080;
  --color-bg: #ffffff;
  --color-bg-soft: #f7f5f1;      /* Warm off-white */
  --color-border: #e4e1dc;
  --serif: 'Fraunces', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', Menlo, Consolas, monospace;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em 0;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ── Header / Footer ── */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
  background: var(--color-bg);
}
.masthead {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text);
}
.primary-nav {
  display: flex;
  gap: 1.5rem;
}
.primary-nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.primary-nav a.active,
.primary-nav a:hover {
  color: var(--color-accent);
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem;
  min-height: 60vh;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}
.disclaimer { max-width: 720px; margin: 0 auto 0.5rem; }
.related-sites { max-width: 720px; margin: 0.5rem auto; }

/* ── Hero (homepage) ── */
.hero {
  text-align: center;
  padding: 3rem 1rem 4rem;
  background: var(--color-bg-soft);
  margin: -2rem -2rem 3rem;
}
.hero h1 { font-size: 3rem; max-width: 720px; margin: 0 auto 1rem; }
.hero .lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ── State stat strip ── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--color-bg-soft);
  border-radius: 8px;
  margin: 2rem 0;
}
.stat {
  text-align: center;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-value {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 0.25rem;
}

/* ── Calculator ── */
.calculator {
  background: var(--color-bg-soft);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.calc-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}
.calc-field input,
.calc-field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;        /* ≥16px to prevent iOS zoom */
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
}
.calc-output {
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}

/* ── Line items ── */
.line-items {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.line-items td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.line-items td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.line-items tr.total td {
  font-weight: 600;
  font-size: 1.1rem;
  border-top: 2px solid var(--color-text);
  border-bottom: none;
  padding-top: 1rem;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  main { padding: 1rem; }
  .hero { padding: 2rem 1rem; margin: -1rem -1rem 2rem; }
  .hero h1 { font-size: 2rem; }
  h1 { font-size: 1.75rem; }
  .masthead { flex-direction: column; align-items: flex-start; }
}
