/* THREAT.OPS — redesigned command-deck UI
 *
 * Layout:
 *   topbar (brand · main tabs · live/clock)
 *   layout = panel (left, selected-tab content) + stage (globe + subpanels)
 *   filterbar (severity · category · time) pinned to the bottom
 *
 * Palette: deep space navy, cyan accent, severity ramp red→amber→yellow→green.
 */

:root {
  --bg0: #04060c;
  --bg1: #090e1a;
  --bg2: #0d1424;
  --bg3: #121a2e;
  --line: rgba(125, 160, 220, .13);
  --line-strong: rgba(125, 160, 220, .28);
  --txt: #d9e4f5;
  --mut: #7e8ca6;
  --mut2: #56627a;
  --acc: #3bd2ff;
  --acc-dim: rgba(59, 210, 255, .14);
  --acc2: #8b7bff;
  --crit: #ff4d6b;
  --high: #ffaa33;
  --med:  #e8d44d;
  --low:  #3ddc91;
  --dib:  #8b7bff;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 10px;
  --topbar-h: 54px;
  --filterbar-h: 50px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--txt);
  background:
    radial-gradient(1100px 700px at 75% -10%, rgba(59,210,255,.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(139,123,255,.06), transparent 60%),
    var(--bg0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(125,160,220,.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(125,160,220,.32); }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* ── Topbar ─────────────────────────────────────────────────── */

#topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(18,26,46,.92), rgba(9,14,26,.92));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { color: var(--acc); display: grid; place-items: center; filter: drop-shadow(0 0 6px rgba(59,210,255,.55)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--mono);
  font-weight: 700; font-size: 15px; letter-spacing: .14em;
}
.brand-name em { font-style: normal; color: var(--acc); }
.brand-sub {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--mut2); white-space: nowrap;
}

.tabs {
  display: flex; align-items: stretch; gap: 2px;
  height: 100%;
  margin-left: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  appearance: none; background: none; border: 0;
  color: var(--mut);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
}
.tab:hover { color: var(--txt); }
.tab.active { color: var(--acc); }
.tab.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: var(--acc);
  box-shadow: 0 0 10px var(--acc);
  border-radius: 2px;
}
.tab-n {
  margin-left: 6px;
  font-family: var(--mono); font-size: 10px;
  color: var(--mut2);
}
.tab.active .tab-n { color: var(--acc); }
.tab-n:empty { display: none; }

.top-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
}

.live-ind {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg2);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--low);
  box-shadow: 0 0 8px var(--low);
  animation: livepulse 2s ease-in-out infinite;
}
.live-dot.down { background: var(--crit); box-shadow: 0 0 8px var(--crit); animation: none; }
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.live-word { color: var(--low); letter-spacing: .18em; font-weight: 700; }
.live-ind .down ~ .live-word { color: var(--crit); }
.live-epm { color: var(--mut); }

.clock {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--mono); font-size: 12px;
}
.clock-lbl { font-size: 9px; letter-spacing: .2em; color: var(--mut2); }

.classic-link {
  font-size: 9.5px; letter-spacing: .18em;
  color: var(--mut2);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 8px;
}
.classic-link:hover { color: var(--acc); border-color: var(--acc); text-decoration: none; }

/* ── Layout ─────────────────────────────────────────────────── */

#layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

#panel {
  flex: 0 0 396px;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13,20,36,.6), rgba(9,14,26,.4));
}

.panel-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.panel-head h1 {
  margin: 0;
  font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--acc);
  white-space: nowrap;
}
.panel-tools { margin-left: auto; }

#search {
  width: 170px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--txt);
  font-family: var(--mono); font-size: 11.5px;
  padding: 6px 9px;
  outline: none;
  transition: border-color .15s, width .2s;
}
#search:focus { border-color: var(--acc); width: 210px; }
#search::placeholder { color: var(--mut2); }

.panel-body {
  flex: 1; overflow-y: auto;
  padding: 8px;
  min-height: 0;
  outline: none;
}

/* ── Stage: globe + subpanel ────────────────────────────────── */

#stage {
  flex: 1;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
}

#globe-wrap {
  position: relative;
  flex: 1 1 58%;
  min-height: 220px;
  overflow: hidden;
}
#globe { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#globe.dragging { cursor: grabbing; }

.globe-tip {
  position: absolute;
  pointer-events: none;
  background: rgba(9,14,26,.95);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  max-width: 280px;
  z-index: 5;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.globe-tip .tt-head { font-weight: 600; color: var(--acc); font-family: var(--mono); font-size: 11px; }
.globe-tip .tt-line { color: var(--mut); margin-top: 2px; }

.globe-kpis {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 8px; flex-wrap: wrap;
  z-index: 4;
}
.kpi {
  appearance: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 1px;
  background: rgba(13,20,36,.78);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  color: var(--txt);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color .15s, transform .15s;
}
.kpi:hover { border-color: var(--acc); transform: translateY(-1px); }
.kpi-n { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--acc); line-height: 1; }
.kpi[data-kpi="crit"] .kpi-n { color: var(--crit); }
.kpi-l { font-size: 8.5px; letter-spacing: .18em; color: var(--mut2); }

