/* ==========================================================================
   Lebona — Design System
   A trusted space. Warm, editorial, calm.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Evergreen — primary. Deep but luminous: no near-blacks anywhere. */
  --green-900: #0F3A31;
  --green-800: #16483D;
  --green-700: #1D5A4B;
  --green-600: #256E5C;
  --green-500: #34866F;
  --green-300: #8FC0AE;
  --green-100: #D9EAE1;
  --green-50:  #EDF5F0;

  /* Clay — the warm accent */
  --clay-800: #8A4022;
  --clay-700: #A8512C;
  --clay-600: #C86A3C;
  --clay-500: #DD8656;
  --clay-300: #EFB894;
  --clay-100: #F9E4D5;

  /* Ochre — pan-African secondary, used sparingly for light and warmth */
  --ochre-700: #A87724;
  --ochre-600: #C8912F;
  --ochre-500: #DFA945;
  --ochre-300: #EFCE8E;
  --ochre-100: #F9EDD3;

  /* Sand — canvas, a touch warmer */
  --sand-50:  #FFFDF8;
  --sand-100: #FCF8F0;
  --sand-200: #F5EFE2;
  --sand-300: #ECE3D2;
  --sand-400: #DBCEB6;
  --sand-500: #C6B79C;

  /* Ink — text */
  --ink-900: #171510;
  --ink-800: #262319;
  --ink-700: #3C382C;
  --ink-600: #5A5545;
  --ink-500: #78725F;
  --ink-400: #9A937E;

  /* Signal */
  --alert-700: #8E2A21;
  --alert-600: #B03A2E;
  --alert-100: #F8DED9;

  /* Semantic */
  --bg:          var(--sand-100);
  --bg-raised:   var(--sand-50);
  --bg-sunken:   var(--sand-200);
  --text:        var(--ink-800);
  --text-muted:  var(--ink-600);
  --text-faint:  var(--ink-400);
  --line:        var(--sand-300);
  --line-strong: var(--sand-400);
  --accent:      var(--clay-700);

  /* Type */
  --font-display: "Plus Jakarta Sans", "Noto Sans Ethiopic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", "Noto Sans Ethiopic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Fluid type scale — 1.22 ratio, clamped */
  --t-xs:   0.75rem;
  --t-sm:   0.8125rem;
  --t-base: 0.9375rem;
  --t-md:   1.0625rem;
  --t-lg:   clamp(1.125rem, 0.3vw + 1.05rem, 1.25rem);
  --t-xl:   clamp(1.375rem, 0.7vw + 1.2rem, 1.75rem);
  --t-2xl:  clamp(1.55rem, 1.1vw + 1.25rem, 2.1rem);
  --t-3xl:  clamp(1.95rem, 1.9vw + 1.35rem, 2.9rem);
  --t-4xl:  clamp(2.35rem, 3vw + 1.3rem, 3.9rem);
  --t-5xl:  clamp(3.25rem, 6.4vw + 1.5rem, 6.75rem);

  /* Space */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.5rem;   --sp-6: 2rem;
  --sp-7: 2.75rem;  --sp-8: 3.5rem;   --sp-9: 5rem;
  --sp-10: 7rem;    --sp-11: 9.5rem;

  /* Structure */
  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --page: 78rem;
  --page-wide: 88rem;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(23,21,16,.05), 0 1px 1px rgba(23,21,16,.03);
  --shadow-md: 0 2px 4px rgba(23,21,16,.04), 0 8px 20px -8px rgba(23,21,16,.10);
  --shadow-lg: 0 4px 8px rgba(23,21,16,.04), 0 24px 48px -16px rgba(23,21,16,.16);
  --shadow-xl: 0 8px 16px rgba(23,21,16,.05), 0 40px 80px -24px rgba(23,21,16,.22);

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* --- 2. Reset ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

/* Author display rules (.btn, .card, .post…) outrank the UA [hidden] rule, so restate it. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--clay-100); color: var(--clay-800); }

/* --- 3. Typography ------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.display {
  font-size: var(--t-5xl);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.042em;
}
.h1 { font-size: var(--t-4xl); font-weight: 800; line-height: 1.04; letter-spacing: -0.038em; }
.h2 { font-size: var(--t-3xl); font-weight: 700; line-height: 1.08; letter-spacing: -0.032em; }
.h3 { font-size: var(--t-2xl); font-weight: 700; line-height: 1.16; letter-spacing: -0.026em; }
.h4 { font-size: var(--t-xl); font-weight: 700; line-height: 1.28; letter-spacing: -0.02em; }

/* Legacy hook — now the display sans, kept so existing markup keeps working. */
.serif { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }

.lede {
  font-size: var(--t-lg);
  line-height: 1.58;
  color: var(--text-muted);
  max-width: 38rem;
  text-wrap: pretty;
}

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose p { text-wrap: pretty; color: var(--text-muted); }
.prose h2 { margin-top: 2.2em; margin-bottom: .55em; font-size: var(--t-2xl); }
.prose h3 { margin-top: 1.9em; margin-bottom: .45em; font-size: var(--t-xl); }
.prose strong { font-weight: 600; color: var(--ink-800); }
.prose a { color: var(--clay-700); text-decoration: underline;
           text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--clay-800); }

/* Eyebrow / label */
.label {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-faint);
  font-feature-settings: "tnum" 1;
}
.label--accent { color: var(--clay-700); }
.label--light { color: var(--green-300); }
.label::before {
  content: "";
  width: 1.75rem; height: 1px;
  background: currentColor;
  opacity: .5;
  flex: none;
}
.label--bare::before { display: none; }

.num {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .06em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: var(--t-base); }

/* --- 4. Layout ----------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: var(--page-wide); }
.wrap--narrow { max-width: 54rem; }

.section { padding-block: clamp(3.5rem, 8vw, var(--sp-10)); }
.section--tight { padding-block: clamp(2.5rem, 5vw, var(--sp-8)); }
.section--tall { padding-block: clamp(4.5rem, 11vw, var(--sp-11)); }

.rule { height: 1px; background: var(--line); border: 0; }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.grid { display: grid; gap: var(--sp-6); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

/* Editorial split: sticky heading beside flowing content */
.split {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}
.split__aside { position: sticky; top: 7rem; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-6); }
  .split__aside { position: static; }
}

