/* fa.css: Foreign Actors scrollytelling (EUISS)
   Every selector starts with .fa- so nothing leaks into the Drupal theme. */

/* Hide sideways overflow without breaking position: sticky.
   clip (unlike hidden) doesn't create a scroll container. */
html,
body {
  overflow-x: clip;
}

/* ── layout: text left, chart right ─────────────────────────────────────── */

.fa-scrolly {
  --fa-teal: #309ebe; /* the EU's colour: not for UI */
  --fa-neutral: #333333; /* same as theme.neutral in theme.js */
  --fa-navy: #1d3956;
  --fa-ink: #1d1d1b;
  --fa-muted: #646363;
  --fa-light: #c6c6c6;
  --fa-font: "PT Sans Narrow", "Arial Narrow", sans-serif;

  position: relative;
  display: flex;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 2rem auto;
}

.fa-steps {
  flex: 0 0 34%;
  max-width: 28rem;
  padding: 35vh 0 55vh;
  position: relative;
  z-index: 2;
}

.fa-stage {
  flex: 1 1 auto;
  min-width: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

/* Drupal adds empty paragraphs around embedded markup */
.fa-scrolly p:empty {
  display: none;
}

/* ── steps ──────────────────────────────────────────────────────────────── */

/* base rule: was ".fa-step {" */
.fa-scrolly .fa-step {
  margin: 0 0 60vh;
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.fa-step.is-active {
  opacity: 1;
}

.fa-steps > h3 {
  margin: 0 0 1.25rem;
}

.fa-step + h3 {
  margin-top: -30vh; /* a section heading sits closer to its own first step */
}

/* ── chart frame ────────────────────────────────────────────────────────── */

.fa-chart {
  position: absolute;
  inset: 1.5rem 0;
  display: flex;
  flex-direction: column;
  font-family: var(--fa-font);
  color: var(--fa-ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.fa-chart.is-active {
  opacity: 1;
  visibility: visible;
}

.fa-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.fa-subtitle {
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--fa-muted);
  margin-top: 0.15rem;
}

.fa-map {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
}

.fa-map svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* chart-text scale: SVG charts shrink to fit a phone, so labels get a boost there */
:root {
  --fa-fs: 1;
}

@media screen and (max-width: 768px) {
  :root {
    --fa-fs: 1.5;
  }
}

.fa-labels text {
  font: 700 calc(12px * var(--fa-fs)) var(--fa-font);
  fill: var(--fa-ink);
  stroke: #fff;
  stroke-width: 3px;
  paint-order: stroke;
  pointer-events: none;
}

.fa-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--fa-muted);
}

.fa-footnote,
.fa-source,
.fa-credit {
  white-space: pre-line;
  line-height: 1.3 !important;
}

/* ── legend: actor tiles ────────────────────────────────────────────────── */

.fa-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0.75rem 0 0.5rem;
}

.fa-tile {
  font: 700 0.875rem/1 var(--fa-font);
  color: var(--fa-ink);
  background: #fff;
  border: 1px solid var(--fa-light);
  border-radius: 2px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
}

.fa-tile:hover {
  border-color: var(--fa-neutral);
}

.fa-tile[aria-pressed="true"] {
  background: var(--fa-neutral);
  border-color: var(--fa-neutral);
  color: #fff;
}

.fa-tile:focus-visible {
  outline: 2px solid var(--fa-navy);
  outline-offset: 2px;
}

/* one-line hint under the clickable tiles, footnote style */
.fa-tiles-hint {
  margin: -0.25rem 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--fa-muted);
}

/* ── legend: symbol key ─────────────────────────────────────────────────── */

.fa-key {
  display: flex;
  align-items: flex-end;
  gap: 0.9rem;
  color: var(--fa-ink);
}

.fa-key-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.fa-key svg {
  flex-shrink: 0;
}

.fa-key-item,
.fa-key-label {
  white-space: nowrap;
}

.fa-key svg text {
  font: 12px var(--fa-font);
  fill: var(--fa-muted);
}

.fa-key-label {
  padding-bottom: 0.15rem;
}

