/* DigiLance site layer, on top of the vendored Organic sheet (styles.css).
   Values are design tokens or measurements from the design handoff (DigiLance Site.dc.html).
   The prototype used <button> for navigation; production uses <a>, so a few rules below reset what
   links would otherwise inherit (underline, link colour, line-height) to keep the rendering identical. */

/* ── Project-level overrides ─────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6, .card-title {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent-700); }
a:hover { color: var(--color-accent-600); }

/* Links styled as buttons keep the button's own text colour */
a.btn:hover, a.btn:active { color: var(--color-text); }
a.btn-primary, a.btn-primary:hover, a.btn-primary:active { color: var(--color-neutral-100); }
a.btn-ghost, a.btn-ghost:hover, a.btn-ghost:active { color: var(--color-accent-700); }

/* Every card on this site uses the large radius */
.card { border-radius: var(--radius-lg); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -10000px; top: 8px; z-index: 30;
  padding: 10px 20px; border-radius: 999px;
  background: var(--color-accent-fill); color: var(--color-neutral-100);
}
.skip-link:focus { left: 16px; color: var(--color-neutral-100); }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.wrap, .page {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 28px;
}
.page { padding-top: 48px; padding-bottom: 72px; }

.tag--eyebrow { padding: 6px 14px; font-size: 12px; font-weight: 600; }

.disc { position: absolute; border-radius: 999px; }

/* Screen-level intro: eyebrow pill, heading, lede */
.page-title {
  font-size: clamp(34px, 4.4vw, 52px);
  margin: 18px 0 0;
  letter-spacing: -0.02em;
  /* No word left alone on the last line on narrow screens */
  text-wrap: pretty;
}
.page-lede p {
  font-size: 18px;
  line-height: 1.55;
  max-width: 40em;
  margin-top: 18px;
  color: var(--color-neutral-800);
}
.page--project .page-title { max-width: 26em; }
.page--project .page-lede p { font-size: 19px; }
.page--partners .page-title { max-width: 24em; }
.page--resources .page-title { max-width: 22em; }
.page--news .page-title, .page--contact .page-title { max-width: 20em; }

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(8px);
}
.site-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.site-brand { display: flex; margin-right: auto; }
.site-brand__logo { display: block; width: auto; height: 48px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: normal;
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
}
.site-nav__link:hover { background: var(--color-accent-100); color: var(--color-text); }
.site-nav__bar {
  width: 16px; height: 3px;
  border-radius: 999px;
  background: var(--color-accent);
}
.site-nav__cta { padding: 10px 20px; font-size: 14px; margin-left: 8px; }

.nav-toggle { display: none; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--color-neutral-900);
  color: var(--color-neutral-200);
  margin-top: 24px;
}
.site-footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 28px 40px;
  display: grid;
  /* The brand, then the funding a little wider, which ends the two at about the same height from 1100px up;
     the legal links and social links are in a bar below them */
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: 36px 64px;
}
.site-footer__logo { display: block; width: auto; height: 34px; }
.site-footer__strapline {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-neutral-300);
  /* Even lines, so a wrap falls mid-sentence rather than inside the years */
  text-wrap: balance;
}
/* Small print, like the disclaimer */
.site-footer__grant {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-neutral-400);
  /* Even lines, so a wrap falls mid-sentence rather than inside the grant number */
  text-wrap: balance;
}
.site-footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-neutral-800);
}
.site-footer__social { display: flex; gap: 10px; }
.site-footer__social-link {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--color-neutral-700);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-neutral-200);
}
.site-footer__social-link:hover { color: var(--color-accent-300); border-color: var(--color-accent-300); }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-footer__links a {
  font-size: 14px;
  line-height: normal;
  color: var(--color-neutral-200);
  text-decoration: none;
}
.site-footer__links a:hover { color: var(--color-accent-300); }
.site-footer__disclaimer {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-neutral-400);
}
/* 240px wide makes the flag about 48px (1.3cm) tall; the EU minimum is 1cm */
.site-footer__emblem { display: block; width: 240px; max-width: 100%; height: auto; }

/* ── Image slots: a washed photo, or the design's empty placeholder ───────── */

