/* ==========================================================================
   K-BIAN — Site shell components: header, nav, footer, WhatsApp FAB

   Mobile-first. Every colour comes from tokens.css — no hex values here,
   including for the WhatsApp button: it uses the K-BIAN brand green rather
   than WhatsApp's own product green, so the "one file owns every colour"
   rule in CLAUDE.md holds without an exception carved out for it.
   ========================================================================== */

/* ==========================================================================
   1. Header
   ========================================================================== */

.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: var(--kb-z-header);
    background-color: var(--kb-bg);
    transition: box-shadow var(--kb-duration-base) var(--kb-ease-out);
}

.site-header.is-compact {
    box-shadow: var(--kb-shadow-md);
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kb-space-md);
    padding-block: var(--kb-space-md);
    transition: padding-block var(--kb-duration-base) var(--kb-ease-out);
}

.site-header.is-compact .site-header__bar {
    padding-block: var(--kb-space-xs);
}

/* Fixed width so the nav never reflows as the brand renders — the cause of
   the two-line header this replaces. Widened from 220px (Samuel, July
   2026) so the full org name has room to wrap onto two lines below
   "K-BIAN" instead of being ellipsis-truncated after a handful of words —
   see .site-header__full-name. The logo image (56px tall) still governs
   the row's overall height either way; two 9px lines plus the "K-BIAN"
   line comes to well under 56px, so this doesn't make the header taller. */
.site-header__brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--kb-space-xs);
    width: 15.5rem; /* 248px */
    text-decoration: none;
    color: inherit;
}

.site-header__logo {
    flex-shrink: 0;
}

.site-header__wordmark {
    display: flex;
    flex-direction: column;
    line-height: var(--kb-leading-tight);
    min-width: 0;
}

.site-header__name {
    font-family: var(--kb-font-heading);
    font-weight: var(--kb-weight-bold);
    font-size: 1.25rem; /* 20px — header chrome, not the content type scale */
    color: var(--kb-text-heading);
}

/* Wraps onto two lines rather than being ellipsis-truncated after a
   handful of words (Samuel, July 2026 — the truncated version cut the org
   name off mid-word). Never more than two lines: the brand box is sized
   for exactly that at this font size, and the logo image beside it still
   governs the row's height regardless. */
.site-header__full-name {
    display: block;
    font-family: var(--kb-font-body);
    font-size: 0.5625rem; /* 9px */
    letter-spacing: 0.06em;
    color: var(--kb-text-muted);
    white-space: normal;
}

/* ---- Hamburger toggle — mobile only, hidden at the desktop breakpoint ---- */

.site-header__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--kb-radius-md);
}

.site-header__toggle-icon {
    position: relative;
    display: block;
    width: 1.375rem;
    height: 2px;
    background-color: var(--kb-text-heading);
    border-radius: var(--kb-radius-pill);
    transition: background-color var(--kb-duration-fast) var(--kb-ease-out);
}

.site-header__toggle-icon::before,
.site-header__toggle-icon::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    width: 100%;
    height: 2px;
    background-color: var(--kb-text-heading);
    border-radius: var(--kb-radius-pill);
    transition: transform var(--kb-duration-base) var(--kb-ease-out),
                inset-block-start var(--kb-duration-base) var(--kb-ease-out);
}

.site-header__toggle-icon::before {
    inset-block-start: -6px;
}

