/* GeoForecast. Views across the top, one map, one report panel.

   Colour: Midnight Linear, the only brand tokens (owner's choice, 2026-11-18):
   background #08090A, text #F7F8F8, primary #5E6AD2, accent #8A8F98, surface #141516.
   Everything else below is either a tint or shade of those five (no new hues) or a data
   colour that encodes a value (severity, alert). Data colours are never used as
   decoration and always ship with a text label or icon.
   Type (owner's choice, 2026-11-18): Onest 600 for headings and short labels (the one
   loud face), Geist Mono for everything else (the workhorse: body, forms, buttons,
   figures). Two families, one job each.
   Shape: 6px controls, 10px cards, pills only for small chips and tags.
   Contrast (checked): text 17.2:1 on surface; accent 5.6:1 on surface, 6.1:1 on
   background; primary-text 5.5:1 on surface; text on primary-fill 5.2:1. */


:root {
  /* Midnight Linear */
  --background: #08090A;
  --text: #F7F8F8;
  --primary: #5E6AD2;
  --accent: #8A8F98;
  --surface: #141516;

  /* Derived from the brand tokens (tints and shades only) */
  --card: var(--surface);
  --surface-2: #1C1D20;          /* surface lifted one step: hover, insets */
  --border: #26282C;             /* hairline */
  --border-2: #3A3D43;           /* stronger divider, inactive strokes */
  --primary-fill: #535FC6;       /* primary for filled controls: 5.2:1 with text */
  --primary-hover: #4A56BE;      /* primary-fill one shade darker, for hover: 5.9:1 with text */
  --primary-text: #7C86E0;       /* primary as text or thin marks on dark: 5.5:1+ */
  --primary-deep: #2B3170;       /* primary at low lightness, for selected fills */
  --primary-tint: rgba(94, 106, 210, .16);
  --text-2: var(--accent);
  --text-3: var(--accent);
  --link: var(--text);
  --focus: var(--primary-text);

  /* Data colours (encode values; never decoration) */
  --sev-1: #7290b8; --sev-2: #ddb33a; --sev-3: #f2722f; --sev-4: #c9245a;
  --alert: #F2722F;              /* worsening / hot links: the "Severe" data colour, 6.9:1 on background */
  --ok: #3fb950;
  --series-1: var(--primary); --series-2: var(--alert); --series-3: var(--accent);
  --bar: var(--primary);

  /* Legacy names kept so older rules resolve to the new tokens */
  --bg: var(--background);
  --ink-deep: var(--background);
  --on-primary: var(--text);
  --on-dark-muted: var(--accent);
  --on-dark-faint: var(--surface-2);
  --hairline-violet: var(--border);
  --hairline-cool: var(--accent);
  --ring-focus: var(--focus);

  /* Spacing 2/4/8/12/16/24/32/40 */
  --s0: 2px; --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  /* Radius: controls 6, cards 10, chips full */
  --r-xs: 4px; --r-sm: 6px; --r-md: 6px; --r-lg: 10px; --r-xl: 10px; --r-xxl: 14px; --r-full: 9999px;
  /* Type scale: each step at least 1.25x the one below where it marks hierarchy */
  --t-micro: 12px;     /* badges, small labels (never below 12px) */
  --t-caption: 14px;
  --t-eyebrow: 14px;
  --t-body: 16px;
  --t-h-sm: 20px;
  --t-h-md: 26px;
  --t-h-xl: 34px;

  --header: 116px; /* two rows: brand, search and actions, then the view tabs */
  --report-w: 480px;
  --font-display: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: var(--font-body);
  --mono: var(--font-body);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Anything marked hidden stays hidden, whatever display a component sets (an empty lens
   banner and the simulator stage both showed through before this rule). */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--background); color: var(--text); font: 400 var(--t-body)/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; display: flex; flex-direction: column; }
/* Browser surfaces in the palette, not browser defaults */
::selection { background: var(--primary-deep); color: var(--text); }
html { scrollbar-color: var(--border-2) var(--background); }
input, textarea { caret-color: var(--primary-text); }
button, input, textarea, select { font: inherit; color: inherit; }
/* link-on-dark: white, persistent underline, no colour change. */
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
h1, h2, h3 { margin: 0; }
.muted { color: var(--text-2); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ico { flex: none; display: inline-block; vertical-align: -3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: var(--s2); z-index: 80; background: var(--on-primary); color: var(--ink-deep); padding: var(--s2) var(--s3); border-radius: var(--r-md); font-weight: 700; }
.skip:focus { left: var(--s2); }

/* ---- Buttons: inverted (primary on dark), ghost-on-dark, violet token -------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; border: 0; background: var(--on-dark-faint); color: var(--on-primary); padding: var(--s2) var(--s3); border-radius: var(--r-xl); cursor: pointer; white-space: nowrap; font-size: var(--t-caption); font-weight: 700; line-height: 1.14; }
.btn:active { background: var(--surface-2); filter: brightness(1.2); }
.btn[aria-expanded="true"], .btn[aria-pressed="true"] { background: var(--border-2); }
.btn--primary { background: var(--on-primary); color: var(--ink-deep); border-radius: var(--r-md); padding: var(--s3) var(--s4); width: 100%; }
.btn--primary:active { background: var(--primary-deep); color: var(--text); }
.btn--primary:disabled { background: var(--surface-2); color: var(--accent); cursor: wait; }
.btn--map { background: rgba(28,29,32,.92); backdrop-filter: blur(6px); }
.lensbar__close { margin-left: auto; color: inherit; }
.btn--map[aria-pressed="true"] { background: var(--primary-fill); box-shadow: 0 0 0 1px var(--text) inset; }
.btn--pro { background: var(--primary-fill); color: var(--text); border-radius: var(--r-md); }
.btn--pro:hover { background: var(--primary-hover); }
.link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: var(--t-caption); }
.icon-btn { background: none; border: 0; color: var(--text); cursor: pointer; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: var(--r-full); }
.icon-btn:active { background: var(--surface-2); }
.tag { font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--on-primary); background: var(--card); border-radius: var(--r-xs); padding: 0 var(--s2); margin-left: var(--s1); }

/* Segmented controls and tabs: violet-token marks the selected item. */
.seg, .tabs--sev { display: inline-flex; gap: var(--s1); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s0); }
.seg button, .tabs button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); border: 1px solid transparent; background: none; color: var(--text-2); min-height: 36px; padding: 0 var(--s3); border-radius: var(--r-xl); cursor: pointer; white-space: nowrap; font-size: var(--t-caption); font-weight: 500; line-height: 1.29; min-height: 44px; }
.seg button[aria-checked="true"], .tabs button[aria-selected="true"] { background: var(--border-2); border-color: var(--primary); color: var(--on-primary); }
.seg--full { display: flex; } .seg--full button { flex: 1; }
.tabs { display: flex; gap: var(--s2); }

.tabs--sev { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); width: 100%; margin-bottom: var(--s3); }
.tabs--sev button { padding: 0 var(--s2); gap: var(--s1); font-size: var(--t-caption); text-transform: none; letter-spacing: 0; }
.tabs--sev .num { color: inherit; }
.tabs__sw { flex: none; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--tab-sw); }

/* ---- Header -------------------------------------------------------------------------- */
.top { height: var(--header); display: grid; grid-template-columns: auto minmax(200px, 520px) 1fr auto; grid-template-rows: 56px 52px; align-items: center; column-gap: var(--s6); padding: 0 var(--s6); border-bottom: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: var(--s2); min-height: 44px; min-width: 44px; text-decoration: none; color: var(--text); }
.brand__mark { width: 28px; height: 28px; color: var(--text); flex: none; }
.brand__name { font: 600 var(--t-body)/1.2 var(--font-display); }
.clock { color: var(--text-2); font-size: var(--t-caption); justify-self: end; white-space: nowrap; }
.top__actions { display: flex; align-items: center; gap: var(--s2); justify-self: end; }

/* Universal search: always in the header, quiet until used. */
.gsearch { position: relative; min-width: 0; }
.gsearch__box { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); background: var(--background); border: 1px solid var(--border-2); border-radius: var(--r-md); color: var(--text-2); cursor: text; }
.gsearch__box:hover { border-color: var(--accent); }
.gsearch__box:focus-within { border-color: var(--primary-text); outline: 2px solid var(--focus); outline-offset: 1px; }
.gsearch__label { color: var(--text); font-size: var(--t-caption); font-weight: 500; padding-right: var(--s2); border-right: 1px solid var(--border-2); }
.gsearch input { flex: 1; min-width: 0; min-height: 42px; background: none; border: 0; outline: none; color: var(--text); font: 400 var(--t-caption)/1.4 var(--font-body); }
.gsearch input::placeholder { color: var(--accent); }
.gsearch input::-webkit-search-cancel-button { filter: invert(.6); }
.gsearch__kbd { font: 500 var(--t-micro)/1 var(--font-body); color: var(--text-2); border: 1px solid var(--border-2); border-radius: var(--r-xs); padding: 3px 6px; }
.gsearch__panel { position: absolute; z-index: 60; top: calc(100% + var(--s2)); left: 0; width: min(640px, calc(100vw - 24px)); max-height: min(70vh, 640px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: var(--s2) 0; }
.gsearch__status { padding: var(--s2) var(--s4); font-size: var(--t-micro); color: var(--text-2); line-height: 1.5; }
.gsearch__status:empty { display: none; }
.gsearch__group { padding: var(--s2) 0; border-top: 1px solid var(--border); }
.gsearch__group:first-child { border-top: 0; }
.gsearch__gh { margin: 0; padding: var(--s1) var(--s4); font: 600 var(--t-caption)/1.4 var(--font-display); color: var(--text); }
.gopt { display: grid; grid-template-columns: 20px 1fr auto; gap: var(--s3); align-items: start; padding: var(--s2) var(--s4); min-height: 44px; cursor: pointer; }
.gopt[aria-selected="true"], .gopt:hover { background: var(--surface-2); }
.gopt .ico { margin-top: 2px; color: var(--text-2); }
.gopt__t { display: block; color: var(--text); font-size: var(--t-caption); line-height: 1.4; }
.gopt__m { display: block; color: var(--text-2); font-size: var(--t-micro); line-height: 1.5; }
.gopt__s { font-size: var(--t-micro); color: var(--text-2); white-space: nowrap; padding-top: 2px; }
.gopt__s--live { color: var(--primary-text); }
.gsearch__all { display: block; width: 100%; text-align: left; padding: var(--s3) var(--s4); background: none; border: 0; border-top: 1px solid var(--border); color: var(--text); font: 500 var(--t-caption)/1.4 var(--font-body); cursor: pointer; min-height: 44px; }
.gsearch__all[aria-selected="true"], .gsearch__all:hover { background: var(--surface-2); }

/* Views: priority+ navigation. Tabs that fit stay visible (the current one always);
   the rest move into "More" with a visible count. */
.navbar { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
/* The tabs and the time range are written by JS. Their filled heights are held from the first
   paint (the same at every width), so the page below does not jump when they arrive (CLS). */
.navbar { min-height: 56px; }
#range { min-height: 50px; }
.tabs--views { flex: 0 1 auto; min-width: 0; overflow: hidden; gap: var(--s1); }
.tabs--views button { padding: 0 var(--s3); flex: none; }
.tabs--views button[hidden] { display: none; }
.more { position: relative; flex: none; }
.more__btn { gap: var(--s1); background: var(--surface-2); border: 1px solid var(--border-2); font-weight: 500; }
.more__btn[aria-expanded="true"] { border-color: var(--primary-text); }
.more__n { color: var(--text-2); }
.more__btn[aria-expanded="true"] .more__n { color: var(--text); } /* accent on the pressed fill was 3.4:1 */
.more__menu { position: absolute; z-index: 60; top: calc(100% + var(--s2)); right: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: var(--s1); }
.more__menu [role="menuitem"] { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 44px; padding: 0 var(--s3); background: none; border: 0; border-radius: var(--r-sm); color: var(--text); font: 400 var(--t-caption)/1.3 var(--font-body); text-align: left; cursor: pointer; }
.more__menu [role="menuitem"]:hover, .more__menu [role="menuitem"]:focus-visible { background: var(--surface-2); outline: none; }
.more__menu [role="menuitem"]:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.more__sep { height: 1px; background: var(--border); margin: var(--s1) 0; }
.more__hint { padding: var(--s2) var(--s3) var(--s1); font-size: var(--t-micro); color: var(--text-2); }
.live-dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--sev-4); }