/* ── range chart (summits) ──────────────────────────────────────────────── */

.fa-range-grid line {
  stroke: var(--fa-light);
  stroke-opacity: 0.6;
  shape-rendering: crispEdges;
}

.fa-axis text {
  font: calc(12px * var(--fa-fs)) var(--fa-font);
  fill: var(--fa-muted);
}

/* range chart: centre title + chart + key as one block in the stage */
.fa-chart--range {
  justify-content: center;
}

.fa-chart--range .fa-map {
  flex: none;
  aspect-ratio: var(--fa-aspect, 1);
  max-height: calc(100vh - 15rem); /* never taller than the stage minus title and footnotes */
}

.fa-row-actor {
  font: 700 calc(13px * var(--fa-fs)) var(--fa-font);
  fill: var(--fa-ink);
}

.fa-row-name {
  font: calc(11.5px * var(--fa-fs)) var(--fa-font);
  fill: var(--fa-muted);
}

/* ── tooltip ────────────────────────────────────────────────────────────── */

.fa-tooltip {
  position: absolute;
  z-index: 5;
  max-width: 180px;
  padding: 0.4rem 0.55rem;
  background: #fff;
  border: 1px solid var(--fa-light);
  font-size: 0.9375rem;
  line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

/* ── mobile: chart fills the screen, steps scroll over it ──────────────── */

@media screen and (max-width: 768px) {
  .fa-scrolly {
    flex-direction: column;
    gap: 0;
    margin: 1rem 0;
  }

  .fa-stage {
    order: -1; /* chart first, so the steps can be pulled up over it */
    align-self: stretch;
    height: 100vh;
    height: 100svh;
  }

  .fa-chart {
    inset: 0.75rem 0;
  }

  .fa-steps {
    flex: none;
    max-width: none;
    margin-top: -100vh;
    padding: 70vh 0.75rem 30vh;
    pointer-events: none; /* the map stays usable between cards */
  }

  .fa-step,
  .fa-steps > h3 {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.94);
    padding: 0.9rem 1rem;
  }

  .fa-scrolly .fa-step {
    margin-bottom: 65vh;
  }
  
  .fa-step + h3 {
    margin-top: 0;
  }

  .fa-tiles {
    flex-wrap: nowrap;
    overflow-x: auto; /* one scrollable row instead of four */
    padding-bottom: 2px;
  }

  .fa-title {
    font-size: 1.25rem;
  }

  /* the map is width-bound on a phone: size it to its own aspect ratio
     and keep the key right under it */
  .fa-map {
    flex: none;
    aspect-ratio: var(--fa-aspect, 1);
  }

  .fa-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  /* long legend items: one per line, wrapping if still too wide */
  .fa-key--stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .fa-key--stack .fa-key-item {
    white-space: normal;
  }

  .fa-footnote,
  .fa-source,
  .fa-credit {
    white-space: pre-line;
    line-height: 1.3 !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  .fa-step,
  .fa-chart {
    transition: none;
  }
}

/* ══ landing page ═══════════════════════════════════════════════════════════
   Overview map, key-insights slider and chapter cards (js/landing.js).
   Everything sits inside .fa-landing, so nothing leaks into the Drupal theme. */

.fa-landing {
  --fa-teal: #309ebe; /* the EU's colour: not for UI */
  --fa-neutral: #333333; /* same as theme.neutral in theme.js */
  --fa-navy: #1d3956;
  --fa-ink: #1d1d1b;
  --fa-muted: #646363;
  --fa-light: #c6c6c6;
  --fa-font: "PT Sans Narrow", "Arial Narrow", sans-serif;
}

/* Drupal adds empty paragraphs around embedded markup */
.fa-landing p:empty {
  display: none;
}

/* ── overview map: a static chart (the .fa-chart frame belongs to the scrolly stage) ── */

.fa-overview {
  position: relative; /* anchor for the tooltip */
  display: flex;
  flex-direction: column;
  font-family: var(--fa-font);
  color: var(--fa-ink);
  margin: 1.5rem 0;
}

/* the map is drawn by js: whatever Drupal injects in here goes */
.fa-overview > p {
  display: none;
}

.fa-overview .fa-key {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.fa-overview .fa-map {
  flex: none;
  aspect-ratio: var(--fa-aspect, 2);
}

.fa-landing-note {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--fa-muted);
}

/* executive summary + priorities: two boxes side by side, stacked on small screens */
.fa-landing .fa-summary-row {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 900px) {
  .fa-landing .fa-summary-row {
    grid-template-columns: 2fr 2fr;
    align-items: start;
  }
}

.fa-landing .fa-priorities > p:first-child {
  margin-top: 0;
}

.fa-landing .fa-box {
  background: #f2f5f7;
  /* border-top: 4px solid var(--fa-navy); */
  padding: 1.25rem 1.5rem;
}

.fa-landing .fa-box h2 {
  margin-top: 0;
}

.fa-landing .fa-box > p:first-child,
.fa-landing .fa-box ul {
  margin-top: 0;
}

.fa-landing .fa-sum-item {
  margin: 0 0 1rem;
}

.fa-landing .fa-sum-item p {
  margin: 0 0 0.3rem;
}

/* executive summary: first sentence, then an inline "Read more".
   landing.js adds .fa-js to the box and collapses .fa-more-rest; without the
   script the whole text simply stays visible. */
.fa-landing .fa-more-btn {
  display: inline;
  margin: 0 0 0 0.35em;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--fa-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fa-navy);
}