.image-slot {
  display: block;
  position: relative;
  font: 13px/1.3 system-ui, -apple-system, sans-serif;
}
.image-slot--circle, .image-slot--circle > * { border-radius: 50%; }
.image-slot--rounded, .image-slot--rounded > *, .image-slot--rounded .image-slot__ring { border-radius: var(--radius-lg); }
.image-slot--circle .image-slot__ring { border-radius: 50%; }
.image-slot__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-slot__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: rgba(127, 127, 127, .08);
}
.image-slot__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
  user-select: none;
}
.image-slot__empty svg { opacity: .45; }
.image-slot__caption { max-width: 90%; font-weight: 500; letter-spacing: .01em; opacity: .75; }
.image-slot__ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1.5px dashed currentColor;
  opacity: .35;
}

/* ── Logo slots: an organisation's own mark, kept as it is ───────────────────
   The height comes from the slot's own class; the mark fits inside it at its
   own aspect ratio. Partners without a logo render no slot at all. */

.logo-slot { display: flex; align-items: center; }
.logo-slot__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* ── Home ────────────────────────────────────────────────────────────────── */

.hero {
  padding-top: 56px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.hero__title {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.12;
  margin: 20px 0 0;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.hero__lede {
  font-size: 19px;
  line-height: 1.55;
  max-width: 34em;
  margin: 20px 0 0;
  color: var(--color-neutral-800);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__actions .btn { padding: 14px 26px; font-size: 15px; }
.hero__note p { margin-top: 20px; font-size: 13.5px; color: var(--color-neutral-700); }
/* The box is the photo's size, and the discs are sized and placed in percentages of it,
   so they keep peeking out the same way as the photo shrinks */
.hero__media { position: relative; width: min(100%, 420px); justify-self: center; }
.hero__disc-1 { width: 50%; aspect-ratio: 1; background: var(--color-accent-2-200); top: 6%; left: -3%; }
.hero__disc-2 { width: 22%; aspect-ratio: 1; background: var(--color-accent-200); bottom: 5%; right: 3.5%; }
.hero__image { width: 100%; aspect-ratio: 1; }

.stats { padding-top: 32px; padding-bottom: 8px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.stat { padding: 22px 24px; gap: 4px; }
/* Set like the headings (Figtree, bold) rather than in Caprasimo, so the figures match the hero title */
.stat__value { font-family: var(--font-body); font-weight: 800; letter-spacing: -0.02em; font-size: 34px; line-height: 1; }
.stat__label { font-size: 13.5px; color: var(--color-neutral-700); }

.features { padding-top: 64px; padding-bottom: 24px; }
.features__title { font-size: clamp(28px, 3.4vw, 40px); max-width: 22em; }
.features__intro { font-size: 17px; max-width: 38em; color: var(--color-neutral-800); margin-top: 14px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
  margin-top: 36px;
}
.feature { padding: 28px; gap: 10px; }
.feature__icon {
  width: 72px; height: 72px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  background: var(--color-accent-200);
  /* Dark green on every disc, as the designer draws them; the accent sets the disc and the details */
  color: var(--color-accent-2-800);
  --icon-detail: var(--color-accent-500);
}
.feature__icon--accent-2 { background: var(--color-accent-2-200); --icon-detail: var(--color-accent-2-600); }
/* The icons are drawn on the disc, so they fill it */
.feature__icon svg { width: 100%; height: 100%; }
.icon__detail { fill: var(--icon-detail, currentColor); }
.feature__title { font-size: 23px; }
.feature__body { font-size: 15px; line-height: 1.6; color: var(--color-neutral-800); margin: 0; }
.feature .tag { align-self: flex-start; margin-top: 6px; }

.rationale { padding-top: 56px; padding-bottom: 56px; }
.panel--sage { background: var(--color-accent-2-200); border-radius: var(--radius-lg); }
.rationale__panel {
  padding: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 40px;
}
.rationale__title { font-size: clamp(26px, 3vw, 34px); max-width: 18em; }
.rationale__body p { font-size: 16.5px; line-height: 1.6; color: var(--color-accent-2-900); }
.rationale__body p:first-child { margin-top: 14px; }
.rationale__facts { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.rationale__fact { display: flex; gap: 14px; align-items: flex-start; }
.rationale__fact p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--color-accent-2-900); }
.dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--color-accent);
  margin-top: 8px;
  flex: none;
}

.phases { padding-top: 8px; padding-bottom: 64px; }
.phases__title { font-size: clamp(26px, 3vw, 34px); }
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.phase { border-top: 3px solid var(--color-neutral-400); padding-top: 16px; }
.phase .card-kicker { color: var(--color-neutral-700); }
.phase--current { border-top-color: var(--color-accent); }
.phase--current .card-kicker { color: var(--color-accent); }
.phase__title { margin: 8px 0 6px; font-size: 19px; }
.phase__body { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--color-neutral-800); }