.site-header__toggle-icon::after {
    inset-block-start: 6px;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon {
    background-color: transparent;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon::before {
    inset-block-start: 0;
    transform: rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon::after {
    inset-block-start: 0;
    transform: rotate(-45deg);
}

/* ---- Nav — a full-width dropdown panel below the header on mobile ---- */

.site-nav {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--kb-space-md);
    padding: var(--kb-space-md) var(--kb-gutter) var(--kb-space-lg);
    background-color: var(--kb-surface);
    box-shadow: var(--kb-shadow-lg);
}

.site-nav.is-open {
    display: flex;
}

.site-nav__list {
    display: flex;
    flex-direction: column;
    gap: var(--kb-space-sm);
    font-weight: var(--kb-weight-medium);
    width: 100%;
}

.site-nav__list a {
    display: inline-block;
    padding-block: var(--kb-space-3xs);
    color: var(--kb-text-heading);
    text-decoration: none;
}

.site-nav__list a:hover {
    color: var(--kb-link-hover);
}

/* ---- Nav dropdown, generic — any .site-nav__item--dropdown item ----
   Only "Programmes" uses this today (the only nav item with real
   subpages), but the class and rules below are deliberately generic —
   not named or scoped to Programmes specifically — so a future nav item
   with its own subpages can reuse this exact mechanism with no new CSS.
   Mobile (below 1024px): a plain nested list, always visible, indented —
   the hamburger menu already scrolls, so there is no reason to make this
   collapsible too. Desktop gets its own rules in the 1024px block below.
   No arrow/caret on the trigger — deliberately plain (Samuel, July 2026). */
.site-nav__dropdown {
    display: flex;
    flex-direction: column;
    gap: var(--kb-space-2xs);
    margin-block-start: var(--kb-space-2xs);
    padding-inline-start: var(--kb-space-md);
}

.site-nav__dropdown a {
    display: inline-block;
    padding-block: var(--kb-space-3xs);
    font-size: 0.9em;
    color: var(--kb-text-muted);
    text-decoration: none;
}

.site-nav__dropdown a:hover,
.site-nav__dropdown a:focus-visible {
    color: var(--kb-link-hover);
}

.site-nav__dropdown-all {
    font-weight: var(--kb-weight-semibold);
}

/* Nav items must never wrap — collapse to the hamburger below 1024px rather
   than letting "Get Involved" et al. break onto a second line. */
@media (min-width: 64em) { /* 1024px */
    .site-header__toggle {
        display: none;
    }

    .site-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--kb-space-lg);
        padding: 0;
        background: none;
        box-shadow: none;
    }

    .site-nav__list {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem; /* 24px — trimmed slightly from 28px to make room for
                        the larger label size just below without pushing
                        nav items into wrapping at the 1024px breakpoint */
        width: auto;
        font-size: 0.9375rem; /* 15px, up from 14px (Samuel, July 2026) */
        white-space: nowrap;
    }

    /* ---- Programmes dropdown, desktop: a hover/focus panel ----
       visibility (not display) is the mechanism, deliberately: a
       display:none item is unreachable by Tab even once "open", but a
       visibility:hidden one still lets focus land on the trigger <a>
       itself first — the moment it does, :focus-within below fires and
       the panel becomes visible (and its links focusable) in the same
       instant, so continuing to Tab forward walks straight into it. No
       JavaScript needed for open/close at all. */
    .site-nav__item--dropdown {
        position: relative;
    }

    .site-nav__dropdown {
        position: absolute;
        inset-inline-start: 0;
        inset-block-start: 100%;
        z-index: var(--kb-z-header);
        flex-direction: column;
        gap: 0;
        margin-block-start: 0;
        padding: var(--kb-space-sm);
        min-width: 14rem; /* 224px */
        background-color: var(--kb-surface);
        border-radius: var(--kb-radius-md);
        box-shadow: var(--kb-shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity var(--kb-duration-fast) var(--kb-ease-out),
                    transform var(--kb-duration-fast) var(--kb-ease-out),
                    visibility 0s linear var(--kb-duration-fast);
    }

    .site-nav__item--dropdown:hover .site-nav__dropdown,
    .site-nav__item--dropdown:focus-within .site-nav__dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition-delay: 0s;
    }

    .site-nav__dropdown a {
        display: block;
        padding: var(--kb-space-2xs) var(--kb-space-xs);
        border-radius: var(--kb-radius-sm);
        font-size: 0.9375rem;
        white-space: nowrap;
    }

    .site-nav__dropdown a:hover,
    .site-nav__dropdown a:focus-visible {
        background-color: var(--kb-bg-band);
        color: var(--kb-link-hover);
    }

    .site-nav__dropdown-all {
        margin-block-start: var(--kb-space-3xs);
        padding-block-start: var(--kb-space-2xs);
        border-block-start: 1px solid rgb(155 165 127 / 0.28); /* green-400 */
    }

    @media (prefers-reduced-motion: reduce) {
        .site-nav__dropdown {
            transition: none;
        }
    }
}

