/* ==========================================================================
   NCP-CDK — Nexus of Caregivers and Parents of Children with Disabilities Kenya
   Main stylesheet
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --blue-900: #061a45;
  --blue-800: #0a2a6b;
  --blue-700: #0b3d99;
  --blue-600: #1255c4;
  --blue-500: #1666d6;
  --blue-100: #e6efff;
  --blue-50: #f3f7ff;
  --gold: #f6b400;
  --gold-600: #d99c00;
  --gold-100: #fff3cf;
  --green: #16883f;
  --green-700: #0f6a30;
  --green-100: #e3f5e9;
  --red: #c8283a;
  --red-100: #fde6e9;

  --bg: #ffffff;
  --bg-tint: #f4f7fd;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --ink: #0e1d3b;
  --ink-soft: #33466b;
  --muted: #5a6b8c;
  --line: #dbe4f4;
  --brand: var(--blue-700);
  --brand-ink: #ffffff;
  --link: var(--blue-600);
  --focus: #f6b400;

  --font-display: "Lexend", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(11, 61, 153, .06), 0 2px 8px rgba(11, 61, 153, .06);
  --shadow: 0 10px 30px rgba(11, 61, 153, .10);
  --shadow-lg: 0 24px 60px rgba(6, 26, 69, .18);
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #07122b;
  --bg-tint: #0b1a3d;
  --surface: #0f2250;
  --surface-2: #11285c;
  --ink: #eaf0ff;
  --ink-soft: #c9d6f2;
  --muted: #9fb1d6;
  --line: #22407a;
  --brand: #5b9bff;
  --brand-ink: #061a45;
  --link: #8ab8ff;
  --blue-100: #15306a;
  --blue-50: #0d1f48;
  --gold-100: #3b3010;
  --green-100: #0e3a27;
  --red-100: #3d1620;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* Text size preference */
