/* Orbital client surface. Dense, dark, legible at a trading desk. */
:root {
  --bg: #0d1117; --panel: #161b22; --panel-2: #1c2230; --border: #283040;
  --text: #e6e8eb; --muted: #8b949e; --link: #79b8ff;
  --amber: #d29922; --blue: #58a6ff; --green: #3fb950; --red: #f85149; --grey: #6e7681;
  --orbital-navy: #0A245D;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 1rem/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0 0 .5rem; }
h2 { font-size: 1rem; margin: 0 0 .6rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
button { font: inherit; }
button.link { background: none; border: 0; color: var(--link); cursor: pointer; padding: 0; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.25rem;
  background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; letter-spacing: .18em; color: var(--text); }
.brand.big { font-size: 1.6rem; }
/* Orbital marks, already white on transparent — no filter needed on the dark nav. */
.brand-logo { height: 22px; width: auto; display: block; }
.brand-lockup { width: auto; display: block; }
.brand-lockup.login-lockup { height: 88px; margin: 0 auto .4rem; }
/* Nav: full lockup (tagline legible) on desktop, wordmark-only on narrow screens. */
.nav-lockup { height: 40px; }
.nav-wordmark { height: 22px; display: none; }
@media (max-width: 760px) {
  .nav-lockup { display: none; }
  .nav-wordmark { display: block; }
}
.topbar nav { display: flex; gap: 1rem; }
.topbar nav a { color: var(--muted); padding: .2rem 0; border-bottom: 2px solid transparent; }
.topbar nav a.active { color: var(--text); border-bottom-color: var(--blue); }
.account { margin-left: auto; display: flex; gap: .9rem; align-items: center; }
.account form { margin: 0; }

.page { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login { width: min(360px, 100%); background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.75rem; display: grid; gap: .9rem; }
.login label { display: grid; gap: .3rem; color: var(--muted); font-size: .9rem; }
.login input { background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: .55rem .6rem; font: inherit; }
.login button { background: var(--blue); color: #0d1117; border: 0; border-radius: 6px; padding: .6rem; font-weight: 600; cursor: pointer; }
.error { color: var(--red); margin: 0; }

/* Stream layout. The sidebar rests as a 56px icon rail at every width; pinning widens the column
   and pushes the content, otherwise the expanded panel is an overlay that does not move the map. */
.stream-page { display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; padding: 1.25rem; max-width: 1600px; margin: 0 auto; }
.stream-page:has(#sidebar.pinned) { grid-template-columns: 260px 1fr; }
@media (max-width: 900px) { .stream-page { grid-template-columns: 56px 1fr; } }

/* Left sidebar: rail + hover/tap overlay + pin.
   z-index 1100 lifts the whole sidebar column above the map: Leaflet's panes and controls reach
   ~1000, and `.map { isolation: isolate }` confines them to the map's own stacking context, so the
   expanded overlay sits on top of the map, its controls and the posture table, nothing clipped. */
.filters { position: relative; width: 56px; z-index: 1100; }
.filters.pinned { width: 260px; }
.rail { display: flex; flex-direction: column; gap: .5rem; }
.filters.pinned .rail { display: none; }
.rail-icon { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.rail-icon:hover { color: var(--text); border-color: var(--blue); }
.rail-icon .dot { display: none; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--blue); }
.rail-icon.has-active .dot { display: block; }

/* The expandable panel. Overlay (absolute) when not pinned; in-flow when pinned. */
.filters-panel { position: absolute; top: 0; left: 0; width: 260px; z-index: 60;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: .8rem;
  box-shadow: 0 10px 34px rgba(3, 8, 18, .55); max-height: calc(100vh - 90px); overflow: auto;
  opacity: 0; visibility: hidden; transform: translateX(-8px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s; }
.filters.expanded .filters-panel { opacity: 1; visibility: visible; transform: none; }
.filters.pinned .filters-panel { position: static; opacity: 1; visibility: visible; transform: none;
  box-shadow: none; max-height: none; border: 0; padding: 0; }
.filters-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.filters-head h1 { margin: 0; }
.pin-toggle { margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); cursor: pointer; padding: .2rem .3rem; line-height: 0; flex: none; }
.pin-toggle:hover { color: var(--text); border-color: var(--blue); }
.pin-toggle[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); }

/* Regional posture panel */
.regional-posture { background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: .7rem .85rem; margin-bottom: .8rem; }
.rp-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .5rem; }
.rp-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rp-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.rp-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .04em; padding: .2rem .5rem; border-bottom: 1px solid var(--border); }
.rp-table td { padding: .3rem .5rem; border-bottom: 1px solid var(--border); }
.rp-table tr:last-child td { border-bottom: 0; }
.rp-region a { color: var(--text); font-weight: 600; }
.rp-region a:hover { color: var(--blue); }
.rp-sit { margin-left: .4rem; font-size: .72rem; color: var(--blue); }
.rp-count { font-variant-numeric: tabular-nums; }
.rp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .3rem; vertical-align: baseline; }
.posture-escalatory { background: var(--red); }
.posture-stable { background: var(--amber); }
.posture-quiet { background: var(--grey); }
.rp-trend.trend-up { color: var(--red); }
.rp-trend.trend-down { color: var(--green); }
.rp-trend.trend-flat { color: var(--muted); }
.rp-chokepoints { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cp-row { display: inline-flex; gap: .4rem; align-items: baseline; border: 1px solid var(--border);
  border-radius: 6px; padding: .25rem .5rem; font-size: .8rem; }
.cp-row.status-threatened, .cp-row.status-disrupted, .cp-row.status-closed { border-color: var(--red); }
.cp-name { font-weight: 600; }
.cp-state { color: var(--amber); text-transform: capitalize; }
.cp-quiet { width: 100%; }
/* A stale chokepoint status: muted, no red border — it is history, not a live alert. */
.cp-row.cp-stale { border-color: var(--border); }
.cp-row.cp-stale .cp-state { color: var(--muted); text-transform: capitalize; }
/* Quiet-regions fold-out under the posture table. */
.rp-quiet { margin-top: .5rem; }
.rp-quiet > summary { cursor: pointer; color: var(--muted); font-size: .78rem; list-style: revert; }
.rp-quiet[open] > summary { margin-bottom: .3rem; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
  padding: .5rem .7rem; margin-bottom: .7rem; font-size: .82rem; }
.notice.new-origin-notice { border-color: var(--blue); }
.notice .tight { margin: .35rem 0 .2rem; padding-left: 1.1rem; }
.notice .tight li { margin: .15rem 0; }
.verdict { font-weight: 600; }
.verdict.genuine { color: var(--red, #C00000); }
.verdict.noise { color: var(--muted); }
.verdict.review { color: var(--blue, #1F3864); }
.session-alert { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .6rem 0 1rem;
  padding: .6rem .8rem; border: 1px solid var(--red); border-radius: 6px; background: rgba(248, 81, 73, .08);
  font-size: .85rem; }
/* Map primary with the market strip beneath it, list beside them. The map column is sticky so
   the map and charts stay in view while the card list scrolls. */
.stream-main { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .stream-main { grid-template-columns: 1fr; } }
.map-column { display: flex; flex-direction: column; gap: .5rem; position: sticky; top: .5rem; }
.map-stream { height: 60vh; margin-bottom: 0; }
#stream-body { min-height: 0; }
#stream-list { overflow-y: auto; padding-right: .3rem; align-content: start; max-height: calc(100vh - 140px); }
@media (max-width: 1100px) {
  .map-column { position: static; }
  #stream-list { max-height: none; overflow: visible; }
}

/* Market strip: four energy benchmarks under the map, stacking on a phone. */
.market-bar { display: flex; justify-content: flex-end; }
.market-toggle button.link { background: none; border: none; color: var(--muted); font-size: .78rem; cursor: pointer; padding: 0; }
.market-toggle button.link:hover { color: var(--blue); }
.market-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.market-chart { height: 150px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.market-chart:hover { border-color: var(--blue); }
.market-chart-label { font-size: .72rem; color: var(--muted); padding: .25rem .5rem 0; }
.market-chart .tv-slot { flex: 1; min-height: 0; }
.market-chart .tv-slot, .market-chart .tradingview-widget-container,
.market-chart .tradingview-widget-container__widget { height: 100%; }
.tradingview-widget-copyright { font-size: .62rem; text-align: right; padding: 0 .4rem .2rem; }
.tradingview-widget-copyright a { color: var(--muted); text-decoration: none; }
@media (max-width: 1100px) { .market-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .market-strip { grid-template-columns: 1fr; } }
/* Brent and WTI only. Off by default; when shown, give the embedded widget enough height to
   render its mini chart without clipping. */
.market-strip-half { grid-template-columns: repeat(2, 1fr); }
.market-strip-half .market-chart { height: 150px; }

/* Theatre situations panel: fills the space under the map beside the shock picture. */
.theatre-situations { display: flex; flex-direction: column; gap: .4rem; margin-top: .2rem; }
.ts-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .45rem; }
.ts-card { display: flex; flex-direction: column; gap: .3rem; background: var(--panel);
  border: 1px solid var(--border); border-radius: 6px; padding: .45rem .55rem;
  text-decoration: none; color: inherit; }
.ts-card:hover { border-color: var(--blue); }
.ts-card.baseline { border-style: dashed; }
.ts-top { display: flex; align-items: center; gap: .4rem; }
.ts-rating { flex: none; min-width: 1.5rem; height: 1.5rem; line-height: 1.5rem; text-align: center;
  border-radius: 5px; color: #fff; font-weight: 700; font-size: .82rem; }
.ts-rating.unrated { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.ts-name { font-weight: 600; font-size: .82rem; }
.ts-outlook { margin: 0; font-size: .76rem; color: var(--text, #dfe6f2); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ts-outlook.baseline-note { color: var(--muted); font-style: italic; }
.ts-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem;
  font-size: .68rem; color: var(--muted); }
.ts-tempo { color: var(--text, #cdd6e4); }

/* Expanded chart modal. */
.market-modal { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; }
.market-modal[hidden] { display: none; }
.market-modal-backdrop { position: absolute; inset: 0; background: rgba(3, 8, 18, .7); }
.market-modal-panel { position: relative; width: min(900px, 92vw); height: min(560px, 80vh);
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 2.2rem .8rem .8rem; }
.market-modal-panel #market-modal-slot { height: 100%; }
.market-modal-close { position: absolute; top: .4rem; right: .6rem; background: none; border: none;
  color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.market-modal-close:hover { color: var(--text, #fff); }
.card { cursor: pointer; }
.card a { cursor: pointer; }
.card.selected { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.filters { align-self: start; position: sticky; top: 4rem; }
.filters-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.live { font-size: .8rem; color: var(--muted); }
.live::before { content: "●"; margin-right: .3rem; color: var(--grey); }
.live[data-state="live"]::before { color: var(--green); }
.live[data-state="reconnecting"]::before { color: var(--amber); }
.live[data-state="closed"]::before { color: var(--red); }
.filter-group { border-top: 1px solid var(--border); padding: .5rem 0; }
.filter-group summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.filter-group .count { background: var(--blue); color: #0d1117; border-radius: 9px; padding: 0 .4rem; font-size: .75rem; }
.check { display: flex; gap: .45rem; align-items: center; font-size: .88rem; padding: .12rem 0; color: var(--text); }

/* Cards */
#stream-list { display: grid; gap: .6rem; }
.card, .detail { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--grey);
  border-radius: 6px; padding: .7rem .9rem; }
.card.lane-auto, .detail.lane-auto { border-left-color: var(--amber); }
.card.lane-verified, .detail.lane-verified { border-left-color: var(--blue); }
.card.lane-confirmed, .detail.lane-confirmed { border-left-color: var(--green); }
.card.fresh { animation: fresh 4s ease-out; }
@keyframes fresh { from { background: var(--panel-2); box-shadow: 0 0 0 1px var(--blue); } to { background: var(--panel); } }
.card-top, .card-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .82rem; }
.card-top .meta { color: var(--muted); }
.card-top .updated { margin-left: auto; color: var(--muted); }
.card .title { font-size: 1.02rem; margin: .35rem 0 .15rem; }
.card .title a { color: var(--text); }
.card .summary { margin: 0 0 .35rem; color: var(--muted); font-size: .9rem;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-bottom { color: var(--muted); }
.card-bottom span + span::before { content: "·"; margin-right: .5rem; color: var(--border); }
.production.halted { color: var(--red); font-weight: 600; }
.production.ongoing { color: var(--green); }
.is-retracted .title a { text-decoration: line-through; color: var(--muted); }
.retraction { color: var(--red); font-weight: 700; font-size: .8rem; margin: .3rem 0 0; letter-spacing: .05em; text-transform: uppercase; }
.empty { color: var(--muted); padding: 2rem; text-align: center; border: 1px dashed var(--border); border-radius: 6px; }

/* Indicators and theatre posture */
.badge.indicator { color: #c084fc; border-color: #c084fc; }
.badge.dir-escalatory { color: var(--red); border-color: var(--red); }
.badge.dir-de_escalatory { color: var(--green); border-color: var(--green); }
.card.is-indicator { border-left-color: #c084fc; border-left-style: dashed; background: #14161f; }
.card.is-indicator .title a { font-weight: 500; }
.posture { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .7rem;
  padding: .4rem .55rem; background: var(--panel); border: 1px solid var(--border); border-radius: 5px; }
.posture-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: .3rem; }
.posture-item { font-size: .78rem; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 4px; padding: .2rem .45rem; display: inline-flex; gap: .35rem; align-items: baseline; }
.posture-item .count { background: #c084fc; color: #0d1117; border-radius: 8px; padding: 0 .35rem; font-weight: 700; }
.posture-item .arrow { color: var(--muted); }
.posture-item.dir-escalatory .arrow { color: var(--red); }
.posture-item.dir-de_escalatory .arrow { color: var(--green); }
.posture-item .report { color: var(--muted); font-size: .72rem; }
a.posture-item { text-decoration: none; color: inherit; }
a.posture-item.has-situation { border-color: var(--blue); cursor: pointer; }
a.posture-item.has-situation:hover { background: var(--panel); }
a.posture-item.has-situation strong { text-decoration: underline; text-underline-offset: 2px; }

/* Theatre situation (client detail) */
.situation { max-width: 760px; margin: 0 auto; }
.situation .back { display: inline-block; margin-bottom: .8rem; color: var(--muted); text-decoration: none; font-size: .85rem; }
.situation-head { margin-bottom: 1rem; }
.situation-head h1 { margin: .3rem 0 .2rem; }
.situation-head .meta { color: var(--muted); font-size: .8rem; margin: 0; }
.situation-section { margin: 0 0 1.1rem; }
.situation-section h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .3rem; }
.situation-section p { margin: 0 0 .5rem; line-height: 1.55; }
.lane-badge.situation { background: #1e3a5f; color: #cfe2ff; }
.situation .empty { color: var(--muted); }

/* Orbital comment: the analyst's own voice, visibly distinct from the templated summary. */
.trident-comment { border-left: 3px solid var(--blue); background: rgba(56, 139, 253, .08);
  padding: .4rem .6rem; margin: .5rem 0; border-radius: 0 4px 4px 0; }
.trident-comment .tc-label { display: block; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--blue); font-weight: 700; margin-bottom: .15rem; }
.trident-comment p { margin: 0; font-style: italic; color: var(--text, #c9d1d9); }
/* An indicator's grounded context sentence, and its related-items list. */
.card .context, .detail .context { color: var(--muted); font-size: .86rem; margin: .2rem 0 .3rem; }
.related { margin: .35rem 0; font-size: .8rem; }
.related-label { text-transform: uppercase; letter-spacing: .06em; font-size: .66rem; color: var(--muted); }
.related ul { margin: .1rem 0 0; padding-left: 1rem; }
.related a { color: var(--blue); text-decoration: none; }

/* Stream update marker and the collapsed "Updated in the last hour" strip. */
.card .change-note { color: var(--amber, #d29922); font-size: .72rem; }
.updated-strip { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
  padding: .35rem .6rem; margin-bottom: .6rem; font-size: .82rem; }
.updated-strip summary { cursor: pointer; color: var(--muted); }
.updated-strip .count { background: var(--amber, #d29922); color: #0d1117; border-radius: 8px;
  padding: 0 .35rem; font-weight: 700; font-size: .72rem; }
.updated-strip ul { margin: .4rem 0 0; padding-left: 1rem; }
.updated-strip li { margin: 0 0 .2rem; }
.updated-strip a { color: var(--blue); text-decoration: none; }

/* Analyst-only line on a card/event page: refs and source names a client never sees. */
.analyst-line { margin-top: .4rem; padding-top: .35rem; border-top: 1px dashed var(--border);
  color: var(--muted); font-size: .72rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.analyst-line span { white-space: nowrap; }
.panel.report h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .9rem 0 .25rem; }
.panel.report h3:first-of-type { margin-top: 0; }
.panel.report p { margin: 0 0 .2rem; }

/* Chokepoint strip */
.chokepoints { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.chokepoint { flex: 1 1 130px; background: var(--panel); border: 1px solid var(--border);
  border-top: 3px solid var(--grey); border-radius: 5px; padding: .35rem .5rem; font-size: .8rem; }
.chokepoint .name { display: block; font-weight: 600; }
.chokepoint .state { color: var(--muted); }
.chokepoint .when { display: block; color: var(--muted); font-size: .72rem; }
.chokepoint.unknown .state { color: var(--grey); }
.chokepoint.status-operating, .chokepoint.status-restored { border-top-color: var(--green); }
.chokepoint.status-disruption_reported, .chokepoint.status-threatened, .chokepoint.status-restarting { border-top-color: var(--amber); }
.chokepoint.status-chokepoint_closure, .chokepoint.status-blockaded, .chokepoint.status-force_majeure,
.chokepoint.status-precautionary_shutdown, .chokepoint.status-damaged_shut { border-top-color: var(--red); }

/* Maps */
.map { height: 260px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: .7rem;
  background: var(--panel); }
.map-detail { height: 320px; }
.map-empty { display: grid; place-items: center; color: var(--muted); font-size: .85rem; height: 90px; }
.map-reset { background: var(--panel); color: var(--text, #c9d1d9); border: 1px solid var(--border);
  border-radius: 4px; padding: .25rem .5rem; font-size: .75rem; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.map-reset:hover { border-color: var(--blue); }
/* Confine Leaflet's internal stacking (panes ~700, controls ~1000) to the map itself, so the
   sidebar overlay (z-index 1100) can sit above the whole map rather than behind its controls. */
.map { isolation: isolate; }
.leaflet-container { background: #0b0f14; font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.leaflet-bar a { background: var(--panel); color: var(--text); border-color: var(--border); }
.leaflet-control-attribution { background: rgba(13, 17, 23, .8) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--link) !important; }

/* Market tags and watchlist */
.tag { display: inline-block; background: var(--panel-2); color: var(--muted); border-radius: 3px;
  padding: 0 .3rem; margin-right: .25rem; font-size: .72rem; }
.watchlist-toggle { font-weight: 600; padding: .35rem 0; }
.watchlist select, .watchlist input { width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 5px; padding: .3rem; font: inherit; font-size: .85rem; margin-bottom: .4rem; }
.watchlist button { background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: .3rem .6rem; cursor: pointer; }
.analyst-note { background: var(--panel-2); border-left: 3px solid var(--blue); padding: .5rem .7rem; border-radius: 4px; }

/* Badges */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  padding: .08rem .42rem; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); }
.badge.lane-auto { color: var(--amber); border-color: var(--amber); }
.badge.lane-verified { color: var(--blue); border-color: var(--blue); }
.badge.lane-confirmed { color: #0d1117; background: var(--green); border-color: var(--green); }
.badge.conf-investigating { color: var(--muted); }
.badge.conf-reported { color: var(--amber); }
.badge.conf-confirmed { color: var(--green); }
.badge.priority-critical { color: var(--red); border-color: var(--red); }
.badge.priority-high { color: var(--amber); border-color: var(--amber); }
.badge.status-red { color: var(--red); border-color: var(--red); }
.badge.status-amber { color: var(--amber); border-color: var(--amber); }
.badge.status-blue { color: var(--blue); border-color: var(--blue); }
.badge.tier { color: var(--text); }

/* Detail */
.detail h1 { margin: .45rem 0; font-size: 1.3rem; }
.detail .lead { color: var(--text); margin: 0 0 .8rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin: 0; }
.facts div { background: var(--panel-2); border-radius: 5px; padding: .45rem .6rem; }
.facts dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: .9rem; margin-top: .9rem; }
.notice { border: 1px solid var(--border); border-radius: 6px; padding: .6rem .8rem; margin: .6rem 0; }
.retraction-notice { border-color: var(--red); color: var(--red); }
.correction-notice { border-color: var(--amber); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .3rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--muted); min-width: 7.5rem; }
.plain { margin: 0; padding-left: 1rem; }
.evidence { border-top: 1px solid var(--border); padding: .6rem 0; }
.evidence:first-of-type { border-top: 0; }
.evidence.correction { border-left: 3px solid var(--amber); padding-left: .6rem; }
.evidence-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .9rem; }
.evidence-text { white-space: pre-wrap; margin: .35rem 0 0; font-size: .92rem; }
.original summary { cursor: pointer; color: var(--link); font-size: .85rem; margin-top: .3rem; }

.imagery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; }
.imagery-grid .shot { display: block; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; background: var(--bg); }
.imagery-grid img { display: block; width: 100%; height: 150px; object-fit: cover; }
.imagery-grid .shot:hover { border-color: var(--blue); }
.shot-card { border: 1px solid var(--border); border-radius: 5px; padding: .4rem; background: var(--panel-2); }
.shot-card img { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 3px; }
.shot-card.is-hidden img { filter: grayscale(1) brightness(.45); }
.shot-card .shot-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .35rem; font-size: .75rem; }
.shot-card form { margin: 0; }
.shot-card button { padding: .15rem .45rem; font-size: .75rem; }

/* Analyst platform */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; margin: .9rem 0; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: .8rem .9rem; }
.stat h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .3rem; }
.stat-figure { font-size: 2rem; font-weight: 700; margin: 0; line-height: 1.1; }
.stat-figure.good { color: var(--green); }
.stat-figure.warn { color: var(--amber); }
.stat-figure.bad { color: var(--red); }
.stat-note { margin: .2rem 0 0; font-size: .82rem; }
.failing { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .82rem; }
.failing li { padding: .2rem 0; border-top: 1px solid var(--border); }
.failing li span.muted { display: block; }

.queue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem; }
.bucket-count { margin-right: 1rem; }
.bucket-count strong { color: var(--text); }
.board.queue td { vertical-align: middle; }
.board.queue td a { display: block; }
.board.queue td .small { display: block; }
.gate-failed { color: var(--red); font-weight: 600; }
.gate-passed { color: var(--green); }

/* Analyst inbox (workflow redesign stage 1): one status label + the full client text per item. */
.inbox { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.inbox-item { background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--border);
  border-radius: 6px; padding: .7rem .85rem; }
.inbox-item.status-needs-you, .inbox-item.status-held { border-left-color: var(--red); }
.inbox-item.status-live-unreviewed { border-left-color: var(--amber); }
.inbox-item.status-live-reviewed { border-left-color: var(--green); }
.inbox-item.status-retracted { border-left-color: var(--muted); opacity: .75; }
.inbox-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.status-badge { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .05em;
  padding: .12rem .45rem; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.status-badge.status-needs-you, .status-badge.status-held { color: var(--red); }
.status-badge.status-live-unreviewed { color: var(--amber); }
.status-badge.status-live-reviewed { color: #0d1117; background: var(--green); border-color: var(--green); }
.status-badge.status-retracted { color: var(--muted); }
.status-badge.whatsapp { color: #0d1117; background: #25D366; border-color: #25D366; }
.grade-chip { font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.grade-chip.grade-reported { color: var(--amber); }
.grade-chip.grade-confirmed { color: var(--green); }
.inbox-meta { color: var(--muted); font-size: .82rem; }
.inbox-age { margin-left: auto; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.inbox-title { font-size: 1rem; margin: .35rem 0 .2rem; }
.inbox-text { margin: 0 0 .25rem; color: var(--text); font-size: .92rem; line-height: 1.5; }
.inbox-text.context { color: var(--muted); font-size: .86rem; }
.inbox-foot { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; color: var(--muted); font-size: .8rem; }
.inbox-open { margin-left: auto; color: var(--blue); font-weight: 600; }
.badge.override { color: var(--amber); border-color: var(--amber); }
.error-notice { border-color: var(--red); color: var(--red); }

.analyst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-items: start; }
@media (max-width: 800px) { .analyst-grid { grid-template-columns: 1fr; } }
.analyst-grid .panel { margin-top: .9rem; }
.actions form { display: grid; gap: .3rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.actions form:first-of-type { border-top: 0; }
.actions label { font-size: .8rem; color: var(--muted); }
.actions input, .actions select, .actions textarea,
.panel input[type="text"], .panel textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: .35rem .5rem; font: inherit; font-size: .9rem; width: 100%;
}
.actions button, .panel button {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: .35rem .7rem; cursor: pointer; justify-self: start;
}
.actions button:hover:not(:disabled), .panel button:hover:not(:disabled) { border-color: var(--blue); }
button.primary { background: var(--blue); color: #0d1117; border-color: var(--blue); font-weight: 600; }
button.danger { color: var(--red); border-color: var(--red); }
button:disabled { opacity: .45; cursor: not-allowed; }
.panel .row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.extraction { background: var(--bg); border: 1px solid var(--border); border-radius: 5px;
  padding: .5rem; overflow-x: auto; font-size: .8rem; margin: .3rem 0 0; }
.analyst-event .timeline strong { font-weight: 600; }

tr.priority-row td { background: var(--panel-2); }
tr.priority-row td:first-child { border-left: 3px solid var(--green); }
code { font-size: .85em; color: var(--text); }

.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: .9rem 1.25rem;
  color: var(--muted); font-size: .78rem; }
.market-relevance { max-width: 22rem; color: var(--muted); font-size: .82rem; }
.site-footer p { margin: 0; max-width: 1100px; }
.site-footer .footer-brand { color: var(--text); font-weight: 600; letter-spacing: .02em; margin-bottom: .2rem; }

/* Asset board */
.table-wrap { overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; font-size: .9rem; }
.board th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); padding: .45rem .5rem; white-space: nowrap; }
.board td { border-bottom: 1px solid var(--border); padding: .45rem .5rem; vertical-align: top; }
.board tr.no-status td { color: var(--muted); }
.board tr.no-status td strong { color: var(--text); font-weight: 500; }
.halted { color: var(--red); }
.status { font-weight: 600; }
.status-operating, .status-restored { color: var(--green); }
.status-disruption_reported, .status-threatened, .status-restarting, .status-unknown { color: var(--amber); }
.status-precautionary_shutdown, .status-damaged_shut, .status-damaged_unconfirmed_shut, .status-force_majeure, .status-blockaded { color: var(--red); }

/* NASA FIRMS thermal anomaly flag on the asset board. */
.badge.thermal-anomaly { color: #ff6b35; border-color: #ff6b35; text-transform: none; letter-spacing: 0; }

/* Classifier-paused banner (API credit exhausted). Loud and red. */
.notice.classifier-paused { color: #fff; background: var(--red, #d9333f); border-color: var(--red, #d9333f);
  font-weight: 700; letter-spacing: .02em; }

/* Situation incident tables rendered from the what-has-changed Markdown table. */
.situation-incidents {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.9em;
}
.situation-incidents th,
.situation-incidents td {
  border: 1px solid var(--border, #d0d0d0);
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
}
.situation-incidents thead th {
  background: var(--panel, #f2f2f2);
  font-weight: 600;
  white-space: nowrap;
}

/* ===== Orbital launch theme ============================================= */
/* Navy logo on a white header bar — both the analyst dark theme (option A) and the
   client light theme (option B). The topbar only renders for logged-in users. */
.topbar { background: #ffffff; border-bottom: 2px solid var(--orbital-navy); }
.topbar .brand { color: var(--orbital-navy); }
.topbar nav a { color: #51607a; border-bottom: 2px solid transparent; }
.topbar nav a.active { color: var(--orbital-navy); border-bottom-color: var(--orbital-navy); }
.topbar .account .muted { color: #51607a; }
.topbar button.link { color: var(--orbital-navy); }

/* Client light theme (option B): navy (#0A245D) as the main colour. */
.theme-light {
  --bg: #f4f6f9; --panel: #ffffff; --panel-2: #eef1f6; --border: #d7dee7;
  --text: #1b2533; --muted: #5a6675; --link: #0A245D; --blue: #0A245D;
}
.theme-light a { color: var(--orbital-navy); }
.theme-light button:not(.link),
.theme-light .login button { background: var(--orbital-navy); color: #ffffff; border: 0; }
/* Navy table headers and accents. */
.theme-light .situation-incidents thead th,
.theme-light table.incidents thead th,
.theme-light table.ratings thead th,
.theme-light thead th { background: var(--orbital-navy); color: #ffffff; }
.theme-light .login { background: #ffffff; border: 1px solid var(--border);
  box-shadow: 0 2px 14px rgba(10,36,93,.08); }
.theme-light .situation-section h2 { color: var(--orbital-navy); }

/* Prominent top-of-page banners for notices and errors (never collapsed). */
.banner { padding: 10px 14px; border-radius: 8px; margin: 10px 0; font-weight: 500; }
.banner-notice { background: rgba(10,36,93,.10); border: 1px solid var(--orbital-navy); color: var(--text); }
.banner-error { background: rgba(248,81,73,.12); border: 1px solid var(--red); color: var(--text); }
.theme-light .banner-notice { background: #eaf0fb; color: #0A245D; }

/* Indicator cards on the light client theme: the dark card background is dark-theme only. */
.theme-light .card.is-indicator { background: #f3eefc; border-left-color: #7c3aed; }
.theme-light .card.is-indicator .title a { color: var(--text); }
.theme-light .badge.indicator { color: #6d28d9; border-color: #6d28d9; }

/* Regional updates (client) */
.regional h1 { margin-bottom: .2rem; }
.regional-table { width: 100%; border-collapse: collapse; margin-top: .8rem; font-size: .95rem; }
.regional-table th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border);
  padding: .5rem .6rem; white-space: nowrap; }
.regional-table td { border-bottom: 1px solid var(--border); padding: .55rem .6rem; vertical-align: middle; }
.regional-table .region-name { font-weight: 600; }
.rating-chip { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  padding: .12rem .45rem; border-radius: 4px; color: #fff; margin-right: .4rem; white-space: nowrap; }
.rating-chip.rating-5 { background: #b71c1c; }
.rating-chip.rating-4 { background: #e53935; }
.rating-chip.rating-3 { background: #f57c00; }
.rating-chip.rating-2 { background: #fbc02d; color: #222; }
.rating-chip.rating-1 { background: #2e7d32; }
.rating-chip.rating-0 { background: #607d8b; }
.btn-link { display: inline-block; margin-right: .5rem; font-weight: 600; color: var(--link, #0A245D); }
.regional-table .stale { color: #c62828; font-weight: 600; }
.small { font-size: .82rem; }

/* Main stream: NEW / UPDATED / EARLIER sections (first-indication order). */
.stream-section { margin: 1.3rem 0 .5rem; }
.stream-section h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  border-bottom: 1px solid var(--border); padding-bottom: .3rem; display: flex; align-items: center; gap: .5rem; margin: 0; }
.sec-count { color: var(--muted); font-weight: 600; }
.badge.new { color: #fff; background: #d32f2f; border-color: #d32f2f; font-weight: 800; }
.badge.small { font-size: .62rem; padding: .05rem .3rem; }
.updated-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; padding: .5rem .2rem;
  border-bottom: 1px solid var(--border); font-size: .92rem; }
.updated-row .u-title a { font-weight: 600; }
.updated-row .u-change { color: #c77700; font-weight: 600; }
.updated-row .u-meta { color: var(--muted); margin-left: auto; white-space: nowrap; font-size: .82rem; }
details.earlier > summary { cursor: pointer; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); padding: .45rem 0; }
.earlier-item { padding: .45rem .2rem; border-bottom: 1px solid var(--border); font-size: .9rem;
  display: flex; gap: .5rem; align-items: baseline; }
.earlier-item .e-title a { font-weight: 600; }
.earlier-item .e-meta { color: var(--muted); margin-left: auto; white-space: nowrap; font-size: .82rem; }

/* CLAIMED grade: distinct grey badge (a conflict party's own claim, not corroborated). */
.badge.conf-claimed { color: #6e7681; border-color: #6e7681; }
.theme-light .badge.conf-claimed { color: #5a6475; border-color: #b7c0cf; background: #eef1f6; }
.card.lane-auto.is-claimed, .detail.is-claimed { border-left-color: #8b949e; }

/* Legal pages, first-login acceptance, footer disclaimer. */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.6; }
.legal h1 { margin-bottom: .6rem; }
.legal h2 { font-size: 1.05rem; margin: 1.4rem 0 .3rem; }
.legal ol, .legal ul { padding-left: 1.3rem; }
.legal li { margin: .3rem 0; }
.legal-short { border-left: 3px solid var(--border); padding: .6rem .9rem; margin: .8rem 0 1.2rem;
  font-style: italic; color: var(--text); }
.legal-table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .92rem; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: .5rem .6rem; text-align: left; vertical-align: top; }
.legal-table th { background: var(--panel-2); }
.legal-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.accept-terms .accept-form { margin-top: 1rem; display: grid; gap: .9rem; max-width: 620px; }
.accept-form .check { display: grid; grid-template-columns: auto 1fr; gap: .55rem; align-items: start; }
.accept-form .check input { margin-top: .25rem; }
.accept-form button { justify-self: start; }
.site-footer .footer-disclaimer { font-size: .78rem; color: var(--muted); max-width: 820px; margin: .4rem auto; }
.site-footer .footer-links { font-size: .8rem; }
.site-footer .footer-links a { color: var(--link); }
