/* ============================================================
   BenefitShepherd — Design System
   Forest + sage on ivory. Stable, trustworthy, calm.
   ============================================================ */

:root {
  /* Brand — "Financial Health" palette */
  --c-forest-900: #122B14;
  --c-forest-800: #1E4620;   /* Primary: wordmark, shield outline, CTA */
  --c-forest-700: #2A5A2C;   /* lighter forest: hovers, accents */
  --c-sage-500:  #87A987;    /* Secondary: inner mountains, secondary text */
  --c-sage-400:  #9DB99D;
  --c-sage-600:  #6E8F6E;    /* darker sage: text where sage needs contrast */
  --c-sage-100:  #E6EFE3;    /* light sage tint: secondary badges, subtle fills */
  --c-ocean:     #3E7C8D;    /* Deep lagoon teal: primary interactive CTA (buttons/links/tabs) — brighter pop vs. front hill */
  --c-ocean-600: #33707F;    /* ocean hover (darker lagoon) */
  --c-teal:      #4FD1C5;    /* Soft Teal: input borders, secondary highlights */

  /* Legacy token aliases — keep existing rules working */
  --c-pine-900: var(--c-forest-900);
  --c-pine-800: var(--c-forest-800);
  --c-pine-700: var(--c-forest-700);
  --c-emerald-600: var(--c-forest-800);
  --c-emerald-500: var(--c-forest-700);
  --c-emerald-400: var(--c-sage-500);
  --c-amber-500: #E9A23B;
  --c-amber-100: #FCEFD8;

  /* Neutrals */
  --c-ink: #1E261E;
  --c-slate: #5A6A60;
  --c-muted: #7E8B83;
  --c-paper: #F9F9F6;         /* light ivory canvas */
  --c-surface: #FFFFFF;
  --c-line: #E7E9E2;

  /* Status */
  --c-success: #177245;
  --c-success-bg: #E4F3EB;
  --c-danger: #B3261E;

  /* Type */
  --font-display: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Radius / shadow / layout */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-card: 0 1px 2px rgba(30, 70, 32, .06), 0 8px 24px rgba(30, 70, 32, .09);
  --shadow-cta: 0 6px 16px rgba(30, 70, 32, .28);
  --maxw: 1100px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  color: var(--c-ink);
}

p { margin: 0 0 1em; }

a {
  color: var(--c-emerald-600);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--c-pine-700); }

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

:focus-visible {
  outline: 3px solid var(--c-amber-500);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Buttons (custom, Bootstrap-independent) ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.35rem;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
  text-decoration: none;
}

.cta:active { transform: translateY(1px); }

.cta--primary {
  background: var(--c-ocean);
  color: #fff;
  box-shadow: 0 6px 16px rgba(43, 108, 176, .30);
}
.cta--primary:hover {
  background: var(--c-ocean-600);
  color: #fff;
  transform: translateY(-1px);
}

.cta--ghost {
  background: transparent;
  color: var(--c-pine-800);
  border-color: var(--c-line);
}
.cta--ghost:hover {
  border-color: var(--c-emerald-500);
  color: var(--c-emerald-600);
}

.cta--lg { padding: .9rem 1.75rem; font-size: 1.1rem; border-radius: var(--r-lg); }

.linklike {
  display: inline-block;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--c-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linklike:hover { color: var(--c-ocean-600); }

.partner-candidate {
  text-align: center;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1rem;
  margin-bottom: 1rem;
}
.partner-candidate__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-ink);
  margin: 0 0 .35rem;
}
.partner-candidate__addr,
.partner-candidate__phone {
  margin: 0 0 .2rem;
  color: var(--c-muted);
}
.partner-actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.partner-search__actions {
  display: flex;
  justify-content: center;
  margin-top: .75rem;
}
.partner-actions .cta { flex: 0 0 auto; }
.partner-skip { text-align: center; margin-top: .9rem; }
.partner-manual {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--c-line);
}
.partner-manual__lead {
  margin: 0 0 .8rem;
  font-size: .9rem;
  color: var(--c-muted);
}
.partner-manual__lead strong { color: var(--c-ink); }
.field-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.field-row .field { flex: 1 1 0; min-width: 0; }
.field-row .field--state { flex: 0 0 4.5rem; }
.field-row .field--zip { flex: 0 0 6.5rem; }
.field__optional { color: var(--c-muted); font-weight: 400; font-size: .82rem; }