/* ==========================================================================
   2. Footer
   ========================================================================== */

.site-footer {
    background-color: var(--kb-bg-deep);
    color: var(--kb-text-on-deep);
    padding-block: 4.5rem 2rem; /* 72px / 32px */
    font-size: 0.875rem; /* 14px */
    line-height: 1.9;
}

.site-footer a {
    color: var(--kb-text-on-deep);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--kb-teal-300);
    text-decoration: underline;
}

.site-footer h2 {
    font-family: var(--kb-font-heading);
    font-size: 0.75rem; /* 12px */
    font-weight: var(--kb-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--kb-green-400);
    margin-block-end: var(--kb-space-sm);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--kb-space-xl);
}

.site-footer__col ul {
    display: flex;
    flex-direction: column;
    gap: var(--kb-space-2xs);
}

.site-footer__logo {
    display: block;
    width: 8rem;
    height: auto;
    margin-block-end: var(--kb-space-sm);
}

.site-footer__col--about p {
    color: var(--kb-green-100);
    max-width: 32rem;
}

.site-footer__contact-list li {
    color: var(--kb-green-100);
}

@media (min-width: 40em) { /* 640px */
    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64em) { /* 1024px */
    .site-footer__grid {
        /* 5 columns now the newsletter form joined the other 4 — About
           stays widest, the newsletter form gets its own room rather than
           squeezing into the same 1fr as a short link list. */
        grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr;
    }
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    /* baseline, not center: with three <p> tags of slightly different
       content (plain text, a link, text with middle-dot separators)
       sharing one row, align-items:center lines up each item's BOX
       centre rather than its text — close enough to look right most of
       the time, but the registration line (longest, most likely to wrap
       internally or carry a taller line-box) then visibly sits off the
       other two lines' baseline. baseline keeps the actual TEXT level
       regardless of any one item's box height. */
    align-items: baseline;
    gap: var(--kb-space-sm) var(--kb-space-lg);
    margin-block-start: var(--kb-space-xl);
    padding-block-start: var(--kb-space-lg);
    border-block-start: var(--kb-border-thin) solid var(--kb-green-700);
    font-size: 0.75rem; /* 12px */
    color: var(--kb-green-100);
}

.site-footer__social {
    display: flex;
    align-items: center;
    /* The parent row aligns on text baseline (see .site-footer__bottom) —
       this list has no text of its own to contribute one, so left to
       itself it would synthesise a baseline from its bottom edge and sit
       noticeably low against the text beside it. Centring it against the
       row explicitly here is the correct fix, not baseline. */
    align-self: center;
    gap: var(--kb-space-sm);
    margin-inline-start: auto;
}

.site-footer__social a {
    display: inline-flex;
    color: var(--kb-green-100);
}

.site-footer__social a:hover {
    color: var(--kb-teal-300);
}

/* ==========================================================================
   3. WhatsApp click-to-chat
   ========================================================================== */

.whatsapp-fab {
    position: fixed;
    inset-block-end: max(1.25rem, env(safe-area-inset-bottom));
    inset-inline-end: 1.25rem;
    z-index: var(--kb-z-raised);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--kb-radius-circle);
    background-color: var(--kb-primary);
    color: var(--kb-white);
    box-shadow: var(--kb-shadow-lg);
    transition: transform var(--kb-duration-fast) var(--kb-ease-out),
                background-color var(--kb-duration-fast) var(--kb-ease-out);
}

.whatsapp-fab:hover {
    background-color: var(--kb-primary-hover);
    transform: translateY(-2px);
}

