/* M28 Investigates · v0.5 · data graphics (brief §2.7): maps, timeline strips, relationship diagrams, bars.
   Drawn by lib/viz.py as inline SVG. Land in charcoal tints (dark) or warm-grey tints (light); the countries M28 has
   reported from in red, deeper with more stories; names in the UI face at 13 px or more. */

/* ---------------------------------------------------------------- the palette of a map, per surface */
:root, .s-light { --mp-out: #EAE8E2; --mp-0: #D9D7D2; --mp-1: #CF8C8E; --mp-2: #BD6265; --mp-3: #A72D32; --mp-4: #751F23; --mp-line: #FFFFFF; --mp-water: var(--bg); --mp-hover: #15191D; --mp-plate: #15191D; --mp-plate-line: #15191D; }
.s-grey { --mp-out: #F5F4F1; --mp-0: #D9D7D2; --mp-line: #EAE8E2; }
.s-dark, :root[data-surface="dark"], :root[data-theme="night"], :root[data-theme="night"] .s-light, :root[data-theme="night"] .s-grey {
  --mp-out: #1E2226; --mp-0: #313538; --mp-1: #751F23; --mp-2: #8E262B; --mp-3: #A72D32; --mp-4: #BD6265; --mp-line: #15191D; --mp-water: var(--bg); --mp-hover: #FFFFFF; --mp-plate: #0D0F11; --mp-plate-line: #505356; }

/* ---------------------------------------------------------------- the map of Africa */
.mp { width: 100%; height: auto; overflow: visible; }
.mp__c { fill: var(--mp-out); stroke: var(--mp-line); stroke-width: .9; vector-effect: non-scaling-stroke; }
.mp__c--ssa { fill: var(--mp-0); transition: fill .2s; }
.mp__c--l1 { fill: var(--mp-1); } .mp__c--l2 { fill: var(--mp-2); } .mp__c--l3 { fill: var(--mp-3); } .mp__c--l4 { fill: var(--mp-4); }
.mp__lake { fill: var(--mp-water); stroke: none; pointer-events: none; }
.mp a:hover .mp__c, .mp a:focus-visible .mp__c, .mp a.is-on .mp__c { fill: var(--mp-hover); }
.mp a:focus-visible { outline: none; }
.mp a:focus-visible .mp__c { stroke: var(--head); stroke-width: 2.5; }
.mp__c--focus { fill: var(--mp-3); stroke: var(--head); stroke-width: 1.8; }
.mp__ring { fill: none; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.mp__pin circle { fill: var(--red); stroke: var(--white); stroke-width: 2; }
.mp__pin text { font: 600 12px var(--f-mono); fill: var(--white); pointer-events: none; }
/* name plates on a map. Smaller since 25 Nov 2026 (36 countries carry one, not 13; lib/viz.py, PLATES): 14.5 map
   units for the name and 13 for the number. They are shown from 896 px up, where the map is at its full width and
   the names are 13 px and more; below that the list beside the map carries the names */
.mp__plates { display: none; }
@media (min-width: 56em) { .mp--labels .mp__plates { display: block; } }
.mpl rect { fill: var(--mp-plate); stroke: var(--mp-plate-line); stroke-width: 1; transition: fill .2s; }
.mpl__n { font: 600 14.5px var(--f-ui); fill: var(--white); }
.mpl__c { font: 500 13px var(--f-mono); fill: var(--red-t45); }
.mpl__lead { stroke: var(--head); stroke-width: 1.2; opacity: .7; }
.mpl__dot { fill: var(--white); stroke: var(--charcoal); stroke-width: 1.5; }
.mpl:hover rect, .mpl.is-on rect { fill: var(--red); stroke: var(--red); }
.mpl:hover .mpl__c, .mpl.is-on .mpl__c { fill: var(--white); }
.mp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; font: 500 var(--t-mono)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.mp-legend span { display: inline-flex; align-items: center; gap: .5rem; }
.mp-legend i { width: 1rem; height: 1rem; }
.mp-legend .lv0 { background: var(--mp-0); } .mp-legend .lv1 { background: var(--mp-1); } .mp-legend .lv2 { background: var(--mp-2); } .mp-legend .lv3 { background: var(--mp-3); } .mp-legend .lv4 { background: var(--mp-4); }
.mp-tip { position: absolute; z-index: 5; pointer-events: none; display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .75rem; background: var(--white); color: var(--charcoal); font: 600 .875rem/1.2 var(--f-ui); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); border-top: var(--bar) solid var(--red); box-shadow: 0 .75rem 1.5rem -.75rem var(--charcoal-d2); }
.mp-tip b { font: 500 var(--t-mono) var(--f-mono); color: var(--red); }
.mp-wrap { position: relative; }

/* ---------------------------------------------------------------- small story maps: the shapes are defined once per page
   (lib/viz.small_defs) and reused; the countries of the story are red, the places are dots */
.mapdefs { position: absolute; width: 0; height: 0; overflow: hidden; }
.mb path { fill: var(--mp-0); stroke: var(--mp-edge, var(--mp-line)); stroke-width: .6; }
.mb .mb__lake { fill: var(--mp-water); stroke: none; }
.mp--ctx, .mp--scene { overflow: hidden; }
.mp__on { fill: var(--mp-2); stroke: var(--mp-edge, var(--mp-line)); stroke-width: .6; transition: fill .3s; }
.mp__on.is-on { fill: var(--mp-3); }
.cx__name, .cx__num { display: none; font: 600 6px var(--f-ui); fill: var(--head); paint-order: stroke; stroke: var(--bg); stroke-width: 2px; }
.cx__dot circle { fill: var(--head); stroke: var(--bg); stroke-width: 1.5; }
.cx__dot.is-on circle { fill: var(--white); stroke: var(--red); stroke-width: 2; }
.cx__cur { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; transition: transform .5s var(--ease), opacity .3s; }
.cx__cur.is-on { opacity: 1; }
/* the large dark map: scenes on story pages, project maps, the Evidence Room */
.mp--scene { display: block; width: 100%; height: auto; max-height: 82vh; background: var(--charcoal-d2); --mp-0: #25292D; --mp-2: #751F23; --mp-3: #A72D32; --mp-edge: #0D0F11; --mp-water: #0D0F11; --head: var(--white); --bg: #0D0F11; }
.mp--scene .cam { transform-box: view-box; transform-origin: 0 0; transition: transform .9s var(--ease); }
.mp--scene .cx__dot circle { fill: var(--white); stroke: var(--charcoal-d2); stroke-width: 1; }
.mp--scene .cx__dot.is-on circle { fill: var(--white); stroke: var(--red-t25); stroke-width: 1.6; }
.mp--scene .cx__num { display: block; font: 500 7px var(--f-mono); fill: var(--white); stroke: var(--charcoal-d2); }
.mp--scene .cx__name { display: block; fill: var(--grey); stroke: var(--charcoal-d2); }
.mp--scene .is-on .cx__name { fill: var(--white); }
.scene.is-live .cx__name { display: none; }
.scene.is-live .is-on .cx__name { display: block; }
.mp--scene .cx__cur { stroke-width: 1.2; }

/* ---------------------------------------------------------------- the ranked list beside a map or chart: the figure in red */
.rank { counter-reset: r; font: 600 1rem/1.3 var(--f-ui); border-top: var(--bar) solid var(--accent); }
.rank li { counter-increment: r; display: grid; grid-template-columns: 2.1rem 1fr auto; align-items: baseline; gap: .5rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); color: var(--head); }
.rank li::before { content: counter(r, decimal-leading-zero); font: 400 var(--t-mono)/1 var(--f-mono); color: var(--ink-3); }
.rank a:hover, .rank a.is-on { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .22em; }
.rank b { font: 700 1.375rem/1 var(--f-serif); color: var(--accent-ink); font-feature-settings: "lnum"; }

/* ---------------------------------------------------------------- timeline strip */
.tls { width: 100%; height: auto; }
.tls__axis { stroke: var(--line-2); stroke-width: 2; }
.tls__tick { stroke: var(--line-2); stroke-width: 1.5; }
.tls__year { font: 500 13px var(--f-mono); fill: var(--ink-2); letter-spacing: .04em; }
.tls__dot { fill: var(--head); }
.tls__dot--last { fill: var(--accent); stroke: var(--head); stroke-width: 1.5; }

/* ---------------------------------------------------------------- a consortium: the hub and its outlets, every name written out.
   Two drawings (lib/viz.hub_graph): one for wide screens, one for phones */
.rg { width: 100%; height: auto; }
.rg--tall { display: none; }
.rg__e { stroke: var(--line-2); stroke-width: 1.25; }
.rg__e--mark { stroke: var(--accent); stroke-width: 2.5; }
.rg__n { fill: var(--head); }
.rg__n--mark { fill: var(--red); stroke: var(--head); stroke-width: 2; }
.rg__hub { fill: var(--bg); stroke: var(--head); stroke-width: 2; }
.rg__hubc { fill: var(--accent); }
.rg__plate { fill: var(--bg); }
.rg__hubt { font: 700 15px var(--f-ui); fill: var(--head); }
.rg__t { font: 500 15px var(--f-ui); fill: var(--ink); }
.rg--tall .rg__t { font-size: 14px; }
.rg--tall .rg__hubt { font-size: 15px; }
.rg__t--mark { font-weight: 700; fill: var(--head); }
@media (max-width: 47.99em) { .rg--wide { display: none; } .rg--tall { display: block; } }

/* ---------------------------------------------------------------- bars */
.bars { width: 100%; height: auto; }
.bars__k { font: 600 14px var(--f-ui); fill: var(--ink); }
.bars__b { fill: var(--red); }
.bars__v { font: 500 13px var(--f-mono); fill: var(--head); }
