/* ==========================================================================
   site.css — semantic component classes for the public site.

   Named after what a thing *is*, not how it looks: `.fact-card`, `.fee-table`,
   `.cite`, `.disclaimer`. Layout lives inside the component, so no utility soup
   accumulates in the templates (a utility cluster that repeats is a component;
   a utility cluster that appears once is a layout decision belonging to the
   component next to it).

   Colours come from `root.css` only, via `var(--brand-*)` or the declared channel
   triplets. A raw hex here is a bug (DESIGN.md rule 1). The three exceptions are
   `#fff` as a specified hover state, and nothing else — both are commented.

   Breakpoints are the prototype's: 640 / 768 / 1024 px.
   ========================================================================== */

/* --- Buttons -------------------------------------------------------------- */
/* DESIGN.md rule 5 and build_principles.md §IV: touch targets are ≥ 44×44 px.
   The prototype's `px-4 py-2 text-xs` button is 32 px tall, so it violated its own
   stated rule; `min-height` here is the fix, and `tests/e2e` asserts it against a
   real bounding box rather than against the CSS. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.btn--upper {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Header CTA: compact, not uppercase (DESIGN §7.1 — a button, not a sixth link). */
.btn--compact {
  padding: 0.5rem 1rem;
  letter-spacing: 0.025em;
}

.btn--forest {
  background-color: var(--brand-forest);
  color: var(--brand-cream);
  box-shadow: var(--shadow-hairline);
}

.btn--forest:hover {
  background-color: var(--brand-forestDark);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.btn--cream {
  background-color: var(--brand-cream);
  color: var(--brand-forestDark);
  box-shadow: var(--shadow-card);
}

.btn--cream:hover {
  /* Specified hover state in the prototype (`hover:bg-white`). White is not a
     brand colour and is not being introduced as one. */
  background-color: #fff;
  box-shadow: var(--shadow-raised);
}

.btn--ghost {
  color: var(--brand-cream);
  border-color: rgb(var(--brand-cream-rgb) / 0.35);
  background-color: transparent;
}

.btn--ghost:hover {
  background-color: rgb(var(--brand-cream-rgb) / 0.1);
}

.btn--ochre {
  background-color: var(--brand-ochre);
  color: #fff;
  box-shadow: var(--shadow-hairline);
}

.btn--ochre:hover {
  background-color: var(--brand-ochreDark);
}

.btn--outline {
  background-color: #fff;
  color: var(--brand-forest);
  border-color: var(--brand-sand);
}

.btn--outline:hover {
  background-color: rgb(var(--brand-sand-rgb) / 0.3);
}

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgb(var(--brand-cream-rgb) / 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--brand-sand);
}

.site-header__inner {
  /* The positioning context for the phone menu panel: it must span the header, not
     the 44px toggle that opens it. */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.5rem;
  color: var(--brand-charcoal);
}

.brand__mark {
  height: 2.5rem;
  width: auto;
  transition: transform 150ms ease;
}

.brand:hover .brand__mark {
  transform: scale(1.05);
}

.brand__name {
  display: block;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.brand__tag {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--text-nano);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-muted);
}

/* The wordmark is HTML text, not the raster lockup: it stays crisp at every size,
   is translatable, and is readable to a screen reader (DESIGN §7.1, §8). */

.site-nav {
  display: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  /* DESIGN rule 5 is ≥44×44, and `min-height` alone honours only half of it. The
     nav is a flex row of text-width links, so every label wider than 44 px passed
     and `Ask` — 26 px of glyphs — silently did not. `min-width` + centring gives the
     short label the same 44 px box as the long ones without touching their layout. */
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--brand-charcoal-rgb) / 0.8);
  transition: color 150ms ease;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--brand-ochre);
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
  }
}

