/* FLSRI public site — design system
   Re-skin (2026-06-02): cartographic research dashboard, not a marketing site.
   Reference: flsri-geospatial-overlay.html (the project's reference overlay).
   System fonts (NOT Inter); quiet neutral chrome (#f7f7f5 panels, #ddd hairlines,
   #222 ink); small-uppercase grey section labels; ~2px radius; no drop-shadows.
   Colour lives in the DATA — ColorBrewer sequential ramps on the choropleths +
   legends. The chrome stays out of the way so the maps carry the eye. */

/* Warm editorial nudge (2026-06-02): chrome warmed toward a paper-and-ink palette and
   Source Serif 4 brought into display headings, matching the project's house typography —
   while keeping the tight cartographic structure, uppercase section labels and data ramps. */
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap");

:root {
  /* ---- warm paper-and-ink chrome (the project's house palette) ---- */
  --ink: #1a1814;            /* near-black warm ink */
  --ink-soft: #43403a;
  --ink-faint: #5c564b;      /* taupe */
  --paper: #fcfcfd;          /* neutral near-white — content background */
  --paper-2: #f4f5f7;        /* panel / utility background */
  --paper-3: #eceef1;        /* inset / hover */
  --line: #e6e7ea;           /* hairline */
  --line-strong: #d6d8dd;    /* panel borders */
  --map-bg: #eceef1;         /* map canvas behind tiles */

  /* accent stays muted. Risk colour is reserved for the DATA ramp, not the UI.
     A muted editorial blue carries interactive chrome; rust is the warm emphasis. */
  --accent: #5b2414;         /* rust — only on data-adjacent emphasis */
  --accent-soft: #8a4a36;
  --ui: #4a453d;             /* neutral ink-taupe for chrome (de-blued — blue was taking over) */
  --ui-soft: #8b857a;        /* soft neutral for secondary chrome */
  --link: #4f6f93;           /* keep a TOUCH of blue, only on links/interactive accents */

  --flag: #8a6d00;           /* DRAFT / provisional flag */
  --flag-bg: #f7efd8;
  --flag-line: #e3d4a6;

  --max: 1080px;
  --max-wide: 1340px;
  --radius: 2px;

  /* Sequential risk ramp (light -> dark = low -> high).
     ColorBrewer YlOrRd-family, colour-blind-safe. THIS is where colour lives. */
  --r0: #fff7ec; --r1: #fde0c5; --r2: #fdbf8f; --r3: #f99858;
  --r4: #ef7128; --r5: #d24f12; --r6: #a8320a; --r7: #781d07;
  --nodata: #e2dccf;

  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- type: small, tight, editorial. Display headings in serif; section labels stay quiet ---- */
h1, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 600; line-height: 1.22; }
h1 { font-size: 1.62rem; font-weight: 700; letter-spacing: -0.005em; margin: 0 0 0.4em; }
h2 {
  font-family: var(--sans);
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); margin: 2.4em 0 0.9em; padding-bottom: 0.5em; border-bottom: 1px solid var(--line);
}
h3 { font-size: 1.06rem; font-weight: 600; margin: 1.6em 0 0.4em; }
h4 { font-size: 0.92rem; font-weight: 600; margin: 0 0 0.3em; }
p { margin: 0 0 0.9em; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
strong { font-weight: 650; }
small { font-size: 0.85rem; color: var(--ink-faint); }
code { font-family: var(--mono); font-size: 0.86em; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.05em 0.35em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 22px; }
.lede { font-family: var(--serif); font-size: 1.12rem; line-height: 1.55; color: var(--ink-soft); max-width: 70ch; }
.muted { color: var(--ink-faint); }
.center { text-align: center; }

/* ---- header / nav: a thin utility bar, not a marketing header ---- */
/* Header sits above the full-bleed Explore map overlays + Leaflet panes/controls (which reach
   ~600-1000). Because the sticky header forms its own stacking context, its z-index must clear
   those layers so the nav "Explore"/"About" submenus are not hidden behind the map. */
.site-header { border-bottom: 1px solid var(--line-strong); background: var(--paper-2); position: sticky; top: 0; z-index: 1100; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; padding: 9px 22px; max-width: var(--max-wide); margin: 0 auto; }
.brand { font-weight: 700; font-size: 0.86rem; color: var(--ink); margin-right: auto; letter-spacing: 0.02em; text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand small { display: block; font-weight: 500; font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-top: 1px; }
.nav a.navlink { font-size: 0.78rem; color: var(--ink-soft); padding: 3px 0; text-decoration: none; }
.nav a.navlink:hover { color: var(--ui); text-decoration: none; }
.nav a.navlink[aria-current="page"] { color: var(--ui); font-weight: 650; }

/* grouped nav: 4 top-level items + dropdown submenus */
.navgroup { position: relative; display: inline-flex; align-items: center; }
.navgroup > .navtop { font: inherit; font-size: 0.78rem; color: var(--ink-soft); background: none; border: 0; padding: 3px 0; cursor: pointer; line-height: 1.2; }
.navgroup > .navtop .caret { font-size: 0.7em; opacity: 0.55; margin-left: 2px; }
.navgroup:hover > .navtop, .navgroup.open > .navtop, .navgroup.active > .navtop { color: var(--ui); }
.navgroup .submenu { position: absolute; top: 100%; right: 0; left: auto; margin-top: 6px; min-width: 184px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20,16,12,.10); padding: 5px 0; display: none; z-index: 2000; }
.navgroup .submenu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; } /* invisible hover bridge across the gap */
.navgroup:hover .submenu, .navgroup:focus-within .submenu, .navgroup.open .submenu { display: block; }
.submenu .subitem { display: block; padding: 7px 16px; white-space: nowrap; font-size: 0.82rem; color: var(--ink); text-decoration: none; }
.submenu .subitem:hover, .submenu .subitem[aria-current="page"] { background: var(--paper-3); color: var(--ui); text-decoration: none; }

/* desktop: the links sit in a horizontal row to the right of the brand; the
   burger is hidden until the mobile breakpoint below takes over. */
.navlinks { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.nav-burger { display: none; }

/* ---- mobile nav: disclosure (burger) menu + accordion submenus ----
   Below this width the horizontal bar would wrap and the absolute submenus clip
   off-screen. The burger toggles .nav-open to drop a full-width vertical list, and
   each submenu renders as a static, left-bordered accordion instead of a dropdown. */
@media (max-width: 640px) {
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 34px; margin-left: 8px; padding: 0;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--paper); color: var(--ink); font-size: 1.05rem; line-height: 1; cursor: pointer;
  }
  .nav-burger::before { content: "\2630"; } /* ☰ */
  .nav-burger[aria-expanded="true"]::before { content: "\2715"; } /* ✕ */
  .navlinks { display: none; flex-basis: 100%; width: 100%; margin-top: 6px; }
  .nav.nav-open .navlinks { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .navlinks > .navlink { display: block; width: 100%; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 0.92rem; }
  .navgroup { display: block; width: 100%; }
  .navgroup > .navtop { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 0.92rem; }
  /* submenu becomes a static accordion, never the absolute dropdown */
  .navgroup .submenu, .navgroup:hover .submenu, .navgroup:focus-within .submenu {
    position: static; display: none; box-shadow: none; border: 0; border-radius: 0;
    min-width: 0; margin: 0 0 4px 8px; padding: 0; background: transparent;
    border-left: 2px solid var(--line-strong);
  }
  .navgroup.open .submenu { display: block; }
  .navgroup.open > .navtop .caret { transform: rotate(180deg); }
  .submenu .subitem { white-space: normal; padding: 9px 14px; font-size: 0.88rem; }
}