/* ---------- Site header (sticky) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, .9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  color: var(--c-forest-800);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand:hover { color: var(--c-forest-800); }
.brand__mark { flex: none; }
.brand__wordmark { display: inline-flex; align-items: baseline; }
.brand__benefit { font-weight: 700; color: var(--c-forest-800); }
.brand__shepherd { font-weight: 400; color: var(--c-sage-500); }

.site-nav {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.site-nav .cta { padding: .5rem .95rem; font-size: .95rem; }

@media (max-width: 480px) {
  .site-nav .cta--ghost { display: none; }
  .hero__sub { display: none; }
}

/* ---------- Site footer ---------- */
.site-footer {
  border-top: 1px solid var(--c-line);
  background: var(--c-surface);
  margin-top: 4rem;
}

.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.provider-cta {
  text-align: center;
  padding: 1.25rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--c-amber-100);
  font-size: 1rem;
  font-weight: 600;
}
.provider-cta a { color: var(--c-pine-800); }
.provider-cta a:hover { color: var(--c-emerald-600); }

.site-footer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--c-muted);
  font-size: .9rem;
}

.site-footer__disclaimer {
  margin: 0 0 1rem;
  color: var(--c-muted);
  font-size: .82rem;
  line-height: 1.5;
  max-width: 64ch;
}

.site-footer__meta a { color: var(--c-slate); }
.site-footer__meta a:hover { color: var(--c-emerald-600); }

/* ---------- Landing: hero ---------- */
.hero {
  padding: 5rem 1.25rem 0;
  text-align: center;
  overflow: hidden;
}

.hero__inner { max-width: 720px; margin: 0 auto; padding-bottom: 2.75rem; }

/* Mountain ridge at the hero's base — the brand's sage-over-forest echo */
.hero__range { line-height: 0; }
.hero__range svg { display: block; width: 100%; height: auto; }

.hero__eyebrow {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: var(--c-amber-100);
  color: var(--c-pine-800);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}

.hero__sub {
  font-size: 1.2rem;
  color: var(--c-slate);
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

.hero__cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

/* Landing ZIP entry — the first screener step ("Quick Eligibility" card). */
.quick-elig {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.25rem 1.1rem;
  text-align: left;
}
.quick-elig__label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--c-pine-800);
  margin-bottom: .6rem;
}
.quick-elig__row {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}
.quick-elig__row .field__input { flex: 1 1 auto; min-width: 0; }
.quick-elig__row .cta { flex: 0 0 auto; height: 2.9rem; padding-top: 0; padding-bottom: 0; }
.quick-elig .field__error { margin: .5rem 0 0; }
@media (max-width: 420px) {
  .quick-elig__row { flex-direction: column; }
  .quick-elig__row .cta { width: 100%; }
}

/* ---------- Hero reassurance row (merged trust bar) ---------- */
.hero__reassure {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  color: var(--c-slate);
  font-size: .9rem;
  font-weight: 500;
}
.hero__reassure li { display: inline-flex; align-items: center; gap: .4rem; }
.hero__reassure svg { color: var(--c-emerald-500); }

