/* AfriRadar. House system: full-bleed bands, 1280px measure, oversized uppercase display
   type, hard edges, hairline grids. Brand green carries the bands; gold sits behind black text. */
:root {
  --max: 1280px;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --sec: clamp(3rem, 7vw, 6rem);
  --brand: #0b5d3b;
  --brand-dark: #073d27;
  --gold: #f2b705;
  --ink: #0d0d0c;
  --paper: #f4f1e8;
  --white: #fff;
  --line: #d8d3c4;
  --muted: #5c5a52;
  --up: #0b6b3a;
  --down: #b42318;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 10; padding: .6rem 1rem; background: var(--gold); color: var(--ink); }
.skip:focus { left: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 900px; }
.band { padding: var(--sec) 0; }
.band--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.band--brand { background: var(--brand); color: var(--white); }
.band--ink { background: var(--ink); color: var(--white); }
.band--paper { background: var(--paper); }

.eyebrow { margin: 0 0 .9rem; font-size: .72rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; }
.h-xl { margin: 0 0 1.25rem; font-size: clamp(2.6rem, 7vw, 6.25rem); line-height: .94; font-weight: 900; letter-spacing: -.025em; text-transform: uppercase; overflow-wrap: anywhere; }
.h-xl--fund { font-size: clamp(2rem, 5vw, 4.25rem); }
.h-l { margin: 0 0 1.5rem; font-size: clamp(1.8rem, 4vw, 3.1rem); line-height: 1; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.h-m { margin: 0 0 1rem; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.1; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.section-gap { margin-top: 3rem; }
.lead { max-width: 58rem; margin: 0 0 1.25rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; }
.small { font-size: .875rem; color: var(--muted); }
.source { margin: 0; font-size: .9rem; }
.more { font-size: .85rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--white); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-top: 1rem; padding-bottom: 1rem; }
.logo { margin: 0; font-size: 1.2rem; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; text-decoration: none; }
.logo span { margin-left: .06em; padding: 0 .25em; background: var(--gold); color: var(--ink); }
.site-head nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-head nav a { padding: .35rem 0; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }

/* buttons */
.btn { display: inline-block; margin: .25rem .6rem .25rem 0; padding: .8rem 1.2rem; border: 2px solid var(--ink); background: var(--ink); color: var(--white); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.btn:hover { background: var(--white); color: var(--ink); }
.btn--quiet { background: transparent; color: var(--ink); }
.btn--quiet:hover { background: var(--ink); color: var(--white); }
.btn--light { border-color: var(--white); background: var(--white); color: var(--brand-dark); }
.btn--light:hover { background: transparent; color: var(--white); }
.btn--ghost { border-color: var(--white); background: transparent; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--brand-dark); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2rem; }
.stats p { margin: 0; }
.stat { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; letter-spacing: -.02em; line-height: 1; overflow-wrap: anywhere; }
.stat-label { margin-top: .5rem !important; color: rgba(255, 255, 255, .78); font-size: .95rem; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--paper); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 3px solid var(--gold); }
th[aria-sort="ascending"] button::after { content: " \2191"; }
th[aria-sort="descending"] button::after { content: " \2193"; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover { background: #faf8f2; }
td a { font-weight: 700; }
.manager { color: var(--muted); font-size: .85rem; }
.up { color: var(--up); }
.down { color: var(--down); }
.mark { color: var(--muted); }

/* category cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.card { position: relative; display: block; padding: 1.6rem; background: var(--white); text-decoration: none; }
.card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.card:hover::before, .card:focus-visible::before { transform: scaleX(1); }
.card h3 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 900; text-transform: uppercase; }
.card p { margin: 0; color: var(--muted); }

/* charts */
figure { margin: 0; }
figcaption { margin-bottom: .5rem; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.two-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 2rem; }
.chart { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--white); }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 12px var(--font); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-dot, .chart .end-dot { fill: var(--brand); }
.chart-phone { display: none; }
@media (max-width: 600px) {
  .chart-desktop { display: none; }
  .chart-phone { display: block; }
}

/* pages */
.crumbs { margin-bottom: 1.5rem; font-size: .85rem; color: var(--muted); }
.prose { max-width: 48rem; }
.prose h2 { margin: 2.5rem 0 .75rem; font-size: 1.5rem; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.prose p, .prose li { line-height: 1.7; }
.notice { margin: 0; padding: 1rem 1.25rem; border-left: 4px solid var(--gold); background: var(--paper); }

/* footer */
.site-foot { padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; background: var(--ink); color: var(--white); }
.site-foot .small { color: rgba(255, 255, 255, .72); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.site-foot nav { display: flex; flex-direction: column; gap: .5rem; }
.foot-note { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .2); }

@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; }
  th, td { padding: .55rem .6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-head nav, .site-foot, .btn { display: none; } }
