/* =========================================================================
   Global Security Intelligence Desk — design system
   Serious, modern, accessible. Severity is NEVER encoded by colour alone:
   every rating carries a text label and an icon/shape.
   Typography: Inter (UI) + JetBrains Mono (data), self-hosted (offline, CSP-safe).
   ========================================================================= */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/static/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("/static/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/jbmono-500.woff2") format("woff2"); }
/* Editorial serif for display type. An all-sans interface is the single
   clearest tell of a generic template; this desk is a publication, so its
   headlines are set like one. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/newsreader-400.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/newsreader-500.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/static/fonts/newsreader-600.woff2") format("woff2"); }

:root {
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 68px;
  --topbar-h: 52px;

  /* ---------------------------------------------------------------------
     GSID command-centre palette.

     Deep navy rather than neutral black: it reads as an operations surface
     and keeps the severity hues legible, which a pure grey ground does not —
     amber and red both go muddy on grey at these sizes.
     --------------------------------------------------------------------- */
  --bg: #080b12;
  --bg-2: #0a0e17;
  --panel: #0f1621;
  --panel-2: #141d2b;
  --panel-3: #1b2637;
  --panel-hover: #182233;
  --border: #1c2738;
  --border-2: #2d3d55;
  --text: #e6edf7;
  --text-dim: #9fb0c8;
  --text-mute: #76869c;   /* 4.56:1 on panel-2 — #6b7c94 was 3.98 */

  /* One restrained accent. It marks focus, active nav and interactive
     affordances — never severity, which has its own scale below. */
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --accent-soft: rgba(56,189,248,.12);
  --accent-ink: #04121f;
  --focus: #7dd3fc;

  /* ---------------------------------------------------------------------
     Severity scale. Six steps, ordered, each one a step warmer than the last.

     The application's own impact enum has four values (Critical / High /
     Moderate / Low), so those four are what stories actually use. Elevated and
     Medium exist for the travel-advisory levels, which are graded 1-4 by the
     issuing government and would otherwise collapse onto the same two colours.

     Colour is never the only carrier: every severity chip also renders a shape
     glyph, so the scale survives greyscale and colour-blindness.
     --------------------------------------------------------------------- */
  --sev-critical: #ff4d6d;
  --sev-high: #ff8c42;
  --sev-elevated: #f5a524;
  --sev-medium: #e3c84a;
  --sev-moderate: #4da3ff;   /* impact "Moderate" — informational, not warm */
  --sev-low: #2dd4a7;
  --sev-info: #8ea3bd;

  --conf-confirmed: #2dd4a7;
  --conf-high: #5fd68a;
  --conf-moderate: #4da3ff;
  --conf-low: #f5a524;
  --conf-unverified: #b98cff;

  --shadow: 0 16px 44px rgba(0,0,0,.6);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.45);
  --radius: 6px;
  --radius-sm: 4px;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Display serif retired from the shell: it read as editorial, not
     operational. Kept as a token because the Daily Brief still sets long-form
     prose, which is genuinely a reading surface. */
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
}

[data-theme="light"] {
  --bg: #eef1f6;
  --bg-2: #e6eaf1;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --panel-3: #eceff4;
  --panel-hover: #f0f3f8;
  --border: #d9dfe8;
  --border-2: #bcc6d4;
  --text: #0f1724;
  --text-dim: #445063;
  --text-mute: #616d85;   /* 4.60:1 on bg */
  --accent: #0369a1;
  --accent-2: #0284c7;
  --accent-soft: rgba(3,105,161,.10);
  --accent-ink: #ffffff;
  --focus: #0369a1;
  --sev-critical: #d11a43;
  --sev-high: #b3500e;
  --sev-elevated: #9c5f07;
  --sev-medium: #7d6d11;
  --sev-moderate: #1d4ed8;
  --sev-low: #0f766e;
  --sev-info: #55637a;
  --conf-confirmed: #0f766e;
  --conf-high: #24794a;
  --conf-moderate: #1d4ed8;
  --conf-low: #a16207;
  --conf-unverified: #6d3fd1;
  --shadow: 0 8px 26px rgba(15,23,36,.10);
  --shadow-sm: 0 1px 2px rgba(15,23,36,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Sans, not serif. The display serif read as a magazine masthead; an
   operations console wants headings that sit quietly above dense data.
   The Daily Brief re-applies the serif locally, where long-form prose is
   genuinely what is on the page. */
h1, h2, h3 {
  font-family: var(--sans);
  line-height: 1.2; margin: 0 0 .5rem;
  font-weight: 600; letter-spacing: -.015em;
}
h4 { line-height: 1.18; margin: 0 0 .5rem; font-weight: 600; letter-spacing: -.01em; }
h1 { letter-spacing: -.018em; }
p { margin: 0 0 .75rem; }
.num, .mono, [class*="num"] { font-variant-numeric: tabular-nums; }

/* Accessibility: visible keyboard focus + honour reduced-motion */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.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;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---------------- Application shell ---------------- */
/* A command-centre shell rather than a document: fixed rails, square-ish
   corners, hairline borders. Radii are 4-6px on purpose — the pill-shaped
   cards that read as friendly on a marketing page read as imprecise here. */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 40;
  transition: width .16s ease;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  padding: 0 .9rem; height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-weight: 700; font-size: .78rem; letter-spacing: .04em; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: .86rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-text span {
  font-size: .63rem; color: var(--text-mute); text-transform: uppercase;
  letter-spacing: .1em; white-space: nowrap;
}

.nav { display: flex; flex-direction: column; padding: .5rem .5rem 1rem; gap: 1px; overflow-y: auto; flex: 1; }
/* Group captions turn a 14-item list into four scannable blocks. */
.nav-group {
  font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-mute); padding: .95rem .65rem .35rem;
}
.nav-group:first-child { padding-top: .35rem; }
.nav a {
  display: flex; align-items: center; gap: .65rem; padding: .48rem .65rem;
  color: var(--text-dim); border-radius: var(--radius-sm);
  font-size: .845rem; font-weight: 450; letter-spacing: -.005em;
  position: relative; white-space: nowrap;
  transition: background .14s ease, color .14s ease;
}
.nav a:hover { background: var(--panel-hover); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--panel-2); color: var(--text); font-weight: 500; }
/* Active marker is a rail on the left edge, not a filled pill: it survives
   collapse to icon-only and never competes with a severity colour. */
.nav a.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 16px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.nav-ico {
  width: 17px; height: 17px; flex: 0 0 17px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-mute);
}
.nav-ico svg { width: 17px; height: 17px; display: block; }
.nav a:hover .nav-ico, .nav a.active .nav-ico { color: var(--accent); }
.btn-ico { width: 15px; height: 15px; vertical-align: -3px; }
.nav-badge {
  margin-left: auto; background: var(--sev-critical); color: #14040a;
  font-size: .66rem; padding: 0 6px; min-width: 18px; text-align: center;
  border-radius: 9px; font-weight: 700; font-family: var(--mono);
}

/* Collapsed rail: icons only, labels revealed on hover via the title attr. */
body.nav-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.nav-collapsed .brand-text,
body.nav-collapsed .nav-group,
body.nav-collapsed .nav a span.nav-label,
body.nav-collapsed .sidebar-foot .sf-text { display: none; }
body.nav-collapsed .nav a { justify-content: center; padding: .5rem; }
body.nav-collapsed .nav-badge {
  position: absolute; top: 2px; right: 2px; margin: 0; min-width: 15px; font-size: .58rem;
}
body.nav-collapsed .main,
body.nav-collapsed .topbar,
body.nav-collapsed .demo-banner { left: var(--sidebar-w-collapsed); }
body.nav-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
body.nav-collapsed .brand { justify-content: center; padding: 0; }

.sidebar-foot {
  padding: .55rem .5rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .35rem;
}
.sf-row {
  display: flex; align-items: center; gap: .55rem; padding: .4rem .55rem;
  border-radius: var(--radius-sm); font-size: .76rem; color: var(--text-dim);
  background: none; border: 0; width: 100%; cursor: pointer; text-align: left;
  font-family: inherit;
}
.sf-row:hover { background: var(--panel-hover); color: var(--text); }
.sf-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--sev-info); }
.sf-dot.live { background: var(--sev-low); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sev-low) 22%, transparent); }
.sf-dot.demo { background: var(--conf-unverified); }
.mode-badge {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-mute); font-family: var(--mono);
}