/* ---------- Program chips ---------- */
.programs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  text-align: center;
}
.programs h2 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.program-chips {
  display: flex;
  justify-content: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.program-chips li {
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  font-weight: 600;
  font-size: .95rem;
  color: var(--c-pine-800);
}

/* ---------- How it works ---------- */
.how {
  max-width: var(--maxw);
  margin: 1rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
}
.how h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.how__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  text-align: left;
}
.how__step {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.25rem 1.75rem;
}
.how__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--c-sage-500);
  color: var(--c-forest-800);
  background: transparent;
  margin-bottom: 1rem;
}
.how__step h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.how__step p { color: var(--c-slate); font-size: .9rem; margin: 0; text-wrap: balance; }
.provider-link {
  display: inline-block;
  margin: 2.5rem auto 0;
  font-size: .85rem;
  color: var(--c-slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.provider-link:hover { color: var(--c-emerald-600); border-bottom-color: var(--c-emerald-600); }

@media (max-width: 720px) {
  .how__grid { grid-template-columns: 1fr; }
}

/* ---------- Access gate (preserved, restyled) ---------- */
.access-wrap {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

.access-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-card);
}

.access-title { font-size: 1.5rem; font-weight: 700; }
.access-sub { color: var(--c-slate); margin-bottom: 1.5rem; }
.access-fine { font-size: .8rem; color: var(--c-muted); margin-top: 1.25rem; text-align: center; }
.code-input { letter-spacing: .4em; font-size: 1.5rem; }

.mock-hint {
  margin-top: 1.25rem;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: var(--c-amber-100);
  border: 1px dashed var(--c-amber-500);
  font-size: .85rem;
  text-align: center;
}
.mock-code { letter-spacing: .2em; font-size: 1.1rem; }

/* ---------- Screener shell (anchored chrome) ---------- */
.screen-shell {
  background: var(--c-paper);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.screen-header__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: .6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.screen-restart {
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-slate);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.screen-restart:hover { color: var(--c-emerald-600); }

.screen-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem 3rem;
  width: 100%;
}

/* ---------- Two-bar progress ---------- */
.screen-kickoff {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: center;
}
.screen-kickoff__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--c-pine-800);
  margin: 0;
}
.screen-progress {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 0.75rem;
  padding: 0 1.25rem;
}
.phase-rail ol {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .35rem;
}
.phase-rail__step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  position: relative;
}
.phase-rail__step:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  right: 50%;
  width: calc(100% + .35rem);
  height: 2px;
  background: #DCD6C8;
}
.phase-rail__step--done::before,
.phase-rail__step--current::before { background: var(--c-emerald-500); }
.phase-rail__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--c-surface);
  border: 2px solid #DCD6C8;
  color: var(--c-slate);
}
.phase-rail__icon svg { width: 1.2rem; height: 1.2rem; }
.phase-rail__step--done .phase-rail__icon {
  background: var(--c-emerald-500);
  border-color: var(--c-emerald-500);
  color: #FFFFFF;
}
.phase-rail__step--current .phase-rail__icon {
  border-color: var(--c-teal);
  color: var(--c-pine-800);
}
.phase-rail__step--todo .phase-rail__icon { color: #B7C0BD; }
.phase-rail__label {
  font-size: .74rem;
  font-weight: 600;
  color: var(--c-slate);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.phase-rail__step--done .phase-rail__label { color: var(--c-emerald-600); }
.phase-rail__step--current .phase-rail__label { color: var(--c-pine-800); }
/* Mobile: no labels, icons only; web shows all four. */
.phase-rail__label { display: none; }
@media (min-width: 640px) {
  .phase-rail__label { display: block; }
}
.screen-crumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: .55rem 0 0;
}
.screen-crumb__badge {
  display: inline-block;
  padding: .18rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.screen-crumb__badge--phase {
  background: var(--c-forest-800);
  color: var(--c-paper);
}
.screen-crumb__badge--ms {
  background: var(--c-sage-100);
  color: var(--c-forest-900);
}
.screen-crumb__sep { color: #B7C0BD; font-weight: 400; }
.milestone-announce {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- The card ---------- */
.progress-note {
  margin: .5rem 0 0;
  font-size: .78rem;
  color: var(--c-sage-700, #5b6b5e);
  text-align: center;
}
.size-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
}
.size-picker__btn {
  padding: 1rem 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-pine-800);
  background: var(--c-surface);
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.size-picker__btn:hover {
  border-color: var(--c-emerald-500);
}
.size-picker__btn:active {
  border-color: var(--c-emerald-500);
  background: var(--c-amber-100);
}
.size-picker__btn--more {
  color: var(--c-slate);
  font-weight: 600;
}
.size-picker__exact {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin: 0 0 1.25rem;
}
.size-picker__exact[hidden] { display: none; }
@media (min-width: 640px) {
  .size-picker { grid-template-columns: repeat(9, 1fr); }
}
.screen-card {
  width: 100%;
  max-width: 720px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  padding: 1.75rem 1.5rem;
  animation: card-in .22s ease;
}
/* Fade only — a `transform` here would composite the card and detach the popup of any
   native <select> inside it (citizenship matrix, roster sex/relationship). */
@keyframes card-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (max-width: 520px) {
  .screen-card { border-radius: var(--r-lg); padding: 1.4rem 1.1rem; }
}

.screen-card__title {
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  margin-bottom: .5rem;
  text-wrap: pretty;
}
/* The heading is focused programmatically after each swap (a11y landing point for keyboard/
   screen-reader users), not a real interactive control — suppress the amber focus ring so the
   question text never flashes an orange outline. */
.screen-card__title:focus,
.screen-card__title:focus-visible,
.results__title:focus,
.results__title:focus-visible {
  outline: none;
}
.screen-card__kicker {
  margin: 0 0 .25rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-emerald-600);
}
.screen-card__who {
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-emerald-600);
}
.screen-card__sub {
  color: var(--c-slate);
  margin: 0 0 1.25rem;
  max-width: 54ch;
  text-wrap: pretty;
}
.screen-card__fine {
  font-size: .82rem;
  color: var(--c-muted);
  text-align: center;
  margin: 1rem 0 0;
}

/* Scoped "back" affordance on itemized-intake stretches (job chain) — a quiet,
   centered link below the primary Continue, not a full navigation control. */
.step-back {
  margin-top: 1rem;
  text-align: center;
}
.step-back .linklike {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* ---------- Fields ---------- */
.field { margin-bottom: 1.1rem; }
.field__label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: .35rem;
}
.field__hint { color: var(--c-muted); font-weight: 400; }
.field__error { color: var(--c-danger); font-weight: 600; margin: -.1rem 0 .6rem; font-size: .92rem; }
.field__input {
  font: inherit;
  font-size: 1.05rem;
  width: 100%;
  height: 2.9rem;
  padding: .7rem .9rem;
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-ink);
  transition: border-color .15s ease;
}
.field__input:focus {
  border-color: var(--c-emerald-500);
  outline: none;
}
.field__input::placeholder {
  color: #B7C0BD;
  font-weight: 400;
}
select.field__input {
  -webkit-appearance: none;
  appearance: none;
  line-height: 2.9rem;
  padding-top: 0;
  padding-bottom: 0;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 1rem;
}
/* Native select: leave the browser's own picker alone. Used where `appearance: none`
   makes the popup options render detached/offset (citizenship matrix on responsive). */
select.field__input--native {
  -webkit-appearance: auto;
  appearance: auto;
  line-height: normal;
  padding: .55rem .9rem;
  background-image: none;
}
/* Custom dropdown (citizenship status): button + styled list replacing the native <select>,
   whose options popup detaches/offsets in responsive view. Fully owned — no browser picker. */
.select-drop { position: relative; }
.select-drop__btn {
  font: inherit;
  font-size: 1.05rem;
  width: 100%;
  height: 2.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .55rem .9rem;
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease;
}
.select-drop__btn:hover { border-color: var(--c-emerald-400); }
.select-drop__btn:focus { border-color: var(--c-emerald-500); outline: none; }
.select-drop__chev { flex: none; color: var(--c-muted); transition: transform .15s ease; }
.select-drop.is-open .select-drop__chev { transform: rotate(180deg); }
.select-drop__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + .35rem);
  z-index: 60;
  margin: 0;
  padding: .3rem;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.select-drop__menu[hidden] { display: none; }
