/* ============================================================
   Pela Terra Farmland — 2025 Impact Report
   WEB / SCROLL EDITION. Continuous flowing layout + scroll
   animation. Reuses the print report's visual language.
   ============================================================ */

:root {
  --midnight: #0a2323;
  --teal:     #0f4a4a;
  --ink:      #1b2b27;
  --ink-soft: #4c5a55;
  --gold:     #b08b3f;
  --gold-bright: #d8b25f;
  --paper:    #faf7f0;
  --cream-solid: #f1e9da;
  --line:     #d9cfbd;
  --line-soft:#e7ddca;

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Libre Franklin', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1180px;   /* wide column */
  --readw: 760px;   /* reading column */
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: hidden; }
body {
  background: var(--paper);
  font-family: var(--sans);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--teal); margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }
em { font-style: italic; }
a { color: inherit; }
sup.fnref a { color: var(--gold); text-decoration: none; font-size: 0.7em; padding: 0 0.1em; }

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin: 0 0 16px; }
.lede { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.36; font-weight: 400; color: var(--teal); letter-spacing: -0.005em; }
.rule { width: 56px; height: 2px; background: var(--gold); border: 0; margin: 22px 0; }
.h-section { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.04; }
.h-sub { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-top: 0.15em; }
.h-minor { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin: 2em 0 0.7em; }

/* ============================================================
   SECTION SHELLS
   ============================================================ */
.section { padding: clamp(64px, 11vh, 150px) var(--pad); position: relative; }
.section > .wrap { max-width: var(--readw); margin: 0 auto; }
.section > .wide { max-width: var(--maxw); margin: 0 auto; }

