:root {
  color-scheme: light;
  --ink: #2e3105;
  --muted: #62673a;
  --line: #d8da8f;
  --paper: #fffdc1;
  --soft: #feffe9;
  --mint: #2e3105;
  --mint-dark: #1f2203;
  --gold: #8f7f22;
  --rose: #77702f;
  --sky: #575f22;
  --white: #ffffff;
  --shadow: 0 18px 60px rgba(22, 49, 46, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  background: rgba(255, 253, 193, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 64px);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  min-width: 220px;
}

.brand-mark,
.card-icon {
  align-items: center;
  background: var(--mint);
  border-radius: 8px;
  color: var(--white);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand small,
.brand strong {
  display: block;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.top-nav {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.top-nav a:hover {
  color: var(--mint-dark);
}

.header-action,
.primary-button,
.secondary-button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
}

.header-action,
.primary-button {
  background: var(--mint);
  color: var(--white);
}

.secondary-button {
  background: var(--soft);
  border-color: var(--line);
  color: var(--mint-dark);
}

.hero {
  display: grid;
  gap: clamp(24px, 4vw, 42px);
  grid-template-columns: 1fr;
  min-height: auto;
  padding: clamp(34px, 5vw, 64px) clamp(18px, 5vw, 64px) clamp(32px, 4vw, 48px);
}

.hero-copy {
  max-width: 980px;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.45rem, 5vw, 5.25rem);
  line-height: 0.98;
  margin-bottom: 22px;
  max-width: 900px;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.05;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-copy > p:not(.eyebrow) {
  font-size: 1.16rem;
  max-width: 690px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-panel {
  background: transparent;
  box-shadow: none;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: center;
  padding: 0;
}

.hero-photo,
.side-photo,
.photo-band img,
.provider-photo-grid img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-photo {
  aspect-ratio: 16 / 7;
  border: 6px solid var(--soft);
  border-radius: 8px;
  grid-column: 1 / -1;
  box-shadow: 0 14px 30px rgba(31, 34, 3, 0.22);
}

.care-card,
.category-grid article,
.mobile-card,
.provider-card,
.provider-form-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.care-card {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  padding: 14px;
}

.care-card.featured {
  transform: none;
}

.care-card p,
.care-card strong {
  margin: 0;
}

.care-card p {
  line-height: 1.45;
}

.section-band,
.split-section,
.join-section,
.app-shell {
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 64px);
}

.photo-band {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 clamp(18px, 5vw, 64px) clamp(44px, 7vw, 86px);
}

.photo-band figure {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.photo-band img {
  aspect-ratio: 4 / 3;
}

.photo-band figcaption {
  color: var(--ink);
  font-weight: 850;
  padding: 14px 16px 16px;
}

.section-band {
  background: #feffe9;
}

.section-heading {
  margin-bottom: 26px;
  max-width: 720px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.category-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-grid article {
  padding: 22px;
}

.category-grid span {
  color: var(--rose);
  display: block;
  font-weight: 900;
  margin-bottom: 18px;
}

.split-section,
.join-section {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
}

.check-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  background: var(--soft);
  border-left: 4px solid var(--mint);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(22, 49, 46, 0.07);
  padding: 14px 16px;
}

.join-section {
  background: var(--ink);
  color: var(--white);
}

.join-section p {
  color: #d4e1dd;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 64px);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--mint-dark);
  font-weight: 750;
}

.notice-strip {
  background: var(--mint-dark);
  color: var(--soft);
  line-height: 1.5;
  padding: 12px clamp(18px, 5vw, 64px);
}

.notice-strip strong {
  color: var(--white);
}

.app-shell {
  display: grid;
  gap: 24px;
}

.app-header {
  position: static;
}

.search-panel {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 4vw, 30px);
}

.filters,
.provider-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 0.88rem;
  font-weight: 750;
  gap: 8px;
}

input,
select,
textarea {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 11px 12px;
  width: 100%;
}

textarea {
  min-height: 116px;
  resize: vertical;
}

.results-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
}

.mobile-card,
.provider-form-section {
  padding: 22px;
}

.side-photo {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  margin-bottom: 18px;
}

.status-pill {
  background: #fffdc1;
  border: 1px solid #d8da8f;
  border-radius: 999px;
  color: var(--sky);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 7px 10px;
}

.matches-header {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

#match-count {
  color: var(--mint-dark);
  font-weight: 850;
  white-space: nowrap;
}

.provider-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.provider-top {
  align-items: center;
  display: flex;
  gap: 12px;
}

.provider-avatar {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--mint-dark);
  display: inline-flex;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.provider-card h3,
.provider-card p {
  margin: 0;
}

.provider-location {
  color: var(--mint-dark);
  font-weight: 850;
}

.provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-tags span {
  background: var(--soft);
  border-radius: 999px;
  color: var(--mint-dark);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 7px 9px;
}

.provider-form-section {
  display: grid;
  gap: 16px;
}

.legal-page {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 64px);
}