/* ==========================================================================
   4. Data ribbon — full-bleed dark band replacing every plain "big number
      then label" list on the site (the home stats row, and the density
      figures on kakamega-forest). Edge to edge; the grid inside stays
      container-width, same full-bleed-bg/contained-content shape as
      .image-band. green-400 is decoration-only everywhere else on the site,
      but green-400-on-green-900 measures 5.27:1 — verified, not assumed —
      so it is the one place that label is allowed to carry text; see
      CLAUDE.md.
   ========================================================================== */

.data-ribbon {
    background-color: var(--kb-green-900);
}

.data-ribbon__grid {
    display: grid;
    grid-template-columns: 1fr;
}

.data-ribbon__cell {
    position: relative;
    padding: 1.875rem; /* 30px */
}

.data-ribbon__bar {
    display: block;
    width: 1.625rem; /* 26px */
    height: 3px;
    margin-block-end: 1rem; /* 16px */
    background-color: var(--kb-gold-400);
    border-radius: var(--kb-radius-pill);
}

.data-ribbon__value {
    display: block;
    font-family: var(--kb-font-heading);
    font-weight: var(--kb-weight-bold);
    font-size: clamp(1.625rem, 3.2vw, 2.5rem); /* 26px -> 40px */
    letter-spacing: -0.02em;
    color: var(--kb-cream);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* The unit rendered as a permanent, separately-sized inline element, never
   appended to the number's own text — see the stat-block precedent this
   generalises, and CLAUDE.md's "must never wrap onto its own line" rule. */
.data-ribbon__unit {
    margin-inline-start: 0.15em;
    font-size: 0.42em;
    color: var(--kb-gold-400);
}

.data-ribbon__label {
    display: block;
    margin-block-start: 0.6875rem; /* 11px */
    max-width: 22ch;
    font-size: 0.75rem; /* 12px */
    color: var(--kb-green-400);
}

@media (min-width: 40em) { /* 640px, tablet: 2 columns */
    .data-ribbon__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-ribbon__cell:not(:nth-child(2n+1))::before {
        content: "";
        position: absolute;
        inset-block: 1.625rem; /* 26px inset top/bottom */
        inset-inline-start: 0;
        width: 1px;
        background-color: rgb(155 165 127 / 0.28); /* green-400 */
    }
}

@media (min-width: 64em) { /* 1024px, desktop: 4 columns */
    .data-ribbon__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .data-ribbon__cell:not(:nth-child(2n+1))::before {
        display: none;
    }

    .data-ribbon__cell:not(:nth-child(4n+1))::before {
        content: "";
        position: absolute;
        inset-block: 1.625rem;
        inset-inline-start: 0;
        width: 1px;
        background-color: rgb(155 165 127 / 0.28);
    }
}

/* Two-cell variant (home page) — wide, generously padded and centred rather
   than sitting in the first half of a grid built for four, which read as
   sparse. Overrides the breakpoints above at every width. */
.data-ribbon--pair .data-ribbon__grid {
    grid-template-columns: 1fr;
    max-width: 48rem; /* 768px */
    margin-inline: auto;
}

.data-ribbon--pair .data-ribbon__cell {
    padding-block: 2.5rem; /* 40px */
    text-align: center;
}

.data-ribbon--pair .data-ribbon__bar {
    margin-inline: auto;
}

.data-ribbon--pair .data-ribbon__label {
    max-width: none;
    margin-inline: auto;
}

@media (min-width: 40em) { /* 640px */
    .data-ribbon--pair .data-ribbon__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-ribbon--pair .data-ribbon__cell:not(:nth-child(2n+1))::before {
        content: "";
        position: absolute;
        inset-block: 2.5rem;
        inset-inline-start: 0;
        width: 1px;
        background-color: rgb(155 165 127 / 0.28);
    }
}

@media (min-width: 64em) { /* 1024px — override the 4-column rule above */
    .data-ribbon--pair .data-ribbon__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-ribbon--pair .data-ribbon__cell:not(:nth-child(4n+1))::before {
        display: none;
    }

    .data-ribbon--pair .data-ribbon__cell:not(:nth-child(2n+1))::before {
        content: "";
        position: absolute;
        inset-block: 2.5rem;
        inset-inline-start: 0;
        width: 1px;
        background-color: rgb(155 165 127 / 0.28);
    }
}

/* Single-cell variant — one figure carried in its own band, e.g. the
   Mining and Extractives programme's "70+ leaching sites" stat. Wide,
   centred, generously padded so a single number doesn't read as an
   afterthought or a layout that's missing its other cells. */
.data-ribbon--single .data-ribbon__grid {
    grid-template-columns: 1fr;
    max-width: 36rem; /* 576px */
    margin-inline: auto;
}

.data-ribbon--single .data-ribbon__cell {
    padding-block: 2.5rem; /* 40px */
    text-align: center;
}

.data-ribbon--single .data-ribbon__bar {
    margin-inline: auto;
}

.data-ribbon--single .data-ribbon__label {
    max-width: none;
    margin-inline: auto;
}

/* ==========================================================================
   5. Achievement cards — over photography. The two things K-BIAN has
      actually delivered, set over a forest photograph rather than as bare
      text, per CLAUDE.md's "Facts and honesty": stated plainly, no more
      than are true.
   ========================================================================== */

.achievement-band {
    position: relative;
    overflow: hidden;
}

.achievement-band img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.achievement-band__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgb(var(--kb-green-900-rgb) / 0.93) 0%,
        rgb(var(--kb-green-900-rgb) / 0.62) 60%,
        rgb(var(--kb-green-900-rgb) / 0.30) 100%
    );
}

