/* Car Payoff Refund Kit -- shared design system
   Clean fintech look (Stripe-like), not the old bookish Georgia-serif style.
   Linked from every page in pages/ via <link rel="stylesheet" href="/styles.css">.
   Page-specific rules stay inline on each page and are kept minimal (e.g. the
   estimate.html screen-visibility rule, the quiz.html narrow main override). */

:root {
  --paper: #F8F5F0;
  --ink: #0B1D3A;
  --accent: #166534;
  --accent-dark: #14532D;
  --border: #D1D5DB;
  --muted: #5B6472;
  --card: #FFFFFF;
  --shadow: 0 8px 24px rgba(11, 29, 58, .07);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 16px;
}
h1 { font-size: 34px; }
h2 { font-size: 24px; margin-top: 40px; }
h3 { font-size: 18px; margin-top: 24px; font-weight: 700; }
p { margin: 0 0 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
main.lander { max-width: 1120px; }

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { flex-shrink: 0; }
nav.site {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
nav.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
nav.site a:hover { color: var(--ink); text-decoration: none; }
nav.site .btn-primary { padding: 10px 20px; font-size: 14px; }
/* nav.site a's muted color outranks .btn-primary's specificity; keep button text white in the nav */
nav.site a.btn-primary, nav.site a.btn-primary:hover { color: #fff; }

@media (max-width: 480px) {
  .header-inner { padding: 12px 16px; }
  nav.site { gap: 12px; }
  nav.site a { font-size: 13px; }
  nav.site .btn-primary { padding: 8px 14px; font-size: 13px; }
}

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 40px;
}
footer.site p { margin: 0 0 8px; }
footer.site a { color: var(--muted); text-decoration: underline; }
footer.site a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-primary:hover, .btn-secondary:hover { text-decoration: none; }
.btn-primary:active, .btn-secondary:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(22, 101, 52, .18);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 6px 16px rgba(20, 83, 45, .24); }

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--ink); background: #F3F4F6; }

.btn-primary:disabled, .btn-secondary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-block { display: flex; width: 100%; }

/* ---------- Card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 20px 0;
}
.card > h1:first-child, .card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* ---------- Pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.pill svg { flex-shrink: 0; }

/* ---------- Check list ---------- */
/* The li must NOT be a flex container: an inline link mid-sentence would become
   its own flex item and shatter the sentence into side-by-side text columns.
   Icon is absolutely positioned; the text flows as normal prose. */
.check-list { list-style: none; margin: 0 0 16px; padding: 0; }
.check-list li { position: relative; padding: 8px 0 8px 26px; }
.check-list li svg { position: absolute; left: 0; top: 11px; }
.check-list a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Trust row ---------- */
.trust-row { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 20px 0; }
.trust-row .trust-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.trust-row .trust-item svg { flex-shrink: 0; }

/* ---------- Big number (refund ranges) ---------- */
.range {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--accent);
  margin: 4px 0 12px;
}
@media (max-width: 480px) {
  .range { font-size: 34px; }
}

.state-line {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 14px; color: var(--ink); }
label:first-child { margin-top: 0; }

select, input[type="email"], input[type="number"], input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
select:focus, input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, .15);
}
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; padding: 10px 0; font-weight: 400; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.amount-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.amount-row input { width: 120px; min-height: 40px; margin-bottom: 0; }

/* ---------- Quiz: options + screens ---------- */
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.options.multi { gap: 8px; }
.option {
  min-height: 44px;
  display: flex;
  align-items: center;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.option:hover { border-color: var(--accent); background: #F4F9F6; }

.progress { height: 6px; background: var(--border); border-radius: 3px; margin-bottom: 32px; overflow: hidden; }
.progress-bar { height: 100%; width: 11%; background: var(--accent); transition: width .2s ease; }

.screen { display: none; }
.screen.active { display: block; }
.screen.card { margin: 0; }

p.hint { color: var(--muted); font-size: 14px; margin-top: -12px; }

/* ---------- Hero (index.html lander) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  /* start, not center: centering against the taller example card pushed the
     headline way down the page */
  align-items: start;
  padding: 16px 0 32px;
}
.hero h1 { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 20px; }
.hero h1 .line-2 { display: block; color: var(--accent); margin-top: 4px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 4px; }
/* Buttons share the row at even width; if one wraps, it grows to full width,
   so the fallback is a clean equal-width stack, never a ragged wrap. */
.hero-actions .btn-primary, .hero-actions .btn-secondary { flex: 1 1 auto; }
@media (max-width: 640px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; }
}
.example-card { max-width: 440px; }
.example-card .pill { margin: 4px 0 0; }
.example-scenario { color: var(--muted); font-size: 15px; margin: 12px 0 20px; }
.range-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0; }
.example-note {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
  background: #FAFAF8;
  margin: 16px 0;
}
.cta-center { text-align: center; margin: 40px 0 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 8px 0 16px; }
  .example-card { max-width: none; justify-self: stretch; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