/* alternating tint so prose sections separate gently */
.section.tint { background: linear-gradient(180deg, #f6f1e6 0%, var(--paper) 100%); }

/* ---------- COVER ---------- */
.cover {
  position: relative; min-height: 100svh; min-height: 100vh;
  background: var(--midnight); color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.cover__bg { position: absolute; inset: -8% 0 0; background-size: cover; background-position: center; will-change: transform; }
.cover__scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,35,35,0.25) 0%, rgba(10,35,35,0.35) 45%, rgba(10,35,35,0.92) 100%); }
.cover__brand { position: absolute; top: clamp(24px, 4vw, 48px); left: var(--pad); display: flex; align-items: center; gap: 11px; z-index: 3; }
.cover__brand img { width: 28px; height: 28px; object-fit: contain; }
.cover__brand span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.cover__inner { position: relative; z-index: 2; padding: 0 var(--pad) clamp(72px, 12vh, 130px); }
.cover__kicker { font-family: var(--mono); font-size: clamp(11px, 1.4vw, 14px); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 22px; }
.cover h1 { color: #fff; font-size: clamp(3rem, 9vw, 7rem); line-height: 0.98; font-weight: 500; max-width: 16ch; }
.cover h1 .yr { display: block; font-size: clamp(1.5rem, 3.6vw, 2.4rem); color: rgba(255,255,255,0.9); font-style: italic; font-weight: 400; margin-top: 0.32em; }
.cover__date { font-family: var(--mono); font-size: 13px; letter-spacing: 0.22em; color: rgba(255,255,255,0.72); margin-top: 28px; }
.cover .rule { margin: 22px 0; }
.cover__tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--gold-bright); margin-top: 16px; }
.cover__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.cover__scroll::after { content: ""; display: block; width: 1px; height: 28px; margin: 10px auto 0; background: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0)); animation: scrollcue 2s ease-in-out infinite; }
@keyframes scrollcue { 0%,100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- DIVIDER (section break) ---------- */
.divider {
  position: relative; min-height: 86svh; min-height: 86vh;
  background: var(--midnight); color: #fff; overflow: hidden;
  display: grid; place-items: center; text-align: center;
}
.divider__bg { position: absolute; inset: -10% 0 0; background-size: cover; background-position: center; will-change: transform; }
.divider__scrim { position: absolute; inset: 0; background: rgba(10,35,35,0.58); }
.divider__inner { position: relative; z-index: 2; padding: 0 var(--pad); max-width: 880px; }
.divider .num { font-family: var(--mono); font-size: clamp(12px, 1.6vw, 15px); letter-spacing: 0.34em; color: var(--gold-bright); text-transform: uppercase; }
.divider h2 { color: #fff; font-size: clamp(2.6rem, 8vw, 5.2rem); margin: 0.42em 0 0; font-weight: 500; }
.divider p { color: rgba(255,255,255,0.82); font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-style: italic; max-width: 36ch; margin: 22px auto 0; }

/* ---------- HERO (stat splash) ---------- */
.hero {
  position: relative; min-height: 82svh; min-height: 82vh;
  background: var(--midnight); color: #fff; overflow: hidden;
  display: grid; align-items: center;
}
.hero__bg { position: absolute; inset: -8% 0 0; background-size: cover; background-position: center; opacity: 0.6; will-change: transform; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(110deg, rgba(10,35,35,0.92) 0%, rgba(10,35,35,0.5) 65%, rgba(10,35,35,0.15) 100%); }
.hero__inner { position: relative; z-index: 2; padding: clamp(48px,8vh,90px) var(--pad); max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero .kicker { font-family: var(--mono); font-size: clamp(11px,1.4vw,13px); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-bright); }
.hero .stat { font-family: var(--serif); font-size: clamp(4rem, 14vw, 9.5rem); line-height: 0.9; color: #fff; margin: 0.08em 0 0; font-weight: 500; letter-spacing: -0.02em; }
.hero h3 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.6rem); margin-top: 0.2em; max-width: 18ch; }
.hero p { color: rgba(255,255,255,0.82); max-width: 44ch; margin-top: 18px; font-size: clamp(0.95rem,1.6vw,1.1rem); line-height: 1.5; }
.hero.light { background: var(--cream-solid); color: var(--ink); }
.hero.light .hero__scrim { background: linear-gradient(110deg, rgba(241,233,218,0.96) 0%, rgba(241,233,218,0.55) 55%, rgba(241,233,218,0) 100%); }
.hero.light .stat, .hero.light h3 { color: var(--teal); }
.hero.light p { color: var(--ink-soft); max-width: 34ch; }
.hero.light .kicker { color: var(--gold); }

/* ---------- PULLQUOTE ---------- */
.pullquote.section { background: var(--cream-solid); text-align: center; padding-block: clamp(80px, 14vh, 170px); }
.pullquote .wrap { max-width: 1000px; }
.pullquote .mark { font-family: var(--serif); font-size: clamp(80px, 12vw, 130px); line-height: 0.4; color: var(--gold); height: 0.4em; display: block; }
.pullquote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.7rem, 4.5vw, 3.2rem); line-height: 1.22; color: var(--teal); letter-spacing: -0.01em; }
.pullquote cite { display: block; font-style: normal; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin-top: 30px; }

