/* Keep the drawer above the visible consent banner, including wrapped text. */
body {
  padding-bottom: var(--cookie-banner-space, 0px);
}

.nav-drawer.is-open {
  bottom: var(--cookie-banner-space, 0px);
}

/* Leave the desktop consent card its own column while reading a blog post. */
@media (min-width: 1024px) {
  body:has(#cookie-banner.is-visible:not([hidden])) .blog-post > .section {
    padding-right: calc(420px + var(--space-6) * 2);
  }
}

/* Keep translated calls to action within narrow cards and grid columns. */
.hero__container > *,
.hero__content,
.hero__actions {
  min-width: 0;
}

.hero-carousel__toggle {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 6px;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font: inherit;
  font-size: .75rem;
  line-height: 1.25;
  cursor: pointer;
}

/* Keep the full navigation hidden until both languages fit comfortably. */
@media (min-width: 1024px) and (max-width: 1239.98px) {
  .nav__list,
  .nav__cta,
  .nav__right > .lang-switcher {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }
}

/* ── Header width: the bar lines up with the home page hero ─────────────────
   .hero pads by --space-6 and centres a --container-max column, so its content
   runs from max(--space-6, (100vw - --container-max) / 2) to the mirror edge.
   The bar's container (and the mega menu's) pads by --space-6 too, so it gets
   --container-max plus that padding on each side, and its content meets the same
   two edges at every width. The logo image has 8.1% empty space either side of
   the mark (viewBox 393.86 wide, ink from x = 32.03): on desktop it moves left by
   that much, so the mark, not the image box, meets the edge. */
.nav__container {
  max-width: calc(var(--container-max) + 2 * var(--space-6));
}

@media (min-width: 1024px) {
  .nav__logo {
    margin-inline-start: calc(-171px * 32.03 / 393.86);
  }
}

/* ── Gold button: the header's "Get the App" (markup: scripts/site_nav.py) ──
   Rei Gold with charcoal text 5.07:1 and a dark-gold edge 5.70:1 on white
   (3.13:1 on the gold itself). Hover and keyboard focus darken it to the dark
   gold with white text, 5.70:1; focus keeps the site's teal ring. */
.btn--gold {
  background-color: var(--color-accent);
  border: 2px solid var(--color-accent-dark);
  color: var(--color-neutral-dark);
  box-shadow: 0 2px 8px rgba(184, 146, 58, 0.30);
}

.btn--gold:hover,
.btn--gold:focus-visible {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
  box-shadow: none;
}

/* In the bar only where the full bar shows (from 1240px, as .nav__cta and the main
   script); in the drawer, the full width of the panel like Book a Demo above it. */
.nav__app {
  display: none;
}

@media (min-width: 1240px) {
  .nav__app {
    display: inline-flex;
  }
}

.nav-drawer__app {
  width: 100%;
  justify-content: center;
}

/* A larger icon that does not make the button taller than Book a Demo beside it. */
.btn--gold .ph-duotone {
  font-size: 1.25em;
  line-height: 1;
  margin-block: -0.125em;
}

/* Align stacked footer navigation with the brand and social links. */
@media (max-width: 768px) {
  .footer__container {
    gap: 24px;
  }

  .footer__nav-section {
    width: 100%;
    margin: 0;
    padding: 0;
  }
}

/* Give the home-page introduction full width on smaller tablets. */
@media (min-width: 768px) and (max-width: 1239.98px) {
  .hero:has(.hero-carousel) {
    padding-top: 48px;
  }

  .hero:has(.hero-carousel) .hero__container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero:has(.hero-carousel) .hero-carousel {
    justify-self: center;
    width: min(100%, 360px);
    margin-inline: auto;
  }

  .hero:has(.hero-carousel) .hero__heading {
    font-size: 40px;
    line-height: 1.1;
    margin-bottom: 16px;
  }

  .hero:has(.hero-carousel) .hero__eyebrow {
    margin-bottom: 12px;
  }

  .hero:has(.hero-carousel) .hero__subheading {
    margin-bottom: 20px;
  }

  .hero:has(.hero-carousel) .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  /* Compact the Organizations, Individuals and Platform introductions on mobile. */
  main:has(#access-gap-heading, #whole-person-heading, #capabilities-heading) .hero {
    padding-top: 48px;
  }

  main:has(#access-gap-heading, #whole-person-heading, #capabilities-heading) .hero__heading {
    font-size: 32px;
    line-height: 1.1;
    margin-bottom: 16px;
  }

  main:has(#access-gap-heading, #whole-person-heading, #capabilities-heading) .hero__subheading {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  main:has(#capabilities-heading) .hero__container {
    gap: 24px;
  }

  main:has(#capabilities-heading) .hero__image {
    width: min(100%, 240px);
    margin-inline: auto;
  }

  /* Compact the home-page introduction without changing its copy. */
  .hero:has(.hero-carousel) {
    padding-top: 48px;
  }

  .hero:has(.hero-carousel) .hero__heading {
    font-size: 32px;
    line-height: 1.1;
    margin-bottom: 16px;
  }

  .hero:has(.hero-carousel) .hero__eyebrow {
    margin-bottom: 12px;
  }

  .hero:has(.hero-carousel) .hero__subheading {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .btn {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
  }

  .hero__content,
  .hero__image,
  .hero__actions {
    max-width: 100%;
  }
}

/* Show which main-menu page you are on. Muted primary keeps 4.5:1 on the tint. */
.nav__link[aria-current="page"],
.nav__link[aria-current="page"]:hover,
.nav__link[aria-current="page"]:focus-visible,
.nav-drawer__link--top[aria-current="page"],
.nav-drawer__link--top[aria-current="page"]:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-muted);
  font-weight: 600;
}

