:root {
  --tint-1: #D6F2EC;
  --tint-2: #FFE4D1;
  --tint-3: #FFF0BA;
  --tint-4: #E2E7FF;
  --tint-5: #FFDDE1;
  --tint-6: #E1F3D3;
  --hdr: 92px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Hero */
.forms-hero { padding-top: 0.25rem; }
.hero-panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem;
  padding: clamp(2.25rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: 2rem;
  background: linear-gradient(140deg, #fff 0%, #F4FCFA 45%, var(--bg-2) 100%);
  border: 1px solid var(--line);
}
.hero-panel::before, .hero-panel::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(10px);
}
.hero-panel::before {
  width: 26rem; height: 26rem; right: -6rem; top: -10rem;
  background: radial-gradient(circle, color-mix(in srgb, #FFCF33 38%, transparent), transparent 68%);
}
.hero-panel::after {
  width: 22rem; height: 22rem; right: 12rem; bottom: -14rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 68%);
}
.hero-panel h1 {
  font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; max-width: 13ch;
}
.hero-panel h1 em {
  font-style: normal; color: var(--brand);
  background: linear-gradient(transparent 68%, color-mix(in srgb, #FFCF33 55%, transparent) 68% 92%, transparent 92%);
}
.hero-panel .lede { margin-top: 1rem; max-width: 34rem; font-size: clamp(1.02rem, 1.6vw, 1.15rem); }

.hero-search { position: relative; display: block; margin-top: 1.75rem; max-width: 32rem; }
.hero-search svg {
  position: absolute; left: 1.2rem; top: 50%; translate: 0 -50%;
  width: 20px; height: 20px; color: var(--brand); pointer-events: none;
}
.hero-search input {
  width: 100%; height: 3.6rem;
  font: inherit; font-size: 1.05rem; color: var(--ink);
  padding: 0 1.25rem 0 3.2rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 20px 40px -28px rgba(0, 60, 58, 0.55);
  transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.hero-search input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.hero-search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 14%, transparent), 0 20px 40px -28px rgba(0, 60, 58, 0.55);
}

.steps {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem;
}
.steps li { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.steps li > span {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 800; color: #fff; background: var(--brand);
}

.hero-art { position: relative; width: 15rem; height: 17rem; margin-right: 1rem; }
.doc {
  position: absolute; inset: 1.5rem 1.5rem auto auto;
  width: 11rem; height: 14rem; padding: 1.1rem 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 1.2rem;
  box-shadow: 0 30px 50px -30px rgba(0, 60, 58, 0.45);
}
.doc i { display: block; height: 0.5rem; margin-top: 0.6rem; border-radius: 99px; background: var(--bg-2); }
.doc i:nth-of-type(2) { width: 70%; }
.doc i:nth-of-type(4) { width: 55%; }
.doc b {
  display: inline-block; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em;
  color: #fff; background: var(--accent); border-radius: 0.35rem; padding: 0.2rem 0.4rem;
}
.doc.d1 { rotate: -11deg; translate: -3.2rem 1.2rem; background: #FFFCEF; }
.doc.d2 { rotate: 7deg; translate: 1rem -0.8rem; background: #F7F8FF; }
.doc.d3 { rotate: -2deg; }
.doc-dl {
  position: absolute; right: -0.9rem; bottom: -0.9rem;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  box-shadow: 0 16px 30px -12px var(--brand);
  animation: bob 3.2s var(--ease) infinite;
}
.doc-dl svg { width: 24px; height: 24px; }
@keyframes bob { 50% { translate: 0 -6px; } }

/* Filters */
.filters { margin-top: 1.75rem; scroll-margin-top: calc(var(--hdr) + 1rem); }
.filters-label {
  margin: 0 0 0.7rem;
  font-family: Figtree, sans-serif; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.45rem 0.5rem 0.45rem 0.9rem;
  font: inherit; font-size: 0.95rem; font-weight: 650; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
  transition: background-color 250ms var(--ease), color 250ms var(--ease), border-color 250ms var(--ease), opacity 250ms var(--ease);
}
.chip:hover { border-color: color-mix(in srgb, var(--ci, var(--brand)) 45%, transparent); }
.chip::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--ci); }
.chip-all { --ci: var(--brand); }
.chip .count {
  min-width: 1.6rem; margin-left: auto; text-align: center; padding: 0.12rem 0.45rem;
  font-size: 0.75rem; font-weight: 800; border-radius: 999px;
  background: var(--bg); color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .count { background: rgba(255, 255, 255, 0.16); color: #fff; }
.chip.dim { opacity: 0.45; }

.status {
  position: sticky; top: var(--hdr); z-index: 30;
  transition: top 320ms cubic-bezier(.2, .8, .2, 1);
}
.site-header.hide ~ main .status { top: 0; }
.status-bar {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 1rem 0 0; padding: 0.45rem 0.45rem 0.45rem 1rem;
  color: #fff; background: var(--ink); border-radius: 999px;
  box-shadow: 0 16px 32px -20px rgba(15, 42, 46, 0.7);
  animation: status-in 350ms var(--ease);
}
.status-bar[hidden] { display: none; }
.status-bar > svg { flex: none; width: 17px; height: 17px; color: #7FE0D2; }
.status-text { flex: 1; min-width: 0; font-size: 0.95rem; line-height: 1.3; color: rgba(255, 255, 255, 0.82); }
.status-text b { color: #fff; font-weight: 700; }
.clear {
  flex: none; display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 2.4rem; padding: 0 0.95rem;
  font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--ink);
  background: #fff; border: 0; border-radius: 999px; cursor: pointer;
}
.clear svg { width: 14px; height: 14px; }
.clear:hover { background: var(--bg-2); }
.clear-soft { display: flex; margin: 1rem auto 0; background: var(--ink); color: #fff; }
.clear-soft:hover { background: var(--brand-dark); }
@keyframes status-in { from { opacity: 0; translate: 0 -6px; } }

/* Groups */
.g-new { --c: var(--tint-1); --ci: #00827C; }
.g-well { --c: var(--tint-3); --ci: #A87300; }
.g-autism { --c: var(--tint-4); --ci: #4453C4; }
.g-dep { --c: var(--tint-6); --ci: #3E7B1C; }
.g-anx { --c: var(--tint-5); --ci: #C23A48; }
.g-adhd { --c: var(--tint-2); --ci: #C0560F; }

.groups { display: grid; gap: clamp(2.75rem, 6vw, 4.25rem); padding-top: clamp(1.75rem, 4vw, 2.75rem); }
.group { scroll-margin-top: calc(var(--hdr) + 4.5rem); }
.group[hidden] { display: none; }
.group-head { margin-bottom: 1.35rem; }
.group-title { display: flex; align-items: center; gap: 0.9rem; }
.group-icon {
  flex: none; width: 3.25rem; height: 3.25rem; border-radius: 1.05rem;
  display: grid; place-items: center;
  background: var(--c); color: var(--ci);
}
.group-icon svg { width: 24px; height: 24px; }
.group-head h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 800; }
.group-head p { margin: 0.7rem 0 0; max-width: 44rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.tag {
  display: inline-flex; align-items: center;
  font-size: 0.8rem; font-weight: 700; line-height: 1;
  padding: 0.42rem 0.7rem; border-radius: 999px;
  background: #fff; color: var(--muted); border: 1px solid var(--line);
}
.tag-strong { background: var(--c); color: color-mix(in srgb, var(--ci) 80%, #000); border-color: transparent; }

/* Form cards */
.forms {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.85rem;
}
.form {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.1rem 1.1rem 0.95rem;
  background: #fff; border: 1px solid var(--line); border-radius: 1.4rem;
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease), border-color 350ms var(--ease);
}
.form:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--ci) 35%, transparent);
  box-shadow: 0 24px 40px -30px rgba(0, 60, 58, 0.55);
}
.form-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.file { position: relative; flex: none; width: 2.6rem; height: 3.15rem; color: var(--ci); --fc: var(--c); }
.file svg { width: 100%; height: 100%; }
.file b {
  position: absolute; left: 50%; bottom: 0.45rem; translate: -50% 0;
  font-size: 0.56rem; font-weight: 800; letter-spacing: 0.06em; line-height: 1;
  color: #fff; background: var(--ci); border-radius: 0.3rem; padding: 0.18rem 0.26rem;
}
.form h3 { margin-top: 0.95rem; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.form h3 a { text-decoration: none; }
.form h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.form h3 a:focus-visible { outline: none; }
.form:has(h3 a:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.form p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.94rem; line-height: 1.45; }
.form p { margin-bottom: 1rem; }
.form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-top: auto; padding-top: 0.8rem; border-top: 1px solid var(--line);
  font-size: 0.8rem; color: color-mix(in srgb, var(--muted) 85%, transparent);
}
.fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.size { flex: none; font-weight: 700; }

.dl {
  position: relative; z-index: 1; flex: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.85rem 0.5rem 0.7rem;
  font-size: 0.88rem; font-weight: 700; text-decoration: none;
  color: var(--brand-dark); background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  transition: background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.dl svg { width: 17px; height: 17px; }
.form:hover .dl, .dl:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.dl:hover svg { animation: nudge 700ms var(--ease); }
@keyframes nudge { 40% { translate: 0 3px; } }

/* Age tiles */
.band-baby { --b: var(--tint-3); --bi: #A87300; }
.band-toddler { --b: var(--tint-2); --bi: #C0560F; }
.band-pre { --b: var(--tint-4); --bi: #4453C4; }
.band-school { --b: var(--tint-1); --bi: #00827C; }

.bands { display: grid; gap: 1.6rem; }
.age-band[hidden], .age-card[hidden], .form[hidden] { display: none; }
.age-band h3 {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0 0 0.75rem;
  font-family: Figtree, sans-serif; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bi);
}
.age-band h3 span { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.age-band h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ages {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.65rem;
}
.age-card a {
  position: relative;
  display: flex; flex-direction: column; height: 100%; min-height: 8.25rem;
  padding: 0.9rem 0.95rem 0.85rem;
  text-decoration: none;
  background: linear-gradient(160deg, var(--b) 0%, color-mix(in srgb, var(--b) 30%, #fff) 100%);
  border: 1px solid color-mix(in srgb, var(--bi) 14%, transparent); border-radius: 1.3rem;
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease);
}
.age-card a:hover { transform: translateY(-3px); box-shadow: 0 22px 36px -26px color-mix(in srgb, var(--bi) 80%, transparent); }
.age {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 2.15rem; letter-spacing: -0.05em; line-height: 1; color: var(--ink);
}
.age small { margin-left: 0.15rem; font-size: 0.95rem; letter-spacing: -0.01em; color: var(--bi); }
.age.range { font-size: 1.65rem; }
.age.range small { font-size: 0.85rem; }
.age-name { margin-top: auto; padding: 0.75rem 2.4rem 0 0; font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
.age-meta { font-size: 0.78rem; color: var(--muted); }
.age-dl {
  position: absolute; bottom: 0.75rem; right: 0.7rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.85); color: var(--bi);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.age-dl svg { width: 16px; height: 16px; }
.age-card a:hover .age-dl { background: var(--bi); color: #fff; }

/* Empty + CTA */
.empty {
  text-align: center; padding: 3rem 1rem;
  background: #fff; border: 1px dashed var(--line); border-radius: 1.75rem; color: var(--muted);
}
.empty b { display: block; color: var(--ink); font-size: 1.15rem; margin-bottom: 0.25rem; }
.empty[hidden] { display: none; }

.forms-cta {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: 2rem; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.forms-cta::before {
  content: ""; position: absolute; z-index: -1; width: 24rem; height: 24rem; right: -6rem; top: -12rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 207, 51, 0.35), transparent 65%);
}
.forms-cta h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; max-width: 20ch; }
.forms-cta p { margin: 0.45rem 0 0; color: rgba(255, 255, 255, 0.85); }
.forms-cta .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.forms-cta .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: none; }
.btn-line { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-line:hover { border-color: #fff; }

/* Scroll reveal */
.js .rv { opacity: 0; translate: 0 18px; transition: opacity 700ms var(--ease), translate 700ms var(--ease); }
.js .rv.in { opacity: 1; translate: none; }

@media (min-width: 1000px) {
  .groups { gap: 2.75rem; }
  .group {
    display: grid; grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr); gap: 1.25rem 3rem; align-items: start;
    padding-top: 2.75rem; border-top: 1px solid var(--line);
  }
  .group-head { position: sticky; top: calc(var(--hdr) + 5rem); align-self: start; margin: 0; }
  .group-title { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .group-head h2 { font-size: 1.75rem; }
  .group-head p { font-size: 1rem; }
  .ages { grid-template-columns: repeat(auto-fill, minmax(7.75rem, 1fr)); }
}
@media (max-width: 900px) {
  .hero-panel { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
@media (max-width: 640px) {
  .hero-panel { border-radius: 1.6rem; padding: 2rem 1.25rem 1.5rem; }
  .hero-search input { height: 3.3rem; font-size: 1rem; }
  .steps { flex-direction: column; gap: 0.5rem; }
  .chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip-all { grid-column: 1 / -1; }
  .chip { padding-right: 0.45rem; font-size: 0.92rem; text-align: left; }
  .status-bar { padding-left: 0.85rem; }
  .status-text { font-size: 0.88rem; }
  .group-icon { width: 2.75rem; height: 2.75rem; border-radius: 0.9rem; }
  .group-icon svg { width: 21px; height: 21px; }
  .group-title { gap: 0.75rem; }
  .ages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forms-cta { border-radius: 1.6rem; }
  .forms-cta .actions, .forms-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .form, .age-card a, .dl, .chip, .status { transition: none; }
  .status-bar { animation: none; }
  .form:hover, .age-card a:hover { transform: none; }
  .dl:hover svg, .doc-dl { animation: none; }
  .js .rv { opacity: 1; translate: none; transition: none; }
}