.globe-legend {
  position: absolute; top: 12px; right: 12px;
  display: flex; gap: 6px;
  z-index: 4;
}
.lg {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(13,20,36,.78);
  display: inline-flex; align-items: center; gap: 5px;
}
.lg::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.lg-crit::before { background: var(--crit); box-shadow: 0 0 6px var(--crit); }
.lg-high::before { background: var(--high); box-shadow: 0 0 6px var(--high); }
.lg-med::before  { background: var(--med); }
.lg-low::before  { background: var(--low); }

.globe-controls {
  position: absolute; bottom: 14px; left: 12px;
  display: flex; flex-direction: column; gap: 5px;
  z-index: 4;
}
.globe-controls button {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(13,20,36,.82);
  color: var(--txt);
  font-size: 15px; line-height: 1;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.globe-controls button:hover { border-color: var(--acc); color: var(--acc); }
.globe-controls button[aria-pressed="false"] { color: var(--mut2); }

.geo-chip {
  position: absolute; bottom: 14px; right: 12px;
  display: flex; align-items: center; gap: 8px;
  background: var(--acc-dim);
  border: 1px solid var(--acc);
  color: var(--acc);
  border-radius: 999px;
  padding: 5px 7px 5px 12px;
  font-family: var(--mono); font-size: 11px;
  z-index: 4;
}
.geo-chip button {
  appearance: none; border: 0; background: rgba(59,210,255,.18);
  color: var(--acc); width: 18px; height: 18px; border-radius: 50%;
  cursor: pointer; font-size: 12px; line-height: 1;
}

/* ── Subpanel (below globe) ─────────────────────────────────── */

#subpanel {
  flex: 1 1 42%;
  min-height: 170px;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13,20,36,.55), rgba(9,14,26,.35));
}

.subtabs {
  flex: 0 0 36px;
  display: flex; align-items: stretch; gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }

.subtab {
  position: relative;
  appearance: none; background: none; border: 0;
  color: var(--mut);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}
.subtab:hover { color: var(--txt); }
.subtab.active { color: var(--txt); }
.subtab.active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px;
  height: 2px; background: var(--acc2);
  box-shadow: 0 0 8px var(--acc2);
}

.subpanel-body {
  flex: 1; overflow-y: auto;
  padding: 10px 12px;
  min-height: 0;
  outline: none;
}

/* ── Bottom filter bar ──────────────────────────────────────── */

#filterbar {
  flex: 0 0 auto;
  min-height: var(--filterbar-h);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  padding: 7px 14px;
  background: linear-gradient(0deg, rgba(18,26,46,.95), rgba(9,14,26,.92));
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.fgroup { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.flabel {
  font-size: 9px; letter-spacing: .2em;
  color: var(--mut2);
  margin-right: 4px;
  font-weight: 700;
}
.fsep { width: 1px; height: 22px; background: var(--line); }

.fchip {
  appearance: none; cursor: pointer;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mut);
  font-family: var(--mono);
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  padding: 5px 11px;
  transition: all .14s;
  white-space: nowrap;
}
.fchip:hover { color: var(--txt); border-color: var(--line-strong); }
.fchip.active {
  color: #06121c;
  background: var(--acc);
  border-color: var(--acc);
  box-shadow: 0 0 12px rgba(59,210,255,.4);
}
.fchip.chip-crit.active { background: var(--crit); border-color: var(--crit); box-shadow: 0 0 12px rgba(255,77,107,.45); color: #fff; }
.fchip.chip-high.active { background: var(--high); border-color: var(--high); box-shadow: 0 0 12px rgba(255,170,51,.45); }
.fchip.chip-med.active  { background: var(--med);  border-color: var(--med);  box-shadow: 0 0 12px rgba(232,212,77,.4); }
.fchip.chip-dib.active  { background: var(--dib);  border-color: var(--dib);  box-shadow: 0 0 12px rgba(139,123,255,.45); color: #fff; }

.fstatus {
  margin-left: auto;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--mut);
  white-space: nowrap;
}
.fstatus b { color: var(--acc); font-weight: 700; }

/* ── Shared list/card pieces ────────────────────────────────── */

.row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.row:hover { background: var(--bg2); border-color: var(--line); }
.row + .row { margin-top: 2px; }
.row.fresh { animation: freshin .8s ease-out; }
@keyframes freshin {
  0% { background: var(--acc-dim); }
  100% { background: transparent; }
}

.sev-bar {
  flex: 0 0 3px; align-self: stretch;
  border-radius: 3px;
  min-height: 30px;
}
.sev-crit { background: var(--crit); box-shadow: 0 0 7px rgba(255,77,107,.6); }
.sev-high { background: var(--high); }
.sev-med  { background: var(--med); }
.sev-low  { background: var(--mut2); }

.row-main { flex: 1; min-width: 0; }
.row-title {
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-sub {
  margin-top: 3px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px;
  color: var(--mut2);
}
.row-sub .src { color: var(--mut); }
.row-sub .when { white-space: nowrap; }

.pill {
  font-family: var(--mono); font-size: 8.5px; font-weight: 700;
  letter-spacing: .1em;
  padding: 2px 6px; border-radius: 4px;
  white-space: nowrap;
}
.pill-crit { color: var(--crit); background: rgba(255,77,107,.12); border: 1px solid rgba(255,77,107,.4); }
.pill-high { color: var(--high); background: rgba(255,170,51,.1);  border: 1px solid rgba(255,170,51,.35); }
.pill-med  { color: var(--med);  background: rgba(232,212,77,.08); border: 1px solid rgba(232,212,77,.3); }
.pill-low  { color: var(--mut);  background: rgba(125,160,220,.07); border: 1px solid var(--line); }

.cat-tag {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em;
  color: var(--acc2);
  background: rgba(139,123,255,.1);
  border: 1px solid rgba(139,123,255,.3);
  padding: 1.5px 5px; border-radius: 4px;
}
.cat-tag.t-dib { color: var(--dib); border-color: var(--dib); }

.cc-tag {
  font-family: var(--mono); font-size: 9px;
  color: var(--mut);
  border: 1px dashed var(--line-strong);
  padding: 1px 5px; border-radius: 4px;
}

.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--mut2);
  font-size: 12px;
}
.empty b { display: block; color: var(--mut); font-size: 13px; margin-bottom: 6px; }