/* Footer: a narrower brand column and four link columns (Safety, Explore,
   Company, Legal). The links sit side by side from 1200px, where
   even the longer French labels fit on one line; two by two below that; and
   one under another on phones, below the brand. */
@media (min-width: 769px) {
  .footer__container {
    grid-template-columns: 25% 70%;
  }

  /* Fill the link half; its auto margins would otherwise shrink it to fit
     and leave the columns nothing to spread into. */
  .footer__nav-section {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1199.98px) {
  .footer__nav-section {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .footer__nav-section {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    /* A minimum: space-between spreads the columns over the room left over. */
    gap: 32px;
  }
}

/* Show the menu's close icon as a plain X, without the duotone box behind it.
   Opacity, not display:none, so the X (the :after glyph, pulled back 1em)
   stays where it is. */
.nav-drawer__close .ph-duotone.ph-x::before {
  opacity: 0;
}

/* Hover states: the footer's bottom-bar green (dark teal under its 25% black
   overlay) instead of the brown accent (#B8923A) the main stylesheet uses. */
:root { --color-hover-dark: #083B2F; }
.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-hover-dark);
  border-color: var(--color-hover-dark);
  color: #fff;
}
.btn--outline:hover { border-color: var(--color-hover-dark); color: var(--color-hover-dark); }
.hn-btn--card:hover { background: var(--color-hover-dark); color: #fff; }
.hn-btn--call:hover { background: var(--color-hover-dark); border-color: var(--color-hover-dark); color: #fff; }

/* Footer: Safety and Platform share one column, Platform under Safety. */
.footer__nav-stack { display: flex; flex-direction: column; gap: 32px; }

/* Footer headings that link to a section's overview page (Legal → /legal/). */
.footer__nav-heading-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__nav-heading-link:hover,
.footer__nav-heading-link:focus-visible {
  color: var(--color-text-on-dark);
  text-decoration: underline;
}

/* ── Who We Serve mega menu (markup: scripts/site_nav.py) ─────────────────
   One menu button opens a panel the width of the header: an intro, the
   three audiences with a line each, and a feature card. The main script
   opens it on hover or click ([data-dropdown]) and closes it on Escape or a
   click elsewhere. The item fills the bar's height, so the pointer never
   crosses a gap on its way down to the panel. */
@media (min-width: 1024px) {
  .nav__list {
    align-self: stretch;
  }

  .nav__item--mega {
    position: static;
    display: flex;
    align-items: center;
  }
}

.nav__link--trigger {
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
}

.nav__link--trigger:hover,
.nav__link--trigger[aria-expanded="true"] {
  background: var(--clr-gray-100);
}

.nav__link--trigger.is-current,
.nav__link--trigger.is-current:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-muted);
  font-weight: 600;
}

.nav__caret {
  font-size: 0.75em;
  transition: transform var(--transition-fast);
}

.nav__link--trigger[aria-expanded="true"] .nav__caret {
  transform: rotate(180deg);
}

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.mega-menu.is-open {
  display: block;
  animation: megaMenuIn 160ms ease-out;
}

@keyframes megaMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mega-menu.is-open { animation: none; }
}

.mega-menu__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  max-width: calc(var(--container-max) + 2 * var(--space-6)); /* the bar's width (Header width, above) */
  margin-inline: auto;
  padding: 32px var(--space-6) 36px;
}

.mega-menu__title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: var(--weight-bold);
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: 12px;
}

.mega-menu__text {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.mega-menu__more,
.mega-menu__feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary-muted);
}

.mega-menu__more:hover {
  text-decoration: underline;
}

.mega-menu__more .ph-icon,
.mega-menu__feature-link .ph-icon {
  transition: transform var(--transition-fast);
}

.mega-menu__more:hover .ph-icon,
.mega-menu__feature:hover .mega-menu__feature-link .ph-icon {
  transform: translateX(3px);
}