.section-head { max-width: 44rem; }
.section-head .label { margin-bottom: var(--sp-4); }
.section-head .lede { margin-top: var(--sp-4); }

/* --- 5. Surfaces --------------------------------------------------------- */

.on-dark {
  position: relative;
  background:
    radial-gradient(120% 90% at 82% 8%, rgba(223,169,69,.20), transparent 58%),
    radial-gradient(90% 80% at 12% 96%, rgba(200,106,60,.18), transparent 62%),
    linear-gradient(163deg, #16483D 0%, #1D5A4B 46%, #27735F 100%);
  color: var(--sand-100);
  --text: var(--sand-100);
  --text-muted: #C3DAD0;
  --text-faint: #96B7AB;
  --line: rgba(255,253,249,.17);
  --line-strong: rgba(255,253,249,.28);
  --bg-raised: rgba(255,253,249,.07);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--sand-50); }
.on-sand { background: var(--sand-200); }
.on-paper { background: var(--sand-50); }

.grain::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
}
.on-dark.grain::before { mix-blend-mode: soft-light; opacity: .3; }

/* --- 6. Buttons ---------------------------------------------------------- */

.btn {
  --btn-bg: var(--green-700);
  --btn-fg: var(--sand-50);
  --btn-bd: var(--green-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: .85em 1.5em;
  font-size: var(--t-base);
  font-weight: 500;
  letter-spacing: .005em;
  line-height: 1.2;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-full);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .28s var(--ease-out), background-color .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease), box-shadow .28s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { flex: none; transition: transform .3s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn--lg { padding: 1.05em 1.9em; font-size: var(--t-md); }
.btn--sm { padding: .6em 1.1em; font-size: var(--t-sm); }
.btn--block { display: flex; width: 100%; }

.btn--accent { --btn-bg: var(--clay-700); --btn-bd: var(--clay-700); }
.btn--accent:hover { --btn-bg: var(--clay-800); --btn-bd: var(--clay-800); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--ink-800); --btn-bd: var(--line-strong);
}
.btn--ghost:hover { --btn-bd: var(--ink-800); --btn-bg: transparent; box-shadow: none; }
.btn--light { --btn-bg: var(--sand-50); --btn-fg: var(--green-800); --btn-bd: var(--sand-50); }
.btn--outline-light {
  --btn-bg: transparent; --btn-fg: var(--sand-100); --btn-bd: rgba(255,253,249,.32);
}
.btn--outline-light:hover { --btn-bd: var(--sand-100); box-shadow: none; }

/* Text link with animated underline */
.link {
  display: inline-flex; align-items: center; gap: .45em;
  font-size: var(--t-base); font-weight: 500;
  color: var(--clay-700);
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .4s var(--ease-out), color .2s;
}
.link:hover { background-size: 0% 1px; background-position: 100% 100%; }
.link svg { transition: transform .3s var(--ease-out); }
.link:hover svg { transform: translateX(3px); }

.link--quiet { color: var(--text); background-size: 0% 1px; }
.link--quiet:hover { background-size: 100% 1px; background-position: 0 100%; }

/* --- 7. Pills & badges --------------------------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .38em .85em;
  font-size: var(--t-xs); font-weight: 500;
  letter-spacing: .02em;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  background: var(--bg-raised);
}
.pill--green { background: var(--green-50); border-color: var(--green-100); color: var(--green-700); }
.pill--clay { background: var(--clay-100); border-color: var(--clay-300); color: var(--clay-800); }
.pill--dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}

/* --- 8. Cards ------------------------------------------------------------ */

.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--sp-6);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .3s var(--ease), transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.card__icon { margin-bottom: var(--sp-5); color: var(--green-600); align-self: flex-start; }
/* .card is a column flex container, so inline children would otherwise stretch full width. */
.card > .pill, .card > .num, .card > .label { align-self: flex-start; }
.card h3 { font-size: var(--t-lg); margin-bottom: var(--sp-3); letter-spacing: -0.012em; }
.card p { color: var(--text-muted); font-size: var(--t-base); line-height: 1.6; }
.card__foot { margin-top: auto; padding-top: var(--sp-5); }

a.card:hover, .card--hover:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Numbered editorial list */
.ledger { border-top: 1px solid var(--line); }
.ledger__row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--sp-5);
  padding-block: var(--sp-6);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.ledger__row h3 { font-size: var(--t-xl); }
.ledger__row p { color: var(--text-muted); font-size: var(--t-base); }
@media (max-width: 760px) {
  .ledger__row { grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--sp-3) var(--sp-4); }
  .ledger__row > * + * { grid-column: 2; }
}

/* --- 9. Header ----------------------------------------------------------- */

.crisis-bar {
  background: linear-gradient(90deg, #123F35, #1B5546 60%, #226354);
  color: #DDEDE5;
  font-size: var(--t-sm);
}
.crisis-bar__inner {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-4); flex-wrap: wrap;
  padding-block: .65rem;
  text-align: center;
}
.crisis-bar a {
  color: #fff; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.35);
  padding-bottom: 1px;
  transition: border-color .2s;
}
.crisis-bar a:hover { border-color: #fff; }
.crisis-bar__pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clay-500); flex: none;
  box-shadow: 0 0 0 0 rgba(206,123,90,.7);
  animation: pulse 2.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(206,123,90,.55); }
  70% { box-shadow: 0 0 0 9px rgba(206,123,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(206,123,90,0); }
}

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,247,240,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.masthead.is-stuck { border-bottom-color: var(--line); }

.masthead__inner {
  display: flex; align-items: center; gap: var(--sp-6);
  height: 4.5rem;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; flex: none; }
.brand__mark { flex: none; }
.brand__word {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--green-800);
  line-height: 1;
}
.brand__word em {
  font-style: normal;
  display: block;
  font-family: var(--font-sans);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-faint);
  margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: .1rem; margin-left: auto; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: .35em;
  white-space: nowrap;
  padding: .55rem .7rem;
  font-size: var(--t-base); font-weight: 450;
  color: var(--ink-700);
  border-radius: var(--r-full);
  transition: color .2s, background-color .2s;
}
.nav__link:hover, .nav__item:focus-within .nav__link { color: var(--green-700); background: rgba(20,60,52,.06); }
.nav__link[aria-current="page"] { color: var(--green-700); font-weight: 500; }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: -.15rem;
  height: 2px; background: var(--clay-600); border-radius: 2px;
}
.nav__chev { transition: transform .25s var(--ease); opacity: .5; }
.nav__item:hover .nav__chev, .nav__item:focus-within .nav__chev { transform: rotate(180deg); opacity: 1; }