/* Six links + the CTA fit at 1024 and up, but at exactly 768 px the full 1.75rem
   nav gap pushes the header 80 px past the viewport. Tighten the gaps only in the
   tablet band; the desktop rhythm is unchanged. Measured 2026-10-20.

   2026-10-22: two gaps tightened again by ~2 px to buy back the 18 px that
   `min-width: 44px` adds to the `Ask` link. Measured overflow at 768 px: 14 px after
   the target floor landed, 0 after this. The trade is deliberate — DESIGN rule 5
   outranks 2 px of nav air, and `.site-nav__link` was the only control on the site
   passing on one axis (height) while failing the other.

   2026-11-18: a seventh nav link (`Before you apply`) and the `Log in` control cost 18 px
   more than this band had left, and the gap had already been tightened twice. The gap pays
   again, not a link: every route stays reachable at 768 px — the footer's Contact block is
   an address, not the `/contact/` route, so hiding that link would strand the page. */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header__inner {
    gap: 0.375rem;
  }

  .site-nav {
    gap: 0.45rem;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- The way back in ------------------------------------------------------ */
/* `Log in` / `My application`. A **link**, not a second button (DESIGN §7.1: the
   header is links plus one button), and it carries the same 44 px box as the nav
   links (rule 5) — a bare text anchor here measures 20 px tall beside a 44 px pill.

   Hidden under 640 px on purpose: at 390 px the row already holds the mark, the
   wordmark, the menu toggle and the CTA, and a fifth element is how the header starts
   scrolling sideways. The phone gets the same link as the last row of the menu panel,
   where there is room for it and a thumb to hit it. */
.header-actions__account {
  /* `flex: 0 0 auto` is not decoration: as a flex child the default `flex-shrink: 1`
     squeezed this link to its 44 px floor and clipped `My application` to `My applic`,
     at **every** width including 1280 (measured 2026-11-18: scrollWidth 102 px,
     clientWidth 78). A label that needs two words must be allowed its two words. */
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--brand-muted);
  transition: color 150ms ease;
}

.header-actions__account:hover {
  color: var(--brand-forest);
}

@media (min-width: 640px) {
  .header-actions__account {
    display: inline-flex;
  }
}

/* --- Language switch ------------------------------------------------------ */
/* EN/AF is a first-class header control, not a footer afterthought (DESIGN rule
   7). Until C3 wires the catalogue, AF is a disabled control rather than a link
   that silently does nothing. */

.lang-switch {
  display: none;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  padding: 0.25rem;
  border: 1px solid var(--brand-sand);
  border-radius: var(--radius-pill);
  background-color: rgb(var(--brand-sand-rgb) / 0.6);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--brand-muted);
}

@media (min-width: 640px) {
  .lang-switch {
    display: inline-flex;
  }
}

/* 2026-11-18: the tablet band gives the EN/AF pill back to the seventh nav label. It has
   to sit *after* the rule above: both are one `display` on the same element, and the first
   attempt put this in the 768–1023 band higher up the file, where the pill stayed visible
   because equal specificity resolves on source order. AF is `aria-disabled` until C3 wires
   the catalogue, so it is the only element in the row doing nothing. */
@media (min-width: 768px) and (max-width: 1023px) {
  .lang-switch {
    display: none;
  }
}

.lang-switch__current {
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  background-color: #fff;
  color: var(--brand-forest);
  font-weight: 600;
  box-shadow: var(--shadow-hairline);
}

.lang-switch__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-inline: 0.5rem;
  transition: color 150ms ease;
}

.lang-switch__link:hover {
  color: var(--brand-forest);
}

/* --- Mobile menu ---------------------------------------------------------- */
/* The prototype hid the nav below `md` and offered nothing in its place, which
   leaves a phone with no navigation at all. A `<details>` element gives the same
   affordance with no JavaScript, which is what the zero-build-pipeline rule
   wants. */

.site-menu {
  /* Deliberately not `position: relative` — see `.site-menu__panel`. */
  position: static;
}

.site-menu__toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--brand-sand);
  border-radius: var(--radius-sm);
  background-color: var(--brand-cream);
  cursor: pointer;
  list-style: none;
}

.site-menu__toggle::-webkit-details-marker {
  display: none;
}

.site-menu__bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--brand-forestDark);
}

.site-menu[open] .site-menu__toggle {
  background-color: var(--brand-sageLight);
}