.loading {
  padding: 30px; text-align: center;
  color: var(--mut2); font-family: var(--mono); font-size: 11px;
  letter-spacing: .15em;
  animation: livepulse 1.4s ease-in-out infinite;
}

/* ── Cluster cards ──────────────────────────────────────────── */

.cluster {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg1);
  margin-bottom: 8px;
  overflow: hidden;
}
.cluster-head {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  appearance: none; border: 0; background: none;
  color: var(--txt);
  padding: 10px 11px;
  cursor: pointer;
  text-align: left;
}
.cluster-head:hover { background: var(--bg2); }
.cluster-key {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--acc);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cluster-n {
  margin-left: auto;
  font-family: var(--mono); font-size: 10px;
  color: var(--mut);
  white-space: nowrap;
}
.cluster-kind {
  font-size: 8.5px; letter-spacing: .14em;
  color: var(--mut2);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 5px;
}
.cluster-body { border-top: 1px solid var(--line); padding: 4px 6px; }
.cluster-spark { display: flex; gap: 2px; align-items: flex-end; height: 16px; margin: 0 11px 8px; }
.cluster-spark i { flex: 1; background: var(--acc-dim); border-radius: 1px; min-height: 2px; }
.cluster-spark i.hot { background: var(--acc); }

/* ── Actor / vuln / source rows ─────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.stat-card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg1);
  padding: 10px 12px;
}
.stat-card .n { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--acc); }
.stat-card .l { font-size: 9px; letter-spacing: .16em; color: var(--mut2); text-transform: uppercase; margin-top: 2px; }

.actor-row { display: flex; align-items: center; gap: 10px; }
.actor-ava {
  flex: 0 0 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--line);
  font-family: var(--mono); font-weight: 700; font-size: 12px;
  color: var(--acc2);
}
.actor-attack { font-family: var(--mono); font-size: 9.5px; color: var(--mut2); }
.bar-track { height: 3px; background: var(--bg3); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--acc2), var(--acc)); border-radius: 3px; }

.kev-due { font-family: var(--mono); font-size: 9.5px; color: var(--high); }
.kev-due.overdue { color: var(--crit); }

.src-row { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; }
.src-row:hover { background: var(--bg2); }
.src-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.src-dot.ok { background: var(--low); box-shadow: 0 0 5px var(--low); }
.src-dot.err { background: var(--crit); box-shadow: 0 0 5px var(--crit); }
.src-dot.stale { background: var(--high); }
.src-dot.off { background: var(--mut2); }
.src-name { font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.src-meta { margin-left: auto; font-family: var(--mono); font-size: 9.5px; color: var(--mut2); text-align: right; }

/* ── Timeline ───────────────────────────────────────────────── */

.tl-wrap { height: 100%; display: flex; flex-direction: column; }
.tl-head {
  display: flex; gap: 4px 18px; align-items: baseline;
  flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.5px; color: var(--mut);
  margin-bottom: 6px;
}
.tl-head b { color: var(--txt); font-size: 13px; }
.tl-plot { position: relative; flex: 1; min-height: 90px; }
.tl-svg { width: 100%; height: 100%; display: block; }
.tl-bar { transition: opacity .15s; }
.tl-bar:hover { opacity: .8; }
/* HTML overlay labels — true pixel size, immune to the SVG's
   preserveAspectRatio="none" vertical stretch */