.dropdown {
  position: absolute; top: calc(100% + .5rem); left: 50%;
  transform: translate(-50%, 8px);
  min-width: 19rem;
  padding: .5rem;
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transition: opacity .22s var(--ease), transform .28s var(--ease-out), visibility .22s;
}
.nav__item:hover .dropdown, .nav__item:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.dropdown a {
  display: block; padding: .65rem .8rem; border-radius: var(--r-md);
  transition: background-color .18s;
}
.dropdown a:hover { background: var(--sand-200); }
.dropdown strong { display: block; font-size: var(--t-base); font-weight: 500; color: var(--ink-800); }
.dropdown span { display: block; font-size: var(--t-sm); color: var(--text-faint); margin-top: 1px; }

.masthead__actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

/* Country + language picker */
.region { position: relative; }
.region__btn {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .5rem .8rem; font-size: var(--t-sm); font-weight: 500;
  color: var(--text-muted); border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  transition: border-color .2s, color .2s, background-color .2s;
  white-space: nowrap;
}
.region__btn:hover, .region__btn[aria-expanded="true"] {
  border-color: var(--ink-700); color: var(--ink-900);
}
.region__btn[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }
.region__panel {
  position: absolute; top: calc(100% + .5rem); right: 0;
  width: 20rem; padding: .75rem;
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 20;
}
.region__panel h4 {
  font-family: var(--font-sans); font-size: var(--t-sm); font-weight: 600;
  color: var(--text-faint); padding: .5rem .6rem .35rem;
}
.region__opt {
  display: block; width: 100%; text-align: left;
  padding: .55rem .6rem; border-radius: var(--r-md);
  transition: background-color .18s;
}
.region__opt:hover { background: var(--sand-200); }
.region__opt strong { display: block; font-size: var(--t-base); font-weight: 500; color: var(--ink-800); }
.region__opt span { display: block; font-size: var(--t-sm); color: var(--text-faint); margin-top: 1px; }
.region__opt.is-selected { background: var(--green-50); }
.region__opt.is-selected strong { color: var(--green-700); font-weight: 600; }
.region__opt.is-selected::after {
  content: "✓"; float: right; margin-top: -1.35rem; color: var(--green-700); font-size: var(--t-base);
}
.region__note {
  font-size: var(--t-sm); color: var(--text-faint);
  padding: .6rem; margin-top: .35rem; border-top: 1px solid var(--line); line-height: 1.5;
}
/* In the mobile drawer the picker is inline, not a popover. */
.drawer .region { width: 100%; }
.drawer .region__btn { width: 100%; justify-content: space-between; padding: .7rem 1rem; }
.drawer .region__panel { position: static; width: 100%; box-shadow: none; margin-top: .5rem; }

.burger {
  display: none; width: 2.75rem; height: 2.75rem;
  align-items: center; justify-content: center;
  border-radius: var(--r-full); border: 1px solid var(--line-strong);
}
.burger span {
  display: block; width: 17px; height: 1.5px; background: var(--ink-800);
  border-radius: 2px; position: relative;
  transition: transform .3s var(--ease-out), opacity .2s;
}
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.5px;
  background: var(--ink-800); border-radius: 2px;
  transition: transform .3s var(--ease-out);
}
.burger span::before { top: -5.5px; }
.burger span::after { top: 5.5px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { transform: translateY(5.5px) rotate(45deg); }
body.nav-open .burger span::after { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 1220px) {
  .nav, .masthead__actions > .region { display: none; }
  /* .nav carried the margin-left:auto that pushed the actions right; without it
     the button and burger bunch up against the wordmark. */
  .masthead__actions { margin-left: auto; }
  .burger { display: inline-flex; }
  .masthead__inner { gap: var(--sp-4); }
}
@media (max-width: 560px) {
  /* Keep the primary action reachable; just make it compact. */
  .masthead__actions .btn { padding: .6rem 1rem; font-size: var(--t-sm); }
  .brand__word { font-size: 1.15rem; }
  .brand__word em { display: none; }
  .masthead__inner { height: 4rem; gap: var(--sp-3); }
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 95;
  background: var(--sand-100);
  padding: 9.5rem var(--gutter) var(--sp-7);
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transform: translateY(-1.5rem);
  transition: opacity .3s var(--ease), transform .4s var(--ease-out), visibility .3s;
}
body.nav-open .drawer { opacity: 1; visibility: visible; transform: none; }
body.nav-open { overflow: hidden; }
.drawer__group + .drawer__group { margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.drawer__group h4 { font-family: var(--font-sans); font-size: var(--t-sm); font-weight: 600;
  color: var(--text-faint); margin-bottom: var(--sp-3); }
.drawer a.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 0; font-family: var(--font-display); font-size: var(--t-xl); font-weight: 700;
  color: var(--ink-900); letter-spacing: -0.03em;
}
.drawer a.drawer__link:hover { color: var(--clay-700); }

/* --- 10. Footer ---------------------------------------------------------- */

.footer {
  position: relative; overflow: hidden;
  color: var(--green-100);
  background:
    radial-gradient(80% 120% at 88% 0%, rgba(223,169,69,.16), transparent 60%),
    linear-gradient(168deg, #123F35 0%, #16483D 55%, #1B5546 100%);
}
.footer a { color: var(--green-100); }
.footer__top { padding-block: clamp(3rem, 7vw, 5.5rem); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-6) var(--sp-5);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 {
  font-family: var(--font-sans); font-size: var(--t-base); font-weight: 600;
  letter-spacing: -0.005em; color: var(--green-300);
  margin-bottom: var(--sp-4);
}
.footer__links li + li { margin-top: .6rem; }
.footer__links a {
  font-size: var(--t-base); color: rgba(214,228,222,.82);
  transition: color .2s;
}
.footer__links a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: var(--sp-5);
  display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6);
  align-items: center; justify-content: space-between;
  font-size: var(--t-sm); color: rgba(214,228,222,.6);
}
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: var(--sp-5); }

