* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --ink: #1f1b1d;
  --muted: #6f6763;
  --paper: #eee7de;
  --paper-soft: #f4efe8;

  --plum: #2a1f2c;

  --aubergine: #5b2a63;
  --aubergine-dark: #3f1747;

  --outline: #f7f2eb;
  --line: #cfc5bb;
  --excluded: #d8d0c7;
}


/* -------------------------
   GLOBAL
------------------------- */

body {
  margin: 0;

  background: var(--paper);
  color: var(--ink);

  font-family: "IBM Plex Sans", sans-serif;
}


/* -------------------------
   INTRO
------------------------- */

.intro {
  min-height: 100vh;

  margin: 0;
  padding: 110px 24px 80px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  text-align: center;

  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(255, 255, 255, 0.05),
      transparent 38%
    ),
    var(--plum);

  color: #f7f0e8;
}

.intro > * {
  width: min(840px, calc(100% - 48px));

  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  margin-bottom: 18px;

  font-size: 11px;
  font-weight: 500;

  letter-spacing: 0.18em;
  text-transform: uppercase;

  color: #c9bdc9;
}

h1 {
  margin: 0;

  font-family: "Instrument Serif", serif;

  font-size: clamp(64px, 9vw, 118px);

  font-weight: 400;
  line-height: 0.88;

  letter-spacing: -0.035em;
}

.dek {
  max-width: 680px;

  margin-top: 34px;

  font-family: "Instrument Serif", serif;

  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;

  color: #eee3ec;
}

.intro-text {
  max-width: 610px;

  margin-top: 34px;

  font-size: 15px;
  line-height: 1.75;

  color: #cbbfc9;
}

.scroll-cue {
  margin-top: 74px;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.18em;
  text-transform: uppercase;

  color: #9f929e;
}


/* -------------------------
   SCROLLYTELLING
------------------------- */

#scrolly {
  position: relative;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(320px, 470px);

  gap: 54px;

  width: 100%;

  margin: 0;

  padding:
    0
    max(46px, calc((100vw - 1450px) / 2));

  background: var(--paper);
}


/* -------------------------
   STICKY MAP
------------------------- */

.sticky-map {
  position: sticky;

  top: 0;

  height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 42px 0;

  isolation: isolate;
}

.sticky-map::before {
  content: "";

  position: absolute;

  inset: 11% 2% 9%;

  background:
    radial-gradient(
      circle at 48% 48%,
      rgba(255, 255, 255, 0.5),
      rgba(255, 255, 255, 0) 68%
    );

  z-index: -1;

  pointer-events: none;
}

.map-header {
  width: 100%;

  max-width: 760px;

  margin: 0 auto 18px;
}

.map-kicker {
  margin: 0 0 5px;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.16em;
  text-transform: uppercase;

  color: #786e68;
}

.map-header h2 {
  margin: 0;

  font-family: "Instrument Serif", serif;

  font-size: clamp(28px, 3vw, 42px);

  font-weight: 400;

  line-height: 1;

  letter-spacing: -0.02em;
}

#map {
  width: 100%;

  max-width: 900px;

  margin: 0 auto;
}

#map svg {
  display: block;

  width: 100%;

  height: auto;

  overflow: visible;
}


/* -------------------------
   MAP COUNTRIES
------------------------- */

.country {
  fill: var(--excluded);

  stroke: var(--outline);

  stroke-width: 1px;

  transition:
    fill 280ms ease,
    opacity 280ms ease,
    stroke 200ms ease,
    stroke-width 200ms ease;
}

.country.included {
  fill: var(--aubergine);
}

.country.excluded {
  fill: var(--excluded);
}

.country.is-hovered {
  fill: var(--aubergine-dark);

  stroke: var(--ink);

  stroke-width: 2px;
}


/* -------------------------
   STORY STEPS
------------------------- */

.steps {
  position: relative;

  z-index: 5;

  padding: 32vh 0;
}

.step {
  min-height: 78vh;

  display: flex;
  flex-direction: column;
  justify-content: center;

  opacity: 0.18;

  transition:
    opacity 280ms ease,
    transform 280ms ease;
}

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

.step-number {
  margin: 0 0 8px;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.16em;

  color: #8b817b;
}