.tl-axis {
  position: absolute;
  font-family: var(--mono); font-size: 9px; line-height: 1;
  color: var(--mut2); pointer-events: none; white-space: nowrap;
}
.tl-y { left: 4px; transform: translateY(-100%); margin-top: -2px; }
.tl-x { top: calc(89% + 4px); } /* 89% = (H-padB)/H, the bottom of the bars */
.tl-grid { stroke: var(--line); stroke-dasharray: 2 4; }

/* ── MITRE / CMMC panels ────────────────────────────────────── */

.mx-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; height: 100%; }
@media (max-width: 980px) { .mx-cols { grid-template-columns: 1fr; } }

.mx-h {
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--mut2); font-weight: 700;
  margin: 2px 0 8px;
}

.tactic-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.tactic-name { flex: 0 0 138px; font-size: 10.5px; color: var(--mut); text-transform: capitalize; }
.tactic-track { flex: 1; height: 10px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.tactic-fill { height: 100%; background: linear-gradient(90deg, #1a6f8a, var(--acc)); border-radius: 3px; }
.tactic-n { flex: 0 0 26px; text-align: right; font-family: var(--mono); font-size: 10px; color: var(--mut); }

.tech-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px; border-radius: 6px;
  cursor: default;
}
.tech-row:hover { background: var(--bg2); }
.tech-id { font-family: var(--mono); font-size: 10.5px; color: var(--acc); flex: 0 0 76px; }
.tech-name { flex: 1; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-n { font-family: var(--mono); font-size: 10px; color: var(--mut); }

.cmmc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 7px;
}
.cmmc-card {
  appearance: none; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg1);
  color: var(--txt);
  padding: 8px 10px;
  transition: border-color .14s, transform .14s;
}
.cmmc-card:hover { border-color: var(--acc2); transform: translateY(-1px); }
.cmmc-card.sel { border-color: var(--acc2); background: rgba(139,123,255,.08); }
.cmmc-card.zero { opacity: .45; }
.cmmc-code { font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--acc2); }
.cmmc-name { font-size: 9.5px; color: var(--mut); margin-top: 1px; line-height: 1.3; }
.cmmc-count { float: right; font-family: var(--mono); font-size: 12px; color: var(--txt); }
.cmmc-note { font-size: 10px; color: var(--mut2); margin: 8px 2px; }
.cmmc-list { margin-top: 10px; }

/* ── DIB tab extras ─────────────────────────────────────────── */

.dib-banner {
  border: 1px solid rgba(139,123,255,.35);
  background: rgba(139,123,255,.07);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 11px; color: var(--mut);
  line-height: 1.5;
}
.dib-banner b { color: var(--dib); }

.sec-h {
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--mut2); font-weight: 700;
  margin: 14px 2px 7px;
}

/* ── Drawer ─────────────────────────────────────────────────── */

#drawer-scrim {
  position: fixed; inset: 0;
  background: rgba(2,4,10,.5);
  z-index: 40;
}

#drawer[hidden], #drawer-scrim[hidden] { display: none; }

#drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(480px, 94vw);
  background: var(--bg1);
  border-left: 1px solid var(--line-strong);
  box-shadow: -18px 0 50px rgba(0,0,0,.55);
  z-index: 41;
  display: flex; flex-direction: column;
  animation: drawerin .22s ease-out;
}
@keyframes drawerin { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 24px 0 8px; font-size: 15px; line-height: 1.4; }
#drawer-close {
  position: absolute; top: 10px; right: 12px;
  appearance: none; border: 1px solid var(--line); background: var(--bg2);
  color: var(--mut); width: 26px; height: 26px; border-radius: 7px;
  font-size: 15px; cursor: pointer;
}
#drawer-close:hover { color: var(--txt); border-color: var(--acc); }
.drawer-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; font-family: var(--mono); font-size: 10px; color: var(--mut2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px 28px; }
.drawer-body p { font-size: 12.5px; line-height: 1.6; color: var(--txt); }
.d-sec { margin-top: 16px; }
.d-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ioc-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 10.5px; }
.ioc-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); word-break: break-all; }
.ioc-table td:first-child { color: var(--mut2); white-space: nowrap; width: 1%; }
.d-link { display: inline-block; margin-top: 12px; font-family: var(--mono); font-size: 11px; }

/* ── Topbar stat counters + threat condition ────────────────── */

#topstats {
  display: flex; align-items: center; gap: 0;
  margin-left: 10px;
  border-left: 1px solid var(--line);
}
.tstat {
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
  padding: 0 13px;
  border-right: 1px solid var(--line);
}
.tstat-n {
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  line-height: 1.1; color: var(--txt);
}
.tstat-l {
  font-size: 7.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mut2);
}
.n-crit { color: var(--crit); text-shadow: 0 0 10px rgba(255,77,107,.5); }
.n-high { color: var(--high); }
.n-acc  { color: var(--acc); }
.n-dib  { color: var(--dib); }
.n-low  { color: var(--low); }