/* Positioned against the header, not against the toggle. Anchored to the toggle it
   opened off the left edge of the viewport and clipped its own labels — the kind of
   bug a screenshot at 390 px catches and a DOM assertion does not. A fixed panel
   would be no better: `backdrop-filter` on the header makes it the containing block
   for fixed descendants. */
.site-menu__panel {
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  z-index: 60;
  padding: 0.5rem 1rem 1rem;
  border: 1px solid var(--brand-sand);
  border-radius: var(--radius-md);
  background-color: var(--brand-cream);
  box-shadow: var(--shadow-raised);
}

.site-menu__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid rgb(var(--brand-sand-rgb) / 0.6);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-menu__link:last-child {
  border-bottom: 0;
}

@media (min-width: 768px) {
  .site-menu {
    display: none;
  }
}

/* Below 400 px the header's three elements do not fit. Drop the strapline and
   tighten the CTA rather than letting the row overflow — the 390 px check in
   tests/e2e measures the result. */
@media (max-width: 399px) {
  .brand__tag {
    display: none;
  }

  .brand__name {
    font-size: var(--text-xs);
  }

  .btn--compact {
    padding-inline: 0.75rem;
  }
}

/* The CTA is two words and must set on one line wherever the row can pay for it.
   It broke over two lines at 360–414 px the moment the page gutter went 16 → 20 px
   (2026-11-07), which is a gutter change spending the header's slack.

   The floor is 360 px, not lower: at 320 px the row holds about 280 px and the mark,
   the wordmark, the toggle and this button need more, so it wraps there — that was
   already true before the gutter moved, and wrapping beats a 22 px sideways scroll.
   The ceiling is 767 px because from 768 the full nav is shown and the header is
   over-full already (the labels collide); `white-space: nowrap` there overflows by
   55 px. That band is DESIGN §7.1's open question, not this rule's business. */
@media (min-width: 360px) and (max-width: 767px) {
  .btn--compact {
    white-space: nowrap;
  }
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  background-color: var(--brand-forestDeep);
  color: var(--brand-cream);
  padding-block: 4rem 3rem;
  border-top: 1px solid var(--brand-forest);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.footer__name {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer__mark {
  height: 3rem;
  width: auto;
}

.footer__blurb {
  max-width: 24rem;
  font-size: var(--text-xs);
  line-height: var(--leading-body);
  color: rgb(var(--brand-cream-rgb) / 0.7);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  opacity: 0.8;
  transition: opacity 150ms ease;
}

.footer__social-link:hover {
  opacity: 1;
}

.footer__social-mark {
  height: 1.75rem;
  width: 1.75rem;
}

.footer__heading {
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-ochreLight);
}

.footer__list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: rgb(var(--brand-cream-rgb) / 0.8);
}

.footer__list a {
  display: inline-flex;
  align-items: center;
  /* Both dimensions, not just height: "Fees" is 26px wide, which is a hard target to
     hit with a thumb even though the row is 44px tall. */
  min-height: 44px;
  min-width: 44px;
  transition: color 150ms ease;
}

.footer__list a:hover {
  color: #fff;
}

.footer__place {
  font-size: var(--text-xs);
  color: rgb(var(--brand-cream-rgb) / 0.8);
}

.footer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", monospace;
  font-size: var(--text-nano);
}

/* DESIGN rule 8: unresolved data is a visible chip, never a plausible fake. A
   fake phone number in a mockup is a real number in production. */
.footer__chip {
  padding: 0.125rem 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius-xs);
  background-color: var(--brand-forest);
  color: var(--brand-ochreLight);
}

.footer__ask {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-xs);
  color: var(--brand-ochreLight);
}

.footer__ask:hover {
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  font-size: var(--text-micro);
  color: rgb(var(--brand-cream-rgb) / 0.5);
  text-align: center;
}

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

  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .footer__bottom-note {
    text-align: right;
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 2.5rem;
  }

  .footer__brand {
    grid-column: span 5;
  }

  .footer__col {
    grid-column: span 2;
  }

  .footer__contact {
    grid-column: span 3;
  }
}

