/* Disability Resource Guide — site styles */

:root {
  --red: #ee1c26;          /* brand mark, non-text accents */
  --red-strong: #dc1720;   /* button fills: white text passes AA */
  --red-hover: #b9111a;
  --red-ink: #c4121b;      /* small red text on white */
  --red-tint: #fdecec;
  --ink: #2d2d2d;
  --ink-2: #565656;
  --ink-3: #6b6b6b;
  --line: #e4e2de;
  --line-strong: #8a8a8a;  /* input borders, 3:1 on white */
  --stone: #f6f5f3;
  --stone-2: #eceae6;
  --white: #ffffff;
  --ink-deep: #1f1f1f;     /* footer, hero ground, dark hover */
  --scrim: 15 15 15;       /* rgb channels for photo scrims */
  --scrollbar: #b9b6b0;
  --success: #17703a;
  --success-tint: #e8f5ec;
  --warning: #8a5a00;
  --warning-tint: #fdf4e3;

  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .06), 0 2px 6px rgb(0 0 0 / .05);
  --shadow: 0 6px 16px rgb(0 0 0 / .08), 0 2px 4px rgb(0 0 0 / .05);
  --shadow-lg: 0 14px 36px rgb(0 0 0 / .14), 0 4px 10px rgb(0 0 0 / .06);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --gutter: clamp(16px, 4vw, 32px);
  --max: 1200px;
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem; --space-9: 6rem;

  --focus: var(--ink);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red-strong);
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 var(--space-4); font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.125rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.005em; }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--red-strong); color: var(--white); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.tabular { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
html { scrollbar-color: var(--scrollbar) transparent; }
:target, [id] { scroll-margin-top: 96px; }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 760px; }

.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-5);
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font: inherit; font-size: 1.0625rem; font-weight: 700; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red-strong); color: var(--white); }
.btn--primary:hover { background: var(--red-hover); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--ink-deep); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--block { width: 100%; white-space: normal; flex-wrap: wrap; text-align: center; padding-block: var(--space-2); line-height: 1.3; }
.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: 1rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px;
  font-weight: 700; text-decoration: none; color: var(--ink);
}
.link-arrow .icon { transition: transform .25s var(--ease-out); }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgb(255 255 255 / .86); backdrop-filter: saturate(1.4) blur(10px); }
}
.site-header__inner { display: flex; align-items: center; gap: var(--space-3); min-height: 68px; }
@media (min-width: 1100px) { .site-header__inner { gap: var(--space-5); min-height: 76px; } }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 22px; width: auto; }
@media (min-width: 420px) { .brand img { height: 26px; } }
@media (min-width: 1100px) { .brand img { height: 27px; } }
.nav { display: none; margin-left: auto; }
.nav ul { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill); white-space: nowrap;
  font-weight: 600; font-size: 1.0625rem; text-decoration: none; color: var(--ink-2);
}
.nav a:hover { background: var(--stone); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--stone); }
.site-header__cta { display: none; }
.header-search {
  display: none; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--ink); flex: none;
}
.header-search:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.nav-mobile__search { display: flex; gap: var(--space-2); margin: var(--space-2) 0 var(--space-3); }
.nav-mobile__search input { flex: 1; min-width: 0; }
.nav-mobile__search .btn { padding-inline: var(--space-4); }

.nav-mobile { margin-left: auto; }
.nav-mobile > summary {
  list-style: none; display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); font-weight: 700; cursor: pointer;
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile[open] > summary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.nav-mobile__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  padding: var(--space-3) var(--gutter) var(--space-5);
}
.nav-mobile__panel ul { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.nav-mobile__panel li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-4) 0; border-bottom: 1px solid var(--line);
  font-size: 1.1875rem; font-weight: 700; text-decoration: none;
}
.nav-mobile__panel li a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .3em; }

@media (min-width: 1100px) {
  .nav { display: block; }
  .site-header__cta { display: inline-flex; }
  .header-search { display: grid; }
  .nav-mobile { display: none; }
}