.achievement-band__content {
    position: relative;
    z-index: var(--kb-z-raised);
    padding-block: clamp(4.5rem, 9vw, 7.5rem); /* the section-padding floor */
}

.achievement-band__eyebrow {
    display: block;
    margin-block-end: var(--kb-space-sm);
    font-family: var(--kb-font-heading);
    font-size: var(--fs-eyebrow);
    font-weight: var(--kb-weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--kb-tracking-caps);
    color: var(--kb-gold-400);
}

.achievement-band__title {
    color: var(--kb-cream);
}

.achievement-band__deck {
    margin-block-start: var(--kb-space-sm);
    max-width: 60ch;
    font-size: 1.3125rem; /* 21px, the deck size */
    line-height: var(--lh-lead);
    color: var(--kb-cream);
    opacity: 0.72;
}

.achievement-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem; /* 28px, the card-gap floor */
    max-width: 44rem; /* 704px — 2x2 at desktop, one column on mobile */
    margin-block-start: var(--kb-space-xl);
}

.achievement-card {
    padding: 1.375rem; /* 22px */
    background-color: rgb(247 245 239 / 0.055); /* cream, near-invisible */
    border: 1px solid rgb(155 165 127 / 0.28); /* green-400 */
    border-radius: 0.5rem; /* 8px */
}

.achievement-card__value {
    display: block;
    font-family: var(--kb-font-heading);
    font-weight: var(--kb-weight-bold);
    font-size: clamp(1.875rem, 4vw, 2.875rem); /* 30px -> 46px */
    color: var(--kb-cream);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Verified, not assumed: gold-400 against this card sits on a scrim built
   from green-900 at up to 0.93 opacity, effectively flat green-900 behind
   the text — gold-400-on-green-900 measures 5.7:1. Gold-400 is
   decoration-only everywhere else on the site; this is the other place,
   alongside .data-ribbon__label, where a verified fixed pairing earns an
   exception — see CLAUDE.md. */
.achievement-card__label {
    display: block;
    margin-block-start: 0.25rem;
    font-size: 0.8125rem; /* 13px */
    font-weight: var(--kb-weight-semibold);
    color: var(--kb-gold-400);
}

.achievement-card__context {
    margin-block-start: var(--kb-space-2xs);
    font-size: 0.75rem; /* 12px */
    color: var(--kb-cream);
    opacity: 0.62;
}

@media (min-width: 40em) { /* 640px */
    .achievement-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   6. Key facts — on cream. Replaces every bare "label value" pair (the
      registration facts on about, and the fact-lists under both inner-page
      heroes) with a consistent, styled component.
   ========================================================================== */

/* margin-block-end, not gap: gap only spaces grid items from each other, not
   the grid container from whatever follows it. Without this, key-facts sat
   almost flush against the section-eyebrow directly below it — see
   CLAUDE.md. display:grid already establishes its own formatting context,
   so this margin cannot collapse into the section wrapper's own top
   padding (padding never collapses with a margin regardless); the two
   spaces are independent by construction, not just in practice. */
.key-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr)); /* 220px */
    gap: 2rem 0; /* 32px row gap, 0 column gap — each item carries its own left rule instead */
    align-items: stretch;
    margin-block-end: 4rem; /* 64px */
}

