:root {
  --navy: #1d3557;
  --teal: #2a7f7a;
  --teal-dark: #1f625e;
  --teal-soft: #e3f1ef;
  --cream: #faf7f2;
  --sand: #f1ebe1;
  --coral: #d9785b;
  --ink: #22303c;
  --muted: #5b6875;
  --line: #e4ddd2;
  --white: #ffffff;
  --danger: #b4412f;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(29, 53, 87, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .logo { font-family: Fraunces, Georgia, serif; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin: 0 0 1.25rem; }
h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
a { color: var(--teal); }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--teal); color: var(--white);
  padding: .85rem 1.4rem; border-radius: 999px; text-decoration: none;
  font: 600 1rem Inter, system-ui, sans-serif; border: 2px solid var(--teal); cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-small { padding: .5rem 1rem; font-size: .95rem; }
.btn-link { background: none; border: 0; color: var(--teal); font: 600 1rem Inter, sans-serif; cursor: pointer; padding: .5rem 0; }

/* Header */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.45rem; font-weight: 600; text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-links a.btn { color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--navy); cursor: pointer; }

/* Hero */
.hero { padding: 72px 0 84px; background: linear-gradient(160deg, var(--sand), var(--cream)); }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 600; color: var(--teal); margin: 0 0 .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.zip-form { display: flex; gap: 10px; margin-top: 1.75rem; max-width: 470px; background: var(--white); padding: 8px; border-radius: 999px; box-shadow: var(--shadow); }
.zip-form input { flex: 1; min-width: 0; border: 0; font: 500 1.05rem Inter, sans-serif; padding: 0 1rem; background: transparent; color: var(--ink); }
.zip-form input:focus { outline: none; }
.zip-form:focus-within { outline: 2px solid var(--teal); }
.trust-row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem; color: var(--muted); font-size: .92rem; }
.trust-row span::before { content: "✓ "; color: var(--teal); font-weight: 700; }