.legal-page h1 {
  font-size: clamp(2.2rem, 4vw, 4.25rem);
  margin-bottom: 0;
}

.legal-page section {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.legal-page h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.legal-note {
  border-left: 4px solid var(--gold);
  color: var(--ink);
  font-weight: 650;
  margin-bottom: 6px;
  padding-left: 14px;
}

.legal-list {
  color: var(--muted);
  display: grid;
  gap: 10px;
  line-height: 1.55;
  margin: 0;
  padding-left: 22px;
}

.form-page {
  display: grid;
  gap: 24px;
  margin: 0 auto;
  max-width: 1100px;
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 64px);
}

.landing-page {
  display: grid;
  gap: clamp(28px, 5vw, 54px);
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 64px);
}

.page-grid {
  margin-top: 0;
}

.centered-last-row article:nth-last-child(2):nth-child(3n + 1) {
  grid-column: 1;
}

.centered-last-row article:nth-last-child(1):nth-child(3n + 2) {
  grid-column: 2;
}

.form-intro {
  max-width: 820px;
}

.form-intro h1 {
  font-size: clamp(2.2rem, 4vw, 4.5rem);
}

.long-form {
  display: grid;
  gap: 18px;
}

fieldset {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 20px;
}

legend {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 850;
  padding: 0 8px;
}

.full-span,
.form-help,
.checkbox-grid {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-grid label {
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.checkbox-grid input {
  min-height: auto;
  width: auto;
}

.form-help {
  color: var(--muted);
  margin-bottom: 0;
}

.fee-box {
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
}

.fee-box strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.fee-box p {
  margin-bottom: 0;
}

.provider-photo-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.provider-photo-grid img {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

.provider-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-form label:nth-child(4),
.provider-form label:nth-child(5),
.provider-form label:nth-child(6),
.provider-form button {
  grid-column: 1 / -1;
}

@media (max-width: 920px) {
  .site-header,
  .top-nav {
    align-items: flex-start;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .top-nav {
    order: 3;
    width: 100%;
  }

  .hero,
  .split-section,
  .join-section,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }


  .care-card.featured {
    transform: none;
  }

  .category-grid,
  .filters,
  .provider-grid,
  .photo-band,
  fieldset,
  .checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .centered-last-row article:nth-last-child(2):nth-child(3n + 1),
  .centered-last-row article:nth-last-child(1):nth-child(3n + 2) {
    grid-column: auto;
  }

  .provider-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 14px;
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .header-action {
    width: 100%;
  }

  .top-nav {
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-actions,
  .matches-header {
    align-items: stretch;
    flex-direction: column;
  }


  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .category-grid,
  .filters,
  .provider-grid,
  .provider-form,
  .photo-band,
  .provider-photo-grid,
  .hero-panel,
  fieldset,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