html { font-size: 100%; }
html[data-text="lg"] { font-size: 112.5%; }
html[data-text="xl"] { font-size: 125%; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
svg.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li + li { margin-top: .35em; }
small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: #0e1d3b; }

.sr-only { position: absolute !important; 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; left: 1rem; top: -100px; z-index: 1000; background: var(--gold); color: #0e1d3b; padding: .75rem 1.25rem; border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 820px); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--tint { background: var(--bg-tint); }
.section--brand { background: linear-gradient(135deg, var(--blue-800), var(--blue-700) 60%, var(--blue-600)); color: #fff; }
.section--brand h2, .section--brand h3, .section--brand h4 { color: #fff; }
.section--brand p { color: #d8e4ff; }
[data-theme="dark"] .section--brand { background: linear-gradient(135deg, #0a1d4a, #0f2a66); }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--top { align-items: start; }
.split--wide-right { grid-template-columns: .9fr 1.1fr; }
.with-sidebar { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .with-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split--wide-right { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Typography helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: .9rem; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #111 0 33%, var(--red) 33% 66%, var(--green) 66%); }
[data-theme="dark"] .eyebrow { color: #55d487; }
[data-theme="dark"] .eyebrow::before { background: linear-gradient(90deg, #eee 0 33%, var(--red) 33% 66%, #55d487 66%); }
.section--brand .eyebrow { color: var(--gold); }
.section--brand .eyebrow::before { background: var(--gold); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 62ch; }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; }
.section-head.center .lede { margin-inline: auto; }
.muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.fine { font-size: .875rem; color: var(--muted); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.prose h3 { margin-top: 1.8em; }
.prose > :first-child { margin-top: 0; }

/* ---------- Buttons ---------- */
.btn { --btn-bg: var(--brand); --btn-ink: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.4rem; min-height: 48px; border-radius: 999px; border: 2px solid transparent; background: var(--btn-bg); color: var(--btn-ink); font-family: var(--font-display); font-weight: 700; font-size: .98rem; line-height: 1.1; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn--gold { --btn-bg: var(--gold); --btn-ink: #14213f; }
.btn--gold:hover { --btn-bg: #ffc21a; }
.btn--green { --btn-bg: var(--green); --btn-ink: #fff; }
.btn--light { --btn-bg: #fff; --btn-ink: var(--blue-700); }
.btn--outline { --btn-bg: transparent; --btn-ink: var(--brand); border-color: currentColor; }
.btn--outline-light { --btn-bg: transparent; --btn-ink: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost { --btn-bg: transparent; --btn-ink: var(--brand); padding-inline: .4rem; min-height: auto; }
.btn--ghost:hover { box-shadow: none; transform: none; text-decoration: underline; }
.btn--sm { padding: .55rem 1rem; min-height: 40px; font-size: .9rem; }
.btn--lg { padding: 1.05rem 1.8rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-family: var(--font-display); text-decoration: none; color: var(--brand); }
.link-arrow svg { transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Utility bar ---------- */
.utility { background: var(--blue-900); color: #c9d8ff; font-size: .86rem; }
.utility .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.utility a { color: #fff; text-decoration: none; }
.utility a:hover { text-decoration: underline; }
.utility__info { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center; }
.utility__info span { display: inline-flex; align-items: center; gap: .4rem; }
.utility__tools { display: flex; align-items: center; gap: .4rem; }
.utility__tools .label { margin-right: .25rem; }
.tool-btn { display: inline-grid; place-items: center; min-width: 32px; height: 30px; padding: 0 .5rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: #fff; cursor: pointer; font-weight: 700; font-size: .82rem; }
.tool-btn:hover, .tool-btn[aria-pressed="true"] { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); }
.tool-btn .icon { width: 16px; height: 16px; }
@media (max-width: 760px) { .utility__info .hide-sm { display: none; } .utility__tools .label { display: none; } }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
/* backdrop-filter moved to ::before so it does NOT create a containing block for the
   position:fixed mobile nav — browsers treat backdrop-filter on an ancestor as a
   new containing block, trapping fixed children inside the header box on iOS/Android */
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 54px; height: 46px; object-fit: contain; border-radius: 10px; background: #fff; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 1; color: var(--brand); letter-spacing: -.02em; }
.brand__tag { display: block; font-size: .7rem; line-height: 1.25; color: var(--muted); max-width: 200px; margin-top: .25rem; font-weight: 600; }

.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav__list { display: flex; flex-wrap: nowrap; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav__list > li { position: relative; margin: 0; }
.nav__link { display: inline-flex; align-items: center; gap: .3rem; padding: .6rem .8rem; border-radius: 10px; border: 0; background: none; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--blue-50); color: var(--brand); }
.nav__link.is-active { color: var(--brand); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 10px 10px 4px 4px; }
.nav__link .chev { width: 14px; height: 14px; transition: transform .2s; }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dropdown { position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, 6px); min-width: 300px; padding: .6rem; list-style: none; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s var(--ease), visibility .18s; }
.dropdown::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
.nav__item.is-open .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 1101px) { .nav__item:hover .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); } }
.dropdown li { margin: 0; }
.dropdown a { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .75rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.dropdown a:hover, .dropdown a.is-active { background: var(--blue-50); }
.dropdown a strong { display: block; font-family: var(--font-display); font-size: .95rem; color: var(--ink); }
.dropdown a span { display: block; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.dropdown .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-100); color: var(--brand); flex: none; }
.dropdown .ico svg { width: 18px; height: 18px; }
.nav__cta { margin-left: .5rem; display: flex; gap: .5rem; }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; place-items: center; }

/* ---- Mobile nav backdrop (kept in JS; not needed visually — nav IS the full overlay) ---- */
.nav-backdrop { display: none; }

/* ---- Close button: desktop hidden, mobile shown as top bar of the overlay ---- */
.nav-close { display: none; }

@media (max-width: 1100px) {
  .nav-toggle { display: grid; }

  /* ===========================================================
     FULL-SCREEN overlay — covers 100 % of the viewport.
     No tiny scrollable side-panel; every link is fully visible.
     =========================================================== */
  .nav {
    position: fixed;
    inset: 0;                              /* edge-to-edge, top-to-bottom */
    width: 100%;
    height: 100%;
    height: 100dvh;                        /* iOS dynamic viewport */
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    margin: 0;
    background: #061a45;                   /* deep navy — always dark, theme-independent */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* hidden state: fade out + tiny downward shift */
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility 0s .22s;
  }
  .nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity .22s ease, transform .22s ease, visibility 0s 0s;
  }

  /* ---- Top bar: branding label + close × button ---- */
  .nav-close {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.1rem 1.4rem;
    border: 0;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .nav-close::before {
    content: 'NCP-CDK';
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: -.01em;
  }
  .nav-close svg { width: 28px; height: 28px; color: rgba(255,255,255,.75); }
  .nav-close:hover svg, .nav-close:focus-visible svg { color: #fff; }

  /* ---- Nav list (scrollable middle section) ---- */
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex: 1;
    padding: .6rem 1.2rem;
    list-style: none;
    margin: 0;
  }

  /* ---- Top-level links: big, bold, full-width ---- */
  .nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 1.05rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    color: rgba(255,255,255,.88);
    background: none;
    text-decoration: none;
    white-space: normal;
  }
  .nav__link:hover,
  .nav__link[aria-expanded="true"] { background: rgba(255,255,255,.1); color: #fff; }
  .nav__link.is-active {
    color: var(--gold);
    background: rgba(255,255,255,.07);
    box-shadow: inset 3px 0 0 var(--gold);
    border-radius: 0 12px 12px 0;
    padding-left: calc(1rem - 3px);
  }
  .nav__link .chev { color: rgba(255,255,255,.45); flex-shrink: 0; }

  /* ---- Inline sub-menu (dropdown) ---- */
  .dropdown {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: none !important;
    box-shadow: none;
    border: 0;
    border-left: 2px solid rgba(255,255,255,.18);
    margin: .2rem 0 .5rem 1rem;
    padding: .2rem 0 .2rem .6rem;
    min-width: 0;
    display: none;
    background: transparent;
  }
  .nav__item.is-open .dropdown { display: block; }
  .dropdown a {
    padding: .7rem .75rem;
    gap: .6rem;
    border-radius: 10px;
    color: rgba(255,255,255,.8);
    font-size: .97rem;
    display: flex;
    align-items: center;
  }
  .dropdown a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .dropdown strong { color: #fff; }
  .dropdown span { color: rgba(255,255,255,.6); font-size: .82rem; }
  .dropdown .ico {
    width: 32px; height: 32px; flex: none;
    background: rgba(255,255,255,.1);
    border-radius: 8px;
    display: grid; place-items: center;
  }
  .dropdown .ico svg { width: 16px; height: 16px; color: rgba(255,255,255,.8); }

  /* ---- CTA buttons pinned at the bottom ---- */
  .nav__cta {
    flex-direction: column;
    gap: .75rem;
    flex-shrink: 0;
    padding: 1rem 1.2rem 2.5rem;
    border-top: 1px solid rgba(255,255,255,.12);
    margin: 0;
  }
  .nav__cta .btn {
    width: 100%;
    font-size: 1.05rem;
    padding: .95rem 1.5rem;
    justify-content: center;
    text-align: center;
  }
  .nav__cta .btn--outline {
    border-color: rgba(255,255,255,.35);
    color: #fff;
    background: none;
  }
  .nav__cta .btn--outline:hover { background: rgba(255,255,255,.1); }

  body.nav-open { overflow: hidden; }

  /* position:sticky ALWAYS creates a stacking context (z-index:auto doesn't
     remove it), so the nav overlay stays trapped inside the header layer and
     paints behind it. Switching to position:static while the menu is open
     dissolves the context entirely — the nav's z-index:999 then wins at root
     level and covers the whole page, including the header itself. */
  body.nav-open .site-header { position: static; }
}
@media (max-width: 520px) { .brand__tag { display: none; } }

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3.5rem, 6vw, 5rem); background:
  radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%),
  radial-gradient(700px 500px at -10% 110%, color-mix(in srgb, var(--blue-500) 16%, transparent), transparent 60%),
  var(--bg); }
.hero .split { grid-template-columns: 1.05fr .95fr; }
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--brand); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .22em; background: var(--gold); opacity: .55; z-index: -1; border-radius: 4px; }
.hero__lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--ink-soft); max-width: 56ch; margin-bottom: 2rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px dashed var(--line); }
.hero__badges div { display: flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--ink-soft); font-size: .95rem; }
.hero__badges svg { color: var(--green); width: 22px; height: 22px; }
.hero__media { position: relative; }
.hero__photo { position: relative; border-radius: 38% 62% 46% 54% / 44% 40% 60% 56%; overflow: hidden; aspect-ratio: 1 / 1; box-shadow: var(--shadow-lg); border: 8px solid var(--surface); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% center; }
.hero__float { position: absolute; display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); font-weight: 700; font-family: var(--font-display); font-size: .95rem; color: var(--ink); animation: float 6s ease-in-out infinite; }
.hero__float small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: .8rem; }
.hero__float .icon-badge { width: 44px; height: 44px; }
.hero__float--a { left: -6%; bottom: 14%; }
.hero__float--b { right: -2%; top: 8%; animation-delay: -3s; }
.watoto { display: inline-flex; flex-direction: column; line-height: 1; }
.watoto strong { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 1.9rem; color: var(--green); letter-spacing: -.01em; }
.watoto small { font-size: .74rem; color: var(--muted); letter-spacing: .04em; margin-top: .3rem; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 860px) { .hero .split { grid-template-columns: 1fr; } .hero__media { max-width: 460px; margin-inline: auto; } .hero__float--a { left: 0; } .hero__float--b { right: 0; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: clamp(2.75rem, 6vw, 4.75rem) 0 clamp(2.75rem, 5vw, 4rem); background: linear-gradient(135deg, var(--blue-900), var(--blue-700) 70%, var(--blue-600)); color: #fff; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12; background-image: radial-gradient(circle at 1px 1px, #fff 1.2px, transparent 0); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 70%); }
.page-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; z-index: -1; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 45%, transparent), transparent 65%); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.2rem); max-width: 20ch; }
.page-hero p { color: #d8e4ff; font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 62ch; margin-bottom: 0; }
.page-hero .btn-row { margin-top: 1.75rem; }
.page-hero .flag-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, #111 0 25%, #fff 25% 27%, var(--red) 27% 73%, #fff 73% 75%, var(--green) 75%); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: .88rem; color: #b7c9f2; }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: .4rem; }
.breadcrumb li + li::before { content: "/"; opacity: .6; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
[data-theme="dark"] .page-hero { background: linear-gradient(135deg, #050f28, #0c2460 70%, #12337f); }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 2.4vw, 2rem); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.card--link { text-decoration: none; color: inherit; display: block; }
.card--link h3 { color: var(--ink); }
.card--flat { box-shadow: none; }
.card--tint { background: var(--blue-50); border-color: transparent; }
.card--brand { background: linear-gradient(150deg, var(--blue-700), var(--blue-800)); border: 0; color: #fff; }
.card--brand h3, .card--brand h4 { color: #fff; }
.card--brand p, .card--brand li { color: #d8e4ff; }
.card--gold { background: var(--gold-100); border-color: transparent; }
.card--green { background: var(--green-100); border-color: transparent; }
.card__tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.card__foot { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.card .link-arrow { margin-top: 1rem; }

.icon-badge { --c: var(--brand); --bgc: var(--blue-100); width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--bgc); color: var(--c); flex: none; margin-bottom: 1.1rem; }
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge--green { --c: var(--green); --bgc: var(--green-100); }
.icon-badge--gold { --c: #a87400; --bgc: var(--gold-100); }
.icon-badge--red { --c: var(--red); --bgc: var(--red-100); }
.icon-badge--solid { --c: #fff; --bgc: var(--brand); }
[data-theme="dark"] .icon-badge--green { --c: #55d487; }
[data-theme="dark"] .icon-badge--gold { --c: #ffd560; }
[data-theme="dark"] .icon-badge--red { --c: #ff8a97; }
.icon-badge--sm { width: 40px; height: 40px; border-radius: 11px; margin: 0; }
.icon-badge--sm svg { width: 20px; height: 20px; }

/* Pathway cards (home) */
.pathways { margin-top: -3rem; position: relative; z-index: 2; }
.pathway { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow); transition: transform .25s var(--ease), border-color .25s; border-top: 5px solid var(--accent, var(--brand)); }
.pathway:hover { transform: translateY(-6px); }
.pathway .who { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pathway h3 { font-size: 1.15rem; margin: .4rem 0 .5rem; color: var(--ink); }
.pathway p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.pathway .link-arrow { margin-top: .5rem; }

/* Feature list */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.feature-list li { display: flex; gap: 1rem; align-items: flex-start; margin: 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature-list strong { display: block; font-family: var(--font-display); color: var(--brand); }
.feature-list span { color: var(--ink-soft); font-size: .96rem; }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 2rem; margin: .6rem 0 0; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316883f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat; }
.card--brand .check-list li::before, .section--brand .check-list li::before { background-color: rgba(255,255,255,.15); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { padding-top: 1.1rem; border-top: 3px solid var(--gold); }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; color: #fff; letter-spacing: -.02em; }
.stat__label { margin-top: .6rem; color: #d0ddff; font-size: .96rem; }
.stat__src { display: block; color: #9fb4e6; font-size: .8rem; margin-top: .3rem; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Quote band ---------- */
.principle { position: relative; text-align: center; padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 4rem); border-radius: var(--radius-xl); background: var(--gold-100); }
.principle blockquote { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.2; color: var(--ink); max-width: 26ch; margin-inline: auto; }
.principle blockquote::before { content: "\201C"; display: block; font-size: 4em; line-height: .6; color: var(--gold-600); margin-bottom: .1em; }
.principle cite { display: block; margin-top: 1.25rem; font-style: normal; color: var(--ink-soft); }

/* ---------- Journey timeline ---------- */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: stage; position: relative; }
.journey::before { content: ""; position: absolute; top: 27px; left: 8%; right: 8%; height: 3px; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 18px); }
.journey__step { position: relative; text-align: center; padding: 0 .5rem; }
.journey__dot { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.1rem; background: var(--surface); border: 3px solid var(--brand); color: var(--brand); font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; position: relative; }
.journey__step:nth-child(2) .journey__dot { border-color: var(--green); color: var(--green); }
.journey__step:nth-child(3) .journey__dot { border-color: var(--gold-600); color: var(--gold-600); }
.journey__step:nth-child(4) .journey__dot { border-color: var(--red); color: var(--red); }
.journey__step h3 { font-size: 1.1rem; }
.journey__step p { font-size: .95rem; color: var(--ink-soft); }
@media (max-width: 860px) { .journey { grid-template-columns: 1fr 1fr; } .journey::before { display: none; } }
@media (max-width: 480px) { .journey { grid-template-columns: 1fr; } }

/* ---------- Numbered steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1rem; }
.steps > li { counter-increment: step; position: relative; padding: 1.25rem 1.25rem 1.25rem 4.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 1.15rem; top: 1.15rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-family: var(--font-display); font-weight: 800; }
.steps > li h3, .steps > li h4 { margin-bottom: .3rem; font-size: 1.08rem; }
.steps > li p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.steps--h { grid-template-columns: repeat(4, 1fr); }
.steps--h > li { padding: 4.25rem 1.25rem 1.25rem; }
@media (max-width: 960px) { .steps--h { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps--h { grid-template-columns: 1fr; } }

/* ---------- Price card ---------- */
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.price-card__head { background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); color: #fff; padding: 1.5rem 1.75rem; }
.price-card__head h3 { color: #fff; margin: 0; }
.price-card__head p { margin: .3rem 0 0; color: #d8e4ff; font-size: .95rem; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 1.75rem; border-bottom: 1px solid var(--line); }
.price-row strong { font-family: var(--font-display); display: block; }
.price-row span { color: var(--muted); font-size: .9rem; }
.price-row .amt { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--brand); white-space: nowrap; }
.price-row .amt small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.price-card__body { padding: 1.5rem 1.75rem 1.75rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: clamp(2rem, 5vw, 3.5rem); background: linear-gradient(120deg, var(--green-700), var(--green) 55%, #1fa653); color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; isolation: isolate; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%; border: 50px solid rgba(255,255,255,.08); z-index: -1; }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { color: #e3f5e9; margin: 0; max-width: 60ch; }
.cta-band--blue { background: linear-gradient(120deg, var(--blue-800), var(--blue-600)); }
.cta-band--blue p { color: #d8e4ff; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Campaign banner ---------- */
.campaign { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.2fr .8fr; border-radius: var(--radius-xl); background: #0e1d3b; color: #fff; isolation: isolate; }
.campaign__body { padding: clamp(2rem, 5vw, 3.5rem); }
.campaign__body h2 { color: #fff; }
.campaign__body p { color: #c9d6f2; }
.campaign__art { position: relative; background: linear-gradient(160deg, #111 0 30%, #fff 30% 32%, var(--red) 32% 68%, #fff 68% 70%, var(--green) 70%); min-height: 260px; }
.campaign__art::after { content: "LINDA\A WATOTO"; white-space: pre; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: .95; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.45); }
@media (max-width: 760px) { .campaign { grid-template-columns: 1fr; } .campaign__art { min-height: 180px; order: -1; } }

/* ---------- News ---------- */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card time { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--green); margin-bottom: .6rem; }
[data-theme="dark"] .news-card time { color: #55d487; }
.news-card h3 { font-size: 1.15rem; }
.news-card p { color: var(--ink-soft); font-size: .97rem; flex: 1; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 999px; background: var(--blue-100); color: var(--brand); font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.tag--green { background: var(--green-100); color: var(--green); }
.tag--gold { background: var(--gold-100); color: #8a5f00; }
.tag--red { background: var(--red-100); color: var(--red); }
[data-theme="dark"] .tag--green { color: #55d487; } [data-theme="dark"] .tag--gold { color: #ffd560; } [data-theme="dark"] .tag--red { color: #ff8a97; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }

.date-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.date-list li { display: flex; gap: 1rem; align-items: center; margin: 0; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.date-chip { flex: none; width: 62px; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.date-chip b { display: block; font-family: var(--font-display); font-size: 1.45rem; line-height: 1; padding: .45rem 0 .3rem; color: var(--ink); }
.date-chip span { display: block; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .2rem 0; }
.date-list strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.date-list p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Article (news list) ---------- */
.article { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.article:first-child { padding-top: 0; }
.article__date { font-family: var(--font-display); }
.article__date b { display: block; font-size: 2.2rem; line-height: 1; color: var(--brand); }
.article__date span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.article h3 { font-size: 1.3rem; }
.article p { color: var(--ink-soft); }
@media (max-width: 600px) { .article { grid-template-columns: 1fr; gap: .5rem; } .article__date b { display: inline; font-size: 1.3rem; margin-right: .4rem; } }

/* ---------- Sidebar TOC ---------- */
.toc { position: sticky; top: calc(var(--header-h) + 24px); padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: .5rem .75rem; border-left: 3px solid transparent; color: var(--ink-soft); text-decoration: none; font-size: .95rem; border-radius: 0 8px 8px 0; }
.toc a:hover { background: var(--blue-50); color: var(--brand); }
.toc a.is-current { border-left-color: var(--gold); color: var(--brand); font-weight: 700; background: var(--blue-50); }
.toc .toc__help { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
@media (max-width: 1024px) { .toc { position: static; } }

.content-section { padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); }
.content-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* ---------- Callouts ---------- */
.callout { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--blue-50); border-left: 5px solid var(--brand); margin: 1.5rem 0; }
.callout svg { color: var(--brand); width: 24px; height: 24px; flex: none; margin-top: .1rem; }
.callout p { margin: 0; color: var(--ink-soft); }
.callout strong { color: var(--ink); }
.callout--gold { background: var(--gold-100); border-color: var(--gold); }
.callout--gold svg { color: #a87400; }
.callout--green { background: var(--green-100); border-color: var(--green); }
.callout--green svg { color: var(--green); }
.callout--red { background: var(--red-100); border-color: var(--red); }
.callout--red svg { color: var(--red); }
[data-theme="dark"] .callout--gold svg { color: #ffd560; }

/* ---------- Accordion ---------- */
.accordion { display: grid; gap: .75rem; }
.accordion details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.accordion details[open] { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow-sm); }
.accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; color: var(--ink); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231255c4' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 60% no-repeat; transition: transform .25s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 1.25rem 1.25rem; color: var(--ink-soft); }
.accordion .acc-body p:last-child { margin-bottom: 0; }
.faq-group { margin-bottom: 2.5rem; }
.faq-group h2 { font-size: 1.4rem; display: flex; align-items: center; gap: .6rem; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; pointer-events: none; }
.search input { width: 100%; padding: .8rem 1rem .8rem 2.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); min-height: 48px; }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.empty-state { display: none; text-align: center; padding: 3rem 1rem; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius-lg); }
.empty-state.is-visible { display: block; }
.result-count { font-size: .9rem; color: var(--muted); margin: -1rem 0 1.5rem; }
[hidden] { display: none !important; }

/* Resource cards */
.resource { display: flex; flex-direction: column; height: 100%; }
.resource h3 { font-size: 1.1rem; }
.resource p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.resource .domain { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .9rem; text-decoration: none; }

/* County cards */
.county-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.county { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s var(--ease); }
.county:hover { border-color: var(--brand); transform: translateY(-2px); }
.county__code { font-family: var(--font-display); font-weight: 800; font-size: .8rem; color: var(--muted); }
.county h3 { font-size: 1.08rem; margin: 0; }
.county .region { font-size: .85rem; color: var(--muted); }
.county a { font-size: .88rem; font-weight: 700; text-decoration: none; margin-top: .3rem; display: inline-flex; align-items: center; gap: .3rem; }
.region-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.region-summary div { padding: 1rem; border-radius: var(--radius); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.region-summary b { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--gold); line-height: 1; }
.region-summary span { color: #d8e4ff; font-size: .9rem; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--font-display); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.5rem, 3vw, 2.5rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label, .field legend { font-weight: 700; font-size: .95rem; color: var(--ink); }
.field .req { color: var(--red); }
.field .hint { font-size: .85rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 50px; padding: .75rem 1rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
textarea.input { min-height: 140px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input[aria-invalid="true"] { border-color: var(--red); }
.error-msg { color: var(--red); font-size: .85rem; font-weight: 600; display: none; }
[data-theme="dark"] .error-msg { color: #ff8a97; }
.field.has-error .error-msg { display: block; }
.field.has-error .input { border-color: var(--red); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.radio-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span { display: inline-flex; align-items: center; padding: .65rem 1.2rem; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; background: var(--surface); }
.radio-pill input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.radio-pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.checkbox { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; padding: .75rem 0; }
.checkbox input { width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--green); flex: none; }
.file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: 1.25rem; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; color: var(--muted); font-size: .9rem; min-height: 120px; transition: border-color .2s, background .2s; }
.file-drop:hover { border-color: var(--brand); background: var(--blue-50); }
.file-drop strong { color: var(--ink); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop.has-file { border-style: solid; border-color: var(--green); background: var(--green-100); color: var(--green); }
.form-note { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--muted); margin-top: 1rem; }
.form-note svg { width: 18px; height: 18px; flex: none; margin-top: .15rem; }
.form-success { display: none; text-align: center; padding: 2rem 1rem; }
.form-success.is-visible { display: block; }
.form-success .icon-badge { margin-inline: auto; width: 72px; height: 72px; border-radius: 50%; }

/* Stepper */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; list-style: none; padding: 0; margin: 0 0 2rem; counter-reset: s; }
.stepper li { counter-increment: s; margin: 0; display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; font-size: .82rem; font-weight: 700; color: var(--muted); position: relative; }
.stepper li::before { content: counter(s); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: var(--surface); font-family: var(--font-display); font-size: .95rem; z-index: 1; transition: all .25s; }
.stepper li::after { content: ""; position: absolute; top: 19px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px; background: var(--line); }
.stepper li:last-child::after { display: none; }
.stepper li.is-active { color: var(--brand); }
.stepper li.is-active::before { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 18%, transparent); }
.stepper li.is-done { color: var(--green); }
.stepper li.is-done::before { content: "\2713"; border-color: var(--green); background: var(--green); color: #fff; }
.stepper li.is-done::after { background: var(--green); }
@media (max-width: 560px) { .stepper li span { display: none; } }
.form-step { display: none; }
.form-step.is-active { display: block; animation: fadeUp .35s var(--ease); }
.form-step h2 { font-size: 1.45rem; margin-bottom: 1.25rem; }
.form-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.mpesa { border: 2px solid #3aa935; border-radius: var(--radius); padding: 1.25rem; background: color-mix(in srgb, #3aa935 7%, var(--surface)); }
.mpesa__logo { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-display); font-weight: 900; color: #3aa935; letter-spacing: .02em; font-size: 1.2rem; margin-bottom: .75rem; }
.review-list { display: grid; grid-template-columns: 180px 1fr; gap: .5rem 1rem; margin: 0 0 1.5rem; padding: 1.25rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.review-list dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.review-list dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .review-list { grid-template-columns: 1fr; } .review-list dd { margin-bottom: .6rem; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Checklist (caregiver card) */
.progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #2bc25f); transition: width .4s var(--ease); }
.tick-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.tick-list li { margin: 0; }
.tick-list label { display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: background .2s, border-color .2s; }
.tick-list input { width: 22px; height: 22px; accent-color: var(--green); margin: .1rem 0 0; flex: none; }
.tick-list input:checked + span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--green) 60%, transparent); color: var(--muted); }
.tick-list label:has(input:checked) { background: var(--green-100); border-color: transparent; }

/* Caregiver card visual */
.id-card { position: relative; max-width: 420px; aspect-ratio: 1.586; border-radius: 20px; padding: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--blue-800), var(--blue-600)); box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; margin-inline: auto; transform: rotate(-3deg); }
.id-card::before { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(246,180,0,.25); }
.id-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(90deg, #111 0 33%, var(--red) 33% 66%, var(--green) 66%); }
.id-card__top { display: flex; align-items: center; gap: .75rem; position: relative; }
.id-card__top img { width: 46px; height: 40px; background: #fff; border-radius: 8px; object-fit: contain; }
.id-card__top b { font-family: var(--font-display); font-size: 1.1rem; display: block; }
.id-card__top small { color: #c9d8ff; font-size: .7rem; }
.id-card__mid { display: flex; gap: 1rem; align-items: center; position: relative; }
.id-card__avatar { width: 64px; height: 64px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.id-card__mid dl { margin: 0; font-size: .78rem; display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; }
.id-card__mid dt { color: #b9cbf5; }
.id-card__mid dd { margin: 0; font-weight: 700; }
.id-card__qr { position: absolute; right: 1.4rem; bottom: 1.4rem; width: 54px; height: 54px; border-radius: 6px; background:
  conic-gradient(from 90deg at 30% 30%, #fff 25%, transparent 0) 0 0 / 10px 10px,
  #0e1d3b; border: 4px solid #fff; }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; gap: .35rem; padding: .35rem; background: var(--blue-50); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab { padding: .6rem 1.2rem; border-radius: 999px; border: 0; background: transparent; font-weight: 700; color: var(--ink-soft); cursor: pointer; font-family: var(--font-display); font-size: .95rem; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.tab-panel[hidden] { display: none; }

/* ---------- Portal ---------- */
.portal { display: grid; grid-template-columns: 240px 1fr; min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.portal__side { background: var(--blue-800); color: #d8e4ff; padding: 1.25rem; }
[data-theme="dark"] .portal__side { background: #091a42; }
.portal__user { display: flex; align-items: center; gap: .75rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.portal__avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #14213f; font-family: var(--font-display); font-weight: 800; }
.portal__user b { display: block; color: #fff; font-size: .95rem; }
.portal__user small { color: #9fb4e6; font-size: .78rem; }
.portal__nav { list-style: none; margin: 0; padding: 0; }
.portal__nav li { margin: 0; }
.portal__nav button { width: 100%; display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border: 0; border-radius: 10px; background: transparent; color: #d8e4ff; cursor: pointer; font-size: .93rem; text-align: left; }
.portal__nav button:hover, .portal__nav button.is-active { background: rgba(255,255,255,.1); color: #fff; }
.portal__nav button.is-active { box-shadow: inset 3px 0 0 var(--gold); }
.portal__nav svg { width: 18px; height: 18px; }
.portal__main { padding: clamp(1.25rem, 3vw, 2rem); background: var(--bg-tint); }
.portal__main h2 { font-size: 1.5rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.kpi span { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi b { display: block; font-family: var(--font-display); font-size: 1.35rem; margin: .2rem 0; }
.kpi small { color: var(--green); font-weight: 700; }
@media (max-width: 960px) { .portal { grid-template-columns: 1fr; } .portal__side { display: none; } .kpis { grid-template-columns: 1fr 1fr; } }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill--pending { background: var(--gold-100); color: #8a5f00; }
.pill--ok { background: var(--green-100); color: var(--green); }
.pill--no { background: var(--red-100); color: var(--red); }
[data-theme="dark"] .pill--pending { color: #ffd560; } [data-theme="dark"] .pill--ok { color: #55d487; } [data-theme="dark"] .pill--no { color: #ff8a97; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: .75rem; align-items: center; padding: .65rem 0; border-bottom: 1px dashed var(--line); margin: 0; font-size: .95rem; }
.activity li:last-child { border-bottom: 0; }
.activity li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }
.login-card { max-width: 460px; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: #b9cbf5; padding-top: clamp(3rem, 6vw, 4.5rem); font-size: .95rem; }
[data-theme="dark"] .site-footer { background: #040b1d; }
.site-footer a { color: #e6eeff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) 1.3fr; gap: 2rem; padding-bottom: 3rem; }
.footer-brand img { width: 64px; height: 54px; background: #fff; border-radius: 10px; object-fit: contain; margin-bottom: 1rem; }
.footer-brand b { display: block; font-family: var(--font-display); font-size: 1.3rem; color: #fff; }
.footer-brand p { margin: .5rem 0 1rem; }
.footer-brand blockquote { margin: 0; font-style: italic; color: var(--gold); font-weight: 600; }
.site-footer h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: .55rem 0 0; }
.newsletter { display: flex; gap: .5rem; margin-top: .75rem; }
.newsletter input { flex: 1; min-width: 0; min-height: 46px; padding: .6rem .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; }
.newsletter input::placeholder { color: #8fa6d6; }
.newsletter .btn { min-height: 46px; padding-inline: 1.1rem; }
.newsletter-msg { font-size: .85rem; margin-top: .5rem; min-height: 1.2em; color: #9fe0b5; }
.contact-lines { list-style: none; padding: 0; margin: 0; }
.contact-lines li { display: flex; gap: .6rem; align-items: center; margin: .55rem 0 0; }
.contact-lines svg { color: var(--gold); width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #8fa6d6; }
.footer-bottom ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-bottom li { margin: 0; }
.footer-disclaimer { font-size: .82rem; color: #8fa6d6; padding-bottom: 1.25rem; max-width: 110ch; }
@media (max-width: 1024px) { .footer-top { grid-template-columns: 1fr 1fr 1fr; } .footer-brand, .footer-news { grid-column: span 3; } }
@media (max-width: 600px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand, .footer-news { grid-column: span 2; } }

/* Back to top */
.to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--gold); color: #14213f; box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s var(--ease); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: .75rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: all .25s var(--ease); z-index: 200; }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Copy button */
.copy-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--brand); font-size: .8rem; font-weight: 700; cursor: pointer; }
.copy-btn:hover { border-color: var(--brand); }

/* Contact cards */
.contact-card { display: flex; gap: 1rem; align-items: flex-start; }
.contact-card .icon-badge { margin: 0; }
.contact-card h3 { font-size: 1rem; margin-bottom: .2rem; color: var(--muted); font-weight: 600; font-family: var(--font-body); }
.contact-card p { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin: 0 0 .4rem; word-break: break-word; }

/* Value cards */
.value { padding: 1.5rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.value b { display: block; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--line); margin-bottom: .75rem; }

/* Org structure */
.org { display: grid; gap: 1rem; justify-items: center; }
.org__node { width: min(100%, 520px); text-align: center; padding: 1.25rem 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; }
.org__node + .org__node::before { content: ""; position: absolute; left: 50%; top: -1rem; height: 1rem; width: 2px; background: var(--line); }
.org__node h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.org__node p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.org__node--root { background: var(--brand); border-color: var(--brand); }
.org__node--root h3, .org__node--root p { color: var(--brand-ink); }

/* Big number list */
.ask-list { list-style: none; padding: 0; margin: 0; counter-reset: ask; display: grid; gap: 1rem; }
.ask-list li { counter-increment: ask; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; margin: 0; padding: 1.25rem; border-radius: var(--radius); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.ask-list li::before { content: counter(ask, decimal-leading-zero); font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; line-height: 1; color: var(--gold); }
.ask-list strong { display: block; color: #fff; font-family: var(--font-display); margin-bottom: .2rem; }
.ask-list span { color: #c9d6f2; font-size: .96rem; }

/* Glossary */
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin: 0; }
.glossary div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.glossary dt { font-family: var(--font-display); font-weight: 700; color: var(--brand); }
.glossary dd { margin: .25rem 0 0; color: var(--ink-soft); font-size: .96rem; }
@media (max-width: 700px) { .glossary { grid-template-columns: 1fr; } }

/* Error page */
.error-page { text-align: center; padding: clamp(4rem, 10vw, 8rem) 0; }
.error-page .big { font-family: var(--font-display); font-weight: 900; font-size: clamp(5rem, 16vw, 10rem); line-height: 1; background: linear-gradient(90deg, var(--brand), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- People / board ---------- */
.person { text-align: center; padding: 1.9rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.person__avatar { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.1rem; background: linear-gradient(135deg, var(--blue-800), var(--blue-500)); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; letter-spacing: .02em; box-shadow: 0 0 0 5px var(--blue-50); }
.person__avatar svg { width: 34px; height: 34px; }
.person__avatar--gold { background: linear-gradient(135deg, var(--gold-600), var(--gold)); color: #14213f; box-shadow: 0 0 0 5px var(--gold-100); }
.person__avatar--green { background: linear-gradient(135deg, var(--green-700), var(--green)); box-shadow: 0 0 0 5px var(--green-100); }
.person__avatar--red { background: linear-gradient(135deg, #8f1d2c, var(--red)); box-shadow: 0 0 0 5px var(--red-100); }
.person h3 { font-size: 1.15rem; margin-bottom: .15rem; }
.person__role { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--green); margin-bottom: .7rem; }
[data-theme="dark"] .person__role { color: #55d487; }
.person p:last-of-type { font-size: .93rem; color: var(--ink-soft); margin-bottom: 0; }
.person .link-arrow { margin-top: .9rem; font-size: .92rem; }

/* ---------- Gallery ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.gal-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.gal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gal-card__media { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; color: #fff; position: relative; }
.gal-card__media svg { width: 52px; height: 52px; opacity: .92; }
.gal-card__media span { font-size: .8rem; font-weight: 600; letter-spacing: .04em; opacity: .85; }
.gal-card__media--blue { background: linear-gradient(135deg, var(--blue-800), var(--blue-500)); }
.gal-card__media--green { background: linear-gradient(135deg, var(--green-700), var(--green)); }
.gal-card__media--gold { background: linear-gradient(135deg, var(--gold-600), var(--gold)); color: #14213f; }
.gal-card__media--red { background: linear-gradient(135deg, #8f1d2c, var(--red)); }
.gal-card figcaption { padding: 1.1rem 1.3rem 1.3rem; }
.gal-card h3 { font-size: 1.08rem; margin: .55rem 0 .35rem; }
.gal-card figcaption p { margin: 0; font-size: .92rem; color: var(--muted); }
.media-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.media-link h3 { font-size: 1.1rem; }
.media-link p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.media-link .domain { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .9rem; color: var(--link); }
@media (max-width: 860px) { .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gal-grid { grid-template-columns: 1fr; } }

/* ---------- Print ---------- */
@media print {
  .utility, .site-header, .site-footer, .to-top, .nav-toggle, .btn, .toc, .newsletter { display: none !important; }
  .page-hero { background: none; color: #000; padding: 1rem 0; }
  .page-hero h1, .page-hero p { color: #000; }
  body { font-size: 12pt; }
  a { color: #000; }
  .section { padding: 1.5rem 0; }
  .reveal { opacity: 1; transform: none; }
}

@media (min-width: 1101px) and (max-width: 1300px) {
  .nav__link { padding: .55rem .5rem; font-size: .9rem; }
  .brand__tag { display: none; }
}