/* ---------- Alerts ---------- */
.alerts { padding-top: var(--space-4); }
.alert {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm);
  background: var(--stone); font-weight: 600; margin-bottom: var(--space-3);
}
.alert--success { background: var(--success-tint); color: var(--success); }
.alert--warning { background: var(--warning-tint); color: var(--warning); }
.alert--error { background: var(--red-tint); color: var(--red-ink); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; isolation: isolate; color: var(--white); overflow: hidden; background: var(--ink-deep); }
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media { z-index: -2; }
.hero__media img { object-fit: cover; object-position: 60% 45%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(var(--scrim) / .82) 0%, rgb(var(--scrim) / .62) 45%, rgb(var(--scrim) / .1) 80%),
    linear-gradient(0deg, rgb(var(--scrim) / .55) 0%, rgb(var(--scrim) / 0) 40%);
}
@media (max-width: 719px) {
  .hero::before { background: linear-gradient(0deg, rgb(var(--scrim) / .78) 0%, rgb(var(--scrim) / .66) 100%); }
}
.hero__inner {
  min-height: min(82vh, 760px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: var(--space-8) var(--space-8);
  --focus: var(--white);
}
.hero h1 { max-width: 15ch; margin-bottom: var(--space-4); font-size: clamp(2.25rem, 5.4vw, 4rem); letter-spacing: -0.025em; }
.hero__lede { max-width: 34rem; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); color: rgb(255 255 255 / .92); margin-bottom: var(--space-6); }

.hero__reveal { animation: rise .9s var(--ease-out) both; }
.hero__reveal:nth-child(2) { animation-delay: .08s; }
.hero__reveal:nth-child(3) { animation-delay: .16s; }
.hero__reveal:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }

/* ---------- Search pill ---------- */
.search {
  display: grid; grid-template-columns: 1fr; gap: 0;
  width: 100%; max-width: 760px;
  background: var(--white); color: var(--ink);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  --focus: var(--ink);
}
.search__field { position: relative; display: flex; flex-direction: column; padding: var(--space-2) var(--space-4) 0; border-radius: var(--radius-md); }
.search__field:focus-within { background: var(--stone); }
.search__field + .search__field::before { content: ""; position: absolute; left: var(--space-4); right: var(--space-4); top: 0; height: 1px; background: var(--line); }
.search__field label { font-size: .9375rem; font-weight: 700; letter-spacing: .01em; }
.search__field input {
  border: 0; background: transparent; padding: 2px 0 4px; font: inherit; font-size: 1.0625rem;
  color: var(--ink); width: 100%; min-height: 44px;
}
.search__field input::placeholder { color: var(--ink-3); opacity: 1; }
.search__field input:focus { outline: none; }
.search__field:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: -3px; }
.search__submit { margin: var(--space-2); min-height: 52px; }
@media (min-width: 720px) {
  .search { grid-template-columns: 1.25fr 1fr auto; align-items: center; border-radius: var(--radius-pill); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); }
  .search__field { border-radius: var(--radius-pill); padding: var(--space-2) var(--space-5); }
  .search__field + .search__field::before { left: 0; right: auto; top: 22%; bottom: 22%; width: 1px; height: auto; }
  .search__field:focus-within::before, .search__field:focus-within + .search__field::before { opacity: 0; }
  .search__submit { margin: 0; min-height: 56px; padding-inline: var(--space-6); }
}
.search--compact { max-width: 100%; box-shadow: var(--shadow); border: 1px solid var(--line); }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.hero .chips { margin-top: var(--space-5); max-width: 760px; }
.chips__label { font-size: 1rem; font-weight: 600; color: rgb(255 255 255 / .9); margin-right: var(--space-1); align-self: center; }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: 44px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill); font-size: 1rem; font-weight: 600; text-decoration: none;
  background: rgb(255 255 255 / .14); color: var(--white); border: 1px solid rgb(255 255 255 / .38);
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.chip:hover { background: var(--white); color: var(--ink); text-decoration: none; }