/* --- 11. Reveal animation ------------------------------------------------ */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* --- 12. Hero (full-bleed) ---------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(92vh, 900px);
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  color: var(--ink-800);
  background: var(--sand-100);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg > * { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(253,250,243,.82) 0%, rgba(253,250,243,.62) 34%,
                             rgba(253,250,243,.22) 60%, rgba(253,250,243,0) 100%),
    linear-gradient(to top, rgba(253,250,243,.34) 0%, transparent 48%);
}
@media (max-width: 860px) {
  .hero__scrim {
    background: linear-gradient(to top, rgba(253,250,243,.94) 16%, rgba(253,250,243,.78) 56%, rgba(253,250,243,.46) 100%);
  }
}

.hero__inner { width: 100%; max-width: 54rem; position: relative; }
.hero__title { margin-block: var(--sp-5) var(--sp-5); color: var(--ink-900); }
.hero__title .accent { color: var(--clay-700); }
.hero .lede { color: var(--text-muted); max-width: 38rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-7); align-items: center; }
.hero__note {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  margin-top: var(--sp-6); font-size: var(--t-base); color: var(--text-faint);
}

/* Country chips sitting under the hero copy */
.hero__where {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

/* Three-step strip anchored to the bottom of the hero */
.hero__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 760px) { .hero__steps { grid-template-columns: 1fr; } }
.hero__step {
  background: rgba(255,253,248,.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--sp-5);
}
.hero__step .num { color: var(--clay-700); }
.hero__step h3 {
  font-size: var(--t-base); font-weight: 600; color: var(--ink-900);
  margin-top: .55rem; letter-spacing: -0.01em; line-height: 1.35;
}
.hero__step p { font-size: var(--t-sm); color: var(--text-muted); margin-top: .3rem; }

/* Marquee of trust signals */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: var(--sp-4);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex; gap: var(--sp-8); width: max-content;
  animation: slide 42s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.ticker__item {
  display: flex; align-items: center; gap: .6rem;
  font-size: var(--t-base); color: var(--text-faint);
  white-space: nowrap;
}
.ticker__item svg { color: var(--green-500); opacity: .8; }

/* --- 13. Stats ----------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--bg); padding: var(--sp-6) var(--sp-5); }
.on-dark .stat { background: rgba(13,46,38,.34); }
.stat__num {
  font-family: var(--font-display);
  font-size: var(--t-3xl);
  font-weight: 800;
  line-height: 1; letter-spacing: -0.04em;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.on-dark .stat__num { color: var(--ochre-300); }
.stat__label { margin-top: var(--sp-3); font-size: var(--t-base); color: var(--text-muted); text-wrap: balance; }

/* --- 14. Quote / story --------------------------------------------------- */

.quote {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.028em;
  text-wrap: pretty;
}
.quote__mark {
  font-family: var(--font-display); font-weight: 800;
  font-size: 3.4rem; line-height: .7; color: var(--clay-500);
  display: block; margin-bottom: .35rem;
}
.byline { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-6); }
.byline__avatar {
  width: 3rem; height: 3rem; border-radius: 50%; flex: none;
  background: var(--green-100); overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: var(--green-700); font-size: var(--t-lg);
}
.byline__name { font-weight: 550; font-size: var(--t-base); }
.byline__meta { font-size: var(--t-sm); color: var(--text-faint); }

/* --- 15. Accordion ------------------------------------------------------- */

.accordion { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  width: 100%; padding: var(--sp-5) 0; text-align: left;
  font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600;
  color: var(--ink-900); letter-spacing: -0.022em;
  transition: color .2s;
}
.acc__trigger:hover { color: var(--green-700); }
.acc__sign { position: relative; width: 15px; height: 15px; flex: none; }
.acc__sign::before, .acc__sign::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  background: var(--clay-600); border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .25s;
}
.acc__sign::before { width: 15px; height: 1.5px; }
.acc__sign::after { width: 1.5px; height: 15px; }
.acc__item.is-open .acc__sign::after { transform: rotate(90deg); opacity: 0; }
.acc__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease-out);
}
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p { padding-bottom: var(--sp-5); color: var(--text-muted); max-width: 46rem; font-size: var(--t-base); }

/* --- 16. Forms ----------------------------------------------------------- */

.field { display: block; }
.field__label {
  display: block; font-size: var(--t-sm); font-weight: 500;
  color: var(--ink-700); margin-bottom: .45rem;
}
.field__hint { font-size: var(--t-sm); color: var(--text-faint); margin-top: .4rem; }

.input, .select, .textarea {
  width: 100%;
  padding: .8rem 1rem;
  font-size: var(--t-base);
  color: var(--ink-900);
  background: var(--sand-50);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(29,83,71,.13);
}
.textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%235A5545' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* --- 17. Questionnaire --------------------------------------------------- */

.quiz-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--sand-100);
}

.quiz-top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251,247,240,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.quiz-top__inner {
  display: flex; align-items: center; gap: var(--sp-5);
  height: 4rem;
}
.quiz-top__spacer { margin-left: auto; }
.quiz-exit {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: var(--t-sm); color: var(--text-muted);
  padding: .4rem .7rem; border-radius: var(--r-full);
  transition: background-color .2s, color .2s;
}
.quiz-exit:hover { background: var(--sand-200); color: var(--ink-800); }

.progress {
  height: 3px; background: var(--sand-300);
  position: relative; overflow: hidden;
}
.progress__bar {
  position: absolute; inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--green-600), var(--clay-600));
  border-radius: 0 3px 3px 0;
  transition: width .55s var(--ease-out);
}

.quiz-main {
  flex: 1;
  display: flex; align-items: flex-start;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(6rem, 10vw, 5rem);
}
.quiz-card { width: 100%; max-width: 40rem; margin-inline: auto; }

.quiz-step { animation: stepIn .5s var(--ease-out) both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.quiz-step.is-back { animation-name: stepInBack; }
@keyframes stepInBack {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: none; }
}