.cta-section { padding-top: 8px; padding-bottom: 56px; }

/* Sage call-to-action panel (Resources, and the home page's CTA block) */
.cta { padding: 36px; margin-top: 40px; }
.cta-section .cta { margin-top: 0; }
.cta__title { font-size: 22px; margin: 0 0 8px; }
.cta__text { margin: 0 0 18px; font-size: 15.5px; line-height: 1.6; color: var(--color-accent-2-900); max-width: 44em; }
.cta .btn { padding: 13px 24px; font-size: 15px; }

/* ── The project ─────────────────────────────────────────────────────────── */

.project-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 40px;
  margin-top: 56px;
  align-items: start;
}
.section-title { font-size: 30px; }
.objectives { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.objective { display: flex; gap: 14px; }
.objective__number { font-family: var(--font-heading); color: var(--color-accent-700); font-size: 18px; flex: none; }
.objective__text p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.project-media { position: relative; }
.project-media__disc { width: 170px; height: 170px; background: var(--color-accent-200); right: -10px; top: -24px; }
.project-media__image { width: 100%; height: 360px; }
.priorities { padding: 22px; margin-top: 20px; gap: 8px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.work-title { margin-top: 64px; }
.work-intro { font-size: 16px; max-width: 38em; color: var(--color-neutral-800); margin-top: 10px; }
.wp-list { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.wp-row { padding: 24px 28px; flex-direction: row; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.wp-row__code { font-family: var(--font-heading); font-size: 15px; color: var(--color-accent-700); width: 52px; flex: none; }
.wp-row__main { flex: 1; min-width: 200px; }
.wp-row__title { margin: 0 0 4px; font-size: 19px; }
.wp-row__description { margin: 0; font-size: 14.5px; color: var(--color-neutral-800); }

/* ── Partners ────────────────────────────────────────────────────────────── */

/* The intro shares its row with a map of where the partners are, their tops level */
.partners-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 48px;
  align-items: start;
}
.partner-map { margin: 0; }
/* A panel, so the land that the square frame cuts off (Russia, North Africa) ends at an edge */
.partner-map__svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  background: var(--color-neutral-100);
}
.partner-map__land { fill: var(--color-surface); }
.partner-map__country { fill: var(--color-accent-2-300); stroke: var(--color-neutral-100); stroke-width: 2px; stroke-linejoin: round; }
.partner-map__pin-shape { fill: var(--color-neutral-100); }
.partner-map__shadow { flood-color: var(--color-neutral-900); flood-opacity: .3; }
/* Many logos come on white: multiplied, the white takes the pin's colour instead of showing as a square */
.partner-map__logo { mix-blend-mode: multiply; }
/* The size comes from partners/map.py, in map units, so a long abbreviation can shrink to fit the head */
.partner-map__abbreviation {
  font-weight: 700;
  letter-spacing: -0.01em;
  fill: var(--color-text);
  text-anchor: middle;
  dominant-baseline: central;
}

/* One row per partner: a logo column, then the text. Plain divided rows rather than cards —
   the page already carries the tag pills, and six more rounded panels crowd them. */
.partner-list { margin-top: 44px; border-bottom: 1px solid var(--color-divider); }
.partner-row {
  display: flex;
  flex-direction: row;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
  padding: 30px 0;
  border-top: 1px solid var(--color-divider);
}
.partner-row__logo { width: 180px; height: 116px; flex-shrink: 0; }
.partner-row__mark { width: 100%; height: 100%; justify-content: center; }
.partner-row__main { flex: 1; min-width: min(280px, 100%); display: flex; flex-direction: column; gap: 10px; }
.partner-row__title { font-size: 24px; margin: 0; }
.partner-row__meta { margin: 0; font-size: 14px; color: var(--color-neutral-700); }
/* Capped for readability: the rows are wide enough for 110-character lines otherwise */
.partner-row__description p { margin: 0; max-width: 68ch; font-size: 15px; line-height: 1.6; color: var(--color-neutral-800); }
.partner-row__website { font-size: 14px; font-weight: 600; align-self: flex-start; }

/* Card headings that link to a detail page look like plain headings until hovered */
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; }

/* ── Resources ───────────────────────────────────────────────────────────── */

.resource-list { display: flex; flex-direction: column; gap: 14px; margin-top: 44px; }
.resource-row { padding: 28px; flex-direction: row; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.resource-row__main { flex: 1; min-width: min(260px, 100%); }
.resource-row__title { font-size: 22px; margin: 0 0 8px; }
.resource-row__description p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--color-neutral-800); }
.resource-row__status { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.resource-row__qualifier { font-size: 13px; color: var(--color-neutral-700); }

/* ── News ────────────────────────────────────────────────────────────────── */

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  margin-top: 44px;
  align-items: start;
}
.news-main { display: flex; flex-direction: column; gap: 24px; }
.news-featured { padding: 0; overflow: hidden; gap: 0; }
.news-featured__image { width: 100%; height: 240px; }
.news-featured__body { padding: 28px; }
.news-featured__title { font-size: 24px; margin: 10px 0 8px; }
.news-item { padding: 28px; gap: 8px; }
.news-item__title { font-size: 22px; margin: 4px 0 4px; }
.news-intro { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--color-neutral-800); }