/* Notices sit on the spotlight violet, never a new hue. */
.notice { background: var(--primary-deep); color: var(--on-primary); padding: var(--s2) var(--s4); font-size: var(--t-caption); line-height: 1.43; }
.notice .ico { margin-right: var(--s2); }

/* ---- Layout ---------------------------------------------------------------------------- */
/* Fills what the header and any notice banner leave (a fixed calc() cut the bottom off when a notice showed). */
.layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr var(--report-w); }
.top, .notice { flex: none; }
.mapzone { position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: var(--card); }
.report { background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.report:focus { outline: none; }

/* ---- Map chrome ----------------------------------------------------------------------- */
.mapctl { position: absolute; z-index: 3; }
.mapctl--tl { top: var(--s3); left: var(--s3); z-index: 4; }
.mapctl--bl { bottom: 40px; left: var(--s3); }
.mapctl__row { display: flex; gap: var(--s2); }
/* select-violet */
.selectwrap select { appearance: none; -webkit-appearance: none; min-height: 44px; background-color: var(--primary-deep); color: var(--on-primary); border: 0; border-radius: var(--r-md); padding: var(--s2) 36px var(--s2) var(--s4); font-size: var(--t-body); font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--on-primary) 50%), linear-gradient(135deg, var(--on-primary) 50%, transparent 50%); background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat; }
.popover { position: absolute; top: calc(100% + var(--s2)); left: 0; width: 340px; max-height: calc(100vh - var(--header) - 90px); overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding-bottom: var(--s2); }
.popover__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s2) var(--s2) var(--s1) var(--s4); }
.popover__head h2 { font-size: var(--t-eyebrow); font-weight: 500; }
.popover__section { padding: var(--s3) var(--s4); border-top: 1px solid var(--border); }
.popover__section h3 { font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--text-2); margin-bottom: var(--s2); }
.popover__note { color: var(--text-2); font-size: var(--t-caption); padding: 0 var(--s4) var(--s2); margin: 0; }
.domain-label { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--text-2); padding: var(--s3) var(--s4) var(--s1); }
.toggle { width: 100%; display: grid; grid-template-columns: 18px 1fr auto; gap: var(--s3); align-items: start; text-align: left; background: none; border: 0; padding: var(--s2) var(--s4); cursor: pointer; min-height: 44px; }
.toggle:active { background: var(--surface-2); }
.toggle__box { width: 16px; height: 16px; border: 1.5px solid var(--border-2); border-radius: var(--r-xs); margin-top: 3px; display: grid; place-items: center; }
.toggle[aria-pressed="true"] .toggle__box { background: var(--on-primary); border-color: var(--on-primary); }
.toggle[aria-pressed="true"] .toggle__box::after { content: ''; width: 8px; height: 4px; border: 2px solid var(--ink-deep); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.toggle__label { display: block; font-weight: 500; line-height: 1.5; }
.toggle__note { display: block; color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }
.toggle__count { color: var(--text-2); font-size: var(--t-caption); padding-top: var(--s0); }
.is-warn { color: var(--alert); }
.lenses { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: var(--s2); }
.lenses li { color: var(--text-2); font-size: var(--t-caption); }
.lenses strong { display: block; color: var(--text); font-weight: 600; }

.legend-box { background: rgba(8,9,10,.94); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s1) var(--s4); backdrop-filter: blur(6px); font-size: var(--t-caption); max-width: 300px; }
.legend-box[open] { padding-bottom: var(--s4); max-height: calc(100% - 120px); overflow-y: auto; }
.legend-box[open] .legend { max-height: none; overflow: visible; } /* one scroll area, never taller than the map */
.legend-box summary { cursor: pointer; color: var(--text); font-weight: 700; font-size: var(--t-caption); min-height: 44px; display: flex; align-items: center; }
.legend { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s2); max-height: min(60vh, 520px); overflow: auto; }
/* A fixed swatch column, so every label starts on the same line whatever its mark size. */
.legend li { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: var(--s3); color: var(--text-2); line-height: 1.43; }
.legend .swatch { justify-self: center; border-radius: var(--r-full); display: inline-block; }
.legend .legend__sub { display: block; font-size: var(--t-caption); margin-top: var(--s1); padding-top: var(--s3); border-top: 1px solid var(--border); }

/* pill-neutral-dark */
.status { position: absolute; right: var(--s3); bottom: 40px; z-index: 2; background: var(--card); color: var(--on-primary); border-radius: var(--r-xs); padding: var(--s1) var(--s2); font-size: 12px; white-space: normal; text-align: center; max-width: calc(100% - 140px); }
.maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; }
.maplibregl-ctrl-group { background: var(--card) !important; border: 1px solid var(--border); border-radius: var(--r-md) !important; box-shadow: none !important; }
.maplibregl-ctrl-group button { filter: invert(1) brightness(1.4); }
.maplibregl-ctrl-group button + button { border-top-color: var(--border) !important; }
.maplibregl-ctrl-attrib { background: rgba(8,9,10,.85) !important; color: var(--text-2); font-size: 12px; }
.maplibregl-ctrl-attrib a { color: var(--text); }
.maplibregl-ctrl-attrib-inner { color: var(--text-2); }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

/* ---- Toasts ---------------------------------------------------------------------------- */
.toasts { position: absolute; right: 60px; top: var(--s3); z-index: 6; display: grid; gap: var(--s2); width: min(360px, calc(100% - 72px)); }
.toast { display: grid; grid-template-columns: 4px 1fr auto; gap: var(--s3); align-items: start; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s3) var(--s1) var(--s3) 0; overflow: hidden; animation: toast-in .2s var(--ease); }
.toast__rule { align-self: stretch; border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.toast__body { background: none; border: 0; text-align: left; cursor: pointer; padding: 0; min-width: 0; }
.toast__kicker { display: block; font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--text-2); }
.toast__title { display: block; color: var(--text); font-weight: 500; line-height: 1.5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---- Live dock ------------------------------------------------------------------------- */
.dock { position: absolute; right: var(--s3); bottom: var(--s3); z-index: 5; width: 400px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.dock__head { display: flex; align-items: center; gap: var(--s2); padding: var(--s2); }
.dock__head select { flex: 1; min-width: 0; min-height: 44px; background: var(--primary-deep); color: var(--on-primary); border: 0; border-radius: var(--r-md); padding: 0 var(--s3); font-size: var(--t-caption); }
.dock__player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.dock__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dock__caption { margin: 0; padding: var(--s2) var(--s3); font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.dock__caption strong { color: var(--text); font-weight: 600; }

/* ---- Report ----------------------------------------------------------------------------- */
.sec { padding: var(--s6) var(--s6) var(--s8); border-bottom: 1px solid var(--border); }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
/* eyebrow */
.sec__head h2 { font-size: var(--t-eyebrow); font-weight: 500; line-height: 1.4; color: var(--text); display: flex; align-items: center; gap: var(--s2); }
.sec__icon { color: var(--text); }
.sec__meta { font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--text-2); text-align: right; }
.sec__intro { color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; margin: 0 0 var(--s4); }
.sec__intro strong { color: var(--text); }
.sec__foot { color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; margin: var(--s3) 0 0; }

/* Situation: the headline carries the one lime keyword chip on screen. */
.sit__asof { font-size: var(--t-micro); line-height: 1.6; color: var(--text-2); margin: 0 0 var(--s1); }
.sit__partial { display: flex; gap: var(--s2); align-items: baseline; font-size: var(--t-caption); line-height: 1.5; color: var(--alert); margin: 0 0 var(--s3); }
.sit__line { font-size: var(--t-h-md); line-height: 1.25; margin: 0 0 var(--s3); }
.sit__line .num { font-family: var(--sans); font-weight: 700; }
.sit__src { margin: 0 0 var(--s3); font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.chip-lime { background: var(--primary-text); color: var(--ink-deep); border-radius: var(--r-xs); padding: 0 var(--s3); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-bottom: var(--s3); }
.tile { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--s1); text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s4); cursor: pointer; min-height: 148px; }
.tile:active { border-color: var(--border-2); }
.tile__domain { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--text); }
.tile__n { font-size: var(--t-h-xl); font-weight: 500; line-height: 1.2; }
.tile__l { font-size: var(--t-caption); color: var(--text-2); line-height: 1.43; }
.tile__trend { font-size: var(--t-caption); color: var(--text-2); line-height: 1.43; }
.tile__trend b { color: var(--text); font-weight: 600; }
.tile .spark, .tile .ministack { width: 100%; height: 24px; display: block; margin-top: var(--s1); overflow: visible; }
.tile--loading .tile__n { color: var(--text-2); }
.tile--unv { border-style: dashed; border-color: var(--border-2); }
.fc__more summary { cursor: pointer; font-size: var(--t-caption); color: var(--text-2); min-height: 44px; display: flex; align-items: center; }

/* Event rows */
.grp { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-body); font-weight: 700; line-height: 1.4; color: var(--text); margin: var(--s4) 0 var(--s1); }
.grp:first-of-type { margin-top: 0; }
.grp .num { color: var(--text-2); }
.grp__sw { width: 8px; height: 8px; border-radius: var(--r-full); }
.item { display: grid; grid-template-columns: 16px 1fr; gap: var(--s3); text-align: left; background: none; border: 0; padding: var(--s2); margin: 0 calc(var(--s2) * -1); width: calc(100% + var(--s4)); border-radius: var(--r-md); cursor: pointer; min-height: 44px; }
.item:active, .item.is-active { background: var(--surface-2); }
.item__icon { color: var(--text); display: grid; justify-items: center; padding-top: var(--s1); }
.item__title { display: block; font-weight: 500; line-height: 1.5; }
.item__meta { display: block; color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }
.empty { color: var(--text-2); font-size: var(--t-caption); padding: var(--s3) 0; margin: 0; }
.more { margin-top: var(--s3); }
/* Chips: pill-neutral-dark, violet-token when selected. */
.chipbar { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.chip { display: inline-flex; align-items: center; gap: var(--s2); background: var(--card); border: 1px solid var(--border); color: var(--on-primary); border-radius: var(--r-xl); padding: 0 var(--s4); min-height: 44px; font-size: var(--t-caption); font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--border-2); border-color: var(--primary); }