.fa-landing .fa-more-btn::after {
  content: " \25BE"; /* ▾ */
}

.fa-landing .fa-more-btn:hover,
.fa-landing .fa-more-btn:focus-visible {
  text-decoration: underline;
}

.fa-landing .fa-more-btn[hidden] {
  display: none;
}

.fa-landing .fa-js .fa-more-rest {
  display: none;
}

.fa-landing .fa-js .fa-more-rest.on {
  display: inline;
}

.fa-landing .fa-more-rest:focus {
  outline: none;
}

/* "Three patterns" call-out in the introduction */
.fa-landing .fa-callout {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--fa-navy);
}

.fa-landing .fa-callout p {
  margin: 0.75rem 0;
}

.fa-landing .fa-callout p:first-child {
  margin-top: 0;
}

.fa-landing .fa-callout p:last-child {
  margin-bottom: 0;
}

/* ── chapter cards ──────────────────────────────────────────────────────── */

.fa-cards-wrap {
  margin-top: 0.5em;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.fa-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.fa-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 1em;
  box-shadow: 0 2px 4px rgba(9, 49, 142, 0.08), 0 0 10px rgba(9, 49, 142, 0.04),
    0 4px 5px rgba(9, 49, 142, 0.04), 0 -4px 4px rgba(9, 49, 142, 0.04);
}

/* wraps number + title + image + subtitle in one click target,
   without disturbing the flex layout of .fa-card */
.fa-card-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

/* numbered heading above the image; baseline alignment keeps the number on the
   title's first line even when the title wraps */
.fa-card-heading {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  color: var(--fa-navy);
  padding-top: 1em;
}

.fa-card-number {
  display: inline-block;
  position: relative;
  top: -0.2em;
  flex-shrink: 0;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  text-align: center;
  background: var(--fa-navy);
  color: #fff;
  font-family: "PT Sans Narrow", sans-serif;
  font-weight: 700;
}

.fa-card-title {
  margin: 0;
  padding: 0 !important;
  font-family: "PT Sans", sans-serif;
}

.fa-card-img-wrap {
  display: grid;
  margin-top: 0.8em;
}

.fa-card-img {
  width: 100%;
  height: auto;
  display: block;
  transition: box-shadow 0.15s;
}

.fa-card:hover .fa-card-img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fa-card-subtitle {
  padding: 0.4em 0 0.1em !important;
  margin: 0 0 0.8em !important;
  text-wrap: balance;
  font-weight: 700 !important;
}

.fa-card-desc {
  font-family: "PT Sans", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--fa-muted);
  margin: 0 0 1em !important;
  line-height: 1.4;
}