/* ---- Top bar ---- */
.topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--topbar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .7rem; padding: 0 .9rem; z-index: 30;
  transition: left .16s ease;
}
.menu-only { display: none; }
.search { flex: 1; display: flex; align-items: center; max-width: 520px; position: relative; }
.search input {
  flex: 1; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  padding: .42rem .7rem .42rem 2rem; border-radius: var(--radius-sm); font-size: .83rem;
  font-family: inherit;
}
.search input::placeholder { color: var(--text-mute); }
.search input:focus { border-color: var(--accent); background: var(--panel-2); }
.search-ico {
  position: absolute; left: .6rem; width: 14px; height: 14px;
  color: var(--text-mute); pointer-events: none;
}
.search .icon-btn { display: none; }
.topbar-right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

/* System-state pill. Named distinctly because `.status-pill` was already
   taken by the regulatory lifecycle badges, whose colours this would have
   overridden with a flat green. */
.sys-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .67rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  font-family: var(--mono); color: var(--sev-low);
  border: 1px solid color-mix(in srgb, var(--sev-low) 32%, transparent);
  background: color-mix(in srgb, var(--sev-low) 10%, transparent);
  padding: .25rem .5rem; border-radius: var(--radius-sm); white-space: nowrap;
}
.sys-pill .sf-dot { background: var(--sev-low); animation: pulse-dot 2.4s ease-in-out infinite; }
.sys-pill.is-demo { color: var(--conf-unverified); border-color: color-mix(in srgb, var(--conf-unverified) 32%, transparent); background: color-mix(in srgb, var(--conf-unverified) 10%, transparent); }
.sys-pill.is-demo .sf-dot { background: var(--conf-unverified); }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sys-pill .sf-dot { animation: none; } }

.tz-select {
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: var(--radius-sm); padding: .3rem .4rem; font-size: .74rem; max-width: 140px;
  font-family: inherit;
}
.clock {
  font-family: var(--mono); font-size: .76rem; color: var(--text); letter-spacing: .02em;
  min-width: 62px; text-align: right; font-variant-numeric: tabular-nums;
}
.clock-zone { font-size: .6rem; color: var(--text-mute); letter-spacing: .08em; }

.icon-btn, .btn-ghost {
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: var(--radius-sm); padding: .35rem .5rem; cursor: pointer;
  font-size: .85rem; font-family: inherit;
}
.icon-btn:hover, .btn-ghost:hover { color: var(--text); border-color: var(--border-2); background: var(--panel-2); }
.icon-btn svg { width: 15px; height: 15px; display: block; }

.demo-banner {
  position: fixed; top: var(--topbar-h); left: var(--sidebar-w); right: 0; z-index: 25;
  background: color-mix(in srgb, var(--conf-unverified) 14%, var(--bg-2));
  border-bottom: 1px solid color-mix(in srgb, var(--conf-unverified) 45%, transparent);
  color: var(--text); padding: .45rem .9rem; font-size: .78rem;
}
.demo-banner strong { color: var(--conf-unverified); font-family: var(--mono); letter-spacing: .06em; }

.main {
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 1.1rem) 1.4rem 3rem;
  min-height: 100vh;
}
body.has-banner .main { padding-top: calc(var(--topbar-h) + 2.7rem); }
/* Intelligence density: a wider measure than an article, because these pages
   are grids of panels, not prose. */
.view { max-width: 1560px; margin: 0 auto; }

/* ---------------- Common components ---------------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.15rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); padding-bottom: .8rem;
}
.page-head h1 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.page-head .sub { color: var(--text-mute); font-size: .795rem; max-width: 92ch; margin-top: .15rem; }
.page-head-actions { display: flex; align-items: center; gap: .5rem; }

.grid { display: grid; gap: .85rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px){ .grid-3,.grid-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 680px){ .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr;} }

.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .95rem 1.05rem;
}
.panel h2 {
  font-size: .78rem; font-weight: 600; letter-spacing: .075em; text-transform: uppercase;
  color: var(--text-dim);
  display: flex; align-items: center; gap: .45rem; margin-bottom: .75rem;
}
/* Panel header strip: title left, action right, hairline under. Gives every
   panel the same silhouette so a dense grid still reads as a system. */
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin: -.95rem -1.05rem .8rem; padding: .6rem 1.05rem;
  border-bottom: 1px solid var(--border);
}
.panel-head h2 { margin: 0; }
.panel-head .panel-act { font-size: .74rem; color: var(--text-mute); white-space: nowrap; }
.panel-head .panel-act:hover { color: var(--accent); }
.panel.flush { padding: 0; }
.panel.flush .panel-head { margin: 0; }
.panel .panel-sub { color: var(--text-mute); font-size: .82rem; margin-top: -.3rem; }
.section-title {
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-mute); margin: 1.6rem 0 .7rem;
}

.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat .num { font-size: 1.9rem; font-weight: 750; font-family: var(--mono); }
.stat .lbl { color: var(--text-mute); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }

/* Chips / badges (label + icon, colourblind safe) */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .745rem; font-weight: 500; letter-spacing: -.005em;
  padding: .22rem .55rem; border-radius: 999px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--panel-3) 70%, transparent);
  color: var(--text-dim); white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
/* The shape glyph carries meaning for colourblind readers, so it stays — but
   at a quieter size it reads as a mark rather than as punctuation. */
.chip .ico { font-size: .72rem; opacity: .9; line-height: 1; }

.sev-critical { color: var(--sev-critical); }
/* Tint only the pill. These classes are also used on bare numbers and
   text (KPI tiles), where a filled background reads as a colour block. */
.chip.sev-critical { background: color-mix(in srgb, var(--sev-critical) 13%, transparent); border-color: color-mix(in srgb, var(--sev-critical) 22%, transparent); }
.sev-critical .dot { background: var(--sev-critical); }
.sev-high { color: var(--sev-high); }
/* Tint only the pill. These classes are also used on bare numbers and
   text (KPI tiles), where a filled background reads as a colour block. */
.chip.sev-high { background: color-mix(in srgb, var(--sev-high) 13%, transparent); border-color: color-mix(in srgb, var(--sev-high) 22%, transparent); }
.sev-high .dot { background: var(--sev-high); }
.sev-moderate { color: var(--sev-moderate); }
/* Tint only the pill. These classes are also used on bare numbers and
   text (KPI tiles), where a filled background reads as a colour block. */
.chip.sev-moderate { background: color-mix(in srgb, var(--sev-moderate) 13%, transparent); border-color: color-mix(in srgb, var(--sev-moderate) 22%, transparent); }
.sev-moderate .dot { background: var(--sev-moderate); }
.sev-low { color: var(--sev-low); }
/* Tint only the pill. These classes are also used on bare numbers and
   text (KPI tiles), where a filled background reads as a colour block. */