.match-preview { background: var(--white); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.match-preview .label { font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.mini-match { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 10px; }
.mini-match strong { color: var(--navy); }
.mini-match p { margin: .25rem 0 0; font-size: .9rem; color: var(--muted); }
.pill { font-family: Inter, system-ui, sans-serif; display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); margin-left: .35rem; vertical-align: middle; }
.pill.coral { background: #fbe9e3; color: #a24a30; }
.pill.navy { background: #e4e9f1; color: var(--navy); }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--white); }
.section-head { max-width: 640px; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--white); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.section-alt .card { background: var(--cream); box-shadow: none; }
.card p { margin: 0; color: var(--muted); }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; margin-bottom: .8rem; }

.care-type h3 { display: flex; align-items: center; gap: .5rem; }
.care-type ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.care-type .paid { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .93rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: .45rem 0 .45rem 1.9rem; position: relative; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: .5rem; width: 1.3rem; height: 1.3rem;
  border-radius: 50%; background: var(--teal); color: var(--white); font-size: .72rem;
  display: grid; place-items: center;
}

.cta-band { background: var(--navy); color: #dbe3ec; border-radius: 20px; padding: 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin: 0 0 .4rem; }
.cta-band p { margin: 0; }
.cta-band .btn { background: var(--white); color: var(--navy); border-color: var(--white); }

.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { font-weight: 600; cursor: pointer; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--teal); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: .75rem 0 0; }

/* Forms */
.form { display: grid; gap: 16px; }
.form label, .field-label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input[type=text], .form input[type=tel], .form input[type=email], .form input[type=password], .form select, .form textarea {
  font: inherit; font-weight: 400; padding: .75rem .9rem; border: 1px solid #d6d0c6; border-radius: 10px; background: var(--white); color: var(--ink); width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--teal); border-color: transparent; }
.hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.form-error { background: #fbeae6; color: var(--danger); border-radius: 10px; padding: .75rem 1rem; font-size: .95rem; }
.form-error:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; color: var(--navy); margin-bottom: .6rem; font-size: 1.02rem; padding: 0; }

.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; height: 100%; border: 1.5px solid #d6d0c6; border-radius: 12px; padding: .8rem 1rem;
  background: var(--white); cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s;
}
.choice span small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.choice input:checked + span { border-color: var(--teal); background: var(--teal-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.consent { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: .6rem; font-weight: 400 !important; font-size: .9rem !important; color: var(--muted); }
.consent input { margin-top: .3rem; flex: none; }

/* Wizard */
.wizard-wrap { padding: 48px 0 80px; }
.wizard { background: var(--white); border-radius: 20px; box-shadow: var(--shadow); padding: 36px; }
.progress { display: flex; gap: 6px; margin-bottom: 28px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--sand); }
.progress span.on { background: var(--teal); }
.step { display: none; }
.step.active { display: grid; gap: 24px; }
.step h2 { margin: 0; font-size: 1.6rem; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; }
.privacy-note { font-size: .85rem; color: var(--muted); display: flex; gap: .5rem; align-items: center; margin-top: 1rem; }

/* Results */
.loading { text-align: center; padding: 60px 20px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--teal-soft); border-top-color: var(--teal); border-radius: 50%; margin: 0 auto 1.25rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.results-summary { background: var(--teal-soft); border-radius: var(--radius); padding: 22px 24px; color: var(--ink); margin-bottom: 24px; }
.results-summary p { margin: 0; }
.match-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 16px; display: grid; gap: .6rem; }
.match-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.match-card h3 { margin: 0; }
.match-card .where { color: var(--muted); font-size: .92rem; }
.match-card .why { background: var(--cream); border-radius: 10px; padding: .8rem 1rem; margin: 0; }
.match-card .why strong { color: var(--navy); }
.stars { color: #c98a14; letter-spacing: 1px; font-size: .95rem; white-space: nowrap; }
.stars small { color: var(--muted); letter-spacing: 0; margin-left: .25rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: .8rem; background: var(--sand); padding: .2rem .6rem; border-radius: 999px; color: var(--ink); }
.next-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.next-steps li { counter-increment: step; position: relative; padding: .5rem 0 .5rem 2.5rem; }
.next-steps li::before { content: counter(step); position: absolute; left: 0; top: .45rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-size: .85rem; font-weight: 600; }
.source-note { font-size: .82rem; color: var(--muted); margin-top: 1.5rem; }

/* Admin */
.admin-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.tabs { display: flex; gap: 6px; }
.tabs button { border: 0; background: var(--sand); padding: .55rem 1rem; border-radius: 999px; font: 600 .95rem Inter, sans-serif; cursor: pointer; color: var(--ink); }
.tabs button.on { background: var(--navy); color: var(--white); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--white); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.6rem; font-family: Fraunces, serif; color: var(--navy); }
.stat span { color: var(--muted); font-size: .88rem; }
.record { background: var(--white); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.record > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: center; }
.record > summary::-webkit-details-marker { display: none; }
.record .muted { color: var(--muted); font-size: .9rem; }
.record-body { padding: 0 20px 20px; display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.record dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; font-size: .93rem; }
.record dt { color: var(--muted); }
.record dd { margin: 0; }
.status { font-size: .78rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; background: var(--sand); text-transform: capitalize; white-space: nowrap; }
.status.new, .status.pending { background: #fbe9e3; color: #a24a30; }
.status.contacted, .status.referred { background: #e4e9f1; color: var(--navy); }
.status.placed, .status.approved { background: var(--teal-soft); color: var(--teal-dark); }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; background: var(--white); border-radius: 12px; }

/* Footer */
.site-footer { background: var(--navy); color: #c9d3de; padding: 40px 0 28px; font-size: .9rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: #ffffff; text-decoration: none; margin-right: 1.25rem; }
.site-footer .disclaimer { margin-top: 1.5rem; font-size: .82rem; color: #9fb0c2; max-width: 760px; }

@media (max-width: 860px) {
  .hero-inner, .two-col { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: flex-start; padding: 16px 20px 24px; gap: 1rem; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .record > summary { grid-template-columns: 1fr auto; }
  .record > summary .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .grid, .grid-2, .choices, .choices.three, .row-2 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 44px 0 56px; }
  .wizard { padding: 24px 18px; }
  .zip-form { border-radius: 16px; flex-direction: column; }
  .zip-form input { padding: .7rem .8rem; }
  .cta-band { padding: 28px 22px; }
  .record dl { grid-template-columns: 1fr; }
}
