/* The news map (linked only on /map pages).
   Its three colors mean one thing each: a story leading in some countries. Violet, magenta and
   green are the dataviz method's documented steps, validated for every pair in both modes
   (hottub_news_core::livemap tests: CVD ΔE ≥ 8, ΔE ≥ 15), kept apart from the heat colors and
   from any party's colors. Other leaders share one neutral; quiet countries are hatched. Color
   never works alone: the legend names each story, every country has its name and result, and
   the table lists them all. */

:root{
  --c1:#6250d6;--c2:#e87ba4;--c3:#008300;
  --lm-other:#c3dbe0;--lm-busy:#a0c3cb;--lm-quiet:#e3ebec;--lm-hatch:#c4d3d6;--lm-none:#f0f5f6;--lm-sea:#e8f1f3;--lm-edge:#ffffff;
}
@media (prefers-color-scheme:dark){
  :root{--c1:#9085e9;--c2:#d55181;--c3:#008300;--lm-other:#3e5961;--lm-busy:#8fb0b8;--lm-quiet:#163640;--lm-hatch:#285561;--lm-none:#102b33;--lm-sea:#0a2027;--lm-edge:#0e2730}
}

.lm-head{padding:22px 0 18px;max-width:76ch}
.lm-head .kicker{gap:12px}
.lm-live{display:inline-flex;align-items:center;gap:7px;font-weight:700;color:var(--ink)}
.lm-live i{width:9px;height:9px;border-radius:50%;background:var(--water);box-shadow:0 0 0 3px var(--water-soft)}
.lm-grid{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:24px;align-items:stretch}
.lm-mapbox{padding:22px 22px 16px}

/* Legend: the candidates by name, then what the other shades mean */
.lm-legend{display:flex;flex-wrap:wrap;gap:12px 26px;margin:0 0 16px;align-items:flex-start}
.lm-cand{display:flex;gap:10px;align-items:flex-start;flex:1 1 220px;max-width:360px;min-width:0}
.lm-cand a{font:600 16px/1.28 var(--serif);color:var(--ink);text-decoration:none;text-wrap:pretty}
.lm-cand a:hover{text-decoration:underline}
.lm-won{display:block;font:500 13px/1.3 var(--sans);color:var(--ink-3);margin-top:3px}
.lm-key{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--ink-3)}
.lm-legend .lm-key:first-of-type{margin-left:auto}
.sw{display:inline-block;flex:none;width:15px;height:15px;border-radius:4px;margin-top:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}
.sw.c1{background:var(--c1)}.sw.c2{background:var(--c2)}.sw.c3{background:var(--c3)}
.sw.n{opacity:.5}
.sw.o{background:var(--lm-other)}.sw.o.b{background:var(--lm-busy)}
.sw.q{background:repeating-linear-gradient(45deg,var(--lm-quiet) 0 3px,var(--lm-hatch) 3px 5px)}