/* ---------- STAT GRID / BAND ---------- */
.statband.section { background: linear-gradient(180deg, #f6f1e6, var(--paper)); }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.statgrid .cell { background: var(--paper); padding: clamp(22px, 3vw, 40px) clamp(18px, 2.4vw, 30px); }
.statgrid .num { font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 3.4rem); color: var(--teal); line-height: 1; letter-spacing: -0.02em; }
.statgrid .lab { font-size: 13px; color: var(--ink-soft); margin-top: 11px; line-height: 1.4; }

/* ---------- SDG ---------- */
.sdg-target { display: grid; gap: 18px; }
.sdg-target.sdg-2col { grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.sdg-target .goal { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: start; }
.sdg-target .goal img { width: 54px; height: 54px; border-radius: 3px; }
.sdg-target .goal .t { font-size: 14px; line-height: 1.46; }
.sdg-target .goal .t b { font-family: var(--serif); color: var(--teal); font-weight: 500; display: block; margin-bottom: 0.25em; font-size: 16px; }

/* ---------- KPI TABLES (glance / detail / indicator) ---------- */
.kpi-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kpi-table th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; padding: 0 8px 11px; border-bottom: 1.5px solid var(--ink); }
.kpi-table td { padding: 11px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.kpi-table .theme { font-family: var(--serif); color: var(--teal); padding-right: 18px; }
.kpi-table .status { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.5em; vertical-align: middle; }
.dot.green { background: #4a7c3f; } .dot.amber { background: var(--gold); } .dot.empty { background: transparent; border: 1.5px solid var(--line); }
.statuskey { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 20px; font-size: 13px; color: var(--ink-soft); }
.statuskey span { display: inline-flex; align-items: center; }

.dot.rag-achieved, .dot.rag-ontrack, .dot.rag-risk, .dot.rag-tbd { width: 12px; height: 12px; margin: 0; }
.dot.rag-achieved { background: #2f7d4f; }
.dot.rag-ontrack  { background: #8aab3d; }
.dot.rag-risk     { background: #cf8a2a; }
.dot.rag-tbd      { background: transparent; border: 1.5px solid #b6ac99; box-sizing: border-box; }
.kpi-table td.status.rag { text-align: center; }

/* KPI-at-a-glance two-column layout */
.kpi-glance__cols { display: flex; gap: 40px; align-items: stretch; margin-top: 1.4rem; }
.kpi-glance__cols .kpi-table { flex: 1 1 auto; }
.rag-key { flex: 0 0 270px; background: var(--cream-solid); border-radius: 4px; padding: 26px 26px; display: flex; flex-direction: column; }
.rag-key__head { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0 0 18px; }
.rag-key__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.rag-key__list li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; align-items: start; font-size: 13px; line-height: 1.4; color: var(--ink); }
.rag-key__list li .dot { margin-top: 4px; }
.rag-key__list li b { font-family: var(--serif); font-weight: 500; color: var(--teal); display: block; font-size: 14px; line-height: 1.2; margin-bottom: 2px; }
.rag-key__note { margin: auto 0 0; padding-top: 18px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; line-height: 1.55; color: var(--ink-soft); border-top: 1px solid var(--line); }

/* detail (Section X) — larger and airier on web */
.kpi-table.kpi-detail { font-size: 13px; margin-top: 14px; }
.kpi-table.kpi-detail th { font-size: 9px; padding: 0 8px 9px; }
.kpi-table.kpi-detail td { padding: 9px 8px; }
.kpi-table.kpi-detail .kd-theme { font-family: var(--serif); color: var(--teal); font-size: 15px; border-right: 1px solid var(--line-soft); }
.kpi-table.kpi-detail .kd-kpi { color: var(--ink); padding-right: 14px; border-right: 1px solid var(--line-soft); }
.kpi-table.kpi-detail .kd-sdg { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.kpi-table.kpi-detail .kd-sub { color: var(--ink); }
.kpi-table.kpi-detail .kd-base { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); text-align: center; white-space: nowrap; }
.kpi-table.kpi-detail .kd-num { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--ink); }
.kpi-table.kpi-detail th.kd-num { text-align: right; }
.kpi-table.kpi-detail th.kd-rag, .kpi-table.kpi-detail th.kd-base { text-align: center; }
.kpi-table.kpi-detail .kd-ov { font-weight: 600; color: var(--teal); }
.kpi-table.kpi-detail .kd-ch { color: var(--ink-soft); }
.kpi-table.kpi-detail .kd-span { text-align: left; color: var(--ink-soft); font-style: italic; }
.kpi-table.kpi-detail .kd-dim { color: var(--ink-soft); font-style: italic; }
.kpi-table.kpi-detail .kd-rag { text-align: center; vertical-align: middle; }
.kd-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 18px; font-size: 13px; color: var(--ink-soft); }
.kd-key span { display: inline-flex; align-items: center; gap: 8px; }
.kd-key .kd-key__lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }

/* indicator (Section XI) — larger on web */
.kpi-table.kpi-ind { font-size: 13px; }
.kpi-table.kpi-ind th { font-size: 9px; padding: 9px 8px 8px; border-bottom: 1.5px solid var(--teal); }
.kpi-table.kpi-ind td { padding: 8px; line-height: 1.4; }
.kpi-table.kpi-ind tr.kd-group td { font-family: var(--serif); color: var(--teal); font-size: clamp(1.1rem, 2vw, 1.4rem); padding: 22px 8px 8px; border-bottom: 1px solid var(--line); }
.kpi-table.kpi-ind tr.kd-group:first-child td { padding-top: 4px; }
.kpi-table.kpi-ind .kd-sdg, .kpi-table.kpi-ind .kd-iris { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.kpi-table.kpi-ind .kd-ind { color: var(--ink); font-weight: 500; }
.kpi-table.kpi-ind .kd-cmt { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.kpi-table.kpi-ind .kd-dim { color: var(--ink-soft); font-style: italic; }
/* let the wide tables use full width on the web */
.section .wide:has(.kpi-ind), .section .wide:has(.kpi-detail) { max-width: var(--maxw); }

/* ---------- PANELS / COLS ---------- */
.cols-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
.panel { background: var(--cream-solid); border-radius: 4px; padding: 24px 26px; }
.panel .lab { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.reserved { border: 1px dashed var(--line); border-radius: 4px; padding: 20px 22px; background: rgba(255,255,255,0.4); color: var(--ink-soft); font-family: var(--mono); font-size: 13px; line-height: 1.65; }
.reserved b { color: var(--teal); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; display: block; margin-bottom: 8px; }
ul.body-list { list-style: none; margin: 0 0 0.8em; padding: 0; display: grid; gap: 0.5em; }
ul.body-list li { position: relative; padding-left: 1.1em; }
ul.body-list li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

/* ---------- THEME HEAD ---------- */
.theme-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; border-top: 2px solid var(--ink); padding-top: 16px; }
.theme-head .n { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: var(--gold); }
.theme-head h3 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

/* ---------- CONTENTS ---------- */
.toc { display: grid; gap: 0; }
.toc a { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 16px; align-items: baseline; padding: 16px 8px; border-bottom: 1px solid var(--line-soft); text-decoration: none; transition: background 0.3s, padding 0.3s; }
.toc a:hover { background: var(--cream-solid); padding-left: 16px; }
.toc .rn { font-family: var(--mono); color: var(--gold); font-size: 15px; }
.toc .ti { font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--teal); }
.toc .pg { font-family: var(--mono); font-size: 14px; color: var(--ink-soft); transition: transform 0.3s; }
.toc a:hover .pg { transform: translateX(5px); color: var(--gold); }

/* ---------- BIBLIOGRAPHY ---------- */
.biblio { display: grid; gap: 13px; margin: 0; padding: 0; }
.biblio li { display: grid; grid-template-columns: 2rem 1fr; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--ink); list-style: none; }
.biblio li .rn { font-family: var(--mono); font-size: 12px; color: var(--gold); font-weight: 600; }
.biblio li a.src { color: var(--teal); text-decoration: none; border-bottom: 1px solid var(--line); word-break: break-word; }
.biblio li a.back { color: var(--ink-soft); text-decoration: none; font-family: var(--mono); margin-left: 0.3em; }

/* ---------- COLOPHON ---------- */
.colophon.section { background: var(--midnight); color: rgba(255,255,255,0.82); }
.colophon h2 { color: #fff; }
.colophon .eyebrow { color: var(--gold-bright); }
.colophon a { color: var(--gold-bright); }
.colophon .meta { display: grid; grid-template-columns: max-content 1fr; gap: 10px 30px; font-size: 15px; margin: 8px 0 0; }
.colophon .meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); align-self: center; }
.colophon .meta dd { margin: 0; font-family: var(--serif); color: #fff; }
.colophon .disclaimer { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.65); margin-top: 44px; }
.colophon .disclaimer p { margin: 0 0 0.7em; }

/* ---------- SPLIT PAGE ---------- */
.split-page { display: grid; grid-template-columns: 1fr 0.82fr; gap: clamp(28px, 4.5vw, 60px); align-items: center; }
.split-page.photoR { align-items: start; }
.split-page .col-text > *:first-child { margin-top: 0; }
.split-page .col-text .eyebrow { margin-bottom: 14px; }

.boxout { position: relative; }
.boxout.photo .img { width: 100%; aspect-ratio: 4 / 3; background-size: cover; background-position: center; border-radius: 3px; }
.boxout.photo figcaption { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-top: 12px; line-height: 1.5; }
.boxout.quote { background: var(--cream-solid); border-top: 2px solid var(--gold); padding: 30px 34px 34px; border-radius: 3px; }
.boxout.quote .mark { font-family: var(--serif); font-size: 70px; line-height: 0.45; color: var(--gold); height: 0.45em; display: block; }
.boxout.quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.3; color: var(--teal); letter-spacing: -0.01em; }

/* ---------- TEXT WRAPPING A FLOATED FIGURE ----------
   Body copy is a single flowing block; the figure floats so text wraps beside
   it and continues below — independent of the image's height. */
.imgflow::after { content: ""; display: block; clear: both; }
.imgflow > *:first-child { margin-top: 0; }
.imgflow > .imgflow__fig { float: right; width: min(44%, 505px); margin: 0.35rem 0 1.2rem clamp(28px, 3.5vw, 56px); }
.imgflow > .imgflow__fig.left { float: left; margin: 0.35rem clamp(28px, 3.5vw, 56px) 1.2rem 0; }
.imgflow > .imgflow__quote { float: left; width: min(46%, 380px); margin: 0.4rem clamp(28px, 3.5vw, 56px) 1.2rem 0; }
@media (max-width: 860px) {
  .imgflow > .imgflow__fig, .imgflow > .imgflow__fig.left, .imgflow > .imgflow__quote { float: none; width: 100%; margin: 0 0 1.4rem; }
}

/* ---------- FIGURES ---------- */
.map-fig .img { width: 100%; aspect-ratio: 3 / 2; background-size: cover; background-position: center; border-radius: 3px; }
.map-fig figcaption { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-top: 12px; }
.tall-fig .img { width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; background-size: cover; background-position: center; border-radius: 3px; }
.tall-fig figcaption { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-top: 12px; }
.toc-fig .img { width: 100%; min-height: 320px; background-size: contain; background-repeat: no-repeat; background-position: center; }
figure { margin: 0; }

/* ---------- THEORY OF CHANGE (full-width diagram) ---------- */
.toc-page { display: flex; flex-direction: column; gap: 22px; }
.toc-page > div:first-child { max-width: var(--readw); }
.toc-page .toc-fig { width: 100vw; margin-left: calc(50% - 50vw); padding: 0 clamp(16px, 3vw, 56px); }
.toc-page .toc-fig .img { width: 100%; aspect-ratio: 1628 / 842; min-height: 0; max-height: 86vh; background-size: contain; background-repeat: no-repeat; background-position: center; }

/* ---------- METHODOLOGY TWO-COLUMN BODY ---------- */
.measure-cols { column-count: 2; column-gap: clamp(32px, 4vw, 56px); }
.measure-cols > *:first-child { margin-top: 0; }
.measure-cols p { margin: 0 0 0.7em; }
.measure-cols .h-minor { break-after: avoid; margin-top: 1.1em; }
.measure-cols ul.body-list { break-inside: avoid; margin: 0 0 0.7em; }

/* ---------- CONTINUATION GAPS ----------
   Sections split only for print pagination share a data-section; JS tags the
   pair so they read as one flowing section instead of a double-padded break. */
.section.tight-top { padding-top: 0; }
.section.tight-bottom { padding-bottom: clamp(18px, 3vh, 40px); }

/* ============================================================
   NAVIGATION CHROME
   ============================================================ */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); z-index: 100; transition: width 0.1s linear; }

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  background: rgba(250,247,240,0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transform: translateY(-110%); transition: transform 0.45s cubic-bezier(.16,.84,.44,1);
}
#topbar.show { transform: translateY(0); }
#topbar .tb-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
#topbar .tb-title b { color: var(--teal); font-weight: 600; }
#topbar .tb-current { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 13px; margin-left: 12px; }
#menuBtn { display: inline-flex; align-items: center; gap: 9px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); cursor: pointer; transition: background 0.25s, color 0.25s; }
#menuBtn:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
#menuBtn .bars { display: inline-grid; gap: 3px; }
#menuBtn .bars i { width: 16px; height: 1.5px; background: currentColor; display: block; }