.headline, .feed-item { display: block; width: calc(100% + var(--s4)); padding: var(--s2); margin: 0 calc(var(--s2) * -1); border-radius: var(--r-md); text-decoration: none; color: var(--text); }
.headline:active, .feed-item:active { background: var(--surface-2); }
.headline__t, .feed-item__t { display: block; font-weight: 500; line-height: 1.5; }
.headline__m, .feed-item__m { display: block; color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }
.feed-item__cat { color: var(--text); }

/* Badges: micro-cap pills; authority is told by the word, never by colour. */
.badge { display: inline-block; font-size: var(--t-micro); font-weight: 600; line-height: 1.8; padding: 0 var(--s2); border-radius: var(--r-xs); background: var(--card); border: 1px solid var(--border); color: var(--on-primary); vertical-align: 1px; margin-left: var(--s1); white-space: nowrap; }
.badge--new { background: var(--border-2); border-color: var(--primary); }

/* Sources */
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.sources li { display: grid; grid-template-columns: 12px 1fr; gap: var(--s2); font-size: var(--t-caption); }
.sources .dot { width: 8px; height: 8px; border-radius: var(--r-full); margin-top: 7px; }
.dot--live { background: var(--ok); } .dot--stale { background: var(--sev-2); } .dot--down { background: var(--sev-4); }
.src-name { display: block; font-weight: 500; }
.src-meta { display: block; color: var(--text-2); line-height: 1.43; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s4); font-size: var(--t-caption); }

/* Detail */
.detail { padding: var(--s4) var(--s6) var(--s8); }
.detail__back { display: inline-flex; align-items: center; gap: var(--s1); margin: 0 0 var(--s4); min-height: 44px; }
.detail__sev { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-micro); font-weight: 600; line-height: 1.8; padding: 0 var(--s2); border-radius: var(--r-xs); background: var(--card); border: 1px solid var(--border); }
.detail h2 { font-size: var(--t-h-md); line-height: 1.25; font-weight: 500; margin: var(--s3) 0 var(--s2); }
.detail p { color: var(--text-2); margin: 0 0 var(--s4); }
.detail .why { font-size: var(--t-caption); line-height: 1.43; }
.detail .precision { font-size: var(--t-caption); line-height: 1.43; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s2) var(--s3); }
.detail dl { display: grid; grid-template-columns: 104px 1fr; gap: var(--s2) var(--s3); margin: 0 0 var(--s6); font-size: var(--t-caption); line-height: 1.43; }
.detail dt { color: var(--text-2); }
.detail dd { margin: 0; }
.detail .chart, .detail .esc { margin-bottom: var(--s6); }

/* ---- Charts ------------------------------------------------------------------------------ */
.chart { margin: 0 0 var(--s6); }
.chart:last-child { margin-bottom: 0; }
.chart figcaption { margin-bottom: var(--s2); }
.chart__title { display: block; font-weight: 600; font-size: var(--t-body); }
.chart__note { display: block; color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }
.chart__plot svg { width: 100%; display: block; overflow: visible; }
.chart__plot .lbl { fill: var(--text-2); font-size: 12px; font-family: var(--sans); }
.chart__plot .val { fill: var(--text); font-size: 12px; font-family: var(--mono); }
.chart__plot .tick { fill: var(--text-2); font-size: 12px; font-family: var(--mono); }
.chart__plot .axis, .chart__plot .grid { fill: none; stroke: var(--border); stroke-width: 1; }
.mark:hover rect[fill]:not([fill="transparent"]) { filter: brightness(1.18); }
.chart__legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: 0 0 var(--s2); padding: 0; font-size: var(--t-caption); color: var(--text-2); }
.chart__legend li { display: flex; align-items: center; gap: var(--s2); }
.chart__legend .sw { width: 10px; height: 10px; border-radius: var(--r-xs); }
.chart__empty { color: var(--text-2); font-size: var(--t-caption); margin: 0; }
.chart__table { margin-top: var(--s2); font-size: var(--t-caption); }
.chart__table summary { color: var(--text-2); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.chart__table table { width: 100%; border-collapse: collapse; margin-top: var(--s2); }
.chart__table th, .chart__table td { text-align: left; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.chart__table thead th { color: var(--text-2); font-weight: 600; }
.chart-tip { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; background: var(--card); border: 1px solid var(--border-2); color: var(--text); font-size: var(--t-caption); line-height: 1.43; padding: var(--s1) var(--s2); border-radius: var(--r-md); max-width: 280px; }
.srows { display: grid; gap: var(--s0); }
.srow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l n" "b b"; gap: var(--s1) var(--s3); align-items: baseline; text-align: left; background: none; border: 0; padding: var(--s2); margin: 0 calc(var(--s2) * -1); width: calc(100% + var(--s4)); border-radius: var(--r-md); }
button.srow { cursor: pointer; }
button.srow:active, .srow.is-active { background: var(--surface-2); }
.srow__label { grid-area: l; font-size: var(--t-caption); }
.srow__n { grid-area: n; font-size: var(--t-caption); color: var(--text-2); }
.srow__bar { grid-area: b; width: 100%; height: 10px; display: block; }

.bm { display: grid; gap: var(--s0); overflow-x: auto; }
.bm__row { display: grid; grid-template-columns: minmax(120px, 1.4fr) repeat(var(--cols), minmax(40px, 1fr)); align-items: center; }
.bm__head span { font-size: var(--t-micro); font-weight: 600; color: var(--text-2); text-align: center; }
.bm__label { background: none; border: 0; text-align: left; color: var(--text); font-size: var(--t-caption); padding: var(--s1) var(--s2) var(--s1) 0; cursor: pointer; min-height: 44px; text-decoration: underline; text-decoration-color: var(--on-dark-muted); text-underline-offset: 3px; }
.bm__cell { position: relative; display: grid; place-items: center; height: 40px; }
.bm__v { position: absolute; font-size: var(--t-micro); font-family: var(--mono); color: var(--on-primary); pointer-events: none; }
.rg__node { cursor: pointer; outline: none; }
.rg__node:focus-visible circle:nth-child(2) { stroke: var(--focus); stroke-width: 3; }

/* ---- Search and filter inputs: the same field as the header search ----------------------- */
.search { display: flex; align-items: center; gap: var(--s2); background: var(--background); color: var(--text-2); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 0 var(--s3); margin-bottom: var(--s3); min-height: 44px; }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 400 var(--t-body)/1.4 var(--font-body); padding: var(--s2) 0; }
.search input::placeholder { color: var(--accent); }
.search .ico { color: var(--text-2); }
.scope-note { font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); margin: 0 0 var(--s3); }
/* "How to read this": the detail behind a one-line caption, one click away. */
.how { margin: var(--s1) 0 var(--s2); font-size: 12px; color: var(--text-2); }
.how > summary { display: inline-flex; align-items: center; gap: var(--s1); min-height: 28px; cursor: pointer; list-style: none; border-radius: var(--r-sm); }
.how > summary::-webkit-details-marker { display: none; }
.how > summary:hover, .how[open] > summary { color: var(--text); }
.how__body { padding: var(--s1) 0 var(--s2); line-height: 1.5; max-width: 72ch; display: grid; gap: var(--s2); }
.how__body p, .how__body ul { margin: 0; }
.how__body ul:not(.sources) { padding-left: var(--s5); display: grid; gap: 2px; }
.srcsum { margin: 0 0 var(--s2); font-size: var(--t-caption); color: var(--text-2); }
.srcsum b { color: var(--text); }
@media (pointer: coarse) { .how > summary { min-height: 44px; } }
.answer { border: 1px solid var(--border); background: var(--card); border-radius: var(--r-xl); padding: var(--s4); margin-bottom: var(--s3); }
.answer__label { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--t-micro); font-weight: 600; line-height: 1.8; }
.answer__text { margin: 0 0 var(--s2); line-height: 1.5; }
.answer__note { margin: 0; font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.cites { margin: 0 0 var(--s4); padding-left: var(--s6); color: var(--text-2); font-size: var(--t-caption); }
.cites li::marker { font-family: var(--mono); }

/* Online services */
.svc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1) var(--s4); }
.svc li { display: grid; grid-template-columns: 12px 1fr; gap: var(--s2); font-size: var(--t-caption); padding: var(--s1) 0; }
.svc .dot { width: 8px; height: 8px; border-radius: var(--r-full); margin-top: 7px; }
.svc small { display: block; color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }

/* ---- Escalation watch and published forecasts ------------------------------------------ */
.escs { display: grid; gap: var(--s2); }
.esc { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--card); padding: var(--s4); }
.esc__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.esc__title { background: none; border: 0; padding: 0; color: var(--text); font-weight: 600; font-size: var(--t-h-sm); line-height: 1.25; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--on-dark-muted); text-underline-offset: 4px; min-height: 44px; }
.esc__trend { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--on-primary); background: var(--on-dark-faint); border-radius: var(--r-xs); padding: 0 var(--s2); }
.esc__trend--rising { background: var(--primary-deep); }
.esc__nums { margin: var(--s1) 0 var(--s2); color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }
.esc__nums b { color: var(--text); font-size: var(--t-body); }
.esc .spark { width: 100%; height: 28px; display: block; margin-bottom: var(--s3); }
.ladder { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s1); }
.ladder li { display: grid; grid-template-columns: 4px 1fr auto; gap: var(--s2); align-items: center; font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.ladder__bar { height: 16px; border-radius: var(--r-xs); background: var(--border); }
.ladder li.is-on { color: var(--text); }
.ladder li.is-on .ladder__bar { background: var(--alert); }
.esc__links { margin: 0 0 var(--s2); font-size: var(--t-caption); color: var(--text-2); }
.esc__links a { display: inline-flex; align-items: center; gap: var(--s1); }
.esc__fc { border-top: 1px solid var(--border); padding-top: var(--s2); }
.esc__fc-h { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-micro); font-weight: 600; line-height: 1.8; margin-bottom: var(--s1); }
.esc__none { font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); margin: 0; border-top: 1px solid var(--border); padding-top: var(--s2); }
.fc { display: block; text-decoration: none; color: var(--text); padding: var(--s2); margin: 0 calc(var(--s2) * -1); border-radius: var(--r-md); }
.fc:active { background: var(--surface-2); }
.fc__q { display: block; font-weight: 500; line-height: 1.5; }
.fc__m { display: block; color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }
.prob { display: grid; grid-template-columns: 1fr 48px; gap: var(--s2); align-items: center; margin-top: var(--s1); }
.prob svg { width: 100%; height: 8px; display: block; }
.prob .num { text-align: right; font-size: var(--t-caption); }