.quiz-step__meta {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.quiz-step__q {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 700;
  line-height: 1.2; letter-spacing: -0.03em;
  color: var(--ink-900);
  text-wrap: balance;
}
.quiz-step__help { margin-top: var(--sp-4); color: var(--text-muted); font-size: var(--t-base); max-width: 34rem; }

.options { margin-top: var(--sp-6); display: grid; gap: .6rem; }
.options--2col { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .options--2col { grid-template-columns: 1fr; } }

.option {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: 1rem 1.15rem;
  background: var(--sand-50);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  font-size: var(--t-base);
  color: var(--ink-800);
  line-height: 1.45;
  transition: border-color .2s var(--ease), background-color .2s var(--ease),
              transform .2s var(--ease-out), box-shadow .25s var(--ease-out);
}
.option:hover {
  border-color: var(--green-500);
  background: #fff;
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}
.option.is-selected {
  border-color: var(--green-700);
  background: var(--green-50);
  box-shadow: inset 0 0 0 1px var(--green-700);
}
.option__box {
  width: 20px; height: 20px; flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: border-color .2s, background-color .2s;
}
.options--multi .option__box { border-radius: 5px; }
.option.is-selected .option__box { border-color: var(--green-700); background: var(--green-700); }
.option__box svg { opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease-out); color: #fff; }
.option.is-selected .option__box svg { opacity: 1; transform: scale(1); }
.option__text { flex: 1; }
.option__note { display: block; font-size: var(--t-sm); color: var(--text-faint); margin-top: 2px; }

/* Scale (gentle ↔ direct) */
.scale { margin-top: var(--sp-6); }
.scale__labels {
  display: flex; justify-content: space-between;
  font-size: var(--t-sm); color: var(--text-faint); margin-bottom: .75rem;
}
.scale__opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.scale__opt {
  padding: 1.15rem .5rem .85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--sand-50);
  text-align: center;
  font-size: var(--t-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.scale__opt::before {
  content: ""; display: block; margin: 0 auto .6rem;
  width: var(--dot, 10px); height: var(--dot, 10px);
  border-radius: 50%; border: 1.5px solid var(--line-strong);
  transition: all .2s var(--ease);
}
.scale__opt:nth-child(1) { --dot: 18px; }
.scale__opt:nth-child(2) { --dot: 14px; }
.scale__opt:nth-child(3) { --dot: 10px; }
.scale__opt:nth-child(4) { --dot: 14px; }
.scale__opt:nth-child(5) { --dot: 18px; }
.scale__opt:hover { border-color: var(--green-500); background: #fff; }
.scale__opt.is-selected { border-color: var(--green-700); background: var(--green-50); color: var(--green-700); font-weight: 500; }
.scale__opt.is-selected::before { background: var(--green-700); border-color: var(--green-700); }
@media (max-width: 560px) {
  .scale__opts { grid-template-columns: 1fr; }
  .scale__opt { display: flex; align-items: center; gap: .75rem; text-align: left; padding: .8rem 1rem; }
  .scale__opt::before { margin: 0; }
}

.quiz-foot {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: rgba(251,247,240,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.quiz-foot__inner {
  display: flex; align-items: center; gap: var(--sp-4);
  max-width: 40rem; margin-inline: auto;
  padding: .85rem var(--gutter);
}
.quiz-foot .btn--next { margin-left: auto; }
.quiz-back {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: var(--t-base); color: var(--text-muted);
  padding: .55rem .85rem; border-radius: var(--r-full);
  transition: background-color .2s, color .2s;
}
.quiz-back:hover { background: var(--sand-200); color: var(--ink-800); }
.quiz-back[hidden] { display: none; }
.btn[disabled] { opacity: .38; pointer-events: none; }

.quiz-safety {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--alert-100);
  border: 1px solid #EDC4BC;
  border-radius: var(--r-md);
  font-size: var(--t-base);
  color: #6E241C;
}
.quiz-safety strong { display: block; margin-bottom: .3rem; color: var(--alert-700); }
.quiz-safety a { color: var(--alert-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Result screen */
.result-hero { text-align: center; padding-block: var(--sp-6) var(--sp-7); }
.result-ring {
  width: 5.5rem; height: 5.5rem; margin: 0 auto var(--sp-6);
  border-radius: 50%; display: grid; place-items: center;
  background: var(--green-50); border: 1px solid var(--green-100);
  color: var(--green-700);
  animation: popIn .6s var(--ease-out) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }

.summary { margin-top: var(--sp-7); border-top: 1px solid var(--line); }
.summary__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--sp-4);
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-base);
  align-items: baseline;
}
.summary__row dt { color: var(--text-faint); }
.summary__row dd { color: var(--ink-800); font-weight: 450; }
@media (max-width: 560px) { .summary__row { grid-template-columns: 1fr; gap: .15rem; } }

.match-card {
  display: grid; grid-template-columns: 5.5rem minmax(0,1fr);
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  align-items: start;
}
@media (max-width: 520px) { .match-card { grid-template-columns: 1fr; } }
.match-card__ph {
  aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden;
  background: var(--green-100); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: var(--t-xl); color: var(--green-700);
}
.match-card__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }

/* --- 18. Directory (Find Help) ------------------------------------------- */

.dir-layout {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) { .dir-layout { grid-template-columns: 1fr; } }

.filters { position: sticky; top: 6rem; }
@media (max-width: 900px) { .filters { position: static; } }
.filters__group + .filters__group { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.filters h4 {
  font-family: var(--font-sans); font-size: var(--t-base); font-weight: 600;
  color: var(--ink-700); margin-bottom: var(--sp-3);
}
.check {
  display: flex; align-items: center; gap: .65rem;
  padding: .35rem 0; cursor: pointer; font-size: var(--t-base);
  color: var(--ink-700);
}
.check:hover { color: var(--ink-900); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 17px; height: 17px; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 4px;
  display: grid; place-items: center;
  transition: all .18s var(--ease);
}
.check input:checked + .check__box { background: var(--green-700); border-color: var(--green-700); }
.check__box svg { opacity: 0; color: #fff; transform: scale(.6); transition: all .2s var(--ease-out); }
.check input:checked + .check__box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--green-600); outline-offset: 2px; }

.dir-bar {
  display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center;
  margin-bottom: var(--sp-5); padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.search-box { position: relative; flex: 1; min-width: 15rem; }
.search-box svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.search-box .input { padding-left: 2.7rem; }

.provider {
  display: grid; grid-template-columns: 4.5rem minmax(0,1fr) auto;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
@media (max-width: 680px) {
  .provider { grid-template-columns: 3.5rem minmax(0,1fr); }
  .provider__act { grid-column: 2; }
}
.provider__ph {
  aspect-ratio: 1; border-radius: 50%;
  background: var(--green-100); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg); color: var(--green-700);
}
.provider h3 { font-size: var(--t-lg); }
.provider__role { font-size: var(--t-sm); color: var(--text-faint); margin-top: 2px; }
.provider__bio { font-size: var(--t-base); color: var(--text-muted); margin-top: .6rem; }
.provider__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.provider__act { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }

.empty {
  padding: var(--sp-9) var(--sp-5); text-align: center;
  color: var(--text-faint);
}

/* --- 19. Article / story cards ------------------------------------------- */

.post {
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--sand-50); border: 1px solid var(--line);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.post__img { aspect-ratio: 3/2; background: var(--green-100); overflow: hidden; }
.post__img > * { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.post:hover .post__img > * { transform: scale(1.04); }
.post__body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.post__body h3 { font-size: var(--t-lg); margin-block: .55rem .5rem; letter-spacing: -0.014em; }
.post__body p { font-size: var(--t-base); color: var(--text-muted); }
.post__foot {
  margin-top: auto; padding-top: var(--sp-5);
  display: flex; align-items: center; gap: .6rem;
  font-size: var(--t-sm); color: var(--text-faint);
}

.post--feature { grid-column: span 2; }
.post--feature .post__img { aspect-ratio: 16/9; }
.post--feature .post__body h3 { font-size: var(--t-2xl); }
@media (max-width: 960px) { .post--feature { grid-column: span 2; } }
@media (max-width: 620px) { .post--feature { grid-column: span 1; } }

/* --- 20. CTA band -------------------------------------------------------- */

.band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(100% 120% at 88% 4%, rgba(223,169,69,.26), transparent 58%),
    linear-gradient(158deg, #174C40 0%, #21624F 52%, #2C7A62 100%);
  color: var(--sand-100);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem);
}
.band h2 { color: var(--sand-50); }
.band__glow {
  position: absolute; width: 38rem; height: 38rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(223,169,69,.34), rgba(200,106,60,.16) 45%, transparent 68%);
  right: -9rem; top: -14rem; pointer-events: none;
}

/* --- 20b. Full-bleed CTA band ------------------------------------------- */

/* Edge to edge and light, echoing the hero. `.band` above stays dark for pull quotes. */
.cta-band {
  position: relative;
  overflow: hidden;
  color: var(--ink-800);
  border-top: 1px solid var(--line);
  padding-block: clamp(3.25rem, 8vw, 5.75rem);
  background:
    radial-gradient(68% 120% at 84% 6%, rgba(240,184,126,.44), transparent 62%),
    radial-gradient(58% 100% at 4% 98%, rgba(190,216,197,.5), transparent 66%),
    linear-gradient(158deg, #F4F3EA 0%, #FBEEDD 52%, #F8E1C4 100%);
}
.cta-band__inner { position: relative; max-width: 40rem; }
.cta-band h2 { color: var(--ink-900); }
.cta-band .lede { color: var(--text-muted); }
.cta-band .label { color: var(--clay-700); }

/* --- 21. Utilities ------------------------------------------------------- */

.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); } .gap-5 { gap: var(--sp-5); }
.wrap-flex { flex-wrap: wrap; }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); }
.mt-8 { margin-top: var(--sp-8); }
.mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }
.relative { position: relative; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100%; left: var(--gutter); z-index: 200;
  background: var(--green-800); color: #fff;
  padding: .7rem 1.1rem; border-radius: 0 0 var(--r-md) var(--r-md);
  font-size: var(--t-sm);
}
.skip-link:focus { top: 0; }