/* overlay menu */
#overlay { position: fixed; inset: 0; z-index: 120; background: rgba(10,35,35,0.97); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.4s; overflow-y: auto; }
#overlay.open { opacity: 1; pointer-events: auto; }
#overlay .ov-inner { max-width: 900px; margin: 0 auto; padding: clamp(60px, 10vh, 120px) var(--pad) 60px; }
#overlay .ov-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 30px; }
#overlay .ov-head span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-bright); }
#ovClose { background: none; border: 0; color: rgba(255,255,255,0.7); font-size: 30px; line-height: 1; cursor: pointer; transition: color 0.2s, transform 0.3s; }
#ovClose:hover { color: #fff; transform: rotate(90deg); }
#overlay nav a { display: grid; grid-template-columns: 3rem 1fr auto; gap: 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.12); text-decoration: none; }
#overlay nav a .rn { font-family: var(--mono); color: var(--gold-bright); font-size: 14px; }
#overlay nav a .ti { font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.7rem); color: #fff; transition: color 0.2s, transform 0.3s; }
#overlay nav a .pg { font-family: var(--mono); font-size: 13px; color: rgba(255,255,255,0.45); }
#overlay nav a:hover .ti { color: var(--gold-bright); transform: translateX(8px); }

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s cubic-bezier(.16,.84,.44,1), transform 1s cubic-bezier(.16,.84,.44,1); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }

/* staggered children inside revealed containers */
.statgrid .cell, .toc a, .cols-2 > .panel, .sdg-target > .goal, .kpi-glance__cols > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(.16,.84,.44,1), transform 0.8s cubic-bezier(.16,.84,.44,1);
}
.is-in .cell, .is-in.toc a, .toc.is-in a, .is-in .panel, .is-in .goal, .is-in > * {
  opacity: 1; transform: none;
}
/* the .toc itself carries .reveal; stagger its links */
.toc.is-in a, .statgrid.is-in .cell, .cols-2.is-in > .panel, .sdg-target.is-in > .goal, .kpi-glance__cols.is-in > * { opacity: 1; transform: none; }

/* dark-section entrance: title rises, bg settles */
.divider .divider__inner, .hero .hero__inner { opacity: 0; transform: translateY(40px); transition: opacity 1.1s cubic-bezier(.16,.84,.44,1), transform 1.1s cubic-bezier(.16,.84,.44,1); }
.divider.is-in .divider__inner, .hero.is-in .hero__inner { opacity: 1; transform: none; }
.divider.is-in .divider__bg, .hero.is-in .hero__bg { animation: kenburns 14s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }

/* pullquote: mark drops, quote rises, rule draws */
.pullquote .mark { opacity: 0; transform: translateY(-10px) scale(0.7); transition: opacity 0.7s, transform 0.7s cubic-bezier(.34,1.56,.64,1); }
.pullquote blockquote { opacity: 0; transform: translateY(28px); transition: opacity 1s 0.15s cubic-bezier(.16,.84,.44,1), transform 1s 0.15s cubic-bezier(.16,.84,.44,1); }
.pullquote.is-in .mark { opacity: 1; transform: none; }
.pullquote.is-in blockquote { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .divider .divider__inner, .hero .hero__inner, .pullquote .mark, .pullquote blockquote,
  .statgrid .cell, .toc a, .cols-2 > .panel, .sdg-target > .goal, .kpi-glance__cols > * {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .divider.is-in .divider__bg, .hero.is-in .hero__bg { animation: none !important; }
  .cover__scroll::after { animation: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .split-page, .split-page.photoR, .split-page.map { grid-template-columns: 1fr; gap: 28px; }
  .split-page .boxout, .split-page figure { order: 2; }
  .cols-2 { grid-template-columns: 1fr !important; }
  .measure-cols { column-count: 1; }
  .sdg-target.sdg-2col { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
  .kpi-glance__cols { flex-direction: column; gap: 24px; }
  .rag-key { flex-basis: auto; }
  /* dense tables scroll horizontally on small screens */
  .wide:has(.kpi-ind), .wide:has(.kpi-detail) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kpi-ind, .kpi-detail { min-width: 720px; }
  #topbar .tb-current { display: none; }
}
@media (max-width: 540px) {
  .statgrid { grid-template-columns: 1fr; }
  .cover__brand span { display: none; }
}