@media screen and (max-width: 768px) {
  .fa-cards-wrap {
    grid-template-columns: 1fr;
  }
}

/* ── key-insights slider ────────────────────────────────────────────────── */

.fa-slider {
  position: relative;
  max-width: 700px;
  margin: 2rem auto;
  aspect-ratio: 10 / 9; /* was 4/3; ~20% taller */
  background: transparent;
  border-radius: 6px;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.fa-slider-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-sizing: border-box;
  padding: clamp(6px, 1.5vw, 14px);
  padding-bottom: 40px; /* keep image clear of dots + play/pause toggle */
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}

.fa-slider-img.on {
  opacity: 1;
}

.fa-slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.fa-slider-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
}

.fa-slider-dot.on {
  background: var(--fa-ink);
}

.fa-slider-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: var(--fa-ink);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.fa-slider-btn:hover,
.fa-slider-btn:focus-visible {
  background: #fff;
}

.fa-slider-prev,
.fa-slider-next {
  top: 50%;
  transform: translateY(-50%);
}
.fa-slider-prev { left: 10px; }
.fa-slider-next { right: 10px; }

.fa-slider-toggle {
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .fa-slider-img,
  .fa-card-img {
    transition: none;
  }
}

/* ── hover marker (hover.js) ─────────────────────────────────────────────── */

/* the ring is drawn by hover.js (look: RING at the top of that file);
   this plain outline is only the fallback for shapes it cannot ring */
.fa-hover {
  stroke: var(--fa-ink, #1d1d1b);
  stroke-width: 1.6px;
}

/* ribbons (sankey): darken instead of outlining */
.fa-hover-soft {
  filter: brightness(0.75);
}

/* ── chapter navigation (append to fa.css) ─────────────────────────────── */

.fa-nav {
  --fa-navy: #1d3956;
  --fa-neutral: #333333;
  --fa-ink: #1d1d1b;
  --fa-muted: #646363;
  --fa-light: #c6c6c6;
  --fa-font: "PT Sans Narrow", "Arial Narrow", sans-serif;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: stretch;
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fa-light);
  font-family: var(--fa-font);
}

.fa-nav a.fa-nav-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.7rem 1rem;
  background: #fff;
  border: 1px solid var(--fa-light);
  border-radius: 2px;
  color: var(--fa-ink);
  text-decoration: none;
  line-height: 1.15;
}

.fa-nav a.fa-nav-btn:hover {
  border-color: var(--fa-neutral);
}

.fa-nav a.fa-nav-btn:focus-visible {
  outline: 2px solid var(--fa-navy);
  outline-offset: 2px;
}

.fa-nav-label {
  font-size: 0.8125rem;
  color: var(--fa-muted);
}

.fa-nav-title {
  font-size: 1rem;
  font-weight: 700;
}

.fa-nav a.fa-nav-prev { grid-column: 1; justify-self: start; text-align: left; }
.fa-nav a.fa-nav-home { grid-column: 2; align-items: center; text-align: center; }
.fa-nav a.fa-nav-next { grid-column: 3; justify-self: end; text-align: right; }

@media screen and (max-width: 768px) {
  .fa-nav { grid-template-columns: 1fr 1fr; }
  .fa-nav a.fa-nav-prev { grid-column: 1; grid-row: 1; }
  .fa-nav a.fa-nav-next { grid-column: 2; grid-row: 1; }
  .fa-nav a.fa-nav-home { grid-column: 1 / -1; grid-row: 2; }
}

/* ── back to top ───────────────────────────────────────────────────────── */

.fa-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #1d3956;
  color: #fff;
  font: 700 1.25rem/1 "PT Sans Narrow", "Arial Narrow", sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.fa-top[hidden] {
  display: none;
}

.fa-top:hover {
  background: #1a1a1a;
}

.fa-top:focus-visible {
  outline: 2px solid #1d3956;
  outline-offset: 3px;
}

/* ── link back to the landing page, top of page ────────────────────────── */