/* ---- Pro interest modal: card-pricing-featured ------------------------------------------- */
.modal { border: 1px solid var(--border); border-radius: var(--r-xl); padding: 0; background: var(--card); color: var(--text); width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.modal::backdrop { background: rgba(8,9,10,.8); }
.modal__inner { padding: var(--s8); position: relative; }
.modal h2 { margin: 0 0 var(--s2); font-size: var(--t-h-md); font-weight: 500; line-height: 1.25; }
.modal__close { position: absolute; top: var(--s3); right: var(--s3); background: none; border: 0; color: var(--text); cursor: pointer; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: var(--r-full); }
fieldset { border: 0; padding: 0; margin: var(--s4) 0; }
legend { font-weight: 600; margin-bottom: var(--s2); padding: 0; }
.check { display: flex; gap: var(--s3); align-items: start; padding: var(--s1) 0; cursor: pointer; color: var(--text-2); }
.check input { margin-top: 4px; accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.field { display: block; margin: var(--s4) 0; }
.field span { display: block; font-weight: 600; margin-bottom: var(--s2); }
.field em { font-weight: 400; color: var(--text-2); font-style: normal; }
.field input, .field textarea { width: 100%; background: var(--on-primary); color: var(--ink-deep); border: 1px solid var(--hairline-cool); border-radius: var(--r-sm); padding: var(--s2) var(--s3); font-weight: 500; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.form-msg { min-height: 20px; font-size: var(--t-caption); margin: var(--s2) 0; }
.form-msg.is-error { color: var(--alert); }
.form-msg.is-ok { color: var(--on-primary); }

/* ---- Responsive: 1280 / 900 / 992 / 576 (
   the layout already stacks at 992) ------------------------------------------------------- */
@media (max-width: 1399px) { .clock { display: none; } .top { grid-template-columns: auto minmax(200px, 520px) auto; } }
@media (max-width: 1279px) {
  :root { --report-w: 420px; }
  .top { grid-template-columns: auto minmax(180px, 1fr) auto; }
}
/* Secondary header actions fold into "More" on narrow screens (the menu lists them). */
@media (max-width: 899px) {
  .top__actions [data-fold] { display: none; }
  .gsearch__kbd { display: none; }
}
@media (max-width: 991px) {
  body { overflow: auto; }
  .top { position: sticky; top: 0; z-index: 20; height: auto; padding-bottom: var(--s1); }
  .layout { display: block; height: auto; flex: none; }
  .mapzone { height: 52vh; min-height: 300px; }
  .report { border-left: 0; overflow: visible; }
  .sec { padding: var(--s6) var(--s4) var(--s8); }
  .detail { padding: var(--s4) var(--s4) var(--s8); }
  .dock { left: var(--s2); right: var(--s2); bottom: var(--s2); width: auto; }
  .popover { width: min(340px, calc(100vw - 24px)); max-height: calc(52vh - 60px); }
  .legend-box { display: none; }
  .gsearch { position: static; }
  .gsearch__panel { top: 56px; left: var(--s3); right: var(--s3); width: auto; }
}
@media (max-width: 575px) {
  .top { column-gap: var(--s3); padding: 0 var(--s4) var(--s1); grid-template-columns: auto 1fr; grid-template-rows: 56px auto auto; row-gap: var(--s2); }
  .top__actions { grid-column: 1 / -1; justify-self: start; }
  .brand__name, .clock { display: none; }
  .gsearch__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabs--views button { padding: 0 var(--s2); }
  .seg button { padding: 0 var(--s2); }
  .btn { padding: var(--s2); }
  .tile { min-height: 136px; padding: var(--s3); }
  .tile__n { font-size: var(--t-h-md); }
  .sit__line { font-size: var(--t-h-sm); }
  .tabs--sev button .num { display: none; }
  /* Pinch zooms on a phone; the buttons only collided with the map controls. */
  .maplibregl-ctrl-top-right { display: none; }
  .legend-box[open] { max-height: calc(100% - 176px); }
  .toasts { right: var(--s2); width: calc(100% - 16px); }
  .svc { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .seg button, .tabs button, .chip { min-height: 44px; }
}

.hbars { display: grid; gap: var(--s2); }
.hbar__l { display: block; font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.hbar__row { display: flex; align-items: center; gap: var(--s2); }
.hbar__b { height: 8px; border-radius: var(--r-xs); min-width: 2px; }
.hbar__v { font-size: var(--t-caption); color: var(--text); }
.vcols { position: relative; }
.vcols__max { position: absolute; right: 0; top: 0; font-size: var(--t-micro); color: var(--text-2); }
.vcols__plot { display: flex; align-items: flex-end; gap: var(--s0); height: 120px; border-bottom: 1px solid var(--border); padding-top: var(--s4); }
.vcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s0); }
.vcol__seg { display: block; border-radius: var(--r-xs) var(--r-xs) 0 0; }
.vcols__axis { display: flex; justify-content: space-between; font-size: var(--t-micro); color: var(--text-2); margin-top: var(--s1); }

/* ---- D3 charts --------------------------------------------------------------------------- */
.d3c { width: 100%; }
.d3c svg { display: block; overflow: visible; }
.d3c .lbl { fill: var(--text-2); font: 12px var(--sans); }
.d3c .val { fill: var(--text); font: 12px var(--mono); }
.d3c .tick, .d3axis text { fill: var(--text-2); font: 12px var(--mono); }
.d3axis path, .d3axis line { stroke: var(--border); }
.chart__scale { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--t-caption); color: var(--text-2); }
.chart__ramp { display: inline-block; width: 120px; height: 10px; border-radius: var(--r-xs); }
.sim-chart .chart + .chart { margin-top: var(--s6); }

/* ---- People: basic needs ------------------------------------------------------------------- */
.selectwrap--block { display: block; margin-bottom: var(--s3); }
.selectwrap--block select { width: 100%; }
.needhead__def { margin: 0 0 var(--s1); font-size: var(--t-caption); line-height: 1.43; }
.needhead__src { margin: 0 0 var(--s3); font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.needhead__src a, .needrow__src a { display: inline-flex; align-items: center; gap: var(--s1); }
.needlegend { display: grid; gap: var(--s1); margin-bottom: var(--s4); }
.needlegend__ramp { height: 10px; border-radius: var(--r-xs); }
.needlegend__ticks { display: flex; justify-content: space-between; font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.needlegend__ticks span:nth-child(2) { text-align: center; } .needlegend__ticks span:last-child { text-align: right; }
.needlegend__ticks b { color: var(--text); font-weight: 600; }
.needlegend__none { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-caption); color: var(--text-2); }
.needlegend__none .sw { width: 12px; height: 12px; border-radius: var(--r-xs); background: var(--surface); border: 1px solid var(--border); }
.country__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); }
.country__head h3 { font-size: var(--t-h-md); font-weight: 500; line-height: 1.25; }
.country__act { display: flex; align-items: center; gap: var(--s2); background: var(--primary-deep); border-radius: var(--r-xl); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); font-size: var(--t-caption); line-height: 1.43; }
.needrow { display: grid; gap: var(--s1); padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
.needrow__label { font-weight: 500; }
.needrow__src { font-size: var(--t-caption); color: var(--text-2); }
.gauge { display: grid; gap: var(--s1); }
.gauge__track { position: relative; height: 10px; border-radius: var(--r-xs); background: var(--card); border: 1px solid var(--border); }
.gauge__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-xs); }
.gauge__median { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.gauge__meta { font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.gauge__meta b { color: var(--text); }
.gauge__none { margin: 0; font-size: var(--t-caption); color: var(--text-2); }
.todo__frame { margin: 0 0 var(--s3); font-size: var(--t-caption); line-height: 1.5; color: var(--text-2); max-width: 72ch; }
.todo__h { margin: var(--s3) 0 var(--s1); font-size: var(--t-caption); font-weight: 600; color: var(--text); }
.opts { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: var(--s2); font-size: var(--t-caption); line-height: 1.5; color: var(--text-2); }
.opts li { display: grid; gap: 2px; padding-left: var(--s3); border-left: 2px solid var(--border-2); }
.opts__src { display: inline-flex; align-items: center; gap: var(--s1); justify-self: start; font-size: var(--t-micro); }
.opts__links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.optgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s3); }
.optcard { border: 1px solid var(--border-2); border-radius: var(--r-md); padding: var(--s3); }
.optcard .todo__h { margin-top: 0; }
.mapctl__row { flex-wrap: wrap; }
.gaps { margin: var(--s2) 0 0; padding-left: var(--s6); font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.gaps strong { color: var(--text); }

/* ---- Insights: briefing cards with sticker illustrations ----------------------------------- */
.insgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.ins { position: relative; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: var(--s1); text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s4); padding-top: var(--s3); cursor: pointer; color: var(--text); min-height: 196px; overflow: hidden; }
.ins:hover, .ins:focus-visible { border-color: var(--border-2); }
.ins:hover .ia, .ins:focus-visible .ia { transform: rotate(0deg) scale(1.06); }
.ins--signal { border-style: dashed; border-color: var(--border-2); }
.ia { width: 64px; height: 58px; transform: rotate(-4deg); transition: transform .2s var(--ease); justify-self: end; margin-bottom: calc(var(--s4) * -1); }
.ins:nth-child(even) .ia { transform: rotate(4deg); }
.ins__kind { font-size: var(--t-micro); font-weight: 600; line-height: 1.8; color: var(--text-2); }
.ins__big { font-size: var(--t-h-xl); font-weight: 500; line-height: 1.2; margin: 0; }
.ins__title { font-weight: 600; line-height: 1.43; font-size: var(--t-caption); }
.ins__line { font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.ins__more { font-size: var(--t-caption); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.insd__hero { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s2); }
.insd__hero .ia { width: 88px; height: 80px; margin: 0; }
.ia-draw { stroke-dasharray: 120; animation: ia-draw 2.4s linear infinite; }
.ia-flash { animation: sc-flash 3s steps(1) infinite; }
.ia-flicker { animation: sc-flicker 1.4s steps(2) infinite; }
.ia-pulse { transform-origin: 40px 38px; animation: ia-pulse 2.4s ease-in-out infinite; }
.ia-grow { transform-origin: bottom; transform-box: fill-box; animation: ia-grow 2.8s ease-in-out infinite; }
.ia-needle { transform-origin: 40px 56px; animation: ia-needle 3.2s ease-in-out infinite; }
.ia-drop { animation: ia-drop 2.6s ease-in-out infinite; }
.ia-rise { animation: sc-float 2.2s ease-in-out infinite; }
.ia-wave { animation: sc-drift 3s ease-in-out infinite; }
.ia-orbit { animation: sc-spin 12s linear infinite; }
@keyframes ia-draw { from { stroke-dashoffset: 120; } to { stroke-dashoffset: -120; } }
@keyframes ia-pulse { 50% { transform: scale(1.08); } }
@keyframes ia-grow { 0%, 100% { transform: scaleY(.85); } 50% { transform: scaleY(1); } }
@keyframes ia-needle { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(40deg); } }
@keyframes ia-drop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (max-width: 575px) { .insgrid { grid-template-columns: 1fr; } .ins { min-height: 0; } }