.mega-menu__label {
  font-family: var(--font-heading);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.mega-menu__list {
  display: grid;
  gap: 4px;
}

.mega-menu__link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.mega-menu__link:hover,
.mega-menu__link:focus-visible,
.mega-menu__link[aria-current="page"] {
  background: var(--bg-teal-wash);
}

/* Spelled out rather than .icon-box, which the F5 pages' stylesheets lack. */
.mega-menu__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1.1rem;
}

.mega-menu__link-text strong {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.mega-menu__link[aria-current="page"] strong {
  color: var(--color-primary-muted);
}

.mega-menu__link-text span {
  display: block;
  font-size: var(--font-size-xs);
  line-height: 1.5;
  color: var(--color-text-muted);
}

.mega-menu__feature {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  transition: box-shadow var(--transition-fast);
}

.mega-menu__feature:hover {
  box-shadow: var(--shadow-md);
}

.mega-menu__feature img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mega-menu__feature-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 20px;
}

.mega-menu__feature-body > strong {
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  line-height: 1.3;
  color: var(--color-text);
}

.mega-menu__feature-body > span:not(.mega-menu__feature-link) {
  font-size: var(--font-size-xs);
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Mobile drawer: Who We Serve opens in place (a <details> group). */
.nav-drawer__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.nav-drawer__summary::-webkit-details-marker {
  display: none;
}

.nav-drawer__summary.is-current {
  color: var(--color-primary-muted);
}

.nav-drawer__caret {
  transition: transform var(--transition-fast);
}

.nav-drawer__disclosure[open] .nav-drawer__caret {
  transform: rotate(180deg);
}

.nav-drawer__sublink {
  padding-left: var(--space-8);
}

.nav-drawer__sublink[aria-current="page"] {
  background: var(--color-primary-light);
  color: var(--color-primary-muted);
  font-weight: 600;
}

/* Platform, "See ReiSpace in action": the intro sits above the four tabs, in their column. */
.status-tabs__side {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}
.status-tabs__intro {
    margin: 0;
    color: var(--clr-gray-600);
    line-height: 1.75;
}

/* /legal/ and its pages (the generated ones and /legal/accessibility/): a left menu beside the page. It stays in view while a
   long policy scrolls; below 900px it becomes a row of buttons above the page. */
.f5-with-nav {
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start;
}
.f5-with-nav > .f5-container { margin: 0; padding: 0; max-width: 760px; }
.f5-legal-nav {
  position: sticky; top: 96px;
  background: #fff; border: 1px solid #e3e6e4; border-radius: 14px; padding: 14px 10px;
}
.f5-legal-nav__title {
  margin: 0 10px 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-accent-muted, #856A3A);
}
.f5-legal-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.f5-legal-nav__link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: #33404a; font-size: 0.95rem; font-weight: 500; line-height: 1.3; text-decoration: none;
}
.f5-legal-nav__link i { font-size: 20px; color: var(--color-primary, #0C7E66); flex-shrink: 0; }
.f5-legal-nav__link:hover { background: var(--color-neutral-light, #F7F7F5); color: var(--color-secondary, #0A4F3E); }
.f5-legal-nav__link[aria-current="page"] {
  background: var(--color-primary-light, rgba(12, 126, 102, 0.10));
  color: var(--color-primary-muted, #0B7861); font-weight: 600;
}

@media (max-width: 899.98px) {
  .f5-with-nav { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .f5-with-nav > .f5-container { max-width: none; }
  .f5-legal-nav { position: static; padding: 12px; }
  .f5-legal-nav__title { margin: 0 4px 8px; }
  .f5-legal-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .f5-legal-nav__link { padding: 7px 12px; border: 1px solid #e3e6e4; border-radius: 999px; font-size: 0.9rem; }
  .f5-legal-nav__link i { font-size: 18px; }
  .f5-legal-nav__link[aria-current="page"] { border-color: var(--color-primary, #0C7E66); }
}

/* /legal/accessibility/: a hand-written page on the main stylesheet, set to
   look like the generated legal pages (f5-plain.css): the same background,
   type, headings and spacing, then the report form as a card. */
.legal-page {
    padding: 32px 0 48px;
    background: var(--color-neutral-light, #F7F7F5);
    color: var(--color-neutral-dark, #1F2933);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}
.legal-page__content { min-width: 0; max-width: 760px; }
.legal-page__title {
    font-family: inherit; font-weight: 700; letter-spacing: normal;
    font-size: clamp(1.75rem, 5vw, 2.4rem); line-height: 1.2; margin: 0 0 16px;
    color: var(--color-secondary, #0A4F3E);
}
.legal-page__meta { font-weight: 600; margin: 16px 0; }
.legal-page__doc h2 {
    font-family: inherit; font-weight: 700; letter-spacing: normal;
    font-size: 1.15rem; line-height: 1.6; margin: 32px 0 8px;
    color: var(--color-secondary, #0A4F3E);
}
.legal-page__doc p { margin: 0 0 12px; font-size: 1rem; line-height: 1.6; color: inherit; overflow-wrap: anywhere; }
.legal-page__doc a { color: var(--color-primary, #0C7E66); }
.legal-page__form {
    margin-top: 40px; padding: 24px;
    background: #fff; border: 1px solid #e3e6e4; border-radius: 12px;
}
.legal-page__form .contact-form-wrap__heading {
    font-family: inherit; font-weight: 700; letter-spacing: normal;
    font-size: 1.4rem; line-height: 1.3; margin: 0 0 8px;
    color: var(--color-secondary, #0A4F3E);
}
.legal-page__form .contact-form-wrap__intro { margin: 0 0 20px; }

/* Evidence: no line of text runs the full 1200px container. */
.evidence-informed .section__heading,
.evidence-informed .section__body { max-width: 760px; }

/* Evidence, "Early commercial evidence": text on the left, the checklist in a
   card on the right. Narrow screens keep reading order: heading, list, the
   paragraphs that refer to it, then the button. */
.evidence-early {
    display: grid;
    grid-template-areas: "head" "list" "body" "cta";
    gap: 24px;
}
.evidence-early__intro { display: contents; }
.evidence-early .section__heading { grid-area: head; margin-bottom: 0; }
.evidence-early__list { grid-area: list; }
.evidence-early .section__body { grid-area: body; max-width: 60ch; margin: 0; }
.evidence-early .section__body p:last-child { margin-bottom: 0; }
.evidence-early .section__cta { grid-area: cta; margin: 0; justify-content: flex-start; text-align: left; }
.evidence-early__list .feature-list { margin: 0; }
.evidence-early__list {
    padding: 28px 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
}
@media (min-width: 960px) {
    .evidence-early {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto 1fr;
        grid-template-areas: "head list" "body list" "cta list";
        column-gap: 64px;
        align-items: start;
    }
}

/* No motion on text or buttons (owner, 11 Nov 2026). Cards keep their
   fade-in; headings, paragraphs, notes and button groups have none (removed
   from the pages). Buttons and menu links change colour at once on hover, arrows
   and carets do not slide or turn, and menus open without an entrance. The
   logo marquee and the mobile menu panels are not text or buttons and keep theirs. */
.btn, .hn-btn, .f5-button, .lang-pill,
.nav__link, .nav-drawer__link, .nav-drawer__link--top, .lang-dropdown__item,
.footer__nav-link, .footer__nav-heading-link, .mega-menu__link { transition: none; }
.has-arrow .ph-arrow-right, .has-arrow:hover .ph-arrow-right,
.mega-menu__more .ph-icon, .mega-menu__feature-link .ph-icon,
.mega-menu__more:hover .ph-icon,
.mega-menu__feature:hover .mega-menu__feature-link .ph-icon { transition: none; transform: none; }
.nav__caret, .nav-drawer__caret, .lang-pill__caret, .hero-carousel__dot { transition: none; }
.mega-menu.is-open, .nav__dropdown, .lang-dropdown { animation: none; }


/* The 988 card has the same border as the other crisis cards (owner, 11 Nov 2026). */
.hn-card--featured, .hn-card--featured:hover { border-color: var(--clr-gray-200); box-shadow: none; }


/* Crisis Resources: "Open website" on a card that also calls or texts, under its other buttons. */
.hn-btn--website {
    width: 100%; margin-top: 8px; padding: 10px 20px;
    background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary);
    font-size: var(--text-xs);
}
.hn-btn--website:hover { background: var(--color-primary); color: var(--color-text-on-dark, #fff); }

/* Cards are not links and do not react to hover (owner, 11 Nov 2026): only the
   links and buttons inside them do. Each card keeps its own look on hover. */
.pillar:hover, .pathway-card:hover, .hn-card:hover, .dimension-card:hover,
.audience-card:hover, .blog-card:hover, .participation-card:hover { transform: none; box-shadow: none; }
.about-stat-card:hover, .section--platform .pillar:hover { transform: none; box-shadow: var(--shadow-sm); }

/* ── Accessibility corrections (Phase 4) ─────────────────────────────────── */

/* Small category labels on the light-green tint (#E7F2F0): the muted primary
   keeps the brand teal at 4.74:1 (brand teal was 4.38:1; AA needs 4.5:1). The
   dark-section labels keep their own colours. */
.blog-card__category,
.participation-card__tag {
  color: var(--color-primary-muted);
}

/* Footer newsletter field: the brand teal border is 5.0:1 against the white
   field and 4.5:1 against the band around it (was 1.5:1 and 1.4:1; WCAG 1.4.11
   needs 3:1). Focus keeps its ring. */
.footer-newsletter .footer__newsletter-row .input {
  border-color: var(--color-primary);
}

/* Focus on the dark green surfaces (cookie banner, footer): the off-white ring is
   8.9:1 against #0A4F3E and 4.7:1 against the green button (the brand teal ring
   was 1.9:1 and 1.0:1). */
.cookie-banner :focus-visible,
.footer :focus-visible {
  outline-color: var(--color-text-on-dark);
}

/* Home carousel indicators: the same 6px dots and 18px bar, inside 24x24px
   buttons that touch edge to edge (WCAG 2.2 target size; they were 6x6px, 6px
   apart). The row moves down 9px so the dots stay where they were.
   A11Y-028 (D-21, option B2): the dots are white at 80% with a 1px ring at 80%
   black, so each holds 3:1 against any of the eight photographs, light or dark
   (WCAG 1.4.11; they were white at 40% with no edge). Sizes, spacing and the
   active bar's shape are unchanged. */
.hero-carousel__dots {
  gap: 0;
  bottom: 81px;
}

.hero-carousel__dot,
.hero-carousel__dot.is-active {
  position: relative;
  width: 24px;
  height: 24px;
  background: transparent;
  border-radius: 50%;
}

.hero-carousel__dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%);
}

.hero-carousel__dot.is-active::before {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}

.hero-carousel__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0;
  box-shadow: 0 0 0 4px var(--bg-dark-teal);
  border-radius: 50%;
}

/* Cookie banner reflow: never more than 60% of the window. The text scrolls
   inside it and the two choices stay in view (WCAG 1.4.10 at 320x256), and a page
   control reached with Tab scrolls clear of the banner (WCAG 2.4.11). */
html {
  scroll-padding-bottom: var(--cookie-banner-space, 0px);
}

.cookie-banner {
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  max-height: 60dvh;
}

/* A hidden banner (a choice is saved) must stay out of the page entirely: no Tab
   stop, nothing for a screen reader. The flex rule above must not override the
   hidden attribute (tests/a11y/banner-hidden.test.cjs). */
.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__inner {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.cookie-banner__content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cookie-banner__actions {
  flex: none;
}

/* Opened from "Cookie preferences", the banner itself takes focus. */
.cookie-banner:focus-visible {
  outline-offset: -3px;
  border-radius: 0;
}

@media (min-width: 1024px) {
  .cookie-banner:focus-visible {
    border-radius: var(--radius-lg);
  }
}

.cookie-banner__status {
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-on-dark);
}

/* Short windows: tighter spacing and both choices on one row. */
@media (max-height: 480px) {
  .cookie-banner {
    padding: var(--space-3) var(--space-4);
  }

  .cookie-banner__inner {
    gap: var(--space-3);
  }

  .cookie-banner__actions {
    flex-wrap: nowrap;
    gap: var(--space-2);
  }

  .cookie-banner__actions .btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
  }
}

/* A11Y-008/009 Skip link, one style for every page (hand-written and generated).
   Hidden above the page until focused; when focused it sits above the sticky
   header (z-index 1000) and the cookie banner (1500), in the look the generated
   pages already used: white chip, brand-teal underlined text, dark-green ring. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 2000;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.skip-link:focus {
  top: 8px;
}

.skip-link:focus-visible {
  outline: 3px solid var(--color-secondary, #0A4F3E);
  outline-offset: 2px;
  border-radius: 6px;
}

/* A11Y-007 (decision D-05) Focus on the remaining dark surfaces: the same light
   ring as the footer and cookie banner (--color-text-on-dark, #F7F7F5), 8.2 to
   9.3:1 against every dark tint used (#0A4F3E, #1F4C5A, #5C3E10, #5A4827 and the
   emergency notice's #7F1D1D; the brand-teal ring was 1.75 to 2.0:1). Scoped to
   surfaces that are always dark; the evidence band is dark only on the blue-teal
   and gold pages. Nothing changes until a control is focused with the keyboard. */
.hero :focus-visible,
.page-hero--dark :focus-visible,
.section--dark :focus-visible,
.section--dark-wash :focus-visible,
.page--blue-teal .section--evidence :focus-visible,
.page--gold .section--evidence :focus-visible,
.hn-emergency :focus-visible {
  outline-color: var(--color-text-on-dark);
}

/* The slideshow button sits on a photograph: a dark backdrop behind its light
   ring keeps the ring at 8.9:1 whatever the photo shows (as for the dots). */
.hero-carousel__toggle:focus-visible {
  outline-color: var(--color-text-on-dark);
  box-shadow: 0 0 0 9px var(--bg-dark-teal);
}

/* A11Y-017 ReiGuide comparison table: each row's first cell is now a row header
   (<th scope="row">); keep its old look (not bold, same hover). The scroll area
   takes keyboard focus so it can be scrolled with the arrow keys. */
.comparison-table-wrap .comparison-table tbody th {
  font-weight: inherit;
  transition: filter var(--transition-fast);
}

.comparison-table-wrap .comparison-table tbody tr:hover th {
  filter: brightness(0.97);
}

.comparison-table-wrap:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* A11Y-014 (step 1) Crisis Resources: the service's French name under a card
   title (1-866-APPELLE) was #9CA3AF on white, 2.54:1. The page's own secondary
   text colour (--color-text-faint, #6B7686) is 4.60:1; same size and weight. */
.hn-card__name-fr {
  color: var(--color-text-faint);
}

/* A11Y-016 Form fields: the focus cue was a 1px border colour change plus a
   1.17:1 glow, and nothing in Windows contrast themes (outline:0). Keyboard and
   pointer focus now draw the site's standard ring, kept close to the field:
   brand teal, 5.0:1 on white, 4.5:1 on the newsletter band. The teal border and
   the soft glow stay. */
.input:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* A11Y-002 Cookie preferences panel on the Cookie Policy page (and its French page): the
   F5 card and button styles; a <button> needs the link button's reset, the hidden
   attribute must win over .f5-button's display, and an empty status line takes no room. */
button.f5-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.f5-cookie-prefs [hidden] {
  display: none;
}

.f5-cookie-prefs button.f5-button:focus-visible {
  outline: 3px solid var(--color-secondary, #0A4F3E);
  outline-offset: 2px;
}

.f5-cookie-prefs [role="status"]:empty {
  margin: 0;
}

/* A11Y-015: error text at 4.5:1 or more. --color-red (#DC2626) is 4.41:1 on the error summary's
   #FEF2F2 and 4.34:1 on the newsletter band; #B91C1C, the next darker red of the same family, is
   5.91:1 and 5.82:1 there and 6.47:1 on white. The red field border is unchanged. */
.form-message.is-error,
.form-error { color: #B91C1C; }

/* A11Y-029: the visitor's "reduce motion" preference, on every page. The main stylesheet has this rule;
   the generated pages do not load it, so their header, menus, drawer, language sheet and cookie banner
   still animated. Same rule, so pages that already had it do not change. */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
        scroll-behavior: auto !important;
    }
}

/* T-01 (WCAG 1.4.12 Text Spacing): with the WCAG spacing values at 320 px, the longest words in the
   ReiGuide hero heading and steps no longer fit and widened the page. They may now break inside the word;
   at normal spacing every word fits, so nothing changes. (The home hero heading is not included: there a
   long French word already reaches past the heading's box at 320 px, and breaking it would change the
   normal layout. Recorded as A11Y-038.) */
.page-hero__heading,
.process-step__content { overflow-wrap: break-word; }
.process-step__content { min-width: 0; }

/* A11Y-013 (WCAG 2.2.2): Pause/Play for the moving partner logos on the home page. A small outlined
   button under the logos, in the band's grey text (7.1:1) with a 3:1 outline, 32 px tall. The script
   reveals it, sets .is-paused / .is-playing on the band and swaps the label and icon. Paused stays
   paused (hover and focus do not restart it); with reduced motion the logos start still and move only
   after Play. */
.appreciation-marquee__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-4);
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--color-border-input);
  border-radius: 999px;
  background: transparent;
  color: var(--clr-gray-600);
  font: inherit;
  font-size: var(--font-size-xs);
  line-height: 1.25;
  cursor: pointer;
}

.appreciation-marquee__toggle:hover {
  border-color: var(--clr-gray-600);
  color: var(--color-text);
}

.appreciation-marquee__toggle[hidden],
.appreciation-band.is-paused .appreciation-marquee__icon--pause,
.appreciation-band:not(.is-paused) .appreciation-marquee__icon--play {
  display: none;
}

.appreciation-marquee__icon {
  flex: none;
  width: 14px;
  height: 14px;
}

.appreciation-band.is-paused .appreciation-marquee__track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .appreciation-band.is-playing .appreciation-marquee__track {
    animation-duration: 40s !important;
    animation-iteration-count: infinite !important;
  }
}

/* A11Y-020: the phone language sheet's Close button, styled like the drawer's close button, in the
   panel's top-right corner. */
.lang-sheet__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--clr-gray-600);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lang-sheet__close:hover {
  background: var(--clr-gray-100);
}

.lang-sheet__close .ph-icon {
  color: inherit;
  font-size: inherit;
}

/* A11Y-015 (D-14): the sentence that explains the asterisk, above each form's first field. */
.form-required-note {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--clr-gray-600);
}

/* A11Y-027 (D-14): the newsletter's "Email address" label is shown above the field, in the band's
   text colour. */
.footer-newsletter .footer__newsletter-label {
  display: block;
  margin-bottom: var(--space-2);
  text-align: left;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary-muted);
}

/* A11Y-038 (WCAG 1.4.12): below 390 px, where the hero cut words off, a word of the home hero heading
   that no longer fits with wider text spacing may break instead of being clipped. At normal spacing
   every word already fits, so nothing moves; the one French word that runs a little past the
   heading's box (.hero__long-word) may use the hero's side padding before it breaks, as it does today.
   Wider screens keep their current behaviour (the words fit inside the hero there). */
/* A11Y-039 (Batch 8A): the same rule for every page's hero heading and for section headings, which
   could also cut off or push a long French word past the screen edge at 320 px with wider text
   spacing (e.g. "correspondent", "l'infrastructure" on Organisations). At normal spacing every word of
   these headings fits below 390 px, so nothing moves (checked pixel by pixel on all 77 pages). */
@media (max-width: 389.98px) {
  .hero__heading,
  .section__heading {
    overflow-wrap: break-word;
  }

  .hero__long-word {
    display: inline-block;
    width: max-content;
    max-width: calc(100% + var(--space-6));
  }
}

/* A11Y-030, A11Y-031 (Batch 8A): text for screen readers only (link context, "opens in a new tab").
   The main stylesheet's rule, repeated here so the generated pages, which do not load it, have it too. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* A11Y-015 step 6: while a form is sending, the submit button shows its spinner and its text is
   hidden visually but stays the button's accessible name (display: none left the focused button
   without a name). Same look as before: the text takes no space. */
.btn.is-loading .btn__text {
  display: inline;
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* A11Y-039 (Batch 8B): Support's contact block on the narrowest phones. Below 360 px the chat icon sits
   above the text instead of beside it, so "support@reispace.com" keeps its line with the WCAG 1.4.12
   spacing values instead of pushing the page sideways (the address is never split). Visible change
   below 360 px only; 360 px and wider are unchanged. */
@media (max-width: 359.98px) {
  .f5-support-contact {
    grid-template-columns: 1fr;
  }
}

/* A11Y-039, A11Y-041 (Batch 8B, design option O2c): pillar cards two per row on tablets. At 768-1023 px
   the three- and four-per-row grids leave cards 168-309 px wide, so headings ("perfectionnement",
   "Organisation") run into or past the card edge and, with the WCAG 1.4.12 spacing values, push the page
   sideways. Two per row here; an odd last card is centred, as the six-track layout centres the last two.
   Grid placement only: DOM, reading and focus order are unchanged. Below 768 px and from 1024 px nothing
   changes. Careers keeps its own grid (.careers-why, f5-full.css). Only grids of .pillar cards. */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .pillars:not(.careers-why),
  .stats-grid:has(> .pillar),
  .proof-cards:has(> .pillar) {
    grid-template-columns: repeat(2, 1fr);
  }
  /* The main stylesheet spans each card over two of six tracks and moves the fourth of five to track 2;
     both placements must be reset, or a five-card grid gains a third column. */
  .pillars:not(.careers-why) > *,
  .pillars:not(.careers-why) > :nth-child(4):nth-last-child(2) {
    grid-column: auto;
  }
  .pillars:not(.careers-why) > .pillar:last-child:nth-child(odd),
  .stats-grid > .pillar:last-child:nth-child(odd),
  .proof-cards > .pillar:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - var(--space-6) / 2);
  }
  .stats-grid > .pillar:last-child:nth-child(odd),
  .proof-cards > .pillar:last-child:nth-child(odd) {
    width: calc(50% - var(--space-4) / 2);
  }
}

/* A11Y-042, A11Y-039 (Batch 8C): Crisis Resources. A phone or text number made of several parts
   ("1-800-668-6868", "53 53 53") stays on one line wherever it appears (span.hn-nowrap, added by
   scripts/a11y-shared-markup.py; digits, punctuation and destinations unchanged). The call, text and
   "Open website" buttons may wrap their label between words, so a label wider than its button goes
   to a second line instead of running out of the button and, with the WCAG 1.4.12 spacing values,
   off the page (French page at 768-800 px). A label that fits looks exactly as before. A call/text
   pair sits side by side while both fit with their numbers whole, and otherwise stacks, each
   button full width: no width breakpoint, so it also adapts to the WCAG spacing values. Colours,
   type, sizes, order and the emergency notice are unchanged. */
.hn-nowrap { white-space: nowrap; }
.hn-btn--card, .hn-btn--website { white-space: normal; text-align: center; }
.hn-card__actions { flex-wrap: wrap; }
.hn-card__actions > * { min-width: min-content; }

/* A11Y-046 (WCAG 1.3.1/3.3.2 readability; from PR #30, where it was labelled A11Y-044, an ID already
   used for the 404 structured-data fix): at 320 px the newsletter field is 125 px wide inside its
   padding and "votre@courriel.com" needs 149 px at 16 px, so the French format hint was cut off (the
   English one by 1 px). Below 360 px (22.499em, so a larger browser text size moves the breakpoint
   with it) the field and the Subscribe button each take the full row, the button under the field.
   From 360 px up the row is unchanged. The label, the hint text, the DOM and tab order, the 16 px text
   (no iOS zoom), the 52 px heights and the form script are all unchanged. */
@media (max-width: 22.499em) {
  .footer__newsletter-row {
    flex-wrap: wrap;
  }

  .footer__newsletter-row .input,
  .footer__newsletter-row .btn {
    flex: 1 1 100%;
  }

  /* Stacked, the button keeps the field's 52 px height (side by side it stretches to it). */
  .footer__newsletter-row .btn {
    min-height: 52px;
  }
}

/* A11Y-045 (WCAG 2.5.8, from PR #30): the footer column headings that link to an overview page
   (Platform, About, Legal) were 15 px tall and met 2.5.8 only through the spacing exception. 5 px
   padding gives each a 24.4 px target; the equal negative margin keeps the line box, so nothing on the
   page moves. */
.footer__nav-heading-link {
  display: inline-block;
  padding-block: 5px;
  margin-block: -5px;
}

/* A11Y-047 (WCAG 2.4.11 Focus Not Obscured, from PR #30, narrowed): at the end of a long page the
   footer's first links (Platform, Get the app, Organizations) sit inside the window but under the
   72 px sticky header, so Tab reaches them without the browser scrolling (seen at 1024-1180 px wide,
   500-768 px tall, cookie banner showing or not). The newsletter band just above the footer has the
   same problem when Shift+Tab comes back up from the footer. Each control in the footer and the
   newsletter band now asks to be scrolled 16 px clear of the header when it takes focus.
   Element-level scroll-margin, not a page-wide scroll-padding-top: only scrolling to one of these
   controls changes, so the cookie banner's own scrolling (and scroll-padding-bottom above) is
   unaffected. Nothing moves until one of these controls takes focus. */
.footer :is(a[href], button),
.footer-newsletter :is(a[href], button, input, select, textarea) {
  scroll-margin-top: calc(var(--nav-height, 72px) + 16px);
}

/* Founders (Nov 2026): Latoya and Alric on Home and About, per the September 2026 copy package.
   Markup: section.founders (the "Meet the Founders" region) holds two .founder-section splits, Latoya's
   first and unchanged, then Alric's with .founder-section--reverse; on Home a .founders__actions row
   (Contact ReiSpace) follows both. Everything here is scoped to those classes.
   - .founders carries the same gold wash as .founder-section, so the gap under the action row matches.
   - .founder__name: each name is now an h3 (outline: h2 Meet the Founders > h3 per founder) but looks
     exactly like the bold paragraph it replaces (Inter 16 px, 700, gray-600, body line height, 24 px
     above); the line after it keeps the 16 px gap and colour that `.founder__body p+p` gave it.
   - From 1200 px, Alric's split is mirrored: photo first (left), and the two paddings swap so his text
     lines up with the container on the right. Below 1200 px both stack photo-above-text as before.
   - Alric's photo is kept anchored at the top at every width, so no crop can take the top of his head.
   - #latoya-reid / #alric-reid (About) are the targets of Home's "Meet …" links: scrolled 16 px clear
     of the 72 px sticky header, the same offset A11Y-047 uses. */
.founders {
  background: var(--bg-gold-wash);
}
.founder__body .founder__name {
  margin: var(--space-6) 0 0;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  letter-spacing: normal;
  color: var(--clr-gray-600);
}
/* Alric's split has no section heading above his name: drop the name's top margin there, so his
   text starts where Latoya's heading does (48 px under the photo when stacked). */
.founder-section__content > .founder__body:first-child > .founder__name:first-child {
  margin-top: 0;
}
.founder__body .founder__name + p {
  margin-top: var(--space-4);
  color: var(--clr-gray-600);
}
.founder-section--reverse .founder-section__image img {
  object-position: center top;
}
.founders .founder-section[id] {
  scroll-margin-top: calc(var(--nav-height, 72px) + 16px);
}
/* Arriving at #latoya-reid / #alric-reid from Home: the site's `html { scroll-behavior: smooth }`
   made the browser glide to the profile while the web fonts were still loading. When the fonts
   swapped in mid-glide, the hero above reflowed (~110 px taller) and the glide still ended at the
   old position, so the profile landed too low (about 1 load in 7 on a phone in testing). Only
   while a founder profile is the :target, the page scrolls to it instantly instead, and the
   browser's scroll anchoring then keeps the profile in place through the font swap. Smooth
   scrolling everywhere else on the site, and on these pages without a founder #anchor, is
   unchanged. */
:root:has(.founders .founder-section:target) {
  scroll-behavior: auto;
}
.founders__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: 0 var(--space-6) 48px;
}
@media (min-width: 1200px) {
  .founder-section--reverse .founder-section__image {
    order: -1;
  }
  .founder-section--reverse .founder-section__content {
    padding-left: 60px;
    padding-right: max(var(--space-6), calc((100vw - var(--container-max)) / 2));
  }
  .founders__actions {
    justify-content: center;
    padding: 48px var(--space-6) 64px;
  }
}