.fa-crumb {
  margin: 0 0 1rem;
  font: 1rem/1.3 "PT Sans Narrow", "Arial Narrow", sans-serif;
  color: #646363;
}

.fa-crumb a {
  color: #1d3956;
  text-decoration: underline;
}
/* methodology page tables — append to css/fa.css */
.fa-table-wrap {
  max-width: 100%;
  overflow-x: auto;          /* wide tables scroll inside their own box on phones */
  margin: 1.5rem 0;
}
.fa-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-family: "PT Sans Narrow", "PT Sans", sans-serif;
  font-size: 0.9rem;
  line-height: 1.35;
}
.fa-table th,
.fa-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #d9d9d9;
}
.fa-table th {
  font-weight: 700;
  border-bottom: 2px solid #063756;
  background: #fff;
  position: sticky;
  top: 0;
}
.fa-table tbody tr:nth-child(even) td { background: #f5f7f9; }

/* ══ landing page v2 (index_landing_v2.html) ════════════════════════════════
   Everything below is additive and scoped to .fa-landing-v2 or to classes only
   v2 uses, so index_landing.html keeps its old look. When v2 replaces it,
   the old landing rules above (summary-row, fa-more-*, fa-slider*, fa-callout p)
   can be deleted. */

/* "Main findings" box: no fill */
.fa-landing-v2 .fa-box {
  background: none;
  padding: 0.25rem 0 0;
  margin: 1.5rem 0;
}

.fa-landing-v2 .fa-box h2 {
  margin-top: 1rem;
}

/* theme cards: one per chapter theme (filled by nav.js); only the region links are clickable */
.fa-landing .fa-themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 1.5rem 0 1rem;
}

@media (max-width: 900px) {
  .fa-landing .fa-themes {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .fa-landing .fa-themes {
    grid-template-columns: 1fr;
  }
}

.fa-landing .fa-theme {
  display: flex;
  flex-direction: column;
  background: none;
  border: 1px solid var(--fa-light);
  padding: 0 1em 0.9em;
  cursor: default;
}

.fa-landing .fa-theme-title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: "PT Sans", sans-serif;
}

.fa-landing .fa-theme-img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.8em;
}

.fa-landing .fa-theme-sub {
  margin: 0.5em 0 0 !important;
  font-family: "PT Sans", sans-serif;
  font-size: 16px;
  /* font-weight: 700; */
  line-height: 1.3;
  text-wrap: balance;
}

/* short description text in a card, below the image */
.fa-landing .fa-theme-body {
  margin: 0.8em 0 0 !important;
  font-family: "PT Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  text-wrap: pretty;
}

/* region links inside a card: small map icon + region name */
.fa-landing .fa-theme-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.25em;
  margin-top: auto;
  padding-top: 0.8em;
}

.fa-landing a.fa-region-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: "PT Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--fa-navy);
  text-decoration: none;
}