/* Tags: fixed vocabulary used everywhere */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.tag {
  display: inline-flex; align-items: center; min-height: 30px; padding: 2px var(--space-3);
  border-radius: var(--radius-pill); font-size: .9375rem; font-weight: 600; line-height: 1.3;
  background: var(--stone); color: var(--ink);
}
.tag--type { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tag--lg { min-height: 44px; padding: var(--space-2) var(--space-4); font-size: 1rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--stone { background: var(--stone); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.section__head h2 { margin: 0; }
.section__head p { margin: var(--space-2) 0 0; color: var(--ink-2); max-width: 46ch; }
.lede { font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); color: var(--ink-2); }

/* ---------- Organisation cards ---------- */
.card-grid { display: grid; gap: var(--space-6) var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); list-style: none; margin: 0; padding: 0; }
.org-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-3) var(--space-3) var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  transition: border-color .2s var(--ease-out), box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.org-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.org-card__body { padding-inline: var(--space-2); }
.org-card--compact { padding: var(--space-5); }
.org-card--compact .org-card__body { padding-inline: 0; }
.org-card__media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-sm);
  background: var(--stone-2);
}
.org-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.org-card:hover .org-card__media img { transform: scale(1.04); }
.org-card__body { flex: 1; }
.org-card__top { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1); }
.monogram {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--stone-2); color: var(--ink); font-size: 1.25rem; font-weight: 800;
}
.org-card__loc { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .9375rem; font-weight: 700; color: var(--ink-2); }
.org-card__loc .icon { width: 1em; height: 1em; }
.org-card__place {
  position: absolute; left: var(--space-3); top: var(--space-3);
  display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 1.5rem);
  padding: 4px var(--space-3); border-radius: var(--radius-pill);
  background: rgb(255 255 255 / .94); font-size: .9375rem; font-weight: 700; box-shadow: var(--shadow-sm);
}
.org-card__place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-card__place .icon { width: 1em; height: 1em; color: var(--ink-2); }
.org-card__body { display: flex; flex-direction: column; gap: var(--space-2); }
.org-card__title { margin: 0; font-size: 1.1875rem; line-height: 1.3; }
.org-card__title a { text-decoration: none; }
.org-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.org-card__title a:focus-visible { outline: none; }
.org-card:has(.org-card__title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.org-card:hover .org-card__title a { text-decoration: underline; }
.org-card__services { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.org-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: auto; }
.org-card__phone {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: 1rem;
  color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums;
}
.org-card__phone:hover { color: var(--red-ink); text-decoration: underline; }
.org-card__phone .icon { width: 1.05em; height: 1.05em; }

/* ---------- Results page ---------- */
.page-band { background: var(--stone); padding-block: var(--space-7) var(--space-6); }
.page-band h1 { margin-bottom: var(--space-2); }
.page-band .lede { margin-bottom: var(--space-5); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-4); padding: 0; font-size: 1rem; color: var(--ink-2); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--line-strong); }
.breadcrumbs a { color: var(--ink-2); }

.results { display: grid; gap: var(--space-6); padding-block: var(--space-6) var(--space-8); }
@media (min-width: 960px) { .results { grid-template-columns: 290px 1fr; gap: var(--space-7); align-items: start; } }

.filters { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.filters > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 56px; padding: 0 var(--space-5); font-weight: 800; font-size: 1.125rem; cursor: pointer;
}
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary .icon--chevron { transition: transform .25s var(--ease-out); }
.filters[open] > summary .icon--chevron { transform: rotate(180deg); }
.filters__body { padding: 0 var(--space-5) var(--space-5); border-top: 1px solid var(--line); }
@media (min-width: 960px) {
  .filters { position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow: auto; }
}
.filter-group { padding: var(--space-5) 0 var(--space-3); }
.filter-group fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filter-group + .filter-group { border-top: 1px solid var(--line); }
.filter-group legend { font-weight: 800; font-size: 1.0625rem; padding: 0; margin-bottom: var(--space-3); }
.checklist { display: grid; gap: 2px; }
.checklist > div, .checklist div > div { margin: 0; }
.checklist label {
  display: flex; align-items: flex-start; gap: var(--space-3);
  min-height: 40px; padding: 8px 0; font-size: 1rem; line-height: 1.4; cursor: pointer;
}
.checklist__more > summary { list-style: none; cursor: pointer; font-weight: 700; padding: 10px 0; text-decoration: underline; text-underline-offset: .2em; }
.checklist__more > summary::-webkit-details-marker { display: none; }
.checklist__more[open] > summary { display: none; }
.filters__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--ink); color: var(--white); font-size: .875rem; }
input[type="checkbox"] { accent-color: var(--red-strong); width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.filters__actions { display: flex; gap: var(--space-3); padding-top: var(--space-4); }
.filters__actions .btn { flex: 1; }

.results__bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-5); }
.results__count { margin: 0; font-size: 1.0625rem; color: var(--ink-2); }
.results__count strong { color: var(--ink); }
.results__clear { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.empty {
  text-align: center; padding: var(--space-8) var(--space-5);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty .icon { width: 44px; height: 44px; margin: 0 auto var(--space-4); color: var(--ink-3); stroke-width: 1.5; }
.empty p { color: var(--ink-2); max-width: 40ch; margin-inline: auto; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-2); margin-top: var(--space-7); }
.pagination a, .pagination span {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 var(--space-3);
  border-radius: var(--radius-pill); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums;
}
.pagination a { border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--ink); }
.pagination [aria-current="page"] { background: var(--ink); color: var(--white); }
.pagination .icon { width: 1.1em; height: 1.1em; }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }
.field label, .filter-group > label { font-weight: 700; font-size: 1rem; }
.field-row { display: grid; gap: 0 var(--space-4); }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.input, .field input, .field textarea, .filter-group input[type="text"] {
  width: 100%; min-height: 50px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: 1.0625rem; color: var(--ink); background: var(--white);
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.field textarea { min-height: 150px; resize: vertical; }
.input:hover, .field input:hover, .field textarea:hover, .filter-group input[type="text"]:hover { border-color: var(--ink); }
.input:focus, .field input:focus, .field textarea:focus, .filter-group input[type="text"]:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(45 45 45 / .18);
}
::placeholder { color: var(--ink-3); opacity: 1; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm); }