.chip.sev-low { background: color-mix(in srgb, var(--sev-low) 13%, transparent); border-color: color-mix(in srgb, var(--sev-low) 22%, transparent); }
.sev-low .dot { background: var(--sev-low); }
/* "New today" — accent-filled so fresh items stand out (not a severity) */
.sev-new {
  color: #fff;
  background: color-mix(in srgb, var(--accent, #4c8dff) 88%, #000);
  border-color: transparent;
  font-weight: 600;
}
.sev-new .dot { background: #fff; }

.conf-Confirmed{color:var(--conf-confirmed);border-color:color-mix(in srgb,var(--conf-confirmed) 55%,var(--border));}
.conf-High{color:var(--conf-high);border-color:color-mix(in srgb,var(--conf-high) 55%,var(--border));}
.conf-Moderate{color:var(--conf-moderate);border-color:color-mix(in srgb,var(--conf-moderate) 55%,var(--border));}
.conf-Low{color:var(--conf-low);border-color:color-mix(in srgb,var(--conf-low) 55%,var(--border));}
.conf-Unverified{color:var(--conf-unverified);border-color:color-mix(in srgb,var(--conf-unverified) 55%,var(--border));}

.trend-up { color: var(--sev-high); }
.trend-rapid { color: var(--sev-critical); }
.trend-down { color: var(--sev-low); }

/* Story cards */
.story-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .75rem; cursor: pointer;
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.story-card:hover {
  border-color: var(--border-2); transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
.story-card .sc-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.story-card h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -.014em; line-height: 1.35; margin: 0; }
.story-card .sc-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.story-card .sc-sum { color: var(--text-dim); font-size: .86rem; margin: 0; }
.story-card .sc-foot { display: flex; justify-content: space-between; align-items: center; color: var(--text-mute); font-size: .76rem; }

.score-ring {
  --v: 0; width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 750; font-size: .82rem; font-family: var(--mono);
  background: conic-gradient(var(--accent) calc(var(--v)*1%), var(--panel-2) 0);
  color: var(--text);
}
.score-ring span { background: var(--panel); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }

.demo-tag { font-size: .66rem; color: var(--conf-unverified); border: 1px solid var(--conf-unverified); border-radius: 4px; padding: 0 4px; text-transform: uppercase; letter-spacing: .05em; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: center; }
.filters select, .filters input {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  padding: .4rem .55rem; border-radius: 8px; font-size: .82rem;
}
.filters label { font-size: .74rem; color: var(--text-mute); display: flex; flex-direction: column; gap: 2px; }

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04121f;
  border: none; border-radius: 8px; padding: .5rem .9rem; font-weight: 650; cursor: pointer; font-size: .85rem;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border-2); }
.btn.small { padding: .3rem .6rem; font-size: .78rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Pulse / posture meter */
.posture { display: flex; align-items: center; gap: 1rem; }
.posture .meter { flex: 1; height: 10px; border-radius: 999px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--border); }
.posture .meter i { display: block; height: 100%; }
.posture-Elevated .meter i { width: 85%; background: var(--sev-critical); }
.posture-Guarded .meter i { width: 55%; background: var(--sev-high); }
.posture-Baseline .meter i { width: 28%; background: var(--sev-low); }

/* Story detail */
.detail-head { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.detail-ratings { display: flex; flex-wrap: wrap; gap: .4rem; }
/* "Show only confirmed facts": hide every generated/interpretive block so the
   page shows sourced evidence only. */
.facts-only .inferred { display: none; }
.facts-banner {
  border: 1px solid var(--border-2); border-left: 3px solid var(--accent);
  background: var(--panel-2); color: var(--text-dim);
  border-radius: 0 8px 8px 0; padding: .6rem .8rem; margin-bottom: 1rem;
  font-size: .88rem;
}
/* Toggle buttons need a visible pressed state, not just aria-pressed. */
.btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.detail-cols { display: grid; grid-template-columns: 1fr 320px; gap: 1.2rem; align-items: start; }
@media (max-width: 900px){ .detail-cols { grid-template-columns: 1fr; } }
/* Full-width appendix below the columns: reference material that would
   otherwise make the narrow rail outgrow the main column. */
.detail-appendix .cite-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: .5rem; align-items: start;
}
.detail-appendix .cite-grid .citation { margin-bottom: 0; }
.detail-appendix ul.cite-grid { padding-left: 0; }
.detail-section { margin-bottom: 1.3rem; }
.detail-section h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-2); border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
ul.clean { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
ul.clean li { padding-left: 1.1rem; position: relative; color: var(--text-dim); }
ul.clean li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

.claim { border-left: 3px solid var(--border-2); padding: .5rem .7rem; background: var(--panel-2); border-radius: 0 8px 8px 0; margin-bottom: .5rem; }
.claim .claim-type { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border-2); }
.ct-fact{color:var(--conf-confirmed);} .ct-official_claim{color:var(--conf-moderate);}
.ct-witness_report{color:var(--conf-high);} .ct-analyst_judgment{color:var(--accent);}
.ct-inference,.ct-forecast,.ct-scenario{color:var(--sev-high);}
.ct-rumor,.ct-disinformation{color:var(--sev-critical);}

.citation { padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .5rem; background: var(--panel-2); }
.citation .cite-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.tier-badge { font-family: var(--mono); font-size: .68rem; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-2); }
.tier-1{color:var(--conf-confirmed);border-color:var(--conf-confirmed);}
.tier-2{color:var(--conf-moderate);}
.tier-3{color:var(--sev-high);}
.tier-4{color:var(--sev-critical);}

.narrative { border: 1px solid var(--border); border-radius: 8px; padding: .7rem; background: var(--panel-2); }