.page-head {
  padding-block: clamp(2.75rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: .5rem; font-size: var(--t-sm); color: var(--text-faint); margin-bottom: var(--sp-5); }
.crumbs a:hover { color: var(--ink-800); }

/* --- 22. Match gate ------------------------------------------------------ */

.gate {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: var(--gutter);
  background: var(--sand-100);
  overflow-y: auto;
  transition: opacity .5s var(--ease), visibility .5s;
}
.gate.is-gone { opacity: 0; visibility: hidden; }
.gate__inner {
  width: 100%; max-width: 33rem; text-align: center;
  animation: gateIn .7s var(--ease-out) both;
}
@keyframes gateIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.gate__halo {
  width: 4.75rem; height: 4.75rem; margin: 0 auto var(--sp-6);
  border-radius: 50%; display: grid; place-items: center;
  background: var(--sand-50); border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.gate__ring {
  position: absolute; left: 50%; top: 0;
  width: 30rem; height: 30rem; margin-left: -15rem; margin-top: -13rem;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(29,83,71,.09), transparent 68%);
}
.gate__points {
  display: flex; flex-direction: column; gap: .7rem;
  margin-top: var(--sp-7); text-align: left;
  max-width: 24rem; margin-inline: auto;
}
.gate__points li {
  display: flex; align-items: flex-start; gap: .7rem;
  font-size: var(--t-base); color: var(--text-muted);
}
.gate__points svg { flex: none; margin-top: 4px; color: var(--green-600); }

/* --- 23. Self-guided tools ----------------------------------------------- */

.tool {
  display: flex; flex-direction: column;
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tool__head { padding: var(--sp-5) var(--sp-5) 0; }
.tool__body { padding: var(--sp-5); flex: 1; display: flex; flex-direction: column; }
.tool__stage {
  flex: 1; display: grid; place-items: center;
  min-height: 13rem; padding: var(--sp-5) 0;
  text-align: center;
}
.tool__foot { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }

/* breathing */
.breath {
  width: 8.5rem; height: 8.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, var(--green-100), var(--green-300));
  color: var(--green-800);
  font-size: var(--t-base); font-weight: 500;
  transform: scale(.62);
  transition: transform 4s cubic-bezier(.4,0,.2,1), background 1s;
  box-shadow: 0 0 0 0 rgba(47,110,93,.25);
}
.breath.is-in { transform: scale(1); }
.breath.is-hold { transform: scale(1); background: radial-gradient(circle at 40% 35%, var(--clay-100), var(--clay-300)); }
.breath.is-out { transform: scale(.62); }
.breath__count { font-family: var(--font-mono); font-size: var(--t-2xl); display: block; line-height: 1; }
.breath__phase { font-size: var(--t-sm); font-weight: 500; opacity: .8; }

/* grounding steps */
.ground__prompt { font-family: var(--font-display); font-weight: 600; font-size: var(--t-xl); line-height: 1.3; letter-spacing: -0.022em; color: var(--ink-900); }
.ground__dots { display: flex; gap: .4rem; justify-content: center; margin-top: var(--sp-5); }
.ground__dots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sand-400);
  transition: background-color .3s, transform .3s;
}
.ground__dots i.on { background: var(--clay-600); transform: scale(1.25); }