.footer__brand,
.footer__col,
.footer__contact {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

/* --- Hero ----------------------------------------------------------------- */
/* DESIGN §7.2. The rgba() values in the gradient stack are measured from the
   prototype and are a *photograph treatment*, not palette surfaces: they exist to
   hold white text at 8.17:1 median / 4.93:1 worst case over a moving image. They
   are therefore the one place in this file where literal channel values are
   correct, and they must be re-measured if the photograph or the stack changes.
   DESIGN §11.6 records that the wash could be lightened — a judgement call, not a
   defect. */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(65, 81, 54, 0.78) 0%,
      rgba(48, 60, 40, 0.86) 55%,
      rgba(32, 40, 27, 0.94) 100%
    ),
    url("../img/mountain_scene.jpg") center 38% / cover no-repeat;
}

/* Three ochre/moss ellipse glows, above the photograph and below the text. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 90% 45% at 50% 95%, rgba(184, 123, 46, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 80% 35% at 50% 85%, rgba(94, 117, 78, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse 110% 40% at 50% 75%, rgba(55, 70, 46, 0.45) 0%, transparent 75%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-prose);
  margin-inline: auto;
  padding: 6rem 1rem 5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .hero__inner {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    padding-inline: 2rem;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0.875rem;
  border: 1px solid rgb(var(--brand-ochreLight-rgb) / 0.25);
  border-radius: var(--radius-pill);
  background-color: rgb(var(--brand-ochreLight-rgb) / 0.1);
  color: var(--brand-ochreLight);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__title {
  margin-bottom: 1.75rem;
  color: #fff;
  font-size: var(--text-4xl);
  line-height: var(--leading-title);
}

.hero__title-accent {
  color: var(--brand-ochreLight);
  font-style: italic;
  font-weight: 400;
}

/* The design breaks the headline after "built by" only when there is room. */
.hero__break {
  display: none;
}