/* Scoring bars */
.score-dim { margin-bottom: .55rem; }
.score-dim .sd-top { display: flex; justify-content: space-between; font-size: .8rem; }
.score-dim .bar { height: 7px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.score-dim .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.score-dim .sd-reason { font-size: .74rem; color: var(--text-mute); margin-top: 2px; }

/* Timeline */
.timeline { border-left: 2px solid var(--border-2); padding-left: 1rem; margin-left: .4rem; }
.timeline .tl-item { position: relative; margin-bottom: .8rem; }
.timeline .tl-item::before { content: ""; position: absolute; left: -1.32rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline time { font-family: var(--mono); font-size: .74rem; color: var(--text-mute); }

/* Regulatory */
.reg-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: var(--panel); }
.status-pill { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.st-rumor,.st-proposal{ background: color-mix(in srgb,var(--conf-unverified) 25%, transparent); color: var(--conf-unverified);}
.st-draft{ background: color-mix(in srgb,var(--sev-high) 22%, transparent); color: var(--sev-high);}
.st-enacted{ background: color-mix(in srgb,var(--conf-moderate) 22%, transparent); color: var(--conf-moderate);}
.st-effective,.st-enforced{ background: color-mix(in srgb,var(--conf-confirmed) 22%, transparent); color: var(--conf-confirmed);}
.reg-grid { display: grid; grid-template-columns: 140px 1fr; gap: .3rem .8rem; font-size: .84rem; margin-top: .6rem; }
.reg-grid dt { color: var(--text-mute); }
.reg-grid dd { margin: 0; color: var(--text-dim); }

/* Map */
.map-wrap { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow: hidden; }
.map-wrap svg { width: 100%; height: auto; display: block; }
.map-canvas { min-height: 220px; }
/* Real world map (country choropleth) */
.map-ocean { fill: var(--panel-2); }
.map-grat { stroke: var(--border); stroke-width: .4; stroke-opacity: .5; }
.map-country { fill: var(--border-2); fill-opacity: .55; stroke: var(--panel); stroke-width: .4; transition: fill-opacity .12s, stroke .12s; }
/* Globe hover detail. Positioned against .map-canvas, which must therefore
   establish a containing block. */
.map-canvas { position: relative; }
.globe-tip {
  position: absolute; z-index: 5; pointer-events: none;
  max-width: 270px; padding: .7rem .8rem;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
}
.globe-tip[hidden] { display: none; }
.gt-name { font-family: var(--serif); font-size: 1.02rem; font-weight: 500; line-height: 1.2; }
.gt-meta { display: flex; align-items: center; gap: .4rem; margin: .4rem 0 .1rem; flex-wrap: wrap; }
.gt-count { font-size: .76rem; color: var(--text-dim); }
.gt-new { font-size: .76rem; font-weight: 600; color: var(--accent); margin-bottom: .35rem; }
.gt-story {
  font-size: .78rem; color: var(--text-dim); line-height: 1.35;
  padding-left: .6rem; border-left: 2px solid var(--border-2); margin-top: .3rem;
}
.gt-hint { font-size: .7rem; color: var(--text-mute); margin-top: .5rem;
  text-transform: uppercase; letter-spacing: .07em; }

/* Globe */
.world-map { touch-action: none; cursor: grab; display: block; margin: 0 auto; max-width: 620px; }
/* The globe is round, so a rectangular focus box around the whole SVG
   looked like a rendering error. Ring the sphere instead. */
.world-map:focus { outline: none; }
.world-map:focus-visible { outline: none; }
.world-map:focus-visible .globe-sphere { stroke: var(--focus); stroke-width: 2.5; }
.world-map.grabbing { cursor: grabbing; }
/* Both are decoration. Even correctly ordered they should never be able to
   intercept a click meant for a country. */
.globe-sphere { stroke: var(--border-2); stroke-width: 1; pointer-events: none; }
.map-grat { fill: none; stroke: var(--border-2); stroke-width: .5; stroke-opacity: .45;
  pointer-events: none; }
/* Land must read clearly against the sphere: at --panel-3 it was the same
   value as the globe gradient, so the continents disappeared. */
.map-country { fill: color-mix(in srgb, var(--text-mute) 34%, var(--panel-3));
  stroke: var(--bg-2); stroke-width: .35; }
.map-country.has-risk { stroke: var(--bg); stroke-width: .5; }

.map-country.clickable { cursor: pointer; }
.map-country.clickable:hover { stroke: var(--accent); stroke-width: 1; fill-opacity: 1; }
.map-dot { cursor: pointer; }
/* SVG shapes take focus via tabindex; an outline doesn't render reliably on
   them, so the focus ring is drawn with a stroke instead. */
.map-country.clickable:focus-visible,
.map-dot circle:focus-visible {
  outline: none; stroke: var(--focus); stroke-width: 2.5; fill-opacity: 1;
}
/* Refreshing a list: dim the stale results rather than blanking the page. */
.is-busy { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* Text equivalent of the choropleth for keyboard/screen-reader users. */
.map-alt { margin-top: .8rem; font-size: .88rem; color: var(--text-dim); }
.map-alt summary { cursor: pointer; color: var(--accent); }
.map-country-list {
  list-style: none; padding: .6rem 0 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .2rem;
}
.linklike {
  background: none; border: 0; padding: .15rem 0; color: var(--text-dim);
  font: inherit; text-align: left; cursor: pointer;
}
.linklike:hover { color: var(--accent); text-decoration: underline; }

/* Collapsed near-duplicate coverage in story lists */
.story-group { display: flex; flex-direction: column; }
.similar-toggle {
  align-self: flex-start; margin-top: -.4rem; background: none; border: none;
  color: var(--text-mute); font: inherit; font-size: .78rem; cursor: pointer;
  padding: .25rem .1rem;
}
.similar-toggle:hover { color: var(--accent); }
.similar-list { display: flex; flex-direction: column; gap: .25rem; padding: .1rem 0 .4rem .2rem; }
/* An author `display` rule overrides the UA stylesheet's [hidden] rule, so
   without this the list stayed visible and the toggle looked broken. */
.similar-list[hidden] { display: none; }
.similar-item { font-size: .82rem; color: var(--text-dim); }

/* Learn / quiz / scenario */
.quiz-q { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: .9rem; margin-bottom: .8rem; }
.quiz-opt { display: block; width: 100%; text-align: left; margin: .35rem 0; padding: .55rem .7rem; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.quiz-opt:hover { border-color: var(--border-2); }
.quiz-opt.correct { border-color: var(--conf-confirmed); background: color-mix(in srgb,var(--conf-confirmed) 15%, var(--panel)); }
.quiz-opt.wrong { border-color: var(--sev-critical); background: color-mix(in srgb,var(--sev-critical) 12%, var(--panel)); }
/* Buttons don't inherit colour/font from the page, so these must be explicit —
   without them the option text renders as default black on the dark panel. */
.scenario-opt {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--border); border-radius: 8px; padding: .7rem;
  margin-bottom: .6rem; cursor: pointer; background: var(--panel);
  color: var(--text); font: inherit;
}
.scenario-opt:hover { border-color: var(--accent); }
.scenario-analysis { border-left: 3px solid var(--accent); padding: .5rem .8rem; margin-top: .5rem; background: var(--panel-2); border-radius: 0 8px 8px 0; }

/* Challenge findings */
.finding { border-left: 3px solid var(--border-2); padding: .5rem .7rem; margin-bottom: .5rem; background: var(--panel-2); border-radius: 0 8px 8px 0; }
.finding.high { border-color: var(--sev-critical); }
.finding.medium { border-color: var(--sev-high); }
.finding.low { border-color: var(--sev-moderate); }
.finding.info { border-color: var(--sev-low); }
.finding .f-dim { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); }

/* Modal */
.modal-host { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.modal-host[hidden] { display: none; }
[hidden] { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,14,.6); backdrop-filter: blur(2px); }
.modal { position: relative; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius); width: min(720px, 92vw); max-height: 86vh; overflow: auto; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
.modal-body { padding: 1.1rem; }
.modal-body pre { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: .8rem; background: var(--panel-2); padding: .8rem; border-radius: 8px; border: 1px solid var(--border); }

/* Toast */
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--border-2); color: var(--text); padding: .6rem 1rem; border-radius: 10px; box-shadow: var(--shadow); z-index: 80; font-size: .85rem; }

/* Loading */
.loading { display: grid; place-items: center; gap: .8rem; padding: 3rem; color: var(--text-mute); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--text-mute); padding: 2rem; border: 1px dashed var(--border); border-radius: var(--radius); }

.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: .2rem .6rem; font-size: .76rem; color: var(--text-dim); display: inline-flex; gap: .3rem; align-items: center; }
.tag button { background: none; border: none; color: var(--text-mute); cursor: pointer; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; font-size: .82rem; }
.kv dt { color: var(--text-mute); }
.kv dd { margin: 0; }

/* Responsive sidebar.
   Below 1024px the rail is off-canvas and #menuToggle opens it; above, the same
   control collapses it to icons. The breakpoint is duplicated in app.js, which
   needs to know which behaviour to run — keep the two in step. */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%); transition: transform .18s ease;
    width: var(--sidebar-w); box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  /* A collapsed rail makes no sense off-canvas: show full labels when open. */
  body.nav-collapsed .sidebar { width: var(--sidebar-w); }
  body.nav-collapsed .brand-text,
  body.nav-collapsed .nav-group,
  body.nav-collapsed .nav a span.nav-label,
  body.nav-collapsed .sidebar-foot .sf-text { display: revert; }
  body.nav-collapsed .nav a { justify-content: flex-start; padding: .48rem .65rem; }
  body.nav-collapsed .brand { justify-content: flex-start; padding: 0 .9rem; }
  .topbar, body.nav-collapsed .topbar,
  .demo-banner, body.nav-collapsed .demo-banner { left: 0; }
  .main, body.nav-collapsed .main { margin-left: 0; }
  .menu-only { display: inline-flex; }
  /* Backdrop so the open drawer reads as modal on a small screen. */
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35;
  }
}
.sp-short { display: none; }
@media (max-width: 860px) {
  .main { padding-left: .9rem; padding-right: .9rem; }
  /* The search field takes flex:1, which at 375px pushed the clock off the
     right edge. Let it shrink instead of forcing the row wider than the
     viewport. */
  .search { max-width: none; min-width: 0; }
  .search input { min-width: 0; }
  .tz-select, .clock-zone { display: none; }
  .sys-pill { padding: .25rem .4rem; }
  /* Abbreviate rather than truncate: "INTELLIGENCE ACTIVE" pushed the pill off
     the right edge at 375px. The long form stays for screen readers. */
  .sp-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .sp-short { display: inline; }
  #bellBtn { display: none; }
  .topbar { gap: .45rem; padding: 0 .55rem; }
  /* Minutes are enough on a phone; seconds cost the width the clock needs. */
  .clock { min-width: 0; font-size: .72rem; }
  .clock .sec { display: none; }
}

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

/* ---- Feed health indicator (Settings) ---- */
.fh-table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.fh-table th, .fh-table td {
  text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border);
  vertical-align: top; font-size: .9rem;
}
.fh-table th { color: var(--muted); font-weight: 650; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em; }
.fh-table td.num, .fh-table th.num { text-align: right; font-family: var(--mono); }
.fh-dot { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  font-weight: 650; font-size: .82rem; padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid var(--border); }
.fh-dot.fh-ok { color: var(--sev-low); border-color: var(--sev-low); }
.fh-dot.fh-empty { color: var(--sev-high); border-color: var(--sev-high); }
.fh-dot.fh-error { color: var(--sev-critical); border-color: var(--sev-critical); }
.fh-dot.fh-unknown { color: var(--sev-info); border-color: var(--sev-info); }