/* mood check */
.mood { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; width: 100%; align-items: stretch; }
.mood button {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: .9rem .3rem; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--sand-50); font-size: var(--t-sm); color: var(--text-muted);
  line-height: 1.25; text-align: center;
  transition: all .2s var(--ease);
}
.mood button:hover { border-color: var(--green-500); }
.mood button.is-selected { background: var(--green-50); border-color: var(--green-700); color: var(--green-700); font-weight: 500; }
.mood__face { display: block; margin: 0 auto .4rem; }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .45rem .95rem; font-size: var(--t-sm); border-radius: var(--r-full);
  border: 1px solid var(--line-strong); color: var(--text-muted);
  background: transparent; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--ink-700); color: var(--ink-800); }
.chip.is-selected { background: var(--green-700); border-color: var(--green-700); color: var(--sand-50); }

/* worksheet rows */
.sheet {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) 0; border-bottom: 1px solid var(--line);
}
.sheet__icon { color: var(--clay-600); flex: none; }
.sheet__meta { margin-left: auto; font-size: var(--t-sm); color: var(--text-faint); white-space: nowrap; }

/* --- 24. Crisis page ----------------------------------------------------- */

.crisis-hero {
  background: var(--alert-700);
  color: #FFF3F0;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  position: relative; overflow: hidden;
}
.crisis-hero h1 { color: #fff; }
.crisis-hero .lede { color: rgba(255,243,240,.86); }

.hotline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5) var(--sp-6);
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-left: 3px solid var(--alert-600);
  border-radius: var(--r-md);
  transition: box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.hotline:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hotline + .hotline { margin-top: .75rem; }
.hotline h3 { font-size: var(--t-lg); }
.hotline p { font-size: var(--t-base); color: var(--text-muted); margin-top: .35rem; }
.hotline__num {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--alert-700);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 620px) {
  .hotline { grid-template-columns: 1fr; }
}

.stepcard {
  display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--sp-4);
  padding: var(--sp-5) 0; border-bottom: 1px solid var(--line);
}
.stepcard__n {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--alert-100); color: var(--alert-700);
  font-family: var(--font-mono); font-size: var(--t-sm);
}

/* --- 25. Adjustments ----------------------------------------------------- */

/* Page headings need more room than the narrow sticky-aside column gives them. */
.page-head .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; }
.page-head .split__aside { position: static; }
@media (max-width: 900px) { .page-head .split { grid-template-columns: 1fr; } }

.provider__act { align-items: flex-end; text-align: right; }
@media (max-width: 680px) { .provider__act { align-items: flex-start; text-align: left; } }

/* Crisis-bar text should not crowd on small screens */
@media (max-width: 640px) {
  .crisis-bar { font-size: var(--t-xs); }
  .crisis-bar__inner { padding-block: .5rem; gap: var(--sp-3); }
}

/* Small-screen refinements */
@media (max-width: 560px) {
  .floaty { padding: .7rem .9rem; font-size: var(--t-xs); }
  .floaty--a { left: 0; }
  .floaty--b { right: 0; }
  .quiz-top__inner { gap: var(--sp-2); }
  #count { display: none; }
  #restart { margin-left: auto; }
  .quiz-exit { padding: .4rem .55rem; font-size: var(--t-xs); }
}

/* --- 26. Intake gate additions ------------------------------------------- */

.gate__steps {
  counter-reset: none;
  display: grid; gap: .55rem;
  margin: var(--sp-6) auto 0;
  max-width: 25rem; text-align: left;
}
.gate__steps li {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .7rem .85rem;
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.gate__steps span {
  width: 1.5rem; height: 1.5rem; flex: none;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--green-700); color: var(--sand-50);
  font-size: var(--t-xs); font-weight: 600;
}
.gate__steps strong { display: block; font-size: var(--t-base); font-weight: 600; color: var(--ink-800); }
.gate__steps div { font-size: var(--t-sm); color: var(--text-faint); line-height: 1.45; }