/* ---- Lenses ------------------------------------------------------------------------------------ */
.lensbar { position: absolute; z-index: 4; bottom: 48px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); max-width: min(720px, calc(100% - 24px)); background: var(--primary-deep); color: var(--on-primary); border: 1px solid var(--primary); border-radius: var(--r-xl); padding: var(--s2) var(--s4); font-size: var(--t-caption); line-height: 1.43; }
.badge--lens { background: var(--primary-deep); border-color: var(--primary); }
.game { border-top: 1px solid var(--border); margin-top: var(--s2); padding-top: var(--s2); }
.game__h { margin: 0 0 var(--s1); font-size: var(--t-caption); }
.game__t { margin: 0 0 var(--s2); font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.game__t strong { color: var(--text); }
.gamefields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.gamefield { display: grid; gap: var(--s1); font-size: var(--t-micro); font-weight: 600; color: var(--text-2); }
.gamefield input { width: 100%; min-height: 44px; background: var(--on-primary); color: var(--ink-deep); border: 1px solid var(--hairline-cool); border-radius: var(--r-sm); padding: var(--s1) var(--s2); font: 500 var(--t-body) var(--mono); }

/* ---- Economy: prices, chokepoints, cascade map ------------------------------------------- */
.price { display: grid; grid-template-columns: 1fr 120px; grid-template-areas: "l s" "v s" "c a"; gap: var(--s1) var(--s3); align-items: center; padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
.price__l { grid-area: l; font-weight: 500; }
.price .sparkline { grid-area: s; width: 120px; height: 40px; }
.price__v { grid-area: v; font-size: var(--t-caption); }
.price__u { color: var(--text-2); }
.price__c { grid-area: c; font-size: var(--t-caption); color: var(--text-2); }
.price__s { grid-area: a; font-size: var(--t-micro); display: inline-flex; gap: var(--s1); align-items: center; justify-self: end; }
.mapnote { position: absolute; z-index: 2; top: 64px; left: var(--s3); max-width: min(420px, calc(100% - 24px)); display: flex; gap: var(--s2); align-items: flex-start; margin: 0; background: rgba(8,9,10,.92); color: var(--text-1); border: 1px solid var(--border); border-radius: var(--r-xs); padding: var(--s2) var(--s3); font-size: var(--t-caption); line-height: 1.43; }
body.is-sim .mapnote { display: none; }
.legend li.legend__head { display: block; margin-top: var(--s2); font-size: var(--t-micro); font-weight: 600; color: var(--text-2); }
.legend li.legend__head:first-child { margin-top: 0; }
.swatch--shape { flex: none; }
.slider__name { display: inline-flex; align-items: center; gap: var(--s2); }
.cm { overflow-x: auto; }
.cm svg { width: 100%; min-width: 560px; max-height: 260px; height: auto; display: block; }
.cm__edge { fill: none; stroke: var(--border-2); stroke-width: 2; stroke-dasharray: 5 4; }
.cm__edge.is-on { stroke: var(--alert); stroke-width: 3; stroke-dasharray: none; animation: cm-flow 1.2s linear infinite; stroke-dasharray: 10 6; }
@keyframes cm-flow { to { stroke-dashoffset: -16; } }
.cm__node { width: 100%; height: 100%; display: grid; align-content: center; gap: 2px; text-align: left; padding: var(--s1) var(--s3); border-radius: var(--r-xl); border: 2px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font: inherit; }
.cm__node--on { border-color: var(--alert); }
.cm__node--nodata { border-style: dashed; color: var(--text-2); }
.cm__node:hover, .cm__node:focus-visible { border-color: var(--text); }
.cm__l { font-size: 13px; font-weight: 600; line-height: 1.2; }
.cm__v { font-size: 12px; color: var(--text-2); line-height: 1.3; }

/* ---- Type boards: overview first, list second --------------------------------------------- */
.bd { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--s3); }
.bd__tile { display: grid; grid-template-rows: auto auto auto auto 1fr; gap: var(--s1); text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s3); cursor: pointer; color: var(--text); min-height: 168px; position: relative; overflow: hidden; }
.bd__tile:hover, .bd__tile:focus-visible { border-color: var(--text); }
.bd__tile--hot { border-color: rgba(242,114,47,.6); }
.bd__tile:hover .bd-art, .bd__tile:focus-visible .bd-art { transform: scale(1.08) rotate(0deg); }
.bd-art { width: 64px; height: 58px; transform: rotate(-3deg); transition: transform .2s var(--ease); }
.bd__tile:nth-child(even) .bd-art { transform: rotate(3deg); }
.bd__n { font-size: var(--t-h-md); font-weight: 500; line-height: 1.1; }
.bd__l { font-weight: 600; font-size: var(--t-caption); line-height: 1.3; }
.bd__m { font-size: var(--t-micro); color: var(--text-2); line-height: 1.5; letter-spacing: .1px; }
/* Severity label in text colour with its swatch: severity red as text was 3.4:1. */
.bd__sev { color: var(--text); display: inline-flex; align-items: center; gap: var(--s1); }
.bd__bar { display: flex; gap: 2px; height: 6px; align-self: end; border-radius: var(--r-xs); overflow: hidden; }
.bd__bar span { display: block; }
.bd--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); }
.bd--wide .bd__tile { min-height: 0; }
.bd__pv { display: grid; gap: var(--s2); margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--border); }
.bd__r { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px var(--s2); min-width: 0; }
.bd__rt { font-size: var(--t-micro); line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.bd__rv { font-size: var(--t-micro); color: var(--text-2); white-space: nowrap; }
.bd__rb { grid-column: 1 / -1; height: 4px; background: var(--surface-2); border-radius: var(--r-xs); overflow: hidden; }
.bd__rb span { display: block; height: 100%; background: var(--primary); border-radius: var(--r-xs); }
.bd-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s3); }
.bd-head .bd-art { width: 80px; height: 72px; flex: none; }
.bd-head h3 { font-size: var(--t-h-sm); font-weight: 600; margin: var(--s1) 0; }
.bd-spin { animation: sc-spin 6s linear infinite; }
.bd-sway { animation: sc-sway 2.4s ease-in-out infinite; }
.bd-wave { animation: sc-drift 3s ease-in-out infinite; }
.bd-draw { stroke-dasharray: 120; animation: ia-draw 2.4s linear infinite; }
.bd-flicker { animation: sc-flicker 1.3s steps(2) infinite; }
.bd-rise { animation: sc-rise 3s ease-out infinite; }
.bd-rain { animation: sc-rain .9s linear infinite; }
.bd-pulse { animation: ia-pulse 2.4s ease-in-out infinite; }
.bd-drift { animation: sc-drift 4s ease-in-out infinite; }
.bd-slide { animation: bd-slide 2.6s ease-in infinite; }
.bd-drop { animation: ia-drop 2.6s ease-in-out infinite; }
.bd-dash { animation: bd-dash 1s linear infinite; }
@keyframes bd-slide { from { transform: translate(-8px, -10px); opacity: 0; } 30% { opacity: 1; } to { transform: translate(6px, 8px); opacity: 0; } }
@keyframes bd-dash { to { stroke-dashoffset: -12; } }

/* ---- Transport cards: cause, impact, recovery, efforts ---------------------------------------- */
.tr { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--card); padding: var(--s3) var(--s4); margin-bottom: var(--s2); }
.tr--news { border-style: dashed; border-color: var(--border-2); }
.tr__h { display: grid; grid-template-columns: 16px 1fr auto; gap: var(--s2); align-items: start; }
.tr__icon { color: var(--text); padding-top: 3px; }
.tr__t { background: none; border: 0; padding: 0; text-align: left; color: var(--text); font-weight: 600; cursor: pointer; line-height: 1.43; }
.tr__t:hover { text-decoration: underline; }
.tr__s { font-size: var(--t-micro); font-weight: 600; border-radius: var(--r-xs); padding: 0 var(--s2); background: var(--on-dark-faint); }
.tr__s--ongoing { background: var(--primary-deep); }
.tr__fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s4); margin: var(--s3) 0 var(--s2); }
.tr__f dt { font-size: var(--t-micro); font-weight: 600; color: var(--text-2); }
.tr__f dd { margin: 0; font-size: var(--t-caption); line-height: 1.43; }
.tr__na { color: var(--text-2); font-style: italic; }
.tr__m { margin: 0; font-size: var(--t-caption); color: var(--text-2); }
.tr__m a { display: inline-flex; align-items: center; gap: var(--s1); }
@media (max-width: 575px) { .tr__fields { grid-template-columns: 1fr; } }

/* ---- Crisis simulator ------------------------------------------------------------------ */
body.is-sim #map, body.is-sim .mapctl, body.is-sim .legend-box, body.is-sim .status { display: none; }
.sim-stage[hidden] { display: none; }
/* Block flow, not grid: an aspect-ratio scene inside an auto grid row overflowed its row and
   covered the picture key and the wellbeing chart. */
.sim-stage { position: absolute; inset: 0; overflow-y: auto; background: var(--surface); display: block; }
.sim-scene { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); aspect-ratio: 960 / 420; max-height: 62vh; width: 100%; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sim-chart { padding: var(--s4) var(--s6) var(--s6); }
.sim-badge { position: absolute; left: var(--s3); top: var(--s3); margin: 0; display: inline-flex; align-items: center; gap: var(--s2); background: var(--card); color: var(--on-primary); border-radius: var(--r-xs); padding: var(--s1) var(--s2); font-size: var(--t-micro); font-weight: 600; line-height: 1.8; }
/* Scene notes: the latest model events over the illustration, filled with their tone's data colour. */
.stickers { position: absolute; right: var(--s4); bottom: var(--s4); display: grid; gap: var(--s2); justify-items: end; max-width: min(420px, 70%); }
.sticker { margin: 0; padding: var(--s2) var(--s3); border: 1px solid var(--background); border-radius: var(--r-xl); font-weight: 600; font-size: var(--t-caption); line-height: 1.43; color: var(--ink-deep); animation: sticker-in .3s var(--ease) both; }

.sticker--negative { background: var(--alert); }
.sticker--positive { background: var(--primary-text); }
.sticker .num { margin-right: var(--s1); }
@keyframes sticker-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