.select-drop__opt {
  font: inherit;
  font-size: .95rem;
  display: block;
  width: 100%;
  text-align: left;
  padding: .55rem .7rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-ink);
  cursor: pointer;
}
.select-drop__opt:hover { background: var(--c-sage-100); }
.select-drop__opt[aria-selected="true"] { color: var(--c-emerald-600); font-weight: 600; }
.field__input--sm { width: auto; height: auto; padding: .3rem .5rem; font-size: .9rem; }
.field__money { position: relative; width: 100%; max-width: 12rem; margin-inline: auto; }
.field__money-prefix {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}
.field__money .field__input { width: 100%; margin-inline: 0; padding-left: 1.9rem; padding-right: .9rem; text-align: left; }
.field__money .field__input[type="number"] { width: 100%; max-width: 100%; margin-inline: 0; text-align: left; padding-left: 1.9rem; }
.field__input[type="number"] { text-align: center; max-width: 11rem; margin-inline: auto; display: block; }
.field__input[type="date"] {
  min-height: 2.9rem;
}
.field__input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .9;
}

/* ---- Date field: native typing + button-triggered year-first popover ---- */
.datefield {
  position: relative;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.datefield--sm { display: inline-flex; width: auto; }
.datefield .field__input {
  flex: 1 1 auto;
  min-width: 0;
}
.datefield input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}
.datefield__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.9rem;
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-ink);
  cursor: pointer;
  transition: border-color .15s ease;
}
.datefield__btn:hover { border-color: var(--c-emerald-500); }
.datefield--sm .datefield__btn { width: 2.1rem; height: 2.2rem; }

.datepop {
  position: fixed;
  z-index: 200;
  width: 18rem;
  max-width: calc(100vw - 1rem);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: .65rem;
}
.datepop[hidden] { display: none; }
.datepop__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.datepop__title { flex: 1; font-weight: 600; font-size: .95rem; color: var(--c-ink); }
.datepop__back {
  border: 0;
  background: transparent;
  color: var(--c-ink);
  font-size: 1.1rem;
  line-height: 1;
  padding: .2rem .5rem;
  cursor: pointer;
  border-radius: 6px;
}
.datepop__back:hover { background: var(--c-success-bg); }
.datepop__years {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .3rem;
  max-height: 15rem;
  overflow-y: auto;
  scrollbar-width: thin;
}
.datepop__months {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .3rem;
}
.datepop__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: .72rem;
  color: var(--c-muted);
  margin-bottom: .2rem;
}
.datepop__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .15rem;
}
.datepop__cell {
  border: 0;
  background: transparent;
  color: var(--c-ink);
  font: inherit;
  font-size: .9rem;
  padding: .5rem 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}
