/* ============================================================================
   Situational Picture — design system.
   Dark, map-centric "intelligence operations" board with calm restraint:
   place names lead, plain language, four confidence colours used consistently.

   Everything is driven by the tokens in :root, so a future design pass can
   re-theme the whole app (or flip to a light basemap) by editing tokens only.

   Class names map 1:1 to what web/app.js emits, so the existing render
   functions wire in with minimal change. See the integrator notes returned
   alongside these files for the few markup tweaks that unlock the new look.
   ============================================================================ */

:root {
  /* ---- surface ramp (dark, single hue family) ---- */
  --bg:          #0c0f15;
  --panel:       #11151d;
  --panel-2:     #161b25;
  --panel-3:     #1c2330;
  --line:        #232b3a;
  --line-soft:   #1a212d;

  /* ---- ink ---- */
  --text:        #eef2f8;
  --text-2:      #aeb8c8;   /* secondary */
  --muted:       #6f7b8e;   /* tertiary / labels */
  --faint:       #4d586a;   /* hairline ink */

  /* ---- brand accent (selection, links, focus) ---- */
  --accent:      #4ea3ff;
  --accent-ink:  #08111f;
  --accent-soft: rgba(78,163,255,.14);

  /* ---- the four confidence-band colours (single source of truth) ----
     Kept in sync with web/app.js BANDS{} and the API. Re-theme here. */
  --band-high:    #ff5a52;  --band-high-soft:    rgba(255,90,82,.14);
  --band-medium:  #ffb13d;  --band-medium-soft:  rgba(255,177,61,.14);
  --band-low:     #4ea3ff;  --band-low-soft:     rgba(78,163,255,.14);
  --band-rumored: #8b93a4;  --band-rumored-soft: rgba(139,147,164,.14);

  /* ---- source-family colours (for the evidence timeline) ---- */
  --src-news:     #7fb4ff;  --src-news-soft:     rgba(127,180,255,.14);
  --src-sat:      #9b8cff;  --src-sat-soft:      rgba(155,140,255,.14);
  --src-thermal:  #ff9e5e;  --src-thermal-soft:  rgba(255,158,94,.14);

  /* ---- semantic ---- */
  --warn:   #ffb13d;
  --danger: #ef5a52;
  --ok:     #43d17a;

  /* ---- shape & rhythm ---- */
  --radius:    12px;
  --radius-sm: 9px;
  --radius-xs: 7px;
  --gap:       14px;
  --shadow:        0 8px 30px rgba(0,0,0,.45);
  --shadow-soft:   0 4px 16px rgba(0,0,0,.30);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ============================ base ============================ */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2a3344; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #354056; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ top bar ============================ */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #10141c, var(--panel));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #7fb4ff;
  background: radial-gradient(120% 120% at 30% 20%, #243049, #11151d);
  border: 1px solid #2c3650;
}
.logo svg { width: 18px; height: 18px; }
.brand-titles { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.product { font-size: 15px; font-weight: 660; letter-spacing: .2px; }
.theater { font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* summary strip (counts by confidence) */
.summary { display: flex; align-items: stretch; gap: 8px; justify-self: start; }
.stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px 13px; border-radius: var(--radius-xs);
  background: var(--panel-2); border: 1px solid var(--line-soft); min-width: 62px;
}
.stat .n { font-size: 17px; font-weight: 680; line-height: 1; letter-spacing: .2px; }
.stat .l {
  font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); font-weight: 600; margin-top: 3px;
}
.stat.total   .n { color: var(--text); }
.stat.high    .n { color: var(--band-high); }
.stat.medium  .n { color: var(--band-medium); }
.stat.low     .n { color: var(--band-low); }
.stat.rumored .n { color: var(--band-rumored); }

.topright { display: flex; align-items: center; gap: 12px; }
.you {
  font-size: 10.5px; color: var(--muted);
  display: flex; flex-direction: column; gap: 3px;
}
.you input {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 6px 9px; width: 132px; font-size: 13px; font-family: inherit;
}
.status {
  font-size: 12px; padding: 6px 11px; border-radius: 999px; white-space: nowrap;
  background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--text-2);
}
.status.ok  { color: var(--ok);     border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.status.off { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }

/* ============================ honesty bar ============================ */
.honesty-bar {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 18px;
  background: #0a0d12;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.honesty-bar .i { width: 16px; height: 16px; flex: none; color: var(--warn); }
.honesty-bar p { margin: 0; font-size: 12px; line-height: 1.45; max-width: 1100px; }
.honesty-bar strong { color: var(--text-2); font-weight: 650; }

/* ============================ shell (E5-T16) ============================
   One screen, three regions. Eleven tabs used to be eleven destinations stacked over a 396px
   sidebar; the shell is now:

     .shell        column: [ .shell-top (rail | map) ][ .region ]
     .shell-top    row:    the rail at a fixed width, the map taking the rest
     .region       the bottom region — one mode strip, one body, and a collapsed state

   The map is the hero: it is the only element that grows. Collapsing the region hands it those
   pixels and hides nothing but the region BODY — the mode strip stays put, which is what makes
   "collapse takes nothing away" true rather than a claim. */
.shell { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.shell-top { flex: 1; display: grid; grid-template-columns: 300px 1fr; min-height: 220px;
  overflow: hidden; }   /* a squeezed row clips inside the shell; it never overlaps the region */

/* ---- inspector: a third shell-top region beside the map (E5-T10) ----
   Home for E5-T11's time-series panel; this ticket only builds the region itself, empty and
   inert. It is a sibling of .rail and .mapwrap inside .shell-top's own grid, not an overlay
   floating on top of the map, so showing it means giving the row a third column — never showing
   it means the column is never templated, so it takes no width at all. Deliberately independent
   of the bottom region's own collapsed/admin state (see the "bottom region" block below): this
   is the TOP row, and toggling the inspector never touches those rules. */
.inspector[hidden] { display: none; }
.inspector {
  border-left: 1px solid var(--line); background: var(--panel);
  min-height: 0; overflow-y: auto; padding: 12px 14px;
}
body.has-inspector .shell-top { grid-template-columns: 300px 1fr 340px; }

/* ---- left rail: the world model ---- */
.rail {
  border-right: 1px solid var(--line); background: var(--panel);
  display: flex; flex-direction: column; min-height: 0;
}
.rail-search { padding: 10px 12px 8px; border-bottom: 1px solid var(--line-soft); }
.rail-search input {
  width: 100%; font: inherit; font-size: 12px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 6px 9px;
}
.rail-search input::placeholder { color: var(--faint); }
.rail-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 10px 14px; }
.rail-note { margin: 6px 2px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.rail-lbl {
  font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); margin: 12px 2px 6px;
}
.rail-body .rail-lbl:first-child { margin-top: 0; }
.rail-group, .rail-leaf {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  font: inherit; cursor: pointer; background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); color: var(--text-2);
}
.rail-group { padding: 5px 7px; font-size: 12px; font-weight: 600; color: var(--text); }
.rail-leaf { padding: 4px 7px 4px 20px; font-size: 11.5px; }
.rail-group:hover, .rail-leaf:hover { background: var(--panel-2); color: var(--text); }
.rail-group.on, .rail-leaf.on { background: var(--panel-3); border-color: #34415a; color: var(--text); }
.rail-leaf.on { border-left: 2px solid var(--band-high); }
.rail-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-n { margin-left: auto; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rail-band { margin-left: auto; font-size: 9px; letter-spacing: .4px; text-transform: uppercase; }
.rail-caret { color: var(--faint); font-size: 9px; width: 8px; flex: none; }
.rail-foot { border-top: 1px solid var(--line); padding: 9px 12px 11px; }
.rail-foot .rail-lbl { margin: 0 0 4px; }
.rail-admin { font-size: 11px; color: var(--muted); text-decoration: none; }
.rail-admin:hover { color: var(--accent); }

/* ---- the bottom region ---- */
.region { flex: none; display: flex; flex-direction: column; border-top: 1px solid var(--line);
  background: var(--panel); min-height: 0; }
/* The region takes a share of the window and the map keeps the rest, so a short laptop screen
   does not end up with a bottom region and a sliver of map. */
.region-body { height: min(32vh, 330px); display: flex; flex-direction: column; min-height: 0; }
body.region-tall .region-body { height: min(41vh, 420px); }
body.region-collapsed .region-body { display: none; }
.region-note { display: none; margin: 0; padding: 10px 16px; font-size: 11.5px; color: var(--muted); }
body.region-collapsed .region-note { display: block; }
.panel { overflow-y: auto; padding: 12px 14px 18px; flex: 1; min-height: 0; }

/* ---- the mode strip: the ONLY nav in the shell, and it belongs to the region ---- */
.modes {
  display: flex; align-items: center; gap: 2px; padding: 0 12px; height: 38px; flex: none;
  border-bottom: 1px solid var(--line-soft); overflow-x: auto;
}
body.region-collapsed .modes { border-bottom-color: transparent; }
.modes button {
  flex: none; padding: 6px 11px; font-size: 12px; cursor: pointer; font-family: inherit;
  font-weight: 550; color: var(--muted); white-space: nowrap;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  transition: background .14s, color .14s;
}
.modes button:hover { color: var(--text); background: var(--panel-2); }
.modes button.active { color: var(--text); background: var(--panel-3); border-color: #34415a; }
.modes button[hidden] { display: none; }
.modes .mode-sel.active { border-color: var(--accent); }
.modes-gap { flex: 1; min-width: 8px; }
.mode-ref { font-size: 11.5px; color: var(--faint); }
/* Sticky so the one control that gives the map the window is never scrolled off a narrow strip.
   It has to out-specify `.modes button`, or the transparent background there wins and the modes
   it is covering read through it. */
.modes .mode-toggle {
  color: var(--accent); position: sticky; right: 0; background: var(--panel);
  box-shadow: -10px 0 10px -6px var(--panel);
}

/* ---- operator tools (#/admin) — outside the analyst shell ---- */
.adminbar {
  display: none; align-items: center; gap: 12px; padding: 0 16px; height: 42px; flex: none;
  border-bottom: 1px solid var(--line-soft); background: var(--panel-2);
}
.adminbar-title { font-size: 12.5px; font-weight: 650; color: var(--text); }
.admin-nav { display: flex; gap: 4px; }
.admin-nav button {
  font: inherit; font-size: 12px; font-weight: 550; cursor: pointer; padding: 5px 11px;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.admin-nav button:hover { color: var(--text); background: var(--panel-3); }
.admin-nav button.active { color: var(--text); background: var(--panel-3); border-color: #34415a; }
.adminbar-back { margin-left: auto; font-size: 11.5px; color: var(--accent); text-decoration: none; }
body.admin-mode .shell-top { display: none; }
body.admin-mode .modes { display: none; }
body.admin-mode .region-note { display: none; }
body.admin-mode .adminbar { display: flex; }
body.admin-mode .region { flex: 1; }
body.admin-mode .region-body { height: auto; flex: 1; }

/* what the map is scoped to, set by a rail selection */
/* Left of the map, clear of Leaflet's zoom control, which sits at left:10 and is ~34px wide. */
.map-scope {
  position: absolute; left: 56px; top: 12px; z-index: 500;
  display: flex; align-items: center; gap: 8px;
  background: rgba(17,21,29,.9); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px 5px 12px;
  font-size: 11.5px; color: var(--text-2); max-width: 46%;
}
.map-scope[hidden] { display: none; }
.map-scope b { color: var(--text); font-weight: 620; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.map-scope button {
  font: inherit; font-size: 12px; line-height: 1; cursor: pointer; color: var(--muted);
  background: transparent; border: 0; padding: 2px 4px;
}
.map-scope button:hover { color: var(--text); }

/* ============================ map ============================ */
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: #0a0d12; }
.leaflet-container { background: #0a0d12; font-family: var(--font); }
.leaflet-control-zoom a {
  background: var(--panel-2) !important; color: var(--text-2) !important;
  border-color: var(--line) !important;
}
.leaflet-control-zoom a:hover { background: var(--panel-3) !important; color: var(--text) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: var(--shadow-soft) !important; }
.leaflet-control-attribution {
  background: rgba(12,15,21,.78) !important; color: var(--faint) !important; font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--muted) !important; }

/* map place-label (a divIcon app.js can drop next to each named cell) */
.place-label {
  background: transparent; border: 0; box-shadow: none;
  font-weight: 650; font-size: 11.5px; color: #fff; white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 3px #000, 0 0 2px #000, 0 0 6px #000;
}

/* small count chip over the map */
.map-chip {
  position: absolute; right: 14px; top: 12px; z-index: 500;
  display: flex; align-items: center; gap: 8px;
  background: rgba(17,21,29,.9); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px; font-size: 11.5px; color: var(--text-2);
}
.map-chip b { color: var(--text); font-weight: 650; }

/* plain-language confidence legend */
.legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 500; width: 272px;
  /* The expanded legend must never grow taller than the map it sits on. */
  max-height: calc(100% - 130px); overflow-y: auto;
  background: rgba(17,21,29,.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 13px 12px; box-shadow: var(--shadow);
}
.legend h4 {
  margin: 0 0 9px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--text-2);
}
.legend .row {
  display: grid; grid-template-columns: 13px 1fr; align-items: start; gap: 9px;
  padding: 3px 0; font-size: 11.5px; color: var(--text-2); line-height: 1.3;
}
.dot { width: 12px; height: 12px; border-radius: 3px; flex: none; margin-top: 1px;
  border: 1px solid rgba(255,255,255,.18); }
.legend .row b { color: var(--text); font-weight: 650; }

/* leaflet popups (used if app.js binds them) */
.leaflet-popup-content-wrapper {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.leaflet-popup-tip { background: var(--panel-2); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 11px 13px; font-size: 12.5px; }

/* ============================ generic bits ============================ */
.muted { color: var(--muted); }
.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); font-weight: 700; margin: 18px 0 9px;
}
.hint { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 4px 0 12px; }
.hint strong, .hint em { color: var(--text-2); font-style: normal; }

/* ---- feed: a date / band section label app.js can emit between cards ---- */
.feed-group {
  font-size: 10px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--faint); font-weight: 700;
  display: flex; align-items: center; gap: 10px; padding: 14px 6px 6px;
}
.feed-group::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.feed-group:first-child { padding-top: 4px; }

/* ============================================================================
   INCIDENT CARD — place name is the anchor.
   Markup app.js emits:
     .card[data-id] > .card-top ( .etype  +  .pill )  +  .meta
   The redesign promotes .etype to the place name (big), and folds the event
   type + source count into .meta. A left accent rail shows the band colour.
   ============================================================================ */
.card {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--band-rumored);   /* default; per-band below */
  border-radius: var(--radius-sm);
  padding: 12px 13px 12px 14px;
  margin: 8px 0;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .06s;
}
.card:hover { background: var(--panel-3); border-color: var(--line); }
.card:active { transform: translateY(1px); }
.card.sel,
.card.selected {
  background: var(--panel-3);
  border-color: #34415a;
  box-shadow: 0 0 0 1px var(--accent-soft) inset;
}
/* band accent rail — driven by a data attribute app.js can set (data-band),
   with a class fallback (.b-high etc.) if you prefer classes. */
.card[data-band="High"],    .card.b-high    { border-left-color: var(--band-high); }
.card[data-band="Medium"],  .card.b-medium  { border-left-color: var(--band-medium); }
.card[data-band="Low"],     .card.b-low     { border-left-color: var(--band-low); }
.card[data-band="Rumored"], .card.b-rumored { border-left-color: var(--band-rumored); }

.card .card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
/* THE PLACE NAME — largest, boldest thing in the card. app.js puts the place
   label in .etype; we override its old "capitalize event type" styling. */
.card .etype {
  font-size: 16px; font-weight: 680; letter-spacing: .15px; line-height: 1.18;
  color: var(--text); text-transform: none; min-width: 0;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
/* event type, when app.js nests it inside .etype as <span class="type"> */
.card .etype .type { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
/* warning glyph prefix app.js prepends ("⚠ ") sits quietly in amber */
.card .etype .warn-ico { color: var(--warn); font-size: 13px; }

.card .meta {
  margin-top: 7px; text-transform: none;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted);
}
.card .meta b { color: var(--text-2); font-weight: 650; }
.card .meta .sep { color: var(--faint); }
/* event type shown in the meta row reads as plain sentence case */
.card .meta .etype-text { text-transform: capitalize; color: var(--text-2); }

/* optional source-strength dots app.js can drop into .meta */
.card .src-dots { display: inline-flex; gap: 3px; }
.card .src-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); display: block; }
.card .src-dots i.on { background: currentColor; }

/* inline plain-language warning line at the bottom of a card */
.card .card-warn {
  margin-top: 8px; font-size: 11px; color: var(--warn); line-height: 1.35;
  display: flex; align-items: flex-start; gap: 6px;
}
.card .card-warn svg { width: 12px; height: 12px; flex: none; margin-top: 1px; }

/* ============================ confidence pills ============================ */
.pill {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .3px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; line-height: 1.4;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.high    { color: var(--band-high);    background: var(--band-high-soft); }
.pill.medium  { color: var(--band-medium);  background: var(--band-medium-soft); }
.pill.low     { color: var(--band-low);     background: var(--band-low-soft); }
.pill.rumored { color: var(--band-rumored); background: var(--band-rumored-soft); }

/* ============================ warnings ============================ */
.warnflag {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--band-medium-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  color: #f2d6a4; border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 12.5px; line-height: 1.45; margin: 8px 0;
}
.warnflag::before { content: "⚑"; color: var(--warn); flex: none; }

/* ============================================================================
   EVENT DETAIL VIEW
   app.js emits: .backlink, h2 (place + .pill), .muted (type), .code (ids),
   warnflags, .metrics(.metric .v/.k), .section-title, .evidence(.when/.src/
   blockquote), table.ctx, .field/.btnrow.
   ============================================================================ */
.backlink {
  color: var(--text-2); cursor: pointer; font-size: 12.5px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 12px;
}
.backlink:hover { color: var(--text); }

/* the detail title — the place name at hero size */
.panel h2 {
  font-size: 26px; font-weight: 720; letter-spacing: -.2px; line-height: 1.08;
  margin: 2px 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.panel h2 .pill { font-size: 11px; padding: 4px 11px; }

/* the event-type / distance subhead under the title */
.panel > .muted { font-size: 13.5px; color: var(--text-2); }
.panel > .muted[style] { text-transform: capitalize; }

/* internal ids — tucked away, monospace, quiet (this is the "technical ref") */
.code {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 7px 9px; margin: 10px 0 2px;
  line-height: 1.6; word-break: break-all;
}

/* the three big numbers */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.metric {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 11px 8px; text-align: center;
}
.metric .v { font-size: 21px; font-weight: 700; letter-spacing: .2px; }
.metric .k { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.25; }

/* ---- "Why this confidence?" — the confidence ledger ----
   Was a one-line assertion ("confirmed by several independent sources"). It now carries the
   per-family derivation the API ships, so it stacks vertically rather than sitting as an
   icon-plus-sentence row. */
.why {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-left: 4px solid var(--band-rumored);
  border-radius: var(--radius-sm); padding: 12px 13px; margin: 6px 0 4px;
}
.why[data-band="High"]    { border-left-color: var(--band-high); }
.why[data-band="Medium"]  { border-left-color: var(--band-medium); }
.why[data-band="Low"]     { border-left-color: var(--band-low); }
.why[data-band="Rumored"] { border-left-color: var(--band-rumored); }
.why .why-ico { flex: none; width: 18px; height: 18px; color: var(--text-2); margin-top: 1px; }
.why p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.why b { color: var(--text); font-weight: 650; }
.why-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.why-num {
  font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.why-lede { margin-top: 6px !important; font-size: 12px !important; color: var(--muted) !important; }
.why-rule { margin-top: 9px !important; font-size: 12px !important; }
.why-foot { margin-top: 7px !important; font-size: 11px !important; color: var(--muted) !important;
  border-top: 1px solid var(--line-soft); padding-top: 7px; }

.ledger { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 11.5px; }
.ledger th {
  text-align: left; font-weight: 600; font-size: 10px; letter-spacing: .5px;
  text-transform: uppercase; color: var(--faint); padding: 0 6px 5px 0;
  border-bottom: 1px solid var(--line-soft);
}
.ledger th:last-child, .ledger td:last-child { padding-right: 0; }
.ledger td { padding: 6px 6px 6px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ledger tr:last-child td { border-bottom: 0; }
/* No capitalize: these are source-family identifiers, and title-casing them turned
   "ucdp" into "Ucdp" and "nasa_firms" into "Nasa Firms". */
.lg-fam { color: var(--text); font-weight: 600; }
.lg-src { display: block; font-size: 10px; color: var(--faint); font-weight: 400; text-transform: none; }
.lg-n, .lg-rel { font-family: var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.lg-run { width: 42%; white-space: nowrap; }
.lg-run b { font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.lg-bar {
  display: inline-block; width: calc(100% - 46px); height: 5px; margin-right: 6px;
  background: var(--panel-3); border-radius: 3px; overflow: hidden; vertical-align: middle;
}
.lg-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.why[data-band="High"] .lg-bar i    { background: var(--band-high); }
.why[data-band="Medium"] .lg-bar i  { background: var(--band-medium); }
.why[data-band="Rumored"] .lg-bar i { background: var(--band-rumored); }
.lg-foot { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; }
.lg-formula {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs); padding: 5px 7px; display: block; word-break: break-word;
}
.lg-check { font-size: 11px; line-height: 1.45; }
.lg-check.ok  { color: var(--ok); }
.lg-check.bad { color: var(--warn); }

/* ---- at-a-glance fact grid (new, optional; replaces or augments table.ctx) ---- */
.factgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.fact { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 11px; }
.fact .k { font-size: 10px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; }
.fact .v { font-size: 13.5px; color: var(--text); font-weight: 600; margin-top: 3px; line-height: 1.25; }
.fact .v.dmg-destroyed { color: var(--band-high); }
.fact .v.dmg-severe    { color: var(--band-medium); }

/* ============================================================================
   EVIDENCE TIMELINE — colour-coded by source family.
   app.js emits .evidence > .when ( + .src ) + blockquote. We add a coloured
   pin/rail via the source-family class on .evidence (.src-news / .src-sat /
   .src-thermal) — see integrator notes. Falls back gracefully without it.
   ============================================================================ */
.evidence {
  position: relative; padding: 11px 0 12px 24px;
  border-bottom: 1px dashed var(--line-soft);
}
.evidence:last-of-type { border-bottom: 0; }
.evidence::before {
  content: ""; position: absolute; left: 5px; top: 15px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--accent); z-index: 1;
}
.evidence::after {
  content: ""; position: absolute; left: 9px; top: 24px; bottom: -1px;
  width: 1px; background: var(--line-soft);
}
.evidence:last-of-type::after { display: none; }
/* per-source-family accent (optional class on .evidence) */
.evidence.src-news::before    { border-color: var(--src-news); }
.evidence.src-sat::before     { border-color: var(--src-sat); }
.evidence.src-thermal::before { border-color: var(--src-thermal); }

.evidence .when { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap;
  align-items: center; gap: 6px; }
.evidence .src {
  font-size: 11.5px; font-weight: 650; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
/* coloured source-family tag (a small chip app.js can render in .src) */
.src-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 1px 7px; border-radius: 5px;
  color: var(--text-2); border: 1px solid var(--line);
}
.src-tag.news    { color: var(--src-news);    border-color: color-mix(in srgb, var(--src-news) 45%, var(--line));    background: var(--src-news-soft); }
.src-tag.sat     { color: var(--src-sat);     border-color: color-mix(in srgb, var(--src-sat) 45%, var(--line));     background: var(--src-sat-soft); }
.src-tag.thermal { color: var(--src-thermal); border-color: color-mix(in srgb, var(--src-thermal) 45%, var(--line)); background: var(--src-thermal-soft); }

.evidence blockquote {
  margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5;
  font-style: italic; border-left: 2px solid var(--line); padding-left: 10px;
}

/* "pieced together from N observations across M sources" tally (new, optional) */
.src-tally {
  display: flex; align-items: center; gap: 8px; margin: 4px 0 10px;
  background: var(--accent-soft); color: var(--text-2);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 12.5px; line-height: 1.45;
}
.src-tally svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.src-tally b { color: var(--text); font-weight: 650; }

/* ---- context table ---- */
table.ctx { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 2px; }
table.ctx td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
table.ctx tr:last-child td { border-bottom: 0; }
table.ctx td:first-child { color: var(--muted); width: 45%; }

/* ============================ forms ============================ */
label.field { display: block; margin: 11px 0; font-size: 13px; }
label.field > span { display: block; color: var(--muted); margin-bottom: 5px; font-size: 12px; }
input, select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 10px; font-size: 13px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { resize: vertical; min-height: 92px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

button.btn {
  border: 1px solid var(--line); background: var(--panel-3); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13px; font-weight: 550;
  cursor: pointer; font-family: inherit; transition: border-color .14s, background .14s;
}
button.btn:hover { border-color: #34415a; background: var(--panel-2); }
button.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.btn.primary:hover { filter: brightness(1.06); }
button.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ============================ toast ============================ */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--panel-3); border: 1px solid var(--accent); color: var(--text);
  padding: 11px 18px; border-radius: 10px; z-index: 1000; font-size: 13px;
  box-shadow: var(--shadow);
}
.toast.err { border-color: var(--danger); }

.empty { color: var(--muted); text-align: center; padding: 32px 12px; font-size: 13px; line-height: 1.5; }

/* ============================ responsive ============================ */
@media (max-width: 1180px) {
  .shell-top { grid-template-columns: 264px 1fr; }
  body.has-inspector .shell-top { grid-template-columns: 264px 1fr 300px; }
  .summary .stat.low, .summary .stat.rumored { display: none; }
}
@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr; gap: 14px; }
  .summary { display: none; }
  .shell-top { grid-template-columns: 236px 1fr; }
  body.has-inspector .shell-top { grid-template-columns: 236px 1fr 260px; }
}
/* Narrow (phone): the three regions stack instead of shrinking. The rail keeps a scrollable
   slice at the top so the world model is still reachable, the map keeps a usable minimum, and
   the region keeps its own height — collapsing it is how you give the map the screen here.
   There is no room for the inspector here regardless of body.has-inspector — it stays hidden and
   the row stays the same two-row stack it always was. */
@media (max-width: 720px) {
  .shell-top, body.has-inspector .shell-top {
    grid-template-columns: 1fr; grid-template-rows: minmax(0, 190px) minmax(0, 1fr);
    min-height: 300px; }
  .inspector { display: none; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-search { padding: 7px 10px 6px; }
  .rail-foot { padding: 6px 10px 7px; }
  .region-body, body.region-tall .region-body { height: 32vh; }
  .honesty-bar { padding: 6px 12px; }
  .honesty-bar p { font-size: 10.5px; line-height: 1.4; }
  .map-scope { max-width: calc(100% - 28px); }
}

/* ============================ chronology bar (map chrome) ============================
   Was a .scrubber block inside the Events tab; it is board-level chrome now, so the chronology
   is visible on the landing view instead of being hidden one tab away. app.js toggles [hidden]
   and body.has-timebar, which lifts the legend clear of it. */
.timebar {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 600;
  display: flex; align-items: center; gap: 12px;
  background: rgba(17,21,29,.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 13px 7px; box-shadow: var(--shadow);
}
.timebar[hidden] { display: none; }
body.has-timebar .legend { bottom: 92px; }
.tb-play {
  flex: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 12px; line-height: 1; font-family: inherit;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
}
.tb-play:hover { filter: brightness(1.08); }
.tb-mid { flex: 1; min-width: 0; }
.tb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.tb-label { font-size: 12.5px; font-weight: 620; color: var(--text); white-space: nowrap; }
.tb-note { font-size: 10.5px; color: var(--muted); cursor: help; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.tb-ctl { display: flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer;
  font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.tb-ctl input { width: auto; accent-color: var(--accent); }
.tb-reset {
  flex: none; font-size: 11px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  font-family: inherit; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
}
.tb-reset:disabled { background: var(--panel-3); color: var(--muted); border-color: var(--line); cursor: default; }
.timebar input[type=range] { width: 100%; accent-color: var(--accent); margin: 1px 0; display: block; }
.tb-ends { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); }

/* ---- forward axis (E7-T06) ----
   The timeline continues past "now" into a half that can never draw an event (see app.js's
   buildForwardAxis). The two halves must read apart WITHOUT colour: solid track + solid label
   on the left (unchanged), a dashed border, a diagonal hatch texture and its own caption on the
   right. Every one of those three survives a greyscale render; none of them is a colour swap.
   The hatch is a flat, non-tapering stripe on purpose — NOT a gradient, NOT a cone narrowing or
   widening with distance from now, so it cannot be misread as a confidence band or a forecast. */
/* Fixed px heights, not a percentage/stretch: .timebar is position:absolute with only `bottom`
   set, so its own height is auto (shrink-to-fit). A stretched child sized off a percentage
   height feeds back into that auto calculation and inflates the whole bar to the map's full
   height (confirmed empirically: align-self:stretch + height:100% here blew .timebar up from
   ~70px to 900px+, its top edge running off above the map). A fixed height matching .tb-play's
   32px avoids the loop and still reads as a clear divider between the two halves. */
.tb-now { flex: none; display: flex; align-items: center; }
.tb-now span {
  writing-mode: vertical-lr; text-orientation: mixed; font-size: 8.5px; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase; border-left: 1px dashed var(--line);
  padding-left: 4px; height: 32px; display: flex; align-items: center;
}
.tb-forward { flex: none; width: 176px; display: flex; flex-direction: column; gap: 3px; }
.tb-fwd-head { display: flex; }
.tb-fwd-label { font-size: 10.5px; font-weight: 620; color: var(--text-2); white-space: nowrap; }
.tb-fwd-track {
  position: relative; height: 15px; border: 1px dashed var(--line); border-radius: 3px;
  background-color: var(--panel-3);
  background-image: repeating-linear-gradient(45deg, var(--line-soft) 0 3px, transparent 3px 7px);
  display: flex; align-items: center;
}
.tb-fwd-tick {
  position: absolute; top: -3px; width: 2px; height: 21px; background: var(--text-2);
  transform: translateX(-1px); border-radius: 1px;
}
.tb-fwd-empty { font-size: 9.5px; color: var(--muted); padding: 0 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.tb-fwd-blocked { font-size: 9.5px; color: var(--danger); font-weight: 700; padding: 0 6px; cursor: help; }
.tb-fwd-caption { font-size: 9px; color: var(--faint); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
@media (max-width: 1100px) {
  .tb-note { display: none; }
  .tb-now, .tb-forward { display: none; }   /* same width budget .tb-note already gives up here */
  body.has-timebar .legend { bottom: 104px; }
}
.legend-caveat { margin-top: 8px; font-size: 10.5px; line-height: 1.4; color: var(--muted);
  max-width: 220px; border-top: 1px solid var(--line-soft); padding-top: 6px; }

/* ============================ cite / export ============================
   Appended to the event detail and the place panel. Nothing used to leave this tool; this is the
   block that makes it a source you can quote rather than a page you looked at. */
.cite {
  margin-top: 16px; padding: 11px 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.cite-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.cite-title { font-size: 12px; font-weight: 700; color: var(--text); }
.cite-sub { font-size: 10.5px; color: var(--muted); }
.cite-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.cite-actions .btn.small { float: none; }
.cite-preview { margin-top: 9px; }
/* list-style:none is what actually removes the marker in current Chromium and Firefox; the
   -webkit rule only still matters for older Safari. Without both, the default triangle renders
   next to the ::before one. */
.cite-preview > summary { cursor: pointer; font-size: 11px; color: var(--muted); list-style: none; }
.cite-preview > summary::-webkit-details-marker { display: none; }
.cite-preview > summary::marker { content: ""; }
.cite-preview > summary::before { content: "▸ "; }
.cite-preview[open] > summary::before { content: "▾ "; }
.cite-preview pre {
  margin: 8px 0 0; padding: 9px 10px; max-height: 260px; overflow: auto;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-xs);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 10.5px; line-height: 1.5; color: var(--text-2); white-space: pre-wrap; word-break: break-word;
}

/* ============================ per-cell timeline ============================ */
.cellhist { margin: 6px 0 10px; }
.timeline { margin-top: 6px; border-left: 2px solid var(--line); padding-left: 4px; }
.tl-item { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: center;
  padding: 7px 8px; border-radius: var(--radius-xs); position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -5px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--band-rumored);
}
.tl-item[data-band="High"]::before    { background: var(--band-high); }
.tl-item[data-band="Medium"]::before  { background: var(--band-medium); }
.tl-item[data-band="Low"]::before     { background: var(--band-low); }
.tl-item[data-band="Rumored"]::before { background: var(--band-rumored); }
.tl-item:hover { background: var(--panel-2); }
.tl-date { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-body { display: flex; align-items: center; gap: 8px; }
.tl-type { text-transform: capitalize; font-size: 13px; }

/* ============================================================================
   What matters — the Phase-4a assessment feed (priorities + anomalies).
   Reuses the band tokens; a ranked card with a priority bar and a plain rationale.
   ============================================================================ */
.sig-card {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--band-rumored);
  border-radius: var(--radius-sm);
  padding: 11px 13px 12px;
  margin: 8px 0;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .06s;
}
.sig-card:hover { background: var(--panel-3); border-color: var(--line); }
.sig-card:active { transform: translateY(1px); }
.sig-card[data-band="High"]    { border-left-color: var(--band-high); }
.sig-card[data-band="Medium"]  { border-left-color: var(--band-medium); }
.sig-card[data-band="Low"]     { border-left-color: var(--band-low); }
.sig-card[data-band="Rumored"] { border-left-color: var(--band-rumored); }
.sig-top { display: flex; align-items: center; gap: 9px; }
.sig-rank {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-3); color: var(--text-2);
  font: 600 11px/1 var(--mono); border: 1px solid var(--line);
}
.sig-place { flex: 1; font-weight: 600; font-size: 13.5px; color: var(--text); }
.sig-type { color: var(--muted); font-weight: 400; text-transform: capitalize; }
.sig-bar {
  height: 4px; border-radius: 3px; background: var(--panel-3);
  margin: 9px 0 7px; overflow: hidden;
}
.sig-bar > span { display: block; height: 100%; border-radius: 3px; }
.sig-why { font-size: 12px; color: var(--text-2); line-height: 1.45; }

.anom-card {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 10px 13px; margin: 8px 0; cursor: pointer;
  transition: background .14s, border-color .14s;
}
.anom-card:hover { background: var(--panel-3); border-color: var(--line); }
.anom-top { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.anom-badge {
  flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.anom-badge.spike { background: var(--band-medium-soft); color: var(--band-medium); }
.anom-badge.esc   { background: var(--band-high-soft);   color: var(--band-high); }
.anom-place { font-weight: 600; font-size: 13px; color: var(--text); }

/* ============================================================================
   By area — region→district→community drill-down (rollup choropleth).
   ============================================================================ */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 2px 0 10px; font-size: 12.5px; }
.crumb { color: var(--accent); cursor: pointer; }
.crumb:last-child { color: var(--text-2); cursor: default; font-weight: 600; }
.crumb:hover:not(:last-child) { text-decoration: underline; }
.crumb-sep { color: var(--faint); }
.area-levelhdr { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.area-card { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 10px 13px; margin: 7px 0; cursor: pointer; transition: background .14s, border-color .14s; }
.area-card:hover { background: var(--panel-3); border-color: var(--line); }
.area-card.dim { opacity: .5; cursor: default; }
.area-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.area-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.area-n { font: 600 13px/1 var(--mono); color: var(--text-2); white-space: nowrap; }
.area-bar { height: 5px; border-radius: 3px; background: var(--panel-3); margin: 8px 0 6px; overflow: hidden; }
.area-bar > span { display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--band-medium), var(--band-high)); }
.area-meta { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.area-hi { color: var(--band-high); font-weight: 600; text-transform: none; }
.area-label { color: #fff; font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px #000, 0 0 2px #000;
  white-space: nowrap; pointer-events: none; text-align: center; }
.area-label b { display: block; font: 700 12px/1.1 var(--mono); color: #ffd9d5; }

/* ============================================================================
   Watch areas — geography layer toggles + named areas of interest.
   ============================================================================ */
.ftoggles { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 2px 0 6px; }
.ftoggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.fdot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.btn.small { font-size: 11.5px; padding: 3px 9px; float: right; }
.aoi-card { background: var(--panel-2); border: 1px solid var(--line-soft); border-left: 3px solid #ffd24a;
  border-radius: var(--radius-sm); padding: 10px 13px; margin: 7px 0; cursor: pointer; transition: background .14s, border-color .14s; }
.aoi-card:hover { background: var(--panel-3); border-color: var(--line); }
.aoi-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.aoi-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.aoi-n { font: 600 12.5px/1 var(--mono); color: var(--text-2); white-space: nowrap; }
.aoi-meta { font-size: 11.5px; color: var(--muted); text-transform: capitalize; margin-top: 4px; }
.aoi-pin { color: #ffe9a6; font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px #000, 0 0 2px #000;
  white-space: nowrap; text-align: center; pointer-events: none; }
.aoi-pin b { display: block; font: 700 12px/1.1 var(--mono); color: #fff; }

/* ============================================================================
   Theater switcher + per-event sensor provenance ("Seen by").
   ============================================================================ */
.theater-sel {
  background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line);
  border-radius: var(--radius-xs); font-size: 12px; padding: 2px 6px; margin-top: 2px;
  max-width: 280px; cursor: pointer; font-family: var(--font);
}
.theater-sel:hover { border-color: var(--accent); color: var(--text); }
.provenance { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.prov-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.prov { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.prov.sat     { background: var(--src-sat-soft);     color: var(--src-sat);     border-color: var(--src-sat-soft); }
.prov.thermal { background: var(--src-thermal-soft); color: var(--src-thermal); border-color: var(--src-thermal-soft); }
.prov.news    { background: var(--src-news-soft);    color: var(--src-news);    border-color: var(--src-news-soft); }

/* ============================================================================
   AOR "My Watch" — attention badges, the synthesis Read panel, collapsibles.
   ============================================================================ */
.watch-summary { font-size: 12px; font-weight: 600; color: var(--band-high); background: var(--band-high-soft);
  border-radius: var(--radius-sm); padding: 7px 11px; margin: 0 0 9px; }
.att-badge { flex: none; font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.att-badge.esc    { background: var(--band-high-soft);   color: var(--band-high); }
.att-badge.steady { background: var(--panel-3);          color: var(--text-2); }
.att-badge.quiet  { background: var(--band-low-soft);    color: var(--band-low); }
.aoi-card.att-esc    { border-left-color: var(--band-high); }
.aoi-card.att-quiet  { border-left-color: var(--band-low); }
.aoi-read { font-size: 12px; line-height: 1.5; color: var(--text-2); margin: 6px 0; }
.read-panel { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; margin: 10px 0; }
.read-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.read-title { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.read-body { font-size: 12.5px; line-height: 1.6; color: var(--text); margin: 0 0 7px; }
.read-prov { font-size: 11px; color: var(--muted); }
.ftoggle-wrap { margin-top: 12px; }
.ftoggle-wrap > summary { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  cursor: pointer; padding: 4px 0; list-style: none; }
.ftoggle-wrap > summary::-webkit-details-marker { display: none; }
.ftoggle-wrap > summary::before { content: "▸ "; }
.ftoggle-wrap[open] > summary::before { content: "▾ "; }
/* Legend → collapsed by default so it stops covering the map */
.legend { max-width: 272px; }
.legend > details > summary { cursor: pointer; font-weight: 600; font-size: 12px; color: var(--text-2);
  list-style: none; padding: 2px 0; }
.legend > details > summary::-webkit-details-marker { display: none; }
.legend > details > summary::before { content: "▸ "; }
.legend > details[open] > summary::before { content: "▾ "; }

/* ---- By-area place view (the spine): terrain chips, recent/significant rows, drill-in children ---- */
.place-section { margin-top: 14px; }
.place-section > h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #8b93a1); }
.terrain-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.terrain-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--chip-bg, #1c2230); border: 1px solid var(--border, #2a3140); color: var(--text, #d7dce4); }
.place-ev { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.place-ev:hover { background: var(--hover, #1b212d); }
.place-ev .pe-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.place-ev .pe-score { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent, #ff5a52); min-width: 30px; }
.place-ev .pe-type { font-weight: 600; text-transform: capitalize; }
.place-ev .pe-place { color: var(--muted, #8b93a1); }
.place-ev .pe-date { margin-left: auto; color: var(--muted, #8b93a1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.place-kid { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; border: 1px solid var(--border, #2a3140); margin-bottom: 5px; }
.place-kid:hover { background: var(--hover, #1b212d); border-color: var(--accent, #ff5a52); }
.place-kid .pk-name { font-weight: 600; }
.place-kid .pk-n { margin-left: auto; color: var(--muted, #8b93a1); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- About / README mode ---- */
.about { padding: 4px 2px 24px; max-width: 720px; line-height: 1.5; }
.about-title { font-size: 20px; font-weight: 700; margin: 4px 0 2px; color: var(--text); }
.about-lede { font-size: 13.5px; color: var(--text-2); margin: 8px 0 14px; }
.about-callout {
  font-size: 13px; color: var(--text-2); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px; padding: 11px 13px; margin: 4px 0 18px;
}
.about-callout b { color: var(--text); }
.about-h { font-size: 13px; font-weight: 650; color: var(--text); margin: 20px 0 7px;
  text-transform: uppercase; letter-spacing: .04em; }
.about-p { font-size: 13px; color: var(--text-2); margin: 6px 0; }
.about-bands { display: grid; gap: 6px; margin: 8px 0 4px; font-size: 12.5px; color: var(--text-2); }
.about-bands > div { display: flex; align-items: center; gap: 8px; }
.about-bands b { color: var(--text); font-weight: 600; }
.about-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.about-list { margin: 6px 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.about-list li { margin: 5px 0; }
.about-list b { color: var(--text); font-weight: 600; }
.about-foot { font-size: 12px; color: var(--muted); margin-top: 20px;
  border-top: 1px solid var(--line-soft); padding-top: 12px; }

/* Graceful fallback shown in the map area if the (now-vendored) map library ever fails to load.
   The DOM-driven board on the left keeps working regardless — see app.js showMapUnavailable(). */
.map-unavailable{
  display:flex;align-items:center;justify-content:center;height:100%;
  padding:2rem;text-align:center;color:#64748b;font-size:.95rem;line-height:1.6;
  background:#0f172a;
}

/* ============================================================================
   Board mode — a small kanban + task tracker (board.js). Reuses the app's dark
   tokens; --band-* colors label the status columns.

   E5-T16: `body.board-mode` used to hide the map and give the console the whole
   window. The map is the hero now and never leaves, so the wide consoles ask for
   a TALLER bottom region instead (body.region-tall, see the shell block above).
   board.js still removes .board-mode when it hands off to a map view; the class
   is kept as a harmless marker so that hand-off needs no change there.
   ============================================================================ */

.bd-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bd-bar-l { display: flex; align-items: baseline; gap: 9px; }
.bd-bar-l b { font-size: 15px; }
.bd-count { color: var(--muted); font-size: 12.5px; }
.bd-bar-r { margin-left: auto; display: flex; gap: 6px; }
.bd-flash { font-size: 12px; color: var(--text-2); min-width: 60px; }
.bd-flash.ok { color: #57d38c; } .bd-flash.err { color: var(--band-high); }
.bd-btn { font: inherit; font-size: 12.5px; color: var(--text-2); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.bd-btn:hover { color: var(--text); background: var(--panel-3); border-color: #34415a; }
.bd-btn.wide { flex: 1; text-align: center; }

.bd-board { display: flex; gap: var(--gap); align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.bd-col { flex: 1 1 0; min-width: 220px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; }
.bd-col-h { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em; border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0; border-left: 3px solid var(--muted); }
.bd-col-h.band-high     { background: var(--band-high-soft);    border-left-color: var(--band-high); }
.bd-col-h.band-medium   { background: var(--band-medium-soft);  border-left-color: var(--band-medium); }
.bd-col-h.band-low      { background: var(--band-low-soft);     border-left-color: var(--band-low); }
.bd-col-h.band-rumored  { background: var(--band-rumored-soft); border-left-color: var(--band-rumored); }
.bd-col-n { color: var(--text-2); background: rgba(0,0,0,.25); border-radius: 20px; padding: 1px 8px; font-size: 11.5px; }
.bd-drop { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 60px; }
.bd-drop.over { background: rgba(78,163,255,.06); box-shadow: inset 0 0 0 1px var(--accent); border-radius: 0 0 var(--radius) var(--radius); }

.bd-card { background: var(--panel-3); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px;
  cursor: grab; transition: border-color .12s, transform .04s; }
.bd-card:hover { border-color: #3a4a66; }
.bd-card:active { cursor: grabbing; }
.bd-card.dragging { opacity: .45; }
.bd-card-top { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.bd-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--accent);
  background: rgba(78,163,255,.1); border-radius: 5px; padding: 1px 6px; }
.bd-id.big { font-size: 14px; padding: 3px 9px; }
.bd-phase { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bd-title { font-size: 13px; line-height: 1.35; color: var(--text); }
.bd-card-foot { display: flex; gap: 9px; margin-top: 6px; min-height: 1px; }
.bd-sub, .bd-note-dot { font-size: 11px; color: var(--muted); }
.bd-add { margin-top: 2px; font: inherit; font-size: 12px; color: var(--muted); background: none;
  border: 1px dashed var(--line); border-radius: 8px; padding: 6px; cursor: pointer; }
.bd-add:hover { color: var(--text-2); border-color: #3a4a66; }

/* detail + settings drawer */
.bd-drawer-wrap { position: fixed; inset: 0; background: rgba(4,7,12,.55); display: flex; justify-content: flex-end; z-index: 1200; }
.bd-drawer { width: min(440px, 94vw); height: 100%; background: var(--panel); border-left: 1px solid var(--line);
  padding: 18px; overflow-y: auto; box-shadow: -18px 0 40px rgba(0,0,0,.4); animation: bd-slide .16s ease-out; }
@keyframes bd-slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.bd-d-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.bd-d-actions { display: flex; align-items: center; gap: 8px; }
.bd-close { font-size: 20px; line-height: 1; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0 4px; }
.bd-close:hover { color: var(--text); }
.bd-del { font-size: 12px; color: var(--band-high); background: var(--band-high-soft); border: 1px solid transparent;
  border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.bd-del:hover { border-color: var(--band-high); }
.bd-f { display: block; margin-bottom: 13px; }
.bd-f > span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.bd-f-row { display: flex; gap: 10px; } .bd-f-row .bd-f { flex: 1; }
.bd-in { width: 100%; font: inherit; font-size: 13.5px; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.bd-in:focus { outline: none; border-color: var(--accent); }
.bd-ta { resize: vertical; line-height: 1.5; }
.bd-subs { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bd-subs li { display: flex; align-items: center; gap: 6px; }
.bd-subs label { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.bd-subs input:checked + .bd-sub-t { text-decoration: line-through; color: var(--muted); }
.bd-sub-x { color: var(--muted); background: none; border: none; cursor: pointer; font-size: 15px; line-height: 1; }
.bd-sub-x:hover { color: var(--band-high); }
.bd-src { margin-top: 6px; font-size: 11px; color: var(--muted); }
.bd-hint { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin: 0 0 13px; }
.bd-hint code { background: var(--panel-2); border-radius: 4px; padding: 1px 5px; font-size: 11.5px; }

/* ============================================================================
   Adjudication tab (adjudication.js) — interactive view of the multi-agent panel.
   Shares the board-mode full-width layout (map hidden).
   ============================================================================ */
.adj-bar-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.adj-bar-top b { font-size: 15px; }
.adj-sub { color: var(--muted); font-size: 12.5px; }
.adj-exs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.adj-ex { font: inherit; font-size: 12.5px; color: var(--text-2); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.adj-ex:hover { color: var(--text); border-color: #34415a; }
.adj-ex.active { color: var(--text); background: var(--panel-3); border-color: var(--accent); }

.adj-obs-row { display: flex; gap: var(--gap); margin-bottom: 12px; flex-wrap: wrap; }
.adj-obs { flex: 1 1 280px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px; }
.adj-obs-h { font-size: 13px; color: var(--text); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.adj-obs-meta { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.adj-obs-text { margin-top: 6px; font-size: 13px; color: var(--text-2); line-height: 1.5; }

.adj-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.adj-judges { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin-bottom: 12px; }
.adj-judge { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--muted);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: border-color .12s, background .12s; }
.adj-judge:hover { background: var(--panel-3); }
.adj-judge.is-same { border-left-color: #57d38c; }
.adj-judge.is-diff { border-left-color: var(--band-medium); }
.adj-judge-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.adj-lens { font-size: 12px; color: var(--text); font-weight: 600; text-transform: capitalize; }
.adj-verdict { font-size: 11px; padding: 1px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .03em; }
.adj-verdict.yes { color: #57d38c; background: rgba(87,211,140,.12); }
.adj-verdict.no { color: var(--band-medium); background: var(--band-medium-soft); }
.adj-conf { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.adj-bar { flex: 1; height: 6px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.adj-bar-fill { display: block; height: 100%; border-radius: 4px; }
.adj-bar-fill.yes { background: #57d38c; } .adj-bar-fill.no { background: var(--band-medium); }
.adj-pct { font-size: 11px; color: var(--text-2); min-width: 30px; text-align: right; }
.adj-rat { font-size: 12px; color: var(--text-2); line-height: 1.45; }

.adj-skeptic { border: 1px solid var(--line); border-left: 3px solid var(--band-high); background: var(--panel-2);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.adj-skeptic.refuted { border-left-color: var(--band-high); }
.adj-skeptic.conceded { border-left-color: var(--muted); }
.adj-skeptic.dormant { color: var(--muted); font-size: 12.5px; font-style: italic; border-left-color: var(--line); }

.adj-decision { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); }
.adj-decision.merge { background: rgba(87,211,140,.08); border-color: rgba(87,211,140,.4); }
.adj-decision.separate { background: var(--band-rumored-soft); border-color: var(--line); }
.adj-decision.veto { background: var(--band-medium-soft); border-color: rgba(255,177,61,.4); }
.adj-dec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adj-dec-verdict { font-size: 15px; font-weight: 700; color: var(--text); }
.adj-dec-conf { font-size: 12.5px; color: var(--text-2); }
.adj-dec-why { margin-top: 6px; font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ============================================================================
   Grids-of-interest console (board.js) — operational area cards. Shares the
   board-mode full-width layout (map hidden until you drill).
   ============================================================================ */
.grid-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.grid-bar b { font-size: 15px; }
.grid-sub { color: var(--muted); font-size: 12.5px; }
.grid-load, .grid-empty { color: var(--text-2); font-size: 13.5px; padding: 20px 0; }
.grid-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.grid-hint { color: var(--muted); font-size: 12.5px; max-width: 520px; }
.grid-headrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.grid-headrow span { color: var(--muted); font-size: 12.5px; }
.grid-attn { color: var(--band-medium); background: var(--band-medium-soft); border-radius: 8px;
  padding: 7px 11px; font-size: 12.5px; margin-bottom: 12px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.grid-card { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--muted);
  border-radius: var(--radius); padding: 13px 15px; display: flex; flex-direction: column; }
.grid-card.att-esc { border-left-color: var(--band-high); }
.grid-card.att-steady { border-left-color: var(--band-low); }
.grid-card.att-quiet { border-left-color: var(--muted); }
.grid-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.grid-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.att-badge { font-size: 11px; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.att-badge.esc { color: var(--band-high); background: var(--band-high-soft); }
.att-badge.steady { color: var(--text-2); background: rgba(255,255,255,.06); }
.att-badge.quiet { color: var(--band-low); background: var(--band-low-soft); }
.grid-read { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grid-metrics { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.grid-metrics b { color: var(--text); }
.grid-prov { flex-basis: 100%; }
.grid-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.grid-btn { font: inherit; font-size: 12px; color: var(--text-2); background: var(--panel-3);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer; }
.grid-btn:hover { color: var(--text); border-color: #34415a; }
.grid-btn.primary { color: var(--text); border-color: var(--accent); background: rgba(78,163,255,.1); }
.grid-btn.primary:hover { background: rgba(78,163,255,.18); }
.grid-btn.ghost { color: var(--muted); background: none; border-style: dashed; cursor: default; }
.grid-btn.ghost:hover { color: var(--muted); border-color: var(--line); }

/* ---- world-model entities: tracked objects in the Grids console + the entity detail view ---- */
.ent-bar { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid var(--line); }
.ent-bar b { font-size: 15px; }
.ent-card { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 13px 15px; display: flex; flex-direction: column; }
.ent-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ent-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.ent-kind { font-size: 12px; color: var(--muted); text-transform: capitalize; margin-bottom: 9px; }
.band-chip { font-size: 10.5px; font-weight: 600; color: #0d1117; padding: 2px 8px; border-radius: 20px;
  white-space: nowrap; }
/* detail view */
.ent-bandline { display: flex; align-items: center; gap: 9px; margin: 10px 0 4px; }
.ent-member { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--panel-2); }
.ent-member:hover { border-color: #34415a; }
.ent-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ent-mtype { font-size: 13px; color: var(--text); text-transform: capitalize; flex: 1; }
.ent-mwhen { font-size: 12px; color: var(--muted); }
.ent-mband { font-size: 11px; color: var(--text-2); min-width: 62px; text-align: right; }
.ent-rel { font-size: 12.5px; color: var(--text-2); padding: 6px 0; border-bottom: 1px solid var(--line); }
.ent-rel .muted { font-size: 11px; }

/* ---- Docs tab: the self-contained explainer (docs.js) ---- */
.docs { max-width: 940px; font-size: 14px; line-height: 1.65; padding-bottom: 40px; }
.doc-hero { padding-bottom: 6px; }
.doc-eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.docs h2 { font-size: 1.7rem; margin: 8px 0 0; color: var(--text); }
.doc-lede { color: var(--text-2); font-size: 15px; margin: 12px 0 0; max-width: 70ch; }
.doc-callout { background: rgba(78,163,255,.09); border: 1px solid rgba(78,163,255,.32);
  border-radius: var(--radius); padding: 13px 16px; margin: 22px 0; color: var(--text-2); }
.doc-h { font-size: 1.12rem; color: var(--text); margin: 34px 0 10px; padding-top: 18px;
  border-top: 1px solid var(--line); }
.doc-p { color: var(--text-2); max-width: 74ch; margin: 0 0 12px; }
.doc-dim { color: var(--muted); }
/* workflows */
.doc-flow { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 14px 17px; margin-bottom: 14px; }
.doc-flow-who { font-weight: 600; color: var(--text); font-size: 14.5px; }
.doc-flow-goal { color: var(--muted); font-size: 13px; margin: 3px 0 10px; font-style: italic; }
.doc-steps { margin: 0 0 10px; padding-left: 20px; color: var(--text-2); }
.doc-steps li { margin-bottom: 6px; }
.doc-caution { font-size: 12.5px; color: var(--text-2); background: rgba(255,177,61,.09);
  border-left: 2px solid var(--band-medium); padding: 8px 12px; border-radius: 0 6px 6px 0; }
/* bands */
.doc-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 18px;
  margin: 14px 0; color: var(--text-2); }
.doc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
/* status ribbons + tables */
.doc-legend { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.ribbon { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.ribbon--live { color: #7ee2b8; background: rgba(126,226,184,.14); }
.ribbon--partial { color: var(--band-medium); background: var(--band-medium-soft); }
.ribbon--planned { color: var(--muted); background: rgba(255,255,255,.06); }
.doc-tablewrap { overflow-x: auto; margin: 6px 0 4px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.doc-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .05em; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.doc-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2);
  vertical-align: top; }
/* pipeline + lists */
.doc-pipeline { counter-reset: step; list-style: none; padding: 0; margin: 6px 0 14px; }
.doc-pipeline li { position: relative; padding: 8px 0 8px 34px; color: var(--text-2);
  border-bottom: 1px solid var(--line); }
.doc-pipeline li::before { counter-increment: step; content: counter(step); position: absolute; left: 0;
  top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--panel-3);
  border: 1px solid var(--line); color: var(--accent); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; }
.doc-list { color: var(--text-2); padding-left: 20px; margin: 6px 0 12px; }
.doc-list li { margin-bottom: 7px; }
/* glossary */
.doc-gloss { margin: 6px 0 12px; }
.doc-term { display: grid; grid-template-columns: 168px 1fr; gap: 14px; padding: 8px 0;
  border-bottom: 1px solid var(--line); }
.doc-term dt { font-weight: 600; color: var(--text); font-size: 13px; }
.doc-term dd { margin: 0; color: var(--text-2); font-size: 13px; }
@media (max-width: 620px) { .doc-term { grid-template-columns: 1fr; gap: 2px; } }
/* links + footer */
.doc-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.doc-link { font-size: 12.5px; color: var(--text-2); background: var(--panel-3);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; text-decoration: none; }
.doc-link:hover { color: var(--text); border-color: #34415a; }
.doc-foot { color: var(--muted); font-size: 12.5px; margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--line); }

/* ---- T2–T5: the area-centric place view ---- */
/* dim areas have no snapshot to open — make that legible instead of a dead click */
.area-card.nodrill { cursor: default; opacity: .62; }
.area-card.nodrill:hover { border-color: var(--line); }

/* place panel identity + trend */
.place-crumb { margin: 6px 0 2px; font-size: 12px; }
.crumb-static { color: var(--muted); }
.place-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.trend-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12.5px;
  color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; }
.tr-stat b { color: var(--text); }
.tr-delta { font-weight: 600; }
.tr-delta.up { color: var(--band-high); }
.tr-delta.down { color: var(--band-low); }
.tr-flag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px;
  border-radius: 20px; color: var(--band-medium); background: var(--band-medium-soft); }
.tr-flag.esc { color: var(--band-high); background: var(--band-high-soft); }

/* track-this-area action */
.place-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.place-actions-hint { color: var(--muted); font-size: 12px; }

/* richer rows: two-line events, why-lines, score components */
.pe-line { display: flex; align-items: center; gap: 8px; }
.pe-sub { font-size: 11.5px; color: var(--muted); margin: 3px 0 0 16px; }
.pe-band { font-weight: 600; }
.place-ev--tall { display: block; padding-top: 8px; padding-bottom: 8px; }
.pe-why { font-size: 12px; color: var(--text-2); margin: 4px 0 0 44px; line-height: 1.45; }
.pe-comps { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 0 44px; }
.pe-comp { font-size: 10.5px; color: var(--text-2); background: var(--panel-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.pk-sub { font-size: 11.5px; color: var(--muted); margin: 3px 0 0 2px; }

/* single-source claims */
.gap-card { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid #7fd1ff;
  border-radius: var(--radius); padding: 10px 13px; margin-bottom: 8px; cursor: pointer; }
.gap-card:hover { border-color: #34415a; border-left-color: #7fd1ff; }
.gap-badge { font-size: 10.5px; color: #7fd1ff; background: rgba(127,209,255,.13);
  padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.gap-type { color: var(--muted); font-size: 11.5px; text-transform: capitalize; }

/* ---- exposure: events near populated places ----
   Violet, never red or amber. This marks "there are people near here", and a warm colour would
   invite the reading the label works hard to prevent — the system has no casualty data at all. */
.exp-card { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--src-sat);
  border-radius: var(--radius-sm); padding: 9px 11px; margin-bottom: 7px; cursor: pointer; }
.exp-card:hover { border-color: #34415a; border-left-color: var(--src-sat); }
.exp-badge { font-size: 10.5px; color: var(--src-sat); background: var(--src-sat-soft);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.exp-meta { margin-top: 5px; font-size: 11px; color: var(--muted); }
/* A hint that carries a limitation rather than an explanation. */
.hint-warn { color: var(--text-2); border-left: 2px solid var(--warn); padding-left: 9px; }

/* toast that offers a way onward */
.toast--action { cursor: pointer; border: 1px solid var(--accent); }
.toast--action:hover { background: rgba(78,163,255,.16); }

/* ============================================================================
   The Attention board (E5-T13) — board.js's second console, five triage columns.

   Design authority: docs/build-plan/wireframes/Main.dc.html. Its rule is density
   with honesty — every card states its confidence band and how many independent
   source families saw it, unclicked, so nobody has to open a card to learn
   whether it is worth opening.

   THE GREYSCALE RULE. "One source family" versus "two or more" must survive a
   greyscale render, so colour is never the only channel carrying it. Four
   channels move together and three of them are colour-free:

     shape    .abd-pip.hollow is a ring; .abd-pip.solid is filled.
     count    one pip versus two-to-four — a difference in number, not in hue.
     border   .abd-single has a DASHED left edge; .abd-corrob a SOLID one.
     icon     .abd-verdict.warn carries a warning glyph, a hard border, caps and
              700 weight; .abd-verdict.ok carries none of those.

   Shares body.board-mode (full width, map hidden) with the other consoles.
   ============================================================================ */
.abd-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.abd-bar b { font-size: 16px; }
.abd-sub { color: var(--muted); font-size: 12.5px; }
.abd-bar .bd-btn { margin-left: auto; }
.abd-load { color: var(--text-2); font-size: 13.5px; padding: 20px 0; }
.abd-honesty { margin: 0 0 12px; font-size: 12px; line-height: 1.55; color: var(--muted);
  max-width: 900px; border-left: 2px solid var(--line); padding-left: 10px; }

/* The columns. minmax(0,1fr) + min-width:0 is what actually stops a long word in a
   `why` line from widening a track and pushing the page into a horizontal scroll. */
.abd-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap); align-items: start; }
.abd-col { min-width: 0; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.abd-col-h { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0; padding: 10px 12px 8px; font-size: 12.5px; font-weight: 650; color: var(--text);
  letter-spacing: .01em; }
.abd-col-n { flex: none; color: var(--text-2); background: rgba(0,0,0,.28);
  border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.abd-col-note { margin: 0; padding: 0 12px 10px; font-size: 11px; line-height: 1.45;
  color: var(--muted); border-bottom: 1px solid var(--line); }
/* Each column scrolls in its own right, so all five heads stay on screen however
   uneven the queues are. The page itself never scrolls sideways. */
.abd-col-body { display: flex; flex-direction: column; gap: 8px; padding: 10px;
  max-height: max(320px, calc(100vh - 300px)); overflow-y: auto; overflow-x: hidden; min-width: 0;
  scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
/* A visible track matters here: a queue clipped with no scrollbar reads as a broken
   card, not as "there are twenty more below". */
.abd-col-body::-webkit-scrollbar { width: 8px; }
.abd-col-body::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 999px; }
.abd-col-empty { margin: 0; padding: 14px 2px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* ---- the card ---- */
.abd-cardwrap { min-width: 0; }
.abd-card {
  display: block; width: 100%; min-width: 0; text-align: left; cursor: pointer;
  font: inherit; color: var(--text);
  background: var(--panel-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 9px 11px 10px;
  transition: border-color .12s, background .12s;
}
.abd-card:hover { background: #202839; border-color: #3a4a66; }
/* An unmistakable focus ring: every card is reachable by Tab and says so. */
.abd-card:focus-visible, .abd-menu > summary:focus-visible, .abd-mi:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; }

/* THE GREYSCALE RULE, channel 3 — dashed edge for one family, solid for several. */
.abd-card.abd-single { border-left: 4px dashed var(--band-medium); }
.abd-card.abd-corrob { border-left: 4px solid var(--text-2); }

.abd-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.abd-age { flex: none; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.abd-title { display: block; font-size: 13px; font-weight: 640; line-height: 1.3;
  color: var(--text); overflow-wrap: anywhere; }
.abd-type { display: block; margin-top: 1px; font-size: 11px; color: var(--muted);
  text-transform: capitalize; overflow-wrap: anywhere; }
.abd-why { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.45;
  color: var(--text-2); overflow-wrap: anywhere; }

/* ---- the evidence strip: the honest half of the card, never behind a click ---- */
.abd-ev { display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.abd-pips { display: inline-flex; align-items: center; gap: 4px; flex: none; }
/* THE GREYSCALE RULE, channels 1 and 2 — a filled diamond per family, or one ring. */
.abd-pip { width: 10px; height: 10px; box-sizing: border-box; transform: rotate(45deg);
  border-radius: 2px; display: inline-block; flex: none; }
.abd-pip.solid  { background: var(--text); border: 2px solid var(--text); }
.abd-pip.hollow { background: transparent; border: 2px solid var(--band-medium); }
.abd-pip-more { font-size: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.abd-evn { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* THE GREYSCALE RULE, channel 4 — the warn chip is bordered, capitalised and iconed;
   the ok chip is a quiet run of text. Neither depends on its hue to be read. */
/* Flows straight after the count rather than being pushed to the right edge: at column
   width the strip wraps, and an auto margin left the chip stranded on its own line. */
.abd-verdict { flex: none; font-size: 9.5px; border-radius: 999px;
  padding: 2px 8px; line-height: 1.5; white-space: nowrap; }
.abd-verdict.ok   { color: var(--muted); border: 1px solid transparent; font-weight: 500; }
.abd-verdict.warn { color: var(--band-medium); background: var(--band-medium-soft);
  border: 1px solid var(--band-medium); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; }

.abd-foot { display: block; margin-top: 7px; font-size: 10.5px; color: var(--muted);
  overflow-wrap: anywhere; }

/* ---- the per-card action menu ----
   <details>/<summary> is keyboard-reachable and toggleable with no JS and no ARIA
   of ours. Drag-and-drop is deliberately absent: a card's column is computed from
   the evidence and a recorded analyst verdict, so dragging one would be a lie. */
.abd-menu { border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--panel-2); }
.abd-menu > summary { list-style: none; cursor: pointer; padding: 4px 11px 5px;
  font-size: 10.5px; color: var(--muted); user-select: none; }
.abd-menu > summary::-webkit-details-marker { display: none; }
.abd-menu > summary::marker { content: ""; }
.abd-menu > summary::after { content: " ▾"; }
.abd-menu[open] > summary::after { content: " ▴"; }
.abd-menu > summary:hover { color: var(--text-2); }
.abd-menu-body { display: flex; flex-direction: column; gap: 1px; padding: 0 6px 6px; }
.abd-mi { font: inherit; font-size: 11px; text-align: left; cursor: pointer;
  color: var(--text-2); background: transparent; border: 1px solid transparent;
  border-radius: 6px; padding: 5px 7px; }
.abd-mi:hover { color: var(--text); background: var(--panel-3); border-color: var(--line); }

/* ---- responsive: five columns, then three, then two, then a single stack ----
   The acceptance criterion is 400px with the columns stacked and no horizontal
   scroll anywhere on the page, so the ladder ends in one full-bleed column. */
@media (max-width: 1400px) { .abd-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .abd-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .abd-board { grid-template-columns: minmax(0, 1fr); }
  .abd-col-body { max-height: 46vh; }
}

/* ============================================================================
   Grey-zone board (grey_zone_board.js) — EGA-T01.

   A DIFFERENT five columns than the Attention board above, on purpose: those are recomputed
   from evidence every request; these are state the operator sets by hand (see the file's own
   header). The layout below is a parallel of .abd-board/.abd-col, not a reuse of it, so the two
   consoles can never be coupled by sharing a selector. The CARD itself reuses .card/.card-top/
   .etype from the incident-card rules above; only the grey-zone-specific bits inside a card
   (the form line, the ranked function-candidate list, the rate/stage line) are new here.
   ============================================================================ */
.gzb-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.gzb-bar b { font-size: 16px; }
.gzb-sub { color: var(--muted); font-size: 12.5px; }
.gzb-load { color: var(--text-2); font-size: 13.5px; padding: 20px 0; }
.gzb-honesty { margin: 0 0 12px; font-size: 12px; line-height: 1.55; color: var(--muted);
  max-width: 900px; border-left: 2px solid var(--line); padding-left: 10px; }

.gzb-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap); align-items: start; }
.gzb-col { min-width: 0; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.gzb-col-h { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0; padding: 10px 12px; font-size: 12.5px; font-weight: 650; color: var(--text);
  letter-spacing: .01em; border-bottom: 1px solid var(--line-soft); }
.gzb-col-n { flex: none; color: var(--text-2); background: rgba(0,0,0,.28);
  border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.gzb-col-body { display: flex; flex-direction: column; gap: 8px; padding: 10px;
  max-height: max(320px, calc(100vh - 300px)); overflow-y: auto; overflow-x: hidden; min-width: 0;
  scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.gzb-col-body::-webkit-scrollbar { width: 8px; }
.gzb-col-body::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 999px; }
.gzb-col-empty { margin: 0; padding: 14px 2px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* ---- inside a .card.gzb-card: form, then ranked function candidates, then rate/stage ---- */
.gzb-card { cursor: default; }
/* EGA-T14: keeps .card-top's original two-item space-between layout (place name vs. its badges)
   even though there are now two badges (evidence/join-confidence, then the id badge) on the
   right, not one. */
.gzb-badges { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; }
/* A board column is narrow: when the square id and the badges cannot share one line, the badges
   wrap under it instead of overlapping it (a cell id never breaks). */
.gzb-card .card-top { flex-wrap: wrap; }
.gzb-join { font-size: 10.5px; color: var(--text-2); background: rgba(0,0,0,.22);
  border-radius: 999px; padding: 1px 8px; flex: none; }
.gzb-form { margin-top: 6px; font-size: 12.5px; font-weight: 550; color: var(--text); }
.gzb-fclist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.gzb-fc { border-left: 2px solid var(--line); padding-left: 7px; font-size: 11px; line-height: 1.4; }
.gzb-fc-label { font-weight: 600; color: var(--text); }
.gzb-fc-conf { margin-left: 6px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.gzb-fc-reason { display: block; color: var(--muted); }
.gzb-rate-stage { margin-top: 6px; font-size: 11px; color: var(--text-2); }
.gzb-discrim { margin-top: 7px; font-size: 10.5px; color: var(--muted); font-style: italic; }
.gzb-cell { color: inherit; text-decoration: none; }
.gzb-cell:hover { color: var(--accent); text-decoration: underline; }
.gzb-open { display: inline-block; margin-top: 8px; font-size: 11.5px; font-weight: 600;
  color: var(--accent); text-decoration: none; }
.gzb-open:hover { text-decoration: underline; }

@media (max-width: 1400px) { .gzb-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .gzb-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .gzb-board { grid-template-columns: minmax(0, 1fr); }
  .gzb-col-body { max-height: 46vh; }
}

/* ---- the grey-zone dossier (dossier.js) — EGA-T04. One square on one screen: the measured
   history as one chart (flagged moments marked, a thin series drawn as points with no joining
   line), then images, assessments, open requests and blindness. [data-gzd-slot] elements are
   the mount points EGA-T05/06/09/10/12 fill; an empty one takes no space. ---- */
.gzd-synthetic { margin: 0 0 12px; padding: 10px 14px; border: 2px solid var(--danger);
  border-radius: var(--radius); background: color-mix(in srgb, var(--danger) 18%, transparent);
  color: var(--text); font-weight: 650; font-size: 14px; letter-spacing: .01em; }
.gzd-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.gzd-bar b { font-size: 16px; }
.gzd-back { color: var(--accent); font-size: 12.5px; text-decoration: none; }
.gzd-back:hover { text-decoration: underline; }
.gzd-meta { color: var(--muted); font-size: 12.5px; }
.gzd-contested { color: var(--warn); font-weight: 600; }
.gzd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px;
  margin: 0 0 12px; padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); }
.gzd-fact { min-width: 0; }
.gzd-fact[data-gzd-fact="terrain"] { grid-column: 1 / -1; }
.gzd-fact dt { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 2px; }
.gzd-fact dd { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.gzd-terr { display: inline-block; margin-right: 14px; font-variant-numeric: tabular-nums; }
.gzd-src { color: var(--muted); font-size: 11.5px; }
.gzd-nm { color: var(--text-2); font-style: italic; }
.gzd-disputed { color: var(--warn); font-weight: 600; }
.gzd-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); }
.gzd-main, .gzd-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.gzd-section { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; min-width: 0; }
.gzd-h { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--text); }
.gzd-sub-h { margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.gzd-slot:empty { display: none; }
.gzd-note { margin: 4px 0 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.gzd-link { color: var(--accent); text-decoration: underline; }
.gzd-note--thin { color: var(--text); border-left: 3px solid var(--warn); padding-left: 8px; }
.gzd-note--thin b { color: var(--warn); }
.gzd-note--none { color: var(--text-2); border-left: 3px solid var(--faint); padding-left: 8px; }
.gzd-na { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-2);
  border: 1px dashed var(--faint); border-radius: var(--radius-xs); padding: 8px 10px; }
.gzd-series { margin: 0 0 12px; }
.gzd-series-h { font-size: 12.5px; font-weight: 600; color: var(--text); text-transform: capitalize; }
.gzd-unit { margin-left: 8px; font-weight: 400; color: var(--muted); text-transform: none; }
.gzd-chart { display: block; width: 100%; height: auto; margin: 4px 0 6px; }
.gzd-axis { stroke: var(--line); stroke-width: 1; }
.gzd-gridline { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 2 4; }
.gzd-tick { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.gzd-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gzd-pt { fill: var(--accent); stroke: var(--panel-2); stroke-width: 2; }
.gzd-unobs { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 2 2; }
.gzd-flag line { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 4 3; }
.gzd-flag path { fill: var(--warn); stroke: var(--panel-2); stroke-width: 2; }
.gzd-flag-key { display: inline-block; width: 9px; height: 9px; margin-right: 6px; transform: rotate(45deg);
  background: var(--warn); vertical-align: middle; }
.gzd-table { width: 100%; border-collapse: collapse; font-size: 11.5px; color: var(--text-2); }
.gzd-table th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line);
  padding: 3px 6px 3px 0; }
.gzd-table td { border-bottom: 1px solid var(--line-soft); padding: 3px 6px 3px 0;
  font-variant-numeric: tabular-nums; }
.gzd-id { font-family: var(--mono); font-size: 10.5px; color: var(--muted); overflow-wrap: anywhere; }
.gzd-form { color: var(--text); }
.gzd-moments, .gzd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  gap: 6px; font-size: 12px; color: var(--text-2); }
.gzd-list li { border-left: 2px solid var(--line); padding-left: 8px; line-height: 1.45; color: var(--text); }
.gzd-list-top { font-size: 11px; color: var(--muted); }
.gzd-cites { font-size: 11px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
@media (max-width: 1000px) { .gzd-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- identifier badge (identifier_badge.js) — EGA-T14, GZ_AUD3. One shared shape, so a badge
   looks and sits the same wherever a record's own id is shown: a grey-zone board card's
   .card-top (grey_zone_board.js, every detection/programme) and a dossier record section's own
   id line (dossier.js — an assessment, an open request). Shows the short form; clicking copies
   the FULL identifier (never the short form) to the clipboard, per identifier_badge.js's own
   copyIdentifierCore. .gzid-copied is toggled on briefly by wireBadges after a successful copy. */
.gzid-badge {
  display: inline-flex; align-items: center; gap: 5px; font: inherit;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--muted); background: var(--panel-3); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 8px; line-height: 1.7; cursor: pointer;
}
.gzid-badge::after { content: "⧉"; font-size: 9px; opacity: .7; }
.gzid-badge:hover, .gzid-badge:focus-visible { color: var(--text); border-color: var(--accent); }
.gzid-badge.gzid-copied { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.gzid-short { font-variant-numeric: tabular-nums; }

/* ============================================================================
   Catalogue browser (catalogue.js) — E6-T04. Look up any system, see its source.

   Read-only reference cards, no map, one column that stacks at any width — this is the
   simplest surface in the plan on purpose. Every fact sits in `.cat-facts`; the one citation
   that covers the whole row sits directly under it in `.cat-cite`, always rendered, never a
   <details> and never a tooltip, so nothing here needs the 400px ladder the board's five
   columns need — a single flexible column already works at any width.
   ============================================================================ */
.cat-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.cat-bar b { font-size: 16px; }
.cat-sub { color: var(--muted); font-size: 12.5px; }
.cat-load { color: var(--text-2); font-size: 13.5px; padding: 20px 0; }
.cat-search { margin: 10px 0 14px; }
.cat-search input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 13px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 12px;
}
.cat-search input:focus { outline: none; border-color: var(--accent); }

.cat-back { margin: 0 0 12px; }
.cat-back a { color: var(--accent); font-size: 12.5px; text-decoration: none; cursor: pointer; }
.cat-back a:hover { text-decoration: underline; }

.cat-list { display: flex; flex-direction: column; gap: 10px; }
.cat-card {
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 13px 15px; max-width: 640px;
}
.cat-list--single .cat-card { max-width: 720px; }
.cat-top {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%;
  font: inherit; text-align: left; background: none; border: none; padding: 0 0 8px;
  margin: 0 0 8px; border-bottom: 1px solid var(--line-soft); cursor: pointer; color: inherit;
}
.cat-top:hover .cat-name { color: var(--accent); }
.cat-name { font-size: 14.5px; font-weight: 650; color: var(--text); }
.cat-class { font-size: 12px; color: var(--muted); }

/* Every fact is its own line: label, then value — a two-column layout would force a
   horizontal scroll on a long operator list at 400px, and a stacked line never does. */
.cat-facts { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; }
.cat-fact { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; line-height: 1.45; }
.cat-fk { flex: none; min-width: 108px; color: var(--muted); }
.cat-fv { color: var(--text); overflow-wrap: anywhere; }
.cat-disputed { color: var(--band-medium); }

/* The citation. It is not optional chrome — it is the reason this screen exists, so it gets
   its own visible block on every card, not a collapsed <details> the way `.cite` (event/place
   export) uses elsewhere. */
.cat-cite {
  display: flex; flex-direction: column; gap: 3px; padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.cat-cite-k { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cat-cite-v { font-size: 12px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .cat-card, .cat-list--single .cat-card { max-width: 100%; }
  .cat-fk { min-width: 92px; }
}

/* ============================================================================
   Outlook (outlook.js) — E7-T07. Calendar, confirm-by, decay and base rates.

   Three stacked sections, read-only, no map. The one deliberate asymmetry: a calendar row
   with nothing due (.otl-row-nothingdue) gets a heavier left border, a tinted panel and a
   bold banner — MORE visual weight than a well-covered row, never less, because "nothing due"
   is the finding this screen exists to surface. Everything wraps (flex-wrap, overflow-wrap)
   so a long label or a run of pass chips never forces the page to scroll sideways at 400px.
   ============================================================================ */
.otl-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.otl-bar b { font-size: 16px; }
.otl-sub { color: var(--muted); font-size: 12.5px; }

.otl-warn {
  background: var(--band-medium-soft); border: 1px solid var(--band-medium); color: var(--band-medium);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12.5px; margin-bottom: 10px;
}

.otl-section { margin-bottom: 22px; }
.otl-section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.otl-section-head h3 { margin: 0; font-size: 14px; }
.otl-section-sub { color: var(--muted); font-size: 12px; }

/* ---- Tier 1: collection calendar ---- */
.otl-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.otl-row {
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--faint);
  border-radius: var(--radius); padding: 11px 14px;
}
.otl-row-nothingdue {
  background: var(--band-medium-soft); border-color: var(--band-medium);
  border-left: 4px solid var(--band-medium);
}
.otl-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.otl-kind { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.otl-label { font-size: 13.5px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.otl-cell { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }

.otl-nothingdue-banner { font-size: 13px; font-weight: 650; color: var(--band-medium); }

.otl-row-body { display: flex; flex-direction: column; gap: 8px; }
.otl-sensor { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.otl-sensor-name { flex: none; min-width: 118px; font-size: 12px; color: var(--muted); }
.otl-passlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.otl-pass {
  display: flex; align-items: center; gap: 6px; background: var(--panel-3); border: 1px solid var(--line);
  border-radius: var(--radius-xs); padding: 3px 8px; font-size: 11.5px; color: var(--text-2);
}
.otl-pass-unusable { opacity: .55; }
.otl-pass-time { font-family: var(--mono); }
.otl-risk { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; }
.otl-risk-low { background: var(--ok); color: #08210f; }
.otl-risk-medium { background: var(--band-medium); color: var(--accent-ink); }
.otl-risk-high { background: var(--danger); color: #2a0605; }
.otl-pass-note { color: var(--muted); font-style: italic; }

.otl-ais { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 12px; }
.otl-ais-k { color: var(--muted); }
.otl-ais-v { color: var(--text-2); }

.otl-decay {
  display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 11.5px; color: var(--text-2);
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}
.otl-decay-k { text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-size: 10px; }
.otl-decay-stale { color: var(--band-medium); }
.otl-decay-stale .otl-decay-k { color: var(--band-medium); }

/* ---- Tier 2: what confirms, and when ---- */
.otl-gaplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.otl-gap {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 14px;
}
.otl-gap-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.otl-band { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; }
.otl-band-high { background: var(--band-high-soft); color: var(--band-high); }
.otl-band-medium { background: var(--band-medium-soft); color: var(--band-medium); }
.otl-band-low { background: var(--band-low-soft); color: var(--band-low); }
.otl-band-rumored { background: var(--band-rumored-soft); color: var(--band-rumored); }
.otl-gap-rationale { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; }
.otl-confirm { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: var(--radius-xs); }
.otl-confirm-yes { background: rgba(67,209,122,.14); color: var(--ok); }
.otl-confirm-no { background: var(--panel-3); color: var(--muted); }
.otl-confirm-unknown { background: var(--band-medium-soft); color: var(--band-medium); }

/* ---- Tier 3: base rates ---- */
.otl-ratelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.otl-rate {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 13px;
}
.otl-rate-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin-bottom: 4px; }
.otl-rate-label { font-size: 13px; color: var(--text); text-transform: capitalize; }
.otl-n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.otl-rate-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.otl-rate-value { font-size: 15px; font-weight: 650; color: var(--accent); }
.otl-rate-suppressed { font-size: 12px; color: var(--muted); font-style: italic; }
.otl-rate-rationale { font-size: 12px; color: var(--text-2); line-height: 1.4; }

@media (max-width: 480px) {
  .otl-sensor-name { min-width: 0; }
  .otl-rate-head { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ============================================================================
   Forces (E4-T12) — the six combatant-state indicators + stock estimates, per actor.

   Every number on this screen renders through stockIntervalHTML (app.js): a two-div CSS bar,
   no chart library, matching the project's no-build-step property. Assumptions are always the
   last block in a card and are NEVER collapsed — no <details> anywhere in this section — because
   a caveat one click away from the number it qualifies is a caveat most readers will not click.
   ============================================================================ */
.frc-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.frc-bar b { font-size: 16px; }
.frc-sub { color: var(--muted); font-size: 12.5px; }

.frc-actor { margin-bottom: 26px; }
.frc-actor-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 8px; }
.frc-actor-head h3 { margin: 0; font-size: 15px; }
.frc-actor-sub { color: var(--muted); font-size: 12px; }

.frc-lbl {
  font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  margin: 14px 0 8px;
}

.frc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.frc-stock-list { display: flex; flex-direction: column; gap: 10px; }

.frc-card {
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--faint);
  border-radius: var(--radius); padding: 11px 13px; display: flex; flex-direction: column; gap: 6px;
}
.frc-obs-adequate { border-left-color: var(--ok); }
.frc-obs-sparse { border-left-color: var(--band-medium); }
.frc-obs-none { border-left-color: var(--faint); opacity: .82; }

.frc-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; }
.frc-card-label { font-size: 13px; font-weight: 650; color: var(--text); text-transform: capitalize; }
.frc-card-obs { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--panel-3); color: var(--text-2); }
.frc-obs-adequate .frc-card-obs { background: rgba(67,209,122,.14); color: var(--ok); }
.frc-obs-sparse .frc-card-obs { background: var(--band-medium-soft); color: var(--band-medium); }

.frc-card-blank {
  font-size: 13px; font-style: italic; color: var(--muted); padding: 6px 0;
}

.frc-card-method { font-size: 11.5px; color: var(--text-2); line-height: 1.45; }

/* Inline, always-open assumptions — never a <details>. */
.frc-card-assumptions-lbl {
  font-size: 10px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted);
  margin-top: 2px; padding-top: 6px; border-top: 1px dashed var(--line);
}
.frc-card-assumptions {
  list-style: disc; margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px;
  font-size: 11.5px; color: var(--text-2); line-height: 1.4;
}

.frc-note { font-size: 12.5px; color: var(--muted); font-style: italic; padding: 4px 2px; }

/* ---- the interval bar: two divs, a percentage width — no chart library ---- */
.frc-interval { display: flex; flex-direction: column; gap: 4px; margin: 2px 0; }
.frc-interval-bar {
  height: 7px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line);
  overflow: hidden;
}
.frc-interval-fill { height: 100%; background: var(--accent); border-radius: 999px; min-width: 3px; }
.frc-interval-bounds { font-family: var(--mono); font-size: 12.5px; color: var(--text); }

@media (max-width: 480px) {
  .frc-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   Time-series inspector panel (E5-T11) — web/shell/timeseries.js, mounted into
   the E5-T10 .inspector region. Hand-rolled SVG only (I6 — no charting library,
   see the header comment in timeseries.js). Reuses .frc-card-method and
   .frc-card-assumptions* above (E4-T12) so a stock estimate's honesty apparatus
   — a visible method line, an always-open assumptions list — looks identical
   whether it is read on the Forces tab (today's snapshot) or here (its
   history). Field-by-field contract: web/shell/README.md.
   ============================================================================ */
.ts-panel { display: flex; flex-direction: column; gap: 18px; }

/* the shared refusal shape — a claim missing its interval/method/assumptions, or carrying a
   precise coordinate, renders THIS, never a chart with a warning drawn over it */
.ts-refusal {
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--muted);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; color: var(--text-2);
}
.ts-refusal-headline { font-weight: 650; color: var(--text); }
.ts-refusal-reasons { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }

/* ---- stock ("leakage") band ---- */
.ts-stock-readout { font-size: 13px; color: var(--text); margin: 2px 0 6px; font-family: var(--mono); }
.ts-stock-svg { width: 100%; height: auto; display: block; }
.ts-band-area { fill: var(--accent-soft); stroke: none; }
.ts-band-edge { fill: none; stroke: var(--accent); stroke-width: 1.25; }
.ts-band-mid  { fill: var(--text-2); }

/* shared by both svg charts */
.ts-axis-line { stroke: var(--line); stroke-width: 1; }
.ts-axis-text { fill: var(--muted); font-size: 8.5px; }
.ts-axis-text-end { text-anchor: end; }

/* ---- six-indicator small multiples ---- */
.ts-indicators-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ts-indicator {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 9px; display: flex; flex-direction: column; gap: 4px;
}
.ts-indicator-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 11px; }
.ts-indicator-label { font-weight: 650; color: var(--text); }
.ts-indicator-obs { font-size: 9.5px; padding: 1px 6px; border-radius: 999px; background: var(--panel-3); color: var(--text-2); }
.ts-indicator-obs.adequate { background: rgba(67,209,122,.14); color: var(--ok); }
.ts-indicator-obs.sparse   { background: var(--band-medium-soft); color: var(--band-medium); }
.ts-indicator-unit { font-size: 10px; color: var(--muted); }
.ts-indicator-gap  { font-size: 11px; font-style: italic; color: var(--muted); padding: 10px 2px; }
.ts-ind-svg  { width: 100%; height: auto; display: block; }
.ts-ind-line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.ts-ind-dot  { fill: var(--accent); }

@media (max-width: 480px) {
  .ts-indicators-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- EGA-T08: grey-zone field layers, one at a time (web/map_layers.js) ---- */
.gz-field-layers {
  width: 196px; padding: 8px 9px 9px; background: rgba(17,21,29,.92) !important;
  backdrop-filter: blur(8px); border-radius: var(--radius-sm) !important;
  color: var(--text-2); font-size: 11.5px;
}
.gz-fl-head {
  margin-bottom: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-2);
}
.gz-fl-sub { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.gz-fl-buttons { display: flex; flex-direction: column; gap: 3px; }
.gz-fl-buttons button {
  text-align: left; padding: 4px 8px; font: inherit; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-xs); cursor: pointer;
}
.gz-fl-buttons button:hover { color: var(--text); background: var(--panel-3); }
.gz-fl-buttons button.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.gz-fl-buttons button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gz-fl-status:empty { display: none; }
.gz-fl-status { margin-top: 7px; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }
.gz-fl-key { display: flex; align-items: center; gap: 7px; }
.gz-fl-swatch { width: 12px; height: 12px; flex: none; border-radius: 2px; border: 1px solid rgba(255,255,255,.18); }
.gz-fl-swatch-unknown { background: transparent; border: 1px dashed var(--band-rumored); }
.gz-fl-note { font-size: 10.5px; color: var(--muted); }
.gz-fl-missing { font-size: 11px; color: var(--text-2); }
.gz-fl-missing b { color: var(--text); font-weight: 650; }
/* Dossier blindness block (live-data pass, lane L4): one row per channel from
   GET /grey-zone/cell/{id}/blindness. The band chip only relabels the API's own band. */
.gzd-blind { margin: 0 0 8px; }
.gzd-blind-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; font-size: 13px; }
.gzd-blind-days { font-variant-numeric: tabular-nums; color: var(--text); }
.gzd-blind-band { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-2); }
.gzd-blind-band[data-band^="over_"] { border-color: var(--warn); color: var(--warn); }