.sim-read { border: 1px solid var(--border); background: var(--card); border-radius: var(--r-xl); padding: var(--s4); margin: var(--s3) 0; }
.sim-read p { margin: 0 0 var(--s2); }
.sim-read__state { font-weight: 500; }
.sim-read__text, .sim-read__when { color: var(--text-2); font-size: var(--t-caption); line-height: 1.43; }
.sim-read__when strong { color: var(--text); }
.sim-read__note { font-size: var(--t-micro); font-weight: 600; line-height: 1.8; margin-bottom: 0 !important; }
.sim-state { display: inline-block; font-size: var(--t-micro); font-weight: 600; line-height: 1.8; border-radius: var(--r-xs); padding: 0 var(--s2); color: var(--ink-deep); }
.sim-state--utopian { background: var(--text); }
.sim-state--stable { background: var(--text); }
.sim-state--strained { background: var(--on-dark-muted); }
.sim-state--crisis { background: var(--alert); }
.sim-state--collapse { background: var(--alert); outline: 2px solid var(--text); }
.sim-time { display: flex; gap: var(--s3); align-items: end; margin-bottom: var(--s3); }
.slider { display: block; margin-bottom: var(--s3); }
.slider--grow { flex: 1; margin-bottom: 0; }
.slider__top { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--t-caption); line-height: 1.43; margin-bottom: var(--s1); }
.slider__top output { color: var(--text); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: none; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: var(--r-full); background: var(--border-2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: var(--r-full); background: var(--border-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: var(--r-full); background: var(--on-primary); border: 3px solid var(--card); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: var(--r-full); background: var(--on-primary); border: 3px solid var(--card); }
input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sim-more { border-top: 1px solid var(--border); padding: var(--s3) 0; }
.sim-more summary { cursor: pointer; font-size: var(--t-caption); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.sim-events { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s2); }
.sim-ev { display: grid; grid-template-columns: 76px 1fr; gap: var(--s2); font-size: var(--t-caption); line-height: 1.43; padding-left: var(--s2);  }

.sim-ev .num { color: var(--text-2); }
.sim-table { width: 100%; border-collapse: collapse; font-size: var(--t-caption); line-height: 1.43; margin-top: var(--s2); }
.sim-table th, .sim-table td { text-align: left; vertical-align: top; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--border); }
.sim-table thead th { font-size: var(--t-micro); font-weight: 600; }
.sim-table th[scope="row"] { font-weight: 400; color: var(--text-2); }

.scenekey-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) var(--s6); border-bottom: 1px solid var(--border); background: var(--card); }
.scenekey__h { font-size: var(--t-micro); font-weight: 600; color: var(--text-2); }
.scenekey { display: flex; flex-wrap: wrap; gap: var(--s2); }
.scenekey__item { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s1) var(--s3) var(--s1) var(--s2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); color: var(--text); cursor: help; text-align: left; }
.scenekey__item:hover, .scenekey__item:focus-visible { border-color: var(--text); }
.scenekey__l { display: block; font-size: var(--t-caption); line-height: 1.2; }
.scenekey__v { display: block; font-size: var(--t-micro); color: var(--text-2); }
.scenekey__tip { flex: 1 0 100%; margin: 0; font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.scg { transition: opacity .2s var(--ease); }
.sim-scene[data-focus] .scg { opacity: .12; }
.sim-scene[data-focus="wellbeing"] .scg--wellbeing, .sim-scene[data-focus="conflict"] .scg--conflict, .sim-scene[data-focus="health"] .scg--health,
.sim-scene[data-focus="climate"] .scg--climate, .sim-scene[data-focus="infra"] .scg--infra, .sim-scene[data-focus="ai"] .scg--ai { opacity: 1; }

/* Scene motion: meaning-carrying, slow, and off for reduced motion. */
.sc-spin { animation: sc-spin 4s linear infinite; }
.sc-sway { animation: sc-sway 4s ease-in-out infinite; }
.sc-drift { animation: sc-drift 9s ease-in-out infinite; }
.sc-float { animation: sc-float 5s ease-in-out infinite; }
.sc-rise { animation: sc-rise 3.5s ease-out infinite; }
.sc-flicker { animation: sc-flicker 1.2s steps(2) infinite; }
.sc-flash { animation: sc-flash 3s steps(1) infinite; }
.sc-rain { animation: sc-rain .9s linear infinite; }
.sc-hover { animation: sc-float 2.5s ease-in-out infinite; }
.sc-glow { animation: sc-glow 6s ease-in-out infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
@keyframes sc-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes sc-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(24px); } }
@keyframes sc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes sc-rise { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-40px); opacity: 0; } }
@keyframes sc-flicker { 50% { opacity: .55; } }
@keyframes sc-flash { 0%, 88% { opacity: 0; } 90%, 94% { opacity: 1; } }
@keyframes sc-rain { from { transform: translateY(0); opacity: 1; } to { transform: translateY(14px); opacity: 0; } }
@keyframes sc-glow { 50% { opacity: .85; } }
@media (max-width: 991px) {
  body.is-sim .mapzone { height: auto; }
  /* Play on a phone: the game is taller than the screen once it mounts. Holding a screen's
     height while it loads keeps the report below from being pushed down mid-read (CLS).
     Not when the game failed: that message is short. */
  .game-root:not(:has(> div.game-note)) { min-height: 100svh; }
  .sim-stage { position: relative; inset: auto; }
  .sim-scene { aspect-ratio: auto; height: 300px; }
  .sim-chart { padding: var(--s4); }
  .stickers { max-width: calc(100% - 32px); }
}

/* ---- Large screens and TVs: read from across a room ------------------------------------- */
/* TV: the type scale stepped up one notch so the smallest text stays legible at 3 m. */
@media (min-width: 1920px) {
  :root { --t-micro: 12px; --t-caption: 16px; --t-eyebrow: 17px; --t-body: 18px; --t-h-sm: 22px; --t-h-md: 28px; --t-h-xl: 36px; --report-w: 560px; --header: 124px; }
}
:root.tv { --t-micro: 14px; --t-caption: 20px; --t-eyebrow: 22px; --t-body: 22px; --t-h-sm: 28px; --t-h-md: 36px; --t-h-xl: 48px; --report-w: 640px; --header: 140px; }
:root.tv :focus-visible { outline-width: 4px; outline-offset: 4px; }
:root.tv .btn--pro, :root.tv #open-pro { display: none; } /* no forms on a wall screen */
:root.tv .chart__plot .lbl, :root.tv .d3c .lbl { font-size: 16px; }
:root.tv .d3axis text, :root.tv .d3c .tick { font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.mapfail { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s3); padding: var(--s6); text-align: center; color: var(--text-2); background: var(--surface); }
.mapfail p { max-width: 420px; margin: 0; }
.mapfail strong { color: var(--text); }
@media (max-width: 991px) { .legend-box { display: block; } }

/* ---- Spacing pass (2026-11-16): breathing room everywhere ------------------------------------ */
/* Sections and their parts */
.sec { padding: var(--s8) var(--s6) var(--s10); }
.sec__head { margin-bottom: var(--s5); }
.sec__intro { margin-bottom: var(--s5); }
.sec__foot { margin-top: var(--s5); }
.grp { margin: var(--s6) 0 var(--s2); }
.empty { padding: var(--s4) 0; }
/* Charts: space between title, plot, legend and table */
.chart { margin: 0 0 var(--s8); }
.chart figcaption { margin-bottom: var(--s4); }
.chart__note { margin-top: var(--s1); }
.chart__legend { margin: 0 0 var(--s4); gap: var(--s2) var(--s5); }
.d3c { padding: var(--s2) 0; }
/* "View as table" toggles: a real control with padding, not a bare line */
.chart__table, .sim-more { margin-top: var(--s4); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 0 var(--s4); background: var(--card); }
.sim-more { border-top: 1px solid var(--border); }
.chart__table summary, .sim-more summary, .fc__more summary { padding: 0 var(--s1); border-radius: var(--r-md); }
.chart__table[open], .sim-more[open] { padding-bottom: var(--s4); }
.chart__table table, .sim-table { margin-top: var(--s2); }
/* Tables: comfortable cells */
.chart__table th, .chart__table td, .sim-table th, .sim-table td { padding: var(--s3) var(--s4); }
.chart__table th:first-child, .chart__table td:first-child, .sim-table th:first-child, .sim-table td:first-child { padding-left: var(--s2); }
/* Lists and rows */
.item, .srow, .fc { padding: var(--s3); margin: 0 calc(var(--s3) * -1); width: calc(100% + var(--s6)); }
.item + .item, .fc + .fc { margin-top: var(--s1); }
/* Cards and tiles */
.bd { gap: var(--s4); }
.bd__tile { padding: var(--s4); gap: var(--s2); }
.tr { padding: var(--s4) var(--s5); margin-bottom: var(--s3); }
.tr__fields { gap: var(--s3) var(--s5); margin: var(--s4) 0 var(--s3); }
.bd-head { gap: var(--s5); margin-bottom: var(--s5); }
.sim-read { padding: var(--s5); margin: var(--s4) 0; }
/* Simulator stage */
.sim-chart { padding: var(--s8) var(--s8) var(--s10); }
.scenekey-row { padding: var(--s4) var(--s8); gap: var(--s3) var(--s4); }
.sim-badge { left: var(--s4); top: var(--s4); }
.stickers { right: var(--s5); bottom: var(--s5); }
/* Map overlays: keep clear of the edges */
.legend-box { padding: var(--s2) var(--s5) var(--s3); }
.dock { right: var(--s4); bottom: var(--s4); }
.dock__head { padding: var(--s3); }
.dock__caption { padding: var(--s3) var(--s4); }
@media (max-width: 575px) {
  .sec { padding: var(--s6) var(--s4) var(--s8); }
  .sim-chart { padding: var(--s6) var(--s4) var(--s8); }
  .scenekey-row { padding: var(--s3) var(--s4); }
  .chart__table th, .chart__table td, .sim-table th, .sim-table td { padding: var(--s2) var(--s3); }
}
.price { grid-template-areas: "l s" "v s" "c c" "a a"; gap: var(--s2) var(--s4); padding: var(--s4) 0; }
.price__s { justify-self: start; }
.headline, .feed-item { padding: var(--s3); margin: 0 calc(var(--s3) * -1); width: calc(100% + var(--s6)); }
.ins { padding: var(--s5); padding-top: var(--s4); gap: var(--s2); }
.insgrid { gap: var(--s4); }

/* ---- Simulator v2: key numbers, network, decisions, story, endings ------------------------ */
.kpis { padding: var(--s4) var(--s6); border-bottom: 1px solid var(--border); }
.kpis__h { margin: 0 0 var(--s3); font-size: var(--t-caption); font-weight: 700; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.kpis__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--s2); }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s3); display: grid; gap: 2px; align-content: start; }
.kpi p { margin: 0; }
.kpi__l { display: flex; gap: var(--s1); align-items: center; font-size: var(--t-micro); font-weight: 600; color: var(--text-2); }
.kpi__v { font-size: var(--t-h-md); font-weight: 700; line-height: 1.2; }
.kpi__d, .kpi__s { font-size: 12px; line-height: 1.4; color: var(--text-2); }
.kpi__s a { color: var(--text-2); }
.kpi--ai { border-color: var(--primary); }
.kpis__foot { margin: var(--s2) 0 0; font-size: 12px; color: var(--text-2); }
.shockbar { margin: 0; padding: var(--s3) var(--s6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); border-bottom: 1px solid var(--border); background: rgba(242,114,47,.08); font-size: var(--t-caption); }
.sim-badge--inline { position: static; margin-left: auto; }

.cn { overflow-x: auto; }
.cn svg { width: 820px; max-width: none; height: auto; display: block; } /* fixed at 820 of 900 units (0.91): text in user units below then renders at 12px or more; narrow panels scroll */
.cn__edge { fill: none; stroke: var(--border-2); transition: opacity .2s var(--ease); }
.cn__edge.is-hot { stroke: var(--alert); }
.cn__edge.is-user { stroke: var(--primary-text); stroke-dasharray: 4 4; }
.cn__edge.is-assumed { stroke-dasharray: 1.5 4; stroke-linecap: round; } /* model assumption: dotted, never solid */
.cn__edge.is-faded { opacity: .05 !important; }
.cn svg[data-focused] .cn__edge:not(.is-faded) { opacity: 1 !important; }
.cn__node { cursor: default; outline: none; }
.cn__box { fill: var(--surface-2); stroke: var(--border); stroke-width: 1; transition: stroke .15s var(--ease); }
.cn__node:hover .cn__box { stroke: var(--border-2); }
.cn__node:focus-visible .cn__box { stroke: var(--focus); stroke-width: 2; }
.cn__node.is-chain .cn__box { stroke: var(--text); stroke-width: 1.5; }
.cn__node.is-shocked .cn__box { stroke: var(--alert); stroke-width: 1.5; }
.cn__node.is-dim { opacity: .4; }
.cn__i { fill: var(--text-2); }
.cn__l { font-family: var(--font-display); font-size: 14px; font-weight: 600; fill: var(--text); }
.cn__v { font-family: var(--font-body); font-size: 13.5px; font-variant-numeric: tabular-nums; fill: var(--text); }
.cn__sub { font-family: var(--font-body); font-size: 13.5px; fill: var(--text-2); }
.cn__sub.is-shocked { fill: var(--alert); }
.cn__track { fill: var(--border); }
.cn__h { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; fill: var(--text-2); }
.sw--dash { background-image: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px); }
.sw--dot { background: repeating-linear-gradient(90deg, var(--accent) 0 2px, transparent 2px 5px) !important; }