/* ---------- Organisation detail ---------- */
.detail { display: grid; gap: var(--space-7); padding-block: var(--space-6) var(--space-8); }
@media (min-width: 960px) { .detail { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.detail__media { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--stone-2); margin-bottom: var(--space-6); }
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__head { margin-bottom: var(--space-6); }
.detail__place { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 700; color: var(--ink-2); margin-bottom: var(--space-3); }
.detail__place .icon { color: var(--ink-2); }
.detail__block { padding-block: var(--space-6); border-top: 1px solid var(--line); }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-5); }
.quick-actions .btn { padding-inline: var(--space-3); }
.quick-actions .btn:only-child { grid-column: 1 / -1; }
@media (min-width: 960px) { .quick-actions { display: none; } }
.detail__block h2 { font-size: 1.5rem; margin-bottom: var(--space-4); }

.contact-card { position: sticky; top: 100px; }
.contact-card h2 { font-size: 1.375rem; margin-bottom: var(--space-5); }
.contact-card .btn { margin-bottom: var(--space-3); }
.contact-list { list-style: none; margin: var(--space-5) 0 0; padding: var(--space-5) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--space-4); }
.contact-list li { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-3); align-items: start; font-size: 1rem; line-height: 1.45; }
.contact-list .icon { margin-top: 1px; color: var(--ink-2); }
.contact-list a { word-break: break-word; }
.contact-list small { display: block; color: var(--ink-2); font-size: .9375rem; font-weight: 600; }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; }
.prose :where(p, ul, ol, h2, h3, h4, blockquote, figure) { margin: 0; }
.prose > * + * { margin-top: var(--space-4); }
.prose > :where(h2, h3, h4) { margin-top: var(--space-7); }
.prose > :where(h2, h3, h4) + * { margin-top: var(--space-3); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.prose h3 { font-size: 1.3125rem; }
.prose blockquote { padding-left: var(--space-5); border-left: 1px solid var(--line-strong); color: var(--ink-2); font-size: 1.1875rem; }
.prose strong { font-weight: 700; }
.prose img { border-radius: var(--radius-sm); margin-block: var(--space-5); }
.prose a { color: var(--red-ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-2); }

/* ---------- Split (image + text) ---------- */
.split { display: grid; gap: var(--space-6) var(--space-8); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--flip .split__media { order: 2; }
}
.split__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--stone-2); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__body > :last-child { margin-bottom: 0; }

.points { list-style: none; margin: var(--space-5) 0 var(--space-6); padding: 0; display: grid; gap: var(--space-5); }
.points li { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-4); }
.points .badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.points h3 { margin: 0 0 4px; font-size: 1.1875rem; }
.points p { margin: 0; color: var(--ink-2); }