.step h3 {
  margin: 0 0 18px;

  font-family: "Instrument Serif", serif;

  font-size: 38px;

  font-weight: 400;

  line-height: 1;

  letter-spacing: -0.02em;
}

.step p {
  max-width: 400px;

  margin: 0 0 14px;

  font-size: 15.5px;

  line-height: 1.7;

  color: #514a46;
}

.step strong {
  color: var(--ink);

  font-weight: 600;
}


/* -------------------------
   COUNTRY LIST
------------------------- */

.country-list {
  margin-top: 26px;

  padding-top: 17px;

  border-top: 1px solid var(--line);
}

.country-list-label {
  margin: 0 0 13px;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.16em;

  text-transform: uppercase;

  color: #81766f;
}

.country-list-items {
  list-style: none;

  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 5px 20px;

  margin: 0;

  padding: 0;
}

.country-list-items li {
  font-size: 13.5px;

  line-height: 1.4;

  color: #423c39;

  cursor: default;

  transition:
    color 150ms ease,
    transform 150ms ease,
    font-weight 150ms ease;
}

.country-list-items li.is-hovered {
  color: var(--aubergine);

  font-weight: 600;

  transform: translateX(3px);
}


/* -------------------------
   CONSENSUS SECTION
------------------------- */

.consensus-section {
  min-height: 100vh;

  padding: 110px 7vw 120px;

  background: var(--plum);

  color: #f7f0e8;
}

.consensus-intro {
  max-width: 760px;

  margin: 0 auto 70px;

  text-align: center;
}

.consensus-intro .eyebrow {
  color: #b8aab7;
}

.consensus-intro h2 {
  margin: 0;

  font-family: "Instrument Serif", serif;

  font-size: clamp(58px, 7vw, 96px);

  font-weight: 400;

  line-height: 0.92;
}

.consensus-intro > p:last-child {
  max-width: 580px;

  margin: 26px auto 0;

  font-size: 16px;

  line-height: 1.7;

  color: #cbbfc9;
}


/* -------------------------
   CONSENSUS CONTROLS
------------------------- */

.consensus-controls {
  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 8px;

  max-width: 1000px;

  margin: -35px auto 55px;
}

.consensus-btn {
  appearance: none;

  border:
    1px solid
    rgba(247, 240, 232, 0.22);

  background: transparent;

  color: #cdbfcb;

  padding: 8px 13px;

  font-family:
    "IBM Plex Sans",
    sans-serif;

  font-size: 11px;

  font-weight: 500;

  letter-spacing: 0.02em;

  border-radius: 999px;

  cursor: pointer;

  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.consensus-btn:hover {
  color: #fff7ee;

  border-color:
    rgba(247, 240, 232, 0.55);

  transform: translateY(-1px);
}

.consensus-btn.is-active {
  background: #f7f0e8;

  border-color: #f7f0e8;

  color: var(--plum);
}


/* -------------------------
   CONSENSUS LAYOUT
------------------------- */

.consensus-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    220px;

  gap: 70px;

  max-width: 1200px;

  margin: 0 auto;

  align-items: center;
}

#consensus-map svg {
  display: block;

  width: 100%;

  height: auto;
}

.consensus-country {
  stroke: #392c3b;

  stroke-width: 1px;

  transition:
    fill 180ms ease,
    stroke 180ms ease,
    stroke-width 180ms ease;
}

.consensus-country:hover {
  stroke: #fff7ee;

  stroke-width: 2px;
}


/* -------------------------
   CONSENSUS LEGEND
------------------------- */

.consensus-key-title {
  margin: 0 0 18px;

  font-size: 10px;

  font-weight: 500;

  letter-spacing: 0.16em;

  text-transform: uppercase;

  color: #b8aab7;
}

.legend-row {
  display: flex;

  align-items: center;

  gap: 10px;

  margin-bottom: 10px;

  font-size: 13px;

  color: #ded2dc;
}

.legend-swatch {
  width: 28px;

  height: 13px;

  border-radius: 1px;
}

.level-1 {
  background: #d9cbd8;
}

.level-3 {
  background: #bba5bb;
}

.level-4 {
  background: #9b7c9e;
}

.level-5 {
  background: #79547e;
}

.level-6 {
  background: #5b3263;
}

.level-7 {
  background: #37183f;
}

.legend-swatch.source-included {
  background: #8f6a98;
}

.legend-swatch.source-excluded {
  background: #4a3b4d;
}