.news-aside { display: flex; flex-direction: column; gap: 20px; }
.key-dates { padding: 26px; gap: 10px; }
.key-dates__title { font-size: 19px; margin: 0; }
.key-dates__list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.key-date { display: flex; gap: 12px; font-size: 14.5px; }
.key-date__label { font-weight: 700; min-width: 74px; flex: none; }
.key-date__text { color: var(--color-neutral-800); }

.signup { background: var(--color-surface); border-radius: var(--radius-lg); padding: 26px; }
.signup__title { font-size: 19px; margin: 0 0 6px; }
.signup__text { margin: 0 0 16px; font-size: 14px; color: var(--color-neutral-800); }
.signup .field { margin-bottom: 10px; }
.signup .input { padding: 10px 16px; }
.signup .btn { padding: 11px 20px; }
.signup__privacy { margin: 12px 0 0; font-size: 13px; color: var(--color-neutral-700); }
.signup__status { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--color-accent-2-800); }
.signup__status--error { color: var(--color-accent-700); }

/* ── Contact ─────────────────────────────────────────────────────────────── */

.contact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 44px;
  margin-top: 44px;
  align-items: start;
}
.contact-form .field { margin-bottom: 16px; }
.contact-form .field--multiline { margin-bottom: 18px; }
.contact-form .input { padding: 12px 18px; }
.contact-form textarea.input { border-radius: var(--radius-lg); padding: 14px 18px; }
.contact-form .seg { flex-wrap: wrap; }
.contact-form__submit { padding: 13px 26px; font-size: 15px; }
.contact-form__privacy { margin-top: 14px; font-size: 13px; color: var(--color-neutral-700); }
.field__error { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--color-accent-700); }
.field--invalid .input, .field--invalid .seg { border-color: var(--color-accent-700); }

.contact-aside { display: flex; flex-direction: column; gap: 18px; }
.contact-card { padding: 28px; gap: 8px; }
.contact-card__title { font-size: 22px; margin: 2px 0 0; }
.contact-card__text { margin: 0; font-size: 14.5px; color: var(--color-neutral-800); }
.contact-card__text--list { line-height: 1.7; }
.contact-card__email { font-size: 15px; font-weight: 600; }
.contact-card .btn-ghost { align-self: flex-start; font-size: 14px; }
.press-panel { padding: 28px; }
.press-panel .card-kicker { color: var(--color-accent-2-800); }
.press-panel__text { margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--color-accent-2-900); }