.decs { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.dec { border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s3); background: var(--card); }
.dec.is-due { border-color: var(--alert); background: var(--surface-2); }
.dec__due { display: inline-block; margin-left: auto; font-size: var(--t-micro); font-weight: 700; color: var(--background); background: var(--alert); border-radius: var(--r-xs); padding: 0 var(--s2); }
.dec p { margin: 0 0 var(--s2); }
.dec__h { display: flex; align-items: center; gap: var(--s2); }
.dec__when, .dec__fx, .dec__today { font-size: var(--t-caption); line-height: 1.43; color: var(--text-2); }
.dec__fx { color: var(--text); }
.dec__today { margin-bottom: 0 !important; }

.chapter { border-left: 1px solid var(--border-2); padding: 0 0 var(--s3) var(--s3); margin-left: var(--s1); }
.chapter.is-past { border-left-color: var(--primary-text); } /* a timeline rail: past half-years are lit */
.chapter__h { margin: 0 0 var(--s2); font-size: var(--t-body); font-weight: 700; line-height: 1.4; }
.chapter__h .num { display: inline-block; font-size: var(--t-micro); font-weight: 600; color: var(--ink-deep); background: var(--on-dark-muted); border-radius: var(--r-xs); padding: 0 var(--s2); margin-right: var(--s2); vertical-align: 2px; }
.chapter ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.chapter__ev { display: grid; grid-template-columns: 16px 1fr; gap: var(--s2); font-size: var(--t-caption); line-height: 1.5; color: var(--text-2); }
.chapter__ev strong { color: var(--text); }
.chapter__ev--negative .ico { color: var(--alert); }
.chapter__ev--positive .ico { color: var(--primary-text); }
.scen { display: block; color: var(--text); font-size: 12px; margin-top: 2px; }

.endings { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.ending { border-top: 1px solid var(--border); padding: var(--s3) 0 0; display: grid; gap: var(--s1); align-content: start; }
.ending p { margin: 0; }
.ending__l { font-weight: 700; font-size: var(--t-caption); }
.ending__s { font-size: var(--t-caption); color: var(--text-2); }
.ending__m { list-style: none; margin: var(--s1) 0; padding: 0; display: grid; gap: 2px; font-size: 12px; }
.ending__m li { display: flex; justify-content: space-between; gap: var(--s2); color: var(--text-2); }
.ending__m li span:last-child { color: var(--text); text-align: right; }
.ending__f { font-size: 12px; color: var(--text-2); line-height: 1.4; }

/* ---- Chain reactions ---------------------------------------------------------------------- */
.chain-stage .chart { margin: var(--s4) var(--s6); }
.chain-empty { display: grid; place-items: center; text-align: center; gap: var(--s3); padding: var(--s10) var(--s6); max-width: 560px; margin: 10vh auto 0; color: var(--text-2); }
.chain-empty h2 { margin: 0; color: var(--text); font-size: var(--t-h-sm); }
.pt { overflow: auto; max-height: 60vh; }
.chart__plot .pt svg { display: block; width: auto; max-width: none; } /* keeps its size; the box scrolls */
.pt__edge { fill: none; stroke: var(--alert); opacity: .55; }
.pt__box rect { fill: var(--card); stroke: var(--border-2); stroke-width: 1.5; }
.pt__box.is-chain { cursor: pointer; color: var(--text); }
.pt__box.is-chain:hover rect, .pt__box.is-chain:focus-visible rect { stroke: var(--text); }
.pt__box:focus-visible { outline: none; }
.pt__box:focus-visible rect { stroke: var(--focus); stroke-width: 3; }
.pt__l { font-size: 12px; font-weight: 600; fill: var(--text); }
.pt__s { font-size: 12px; fill: var(--text-2); font-variant-numeric: tabular-nums; }

/* Outcomes: one story, top to bottom. Numbers big, labels small, one idea per line. */
.schips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) var(--s6); border-bottom: 1px solid var(--border); background: rgba(242,114,47,.06); }
.schips__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1); min-width: 0; }
.schip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 0 2px 0 var(--s2); border: 1px solid var(--border-2); border-radius: var(--r-full); background: var(--surface); font-size: 12px; line-height: 1.2; }
.schip > .ico { color: var(--alert); flex: none; }
.schip__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 46ch; }
.schip__ev { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-full); background: none; color: var(--text-2); cursor: pointer; }
.schip__ev:hover, .schip__ev:focus-visible { color: var(--text); background: var(--surface-2); }
.schip:not(:has(.schip__ev)) { padding-right: var(--s2); }
.schips .sim-badge--inline { margin-left: auto; }
.story { padding: var(--s5) var(--s6) var(--s6); max-width: 1040px; }
.story__h { margin: 0 0 var(--s2); font-size: var(--t-h-sm); line-height: 1.3; }
.story__lead { margin: 0 0 var(--s2); font-size: var(--t-body); line-height: 1.45; max-width: 64ch; }
.story__lead .num { font-weight: 600; }
.story__honest { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: 12px; font-weight: 600; color: var(--text); }
.story__sub { margin: -2px 0 var(--s2); font-size: var(--t-caption); color: var(--text-2); }
.oc__facts dd.oc__line { display: block; }
.story__note, .story__rare { margin: 0 0 var(--s3); font-size: 12px; color: var(--text-2); }
.ocards { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s3); align-items: stretch; }
/* Cards share their rows (subgrid), so When, Main chain, What tips it, the figures and Impact line up across cards. */
.oc { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--card); padding: var(--s4); display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0; min-width: 0; }
@supports not (grid-template-rows: subgrid) { .oc { grid-row: auto; grid-template-rows: none; row-gap: var(--s2); } }
.oc.is-on { border-color: var(--primary-text); outline: 1px solid var(--primary-text); outline-offset: -2px; }
.oc__pick { display: grid; gap: var(--s1); width: 100%; text-align: left; background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; font: inherit; min-height: 44px; border-radius: var(--r-sm); }
.oc__pick:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.oc__share { display: flex; align-items: baseline; gap: var(--s1); }
.oc__n { font: 600 var(--t-h-md)/1 var(--font-display); }
.oc__of { font-size: 12px; color: var(--text-2); }
.oc__name { font: 600 var(--t-caption)/1.3 var(--font-display); }
.oc__bar { height: 4px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.oc__bar span { display: block; height: 100%; background: var(--primary-fill); }
.oc.is-on .oc__bar span { background: var(--primary-text); }
.oc__facts { display: contents; }
.oc__facts > div { display: grid; align-content: start; gap: var(--s1); border-top: 1px solid var(--border); padding: var(--s3) 0; min-width: 0; }
.oc__pick { padding-bottom: var(--s3) !important; }
.oc__facts dt { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: var(--s1); }
.oc__facts dd { margin: 0; font-size: 13px; line-height: 1.4; display: grid; gap: 2px; }
.oc__dim { display: block; font-size: 12px; color: var(--text-2); }
.oc__chain { display: flex !important; flex-wrap: wrap; align-items: center; gap: var(--s1); font-size: 12px; }
.oc__chain .step { padding: 1px 6px; }
.oc__chain .oc__dim { flex-basis: 100%; }
.oc__nums { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.oc__nums li { display: grid; gap: 0; }
.oc__delta { white-space: nowrap; }
.oc__delta::before { content: '· '; }
.oc__v { font: 600 var(--t-body)/1.2 var(--font-display); }
.oc__l { font-size: 12px; color: var(--text-2); }
.oc__act { align-self: end; padding-top: var(--s1); min-width: 0; }
.oc__act:empty { padding: 0; }
.oc__go { max-width: 100%; white-space: normal; text-align: left; height: auto; }
.info { margin: 0 0 var(--s3); }
.info summary { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; cursor: pointer; font-size: 12px; color: var(--text-2); }
.info summary:hover { color: var(--text); }
.info .sec__foot { font-size: 12px; margin: 0; }
.info__list { margin: 0 0 var(--s2); padding-left: var(--s5); display: grid; gap: var(--s1); font-size: 12px; color: var(--text-2); max-width: 72ch; }
.story .chart { margin: var(--s4) 0; }
.chart__legend--sm { font-size: 12px; gap: var(--s1) var(--s3); }
.chart__legend .sw--ring { background: none; border: 2px solid; }
.chart__legend .sw--line { height: 2px; border-radius: 0; }
.every { margin-top: var(--s2); }
.every__fold { margin: 0 0 var(--s2); font-size: 12px; color: var(--text-2); max-width: 72ch; }
.every__fold strong { color: var(--text); }
.pt__box.is-start rect { stroke: var(--alert); }
.pt__box.is-every rect { fill: var(--background); stroke-dasharray: 3 3; }
.pt__box.is-every .pt__s { fill: var(--text-2); }
.stiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-bottom: var(--s3); }
.stile { display: grid; gap: var(--s1); text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s3); color: var(--text); cursor: pointer; min-height: 88px; font: inherit; align-content: start; }
.stile .ico { color: var(--alert); }
.stile.is-on { border-color: var(--primary-text); box-shadow: inset 0 0 0 1px var(--primary-text); background: var(--primary-tint); }
.stile__l { font-weight: 600; font-size: var(--t-caption); line-height: 1.35; }
.stile__m { font-size: 12px; color: var(--text-2); line-height: 1.35; }

.ctiles { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.ctile { display: grid; grid-template-columns: 28px 1fr; gap: var(--s1) var(--s2); text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s3); color: var(--text); cursor: pointer; font: inherit; }
.ctile:hover, .ctile:focus-visible { border-color: var(--text); }
.ctile__rank { grid-row: span 4; font-size: var(--t-h-sm); font-weight: 700; color: var(--alert); }
.ctile__steps, .chain-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); font-size: var(--t-caption); font-weight: 600; }
.step { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 2px var(--s2); }
.step__arrow { color: var(--alert); }
.ctile__bar { height: 6px; border-radius: var(--r-full); background: var(--on-dark-faint); overflow: hidden; }
.ctile__bar span { display: block; height: 100%; background: var(--primary); border-radius: var(--r-full); }
.ctile__meta { font-size: 12px; color: var(--text-2); }
.ctile__odds { font-size: 12px; color: var(--text-2); }
.csteps { list-style: decimal; margin: var(--s3) 0; padding-left: var(--s5); display: grid; gap: var(--s3); }
.csteps li::marker { color: var(--accent); font-weight: 700; }
.cstep { padding-left: var(--s1); }
.cstep p { margin: 0 0 var(--s1); font-size: var(--t-caption); line-height: 1.43; }
.cstep__h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.odds-aside { border: 1px dashed var(--border-2); border-radius: var(--r-xl); padding: var(--s3); margin-bottom: var(--s3); }
.odds-aside p { margin: 0 0 var(--s1); font-size: var(--t-caption); }

.links { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s1); }
.linkrow { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); border-bottom: 1px solid var(--border); padding: var(--s1) 0; font-size: var(--t-caption); }
.linkrow.is-off { opacity: .55; }