.threatcond {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .12em;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.cond-dot { width: 8px; height: 8px; border-radius: 50%; }
.threatcond.cond-crit { color: var(--crit); border-color: rgba(255,77,107,.55); background: rgba(255,77,107,.10); }
.threatcond.cond-crit .cond-dot { background: var(--crit); box-shadow: 0 0 8px var(--crit); animation: livepulse 1.2s ease-in-out infinite; }
.threatcond.cond-elev { color: var(--high); border-color: rgba(255,170,51,.5); background: rgba(255,170,51,.08); }
.threatcond.cond-elev .cond-dot { background: var(--high); box-shadow: 0 0 8px var(--high); }
.threatcond.cond-grd  { color: var(--med); border-color: rgba(232,212,77,.4); background: rgba(232,212,77,.06); }
.threatcond.cond-grd .cond-dot { background: var(--med); }
.threatcond.cond-low  { color: var(--low); border-color: rgba(61,220,145,.4); background: rgba(61,220,145,.06); }
.threatcond.cond-low .cond-dot { background: var(--low); }

/* ── INTEL ticker ───────────────────────────────────────────── */

#ticker {
  flex: 0 0 28px;
  display: flex; align-items: stretch;
  background: rgba(9,14,26,.92);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  z-index: 25;
}
.ticker-label {
  display: flex; align-items: center;
  padding: 0 12px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .2em;
  color: #fff;
  background: linear-gradient(180deg, #e23a55, #b91f3c);
  box-shadow: 0 0 16px rgba(255,77,107,.4);
  flex: 0 0 auto;
}
.ticker-clip { flex: 1; overflow: hidden; position: relative; }
.ticker-track {
  display: inline-flex; align-items: center;
  height: 100%;
  width: max-content;
  white-space: nowrap;
  /* duration is set per-render in JS from the actual track width so the
     scroll speed is constant; keep the track short on mobile — iOS Safari
     blanks composited layers that get too wide */
  animation: tickscroll 60s linear infinite;
}
.ticker-clip:hover .ticker-track { animation-play-state: paused; }
@keyframes tickscroll { to { transform: translateX(-50%); } }
.tick-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--mut);
  padding: 0 14px;
  cursor: pointer;
}
.tick-item:hover { color: var(--txt); }
.tick-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.tick-dot.sev-crit { background: var(--crit); box-shadow: 0 0 6px var(--crit); }
.tick-dot.sev-high { background: var(--high); }
.tick-dot.sev-med  { background: var(--med); }
.tick-dot.sev-low  { background: var(--mut2); }
.tick-sep { color: var(--mut2); font-size: 9px; }
.tick-empty {
  display: flex; align-items: center; height: 100%;
  padding: 0 14px;
  font-family: var(--mono); font-size: 10px; color: var(--mut2);
}

/* ── Right rail ─────────────────────────────────────────────── */

#rail {
  flex: 0 0 248px;
  display: flex; flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13,20,36,.6), rgba(9,14,26,.4));
}
.rail-sec { padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.rail-sec.rail-grow { flex: 1 1 auto; }
.rail-h {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--mut2); font-weight: 700;
  margin-bottom: 9px;
}

.rail-gauges { display: flex; align-items: center; gap: 12px; }
.gauge { position: relative; width: 86px; height: 86px; flex: 0 0 86px; }
.gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg, .gauge-fg { fill: none; stroke-width: 6; }
.gauge-bg { stroke: var(--bg3); }
.gauge-fg {
  stroke: var(--low);
  stroke-linecap: round;
  stroke-dasharray: 213.6;       /* 2πr, r=34 */
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset .6s ease, stroke .3s;
  filter: drop-shadow(0 0 5px currentColor);
}
.gauge-mid {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
}
.gauge-n { font-family: var(--mono); font-size: 21px; font-weight: 700; line-height: 1; }
.gauge-l { font-size: 7px; letter-spacing: .22em; color: var(--mut2); }
.gauge.g-crit .gauge-fg { stroke: var(--crit); } .gauge.g-crit .gauge-n { color: var(--crit); }
.gauge.g-high .gauge-fg { stroke: var(--high); } .gauge.g-high .gauge-n { color: var(--high); }
.gauge.g-med  .gauge-fg { stroke: var(--med); }  .gauge.g-med .gauge-n  { color: var(--med); }
.gauge.g-low  .gauge-fg { stroke: var(--low); }  .gauge.g-low .gauge-n  { color: var(--low); }

.cmmc-stat {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid rgba(255,170,51,.4);
  background: rgba(255,170,51,.06);
  border-radius: 8px;
  padding: 10px 11px;
}
.cmmc-stat-n { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--high); }
.cmmc-stat-l { font-size: 7.5px; letter-spacing: .18em; color: var(--mut2); }

.rail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rail-stat {
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg1);
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 1px;
}
.rs-n { font-family: var(--mono); font-size: 17px; font-weight: 700; }
.rs-l { font-size: 7.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--mut2); }