.key-facts__item {
    padding-inline: 1.25rem; /* 20px */
    border-inline-start: 2px solid var(--kb-gold-400);
}

.key-facts__key {
    display: block;
    font-family: var(--kb-font-heading);
    font-weight: var(--kb-weight-bold);
    font-size: 1.1875rem; /* 19px */
    color: var(--kb-green-600);
    white-space: nowrap;
}

.key-facts__value {
    display: block;
    margin-block-start: 0.4375rem; /* 7px */
    font-size: 0.78125rem; /* 12.5px */
    line-height: 1.5;
    color: rgb(var(--kb-ink-rgb) / 0.7);
}

/* auto-fit above already handles every width — a fact never wraps into a
   shared cell with another, and there's no fixed column count to fall out
   of step with however many facts a given page has. */

/* ==========================================================================
   7. Forms — shared by the contact form and the newsletter partial, so both
      look and behave identically rather than each carrying its own
      one-off input styling.
   ========================================================================== */

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--kb-space-3xs);
    margin-block-end: var(--kb-space-md);
}

.form-field label {
    font-weight: var(--kb-weight-medium);
}

.form-field__optional {
    font-weight: var(--kb-weight-regular);
    color: var(--kb-text-muted);
}

.form-field input,
.form-field textarea {
    min-height: 2.75rem;
    padding: var(--kb-space-xs) var(--kb-space-sm);
    border: var(--kb-border-thin) solid var(--kb-border);
    border-radius: var(--kb-radius-md);
    background-color: var(--kb-surface);
    font: inherit;
    color: inherit;
}

.form-field textarea {
    min-height: 8rem;
    resize: vertical;
}

/* No red/error colour exists in the token file, and gold is reserved
   exclusively for donate actions (CLAUDE.md) — never repurpose it here.
   Errors are distinguished by weight, an inline-start border and explicit
   text/role="alert" rather than a colour, which also keeps them legible
   without relying on colour alone (WCAG 1.4.1). */
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
    border-color: var(--kb-green-800);
    border-width: 2px;
}

.form-field__error {
    display: block;
    font-size: var(--fs-small);
    font-weight: var(--kb-weight-medium);
    color: var(--kb-text-heading);
}

.form-error-summary {
    margin-block-end: var(--kb-space-md);
    padding: var(--kb-space-sm) var(--kb-space-md);
    background-color: rgb(var(--kb-ink-rgb) / 0.06);
    border-inline-start: 3px solid var(--kb-green-800);
    border-radius: var(--kb-radius-sm);
    font-weight: var(--kb-weight-medium);
}

.form-success {
    padding: var(--kb-space-md);
    background-color: var(--kb-bg-band);
    border-radius: var(--kb-radius-md);
    color: var(--kb-text-heading);
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: var(--kb-space-xs);
    margin-block-end: var(--kb-space-md);
}

.form-consent input {
    flex-shrink: 0;
    margin-block-start: 0.3rem;
}

.form-consent label {
    font-weight: var(--kb-weight-regular);
    font-size: var(--fs-small);
    color: var(--kb-text-muted);
}

/* Newsletter partial — app/Views/partials/newsletter-form.php */
.newsletter-signup__form {
    max-width: 26rem;
}

.newsletter-signup--on-dark .form-field label,
.newsletter-signup--on-dark .form-consent label {
    color: var(--kb-cream);
}

.newsletter-signup--on-dark .form-consent label {
    opacity: 0.8;
}
