/* Shared styles for the Convergence table and Country wiki pages.
   Follows the snapshot's OCHA look: Roboto / Roboto Condensed, OCHA blues, white ground. */
:root {
  --ink: #1A1A1A;
  --ink-2: #404040;
  --muted: #595959;
  --rule: #D9D9D9;
  --rule-soft: #F2F2F2;
  --brand: #00529C;
  --brand-ink: #0074B7;
  --brand-deep: #004987;
  --panel: #F4F8FB;
  --bg: #ffffff;
  --drier: #ED1847;
  --mixed: #FFC800;
  --wetter: #00529C;
  --none: #BFBFBF;
  --head: 'Roboto Condensed', 'Roboto', Arial, sans-serif;
  --body: 'Roboto', Arial, sans-serif;
}
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); }
a { color: var(--brand-ink); }
a:hover { color: var(--brand-deep); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.page-main { max-width: 1360px; margin: 0 auto; padding: 20px 24px 32px; box-sizing: border-box; display: flex; flex-direction: column; gap: 48px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; border-bottom: 1px solid #000; padding-bottom: 6px; }
.sec-head h2 { margin: 0; font: 700 23.5px/1.15 var(--head); letter-spacing: 0.04em; text-transform: uppercase; }
.sec-head span { font-size: 14.5px; color: var(--muted); }
.lede { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.eyebrow { font: 700 13.5px/1.2 var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* Chips and badges */
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid #BFBFBF; background: #fff; color: var(--ink); font: 500 14px/1.2 var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.chip .dot { width: 12px; height: 12px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.chip .count { font-family: var(--head); font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; font: 700 13px/1.2 var(--head); letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
/* Concern, 3FS and pathway colours follow the snapshot's Section B tables. */
.badge.t1 { background: #ED1847; color: #fff; }
.badge.t2 { background: #F58220; color: #fff; }
.badge.t3 { background: #FFC800; color: #1A1A1A; }
.fs3b { display: inline-flex; align-items: center; justify-content: center; min-width: 74px; padding: 3px 8px; font: 700 13px/1.2 var(--head); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.fs3b.vh { background: #ED1847; color: #fff; } .fs3b.h { background: #F58220; color: #fff; } .fs3b.e { background: #FFC800; color: #1A1A1A; } .fs3b.nd { background: #E5E5E5; color: #595959; }
.pathl { font: 700 13.5px/1.25 var(--head); letter-spacing: 0.04em; text-transform: uppercase; }
.pathl.conv { color: #ED1847; } .pathl.me { color: #666666; } .pathl.later { color: #C86200; } .pathl.climate { color: #0074B7; }
.badge.t0 { background: #E0E0E0; color: #333; }
.wave { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; line-height: 1.3; }
.wave i { flex: none; width: 12px; height: 12px; margin-top: 2px; border: 1px solid rgba(0,0,0,.12); }
.wave.drier i { background: var(--drier); }
.wave.mixed i { background: var(--mixed); }
.wave.wetter i { background: var(--wetter); }
.wave.none i { background: #fff; border-color: var(--none); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink); }
.legend .wave { font-size: 13.5px; }
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid #C5DFEF; background: #F4F8FB; color: var(--brand-deep); font-size: 13.5px; text-decoration: none; }
.tag:hover { border-color: var(--brand-ink); color: var(--brand-deep); background: #E6F2FA; }
.tag .n { margin-left: 6px; font-family: var(--head); font-weight: 700; color: var(--brand-ink); }

/* Form controls */
.controls { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font: 700 12.5px/1.2 var(--head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select { min-height: 44px; padding: 0 10px; border: 1px solid #BFBFBF; background: #fff; color: var(--ink); font: 15px var(--body); box-sizing: border-box; max-width: 100%; }
.field input[type="search"] { width: 260px; }
.btn-link { min-height: 44px; padding: 0 12px; border: 1px dashed #BFBFBF; background: transparent; color: var(--ink-2); font: 500 14px var(--body); cursor: pointer; }

/* Convergence table */
.summary-row { display: flex; flex-wrap: wrap; gap: 8px; }
.table-wrap { overflow-x: auto; border-top: 2px solid #000; }
table.conv { width: 100%; min-width: 1120px; border-collapse: collapse; font-size: 14px; }
.conv th { position: sticky; top: 0; background: #fff; z-index: 1; text-align: left; vertical-align: bottom; padding: 10px 8px; border-bottom: 1px solid #000; font: 700 13px/1.2 var(--head); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.conv th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.conv th button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.conv th .arrow { font-size: 11px; color: var(--muted); }
.conv th[aria-sort="ascending"] .arrow::after { content: "▲"; color: var(--ink); }
.conv th[aria-sort="descending"] .arrow::after { content: "▼"; color: var(--ink); }
.conv th:not([aria-sort]) .arrow::after { content: "↕"; }
.conv td { padding: 10px 8px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.conv tr.region-row td { background: var(--panel); font: 700 14px/1.2 var(--head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-deep); padding: 8px; border-bottom: 1px solid #C5DFEF; }
.conv tr.row:hover td { background: #FAFCFE; }
.conv tr.row.target td { background: #FFF8D6; }
.conv .country { display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.conv .country a { font-weight: 700; font-size: 15px; text-decoration: none; }
.conv .country a:hover { text-decoration: underline; }
.conv .country span { font-size: 12.5px; color: var(--muted); }
.conv .expand { margin-top: 4px; align-self: flex-start; min-height: 28px; padding: 0 8px; border: 1px solid var(--rule); background: #fff; color: var(--brand-ink); font: 500 12.5px var(--body); cursor: pointer; }
.conv .num { font-family: var(--head); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conv .fs3 { font-family: var(--head); font-weight: 700; white-space: nowrap; }
.conv tr.detail td { background: #FBFDFE; border-bottom: 1px solid var(--rule); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px 28px; padding: 4px 0 8px; font-size: 14px; line-height: 1.45; }
.detail-grid h4 { margin: 0 0 4px; font: 700 12.5px/1.2 var(--head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.detail-grid ol { margin: 0; padding-left: 18px; }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }

/* Wiki */
.wiki { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.wiki-side { flex: 1 1 260px; max-width: 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.wiki-main { flex: 999 1 560px; min-width: 0; }
.wiki-side .field input { width: 100%; }
.tree { display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.tree details { border-bottom: 1px solid var(--rule-soft); }
.tree summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 40px; font: 700 14.5px/1.2 var(--head); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::after { content: "+"; font-size: 18px; color: var(--brand-ink); }
.tree details[open] > summary::after { content: "−"; }
.tree .sub { margin: 2px 0 8px; }
.tree .sub-title { display: block; padding: 6px 0 2px; font: 700 12.5px/1.2 var(--head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.tree .sub-title:hover { color: var(--brand-ink); }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree li a { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 6px; color: var(--ink); text-decoration: none; }
.tree li a:hover { background: var(--panel); color: var(--brand-deep); }
.tree li a[aria-current="page"] { background: #E6F2FA; color: var(--brand-deep); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.tree .dot { width: 10px; height: 10px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.side-links { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.side-links a { text-decoration: none; }

.crumbs { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.article-head { display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid #000; padding-bottom: 12px; margin-bottom: 18px; }
.article-head h2 { margin: 0; font: 700 40px/1.05 var(--head); text-transform: uppercase; color: var(--brand); text-wrap: balance; }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Infobox comes first in the markup: right-hand column on desktop, above the text on a phone. */
.article-body { display: flex; flex-direction: row-reverse; flex-wrap: wrap; justify-content: flex-end; gap: 28px; align-items: flex-start; }
.prose { flex: 999 1 420px; min-width: 0; font-size: 16px; line-height: 1.6; color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose h3 { margin: 22px 0 8px; font: 700 18px/1.2 var(--head); letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-deep); }
.prose .lead { font-size: 17.5px; line-height: 1.5; color: var(--ink-2); }
.prose a.wl { text-decoration: none; border-bottom: 1px solid #9CCDEB; }
.prose a.wl:hover { border-bottom-color: var(--brand-deep); }
.infobox { flex: 1 1 300px; max-width: 360px; min-width: 0; border: 1px solid #C5DFEF; background: var(--panel); font-size: 14px; }
.infobox h3 { margin: 0; padding: 10px 14px; background: var(--brand-deep); color: #fff; font: 700 15px/1.2 var(--head); letter-spacing: 0.05em; text-transform: uppercase; }
.infobox dl { margin: 0; padding: 4px 14px 12px; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0 12px; }
.infobox dt, .infobox dd { padding: 8px 0; border-bottom: 1px solid #DDEAF3; margin: 0; }
.infobox dt { font: 700 12.5px/1.3 var(--head); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.infobox dd { display: flex; flex-direction: column; gap: 6px; }
.infobox .fuelbar { display: grid; grid-template-columns: 58px minmax(0, 1fr) 54px; gap: 6px; align-items: center; font-size: 12.5px; }
.infobox .fuelbar span.bar { display: block; height: 10px; background: #fff; border: 1px solid #DDEAF3; }
.infobox .fuelbar span.bar b { display: block; height: 100%; }
.infobox .fuelbar .v { font-family: var(--head); font-weight: 700; text-align: right; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px 20px; margin: 0 0 20px; }
.fig { border-top: 3px solid var(--brand); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.fig b { font: 700 32px/1 var(--head); color: var(--brand-deep); }
.fig span { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.block { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.block h3 { margin: 0; font: 700 15.5px/1.2 var(--head); letter-spacing: 0.05em; text-transform: uppercase; padding-bottom: 4px; border-bottom: 1px solid var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); background: #fff; }
.card:hover { border-color: var(--brand-ink); }
.card .t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font: 700 17px/1.2 var(--head); color: var(--brand-ink); }
.card p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.card .why { font-size: 12.5px; color: var(--muted); }
.stub { padding: 12px 14px; border-left: 3px solid #BFBFBF; background: #FAFAFA; color: var(--ink-2); font-size: 14.5px; }

@media (max-width: 720px) {
  .article-head h2 { font-size: 30px; }
  .wiki-side { max-width: none; }
  .field input[type="search"] { width: 100%; }
  .controls .field { flex: 1 1 100%; }
}

/* Sources page */
.src-toc { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.src-toc a { text-decoration: none; font-weight: 500; }
.src-toc a:hover { text-decoration: underline; }
.src-page { display: flex; flex-direction: column; gap: 4px; scroll-margin-top: 12px; }
.src-page > h2 { margin: 8px 0 4px; font: 700 23.5px/1.15 var(--head); letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid #000; padding-bottom: 6px; }
.src-page > h2 a { color: inherit; text-decoration: none; }
.src-page > h2 a:hover { color: var(--brand-ink); }
.src-item { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 4px 28px; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); scroll-margin-top: 12px; }
.src-item:target { background: #FFF8D6; }
.src-item h3 { margin: 0; font: 700 15.5px/1.3 var(--head); letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-deep); }
.src-item .src-body { grid-column: 2; display: flex; flex-direction: column; gap: 8px; }
.src-item .src-body > :only-child, .src-item h3 + .src-body { grid-column: 2; }
.src-item > .src-body:first-child { grid-column: 1 / -1; }
.src-body, .src-body [style] { font-size: 15px !important; line-height: 1.55 !important; color: #1A1A1A !important; }
.src-body p { margin: 0; }
.src-body code { font-size: 13.5px; background: #F2F2F2; padding: 1px 4px; }
@media (max-width: 720px) { .src-item { grid-template-columns: minmax(0, 1fr); } .src-item .src-body { grid-column: 1; } }

/* Thematic and Preparedness pages (Sections D and E of the snapshot) */
.sec-label { display: inline-block; align-self: flex-start; padding: 4px 10px; background: var(--brand-deep); color: #fff; font: 700 13px/1.3 var(--head); letter-spacing: 0.14em; text-transform: uppercase; }
.page-intro { display: flex; flex-direction: column; gap: 10px; }
.page-intro h3 { margin: 0; font: 700 24px/1.2 var(--head); letter-spacing: 0.02em; text-transform: uppercase; color: var(--brand-deep); }
.big-fig { display: flex; gap: 18px; align-items: center; padding: 18px 22px; background: #EAF3FA; }
.big-fig svg { flex: none; color: var(--brand); }
.big-fig b { display: block; font: 700 44px/1 var(--head); color: var(--brand); }
.big-fig p { margin: 6px 0 0; font-size: 15.5px; line-height: 1.5; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 28px 36px; }
.icard { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #000; padding-top: 12px; min-width: 0; }
.icard h4 { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 15.5px/1.25 var(--head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-ink); }
.icard h4 svg { flex: none; color: var(--brand); }
.icard p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.callout { margin: 0; padding: 16px 20px; background: #EAF3FA; border-left: 3px solid var(--brand); font-size: 16px; line-height: 1.55; }
.from-countries { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 0 48px; }
.from-countries > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.from-countries a { font: 700 16px/1.3 var(--head); text-decoration: none; }
.from-countries p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.spot { display: flex; flex-direction: column; gap: 10px; }
.spot h4 { margin: 0; font: 700 19px/1.2 var(--head); }
.spot p { margin: 0; font-size: 15.5px; line-height: 1.55; }
@media (max-width: 640px) { .from-countries > div { grid-template-columns: minmax(0, 1fr); } .big-fig b { font-size: 36px; } }

/* Convergence page: "Convergence of pressures" (report Section B opening) */
.press { display: flex; flex-direction: column; gap: 18px; }
.press-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 20px 32px; align-items: start; }
.press-col { border-top: 2px solid #000; padding-top: 14px; }
.press-col h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 700 21px/1.1 var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: #C86200; }
.press-col h3 svg { flex: none; color: #C86200; }
.press-col p { margin: 0; font-size: 16px; line-height: 1.5; }
.t2 { display: flex; flex-direction: column; margin-top: 8px; }
.t2-title { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 2px solid #000; font: 700 15px/1.2 var(--head); letter-spacing: 0.16em; text-transform: uppercase; color: #C86200; }
.t2-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 8px 32px; align-items: center; padding: 9px 0; border-bottom: 2px solid #E6E6E6; font-size: 17px; line-height: 1.45; }
.t2-badge { display: flex; align-items: center; justify-content: center; min-height: 34px; padding: 4px 10px; font: 700 15px/1.2 var(--head); letter-spacing: 0.04em; text-transform: uppercase; text-align: center; }
.t2-note { margin: 10px 0 0; font-size: 14.5px; line-height: 1.45; color: #595959; }
@media (max-width: 640px) { .t2-row { grid-template-columns: minmax(0, 1fr); } .t2-badge { justify-self: start; } }

/* Country impact: climate risk by wave in the Section B wording */
.sbw { display: flex; flex-direction: column; gap: 3px; margin: 0 0 8px; }
.sbw:last-child { margin-bottom: 0; }
.sbw > b { font: 700 13px/1.2 var(--head); letter-spacing: 0.04em; text-transform: uppercase; }
.sbi { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 7px; align-items: baseline; font-size: 14px; line-height: 1.4; }
.sbi i { display: inline-block; width: 11px; height: 11px; transform: translateY(1px); }
.sbi.lv-imm i { background: #ED1847; }
.sbi.lv-high i { background: #F58220; }
.sbi.lv-elev i { background: #FFC800; }
.sbi.lv-wet i { background: #0074B7; }
.sbi.lv-none i { height: 2px; background: #808080; transform: translateY(-3px); }