/* =========================================================================
   Executive dashboard (redesigned)
   ========================================================================= */
.hero-posture {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
  padding: 2rem 2.1rem; margin-bottom: 1.4rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background:
    radial-gradient(760px 320px at 90% -70%, var(--accent-soft), transparent 72%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-2);
}
.hp-gauge { display: flex; align-items: center; justify-content: center; }
.hp-ring {
  --pct: 55%;
  width: 128px; height: 128px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct)*3.6), var(--border) 0);
  display: grid; place-items: center; position: relative;
  transition: background .6s ease;
}
.hp-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--border-2);
}
.hp-ring-inner {
  width: 96px; height: 96px; border-radius: 50%; background: var(--panel);
  display: grid; place-items: center; text-align: center; z-index: 1;
}
.hp-pct { font-size: 2rem; font-weight: 700; line-height: 1; }
.hp-of { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-mute); }
.hp-eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--text-mute); font-weight: 600; }
.hp-level { display: flex; align-items: center; gap: .6rem; font-size: 2.15rem; font-weight: 700; margin: .3rem 0 .5rem; letter-spacing: -.035em; }
.hp-dot { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
/* Scoped to the dot. Unscoped, `.lvl-elevated` set a background on anything
   carrying the class — it painted a solid blue block behind the posture level
   the moment another component reused the same modifier name. */
.hp-dot.lvl-low, .hp-dot.lvl-guarded { background: var(--sev-low); }
.hp-dot.lvl-elevated { background: var(--sev-moderate); }
.hp-dot.lvl-high { background: var(--sev-high); }
.hp-dot.lvl-severe, .hp-dot.lvl-critical { background: var(--sev-critical); }
.hp-reason { color: var(--text-dim); margin: 0 0 .9rem; max-width: 62ch; font-size: .92rem; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.kpi-link { display: block; color: inherit; text-decoration: none; transition: border-color .12s, transform .12s; }
.kpi-link:hover, .kpi-link:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.kpi-num { font-size: 1.55rem; font-weight: 700; line-height: 1; display: flex; align-items: baseline; gap: .3rem; }
.kpi-ico { font-size: .8rem; }
.kpi-lbl { font-size: .72rem; font-weight: 500; color: var(--text-mute); margin-top: .45rem; text-transform: uppercase; letter-spacing: .07em; }

.dash-split { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.1rem; margin-bottom: .4rem; }
.dash-rail { display: flex; flex-direction: column; gap: 1.1rem; }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-item {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start;
  padding: .85rem .3rem; border-top: 1px solid var(--border); cursor: pointer;
  border-radius: 8px; transition: background .15s ease, transform .15s ease;
}
.rank-item:first-child { border-top: none; }
.rank-item:hover { background: var(--panel-2); transform: translateX(2px); }
.rank-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rank-num {
  font-size: 1.1rem; font-weight: 700; color: var(--accent);
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--border-2);
}
.rank-head { font-weight: 650; letter-spacing: -.01em; margin-bottom: .15rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-why { color: var(--text-dim); font-size: .88rem; margin: 0 0 .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.score-pill { font-size: .78rem; padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--text-dim); background: var(--panel); }
.score-pill b { color: var(--text); }
.meta-tag { font-size: .74rem; padding: .12rem .5rem; border-radius: 999px;
  background: var(--panel-3); color: var(--text-dim); border: 1px solid var(--border); }
.dir { font-size: .78rem; font-weight: 600; }
.dir-bad { color: var(--sev-critical); } .dir-good { color: var(--sev-low); } .dir-flat { color: var(--text-mute); }

.mover-row { padding: .55rem 0; border-top: 1px solid var(--border); }
.mover-row:first-of-type { border-top: none; }
.mover-head { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .45rem; }
.mover-ico { font-size: .8rem; }
.mover-ico.sev-high { color: var(--sev-high); } .mover-ico.sev-low { color: var(--sev-low); }
.mover-count { margin-left: auto; color: var(--text-mute); font-size: .95rem; }
.region-tag { font-size: .78rem; padding: .18rem .55rem; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim); }

.watch-list { list-style: none; margin: 0; padding: 0; }
.watch-list li { padding: .5rem 0; border-top: 1px solid var(--border); font-size: .92rem; }
.watch-list li:first-child { border-top: none; }

.pulse-card { display: flex; gap: .9rem; align-items: flex-start; }
.pulse-ico { font-size: 1.3rem; width: 42px; height: 42px; flex: none; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent-soft);
  border: 1px solid var(--border-2); color: var(--accent); }
.pulse-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute); font-weight: 600; margin-bottom: .3rem; }
.pulse-link { font-weight: 600; letter-spacing: -.01em; }

@media (max-width: 900px) {
  .hero-posture { grid-template-columns: 1fr; text-align: center; }
  .hp-body .kpi-row { text-align: left; }
  .dash-split { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Public read-only banner ---- */
.ro-banner {
  display: flex; align-items: flex-start; gap: .6rem;
  background: var(--accent-soft); border: 1px solid var(--border-2);
  color: var(--text-dim); padding: .8rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: .9rem;
}
.ro-ico { font-size: 1rem; line-height: 1.2; }

/* =========================================================================
   COMMAND-CENTRE UI KIT
   Components and charts used across every view. Severity colour always
   accompanies a glyph — never the sole carrier of meaning.
   ========================================================================= */

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .685rem; font-weight: 600; letter-spacing: .02em;
  padding: .12rem .4rem; border-radius: 3px; white-space: nowrap;
  border: 1px solid currentColor; line-height: 1.5;
  background: color-mix(in srgb, currentColor 11%, transparent);
}
.badge-glyph { font-size: .62em; line-height: 1; }
.badge-compact { padding: .12rem .28rem; }
.badge-quiet {
  color: var(--text-mute); border-color: var(--border-2); background: none;
  font-weight: 450;
}
.badge.sev-critical { color: var(--sev-critical); }
.badge.sev-high     { color: var(--sev-high); }
.badge.sev-elevated { color: var(--sev-elevated); }
.badge.sev-medium   { color: var(--sev-medium); }
.badge.sev-moderate { color: var(--sev-moderate); }
.badge.sev-low      { color: var(--sev-low); }
.badge.sev-info     { color: var(--sev-info); }
.badge.conf-Confirmed  { color: var(--conf-confirmed); }
.badge.conf-High       { color: var(--conf-high); }
.badge.conf-Moderate   { color: var(--conf-moderate); }
.badge.conf-Low        { color: var(--conf-low); }
.badge.conf-Unverified { color: var(--conf-unverified); }

.tag {
  display: inline-flex; align-items: center;
  font-size: .68rem; color: var(--text-dim);
  background: var(--panel-2); border: 1px solid var(--border);
  padding: .1rem .38rem; border-radius: 3px; white-space: nowrap;
}
a.tag:hover { color: var(--text); border-color: var(--border-2); text-decoration: none; }

/* ---- Metric tiles ---- */
.metric-row {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.metric-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .7rem .8rem .75rem;
  display: flex; flex-direction: column; gap: .15rem; min-width: 0;
}
a.metric-card { color: inherit; }
a.metric-card:hover { border-color: var(--border-2); background: var(--panel-2); text-decoration: none; }
/* Labels wrap to two lines rather than truncating. An ellipsised metric label
   ("COUNTRIES UNDE\u2026") is worse than a shorter one: the reader cannot tell what
   the number counts. The reserved two-line box keeps the value baselines aligned
   across the row whether a label wraps or not. */
.mc-label {
  font-size: .635rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-mute); line-height: 1.3; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mc-value-row { display: flex; align-items: baseline; gap: .25rem; }
.mc-value { font-size: 1.55rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.12; }
.mc-unit { font-size: .72rem; color: var(--text-mute); }
.mc-delta, .mc-hint { font-size: .68rem; display: flex; align-items: center; gap: .25rem; }
.mc-hint { color: var(--text-mute); }
.mc-delta span:first-child { font-size: .58em; }
.mc-delta.d-up   { color: var(--sev-high); }
.mc-delta.d-down { color: var(--sev-low); }
.mc-delta.d-flat { color: var(--text-mute); }
/* Direction is not valence: more improving regions is an up-arrow in green. */
.mc-delta.d-up.good   { color: var(--sev-low); }
.mc-delta.d-down.good { color: var(--sev-high); }

/* ---- States ---- */
.state-wrap { padding: .2rem 0; }
.state-empty, .state-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding: 2rem 1rem; text-align: center; color: var(--text-mute);
  font-size: .82rem;
}
.state-empty .se-mark, .state-error .se-mark { font-size: 1.5rem; opacity: .5; }
.state-error { color: var(--sev-high); }
.state-error .btn { margin-top: .3rem; }