.datepop__cell:hover { background: var(--c-success-bg); }
.datepop__cell:disabled { color: var(--c-line); cursor: default; background: transparent; }
.datepop__cell--empty { cursor: default; }
.datepop__cell--sel { background: var(--c-emerald-500); color: #fff; }
.datepop__cell--sel:hover { background: var(--c-emerald-500); }

.cta--block { width: 100%; justify-content: center; margin-top: .4rem; }

.bracket-note {
  background: var(--c-success-bg);
  border: 1px solid #ceead6;
  color: var(--c-success);
  border-radius: var(--r-md);
  padding: .7rem .9rem;
  font-size: .92rem;
  margin: 0 0 1.25rem;
  text-align: center;
}

/* ---------- Choices (radio/checkbox as tappable cards) ---------- */
.choice-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  border: 0;
}
.choice {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem 1rem;
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  cursor: pointer;
  font-weight: 500;
  transition: border-color .12s ease, background .12s ease;
}
.choice:hover { border-color: var(--c-emerald-400); }
.choice input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--c-emerald-600);
  flex: 0 0 auto;
}
.choice:has(input:checked) {
  border-color: var(--c-emerald-600);
  background: var(--c-success-bg);
}
/* Held = on file. Same green "has stuff" signal as a checked box, but not a toggle —
   removal lives in the row's trash icon, so there's no disabled/grayed look. */
.choice--held {
  border-color: var(--c-emerald-600);
  background: var(--c-success-bg);
  cursor: default;
}
.choice--held .choice__check {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-emerald-600);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}
.choice__label { flex: 1 1 auto; }
.choice__add {
  flex: 0 0 auto;
  padding: .28rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-emerald-600);
  background: #fff;
  border: 1px solid var(--c-emerald-500);
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
}
.choice__add:hover { background: var(--c-emerald-600); color: #fff; }
.choice--none { border-style: dashed; }

/* ---------- Roster ---------- */
.roster-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.roster-row {
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: .75rem .9rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
}
.roster-row__head {
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 700;
  font-size: .95rem;
  color: var(--c-pine-800);
}
.roster-row .field { margin-bottom: 0; }
@media (min-width: 640px) {
  /* Desktop: two fields per row — name + DOB, then gender + relationship. Wide
     enough for the select labels ("Prefer not to say", "Select relationship"). */
  .roster-row { grid-template-columns: 1fr 1fr; gap: .6rem .8rem; }
}
.roster-summary {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.roster-summary li { padding: .4rem 0; border-bottom: 1px solid var(--c-line); }
.roster-summary__rel { color: var(--c-muted); font-size: .85rem; }

/* ---------- Matrix ---------- */
.matrix {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: .75rem;
}
.matrix th, .matrix td {
  text-align: center;
  padding: .55rem .4rem;
  border-bottom: 1px solid var(--c-line);
}
.matrix th { font-size: .85rem; color: var(--c-slate); }
.matrix tbody th { text-align: left; font-weight: 500; }
.matrix-member { border: 0; margin: 0 0 1.1rem; padding: 0; }
.matrix-member__name {
  font-weight: 600;
  color: var(--c-ink);
  font-size: .95rem;
  margin: 0 0 .5rem;
  padding: 0;
}
.matrix-member .choice-list { margin-bottom: 0; }
.matrix input { width: 1.15rem; height: 1.15rem; accent-color: var(--c-emerald-600); }
.matrix-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}

.chip-btn {
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-pine-800);
  cursor: pointer;
}
.chip-btn:hover { border-color: var(--c-emerald-500); color: var(--c-emerald-600); }
.chip-btn--danger:hover { border-color: var(--c-danger); color: var(--c-danger); }
.chip-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--c-muted);
}
.chip-btn--icon:hover { background: transparent; color: var(--c-danger); }
.chip-btn--icon svg { display: block; width: 1.1rem; height: 1.1rem; }