.consensus-key-note {
  margin-top: 18px;
  max-width: 190px;

  font-size: 11px;
  line-height: 1.55;

  color: #a99ca8;
}
/* -------------------------
   TOOLTIP
------------------------- */

.consensus-tooltip {
  position: fixed;

  pointer-events: none;

  max-width: 260px;

  padding: 14px 16px;

  background: #f7f0e8;

  color: #241d25;

  border-radius: 3px;

  font-size: 13px;

  line-height: 1.5;

  opacity: 0;

  transition:
    opacity 120ms ease;

  z-index: 100;
}

.consensus-tooltip strong {
  display: block;

  margin-bottom: 7px;

  font-family:
    "Instrument Serif",
    serif;

  font-size: 23px;

  font-weight: 400;

  line-height: 1;
}


/* -------------------------
   MOBILE
------------------------- */

@media (max-width: 850px) {

  .intro {
    padding:
      80px
      20px
      60px;
  }

  #scrolly {
    display: block;

    padding: 0;
  }

  .sticky-map {
    top: 0;

    height: 54vh;

    padding:
      18px
      20px;

    background: var(--paper);

    z-index: 10;
  }

  .sticky-map::before {
    inset: 4% 0;
  }

  .map-header {
    margin-bottom: 6px;
  }

  .map-header h2 {
    font-size: 25px;
  }

  #map {
    max-width: 640px;
  }

  .steps {
    padding:
      18vh
      24px
      26vh;
  }

  .step {
    min-height: 72vh;

    padding-top: 22vh;
  }

  .step h3 {
    font-size: 32px;
  }

  .step p {
    font-size: 15px;
  }

  .country-list-items {
    grid-template-columns:
      1fr 1fr;
  }
}


@media (max-width: 800px) {

  .consensus-layout {
    grid-template-columns:
      1fr;

    gap: 40px;
  }

  .consensus-key {
    max-width: 300px;

    margin: 0 auto;
  }
}


@media (max-width: 560px) {

  .country-list-items {
    grid-template-columns:
      1fr;
  }

  h1 {
    font-size:
      clamp(
        58px,
        18vw,
        86px
      );
  }
}

/* -------------------------
   EDGE CASES
------------------------- */

.edge-section {
  padding:
    120px
    7vw
    140px;

  background: #f2ece4;
  color: var(--ink);
}

.edge-intro {
  max-width: 760px;
  margin: 0 auto 70px;
  text-align: center;
}

.edge-intro .eyebrow {
  color: #81766f;
}

.edge-intro h2 {
  margin: 0;

  font-family:
    "Instrument Serif",
    serif;

  font-size:
    clamp(
      52px,
      6vw,
      82px
    );

  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.edge-intro > p:last-child {
  max-width: 590px;

  margin:
    28px
    auto
    0;

  font-size: 16px;
  line-height: 1.7;

  color: #655c57;
}


/* -------------------------
   EDGE GRID
------------------------- */

.edge-grid {
  display: grid;

  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );

  max-width: 1250px;

  margin: 0 auto;

  border-top:
    1px solid #cfc5bb;

  border-bottom:
    1px solid #cfc5bb;
}

.edge-card {
  position: relative;

  min-height: 330px;

  padding:
    28px
    24px
    32px;

  border-right:
    1px solid #cfc5bb;
}

.edge-card:last-child {
  border-right: 0;
}

.edge-score {
  margin: 0 0 46px;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.16em;
  text-transform: uppercase;

  color: #81766f;
}

.edge-score strong {
  display: block;

  margin-top: 7px;

  font-family:
    "Instrument Serif",
    serif;

  font-size: 48px;
  font-weight: 400;
  line-height: 0.9;

  letter-spacing: -0.02em;

  color: var(--aubergine);
}

.edge-card h3 {
  margin: 0 0 14px;

  font-family:
    "Instrument Serif",
    serif;

  font-size: 31px;
  font-weight: 400;
  line-height: 1;
}

.edge-card p {
  margin: 0;

  font-size: 13.5px;
  line-height: 1.65;

  color: #5c544f;
}

.edge-source-line {
  margin-top: 22px !important;

  padding-top: 17px;

  border-top:
    1px solid #d9d0c8;

  font-size: 11px !important;
  line-height: 1.6 !important;

  color: #847972 !important;
}