/* ---- LISA cluster legend swatches (HH/LL/HL/LH palette) ---- */
.swatch-lisa { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line-strong); vertical-align: -1px; margin-right: 4px; border-radius: var(--radius); }
.lisa-hh { background: #b2182b; } /* High-High — high-risk belt */
.lisa-ll { background: #2166ac; } /* Low-Low — cold belt */
.lisa-hl { background: #f4a582; } /* High-Low — hidden hotspot */
.lisa-lh { background: #92c5de; } /* Low-High — relief pocket */
.lisa-ns { background: #e6e7ea; } /* Not significant */

/* ---- hero: compact editorial intro, NOT a centered marketing hero ---- */
.hero { padding: 30px 0 14px; }
.hero h1 { max-width: 26ch; font-size: clamp(1.5rem, 3.2vw, 2rem); }
.kicker { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin: 0 0 10px; }

/* ---- provisional flag ---- */
.flag {
  display: inline-block; font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--flag);
  background: var(--flag-bg); border: 1px solid var(--flag-line); border-radius: var(--radius);
  padding: 2px 8px; vertical-align: middle;
}
.flag-note { background: var(--flag-bg); border: 1px solid var(--flag-line); border-left: 3px solid var(--flag); border-radius: var(--radius); padding: 12px 16px; font-size: 0.9rem; color: #6e5400; margin: 1.2em 0; }
.flag-note strong { color: var(--flag); }

/* ---- callout / note ---- */
.note { background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 18px; margin: 1.3em 0; }
.note.tight { padding: 10px 14px; font-size: 0.92rem; }

/* ---- takeaways: tight bordered cells, no shadow, thin top rule ---- */
.takeaways { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line-strong); border-radius: var(--radius); grid-template-columns: repeat(3, 1fr); margin: 24px 0; overflow: hidden; }
.takeaway { background: var(--paper); border-top: 2px solid var(--accent); padding: 18px 18px 20px; }
.takeaway h3 { margin: 0.2em 0 0.4em; font-size: 0.98rem; }
.takeaway p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.takeaway .num { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.04em; margin: 0; }

/* ---- three-part frame ---- */
.frame { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line-strong); border-radius: var(--radius); grid-template-columns: repeat(3, 1fr); margin: 20px 0; overflow: hidden; }
.frame .step { padding: 16px 18px; background: var(--paper); }
.frame .step .stage { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
/* role-colored variants (points of intervention): bind the three roles to their colors */
.frame .step-drv { border-top: 2px solid #a8320a; } .frame .step-drv .stage { color: #a8320a; }
.frame .step-dis { border-top: 2px solid #46663c; } .frame .step-dis .stage { color: #46663c; }
.frame .step-mod { border-top: 2px solid #2166ac; } .frame .step-mod .stage { color: #2166ac; }
.frame .step h3 { margin: 5px 0 0.3em; font-size: 0.98rem; }
.frame .step p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ---- maps: the centerpiece. Tight chrome, the canvas dominates ---- */
.map-shell { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); overflow: hidden; margin: 16px 0; }
.map-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line-strong); background: var(--paper-2); }
.map-bar .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.map-bar .seg button { font-family: var(--sans); font-size: 0.78rem; border: 0; border-right: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft); padding: 5px 12px; cursor: pointer; }
.map-bar .seg button:last-child { border-right: 0; }
.map-bar .seg button[aria-pressed="true"] { background: var(--ui); color: #fff; }
.map-bar .seg button:disabled { color: var(--ink-faint); cursor: not-allowed; opacity: 0.55; }
.map-title { font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: #555; margin-right: auto; }
.map-canvas { width: 100%; height: 560px; background: var(--map-bg); }
.map-canvas.tall { height: 640px; }
.map-canvas.xtall { height: 720px; background: #0e0d0b; }

/* the subnational surface is the headline view — give it a touch more presence */
.map-feature { border-color: var(--ink-faint); box-shadow: 0 1px 0 var(--line-strong); }
.map-inset-note {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  color: #f2ece0; background: rgba(26,24,20,0.78); border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius); padding: 4px 9px;
}
.jump-link {
  display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--ui);
  border-bottom: 1px solid var(--ui-soft); padding-bottom: 1px;
}
.jump-link:hover { color: var(--accent); text-decoration: none; }
.leaflet-container { background: var(--map-bg) !important; font-family: var(--sans); font-size: 11px; }
.leaflet-bar a { border-radius: 0 !important; }

/* corridor permanent labels: clean text over the map, no tooltip chrome */
.leaflet-tooltip.corridor-label { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; white-space: nowrap;
  font: 600 11px/1 var(--sans); color: #1b4f86; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; }
.leaflet-tooltip.corridor-label.corridor-dem { color: #a02b1c; }
.leaflet-tooltip.corridor-label::before { display: none; }

/* glossary popovers: click any [data-gloss] term for a short definition, its
   theoretical foundation, and the data source behind it. */
.has-gloss { cursor: help; }
.gloss-link { cursor: help; border-bottom: 1px dotted var(--ink-faint); }
.gloss-link:hover, .gloss-link:focus { border-bottom-color: var(--ui); color: var(--ui); }
.gloss-i { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px;
  margin-left: 5px; border-radius: 50%; border: 1px solid currentColor; opacity: 0.72; color: var(--ui);
  font: 700 9px/1 var(--sans); font-style: italic; vertical-align: middle; }
.has-gloss:hover .gloss-i, [data-gloss]:hover .gloss-i, [data-gloss]:focus .gloss-i { opacity: 0.95; }
[data-gloss]:focus-visible { outline: 2px solid var(--ui); outline-offset: 2px; border-radius: var(--radius); }
.gloss-pop { position: fixed; z-index: 9000; width: 300px; max-width: calc(100vw - 16px);
  max-height: calc(100vh - 20px); overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20,16,10,0.18); padding: 13px 15px 14px; }
.gloss-pop .gloss-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink-faint); padding: 2px 4px; }
.gloss-pop .gloss-x:hover { color: var(--ink); }
.gloss-pop .gloss-kind { margin: 0 0 2px; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ui); font-weight: 700; }
.gloss-pop .gloss-term { margin: 0 0 6px; font-size: 0.98rem; padding-right: 16px; }
.gloss-pop .gloss-def { margin: 0 0 8px; font-size: 0.82rem; line-height: 1.45; color: var(--ink); }
.gloss-pop .gloss-row { margin: 0 0 6px; font-size: 0.76rem; line-height: 1.45; color: var(--ink-faint); }
.gloss-pop .gloss-row:last-child { margin-bottom: 0; }
.gloss-pop .gloss-lab { display: block; font-size: 0.6rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin-bottom: 1px; }
.gloss-pop .gloss-cite { display: block; margin-top: 3px; font-size: 0.72rem; line-height: 1.35; color: var(--ink-faint); padding-left: 10px; text-indent: -10px; }
.gloss-pop .gloss-cite i { font-style: italic; }

/* accessibility: skip-to-content link + visible keyboard focus */
.skip-link { position: fixed; left: 8px; top: -50px; z-index: 10000; background: var(--ui); color: #fff;
  padding: 9px 14px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 650; text-decoration: none;
  transition: top 0.12s ease; }
.skip-link:focus { top: 8px; outline: 2px solid #fff; outline-offset: 1px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ui); outline-offset: 2px; border-radius: 3px;
}

/* domain radar (country profile): structural shape at a glance */
.radar-wrap { width: 100%; max-width: 560px; margin: 4px auto 2px; }
.radar-svg { width: 100%; height: auto; display: block; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-spoke { stroke: var(--line); stroke-width: 1; }
.radar-spoke-lens { stroke-dasharray: 2 2; opacity: 0.7; }
.radar-area { fill-opacity: 0.30; stroke-width: 1.5; stroke-linejoin: round; }
.radar-dot { fill: #1a1814; }
.radar-dot-lens { fill: var(--paper); stroke: #1a1814; stroke-width: 1.2; }
.radar-dot-na { fill: var(--paper); stroke: var(--ink-faint); stroke-width: 1; stroke-dasharray: 2 1.4; }
.radar-axis { font: 600 9.5px/1.05 var(--sans); fill: var(--ink-faint); }
.radar-axis-lens { font-style: italic; opacity: 0.85; }
.radar-axis.has-gloss { cursor: help; }
.radar-axis.has-gloss:hover { fill: var(--ui); }
.radar-scale { font: 600 8px var(--mono); fill: var(--ink-faint); opacity: 0.65; }

/* simulation page — per-country domain sliders */
.sim-domains { margin-top: 2px; }
.sim-dom-group { margin: 0 0 6px; }
.sim-dom-head-lbl { margin: 8px 0 4px; font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.sim-dom { margin: 0 0 7px; }
.sim-dom-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.78rem; line-height: 1.2; }
.sim-dom-val { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); white-space: nowrap; }
.sim-dom-was { color: var(--ui); }
.sim-dom input[type="range"] { width: 100%; margin: 3px 0 0; }
.sim-dom-na { opacity: 0.5; }
.sim-dom-na .sim-dom-top { font-style: italic; }

/* map quick-look popup (country peek) */
.peek-popup .leaflet-popup-content-wrapper { background: var(--paper); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 10px 30px rgba(20,16,10,0.2); }
.peek-popup .leaflet-popup-content { margin: 12px 14px; font-family: var(--sans); }
.peek-popup .leaflet-popup-tip { background: var(--paper); border: 1px solid var(--line-strong); }
.peek-head { font-size: 0.96rem; color: var(--ink); }
.peek-head .peek-iso { color: var(--ink-faint); font-size: 0.74rem; font-family: var(--mono); margin-left: 3px; }
.peek-score { font: 700 1.5rem/1 var(--mono); margin: 5px 0 2px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.peek-score .tier { font: 600 0.62rem/1 var(--sans); }
.peek-meta { font-size: 0.72rem; color: var(--ink-faint); margin-bottom: 8px; }
.peek-bars { display: flex; flex-direction: column; gap: 4px; margin-bottom: 7px; }
.peek-bar { display: flex; align-items: center; gap: 7px; font-size: 0.74rem; }
.peek-bar .pb-l { width: 12px; color: var(--ink-faint); font-weight: 700; }
.peek-bar .pb-track { flex: 1; height: 6px; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.peek-bar .pb-fill { display: block; height: 100%; background: var(--accent); }
.peek-bar .pb-v { width: 30px; text-align: right; font-family: var(--mono); color: var(--ink-soft); }
.peek-lead { margin: 6px 0 8px; font-size: 0.76rem; color: var(--ink-soft); line-height: 1.4; }
.peek-link { display: inline-block; font-size: 0.82rem; font-weight: 650; color: var(--ui); text-decoration: none; }
.peek-link:hover { color: var(--accent); }
/* compact popup for the secondary map layers (subnational / corridors / clusters) */
.peek-min .leaflet-popup-content { margin: 10px 13px; }
.peek-min .pk-t { font-size: 0.92rem; font-weight: 650; color: var(--ink); line-height: 1.25; }
.peek-min .pk-sub { font-size: 0.7rem; color: var(--ink-faint); font-family: var(--mono); margin-top: 1px; }
.peek-min .pk-row { font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; }
.peek-min .pk-row .v { font-family: var(--mono); color: var(--ink); font-weight: 600; }
.peek-min .pk-row .muted { color: var(--ink-faint); }
.peek-min .pk-note { font-size: 0.75rem; color: var(--ink-faint); margin-top: 6px; line-height: 1.4; }

/* simulation page: draggable what-if radar */
.sim-radar-block { margin: 0 0 18px; }
.sim-radar-block h3 { margin: 0 0 2px; }
.sim-radar-wrap { width: 100%; max-width: 470px; margin: 0 auto; }
.sim-rh { cursor: grab; touch-action: none; transition: r 0.08s; }
.sim-rh:hover { fill: var(--accent); r: 7.5; }
.sim-rh:active { cursor: grabbing; }
.sim-radar-cap { text-align: center; margin-top: 0; }
table.rank tr.sim-gap td { text-align: center; color: var(--ink-faint); letter-spacing: 4px; padding: 1px 0; }
table.rank tr.sim-me td { background: var(--paper-3); font-weight: 600; }
/* simulation page: full-field position strip (where the country lands among all scored) */
.sim-strip { margin: 12px 0 0; }
.sim-strip .strip-track { position: relative; height: 24px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.sim-strip .strip-tick { position: absolute; top: 5px; height: 14px; width: 1px; background: var(--ink-faint); opacity: 0.28; }
.sim-strip .strip-mk { position: absolute; top: 1px; height: 22px; }
.sim-strip .strip-base { border-left: 2px dashed var(--ink-faint); }
.sim-strip .strip-sim { border-left: 3px solid var(--accent); }
.sim-strip .strip-cap { display: flex; justify-content: space-between; gap: 10px; font-size: 0.72rem; color: var(--ink-faint); margin: 4px 0 0; }
.sim-strip .strip-now { text-align: center; }
.sim-strip .strip-now b { color: var(--ink); }

/* legend: compact, 12px swatches, mono numbers — a cartographic legend */
.legend { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 9px 14px; border-top: 1px solid var(--line-strong); font-size: 0.76rem; color: var(--ink-soft); background: var(--paper-2); }
.legend .ramp { display: flex; height: 11px; overflow: hidden; width: 200px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.legend .ramp span { flex: 1; }
.legend .swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line-strong); vertical-align: -1px; margin-right: 4px; border-radius: var(--radius); }

/* map tooltip — quiet neutral dark, square-ish, no big shadow */
.map-tip { position: absolute; pointer-events: none; z-index: 600; background: #2a2a2a; color: #f2f2f2; font-size: 0.8rem; line-height: 1.4; padding: 7px 10px; border-radius: var(--radius); max-width: 250px; box-shadow: 0 2px 8px rgba(0,0,0,0.18); opacity: 0; transition: opacity 0.08s; border: 1px solid #000; }
.map-tip b { color: #fff; }
.map-tip .v { color: #fdbf8f; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.map-tip .muted { color: #aaa; }
.map-tip .draftline { color: #e3c45a; font-size: 0.72rem; margin-top: 3px; }

/* empty / staged slot */
.slot-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 36px; text-align: center; color: var(--ink-faint); background: repeating-linear-gradient(45deg, #f3f3f1, #f3f3f1 12px, #ededeb 12px, #ededeb 24px); }
.slot-empty h3 { color: var(--ink-soft); }
.slot-empty p { max-width: 46ch; font-size: 0.92rem; }

/* ---- country panel ---- */
.country-panel { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); padding: 0; margin: 16px 0; }
.cp-head { padding: 14px 18px; border-bottom: 1px solid var(--line-strong); background: var(--paper-2); display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cp-head h2 { margin: 0; font-size: 1.05rem; text-transform: none; letter-spacing: 0; border: 0; padding: 0; color: var(--ink); }
.cp-score { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.cp-rank { font-size: 0.82rem; color: var(--ink-faint); }
.cp-body { padding: 16px 18px; }
.cp-bars { margin: 6px 0 14px; }
.bar-row { display: grid; grid-template-columns: 220px 1fr 50px; gap: 12px; align-items: center; margin: 7px 0; font-size: 0.86rem; }
.bar-track { height: 10px; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bar-fill { height: 100%; background: var(--r4); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); color: var(--ink-soft); }

/* ---- per-domain risk circles (country profile breakdown) ---- */
.cp-domains { margin: 10px 0 6px; }
.cp-domains .dom-phase { margin: 16px 0 0; }
.cp-domains .dom-phase:first-child { margin-top: 4px; }
.cp-phase-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.cp-phase-head h4 { margin: 0; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); border: 0; padding: 0; }
.cp-phase-head .phase-note { font-size: 0.74rem; color: var(--ink-faint); }
.cp-phase-head .phase-lens { font-style: italic; }
.dom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px 14px; }
.dom-cell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.dom-disc-wrap { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.dom-disc { border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; transition: transform 0.12s ease; }
.dom-cell:hover .dom-disc { transform: scale(1.06); }
.dom-disc .dom-num { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.dom-disc.dom-na { background: repeating-linear-gradient(45deg, #f1f0ed, #f1f0ed 5px, #e6e4df 5px, #e6e4df 10px); border-style: dashed; }
.dom-disc.dom-na .dom-num { color: var(--ink-faint); font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; }
.dom-label { font-size: 0.74rem; line-height: 1.2; color: var(--ink-soft); max-width: 13ch; }
.dom-label .dom-lc { display: block; font-size: 0.62rem; color: #8a6400; letter-spacing: 0.02em; margin-top: 1px; }
.dom-label .dom-ns { display: block; font-size: 0.62rem; color: var(--ink-faint); letter-spacing: 0.02em; margin-top: 1px; }
.dom-label .dom-mod { display: block; font-size: 0.62rem; color: #5a3e93; letter-spacing: 0.02em; margin-top: 1px; }
.dom-mod-note { font-size: 0.6rem; color: #5a3e93; line-height: 1.3; margin-top: 2px; max-width: 15ch; }
.dom-legend { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 12px 0 2px; font-size: 0.74rem; color: var(--ink-faint); }
.dom-legend .ramp { display: inline-flex; height: 10px; width: 120px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); vertical-align: middle; }
.dom-legend .ramp span { flex: 1; }
.dom-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.dom-legend .lg-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-block; }
.dom-legend .lg-dot.na { background: repeating-linear-gradient(45deg, #f1f0ed, #f1f0ed 4px, #e6e4df 4px, #e6e4df 8px); border-style: dashed; }

select.country-pick { font-family: var(--sans); font-size: 0.88rem; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); min-width: 250px; }

/* ---- tables: real data tables, dense, mono numerics ---- */
table.data { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin: 1.1em 0; }
table.data th, table.data td { text-align: left; padding: 7px 11px; border-bottom: 1px solid var(--line); }
table.data th { font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
table.data th.num { text-align: right; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
table.data tr:hover td { background: var(--paper-2); }

/* ---- rankings table ---- */
.rank-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.rank-search { flex: 1; min-width: 220px; max-width: 380px; font-family: var(--sans); font-size: 0.88rem; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.rank-search:focus { outline: none; border-color: var(--ui); box-shadow: 0 0 0 2px rgba(33,102,172,0.12); }
.rank-count { font-size: 0.8rem; color: var(--ink-faint); }
.table-scroll { max-height: 660px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); }
table.rank { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.rank thead th { position: sticky; top: 0; z-index: 2; background: var(--paper-2); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-strong); font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
table.rank thead th[data-sort] { cursor: pointer; user-select: none; }
table.rank thead th[data-sort]:hover { color: var(--ui); }
table.rank thead th[data-sort]::after { content: "\2195"; opacity: 0.35; margin-left: 4px; font-size: 0.85em; }
table.rank thead th[data-active="asc"]::after { content: "\2191"; opacity: 0.9; }
table.rank thead th[data-active="desc"]::after { content: "\2193"; opacity: 0.9; }
table.rank td { padding: 7px 12px; border-bottom: 1px solid var(--line); }
table.rank td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
table.rank td.name-cell a { color: var(--ink); text-decoration: none; font-weight: 600; }
table.rank td.name-cell a:hover { color: var(--ui); text-decoration: underline; }
table.rank td.soft { color: var(--ink-faint); }
table.rank tbody tr:hover td { background: var(--paper-2); }
table.rank .rank-cell { color: var(--ink-faint); width: 44px; }
table.rank .name-cell .iso { color: var(--ink-faint); font-size: 0.74rem; letter-spacing: 0.03em; margin-left: 4px; font-family: var(--mono); }
table.rank .mini { width: 88px; }
.mini-bar { display: block; height: 8px; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mini-bar span { display: block; height: 100%; }
.sep-row td { background: var(--paper-2); color: var(--ink-faint); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 650; padding: 7px 12px; }
.unscored-row td { color: var(--ink-faint); }
.tier { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; padding: 2px 7px; border-radius: var(--radius); text-transform: uppercase; }
.tier-high { background: #fbe3da; color: #a8320a; }
.tier-mid { background: #fbf0d8; color: #8a6400; }
.tier-low { background: #e7eee4; color: #46663c; }
.tier-none { background: var(--nodata); color: var(--ink-faint); }

/* ---- uncertainty: rank bands, result-class chips, tier headers ---- */
/* borderline tier: the country switched tiers in >30% of perturbed re-scorings */
.tier-borderline { outline: 1.5px dashed currentColor; outline-offset: 1px; }
/* "lower confidence" result class: composite rests on <=9 of 11 domains */
.conf-low { display: inline-block; font-size: 0.62rem; font-weight: 650; letter-spacing: 0.03em; padding: 1px 6px; border-radius: var(--radius); text-transform: uppercase; background: #ece9e0; color: #6b6557; border: 1px dotted #b3ab9a; vertical-align: middle; }
/* small "12–41" band under or beside a rank figure */
.rank-band { display: block; font-size: 0.68em; color: var(--ink-faint); font-weight: 400; font-family: var(--mono); letter-spacing: 0; }
.rank-band-inline { font-size: 0.85em; color: var(--ink-faint); font-weight: 400; }
/* whisker bar: track = rank 1..n, fill = p5..p95, tick = published rank */
.band-bar { position: relative; display: block; height: 8px; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 64px; }
.band-bar .band-fill { position: absolute; top: 0; bottom: 0; background: #d8c9a8; }
.band-bar .band-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: #1a1814; transform: translateX(-50%); }
.tier-head td { background: var(--paper-2); color: var(--ink-faint); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; padding: 6px 12px; border-top: 1px solid var(--line-strong); }
/* profile-panel band block */
.cp-band { margin: 2px 0 10px; }
.cp-band .band-bar { height: 10px; }
.cp-band-axis { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 0.68rem; margin-top: 2px; }

/* ---- divergence / hidden-risk cards ---- */
.diverge-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin: 18px 0; }
.diverge-card { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px 16px 18px; position: relative; overflow: hidden; }
.diverge-card .dc-flag { font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.diverge-card h3 { margin: 3px 0 1px; font-size: 1.05rem; }
.diverge-card .dc-region { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 14px; }
.diverge-card .dc-scale { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; color: var(--ink-faint); margin: 8px 0; }
.dc-track { flex: 1; height: 10px; background: linear-gradient(90deg, var(--r0), var(--r2), var(--r4), var(--r6)); border: 1px solid var(--line-strong); border-radius: var(--radius); position: relative; }
.dc-nat { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #555; }
.dc-cor { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--accent); }
.dc-fill { position: absolute; top: 0; bottom: 0; left: 0; background: transparent; }
.diverge-card .dc-nums { display: flex; gap: 16px; margin-top: 12px; }
.diverge-card .dc-num b { display: block; font-family: var(--mono); font-size: 1.25rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.diverge-card .dc-num span { font-size: 0.74rem; color: var(--ink-faint); }

/* ---- stat strip ---- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; margin: 22px 0; }
.stat-strip .stat { background: var(--paper); padding: 16px 16px; }
.stat-strip .stat b { display: block; font-family: var(--mono); font-size: 1.6rem; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.stat-strip .stat span { display: block; font-size: 0.78rem; color: var(--ink-faint); margin-top: 6px; }

/* ---- validated badge ---- */
.badge-ok { display: inline-block; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #46663c; background: #e7f0e2; border: 1px solid #c4dab8; border-radius: var(--radius); padding: 2px 8px; vertical-align: middle; }

/* ---- simulator ---- */
.sim-panel { background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px 18px; margin: 16px 0; }
.sim-weight-label { font-size: 0.92rem; color: var(--ink-soft); margin: 0 0 12px; }
.sim-slider-row { display: flex; align-items: center; gap: 14px; }
.sim-slider-row .end { font-size: 0.76rem; color: var(--ink-faint); white-space: nowrap; }
input[type="range"].sim-range { flex: 1; -webkit-appearance: none; appearance: none; height: 5px; border-radius: var(--radius); background: var(--line-strong); outline: none; }
input[type="range"].sim-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ui); border: 2px solid #fff; cursor: pointer; box-shadow: 0 0 0 1px var(--line-strong); }
input[type="range"].sim-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ui); border: 2px solid #fff; cursor: pointer; }
.sim-movers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.mover { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.mover b { display: block; font-size: 0.92rem; }
.mover span { font-size: 0.78rem; }
.up { color: #a8320a; font-weight: 700; }
.down { color: #46663c; font-weight: 700; }
.flat { color: var(--ink-faint); }

/* ---- full simulation page (controls + readout + board): map-dominant, fixed side panel ---- */
.sim-layout { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; margin: 16px 0; }
/* The left controls box must align to the TOP of the right column. The base
   .sim-panel rule carries margin:16px 0, which pushed it ~16px below the right
   column's first card (.sim-readout, margin-top:0). Zero the top margin here so
   both columns start on the same line. */
.sim-layout .sim-panel { position: sticky; top: 60px; margin-top: 0; }
.sim-panel h3 { margin: 0 0 3px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: #555; }
.sim-panel .field { margin: 16px 0; }
.sim-panel .field .fl { display: block; font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin: 0 0 7px; }
.sim-panel select { width: 100%; font-family: var(--sans); font-size: 0.88rem; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
#sim-weight { width: 100%; -webkit-appearance: none; appearance: none; height: 5px; border-radius: var(--radius); background: var(--line-strong); outline: none; margin: 4px 0; }
#sim-weight::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ui); border: 2px solid #fff; cursor: pointer; box-shadow: 0 0 0 1px var(--line-strong); }
#sim-weight::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ui); border: 2px solid #fff; cursor: pointer; }
.sim-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.sim-seg button { font-family: var(--sans); font-size: 0.78rem; border: 0; border-right: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft); padding: 6px 12px; cursor: pointer; }
.sim-seg button:last-child { border-right: 0; }
.sim-seg button[aria-pressed="true"] { background: var(--ui); color: #fff; }
.sim-toggle { display: flex; align-items: flex-start; gap: 8px; font-size: 0.86rem; color: var(--ink-soft); cursor: pointer; }
.sim-toggle input { margin-top: 2px; flex: none; }
.sim-reset { font-family: var(--sans); font-size: 0.8rem; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink-soft); padding: 8px 14px; cursor: pointer; }
.sim-reset:hover { border-color: var(--ui); color: var(--ui); }
.sim-formula { margin-top: 14px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; font-family: var(--mono); }
.sim-formula sup { font-size: 0.72em; }

.sim-readout { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0; margin: 0 0 18px; }
.ro-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line-strong); background: var(--paper-2); }
.ro-head h2 { margin: 0; font-size: 1.05rem; text-transform: none; letter-spacing: 0; border: 0; padding: 0; }
.ro-score { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.sim-arrow { font-size: 0.8rem; font-weight: 700; font-family: var(--mono); }
.sim-arrow.up { color: #a8320a; } .sim-arrow.down { color: #46663c; } .sim-arrow.flat { color: var(--ink-faint); }
.ro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line-strong); }
.ro-grid .cell { background: var(--paper); padding: 13px 18px; }
.ro-grid .cell b { display: block; font-family: var(--mono); font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.ro-grid .cell span { font-size: 0.76rem; color: var(--ink-faint); }
.sim-bars { padding: 14px 18px 18px; }
.sim-bar-row { display: grid; grid-template-columns: 1fr 200px 46px; gap: 12px; align-items: center; margin: 8px 0; font-size: 0.86rem; }
.sim-bar-row .bar-val { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); color: var(--ink-soft); }
.sim-me td { background: var(--paper-2); font-weight: 600; }

/* ---- framework: spine + combine visuals ---- */
.spine { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.spine .node { flex: 1; min-width: 180px; background: var(--paper); border: 1px solid var(--line-strong); border-top: 2px solid var(--ui-soft); border-radius: var(--radius); padding: 14px; }
.spine .node .lvl { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 0.82rem; color: var(--ui); margin-bottom: 7px; }
.spine .node h4 { margin: 0 0 5px; font-size: 0.96rem; }
.spine .node p { margin: 0; font-size: 0.84rem; color: var(--ink-soft); }
.spine .arrow { display: flex; align-items: center; color: var(--line-strong); font-size: 1.3rem; }
.combine-visual { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px; margin: 18px 0; }
.combine-visual .term { text-align: center; }
.combine-visual .term b { display: block; font-family: var(--mono); font-size: 1.35rem; color: var(--ink); }
.combine-visual .term span { font-size: 0.76rem; color: var(--ink-faint); }
.combine-visual .op { font-family: var(--mono); font-size: 1.2rem; color: var(--accent); }

/* ---- "Why it was done this way" expanders ---- */
.why { background: var(--paper); border: 1px solid var(--line-strong); border-left: 3px solid var(--ui-soft); border-radius: var(--radius); margin: 1.2em 0; overflow: hidden; }
.why > summary { cursor: pointer; list-style: none; padding: 11px 16px; font-size: 0.86rem; font-weight: 650; color: var(--ui); display: flex; align-items: center; gap: 8px; }
.why > summary::-webkit-details-marker { display: none; }
.why > summary::before { content: "?"; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; flex: none; border-radius: 50%; background: var(--ui); color: #fff; font-size: 0.72rem; font-weight: 700; }
.why > summary::after { content: "Show"; margin-left: auto; font-size: 0.7rem; font-weight: 600; color: var(--ink-faint); letter-spacing: 0.04em; text-transform: uppercase; }
.why[open] > summary::after { content: "Hide"; }
.why > summary:hover { background: var(--paper-2); }
.why .why-body { padding: 2px 16px 14px; font-size: 0.9rem; color: var(--ink-soft); }
.why .why-body p { margin: 0 0 0.7em; }
.why .why-body p:last-child { margin-bottom: 0; }

/* ---- intervention page ---- */
.lede-tag { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); background: #fbe3da; border-radius: var(--radius); padding: 2px 8px; }
.honest-banner { background: var(--flag-bg); border: 1px solid var(--flag-line); border-left: 3px solid var(--flag); border-radius: var(--radius); padding: 13px 16px; margin: 1.3em 0; }
.honest-banner p { margin: 0; font-size: 0.92rem; color: #5f4a00; }
.honest-banner strong { color: var(--flag); }

.phase-block { border: 1px solid var(--line-strong); border-top: 2px solid #a8320a; border-radius: var(--radius); background: var(--paper); margin: 16px 0; overflow: hidden; }
.phase-block#iv-monetization { border-top-color: #46663c; }
.phase-head { padding: 14px 18px; border-bottom: 1px solid var(--line-strong); background: var(--paper-2); }
.phase-head .axis { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.phase-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 14px; flex-wrap: wrap; }
.phase-w { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.phase-w-lens { color: #46663c; }
.phase-head h3 { margin: 4px 0 1px; font-size: 1.05rem; }
.phase-head p { margin: 3px 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.lever-grid { display: grid; gap: 1px; background: var(--line); grid-template-columns: 1fr 1fr; }
.lever { background: var(--paper); padding: 14px 18px; }
.lever .role { display: inline-block; font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; padding: 2px 7px; border-radius: var(--radius); margin-bottom: 6px; }
.role-mod { background: #e3ecf4; color: #2166ac; }
.role-def { background: #e7f0e2; color: #46663c; }
.role-driver { background: #fbe3da; color: #a8320a; }
.lever h4 { margin: 0 0 4px; font-size: 0.96rem; }
.lever p { margin: 0 0 7px; font-size: 0.86rem; color: var(--ink-soft); }
.lever .actor { font-size: 0.78rem; color: var(--ink-faint); }
.lever .actor b { color: var(--ink-soft); font-weight: 650; }

.actor-key { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 12px 0 4px; font-size: 0.82rem; color: var(--ink-soft); }
.actor-key span { display: inline-flex; align-items: center; gap: 6px; }
.actor-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* intervention country picker */
#iv-readout { margin-top: 14px; }
#iv-readout .iv-card { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0; }
.iv-where { display: grid; gap: 1px; background: var(--line); grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-strong); }
.iv-where .cell { background: var(--paper); padding: 13px 18px; }
.iv-where .cell .lbl { font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.iv-where .cell b { display: block; font-family: var(--mono); font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; margin: 3px 0; }
.iv-where .cell span.sub { font-size: 0.82rem; color: var(--ink-soft); }
.iv-lead { padding: 14px 18px; }
.iv-lead h3 { margin: 0 0 4px; }
.iv-priority { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--radius); }

/* Monetization (Disruptor) lens: per-country read inside the card + global highlight.
   Blue fill (var(--ui)) deliberately differs from the orange risk bars: this is a
   separate lens, not part of the published score. */
.iv-disruptor-read { padding: 14px 18px; border-top: 1px solid var(--line-strong); }
.iv-disruptor-read h4 { margin: 6px 0 9px; font-size: 0.98rem; }
.iv-disruptor-read p { font-size: 0.9rem; color: var(--ink-soft); }
.iv-dz { display: flex; flex-direction: column; gap: 8px; }
.iv-dz-row { display: grid; grid-template-columns: 168px 1fr 44px; gap: 10px; align-items: center; font-size: 0.84rem; }
.iv-dz-lbl { color: var(--ink-soft); }
.iv-dz-track { height: 9px; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.iv-dz-fill { display: block; height: 100%; background: var(--ui); }
.iv-dz-val { text-align: right; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.iv-dz-na .iv-dz-track { background: repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 4px, var(--paper-3) 4px, var(--paper-3) 8px); }
.iv-dz-na .iv-dz-val { font-style: italic; color: var(--ink-faint); }
.iv-disruptor { margin: 16px 0 0; padding: 15px 17px; background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.iv-disruptor h4 { margin: 0 0 4px; font-size: 0.96rem; }
.iv-dz-rank { list-style: none; margin: 6px 0 0; padding: 0; }
.iv-dz-rank li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.iv-dz-rank li:first-child { border-top: 0; }
.iv-dz-rank li > a { color: var(--ink); font-weight: 600; text-decoration: none; }
.iv-dz-rank li > a:hover { color: var(--ui); text-decoration: underline; }
.iv-dz-rank .iv-dz-cmp { font-size: 0.76rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.iv-dz-rank .iv-dz-mean { font-family: var(--mono); font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- full-bleed Explore "the map IS the page" experience ----
   The primary Explore map fills the viewport beneath the sticky header; the title,
   layer toggle, legend, and hover readout float over it as semi-opaque editorial
   cards. Two stacked full-bleed surfaces (country composite + subnational admin-1)
   are toggled in place. A clean slot is reserved for the LISA layer (separate pass). */
.map-page {
  position: relative;
  width: 100%;
  /* viewport minus the sticky header (~41px) */
  height: calc(100vh - 41px);
  min-height: 460px;
  background: var(--map-bg);
  overflow: hidden;
}
/* the full-bleed Explore canvas fills the map-page box directly */
.map-canvas-full { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--map-bg); }
.explore-body main { /* let the page scroll normally; the map-page is the first, full-height block */ }
/* floating layer-aux line + hover readout */
.mo-layers .ml-aux { margin: 9px 0 0; font-size: 0.74rem; color: var(--ink-faint); max-width: 210px; line-height: 1.35; }
.map-page.on-dark .mo-layers .ml-aux { color: #b8b2a5; }
.mo-hover {
  position: absolute; z-index: 650; pointer-events: none; max-width: 250px;
  padding: 8px 11px; font-size: 0.8rem; line-height: 1.42; color: var(--ink);
  background: rgba(252,252,253,0.97); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: 0 2px 10px rgba(26,24,20,0.18);
}
.mo-hover b { color: var(--ink); }
.mo-hover .v { font-family: var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.mo-hover .muted { color: var(--ink-faint); }
.mo-legend .legend { gap: 7px 12px; }
.mo-legend .legend span { white-space: nowrap; }

.map-page .map-surface { position: absolute; inset: 0; }
.map-page .map-surface .map-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.map-page .map-surface[hidden] { display: none; }
/* subnational surface sits on the dark base */
.map-page .map-surface.is-dark { background: #0e0d0b; }

/* floating overlay panels — the warm-editorial card, semi-opaque, blue accent */
.map-overlay {
  position: absolute; z-index: 600;
  pointer-events: none; /* text cards don't block map clicks/popups; controls re-enable below */
  background: rgba(252, 252, 253, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(26, 24, 20, 0.14);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
/* only the interactive overlay bits capture pointer events */
.mo-layers, .map-overlay a, .map-overlay button, .mo-legend .lg-locate { pointer-events: auto; }
/* dark-variant overlay for the subnational (dark base) surface */
.map-page.on-dark .map-overlay {
  background: rgba(20, 18, 15, 0.82);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}
.map-page.on-dark .map-overlay,
.map-page.on-dark .map-overlay .mo-sub,
.map-page.on-dark .map-overlay .ml-toggle .lbl { color: #ece6d9; }
.map-page.on-dark .map-overlay h1 { color: #faf8f3; }
.map-page.on-dark .legend { background: transparent; border: 0; color: #d8d2c5; }

/* top-left title + caption card */
.mo-title { top: 16px; left: 16px; max-width: 440px; padding: 14px 18px 15px; transition: opacity 0.16s ease; }
/* while a map popup is open, the title card steps aside so it never collides with it */
.map-page.popup-open .mo-title { opacity: 0; pointer-events: none; }
.mo-title .kicker { margin: 0 0 4px; color: var(--ui); }
.map-page.on-dark .mo-title .kicker { color: var(--ui-soft); }
.mo-title h1 { font-size: 1.18rem; margin: 0 0 6px; line-height: 1.18; }
.mo-title .mo-sub { font-size: 0.82rem; color: var(--ink-soft); margin: 0; line-height: 1.45; }
.mo-title .badge-ok { margin-top: 8px; }

/* top-right layer toggle */
.mo-layers { top: 16px; right: 16px; padding: 12px 14px; }
.mo-layers .ml-head { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin: 0 0 8px; }
.map-page.on-dark .mo-layers .ml-head { color: #b8b2a5; }
.ml-toggle { display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.map-page.on-dark .ml-toggle { border-color: rgba(255,255,255,0.18); }
.ml-toggle button {
  font-family: var(--sans); text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.5); border: 0; border-bottom: 1px solid var(--line);
  padding: 9px 13px; color: var(--ink-soft); font-size: 0.82rem; font-weight: 600;
  display: flex; flex-direction: column; gap: 1px; min-width: 196px;
}
.map-page.on-dark .ml-toggle button { background: rgba(255,255,255,0.06); color: #d8d2c5; border-bottom-color: rgba(255,255,255,0.12); }
.ml-toggle button:last-child { border-bottom: 0; }
.ml-toggle button .lbl-sub { font-size: 0.7rem; font-weight: 400; color: var(--ink-faint); }
.map-page.on-dark .ml-toggle button .lbl-sub { color: #a8a294; }
.ml-toggle button[aria-pressed="true"] { background: var(--ui); color: #fff; }
.ml-toggle button[aria-pressed="true"] .lbl-sub { color: rgba(255,255,255,0.82); }
.ml-toggle button:disabled { cursor: not-allowed; opacity: 0.6; }
.ml-toggle button:disabled .lbl-sub { font-style: italic; }

/* bottom-left legend card (overlaid) */
.mo-legend { bottom: 18px; left: 16px; max-width: 460px; padding: 4px 6px; }
.mo-legend .legend { border: 0; background: transparent; padding: 8px 10px; }
.mo-legend .lg-note { padding: 0 12px 9px; font-size: 0.74rem; color: var(--ink-faint); margin: 0; }
.map-page.on-dark .mo-legend .lg-note { color: #b8b2a5; }
/* clusters legend: rows you can click to locate that cluster on the map */
.mo-legend .lg-row { display: inline-flex; align-items: center; }
.mo-legend .lg-locate { cursor: pointer; }
.mo-legend .lg-locate:hover { text-decoration: underline; text-underline-offset: 2px; }

/* bottom-right region-count inset (subnational) */
.mo-count { bottom: 18px; right: 16px; padding: 9px 13px; font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); }
.map-page.on-dark .mo-count { color: #ece6d9; }

@media (max-width: 860px) {
  /* the full-bleed overlays can't float on a phone; the map-page becomes a simple
     vertical stack. The title leads (orientation + a cue that layers are switchable),
     then the map, then the layer switcher, legend, and region count. */
  .map-page { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .map-page .map-surface { position: relative; height: 64vh; min-height: 360px; }
  /* the full-bleed Explore canvas is .map-canvas-full, not .map-surface — give it a real
     height on mobile too, or it collapses to 0 inside the now-auto-height map-page */
  .map-page .map-canvas-full, #explore-map.map-canvas-full { position: relative; inset: auto; height: 60vh; min-height: 340px; flex: none; }
  .map-page .map-surface[hidden] { display: none; }
  .map-overlay { position: relative; inset: auto; max-width: none; margin: 10px; box-shadow: none; }
  .mo-title, .mo-layers, .mo-legend, .mo-count { top: auto; left: auto; right: auto; bottom: auto; }
  .mo-title { order: -1; margin-bottom: 0; } /* lead with the title, above the map */
}

/* ---- home: "what you'll find here" offer cards ---- */
.offer-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line-strong); border-radius: var(--radius); grid-template-columns: repeat(4, 1fr); margin: 18px 0; overflow: hidden; }
.offer { background: var(--paper); padding: 16px 16px 18px; display: flex; flex-direction: column; }
.offer .of-tag { font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ui); font-weight: 700; margin: 0 0 6px; }
.offer h3 { margin: 0 0 5px; font-size: 0.98rem; }
.offer p { margin: 0 0 10px; font-size: 0.86rem; color: var(--ink-soft); }
.offer a.of-link { margin-top: auto; font-size: 0.78rem; font-weight: 650; color: var(--ui); }
.offer a.of-link:hover { color: var(--accent); }

/* ---- home hero: copy + live map + actions + named findings ---- */
.home-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.home-hero-copy h1 { margin-top: 6px; }
.hero-cta { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 20px; border-radius: var(--radius); font-size: 0.92rem; font-weight: 650; text-decoration: none; transition: background 0.12s, border-color 0.12s; }
.btn-primary { background: var(--ui); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ui); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ui); }
.home-hero-map { position: relative; }
.home-map-badge { position: absolute; top: 8px; right: 8px; z-index: 500; background: rgba(252,252,253,0.92); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 2px 9px; font-size: 0.6rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 700; color: var(--ui); pointer-events: none; }
.home-map { width: 100%; height: 330px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--map-bg); }
.home-map .leaflet-container { background: var(--map-bg); cursor: pointer; }
.home-map-cap { margin: 8px 0 0; font-size: 0.78rem; color: var(--ink-faint); }
.home-findings { display: grid; grid-template-columns: auto auto 1fr; gap: 14px 30px; margin: 28px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.home-findings .hf { display: flex; flex-direction: column; gap: 3px; }
.home-findings .hf-k { font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ui); font-weight: 700; }
.home-findings .hf-v { font-size: 0.92rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.home-findings .hf-wide .hf-v { color: var(--ink-soft); font-size: 0.85rem; line-height: 1.42; font-variant-numeric: normal; }
.offer-grid-5 { grid-template-columns: repeat(5, 1fr); }
.re-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin: 14px 0; }
.re-cell { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
.re-cell b { display: block; margin-bottom: 4px; font-size: 0.9rem; }
.re-cell span { font-size: 0.84rem; color: var(--ink-soft); }
.re-op { align-self: center; font-size: 1.3rem; color: var(--ink-faint); }
@media (max-width: 860px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .home-map { height: 260px; }
  .home-findings { grid-template-columns: 1fr; gap: 14px; }
  .offer-grid-5 { grid-template-columns: 1fr 1fr; }
  .re-pair { grid-template-columns: 1fr; }
  .re-op { display: none; }
}
@media (max-width: 560px) { .offer-grid-5 { grid-template-columns: 1fr; } }

/* ---- home: concealment / "missing" concept beat ---- */
.concept-beat { background: var(--paper-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--ui-soft); border-radius: var(--radius); padding: 18px 22px; margin: 22px 0; }
.concept-beat p { margin: 0 0 0.7em; font-size: 0.96rem; color: var(--ink-soft); }
.concept-beat p:last-child { margin-bottom: 0; }
.concept-beat strong { color: var(--ink); }

/* ---- home: findings-first headline figure row ---- */
.find-lead { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start; margin: 16px 0; }
@media (max-width: 860px) { .find-lead { grid-template-columns: 1fr; } .offer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .offer-grid { grid-template-columns: 1fr; } }
.find-side h3 { margin-top: 0; }
.find-side .fs-list { list-style: none; padding: 0; margin: 0; }
.find-side .fs-list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-soft); }
.find-side .fs-list li:last-child { border-bottom: 0; }
.find-side .fs-list b { color: var(--ink); }

/* ---- generic section spacing ---- */
section.block { padding: 12px 0; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line-strong); margin-top: 48px; padding: 26px 0 40px; background: var(--paper-2); color: var(--ink-soft); font-size: 0.86rem; }
.site-footer a { color: var(--link); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.footer-note { font-size: 0.82rem; color: var(--ink-faint); }

/* ---- responsive ---- */
@media (max-width: 860px) {
  body { font-size: 13px; }
  .takeaways, .frame, .footer-grid, .diverge-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .map-canvas { height: 60vh; min-height: 340px; }
  .bar-row { grid-template-columns: 130px 1fr 44px; }
  .nav { gap: 5px 14px; }
  .hero { padding: 22px 0 12px; }
  table.rank .soft, table.rank .mini { display: none; }
  .sim-movers { grid-template-columns: 1fr; }
  .sim-layout { grid-template-columns: 1fr; }
  /* phones: lead with the outputs (score readout, then the draggable radar right
     below it so a drag updates the score in view), then the map and ranking, and
     put the tall controls panel last instead of stacking ~1700px of sliders first. */
  .sim-panel { position: static; order: 2; }
  .ro-grid { grid-template-columns: 1fr; }
  .sim-bar-row { grid-template-columns: 1fr 120px 42px; }
  /* fatten the draggable radar handles for fingers (the drag projects onto the
     spoke once grabbed, so only the initial touch needs to land on the dot) */
  .sim-rh { r: 11; }
  /* stack the spine vertically; centre the (now downward) arrows. Without
     flex-direction:column the arrows stretch to the node-row height, and
     rotating a tall box 90deg blows its width out past the viewport. */
  .spine { flex-direction: column; align-items: stretch; }
  .spine .node { min-width: 0; }
  .spine .arrow { transform: rotate(90deg); justify-content: center; align-self: center; }
  .lever-grid { grid-template-columns: 1fr; }
  .iv-where { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav .brand small { display: none; }
}

/* points of intervention: model diagram (the score drawn as a literal equation).
   Two hand-laid variants: .ivd-d (wide, horizontal equation) and .ivd-m
   (stacked, for narrow viewports) — SVG text doesn't reflow, so the swap
   happens at the width where the desktop labels would shrink past legibility. */
.iv-diagram svg { width: 100%; height: auto; display: block; }
.iv-diagram svg text { font-family: var(--sans); }
.iv-diagram .ivd-m { display: none; max-width: 460px; margin: 0 auto; }
@media (max-width: 820px) {
  .iv-diagram .ivd-d { display: none; }
  .iv-diagram .ivd-m { display: block; }
}
.iv-figcap { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-faint); max-width: 78ch; }
/* hovering one lever family quiets the other two */
.ivd .fam { transition: opacity 0.15s ease; }
.ivd:has(.fam:hover) .fam:not(:hover) { opacity: 0.35; }
/* the proceeds line drifts toward the lens — off for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .ivd .flow { animation: ivd-flow 1.6s linear infinite; }
}
@keyframes ivd-flow { to { stroke-dashoffset: -18; } }
.lever-viz { margin: 2px 0 9px; }
.lv-row { display: flex; align-items: center; gap: 7px; margin: 3px 0; font-size: 0.74rem; color: var(--ink-faint); }
.lv-lbl { flex: 0 0 auto; max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-track { flex: 1; height: 8px; background: var(--paper-3); border-radius: 4px; overflow: hidden; }
.lv-fill { display: block; height: 100%; }
.lv-val { min-width: 2.6em; text-align: right; font-variant-numeric: tabular-nums; }
.lv-na { font-style: italic; }
.lv-pill { font-size: 0.66rem; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 6px; white-space: nowrap; }
.lv-pill-top { border-color: #d9a18c; background: #fbe3da; color: #a8320a; font-weight: 650; }

/* points of intervention: "what would move the score" table.
   The bar is sensitivity of the composite, not a forecast — keep it in the
   drivers' rust so it reads as part of the model, not as a new data series. */
.lev-ph { display: inline-block; font: 700 0.62rem/1.5 var(--sans); letter-spacing: 0.03em; padding: 0 6px; border-radius: var(--radius); margin-left: 4px; vertical-align: 1px; }
.lev-ph-R { background: #fbe3da; color: #a8320a; }
.lev-ph-E { background: #a8320a; color: #fff; }
.lev-bar { display: flex; align-items: center; gap: 0.55em; }
.lev-track { flex: 1; height: 10px; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lev-fill { height: 100%; background: #a8320a; }
.lev-delta { min-width: 4.4em; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.rank tr.lev-top td { background: rgba(168, 50, 10, 0.04); }
table.rank tr.lev-top td:nth-child(2) { font-weight: 600; }
.table-scroll { overflow-x: auto; } /* narrow screens: scroll, never clip */
@media (max-width: 640px) {
  /* phones: the rank shift is the headline — drop the composite column and
     keep a readable bar (the exact composites live on the simulation page) */
  #lev-table th:nth-child(4), #lev-table td:nth-child(4) { display: none; }
  #lev-table th:nth-child(5) { width: auto !important; }
  #lev-table td:nth-child(5) { white-space: nowrap; }
  #lev-table th, #lev-table td { padding-left: 8px; padding-right: 8px; }
  #lev-table .lev-track { min-width: 56px; }
  #lev-table .lev-delta { min-width: 0; }
}

/* indicators register: documented-gap rows are visibly not-scored */
.gap-row td { background: var(--paper-2); color: var(--ink-faint); font-style: italic; }
.gap-row td code { font-style: normal; opacity: 0.7; }
.gap-chip { display: inline-block; font-size: 0.66rem; font-style: normal; border: 1px dashed var(--line-strong); border-radius: 9px; padding: 0 6px; margin-top: 3px; color: var(--ink-faint); white-space: nowrap; }
.dest-caveat { border-left: 3px solid #a8320a; background: #fbe3da55; padding: 8px 12px; margin: 10px 0; font-size: 0.85rem; }