.gate__warn {
  display: flex; align-items: flex-start; gap: .7rem;
  max-width: 28rem; margin: var(--sp-6) auto 0;
  padding: .85rem 1rem;
  text-align: left;
  background: var(--alert-100);
  border: 1px solid #EDC4BC;
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  color: #6E241C;
  line-height: 1.5;
}
.gate__warn svg { flex: none; margin-top: 2px; color: var(--alert-700); }
.gate__warn a { color: var(--alert-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.provider__board {
  font-size: var(--t-sm); color: var(--green-700);
  margin-top: .35rem; display: inline-flex; align-items: center; gap: .35em;
}
.provider__board::before {
  content: ""; width: 13px; height: 13px; flex: none; border-radius: 50%;
  background: var(--green-600);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.4 8.6 11 1.6' stroke='%23000' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/9px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.4 8.6 11 1.6' stroke='%23000' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/9px no-repeat;
}

/* --- 27. Self-assessment screening --------------------------------------- */

.scr__q { border: 0; padding: 0; margin: 0; }
.scr__q + .scr__q { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.scr__legend {
  display: block; font-size: var(--t-base); font-weight: 500;
  color: var(--ink-800); margin-bottom: .75rem; line-height: 1.45;
}
.scr__legend .num { margin-right: .4em; }
.scr__opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
@media (max-width: 720px) { .scr__opts { grid-template-columns: 1fr 1fr; } }
.scr__opt {
  padding: .6rem .5rem; font-size: var(--t-sm); line-height: 1.3;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--sand-50); color: var(--text-muted);
  transition: all .18s var(--ease);
}
.scr__opt:hover { border-color: var(--green-500); color: var(--ink-800); }
.scr__opt.is-selected {
  background: var(--green-50); border-color: var(--green-700);
  color: var(--green-700); font-weight: 500;
}
.scr__result {
  padding: var(--sp-5); background: var(--sand-50);
  border: 1px solid var(--line); border-radius: var(--r-md);
}

/* --- 28. Tables ---------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--sand-50);
  -webkit-overflow-scrolling: touch;
}
.tbl {
  width: 100%; border-collapse: collapse;
  /* Wide enough that no column crushes once the wrapper starts scrolling. */
  min-width: 54rem;
  font-size: var(--t-base);
}
.tbl th, .tbl td {
  text-align: left; padding: 1rem 1.15rem;
  vertical-align: top; border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.tbl thead th {
  font-family: var(--font-sans);
  font-size: var(--t-sm); font-weight: 600;
  color: var(--ink-700);
  background: var(--sand-200);
  white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td:first-child { font-weight: 600; color: var(--ink-900); }
.tbl td p { color: var(--text-muted); font-size: var(--t-sm); margin-top: .2rem; }

/* --- 29. Track cards ----------------------------------------------------- */

.track { border-top: 1px solid var(--line); padding-top: var(--sp-6); }
.track__head { display: flex; align-items: baseline; gap: var(--sp-4); flex-wrap: wrap; }
.track__list { margin-top: var(--sp-5); display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.track__item { background: var(--sand-50); padding: var(--sp-5); }
.track__item h4 {
  font-size: var(--t-base); font-weight: 600; color: var(--ink-900);
  letter-spacing: -0.012em; line-height: 1.35;
}
.track__item p { font-size: var(--t-sm); color: var(--text-muted); margin-top: .4rem; }
@media (min-width: 760px) {
  .track__list { grid-template-columns: repeat(3, 1fr); }
  .track__list--2 { grid-template-columns: repeat(2, 1fr); }
}

.audience {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5);
}
@media (max-width: 780px) { .audience { grid-template-columns: 1fr; } }
.audience__card {
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--sand-50);
  display: flex; flex-direction: column;
}
.audience__card--b2b { background: var(--green-50); border-color: var(--green-100); }

/* ==========================================================================
   30. Mobile
   ========================================================================== */

/* Notched devices: keep content clear of the rounded corners in landscape. */
.wrap { padding-inline: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right)); }

/* iOS zooms the whole page when a focused field is under 16px. */
@media (max-width: 900px) {
  .input, .select, .textarea, .quiz-card input, .quiz-card select { font-size: 16px; }
}

@media (max-width: 760px) {
  /* Touch targets: nothing interactive under ~44px. */
  .btn { padding: .95em 1.5em; min-height: 44px; }
  .btn--sm { padding: .8rem 1.2rem; min-height: 44px; }
  .link { min-height: 42px; }
  .brand { min-height: 44px; }
  .quiz-exit { min-height: 42px; }
  .region__btn { min-height: 44px; }
  .chip { min-height: 42px; }
  .scr__opt { min-height: 44px; }
  .mood { gap: .3rem; }
  .mood button { min-height: 64px; padding: .7rem .2rem; font-size: 11.5px; }
  .mood__face { width: 20px; height: 20px; margin-bottom: .3rem; }
  .btn--lg { padding: 1.05em 1.7em; }
  .check { padding: .65rem 0; }
  .quiz-exit { padding: .6rem .7rem; }
  .link { padding-block: .4rem; }
  .footer__links a { display: inline-block; padding-block: .35rem; }
  .footer__bottom ul a { display: inline-block; padding-block: .35rem; }
  .crumbs a { display: inline-block; padding-block: .3rem; }
  .dropdown a { padding: .85rem .8rem; }
  .chip { padding: .6rem 1.05rem; }
  .region__opt { padding: .75rem .6rem; }
  .acc__trigger { padding-block: 1.05rem; }
  .sheet { padding-block: .9rem; }

  /* The hero shouldn't hold a fixed viewport height on a phone. */
  .hero { min-height: 0; padding-block: clamp(2.5rem, 9vw, 4rem) clamp(2.5rem, 8vw, 3.5rem); }
  .hero__steps { margin-top: var(--sp-6); }

  /* Stat pairs read better than a cramped 2-up on the narrowest phones. */
  .stat { padding: var(--sp-5) var(--sp-4); }
}

@media (max-width: 620px) {
  /* Search gets its own row; count and reset share the next one. */
  .dir-bar { flex-wrap: wrap; gap: var(--sp-3); }
  .search-box { flex: 1 1 100%; min-width: 0; }
  #dir-count { order: 1; }
  #dir-reset { order: 2; margin-left: auto; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .btn--block-mobile, .hero__cta .btn { width: 100%; }
  .hero__cta { gap: .75rem; }
}

/* Softer press feedback than the default blue flash. */
a, button, .option, .scale__opt, .scr__opt, label.check {
  -webkit-tap-highlight-color: rgba(29,90,75,.12);
}

/* Wide tables: make it obvious they scroll sideways. */
.table-wrap { position: relative; }
.table-wrap::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; width: 2.5rem;
  pointer-events: none;
  background: linear-gradient(to left, var(--sand-50), rgba(255,253,248,0));
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.table-hint { display: none; }
@media (max-width: 860px) {
  .table-hint {
    display: flex; align-items: center; gap: .45em;
    font-size: var(--t-sm); color: var(--text-faint); margin-bottom: .6rem;
  }
}

/* Fixed intake footer must clear the iPhone home indicator. */
.quiz-foot__inner { padding-bottom: calc(.85rem + env(safe-area-inset-bottom)); }
.quiz-main { padding-bottom: calc(clamp(6rem, 10vw, 5rem) + env(safe-area-inset-bottom)); }
.drawer { padding-bottom: calc(var(--sp-7) + env(safe-area-inset-bottom)); }

/* Directory filters collapse behind a toggle on small screens. */
.filters-toggle { display: none; }
@media (max-width: 900px) {
  .filters-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: var(--sp-3);
    padding: .85rem 1.1rem;
    border: 1px solid var(--line-strong); border-radius: var(--r-md);
    background: var(--sand-50);
    font-size: var(--t-base); font-weight: 500; color: var(--ink-800);
    margin-bottom: var(--sp-4);
  }
  .filters-toggle svg { transition: transform .3s var(--ease); }
  .filters-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .filters__panel[hidden] { display: none; }
  .filters__panel {
    padding: var(--sp-5); margin-bottom: var(--sp-5);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--sand-50);
  }
  .filters__panel .filters__group:first-child { margin-top: 0; }
}