.sk { display: flex; flex-direction: column; gap: .5rem; }
.sk-line, .sk-row, .sk-metric, .sk-chart, .sk-map {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--panel-2) 8%, var(--panel-3) 20%, var(--panel-2) 32%);
  background-size: 900px 100%;
  animation: sk-shimmer 1.5s linear infinite;
}
.sk-line { height: 11px; }
.sk-line:nth-child(2) { width: 82%; }
.sk-line:nth-child(3) { width: 64%; }
.sk-row { height: 30px; }
.sk-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.sk-metric { height: 74px; }
.sk-chart { height: 150px; }
.sk-map { height: 380px; }
@keyframes sk-shimmer { 0% { background-position: -300px 0; } 100% { background-position: 600px 0; } }
@media (prefers-reduced-motion: reduce) {
  .sk-line, .sk-row, .sk-metric, .sk-chart, .sk-map { animation: none; background: var(--panel-2); }
}

/* ---- Data table ---- */
.table-wrap { width: 100%; overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: .8rem; }
.dtable th, .dtable td {
  text-align: left; padding: .5rem .7rem;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.dtable.dense th, .dtable.dense td { padding: .34rem .55rem; font-size: .765rem; }
/* Sticky header: these tables are read while scrolling a long result set. */
.dtable thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel-2);
  font-size: .645rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-mute); white-space: nowrap;
  border-bottom: 1px solid var(--border-2);
}
.th-sort button {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
  display: inline-flex; align-items: center; gap: .3rem;
}
.th-sort button:hover { color: var(--text); }
.th-arrow { font-size: .72em; opacity: .5; }
.th-sort.is-sorted button { color: var(--accent); }
.th-sort.is-sorted .th-arrow { opacity: 1; }
.dtable tbody tr:hover { background: var(--panel-hover); }
.dtable tr.is-clickable { cursor: pointer; }
.dtable tr.is-clickable:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.dtable td.mono { font-family: var(--mono); font-size: .735rem; font-variant-numeric: tabular-nums; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.dtable tbody tr:last-child td { border-bottom: 0; }

/* ---- Filter bar ---- */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  flex-wrap: wrap; margin-bottom: .7rem;
}
.fb-controls { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.fb-field select, .fb-search input {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: .33rem .5rem; font-size: .765rem;
  font-family: inherit; max-width: 200px;
}
.fb-search input { min-width: 210px; }
.fb-field select:focus, .fb-search input:focus { border-color: var(--accent); }
.fb-toggle {
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: var(--radius-sm); padding: .33rem .55rem; font-size: .765rem;
  cursor: pointer; font-family: inherit;
}
.fb-toggle:hover { color: var(--text); border-color: var(--border-2); }
.fb-toggle.is-on {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-soft);
}
.fb-extra { display: flex; align-items: center; gap: .5rem; font-size: .74rem; color: var(--text-mute); }

/* ---- Charts ---- */
.chart { margin: 0; }
.chart-spark { color: var(--accent); }
.spark { width: 100%; height: 34px; display: block; }