.hero__lede {
  max-width: var(--container-narrow);
  margin: 0 auto 2.5rem;
  color: rgb(var(--brand-cream-rgb) / 0.85);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.hero__cta {
  width: 100%;
}

/* Base rules above, breakpoints below — in this order, deliberately. A media
   query placed before the base rule it refines loses to it on equal specificity,
   which is how the first build shipped a stacked full-width CTA row on desktop
   while the CSS looked correct in isolation. */

@media (min-width: 640px) {
  .hero__break {
    display: block;
  }

  .hero__title {
    font-size: var(--text-5xl);
  }

  .hero__lede {
    font-size: var(--text-lg);
  }

  .hero__ctas {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

  .hero__cta {
    width: auto;
  }
}

@media (min-width: 768px) {
  .hero__title {
    font-size: var(--text-6xl);
  }
}

.hero__note {
  max-width: 32rem;
  margin-inline: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.hero__note p {
  color: rgb(var(--brand-cream-rgb) / 0.65);
  font-size: var(--text-xs);
  font-weight: 300;
  line-height: var(--leading-body);
}

/* --- Sub-page head -------------------------------------------------------- */
/* A deep page reuses the home page's type roles (eyebrow, Lora h1, lede) on the
   warm ground, so that arriving from a search result does not feel like a
   different site. No border: the ground does the separating (§3).

   The h1 is a *step below* the hero, not the hero's own size (DESIGN §4, added
   2026-11-11). Measured before the change: every deep page rendered the hero's
   36/48/48 px while `/ask/` — the page the owner read as right — was 30/36/36,
   and the band stood 286–526 px tall against `/ask/`'s 99. The padding comes down
   with the type; the eyebrow and the lede are untouched. */

.page-head {
  padding-block: 2.5rem 2rem;
  background-color: var(--brand-creamWarm);
}

.eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--brand-ochreInk);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.page-head__title {
  color: var(--brand-forestDark);
  font-size: var(--text-3xl);
}

@media (min-width: 640px) {
  .page-head__title {
    font-size: var(--text-4xl);
  }
}

.page-head__lede {
  max-width: var(--container-narrow);
  margin-top: 1rem;
  color: var(--brand-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

@media (min-width: 640px) {
  .page-head__lede {
    font-size: var(--text-base);
  }
}

/* --- Section head --------------------------------------------------------- */
/* Every band that is not the hero opens with eyebrow / Lora h2 / lede. The h2 is
   `font-normal` (DESIGN §4) and the ground supplies the contrast, so no rule here
   carries a colour a dark band would need to override — the three `.section--dark`
   rules at the end of this block are the only exception. */

.section__head {
  max-width: var(--container-narrow);
  margin-bottom: 3rem;
}

.section__title {
  margin-bottom: 1rem;
  color: var(--brand-forestDark);
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

/* A second head inside one band ("Where this is recognised" under "What membership
   actually gives you"). One step down from `.section__title` so the two never read as
   sibling sections, and it borrows the title's colour rather than inventing one. */
.section__subtitle {
  margin-bottom: 0.75rem;
  color: var(--brand-forestDark);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
}

.section__lede {
  color: var(--brand-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

@media (min-width: 640px) {
  .section__title {
    font-size: var(--text-4xl);
  }

  .section__subtitle {
    font-size: var(--text-3xl);
  }

  .section__lede {
    font-size: var(--text-base);
  }
}

.section--dark .section__title {
  color: #fff;
}

.section--dark .section__lede {
  color: rgb(var(--brand-cream-rgb) / 0.8);
}

.section--dark .eyebrow {
  color: var(--brand-ochreLight);
}

.section__more {
  margin-top: 2rem;
}

.link-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-ochreDark);
  font-size: var(--text-sm);
  font-weight: 600;
}

.link-more:hover {
  text-decoration: underline;
}

/* Back links (DESIGN §6 rule 16, added 2026-11-08). A page that is one step into a flow
   carries a text link to the surface it was opened from. It is a *link* because it
   navigates to another page; the self-check wizard's `[data-back]` is a *button* because
   it moves within one page. Muted at rest, ochre on hover — a way back is secondary to
   the page's own content, and `--brand-muted` clears 4.5:1 on cream. */
.link-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  margin-bottom: 0.5rem;
  color: var(--brand-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.link-back:hover {
  color: var(--brand-ochreDark);
  text-decoration: underline;
}

/* --- Key-facts ribbon (DESIGN §7.3) --------------------------------------- */

.ribbon {
  background-color: var(--brand-sageLight);
  border-bottom: 1px solid var(--brand-sand);
}

/* The prototype hairlines this band, and it is the one section boundary in the
   design that carries a border. It earns it: sageLight and cream are within a few
   percent of each other in value, so without the hairline the edge reads as a
   smudge rather than as a band. */

.ribbon__inner {
  padding-block: 1.5rem;
}

.ribbon__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

.fact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgb(var(--brand-sand-rgb) / 0.8);
  border-radius: var(--radius-lg);
  background-color: rgb(var(--brand-cream-rgb) / 0.8);
  box-shadow: var(--shadow-hairline);
  transition: background-color 150ms ease;
}

.fact-card:hover {
  background-color: #fff;
}

.fact-card__dot {
  flex-shrink: 0;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: var(--radius-pill);
  background-color: var(--brand-ochre);
}

.fact-card__figure {
  color: var(--brand-forest);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: var(--leading-tight);
}

.fact-card__caption {
  margin-top: 0.125rem;
  color: var(--brand-muted);
  font-size: var(--text-xs);
}

/* The ribbon's fourth tag is the only one with a destination (DESIGN §7.3, amended
   2026-11-08). It is an `<a>`, so it sheds the link defaults the card does not want;
   the focus ring comes from the global `:focus-visible` rule in `root.css` and is
   deliberately not suppressed. The ochre border and the one extra line are what
   separate the live card from the three that are not. */
.fact-card--link {
  color: inherit;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}

.fact-card--link:hover {
  border-color: var(--brand-ochre);
}

/* `--brand-ochreDark`, like `.link-more`: `--brand-ochre` is 3.3:1 on cream and is
   below the 4.5:1 small-text floor (root.css, DESIGN §9 #4). */
.fact-card__more {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--brand-ochreDark);
  font-size: var(--text-sm);
  font-weight: 600;
}

@media (min-width: 640px) {
  .ribbon__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-card__figure {
    font-size: var(--text-lg);
  }
}

@media (min-width: 1024px) {
  .ribbon__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