/* ---------- Collection review ---------- */
.collection-card { display: flex; flex-direction: column; gap: .6rem; }
.collection-list {
  list-style: none;
  padding: 0;
  margin: 0 0 .5rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.collection-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .8rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
}
.collection-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.collection-item__title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.collection-item__sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; color: var(--c-muted); font-size: .88rem; line-height: 1.35; }
.collection-item__owner { color: var(--c-muted); }
.collection-item__sep { color: var(--c-muted); }
.collection-add {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin: .5rem 0;
}
.collection-add .field__label { margin-bottom: 0; }
.collection-add .field__input { width: auto; flex: 1; min-width: 10rem; }
.collection-add--stack {
  flex-direction: column;
  align-items: stretch;
  gap: .5rem;
}
.collection-add__title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-ink);
}
.member-pick {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  border: 0;
  padding: 0;
  margin: 0;
}
.member-pick__options {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.member-pick__chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: .92rem;
  color: var(--c-ink);
  transition: border-color .12s ease, background .12s ease;
}
.member-pick__chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.member-pick__chip:has(input:checked) {
  border-color: var(--c-emerald-600);
  background: var(--c-success-bg);
}
.member-pick__chip:has(input:focus-visible) {
  outline: 2px solid var(--c-emerald-500);
  outline-offset: 2px;
}
.collection-total {
  margin: .35rem 0 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-pine-800);
}
.collection-total--top {
  margin: 0 0 .65rem;
  padding: .65rem 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  text-align: center;
}

/* ---------- Results ---------- */
.results {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.results__title {
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  text-align: center;
  margin-bottom: 0;
}
.results__sub {
  text-align: center;
  color: var(--c-slate);
  margin: 0 0 .5rem;
}
.results__disclaimer {
  text-align: center;
  color: var(--c-slate);
  font-size: .85rem;
  margin: 0 0 .75rem;
  padding: .5rem .75rem;
  background: var(--c-surface);
  border: 1px dashed var(--c-line);
  border-radius: var(--r-md);
}
.results__footnote {
  display: block;
  text-align: center;
  color: var(--c-slate);
  font-size: .78rem;
  font-style: italic;
  margin-top: .35rem;
}
.result-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.25rem;
}
.result-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}
.result-card__title { font-size: 1.15rem; margin-bottom: .35rem; }
.result-card__why { color: var(--c-slate); font-size: .95rem; margin: 0; }
.result-card__apply {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  margin-top: .9rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--c-line);
}
.result-card__paper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  margin-top: .15rem;
}
.result-card__or {
  color: var(--c-muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.result-card__forms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  text-align: center;
}
.result-card__forms li { font-size: .92rem; color: var(--c-slate); }
.result-card__apply-detail { color: var(--c-slate); font-size: .85rem; }
.result-family {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--c-line);
}
.result-family:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.result-family__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.result-family__name { font-size: 1.4rem; margin: 0; }
.result-family__why-not summary {
  cursor: pointer;
  color: var(--c-slate);
  font-size: .95rem;
  font-weight: 600;
  padding: .4rem 0;
}
.result-family__why-list {
  list-style: none;
  padding: 0;
  margin: .25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.result-family__why-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .6rem .75rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.result-family__why-name { font-weight: 600; }
.result-family__why-reason { color: var(--c-slate); font-size: .9rem; }
.result-family__why-item--close {
  border-color: var(--c-amber-100);
  background: #fffaf0;
}
.result-close-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  color: #8a5a00;
  background: var(--c-amber-100);
  padding: .15rem .5rem;
  border-radius: 999px;
  margin-left: .5rem;
  vertical-align: middle;
}
.result-close-tag svg { width: .8rem; height: .8rem; flex: none; }
.result-family__why-close-note {
  color: #8a5a00;
  font-size: .85rem;
  font-weight: 600;
}
.result-family__why-note {
  margin: .5rem 0 0;
  color: var(--c-slate);
  font-size: .85rem;
  font-style: italic;
}
.result-members { list-style: none; padding: 0; margin: .5rem 0 0; }
.result-member {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .5rem 0;
  border-top: 1px solid var(--c-line);
}
.result-member__name { font-weight: 600; }
.result-member__why { color: var(--c-slate); font-size: .9rem; width: 100%; }
.result-member__note,
.result-card__note,
.result-family__note,
.result-person__note { color: var(--c-ocean-600); font-size: .85rem; width: 100%; }