/* The map */
.lm-stage{position:relative;border-radius:var(--r-m);overflow:hidden}
.lm-svg{display:block;width:100%;height:auto}
.lm-svg .sea{fill:var(--lm-sea)}
.lm-svg .k>*,.lm-svg path.z,.lm-svg circle.z{stroke:var(--lm-edge);stroke-width:.7px;vector-effect:non-scaling-stroke;stroke-linejoin:round;transition:fill-opacity .2s var(--ease),opacity .2s var(--ease)}
.lm-svg path.z,.lm-svg circle.z{fill:var(--lm-none)}
.lm-svg .c1>*{fill:var(--c1)}.lm-svg .c2>*{fill:var(--c2)}.lm-svg .c3>*{fill:var(--c3)}
.lm-svg .n>*{fill-opacity:.5}
.lm-svg .o>*{fill:var(--lm-other)}.lm-svg .o.b>*{fill:var(--lm-busy)}
.lm-svg .q>*{fill:url(#lm-hatch)}
.lm-svg .hatch-bg{fill:var(--lm-quiet)}
.lm-svg .hatch-ln{stroke:var(--lm-hatch);stroke-width:14}
.lm-svg a.k{cursor:pointer;outline:none}
.lm-svg a.k:hover>*,.lm-svg a.k.hl>*{stroke:var(--ink);stroke-width:1.4px}
.lm-svg.has-sel a.k:not(.sel)>*{opacity:.62}
.lm-svg a.k.sel>*{stroke:var(--ink);stroke-width:2.4px;opacity:1}
.lm-tip{position:absolute;z-index:5;pointer-events:none;max-width:290px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-2);padding:10px 12px;font-size:13.5px;line-height:1.42}
.lm-tip b{display:block;font:600 15px/1.25 var(--sans);margin-bottom:2px}
.lm-tip span{color:var(--ink-2)}
.lm-note{font-size:13px;color:var(--ink-3);margin-top:12px;max-width:80ch}

/* The panel: a country's stories */
/* Beside the map the panel is exactly as tall as the map card (the row takes the map's height)
   and scrolls inside when a country has more stories than fit. */
.lm-side{position:relative;min-width:0}
.lm-panel{padding:20px 20px 16px;overflow:auto;overscroll-behavior:contain}
.lm-side>.lm-panel{position:absolute;inset:0}
/* A soft edge says there's more below; at the end of the list it sits under the last story. */
.lm-side>.lm-panel::after{content:"";position:sticky;bottom:-16px;display:block;height:36px;margin:0 -20px -16px;background:linear-gradient(to bottom,transparent,var(--paper));pointer-events:none}
.lm-pane[aria-busy=true]{opacity:.55;transition:opacity .15s}
.lm-pane-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.lm-country{font:600 30px/1.1 var(--serif);letter-spacing:-.01em;text-wrap:balance}
.lm-close{flex:none;font-size:22px;line-height:1;color:var(--ink-3);text-decoration:none;width:34px;height:34px;display:grid;place-items:center;border-radius:50%}
.lm-close:hover{background:var(--well);color:var(--ink)}
.lm-pane .facts{margin-top:8px}
.lm-said{display:flex;gap:10px;align-items:flex-start;margin-top:12px;font-size:14.5px;line-height:1.45;color:var(--ink-2)}
.lm-sorts{display:flex;gap:4px;margin:16px 0 4px;padding:4px;background:var(--well);border-radius:999px;border:1px solid var(--line-2)}
.lm-sorts a{flex:1;text-align:center;font:600 13.5px/1.2 var(--sans);color:var(--ink-2);text-decoration:none;padding:8px 6px;border-radius:999px;white-space:nowrap}
.lm-sorts a:hover{color:var(--ink)}
.lm-sorts a[aria-current]{background:var(--paper);color:var(--ink);box-shadow:var(--shadow-1)}
.lm-explain{font-size:13.5px;color:var(--ink-3);margin:8px 0 2px}
.lm-rows>li{padding:13px 0}
.lm-rows .row-h{font-size:16px}
.lm-rows .row-img{width:76px;height:56px}
.lm-share{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.lm-share [hidden]{display:none}
.lm-busy{margin-top:8px}
.lm-busy li{border-top:1px solid var(--line-2)}
.lm-busy li:first-child{border-top:0}
.lm-busy a{display:grid;grid-template-columns:15px minmax(0,1fr);gap:3px 10px;padding:11px 0;text-decoration:none;color:var(--ink)}
.lm-busy a:hover b{text-decoration:underline}
.lm-busy b{font-weight:600}
.lm-busy span:last-child{grid-column:2;font-size:13px;color:var(--ink-3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* Every country, as a table */
.lm-all{margin-top:24px}
.lm-scroll{overflow-x:auto;margin-top:8px}
.lm-table{width:100%;border-collapse:collapse;font-size:14px}
.lm-table th,.lm-table td{text-align:left;padding:9px 10px;border-top:1px solid var(--line-2);vertical-align:top}
.lm-table thead th{font-weight:600;color:var(--ink-3);border-top:0;font-size:13px}
.lm-table td:nth-child(2){color:var(--ink-2);min-width:220px}
.lm-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.lm-table th a{display:inline-flex;gap:9px;align-items:center;font-weight:600;color:var(--ink);text-decoration:none;white-space:nowrap}
.lm-table th a:hover{text-decoration:underline}
.lm-table th a .sw{margin-top:0}
.lm-more summary{cursor:pointer;margin-top:12px;font-weight:600;color:var(--link)}

@media (max-width:1020px){
  .lm-grid{grid-template-columns:minmax(0,1fr)}
  .lm-side>.lm-panel{position:static;overflow:visible}
  .lm-side>.lm-panel::after{display:none}
}
@media (max-width:720px){
  .lm-mapbox{padding:14px 10px 12px}
  .lm-table .its{display:none}
  .lm-table td:nth-child(2){min-width:0}
  .lm-lead{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .lm-table th a{white-space:normal}
  .lm-legend{gap:10px 16px}
  .lm-legend .lm-key:first-of-type{margin-left:0}
  .lm-cand{flex-basis:100%}
  .lm-country{font-size:26px}
  .lm-sorts a{font-size:12.5px;padding:8px 4px}
}
@media print{
  .lm-svg .q>*{fill:var(--lm-quiet)}
}

/* The front page opens on the map */
.lm-hero{padding:24px 26px 18px;margin-bottom:28px}
.lm-hero-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px 28px;margin-bottom:14px}
.lm-hero-h{font:600 clamp(24px,2.5vw,32px)/1.12 var(--serif);letter-spacing:-.01em;margin:6px 0 6px;text-wrap:balance}
.lm-hero .sub{max-width:70ch}
.lm-hero .ghost{flex:none;margin-top:6px}
.lm-hero .lm-legend{margin-bottom:12px}

/* The hover card: the country, how it was called, and its top stories */
.lm-tip{max-width:340px}
.lm-tip-top{margin:9px 0 0;padding:9px 0 0;border-top:1px solid var(--line-2);display:grid;gap:7px;counter-reset:top}
.lm-tip-top li{position:relative;padding-left:20px;font:500 13.5px/1.35 var(--sans);color:var(--ink)}
.lm-tip-top li::before{counter-increment:top;content:counter(top);position:absolute;left:0;top:0;font:600 12px/1.55 var(--serif);color:var(--ink-3)}
@media (max-width:720px){
  /* On a phone the map comes straight after the heading; the key follows it. */
  .lm-hero{padding:16px 12px 12px;margin-bottom:20px;display:flex;flex-direction:column}
  .lm-hero-top{flex-direction:column}
  .lm-hero .lm-legend{order:2;margin:14px 0 0}
  .lm-hero .lm-note{order:3}
}

/* A country's own page (/map/{cc}): its call heads it, its stories fill the main column, and the
   map around it, where its story also leads and other countries sit beside them. */
.lm-cpage .lm-head{padding-top:14px}
.lm-c{display:grid;grid-template-columns:minmax(0,1fr) 380px;grid-template-areas:"call map" "main map" "main boxes";grid-template-rows:auto auto 1fr;gap:20px 24px;align-items:start}
.lm-c>.sheet,.lm-c>div{margin:0}
.lm-c-main{grid-area:main;padding:20px 30px 22px}
.lm-c-main .lm-sorts{margin-top:0}
.lm-cmap{grid-area:map;padding:18px 18px 16px}
.lm-cmap .lm-stage{margin:12px 0 10px;border:1px solid var(--line-2)}
.lm-cmap .lm-note{margin:0 0 12px}
.lm-c-boxes{grid-area:boxes;display:grid;gap:20px}
.lm-call{grid-area:call;padding:24px 30px 24px}
.lm-call-k{display:flex;align-items:center;gap:9px;margin:0 0 8px;font:600 14px/1.3 var(--sans);color:var(--ink-2)}
.lm-call-k .sw{margin-top:0}
.lm-call-h{display:block;font:600 clamp(23px,2.3vw,31px)/1.16 var(--serif);letter-spacing:-.01em;color:var(--ink);text-decoration:none;text-wrap:balance}
.lm-call-h:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.lm-call-n{margin:10px 0 0;font-size:15px;color:var(--ink-2)}
.lm-also-in{display:flex;flex-wrap:wrap;gap:8px}
.lm-also-in a{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 9px;border-radius:999px;background:var(--well);border:1px solid var(--line-2);color:var(--ink);text-decoration:none;font-size:14.5px}
.lm-also-in a:hover{border-color:var(--ink-3)}
.lm-also-in .sw{margin-top:0}
.lm-also-more{align-self:center;font-size:14px;color:var(--ink-3)}
/* A story's figures break between items, never inside one ("180 outlets here"). */
.lm-rows .row-i>*{white-space:nowrap}
@media (max-width:1020px){
  /* One column: the call, the map around the country, its stories, then the lists. */
  .lm-c{grid-template-columns:minmax(0,1fr);grid-template-areas:"call" "map" "main" "boxes";grid-template-rows:auto}
  .lm-cmap .lm-stage{max-width:560px}
}
@media (max-width:720px){
  .lm-c-main{padding:16px 16px 14px}
  .lm-call{padding:18px 16px 18px}
  .lm-cmap{padding:14px 14px 12px}
}