.rail-apts { display: flex; flex-direction: column; gap: 3px; }
.apt-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 7px;
  border-radius: 7px;
  color: var(--txt);
  text-decoration: none;
}
.apt-row:hover { background: var(--bg2); text-decoration: none; }
.apt-ava {
  flex: 0 0 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--bg3); border: 1px solid var(--line);
  font-family: var(--mono); font-weight: 700; font-size: 10px;
  color: var(--acc2);
}
.apt-main { flex: 1; min-width: 0; }
.apt-name { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apt-sub { font-family: var(--mono); font-size: 8.5px; color: var(--mut2); }
.apt-right { text-align: right; }
.apt-n { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--txt); display: block; }
.apt-active { font-family: var(--mono); font-size: 7.5px; letter-spacing: .12em; color: var(--crit); }

.rail-watch { display: flex; flex-direction: column; gap: 3px; }
.rail-watch .empty { padding: 8px 4px; font-size: 10px; text-align: left; }
.rw-row {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 6px; border-radius: 6px;
  cursor: pointer;
  font-size: 10.5px;
}
.rw-row:hover { background: var(--bg2); }
.rw-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Watch stars + risk score ───────────────────────────────── */

.watch-star {
  appearance: none; border: 0; background: none;
  color: var(--mut2);
  font-size: 13px; line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  flex: 0 0 auto;
  border-radius: 5px;
  transition: color .12s, transform .12s;
}
.watch-star:hover { color: var(--high); transform: scale(1.2); }
.watch-star.on { color: var(--high); text-shadow: 0 0 8px rgba(255,170,51,.6); }

.pts {
  margin-left: auto;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  color: var(--acc);
  white-space: nowrap;
}

/* ── Drawer actions + threat brief ──────────────────────────── */

.drawer-actions { display: flex; gap: 8px; margin-top: 10px; }
.dact {
  appearance: none; cursor: pointer;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .1em;
  padding: 6px 12px;
  border-radius: 6px;
  background: transparent;
  transition: all .14s;
}
.dact-brief { color: var(--high); border: 1px solid rgba(255,170,51,.55); }
.dact-brief:hover, .dact-brief.on { background: rgba(255,170,51,.12); box-shadow: 0 0 12px rgba(255,170,51,.25); }
.dact-watch { color: var(--acc); border: 1px solid rgba(59,210,255,.55); }
.dact-watch:hover { background: var(--acc-dim); }
.dact-watch.on { color: var(--high); border-color: rgba(255,170,51,.55); }

.brief {
  border: 1px solid rgba(255,170,51,.4);
  border-left: 3px solid var(--high);
  background: rgba(255,170,51,.05);
  border-radius: 8px;
  padding: 11px 13px;
  margin-bottom: 14px;
}
.brief-h {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .16em; color: var(--high);
  margin-bottom: 8px;
}
.brief dl { margin: 0; display: grid; grid-template-columns: 92px 1fr; gap: 5px 10px; }
.brief dt {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em;
  color: var(--mut2); text-transform: uppercase;
  padding-top: 2px;
}
.brief dd { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--txt); }
.brief dd ul { margin: 0; padding-left: 16px; }
.brief dd li { margin-bottom: 3px; }
.brief-foot { margin-top: 8px; font-size: 9px; color: var(--mut2); font-style: italic; }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 1600px) {
  #topstats { display: none; }
}

@media (max-width: 1280px) {
  #rail { display: none; }
}

@media (max-width: 1100px) {
  #panel { flex-basis: 330px; }
  .brand-sub { display: none; }
  .globe-kpis .kpi { padding: 5px 9px; }
  .kpi-n { font-size: 14px; }
  .threatcond { display: none; }
}

@media (max-width: 860px) {
  /* the document must grow with the stacked content — with the desktop
     height:100% + flex:1 sizing, #layout stayed one viewport tall and
     its children spilled past it, stranding the sticky filterbar
     mid-page once the user scrolled */
  html, body { height: auto; min-height: 100%; }
  body { overflow: auto; }
  #topbar { position: sticky; top: 0; }
  #layout { flex: none; flex-direction: column; overflow: visible; }
  #stage { order: 0; min-height: 70vh; }
  #panel { order: 1; flex: 1 1 auto; border-right: 0; border-top: 1px solid var(--line); min-height: 50vh; }
  #globe-wrap { min-height: 46vh; }
  #subpanel { min-height: 34vh; }
  #filterbar {
    position: sticky; bottom: 0;
    flex-wrap: nowrap; overflow-x: auto;
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }
  .fstatus { display: none; }
  .top-right .clock, .classic-link { display: none; }
  .brand-text { display: none; }
  #topbar { gap: 8px; padding: 0 8px; }
  .tabs { margin-left: 0; }
  .tab { padding: 0 9px; font-size: 10.5px; }
  .tab-n { display: none; }
  .live-epm { display: none; }

  /* globe overlays: one compact KPI strip across the top, no legend
     (it collided with the KPI chips on narrow screens) */
  .globe-legend { display: none; }
  .globe-kpis {
    left: 8px; right: 8px; top: 8px;
    flex-wrap: nowrap; gap: 5px;
  }
  .globe-kpis .kpi {
    flex: 1 1 0; min-width: 0;
    align-items: center;
    padding: 5px 4px;
  }
  .kpi-n { font-size: 13px; }
  .kpi-l { font-size: 7px; letter-spacing: .08em; white-space: nowrap; }

  /* iOS Safari mis-sizes flexed SVGs (it overflowed onto the panel
     below) — give the chart a fixed height on mobile instead */
  .tl-wrap { height: auto; }
  .tl-plot { flex: none; height: 150px; }
}