.bc { display: flex; flex-direction: column; gap: .32rem; }
.bc-row { display: grid; grid-template-columns: minmax(70px, 34%) 1fr auto; align-items: center; gap: .5rem; }
.bc-label {
  font-size: .755rem; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.bc-label:hover { color: var(--accent); text-decoration: none; }
.bc-track { height: 7px; background: var(--panel-3); border-radius: 2px; overflow: hidden; }
.bc-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.bc-fill.sev-critical { background: var(--sev-critical); }
.bc-fill.sev-high     { background: var(--sev-high); }
.bc-fill.sev-elevated { background: var(--sev-elevated); }
.bc-fill.sev-moderate { background: var(--sev-moderate); }
.bc-fill.sev-low      { background: var(--sev-low); }
.bc-val { font-size: .73rem; color: var(--text); min-width: 2ch; text-align: right; font-family: var(--mono); }

.donut-wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.donut-hold { position: relative; width: 118px; flex: 0 0 118px; }
.donut { width: 118px; height: 118px; display: block; }
.donut-track { stroke: var(--panel-3); }
.donut-arc { transition: opacity .15s ease; }
.donut-arc:hover { opacity: .75; }
.donut-centre {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.dc-num { font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; }
.dc-lab { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: .2rem; }
.donut-legend li { display: flex; align-items: center; gap: .4rem; font-size: .745rem; }
.dl-swatch { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; background: currentColor; }
.dl-lab { color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-val { color: var(--text); font-family: var(--mono); font-size: .72rem; }
/* Categorical ramp for non-severity slices: distinguishable in the common
   colour-vision deficiencies, and deliberately unlike the severity hues so a
   category chart is never misread as a risk chart. */
.cat-0 { color: #4da3ff; } .cat-1 { color: #2dd4a7; } .cat-2 { color: #b98cff; }
.cat-3 { color: #f5a524; } .cat-4 { color: #6ee7f0; } .cat-5 { color: #f472b6; }
.cat-6 { color: #94a3b8; }
.donut-arc.cat-0, .donut-arc.cat-1, .donut-arc.cat-2, .donut-arc.cat-3,
.donut-arc.cat-4, .donut-arc.cat-5, .donut-arc.cat-6,
.donut-arc.sev-critical, .donut-arc.sev-high, .donut-arc.sev-moderate,
.donut-arc.sev-low, .donut-arc.sev-info { stroke: currentColor; }

.sb { display: flex; flex-direction: column; gap: .55rem; }
.sb-rows { display: flex; flex-direction: column; gap: .3rem; }
.sb-row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; align-items: center; gap: .5rem; }
.sb-label { font-size: .755rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.sb-label:hover { color: var(--accent); text-decoration: none; }
.sb-track { display: flex; height: 9px; border-radius: 2px; overflow: hidden; background: var(--panel-3); min-width: 6px; }
.sb-seg { background: currentColor; }
.sb-val { font-size: .73rem; font-family: var(--mono); color: var(--text); min-width: 2ch; text-align: right; }
.sb-key { display: flex; gap: .7rem; flex-wrap: wrap; padding-top: .2rem; border-top: 1px solid var(--border); }
.sb-key-item { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; color: var(--text-mute); }

/* Severity colour for the kit's non-badge carriers. Scoped per component
   rather than declared globally: a bare `.sev-critical` utility previously
   leaked onto KPI numbers and tinted figures that were not severities. */
.dl-swatch.sev-critical, .sb-seg.sev-critical, .mc-value.sev-critical { color: var(--sev-critical); }
.dl-swatch.sev-high,     .sb-seg.sev-high,     .mc-value.sev-high     { color: var(--sev-high); }
.dl-swatch.sev-elevated, .sb-seg.sev-elevated, .mc-value.sev-elevated { color: var(--sev-elevated); }
.dl-swatch.sev-medium,   .sb-seg.sev-medium,   .mc-value.sev-medium   { color: var(--sev-medium); }
.dl-swatch.sev-moderate, .sb-seg.sev-moderate, .mc-value.sev-moderate { color: var(--sev-moderate); }
.dl-swatch.sev-low,      .sb-seg.sev-low,      .mc-value.sev-low      { color: var(--sev-low); }
.dl-swatch.sev-info,     .sb-seg.sev-info,     .mc-value.sev-info     { color: var(--sev-info); }
.sb-key-item .dl-swatch { background: currentColor; }

/* =========================================================================
   EXECUTIVE DASHBOARD
   Five rows, widest-to-narrowest information. Layout is grid-driven so the
   panels keep their proportions from 1280px to ultrawide.
   ========================================================================= */
.dash { display: flex; flex-direction: column; gap: .85rem; }
.ph-eyebrow {
  font-size: .63rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-mute); margin-bottom: .2rem;
}

/* ---- Row 1 ---- */
.dash-row1 { display: grid; grid-template-columns: minmax(300px, 1fr) 2.1fr; gap: .85rem; }
.posture-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1rem; display: flex; align-items: center; gap: 1rem;
}
.pc-gauge {
  --pct: 55%;
  width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) var(--pct), var(--panel-3) 0);
}
.pc-gauge-in {
  width: 66px; height: 66px; border-radius: 50%; background: var(--panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.pc-num { font-size: 1.5rem; font-weight: 650; letter-spacing: -.03em; }
.pc-of { font-size: .54rem; letter-spacing: .14em; color: var(--text-mute); margin-top: 2px; }
.pc-body { min-width: 0; }
.pc-eyebrow {
  font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-mute);
}
.pc-level { font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; margin: .1rem 0 .2rem; }
.pc-level.lvl-elevated, .pc-level.lvl-guarded { color: var(--sev-elevated); }
.pc-level.lvl-high { color: var(--sev-high); }
.pc-level.lvl-severe, .pc-level.lvl-critical { color: var(--sev-critical); }
.pc-level.lvl-low { color: var(--sev-low); }
.pc-reason { font-size: .755rem; color: var(--text-dim); margin: 0; line-height: 1.45; }
.dash-metrics { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ---- Row 2: map + alert rail ---- */
.dash-row2 { display: grid; grid-template-columns: 2.35fr 1fr; gap: .85rem; align-items: start; }
/* The globe renders square, so an unconstrained panel grows to the column
   width and pushes the analytics rows off the page. Cap it and let the SVG
   scale down inside. */
.dash-map-host { padding: .5rem; max-height: 470px; overflow: hidden; display: flex; }
.dash-map-host > * { flex: 1; min-width: 0; }
.dash-map-host .map-canvas,
.dash-map-host .globe-wrap { max-height: 458px; }
.dash-map-host svg { max-height: 458px; }
.dash-alerts { max-height: 520px; display: flex; flex-direction: column; }
.alert-rail { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.ar-item + .ar-item { border-top: 1px solid var(--border); }
.ar-link { display: block; padding: .55rem .8rem; color: inherit; }
.ar-link:hover { background: var(--panel-hover); text-decoration: none; }
.ar-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.ar-time { font-size: .66rem; color: var(--text-mute); }
.ar-head {
  font-size: .79rem; font-weight: 500; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ar-meta { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .665rem; color: var(--text-mute); margin-top: .22rem; }
.ar-meta span + span::before { content: "\00b7"; margin-right: .5rem; }

/* ---- Row 3: analytics ---- */
.dash-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; align-items: start; }
.vt-top { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .35rem; flex-wrap: wrap; }
.vt-num { font-size: 1.45rem; font-weight: 650; letter-spacing: -.025em; }
.vt-lab { font-size: .72rem; color: var(--text-mute); }
.vt-delta { font-size: .7rem; font-weight: 600; margin-left: auto; }
.vt-delta.d-up { color: var(--sev-high); }
.vt-delta.d-down { color: var(--sev-low); }
.vt-delta.d-flat { color: var(--text-mute); }
.vt-axis {
  display: flex; justify-content: space-between;
  font-size: .63rem; color: var(--text-mute); font-family: var(--mono); margin-top: .15rem;
}

/* ---- Row 4 ---- */
.lf-head {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; font-weight: 450;
}

/* ---- Row 5 ---- */
.dash-row5 { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; align-items: start; }
.emerging { display: flex; flex-direction: column; gap: .8rem; }
.em-block { min-width: 0; }
.em-title {
  display: flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); margin-bottom: .35rem;
}
.em-count { margin-left: auto; color: var(--text-mute); font-family: var(--mono); font-size: .72rem; }
.em-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.exec-points { margin: 0 0 .8rem; padding-left: 1.05rem; font-size: .785rem; color: var(--text-dim); line-height: 1.5; }
.exec-points li { margin-bottom: .3rem; }
.exec-top { border-top: 1px solid var(--border); padding-top: .6rem; }
.et-title {
  font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute); margin-bottom: .4rem;
}
.rank-list.compact { font-size: .78rem; }

@media (max-width: 1400px) {
  .dash-row2 { grid-template-columns: 1.8fr 1fr; }
}
@media (max-width: 1180px) {
  .dash-row1, .dash-row2, .dash-row5 { grid-template-columns: 1fr; }
  .dash-row3 { grid-template-columns: 1fr 1fr; }
  .dash-alerts { max-height: none; }
}
@media (max-width: 760px) {
  .dash-row3 { grid-template-columns: 1fr; }
  .posture-card { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   INTELLIGENCE FEED
   ========================================================================= */
.story-list.is-cards {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.story-list.is-table {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
/* Refreshing dims the stale results instead of blanking the page, so the
   operator keeps their place while a filter change is in flight. */
.story-list.is-busy { opacity: .55; transition: opacity .12s ease; }

.intel-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .7rem .8rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0;
}
.intel-card.is-clickable { cursor: pointer; }
.intel-card.is-clickable:hover { border-color: var(--border-2); background: var(--panel-2); }
.intel-card.is-clickable:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ic-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ic-urgency { font-size: .66rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .07em; }
.ic-alert-flag {
  font-size: .6rem; font-weight: 700; letter-spacing: .1em; font-family: var(--mono);
  color: var(--sev-critical); border: 1px solid var(--sev-critical);
  padding: 0 .25rem; border-radius: 2px;
}
.ic-when { font-size: .66rem; color: var(--text-mute); margin-left: auto; white-space: nowrap; }
.ic-head { font-size: .875rem; font-weight: 550; line-height: 1.35; margin: 0; letter-spacing: -.008em; }
.ic-head a { color: var(--text); }
.ic-head a:hover { color: var(--accent); text-decoration: none; }
.ic-sum {
  font-size: .755rem; color: var(--text-dim); margin: 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ic-meta { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: auto; padding-top: .15rem; }
.ic-loc { font-size: .7rem; color: var(--text-mute); white-space: nowrap; }
.ic-score { font-size: .68rem; color: var(--text-mute); margin-left: auto; }
.ic-similar { font-size: .67rem; color: var(--text-mute); border-top: 1px solid var(--border); padding-top: .3rem; }

.st-head { display: flex; align-items: center; gap: .4rem; }
.st-head > span:first-child {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.vt-btn {
  background: var(--panel); border: 0; color: var(--text-mute);
  padding: .3rem .6rem; font-size: .73rem; cursor: pointer; font-family: inherit;
}
.vt-btn + .vt-btn { border-left: 1px solid var(--border); }
.vt-btn:hover { color: var(--text); }
.vt-btn.is-on { background: var(--accent-soft); color: var(--accent); }
.fb-count { font-size: .73rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
  .story-list.is-cards { grid-template-columns: 1fr; }
}

/* =========================================================================
   CRITICAL ALERTS
   Alerts must stand out without turning the whole surface red. The signal is
   a severity edge on the card, not a filled panel.
   ========================================================================= */
.alerts-metrics { margin-bottom: .75rem; }
.alert-cards { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.alert-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  border-left-width: 3px; padding: .75rem .9rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.alert-card.sev-edge-critical { border-left-color: var(--sev-critical); }
.alert-card.sev-edge-high     { border-left-color: var(--sev-high); }
.alert-card.sev-edge-moderate { border-left-color: var(--sev-moderate); }
.alert-card.sev-edge-low      { border-left-color: var(--sev-low); }
.ac-top { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.ac-detected { font-size: .66rem; color: var(--text-mute); margin-left: auto; white-space: nowrap; }
.ac-head { font-size: .92rem; font-weight: 550; line-height: 1.35; margin: 0; letter-spacing: -.01em; }
.ac-head a { color: var(--text); }
.ac-head a:hover { color: var(--accent); text-decoration: none; }
.ac-where { font-size: .73rem; color: var(--text-dim); display: flex; gap: .5rem; flex-wrap: wrap; }
.ac-scope { color: var(--text-mute); }
.ac-scope::before { content: "\00b7"; margin-right: .5rem; }
.ac-impacts {
  margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem;
  font-size: .735rem; border-top: 1px solid var(--border); padding-top: .4rem;
}
.ac-impacts dt {
  color: var(--text-mute); font-size: .645rem; text-transform: uppercase;
  letter-spacing: .08em; padding-top: .12rem;
}
.ac-impacts dd { margin: 0; color: var(--text-dim); }
.ac-action {
  background: var(--panel-2); border-left: 2px solid var(--accent);
  padding: .4rem .55rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ac-action-lab {
  font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); margin-bottom: .15rem;
}
.ac-action p { margin: 0; font-size: .745rem; color: var(--text-dim); line-height: 1.45; }
.ac-foot { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; padding-top: .1rem; }

/* Category watch pages */
.cat-split {
  display: grid; gap: .85rem; margin: .75rem 0;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
@media (max-width: 700px) { .alert-cards { grid-template-columns: 1fr; } }

/* =========================================================================
   WORLD / REGION, REGIONAL, REGULATORY
   ========================================================================= */
.world-split { display: grid; grid-template-columns: 2.2fr 1fr; gap: .85rem; margin-top: .75rem; align-items: start; }
.world-map-host { padding: .6rem; }
.drill { display: flex; flex-direction: column; gap: .5rem; }
.drill-lab {
  font-size: .63rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute);
}
.drill-lab:not(:first-child) { margin-top: .5rem; padding-top: .55rem; border-top: 1px solid var(--border); }

.region-grid {
  display: grid; gap: .6rem; margin-top: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}
.rc-right { display: flex; align-items: center; gap: .45rem; }
.rc-quiet { font-size: .76rem; color: var(--text-mute); margin: 0; padding: .7rem .9rem; font-style: italic; }
.rc-list { list-style: none; margin: 0; padding: 0; }
.rc-list li + li { border-top: 1px solid var(--border); }
.rc-list a {
  display: flex; align-items: center; gap: .45rem; padding: .42rem .9rem; color: var(--text-dim);
}
.rc-list a:hover { background: var(--panel-hover); color: var(--text); text-decoration: none; }
.rc-head {
  flex: 1; font-size: .765rem; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-when { font-size: .655rem; color: var(--text-mute); white-space: nowrap; }

.reg-title { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.reg-fw { font-size: .655rem; color: var(--text-mute); }
.reg-grid {
  display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: .35rem .9rem;
  margin: .8rem 0; font-size: .8rem;
}
.reg-grid dt {
  color: var(--text-mute); font-size: .655rem; text-transform: uppercase;
  letter-spacing: .08em; padding-top: .16rem;
}
.reg-grid dd { margin: 0; color: var(--text-dim); line-height: 1.5; }

@media (max-width: 1180px) {
  .world-split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .region-grid { grid-template-columns: 1fr; }
  .reg-grid { grid-template-columns: 1fr; gap: .1rem; }
  .reg-grid dd { margin-bottom: .5rem; }
}

/* =========================================================================
   DAILY BRIEF
   The one reading surface in the product, so it gets the serif and a narrower
   measure. Everything else here is a grid of panels; this is a document.
   ========================================================================= */
.brief-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1.6rem; align-items: start; }
.brief-body { max-width: 78ch; }
.brief-sec { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.brief-sec:first-child { padding-top: .4rem; }
.brief-sec:last-child { border-bottom: 0; }
.bs-head {
  display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .6rem;
  font-family: var(--serif); font-size: 1.22rem; font-weight: 500;
  letter-spacing: -.012em; text-transform: none; color: var(--text);
}
.bs-num {
  font-size: .72rem; color: var(--accent); font-weight: 600;
  min-width: 1.6em; letter-spacing: .02em;
}
.bs-body { font-size: .855rem; line-height: 1.62; color: var(--text-dim); }
.bs-body p { margin: 0 0 .6rem; }
.bs-note, .bs-none { font-size: .79rem; color: var(--text-mute); font-style: italic; }
.bs-list { list-style: none; margin: 0; padding: 0; }
.bs-list li {
  display: flex; align-items: baseline; gap: .45rem; padding: .3rem 0;
  border-bottom: 1px solid var(--border);
}
.bs-list li:last-child { border-bottom: 0; }
.bs-list a { color: var(--text); flex: 1; min-width: 0; }
.bs-list a:hover { color: var(--accent); }
.bs-where { font-size: .71rem; color: var(--text-mute); white-space: nowrap; }
.bs-more { display: inline-block; margin-top: .5rem; font-size: .77rem; }
.bs-points { padding-left: 1.1rem; margin: 0; }
.bs-points li { margin-bottom: .45rem; }

/* Sticky contents rail. Anchors are intercepted in JS: a real href would
   rewrite the SPA hash and re-route the whole view. */
.brief-index { position: sticky; top: calc(var(--topbar-h) + 1rem); font-size: .765rem; }
.bi-lab {
  font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .11em;
  color: var(--text-mute); margin-bottom: .45rem; padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}
.brief-index ol { list-style: none; margin: 0; padding: 0; }
.brief-index li { margin-bottom: .1rem; }
.brief-index a {
  display: flex; gap: .45rem; padding: .22rem .35rem; border-radius: var(--radius-sm);
  color: var(--text-mute); line-height: 1.35;
}
.brief-index a:hover { background: var(--panel-hover); color: var(--text); text-decoration: none; }
.bi-num { color: var(--accent); font-size: .68rem; min-width: 1.5em; }

@media (max-width: 1100px) {
  .brief-layout { grid-template-columns: 1fr; }
  .brief-index { position: static; order: -1; border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .7rem; }
}
/* Print: the brief is circulated as a PDF, so drop the chrome. */
@media print {
  .sidebar, .topbar, .brief-index, .page-head-actions, .demo-banner { display: none !important; }
  .main { margin: 0; padding: 0; }
  .brief-layout { grid-template-columns: 1fr; }
  .brief-body { max-width: none; }
  body { background: #fff; color: #000; }
  .bs-body, .bs-head { color: #000; }
}

/* =========================================================================
   INTELLIGENCE RECORD (story detail)
   ========================================================================= */
.rec-crumb { display: flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--text-mute); margin-bottom: .55rem; }
.rec-crumb a { color: var(--text-mute); }
.rec-crumb a:hover { color: var(--accent); }
.rec-head { border-bottom: 1px solid var(--border); padding-bottom: .9rem; margin-bottom: .9rem; }
.rec-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.rec-title {
  font-size: 1.5rem; font-weight: 600; letter-spacing: -.022em; line-height: 1.24;
  margin: 0 0 .45rem; max-width: 56ch;
}
.rec-where { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .755rem; color: var(--text-dim); margin-bottom: .6rem; }
.rec-scope { color: var(--text-mute); }
/* Identifiers read as a record, not prose: a fixed grid of label/value pairs
   that an analyst can cite from. */
.rec-ids {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .4rem .9rem; margin: .75rem 0 0; padding-top: .65rem; border-top: 1px solid var(--border);
}
.rec-ids dt {
  font-size: .615rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-mute);
}
.rec-ids dd { margin: 0; font-size: .745rem; color: var(--text-dim); }
.rec-geo {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .5rem .7rem; margin-bottom: .9rem; font-size: .755rem; color: var(--text-dim);
}
.rec-geo-lab {
  font-size: .615rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-mute);
}
.rec-geo .btn { margin-left: auto; }

/* ---- Travel picker ---- */
.travel-pick {
  display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .65rem .8rem; margin-bottom: .7rem;
}
.tp-field { display: flex; flex-direction: column; gap: .2rem; min-width: 200px; }
.tp-lab {
  font-size: .615rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-mute);
}
.travel-pick select {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: .35rem .5rem; font-size: .8rem; font-family: inherit;
}
.travel-pick select:focus { border-color: var(--accent); }
.tp-watchlist { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin-bottom: .7rem; }
.tp-watchlist .fb-toggle:disabled { opacity: .45; cursor: not-allowed; }

.ic-actions { display: flex; gap: .35rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.audit-models {
  display: grid; gap: .85rem; margin-bottom: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