/* ── Detail and text pages (not in the mockup; same vocabulary) ──────────── */

.detail { max-width: 44em; }
.detail__meta { margin: 18px 0 0; font-size: 15px; color: var(--color-neutral-700); }
.detail .tag-row { margin-top: 20px; }
.detail__image { width: 100%; height: 360px; margin-top: 36px; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.detail__actions .btn { padding: 13px 24px; font-size: 15px; }
.detail__logo { height: 72px; margin-top: 28px; }

/* A partner's page: the heading and text on the left, the map of where the partner is beside them.
   The map sits in its own column, and stays in view while the text scrolls past. */
.partner-detail {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  grid-template-areas: "head map" "body map";
  column-gap: 48px;
  align-items: start;
}
.partner-detail__head { grid-area: head; }
.partner-detail__body { grid-area: body; max-width: 44em; }
.partner-detail .partner-map { grid-area: map; position: sticky; top: 108px; margin-top: 20px; }

.prose { margin-top: 28px; }
.prose p, .prose li { font-size: 16.5px; line-height: 1.6; color: var(--color-neutral-800); }
.prose h2 { font-size: 30px; margin-top: 44px; }
.prose h3 { font-size: 22px; margin-top: 32px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 var(--space-3); }
.prose figure { margin: 36px 0; }
.prose figure img { border-radius: var(--radius-lg); }

/* The privacy policy's visit statistics switch (core/blocks/analytics_opt_out.html). The heading is the footer's
   Analytics preferences target, so it stops clear of the sticky header. */
.analytics-optout h2 { scroll-margin-top: 108px; }
.analytics-optout__switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-neutral-100);
}
.analytics-optout__switch[hidden] { display: none; }
.prose .analytics-optout__status { flex: 1 1 16em; margin: 0; font-weight: 600; color: var(--color-text); }
.prose .analytics-optout__note p { font-size: 15px; color: var(--color-neutral-700); }

/* ── Responsive (not designed: the two fixed grids collapse, nav becomes a drawer) ── */

@media (max-width: 859px) {
  .hero, .news-layout { grid-template-columns: minmax(0, 1fr); }
  /* Halves, since two fifths would squeeze the disclaimer */
  .site-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* Under the text, aligned with it */
  .hero__media { justify-self: start; margin-top: 12px; margin-bottom: 16px; }
  /* A quarter of this width leaves the strapline too narrow: the brand and legal links pair up, funding goes below */
  .partners-intro { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .partner-map { max-width: 480px; }
  .partner-detail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "map" "body"; }
  .partner-detail .partner-map { position: static; margin-top: 28px; }
}

@media (max-width: 759px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    padding: 0;
    border: 1px solid var(--color-divider);
    border-radius: 999px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
  }
  .nav-toggle:hover { background: var(--color-accent-100); }
  .nav-toggle__close, .site-header.is-open .nav-toggle__open { display: none; }
  .site-header.is-open .nav-toggle__close { display: block; }

  .site-header__inner { gap: 12px 28px; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav__link {
    min-height: 44px;
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 18px;
    font-size: 16px;
  }
  .site-nav__link[aria-current="page"] { background: var(--color-accent-100); }
  .site-nav__cta { min-height: 44px; margin: 6px 0 0; font-size: 15px; }

}

@media (max-width: 599px) {
  .wrap, .page, .site-header__inner, .site-footer__inner { padding-inline: 20px; }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .site-footer__links { flex-direction: column; align-items: flex-start; }
  .site-header__inner { padding-block: 14px; }
  .site-brand__logo { height: 40px; }
  .rationale__panel, .cta { padding: 28px 24px; }
  /* Partner rows stack here. A reserved logo column only aligns columns side by side,
     so stacked it becomes empty space: drop it, and let real logos sit above the text. */
  .partner-row__logo { width: 100%; height: 88px; }
  .partner-row__logo--empty { display: none; }
  .partner-row__mark { justify-content: flex-start; }
}