/* ── dark web / exposure tab ───────────────────────────────────── */
.exp-badge {
  font-family: var(--mono); font-size: 8.5px; font-weight: 700;
  letter-spacing: .12em; padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--line-strong); color: var(--mut);
  text-transform: uppercase;
}
.exp-badge.exp-ransom { color: var(--crit); border-color: rgba(255,77,107,.45); background: rgba(255,77,107,.10); }
.exp-badge.exp-breach { color: var(--high); border-color: rgba(255,170,51,.45); background: rgba(255,170,51,.10); }
.exp-badge.exp-tor    { color: var(--acc2); border-color: rgba(139,123,255,.45); background: rgba(139,123,255,.12); }
.exp-badge.exp-other  { color: var(--mut); }

.stat-card.crit .n { color: var(--crit); text-shadow: 0 0 10px rgba(255,77,107,.5); }

.exp-warn {
  border: 1px solid rgba(255,77,107,.45); border-radius: var(--r);
  background: rgba(255,77,107,.06); padding: 8px 8px 4px; margin: 8px 0 12px;
}
.exp-warn-h {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; color: var(--crit); text-transform: uppercase;
  margin: 2px 4px 8px;
}
.exp-alert-row { background: rgba(255,77,107,.05); }

.tab-n.alert {
  color: #fff; background: var(--crit);
  box-shadow: 0 0 8px rgba(255,77,107,.6);
}

/* ── search clear affordance (issue #6) ─────────────────────────── */
.search-wrap { position: relative; display: inline-flex; align-items: center; }
.search-clear {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  appearance: none; border: none; background: transparent;
  color: var(--mut); cursor: pointer;
  width: 18px; height: 18px; line-height: 16px; text-align: center;
  border-radius: 5px; font-size: 14px; padding: 0;
}
.search-clear:hover { color: var(--txt); background: var(--bg2); }
.search-clear[hidden] { display: none; }
/* room for the × so it never overlaps typed text */
.search-wrap #search { width: 170px; padding-right: 22px; }
.search-wrap #search:focus { width: 210px; }

/* consistent empty-state text inside detail/ops sections (issue #7) */
.d-empty {
  font-family: var(--mono); font-size: 11px; color: var(--mut2);
  padding: 2px 0;
}

/* ── hidden ops drawer (Ctrl+Shift+O, issue #5) ─────────────────── */
#ops-scrim { position: fixed; inset: 0; background: rgba(2,4,10,.5); z-index: 44; }
#ops-drawer[hidden], #ops-scrim[hidden] { display: none; }
#ops-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(560px, 96vw);
  background: var(--bg1);
  border-right: 1px solid var(--line-strong);
  box-shadow: 18px 0 50px rgba(0,0,0,.55);
  z-index: 45;
  display: flex; flex-direction: column;
  animation: opsin .22s ease-out;
}
@keyframes opsin { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #ops-drawer { animation: none; } }
.ops-drawer-head { position: relative; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.ops-drawer-head h2 { margin: 6px 0 4px; font-size: 13px; letter-spacing: .04em; color: var(--txt); }
.ops-hint { font-family: var(--mono); font-size: 10px; color: var(--mut2); }
#ops-close {
  position: absolute; top: 10px; right: 12px;
  appearance: none; border: 1px solid var(--line); background: var(--bg2);
  color: var(--mut); width: 26px; height: 26px; border-radius: 7px;
  font-size: 15px; cursor: pointer;
}
#ops-close:hover { color: var(--txt); border-color: var(--acc); }
.ops-drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px 28px; }
.ops-target { font-size: 12px; color: var(--mut); margin-bottom: 6px; }
.ops-target b { color: var(--txt); }
.ops-sec { margin-top: 16px; }
.ops-h {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--mut2); margin-bottom: 6px;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
}
.ops-dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 11.5px; }
.ops-dl dt { color: var(--mut2); font-family: var(--mono); }
.ops-dl dd { margin: 0; color: var(--txt); font-family: var(--mono); word-break: break-word; }
.ops-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.ops-table th { text-align: left; color: var(--mut2); font-family: var(--mono); font-weight: 600;
  padding: 4px 6px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; }
.ops-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-all; }
.ops-type { color: var(--mut2); font-family: var(--mono); white-space: nowrap; width: 1%; }
.ops-val { font-family: var(--mono); color: var(--txt); }
.ops-rule { font-family: var(--mono); color: var(--acc); white-space: nowrap; }
.ops-snip { font-family: var(--mono); color: var(--mut); line-height: 1.5; }
.ops-snip mark { background: rgba(255,170,51,.22); color: var(--txt); padding: 0 1px; border-radius: 2px; }