/* ---------- CTA band ---------- */
.cta {
  display: grid; gap: var(--space-5) var(--space-7); align-items: center;
  background: var(--ink); color: var(--white); border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  --focus: var(--white);
}
.cta h2 { margin-bottom: var(--space-3); }
.cta p { margin: 0; color: rgb(255 255 255 / .86); max-width: 48ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cta .btn--outline { border-color: rgb(255 255 255 / .7); color: var(--white); }
.cta .btn--outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
@media (min-width: 900px) { .cta { grid-template-columns: 1fr auto; } }

/* ---------- Articles ---------- */
.post-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.post-card__media { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--stone-2); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__title { margin: 0; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.005em; }
.post-card__title a { text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card:hover .post-card__title a { text-decoration: underline; }
.post-card:has(.post-card__title a:focus-visible) .post-card__media { outline: 3px solid var(--focus); outline-offset: 3px; }
.post-card__title a:focus-visible { outline: none; }
.post-card__meta { font-size: .9375rem; color: var(--ink-2); margin: 0; }
.post-card__meta time, .article-meta time { white-space: nowrap; }

.article-head { padding-block: var(--space-7) var(--space-6); }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); color: var(--ink-2); font-size: 1.0625rem; margin-bottom: var(--space-5); }
.article-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 9; background: var(--stone-2); margin-bottom: var(--space-7); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 1.1875rem; line-height: 1.7; padding-bottom: var(--space-8); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: rgb(255 255 255 / .86); padding-block: var(--space-8) var(--space-5); --focus: var(--white); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.footer-brand img { height: 34px; width: auto; margin-bottom: var(--space-5); filter: brightness(0) invert(1); }
.footer-brand p { max-width: 36ch; }
.site-footer h2 { font-size: 1.0625rem; color: var(--white); margin-bottom: var(--space-4); letter-spacing: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-contact p { margin-bottom: var(--space-3); font-size: 1rem; }
.newsletter { display: flex; gap: var(--space-2); margin-top: var(--space-3); max-width: 420px; }
.newsletter input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill); border: 1px solid rgb(255 255 255 / .45);
  background: rgb(255 255 255 / .06); color: var(--white); font: inherit; font-size: 1rem;
}
.newsletter input::placeholder { color: rgb(255 255 255 / .7); }
.newsletter input:focus { outline: 3px solid var(--white); outline-offset: 2px; }
.partners { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.partners li { background: var(--white); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.partners img { height: 52px; width: auto; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3);
  margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid rgb(255 255 255 / .16);
  font-size: .9375rem; color: rgb(255 255 255 / .72);
}

/* ---------- Page-to-page smoothness ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

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

/* ---------- Layout helpers (replace one-off inline styles) ---------- */
.page-band .lede:last-child { margin-bottom: 0; }
.split--top { align-items: start; }
.muted { color: var(--ink-2); }
.panel__title { font-size: 1.375rem; }
.subhead { font-size: 1.5rem; margin-top: var(--space-6); }
.section--flush-top { padding-top: 0; }
.points--tight { margin-top: var(--space-4); }
.split__media--spaced { margin-bottom: var(--space-6); }
.contact-list--plain { border: 0; padding-top: 0; }
.detail .breadcrumbs { margin-top: var(--space-2); }
.container--article { max-width: 1040px; }
.article-more { margin-top: var(--space-7); }
.filters__label { display: inline-flex; align-items: center; gap: var(--space-2); }
@media (min-width: 900px) { .panel--sticky { position: sticky; top: 100px; } }

/* ---------- Form states ---------- */
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red-ink); box-shadow: 0 0 0 3px rgb(196 18 27 / .14); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::before {
  content: ""; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Error pages ---------- */
.error-page { padding-block: clamp(4rem, 12vw, 8rem); text-align: center; }
.error-page__code { font-size: 1rem; font-weight: 700; color: var(--ink-2); margin-bottom: var(--space-3); font-variant-numeric: tabular-nums; }
.error-page h1 { max-width: 18ch; margin-inline: auto; }
.error-page .lede { max-width: 44ch; margin-inline: auto; }
.error-page .search { margin: var(--space-6) auto var(--space-5); text-align: left; }
.error-page__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-5); }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .filters, .pagination, .quick-actions, .cta, .skip-link { display: none !important; }
  body { font-size: 12pt; }
  .contact-card { position: static; box-shadow: none; border: 1px solid #999; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* ---------- Results: phones see answers first ---------- */
.refine > summary { list-style: none; }
.refine > summary::-webkit-details-marker { display: none; }
.refine__summary {
  display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: 0 var(--space-5);
  background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm);
}
.refine__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refine__edit { text-decoration: underline; text-underline-offset: .2em; }
.refine[open] > .refine__summary { display: none; }
@media (max-width: 719px) {
  .page-band--results { padding-block: var(--space-5); }
  .page-band--results h1 { font-size: 1.75rem; margin-bottom: var(--space-4); }
  .page-band--results .lede { display: none; }
  .page-band--results + .results { padding-top: var(--space-4); gap: var(--space-4); }
}
@media (min-width: 720px) { .refine__summary { display: none; } }