.verdict {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: #fff;
}
.verdict__icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}
.verdict--good { background: var(--c-success); }
.verdict--bad { background: var(--c-danger); }
.verdict--warn { background: #b26a00; }
.verdict--emergency { background: #966000; }
.verdict--muted { background: #9aa0a6; }

.results__cta {
  text-align: center;
  margin-top: .5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.results__cta-title { font-size: 1.3rem; }
.results__cta-sub { color: var(--c-slate); margin: 0 0 .5rem; }

/* Results view toggle (By program / By person) */
.results__toggle {
  display: flex;
  gap: .25rem;
  padding: .25rem;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  margin: .75rem 0 1rem;
}
.results__toggle-btn {
  flex: 1;
  padding: .5rem .75rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--c-slate);
  background: transparent;
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
}
.results__toggle-btn.is-active {
  color: var(--c-ink);
  background: var(--c-surface);
  box-shadow: 0 1px 2px rgba(22, 33, 30, .08);
}

/* Person view */
.result-person {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--c-line);
}
.result-person:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.result-person__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.result-person__name { font-size: 1.3rem; margin: 0; }
.result-person__hint { color: var(--c-muted); font-size: .85rem; }
.result-person__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.result-person__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .85rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.result-person__row-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.result-person__program { font-weight: 600; }
.result-person__why { color: var(--c-slate); font-size: .85rem; }
.result-person__why-not summary {
  cursor: pointer;
  color: var(--c-slate);
  font-size: .95rem;
  font-weight: 600;
  padding: .4rem 0;
}
.result-person__why-list {
  list-style: none;
  padding: 0;
  margin: .25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.result-person__why-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .6rem .75rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.result-person__why-item--close {
  border-color: var(--c-amber-100);
  background: #fffaf0;
}
.result-person__why-name { font-weight: 600; }
.result-person__why-reason { color: var(--c-slate); font-size: .9rem; }

/* Reduced motion: disable the card slide for users who ask. */
@media (prefers-reduced-motion: reduce) {
  .screen-card { animation: none; }
}

/* ============================================================
   Admin: program catalog management
   ============================================================ */
.admin { max-width: 1080px; margin: 2rem auto; padding: 0 1.25rem; }
.admin__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.admin__title { margin: 0; font-size: 1.5rem; }
.admin__sub { color: var(--c-muted, #6b7280); margin: .25rem 0 0; font-size: .9rem; }
.admin__tools { display: flex; align-items: center; gap: .75rem; }
.admin__role { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--c-muted, #6b7280); }
.admin__role select { padding: .35rem .5rem; border: 1px solid var(--c-line, #e5e7eb); border-radius: 6px; }
.admin__tabs { display: flex; gap: .35rem; border-bottom: 1px solid var(--c-line, #e5e7eb); margin-bottom: 1rem; }
.admin__tab { padding: .5rem .9rem; color: var(--c-slate, #475569); text-decoration: none; font-size: .9rem; border-bottom: 2px solid transparent; }
.admin__tab--active { color: var(--c-primary, #0b6e4f); border-bottom-color: var(--c-primary, #0b6e4f); font-weight: 600; }
.admin__table { width: 100%; border-collapse: collapse; }
.admin__table th, .admin__table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--c-line, #e5e7eb); vertical-align: top; font-size: .9rem; }
.admin__table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--c-muted, #6b7280); }
.admin__prog { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.admin__prog-name { font-weight: 600; }
.admin__prog-id { color: var(--c-muted, #6b7280); font-size: .8rem; }
.admin__paths { display: flex; flex-wrap: wrap; gap: .3rem; }
.admin__path { font-size: .72rem; background: #f1f5f9; color: #334155; padding: .1rem .5rem; border-radius: 999px; }
.admin__badge { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; margin-right: .3rem; }
.admin__badge--draft { background: #fef3c7; color: #92400e; }
.admin__badge--error { background: #fee2e2; color: #991b1b; }
.admin__empty { color: var(--c-muted, #6b7280); padding: 1.5rem .6rem; }
.admin__editor { width: 100%; min-height: 420px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; line-height: 1.5; padding: 1rem; border: 1px solid var(--c-line, #e5e7eb); border-radius: 8px; background: #0f172a; color: #e2e8f0; }
.admin__actions { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.admin__readonly { color: var(--c-muted, #6b7280); font-size: .85rem; }
.admin__flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.admin__flash--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.admin__flash--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cta--approve { background: #0b6e4f; color: #fff; border: none; padding: .55rem 1.1rem; border-radius: 6px; font-weight: 600; cursor: pointer; }

/* ---------- Receipt (read-only statement of record) ---------- */
.receipt { max-width: 720px; margin: 0 auto; padding: 1.75rem 1.5rem 2.5rem; }
.receipt__title { font-size: clamp(1.5rem, 4.5vw, 2rem); margin: 0 0 .25rem; text-wrap: pretty; }
.receipt__sub { color: var(--c-slate); margin: 0 0 1.5rem; }
.receipt-group { margin-bottom: 1.75rem; }
.receipt-group__title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--c-emerald-600);
  margin: 0 0 .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--c-line);
}
.receipt-list { list-style: none; margin: 0; padding: 0; }
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--c-line);
}
.receipt-row:last-child { border-bottom: 0; }
.receipt-row__name { font-weight: 600; color: var(--c-ink); flex-shrink: 0; }
.receipt-row__value { color: var(--c-slate); text-align: right; }
.receipt-row__value--full { flex: 1; }
.receipt__cta {
  margin-top: 2rem;
  padding: 1.25rem 1.25rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  text-align: center;
}
.receipt__cta-sub { color: var(--c-slate); margin: 0 0 .9rem; font-size: .92rem; }
@media (max-width: 520px) { .receipt { padding: 1.4rem 1.1rem 2rem; } }

/* ---------- Partners landing (providers & payers) ---------- */
.b2b-hero {
  padding: 5rem 1.25rem 4rem;
  text-align: center;
  color: #EAF5EE;
  background:
    radial-gradient(1200px 540px at 50% -10%, #0B3F2C 0%, #063326 48%, #031F16 100%);
}
.b2b-hero__inner { max-width: 780px; margin: 0 auto; }
.b2b-hero__badge {
  width: 112px;
  height: 112px;
  margin: 0 auto 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #FBF9F4;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.b2b-hero__mark { width: 72px; height: 72px; display: block; }
.b2b-hero__eyebrow {
  display: inline-block;
  padding: .35rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #C9EAD6;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.b2b-hero__title {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.08;
  margin-bottom: 1.1rem;
  color: #FFFFFF;
}
.b2b-hero__sub {
  font-size: 1.18rem;
  line-height: 1.6;
  color: #C6E2D1;
  max-width: 620px;
  margin: 0 auto 2.25rem;
}
.b2b-hero__cta-row { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.b2b-hero .cta--primary {
  background: #FFFFFF;
  color: #06281B;
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
}
.b2b-hero .cta--primary:hover { background: #EAF5EE; color: #06281B; }
.b2b-hero .cta--ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.b2b-hero .cta--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }

.b2b-pillars, .b2b-how {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 0;
}
.b2b-section-title {
  text-align: center;
  font-size: 1.65rem;
  letter-spacing: -.01em;
  color: var(--c-forest-800);
  margin-bottom: .6rem;
}
.b2b-section-lede {
  text-align: center;
  color: var(--c-slate);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
.b2b-pillars__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.b2b-pillar {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 1.6rem 1.6rem 1.75rem;
  box-shadow: var(--shadow-card);
}
.b2b-pillar h3 {
  font-size: 1.12rem;
  margin-bottom: .65rem;
  color: var(--c-forest-800);
  padding-left: .85rem;
  border-left: 3px solid var(--c-teal);
}
.b2b-pillar p { color: var(--c-slate); font-size: .96rem; line-height: 1.6; margin: 0; }
.b2b-pillar em { font-style: normal; color: var(--c-forest-700); font-weight: 600; }

.b2b-how {
  padding-bottom: .5rem;
}
.b2b-how__steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.b2b-how__steps li {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  text-align: left;
}
.b2b-how__num {
  flex: none;
  width: 2.75rem; height: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--c-forest-800);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(9,75,47,.3);
}
.b2b-how__steps h3 { font-size: 1.08rem; margin: 0; color: var(--c-ink); }
.b2b-how__steps p { color: var(--c-slate); font-size: .94rem; line-height: 1.55; margin: 0; }

.b2b-cta {
  margin-top: 4.5rem;
  padding: 4rem 1.25rem;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(900px 440px at 50% 0%, #0B3F2C 0%, #063326 55%, #031F16 100%);
}
.b2b-cta h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  max-width: 660px;
  margin: 0 auto 1rem;
  color: #FFFFFF;
  letter-spacing: -.01em;
}
.b2b-cta > p { color: #C6E2D1; max-width: 540px; margin: 0 auto 1.9rem; font-size: 1.08rem; }
.b2b-cta .cta--primary {
  background: #FFFFFF;
  color: #06281B;
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
}
.b2b-cta .cta--primary:hover { background: #EAF5EE; color: #06281B; }
.b2b-cta__fine { color: rgba(255,255,255,.62); font-size: .82rem; margin-top: 1.4rem !important; }

@media (max-width: 720px) {
  .b2b-pillars__grid { grid-template-columns: 1fr; }
  .b2b-how__steps { grid-template-columns: 1fr; }
}