.fa-landing a.fa-region-link::before {
  content: "";
  flex: none;
  width: 1.2em;
  height: 1.2em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4 3 6.5v13.5l6-2.5 6 2.5 6-2.5V4l-6 2.5L9 4zM9 4v13.5M15 6.5V20' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4 3 6.5v13.5l6-2.5 6 2.5 6-2.5V4l-6 2.5L9 4zM9 4v13.5M15 6.5V20' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.fa-landing a.fa-region-link:hover,
.fa-landing a.fa-region-link:focus-visible {
  text-decoration: underline;
}

/* "Three patterns" as a numbered list */
.fa-landing .fa-callout ol {
  margin: 0;
  padding-left: 1.5rem;
}

.fa-landing .fa-callout li {
  margin: 0.75rem 0;
  padding-left: 0.25rem;
}

.fa-landing .fa-callout li:first-child {
  margin-top: 0;
}

.fa-landing .fa-callout li:last-child {
  margin-bottom: 0;
}


/* ══ landing page v3 (index_landing_v3.html): "Main findings" scrollytelling ═══
   js/landing_scrolly.js, steps in js/steps/landing.js. Additive and scoped to
   .fa-landing-v3: the chapters and the other landing versions are unchanged. */

/* Drupal injects (non-empty) paragraphs into the empty stage: the charts are drawn by js */
.fa-landing-v3 .fa-stage > p {
  display: none;
}

/* the findings are whole paragraphs, not single sentences: wider column, less space between them */
@media (min-width: 769px) {
  .fa-landing-v3 .fa-steps {
    flex: 0 0 42%;
    max-width: none;
  }

  .fa-landing-v3 .fa-step {
    margin-bottom: 45vh;
  }
}

/* overview map beside the references: half width, floated right; full width on small screens */
@media (min-width: 769px) {
  .fa-landing-v3 .fa-overview-aside {
    float: right;
    width: 50%;
    margin: 0 0 1rem 2rem;
  }

  .fa-landing-v3 .fa-overview-aside .fa-overview {
    margin-top: 0;
  }
}


/* ══ print mode: ?print in the address ═══════════════════════════════════════
   js/main.js and js/landing_scrolly.js add .fa-print to the scrolly and put a
   chart of its own after every step, so the page reads straight down and can
   be saved as PDF (tools/print/print-all.mjs). These rules apply on screen
   too, so the browser shows what the PDF will look like. */

.fa-scrolly.fa-print {
  display: block;
  max-width: 180mm;
}

/* the shared stage stays empty: the charts sit between the steps */
.fa-print .fa-stage {
  display: none;
}

.fa-print .fa-steps {
  position: static;
  z-index: auto;
  flex: none;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: auto;
}

.fa-print .fa-step,
.fa-print .fa-steps > h3 {
  opacity: 1;
  margin: 0 0 1rem;
  padding: 0;
  background: none;
  transition: none;
}

.fa-print .fa-steps > h3,
.fa-print .fa-step + h3 {
  margin-top: 2rem;
  break-after: avoid;
}

/* a step and its chart (wrapped by the script): never split across pages */
.fa-print .fa-print-step {
  margin: 0 0 2.5rem;
  break-inside: avoid;
}

.fa-print .fa-chart {
  position: static;
  inset: auto;
  width: 180mm;
  max-width: 100%;
  margin: 1rem 0 0;
  opacity: 1;
  visibility: visible;
  transition: none;
  break-inside: avoid;
}

/* no stage height to fill: the map follows its own aspect ratio,
   short enough to share an A4 page with title, legend and footnotes */
.fa-print .fa-map,
.fa-print .fa-chart--range .fa-map {
  flex: none;
  aspect-ratio: var(--fa-aspect, 1);
  max-height: 150mm;
}

.fa-print .fa-tiles {
  flex-wrap: wrap;
  overflow: visible;
}

/* "click a tile" means nothing on paper */
.fa-print .fa-tiles-hint,
.fa-print .fa-tooltip {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 15mm;
  }

  html {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .fa-nav,
  .fa-top,
  .fa-crumb,
  .fa-tooltip,
  .fa-tiles-hint,
  .fa-more-btn {
    display: none !important;
  }

  .fa-landing .fa-js .fa-more-rest {
    display: inline;
  }

  .fa-chart,
  .fa-overview,
  .fa-theme,
  .fa-landing .fa-callout,
  figure {
    break-inside: avoid;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  /* printed without ?print: text only, since the shared chart can show only
     one step at a time */
  .fa-scrolly:not(.fa-print) {
    display: block;
  }

  .fa-scrolly:not(.fa-print) .fa-stage {
    display: none;
  }

  .fa-scrolly:not(.fa-print) .fa-steps {
    max-width: none;
    padding: 0;
  }

  .fa-scrolly:not(.fa-print) .fa-step {
    opacity: 1;
    margin: 0 0 1rem;
  }

  .fa-scrolly:not(.fa-print) .fa-step + h3 {
    margin-top: 1.5rem;
  }

  /* methodology tables: fit the page instead of scrolling sideways */
  .fa-table-wrap {
    overflow: visible;
  }

  .fa-table {
    min-width: 0;
  }

  .fa-table th {
    position: static;
  }

  .fa-table tr {
    break-inside: avoid;
  }
}