/* ═══ P0 / P1 / P2 additions ═════════════════════════════════════════ */

/* item 11 — severity shape glyph so severity is never colour-alone */
.sev-ico { font-size: 8px; margin-right: 3px; vertical-align: middle; line-height: 1; }

/* item 2 — threat-brief export toolbar (Markdown / PDF / STIX) */
.brief-export {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line);
}
.brief-export-l {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mut); margin-right: 2px;
}
.brief-x {
  font-family: var(--mono); font-size: 10px; cursor: pointer;
  color: var(--txt); background: rgba(59,210,255,.08);
  border: 1px solid rgba(59,210,255,.35); border-radius: 5px;
  padding: 3px 8px; letter-spacing: .04em;
}
.brief-x:hover { background: rgba(59,210,255,.16); border-color: var(--acc); }
.brief-h .pill { margin-left: 6px; }

/* item 11 — lift the dimmest small-label token for readable contrast */
.tstat-l, .kpi-l, .rs-l, .brief dt, .brief-foot { color: var(--mut); }

/* item 3 — active-filter chips strip in the results header */
.active-filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 7px 12px; border-bottom: 1px solid var(--line);
}
.active-filters:empty { display: none; }
.af-label {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mut); margin-right: 2px;
}
.afchip {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 10px; color: var(--txt);
  background: rgba(125,160,220,.08); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 4px 2px 8px; letter-spacing: .03em;
}
.afx {
  cursor: pointer; border: none; background: transparent;
  color: var(--mut); font-size: 13px; line-height: 1; padding: 0 2px;
}
.afx:hover { color: var(--crit); }
.afclear {
  cursor: pointer; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .06em; color: var(--acc); background: transparent;
  border: 1px solid rgba(59,210,255,.35); border-radius: 5px; padding: 2px 8px;
  margin-left: auto;
}
.afclear:hover { background: rgba(59,210,255,.12); }
.cap-note { color: var(--high); cursor: help; }

/* item 6 — backfill progress line + buffer/bucketing hints */
.backfill {
  padding: 6px 12px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
  color: var(--acc); background: rgba(59,210,255,.05);
}
.backfill[hidden] { display: none; }
.tl-note { color: var(--mut); cursor: help; border-bottom: 1px dotted var(--mut2); }

/* item 8 — analyst annotation layer (triage status / tags / note) */
.annot-status { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.annot-st {
  font-family: var(--mono); font-size: 9.5px; cursor: pointer;
  color: var(--mut); background: rgba(125,160,220,.06);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; letter-spacing: .04em;
}
.annot-st:hover { color: var(--txt); border-color: var(--mut); }
.annot-st.on { color: var(--txt); background: rgba(59,210,255,.14); border-color: var(--acc); }
.annot-tags, .annot-note {
  width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: 11px;
  color: var(--txt); background: rgba(10,14,22,.5);
  border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; margin-bottom: 6px;
}
.annot-note { resize: vertical; min-height: 34px; }
.annot-tags:focus, .annot-note:focus { outline: none; border-color: var(--acc); }
.annot-badge {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em;
  border-radius: 4px; padding: 1px 5px; border: 1px solid var(--line);
}
.annot-new { color: var(--acc); border-color: rgba(59,210,255,.4); }
.annot-reviewed { color: #3ddc91; border-color: rgba(61,220,145,.4); }
.annot-dismissed, .annot-false-positive { color: var(--mut2); }
.annot-tag { font-family: var(--mono); font-size: 8.5px; color: var(--mut); }
.annot-noteflag { font-size: 9px; color: var(--mut); cursor: help; }
.row-triaged { opacity: .5; }
.row-triaged:hover { opacity: .85; }

/* item 10 — list/view export controls in the panel header */
.panel-export { display: flex; align-items: center; gap: 5px; }
.pexp {
  font-family: var(--mono); font-size: 9.5px; cursor: pointer; text-decoration: none;
  color: var(--txt); background: rgba(59,210,255,.07);
  border: 1px solid rgba(59,210,255,.3); border-radius: 5px; padding: 3px 7px;
  letter-spacing: .04em; white-space: nowrap;
}
.pexp:hover { background: rgba(59,210,255,.16); border-color: var(--acc); }
.pexp-taxii { color: var(--mut); }
@media (max-width: 900px) { .panel-export .pexp-taxii { display: none; } }

/* filter-aware empty state — names the suppressing filters + one-click remove */
.empty-filtered { text-align: left; }
.empty-filtered .empty-sub { color: var(--mut); font-size: 11px; margin: 6px 0 8px; }
.empty-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.empty-fchip {
  font-family: var(--mono); font-size: 10px; cursor: pointer; color: var(--txt);
  background: rgba(125,160,220,.08); border: 1px solid var(--line);
  border-radius: 5px; padding: 3px 8px; letter-spacing: .03em;
}
.empty-fchip:hover { border-color: var(--crit); color: var(--crit); }
.empty-clear { cursor: pointer; }
