@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --ink: #171717;
  --muted: #67645f;
  --line: #ded9cf;
  --soft: #f1eee8;
  --accent: #d14f3f;
  --accent-2: #2f6f73;
  --shadow: 0 18px 50px rgba(31, 29, 24, 0.08);
  font-family:
    "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(241, 238, 232, 0.8), rgba(251, 250, 247, 0) 380px),
    var(--bg);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 36px;
}

.intro {
  max-width: 860px;
  padding: 26px 0 22px;
}

.kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(2.9rem, 7vw, 5.7rem);
  line-height: 0.96;
  font-weight: 760;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.05;
  font-weight: 720;
}

.lede {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  line-height: 1.55;
}

.bridge {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: 48px;
  align-items: end;
  min-height: 36vh;
  padding: 38px 0 48px;
  border-top: 1px solid var(--line);
}

.bridge p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 1.9vw, 1.42rem);
  line-height: 1.58;
}

.section-block {
  min-height: 82vh;
  padding: 72px 0 52px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(300px, 1.15fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 20px;
}

.section-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.country-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.country-toggle::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--country-color, var(--muted));
  opacity: 0.45;
}

.country-toggle.is-active {
  border-color: rgba(47, 111, 115, 0.38);
  color: var(--ink);
  background: #ffffff;
}

.country-toggle.is-active::before {
  opacity: 1;
}

.chart-frame {
  min-height: 420px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.chart-frame svg {
  display: block;
  width: 100%;
  min-width: 920px;
  height: auto;
}

.axis-label,
.axis-title,
.facet-title,
.legend-label,
.annotation,
.small-label {
  fill: var(--muted);
  font-size: 12px;
}

.facet-title {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.axis-label {
  font-size: 11px;
}

.axis-title {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.grid-line,
.axis-line {
  stroke: var(--line);
  stroke-width: 1;
}

.series-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.takeoff-line {
  stroke: var(--accent);
  stroke-dasharray: 6 5;
  stroke-width: 1.6;
}

.target-line {
  stroke: #9b9488;
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.arrow-line {
  stroke: var(--accent);
  stroke-width: 1.5;
  marker-end: url(#arrowhead);
}

.label-bg {
  fill: rgba(255, 255, 255, 0.86);
  stroke: none;
}

.methodology {
  max-width: 820px;
  padding: 72px 0 12px;
  border-top: 1px solid var(--line);
}

.methodology h2 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.methodology p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.62;
}

.site-footer {
  padding: 28px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: inherit;
  text-decoration-color: rgba(103, 100, 95, 0.45);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.tooltip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  max-width: 260px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 40px rgba(31, 29, 24, 0.14);
  font-size: 0.83rem;
  line-height: 1.4;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 100ms ease;
}

.tooltip.is-visible {
  opacity: 1;
}

.tooltip strong {
  display: block;
  margin-bottom: 2px;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 22px, 1160px);
    padding-top: 28px;
  }

  .intro {
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(2.8rem, 17vw, 4.8rem);
  }

  .section-heading {
    display: block;
  }

  .bridge {
    display: block;
    min-height: auto;
    padding: 34px 0 42px;
  }

  .bridge h2 {
    margin-bottom: 14px;
  }

  .section-block {
    min-height: auto;
    padding: 48px 0 36px;
  }

  .section-heading h2 {
    margin-bottom: 12px;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 8px;
  }
}