/* -------------------------
   EDGE MOBILE
------------------------- */

@media (max-width: 950px) {

  .edge-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .edge-card {
    border-bottom:
      1px solid #cfc5bb;
  }
}


@media (max-width: 600px) {

  .edge-section {
    padding:
      90px
      24px
      110px;
  }

  .edge-grid {
    display: block;
  }

  .edge-card {
    min-height: auto;

    border-right: 0;

    padding:
      28px
      0
      32px;
  }

  .edge-score {
    margin-bottom: 24px;
  }
}

/* -------------------------
   METHODOLOGY + SOURCES
------------------------- */

.method-section {
  padding:
    120px
    7vw
    70px;

  background: #e8dfd4;
  color: var(--ink);
}

.method-wrap {
  max-width: 1250px;
  margin: 0 auto;
}

.method-heading {
  max-width: 720px;
  margin-bottom: 70px;
}

.method-heading .eyebrow {
  color: #81766f;
}

.method-heading h2 {
  margin: 0;

  font-family:
    "Instrument Serif",
    serif;

  font-size:
    clamp(
      48px,
      5vw,
      72px
    );

  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
}


/* -------------------------
   METHOD GRID
------------------------- */

.method-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 0;

  border-top:
    1px solid #c6baae;

  border-bottom:
    1px solid #c6baae;
}

.method-block {
  padding:
    32px
    34px
    38px
    0;

  border-right:
    1px solid #c6baae;
}

.method-block + .method-block {
  padding-left: 34px;
}

.method-block:last-child {
  border-right: 0;
}

.method-block h3 {
  margin: 0 0 18px;

  font-family:
    "Instrument Serif",
    serif;

  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.method-block p {
  margin:
    0
    0
    14px;

  font-size: 13.5px;
  line-height: 1.7;

  color: #5e5550;
}


/* -------------------------
   SOURCES
------------------------- */

.sources-block {
  margin-top: 70px;
}

.sources-title {
  margin: 0 0 24px;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.16em;
  text-transform: uppercase;

  color: #81766f;
}

.sources-grid {
  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap:
    0
    46px;
}

.sources-grid a {
  display: block;

  padding:
    17px
    0;

  border-top:
    1px solid #c6baae;

  text-decoration: none;

  font-size: 12px;
  line-height: 1.55;

  color: #6c625c;

  transition:
    color 150ms ease,
    padding-left 150ms ease;
}

.sources-grid a:nth-last-child(-n + 2) {
  border-bottom:
    1px solid #c6baae;
}

.sources-grid a:hover {
  color: var(--aubergine);

  padding-left: 5px;
}

.sources-grid a span {
  display: block;

  margin-bottom: 3px;

  font-size: 13px;
  font-weight: 600;

  color: var(--ink);
}


/* -------------------------
   CREDIT
------------------------- */

.method-credit {
  margin-top: 60px;

  padding-top: 22px;

  border-top:
    1px solid #c6baae;
}

.method-credit p {
  margin: 0;

  font-size: 11px;

  color: #847970;
}


/* -------------------------
   METHOD MOBILE
------------------------- */

@media (max-width: 850px) {

  .method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;

  border-top: 1px solid #c6baae;
  border-bottom: 1px solid #c6baae;
}
  .method-block,
  .method-block + .method-block {
    padding:
      28px
      0;

    border-right: 0;

    border-bottom:
      1px solid #c6baae;
  }

  .method-block:last-child {
    border-bottom: 0;
  }

  .sources-grid {
    grid-template-columns:
      1fr;
  }

  .sources-grid a {
    border-bottom: 0;
  }

  .sources-grid a:last-child {
    border-bottom:
      1px solid #c6baae;
  }
}

.method-note {
  margin-top: 24px !important;
  padding-top: 18px;

  border-top: 1px solid #cfc5bb;

  font-size: 12px !important;
  line-height: 1.65 !important;

  color: #766b65 !important;
}

.method-note strong {
  color: var(--ink);
}

.built-with {
  margin-top: 60px;
  padding-top: 24px;

  border-top: 1px solid #c6baae;
}

.built-with p:last-child {
  max-width: 720px;
  margin: 0;

  font-size: 13px;
  line-height: 1.7;

  color: #6c625c;
}

.built-with strong {
  color: var(--ink);
  font-weight: 600;
}