.linkrow__on { display: flex; gap: var(--s2); align-items: flex-start; min-height: 44px; cursor: pointer; }
.linkrow__on input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--alert); }
.linkrow__why { display: block; font-size: 12px; color: var(--text-2); }
.linkrow select, .linkadd select { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-md); min-height: 36px; padding: 0 var(--s2); font: inherit; font-size: var(--t-caption); }
.linkadd { margin-bottom: var(--s3); }
.linkadd__row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s2); margin-bottom: var(--s2); }
.linkadd__row label { display: grid; gap: 2px; font-size: 12px; color: var(--text-2); }

@media (max-width: 575px) {
  .top__actions { flex-wrap: wrap; gap: var(--s2); margin-left: 0; }
  .kpis, .shockbar { padding-left: var(--s4); padding-right: var(--s4); }
  .chain-stage .chart { margin: var(--s4); }
  .chain-stage .story .chart { margin: var(--s4) 0; }
  .schips { padding: var(--s2) var(--s4); }
  .story { padding: var(--s4) var(--s4) var(--s5); }
  .endings, .stiles { grid-template-columns: 1fr; }
}

/* ---- Type roles ----------------------------------------------------------------------------- */
/* Onest is loaded at 600 only: headings, section titles, tile and card titles, brand. */
h1, h2, h3, h4, .sec__head h2, .grp, .detail h2, .tile__t, .bd__t, .chart__title, .kpis__h, .ending__l, .chapter__h, .dec__h strong, .chain-empty h2, .popover__head h2, .sit__line {
  font-family: var(--font-display); font-weight: 600;
}
.sec__head h2 { font-size: var(--t-h-sm); line-height: 1.3; }
body { font-size: 15px; line-height: 1.55; }
.sec__intro, .sec__foot, .detail p, .sim-read p, .chapter__ev, .dec p, .chain-empty p, .answer__text { max-width: 72ch; }
.fullres__list { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.fullres .grp .num { color: var(--text-2); font-family: var(--font-body); font-weight: 400; }

/* ---- Investigation, knowledge states and the Simulator as the place work leads (2026-11-19) ----
   The Simulator and Chain reactions sit right after Overview in the tab row. The
   Simulator's tab carries the primary hue so it reads as the destination. */
.tabs--views .tab--sim .ico { color: var(--primary-text); }
.tabs--views .tab--sim[aria-selected="true"] { border-color: var(--primary-text); }

/* The forward action: simulate. Filled with the primary, never full width. */
.btn--go { background: var(--primary-fill); color: var(--text); }
.btn--go:hover { background: var(--primary-hover); }
.acts { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s4) 0; }
.btn[aria-pressed="true"] .ico { color: var(--primary-text); }

/* Knowledge states: four labels, four outlines. Text says which; the outline only repeats it. */
.kstate { display: inline-block; font-size: var(--t-micro); font-weight: 600; line-height: 1.8; padding: 0 var(--s2); border-radius: var(--r-xs); border: 1px solid var(--border-2); color: var(--text); white-space: nowrap; vertical-align: 1px; }
.kstate--observed { background: var(--card); }
.kstate--documented { border-color: var(--primary-text); }
.kstate--assumed { border-style: dashed; color: var(--text-2); }
.kstate--simulated { background: var(--primary-deep); border-color: var(--primary); }
.kstates { display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0 0 var(--s3); }

/* The selection tray: above the report in every view while it holds anything. */
.tray { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--border-2); padding: var(--s3) var(--s6); }
.tray__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.tray__t { margin: 0; font-size: var(--t-caption); }
.tray__list { list-style: none; margin: var(--s2) 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.pick { display: inline-flex; align-items: center; max-width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); }
.pick__open { display: inline-flex; align-items: center; gap: var(--s1); min-width: 0; min-height: 32px; padding: var(--s1) var(--s1) var(--s1) var(--s3); background: none; border: 0; color: var(--text); font: inherit; font-size: var(--t-micro); text-align: left; cursor: pointer; }
.pick__open span { max-width: 36ch; }
@media (pointer: coarse) { .pick__open, .pick__x { min-height: 44px; } .pick__x { min-width: 44px; } }
.pick.is-gone .pick__open { color: var(--text-2); cursor: default; }
.pick__x { min-width: 32px; min-height: 32px; }
.tray__acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tray__hint { margin: var(--s2) 0 0; font-size: var(--t-micro); color: var(--text-2); }

/* Connection check */
.conn__lead { color: var(--text) !important; font-size: var(--t-body); }
.conn { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s3) var(--s4); margin: 0 0 var(--s3); }
.conn--documented { border-color: var(--primary-text); }
.conn--assumed { border-style: dashed; border-color: var(--border-2); }
.conn__v { margin: 0 0 var(--s1) !important; color: var(--text) !important; font-weight: 600; font-size: var(--t-caption); }
.conn__pair { margin: 0 0 var(--s2) !important; font-size: var(--t-caption); }
.conn__pair .link { text-align: left; }
.conn__obs { font-size: var(--t-caption); margin: 0 0 var(--s2) !important; }
.conn__links { margin: 0 0 var(--s2); padding-left: var(--s4); font-size: var(--t-caption); color: var(--text-2); }
.conn__links li { margin: 0 0 var(--s1); }
.conn__flag { display: block; color: var(--text); }

/* Simulator: mode switch, limits, starting points, comparison, hand-off to chains, game */
.sim-mode { margin: 0 0 var(--s4); }
.limits { margin: 0 0 var(--s4); padding: var(--s3) var(--s3) var(--s3) var(--s6); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); font-size: var(--t-caption); color: var(--text-2); }
.limits li { margin: 0 0 var(--s1); }
.startlist { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: var(--s1); }
.startlist li { display: flex; align-items: center; gap: var(--s2); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s1) var(--s1) var(--s1) var(--s3); font-size: var(--t-caption); }
.startlist li > span { flex: 1; min-width: 0; }
.sim-compare { margin-top: var(--s3); }
.handoff { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); }
.handoff p { display: flex; gap: var(--s2); align-items: flex-start; margin: 0; font-size: var(--t-caption); color: var(--text-2); max-width: 60ch; }
.handoff strong { color: var(--text); }
.shockbar--calm { background: var(--card); }
.game-wrap { position: relative; display: flex; flex-direction: column; gap: var(--s3); min-height: 100%; padding: var(--s4) var(--s6); }
.game-root { flex: 1; min-height: 420px; position: relative; }
.game-note { display: grid; place-items: center; text-align: center; gap: var(--s2); max-width: 520px; margin: 12vh auto 0; color: var(--text-2); }
.game-note p { margin: 0; }
@media (max-width: 991px) { .tray { position: static; } }
@media (max-width: 575px) {
  .tray { padding: var(--s3) var(--s4); }
  .game-wrap { padding: var(--s4); }
}

/* ---- Review fixes (2026-11-19) ---------------------------------------------------------------
   The time range is the one filled control in the header, so the current range reads at a
   glance; "API access (planned)" is an outline, because it is an interest form, not the
   product's main action. */
.top .seg button[aria-checked="true"] { background: var(--primary-fill); border-color: var(--primary-fill); color: var(--text); }
.top .seg button:not([aria-checked="true"]):hover { color: var(--text); }
.btn--pro { background: transparent; border: 1px solid var(--border-2); color: var(--text); font-weight: 600; }
.btn--pro:hover { background: var(--surface-2); border-color: var(--primary-text); }

/* Top 3 now: three rows, one line each: severity, what and where, source. */
.top3__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.top3__row { width: 100%; display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "sev t" "sev m"; align-items: center; column-gap: var(--s3); min-height: 44px; padding: var(--s2) var(--s3); background: var(--card); border: 1px solid var(--border-2); border-radius: var(--r-md); color: var(--text); text-align: left; cursor: pointer; line-height: 1.43; }
.top3__row:hover, .top3__row:focus-visible { border-color: var(--accent); }
.top3__sev { grid-area: sev; align-self: start; padding-top: 2px; display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-micro); font-weight: 600; }
.top3__sev .swatch { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.top3__t, .top3__m { min-width: 0; overflow-wrap: anywhere; }
.top3__t { grid-area: t; font-size: var(--t-caption); font-weight: 600; }
.top3__m { grid-area: m; font-size: var(--t-micro); color: var(--text-2); }
.top3 + #sec-insights .grp { margin-top: var(--s6); }

/* What to know now: Observed and "Market odds and signals" are separate groups. Observed
   cards are solid; odds, signals and model cards are hollow with a dashed edge, and every
   card names its kind first, in text. */
.insgrp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); margin: var(--s3) 0 var(--s2); font-family: var(--font-display); font-size: var(--t-caption); font-weight: 600; color: var(--text); }
.insgrp--other { margin-top: var(--s5); }
.insgrp__n { font-family: var(--font-body); font-weight: 400; font-size: var(--t-micro); color: var(--text-2); }
.ins { min-height: 0; padding: var(--s4); gap: var(--s1); border-color: var(--border-2); grid-template-rows: none; align-content: start; }
.ins .ia { width: 52px; height: 47px; margin-bottom: calc(var(--s3) * -1); }
.ins__kind { justify-self: start; padding: 0 var(--s2); border: 1px solid var(--border-2); border-radius: var(--r-xs); color: var(--text); background: var(--surface-2); position: absolute; top: var(--s4); left: var(--s4); }
.ins__title { font-size: var(--t-caption); color: var(--text); }
.ins__line { color: var(--text-2); }
.ins--forecast, .ins--signal, .ins--model { background: transparent; border-style: dashed; border-color: var(--border-2); }
.ins--forecast .ins__kind, .ins--signal .ins__kind, .ins--model .ins__kind { background: transparent; border-style: dashed; }
.tile--odds { background: transparent; border-style: dashed; border-color: var(--border-2); }

/* Map controls: one compact row, sized to the region shown, so they cover less of the map.
   The map's own padding (setPadding in main.js) keeps centred content below them. */
.mapctl__row { align-items: center; }
.selectwrap select { field-sizing: content; max-width: 220px; font-size: var(--t-caption); padding: var(--s1) 32px var(--s1) var(--s3); background-position: right 16px center, right 11px center; }
.btn--map { padding: var(--s1) var(--s3); font-weight: 600; }
@media (max-width: 575px) {
  .mapctl--tl { right: var(--s3); }
  .mapctl__row { flex-wrap: nowrap; gap: var(--s1); }
  .selectwrap select { max-width: 150px; }
}

/* Legend: open by default where there is room, kept short and scrolling inside itself. */
.legend-box { max-width: 260px; }
.legend-box[open] { max-height: min(42%, 320px); }

/* Export with the list it exports */
.exportrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s4); }
.exportrow__n { font-size: var(--t-micro); color: var(--text-2); }

/* Simulator preview: three steps, then a start */
.simsteps { list-style: none; counter-reset: st; margin: 0 0 var(--s3); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.simsteps li { counter-increment: st; display: grid; gap: 2px; align-content: start; background: transparent; border: 1px dashed var(--border-2); border-radius: var(--r-md); padding: var(--s3); font-size: var(--t-micro); line-height: 1.5; color: var(--text-2); }
.simsteps li::before { content: counter(st); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--t-h-sm); line-height: 1.3; color: var(--primary-text); }
.simsteps b { color: var(--text); font-size: var(--t-caption); font-weight: 600; }
@media (max-width: 575px) { .simsteps { grid-template-columns: 1fr; } .simsteps li { grid-template-columns: 24px 1fr; column-gap: var(--s2); } .simsteps li::before { grid-row: span 2; } }