.results__bar { flex-direction: column; align-items: flex-start; }
.active-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.active-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-3) 0 var(--space-4);
  border-radius: var(--radius-pill); background: var(--ink); color: var(--white); font-weight: 700; font-size: .9375rem; text-decoration: none;
}
.active-chip:hover { background: var(--ink-deep); }
.active-chip .icon { width: 1.05em; height: 1.05em; }

/* ---------- Cards: one rhythm across a row ---------- */
.monogram--lg { width: 88px; height: 88px; font-size: 2.25rem; background: var(--white); box-shadow: var(--shadow-sm); }
.org-card__more { font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 719px) {
  .card-grid--home > li:nth-child(n+5) { display: none; }
  .chips--hero > li:nth-child(n+6) { display: none; }
}
.card-grid--three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin-bottom: var(--space-7); }
.card-grid--posts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.post-card__excerpt { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Organisation page trust layer ---------- */
.contact-card__note { display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-5) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.contact-card__note .icon { color: var(--success); margin-top: 2px; }
.contact-card__note time { white-space: nowrap; }
.help-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5) var(--space-6); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.help-strip h3 { margin: 0 0 4px; }
.help-strip p { margin: 0; color: var(--ink-2); }
a.tag { background: var(--white); box-shadow: inset 0 0 0 1px var(--line-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a.tag:hover { background: var(--ink); color: var(--white); box-shadow: none; }

/* ---------- Buttons with a secondary note ---------- */
.btn__note { font-weight: 600; font-size: .9375rem; opacity: .9; }
.btn__note::before { content: "· "; }

/* ---------- Footer: one primary contact, the rest on request ---------- */
.footer-more { margin-bottom: var(--space-4); font-size: 1rem; }
.footer-more > summary { cursor: pointer; font-weight: 700; color: var(--white); min-height: 44px; display: flex; align-items: center; }
.footer-more[open] > summary { margin-bottom: var(--space-2); }

/* ---------- Round 2 critique fixes ---------- */
/* Phones: the photo shows the children in its own band, text sits on a solid ground below */
@media (max-width: 719px) {
  .hero { display: flex; flex-direction: column; background: var(--ink-deep); }
  .hero::before { content: none; }
  .hero__media { position: relative; inset: auto; height: 240px; z-index: 0; }
  .hero__media img { object-position: 62% 62%; }
  .hero__inner { min-height: 0; padding-block: var(--space-6) var(--space-7); }
}

/* Contact box: one primary action, a compact secondary row, no repeats */
.contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.contact-actions:empty { display: none; }
.contact-action {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-weight: 700; text-decoration: none;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.contact-action:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.contact-card .btn { margin-bottom: 0; }
.contact-list a { display: inline-flex; align-items: center; min-height: 32px; }

/* Phones: Call and WhatsApp stay in thumb reach on organisation pages */
.action-bar { display: none; }
@media (max-width: 959px) {
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
    padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / .96); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgb(0 0 0 / .06);
  }
  .action-bar .btn:only-child { grid-column: 1 / -1; }
  body:has(.action-bar) .site-footer { padding-bottom: calc(var(--space-5) + 76px); }
}

/* Mobile menu: says Close while open; quiet help line */
.nav-mobile__close, .nav-mobile[open] .nav-mobile__open { display: none; }
.nav-mobile[open] .nav-mobile__close { display: inline; }
.nav-mobile__help { margin: var(--space-4) 0 0; font-size: 1rem; color: var(--ink-2); }
.nav-mobile__help a { font-weight: 700; color: var(--ink); }

/* Help strip actions */
.help-strip__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.results .help-strip { margin-top: var(--space-7); }

/* Filters: applied on tick; empty options are visibly unavailable */
.filters__hint { margin: var(--space-2) 0 0; font-size: .9375rem; color: var(--ink-2); flex-basis: 100%; }
.filters__actions { flex-wrap: wrap; }
.checklist label.is-empty { color: var(--ink-3); cursor: not-allowed; }
.results__sort { color: var(--ink-2); }

/* Learning: articles hand back to the directory */
.article-next { margin-top: var(--space-8); padding: var(--space-6); border-radius: var(--radius); background: var(--stone); }
.article-next h2 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.article-next p { color: var(--ink-2); }
.article-next__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }

/* Footer contact list: every number visible, comfortable targets */
.footer-help { color: rgb(255 255 255 / .86); font-size: 1rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 36px; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 36px; }

/* Native datalist arrow is an unstyled browser artefact in the search pill */
.search__field input::-webkit-calendar-picker-indicator { display: none !important; }
