:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #eef3f7;
  --text: #18212b;
  --muted: #667382;
  --line: #d9e1e8;
  --blue: #1b65d8;
  --teal: #087f8c;
  --red: #c03221;
  --amber: #a86400;
  --green: #2b7a3f;
  --shadow: 0 14px 40px rgba(24, 33, 43, 0.08);
  --sidebar: #111d2a;
  --sidebar-2: #17293a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input,
textarea {
  touch-action: manipulation;
}

svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(45, 140, 160, 0.16), rgba(45, 140, 160, 0) 230px),
    var(--sidebar);
  color: #eef5fb;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 16px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2d8ca0;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.brand span,
.source-health span {
  display: block;
  color: #aebdca;
  font-size: 12px;
  margin-top: 3px;
}

.sidebar-overview {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 12px;
  margin-bottom: 16px;
}

.overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.overview-top span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #aebdca;
  font-size: 12px;
}

.overview-top strong {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.overview-grid div {
  min-height: 56px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px;
}

.overview-grid span {
  display: block;
  color: #aebdca;
  font-size: 11px;
}

.overview-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.nav-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.nav-section {
  margin: 12px 4px 3px;
  color: #9eb1c1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-section:first-child {
  margin-top: 2px;
}

.nav-item {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #cbd8e4;
  cursor: pointer;
  padding: 8px;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 #5bc7d6;
}

.icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfe8ee;
}

.nav-item.active .icon {
  background: #2d8ca0;
  color: #fff;
}

.nav-copy {
  min-width: 0;
}

.nav-copy strong,
.nav-copy small {
  display: block;
}

.nav-copy strong {
  font-size: 13px;
  line-height: 1.2;
}

.nav-copy small {
  margin-top: 3px;
  color: #95a7b7;
  font-size: 11px;
}

.nav-item.active .nav-copy small,
.nav-item:hover .nav-copy small {
  color: #bdd0de;
}

.nav-count {
  min-width: 30px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dce8f1;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 760;
}

.nav-count:empty {
  display: none;
}

.source-health {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.health-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 11px 0;
}

.health-mini-grid div {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px;
}

.health-mini-grid span {
  margin: 0;
  font-size: 10px;
  text-transform: uppercase;
}

.health-mini-grid strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-title strong {
  display: block;
}

.health-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.health-row div:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-summary {
  display: grid;
  gap: 5px;
  margin: 10px 0;
}

.health-summary span {
  display: flex;
  align-items: center;
  margin-top: 0;
  color: #d6e1ea;
}

.status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: var(--red);
  margin-right: 7px;
}

.status-dot.ok {
  background: #4ec06d;
}

.status-dot.warn {
  background: #e0a72e;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.topbar-main {
  max-width: 780px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

.refresh-status {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #536274;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.refresh-status svg {
  width: 15px;
  height: 15px;
}

.refresh-status.fresh {
  border-color: #bfdfce;
  background: #f2fbf6;
  color: #217348;
}

.refresh-status.stale {
  border-color: #f4d195;
  background: #fff8eb;
  color: #925f00;
}

.refresh-status.loading {
  border-color: #b8d8ff;
  background: #eff7ff;
  color: var(--blue);
}

.refresh-status.loading svg {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

p {
  margin: 0;
}

.topbar p {
  color: var(--muted);
  margin-top: 6px;
}

.primary-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(27, 101, 216, 0.24);
}

.primary-btn:hover {
  background: #1559c3;
}

.primary-btn svg,
.open-link svg,
.reason-title svg,
.watchlist-head svg,
.quick-chip svg,
.brief-action svg,
.eyebrow svg,
.filter-head svg,
.ghost-btn svg {
  width: 16px;
  height: 16px;
}

.ghost-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
}

.ghost-btn:hover {
  border-color: #b7c5d2;
  background: #f8fafc;
}

.primary-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.compact {
  height: 38px;
  min-height: 38px;
  padding: 0 11px;
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.category-heatmap {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* Collapsible summary row */
.category-heatmap > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.category-heatmap > summary::-webkit-details-marker { display: none; }
.category-heatmap > summary::marker { display: none; }
.category-heatmap > summary strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.category-heatmap > summary > span {
  color: var(--muted);
  font-size: 12px;
  flex: 1;
}
.category-heatmap > summary::after {
  content: 'Show ▸';
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.category-heatmap[open] > summary::after { content: 'Hide ▾'; }
.category-heatmap > .heatmap-grid {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line);
}

.heatmap-head,
.chart-head,
.why-now-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.heatmap-head strong,
.chart-head strong,
.why-now-head strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.heatmap-head span,
.chart-head span,
.why-now-head span {
  color: var(--muted);
  font-size: 12px;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.heatmap-cell {
  min-height: 68px;
  display: grid;
  gap: 3px;
  align-content: center;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(220, 53, 43, var(--heat)), #fff);
  padding: 9px;
}

.heatmap-cell span {
  color: #344252;
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-cell strong {
  color: var(--red);
  font-size: 22px;
  line-height: 1;
}

.heatmap-cell em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.metric-grid.compact-metrics {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

[hidden] {
  display: none !important;
}

.metric {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.metric-danger {
  border-color: #f2b4aa;
  background: linear-gradient(180deg, #fff7f5, #fff);
}

.metric-warning {
  border-color: #f4d195;
  background: linear-gradient(180deg, #fff8eb, #fff);
}

.metric-info {
  border-color: #b9d7ff;
  background: linear-gradient(180deg, #f4f9ff, #fff);
}

.metric-ok {
  border-color: #bfdfce;
  background: linear-gradient(180deg, #f5fbf7, #fff);
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef6fb;
  color: var(--teal);
}

.metric-danger .metric-icon {
  background: #ffe8e3;
  color: var(--red);
}

.metric-warning .metric-icon {
  background: #fff0d7;
  color: #a96800;
}

.metric-info .metric-icon {
  background: #e7f2ff;
  color: var(--blue);
}

.metric-ok .metric-icon {
  background: #e7f7ee;
  color: #22784a;
}

.metric-icon svg {
  width: 18px;
  height: 18px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 26px;
}

.view-brief {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1.2fr) minmax(220px, 0.9fr) minmax(240px, 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.brief-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf7f8;
  color: var(--teal);
}

.brief-icon svg {
  width: 22px;
  height: 22px;
}

.brief-copy span,
.brief-action span,
.brief-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.brief-copy strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.brief-copy p {
  margin-top: 6px;
  color: #4b5865;
  line-height: 1.45;
}

.brief-action {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.brief-action span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
}

.brief-action strong {
  display: block;
  margin-top: 8px;
  color: #344252;
  line-height: 1.35;
}

.brief-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.brief-stats div {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 10px;
}

.brief-stats strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.filter-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.filter-toggle {
  border-color: #8dcad6;
  background: #e8fbff;
  color: #087f8c;
  font-weight: 760;
}

.filter-toggle.is-collapsed {
  border-color: #b8d8ff;
  background: linear-gradient(180deg, #eff7ff, #dff0ff);
  color: var(--blue);
}

.filter-head strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.filter-head > div > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.filter-panel.collapsed {
  padding-bottom: 10px;
}

.filter-panel.collapsed .filters {
  display: none;
}

.filter-panel.collapsed .filter-head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

/* In "basic" mode (cases, events, audit…) hide filters that only apply to intel views */
.filter-panel[data-view-mode="basic"] .filters .field:not(.field-search) {
  display: none;
}
.filter-panel[data-view-mode="basic"] .filters .toggle {
  display: none;
}
.filter-panel[data-view-mode="basic"] .filter-actions #filterToggle {
  display: none;
}

.filters {
  display: grid;
  grid-template-columns: minmax(300px, 1.5fr) repeat(4, minmax(150px, 1fr));
  gap: 11px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.field-search {
  grid-column: span 2;
}

.search-box,
.filters select,
.toggle {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.filters select {
  padding: 0 10px;
  color: var(--text);
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.quickbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.quickbar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  margin-right: 2px;
  text-transform: uppercase;
}

.quick-chip {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #344252;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
}

.quick-chip:hover,
.quick-chip.active {
  border-color: #95b8e8;
  background: #e7f0ff;
  color: #174eaa;
}

.result-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.result-line strong {
  color: var(--text);
}

.active-filters {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  text-align: right;
}

.filter-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #b8d8ff;
  border-radius: 999px;
  background: #eef7ff;
  color: #1f5fbf;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  max-width: min(460px, 100%);
}

.filter-pill:hover {
  border-color: #7fb0f0;
  background: #ddecff;
}

.filter-pill span {
  color: #56708a;
  font-size: 14px;
}

.empty-action {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px;
}

.empty-action svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.empty-action strong {
  color: var(--text);
  font-size: 18px;
}

.empty-action span {
  color: var(--muted);
}

.content-view {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.intel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.intel-card:hover {
  border-color: #b8c7d5;
  transform: translateY(-1px);
  box-shadow: 0 16px 44px rgba(24, 33, 43, 0.11);
}

.card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 250px;
}

.score-pill {
  min-width: 112px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.score-pill.critical {
  background: var(--red);
}

.score-pill.high {
  background: var(--amber);
}

.score-pill.medium {
  background: var(--teal);
}

.score-pill.low {
  background: var(--muted);
}

.card-title {
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  border: 1px solid #c7d7ea;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  padding: 0 10px;
  cursor: pointer;
}

.open-link svg {
  width: 15px;
  height: 15px;
}

.open-link:hover {
  border-color: #95b8e8;
  background: #e7f0ff;
}

.summary {
  margin: 10px 0;
  color: #4b5865;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.meta-row {
  color: var(--muted);
  font-size: 12px;
}

.chip-row {
  margin-top: 11px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: #344252;
  padding: 0 9px;
  font-size: 12px;
}

.chip.cve {
  background: #e7f0ff;
  color: #174eaa;
}

.chip.signal {
  background: #fff1df;
  color: #8a4a00;
}

.chip.kev {
  background: #feeceb;
  color: var(--red);
}

.chip.affected {
  background: #e6f5ea;
  color: var(--green);
}

.chip.safe {
  background: #eef8f1;
  color: var(--green);
}

.chip.watchlist {
  background: #eaf7f8;
  color: var(--teal);
}

.chip.alias {
  background: #f0ecff;
  color: #5742a9;
}

.chip.neutral {
  background: #eef3f7;
  color: #526171;
}

.chip.case {
  background: #e7f0ff;
  color: var(--blue);
}

.chip.evidence {
  background: #eef8f1;
  color: var(--green);
}

.chip.event {
  background: #f0ecff;
  color: #5742a9;
}

.chip.product {
  background: #edf7ff;
  color: #165f8f;
}

.quality-score {
  min-width: 34px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf7f8;
  color: var(--teal);
  font-weight: 800;
}

.quality-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 220px;
}

.quality-score-box {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.quality-score-box small {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  max-width: 72px;
}

.quality-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.quality-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.quality-chip svg {
  width: 13px;
  height: 13px;
}

.quality-chip.ok {
  background: #e8f6ed;
  color: var(--green);
}

.quality-chip.error {
  background: #fff0ed;
  color: var(--red);
}

.quality-chip.quiet {
  background: #eef3f7;
  color: var(--muted);
}

.quality-chip.cve {
  background: #eaf2ff;
  color: var(--blue);
}

.reason-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.why-now {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  margin: 8px 0;
}

.why-now.compact {
  padding: 8px 10px;
}

.why-now-bar {
  display: flex;
  height: 12px;
  gap: 2px;
}

.why-segment {
  border-radius: 4px;
  min-width: 6px;
  transition: opacity 0.15s;
}
.why-segment:hover { opacity: 0.72; cursor: help; }

.why-danger  { background: #d93025; }
.why-warning { background: #e07b1a; }
.why-ok      { background: #23864f; }
.why-info    { background: #2563eb; }
.why-neutral { background: #7b8794; }

.why-score-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 14px;
  font-weight: 760;
  padding: 2px 9px;
  border-radius: 999px;
  line-height: 1.4;
}
.why-score-badge em { font-style: normal; font-size: 10px; opacity: 0.6; margin-left: 1px; }
.why-score-badge.why-score-critical { background: #ffeaea; color: #b91c1c; }
.why-score-badge.why-score-high     { background: #fff3e0; color: #c2410c; }
.why-score-badge.why-score-medium   { background: #fffde7; color: #a16207; }
.why-score-badge.why-score-low      { background: #f0f4f8; color: #526171; }

.why-now-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.why-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #edf2f7;
  color: #344252;
  padding: 2px 8px 2px 6px;
  font-size: 11px;
  font-weight: 700;
}
.why-label b {
  font-weight: 700;
  opacity: 0.55;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.why-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
  flex-shrink: 0;
}

.why-label.why-danger  { background: #ffe4e4; color: #ad2a20; }
.why-label.why-warning { background: #fff1df; color: #894600; }
.why-label.why-ok      { background: #dcf7e6; color: #176c38; }
.why-label.why-info    { background: #e3efff; color: #1d5fd0; }

.reason-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #344252;
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 6px;
}

/* Score badge pushed to the far right inside the reason title */
.reason-score-badge {
  margin-left: auto;
}

/* Compact bar strip used inside cards — no box, no heading */
.why-bar-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 2px;
}

.reason-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.reason-list li {
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #526171;
  padding: 4px 8px;
  font-size: 12px;
}

.evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #526171;
  font-size: 12px;
}

.evidence-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 4px 8px;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini-btn,
.case-actions select,
.case-actions input {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
}

.case-actions label {
  display: grid;
  gap: 4px;
}

.case-actions label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-actions input {
  width: 150px;
}

.case-summary,
.overdue-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.overdue-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-summary div,
.overdue-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}

.case-summary span,
.overdue-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.case-summary strong,
.overdue-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 22px;
}

.mini-btn:hover {
  border-color: #95b8e8;
  background: #f8fbff;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.mini-btn svg {
  width: 14px;
  height: 14px;
}

.mini-btn.action-advisory {
  border-color: #ffd99a;
  background: #fff6e8;
  color: #8b5100;
}

.mini-btn.action-advisory:hover {
  background: #ffedcc;
  border-color: #f0bd63;
}

.mini-btn.action-assess {
  border-color: #a9d8c2;
  background: #ecf8f1;
  color: #236b39;
}

.mini-btn.action-assess:hover {
  background: #def3e7;
  border-color: #7fc39f;
}

.mini-btn:disabled {
  cursor: default;
  opacity: 0.82;
}

.mini-btn.is-state,
.mini-btn.is-state:hover {
  border-color: #cdd8e2;
  background: #eef3f7;
  color: #50606f;
}

.mini-btn.action-suppress {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.mini-btn.action-suppress:hover {
  border-color: #f0b4aa;
  background: #fff1ef;
  color: #9a2b1f;
}

.mini-btn.action-wizard {
  border-color: #8fb4ff;
  background: #eaf2ff;
  color: #1d4ed8;
}

.mini-btn.action-wizard:hover {
  border-color: #5b8df0;
  background: #dceaff;
}

.delta-toolbar,
.global-search-row,
.saved-filter-row,
.source-tune-actions,
.case-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.drawer-advisory-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.drawer-advisory-group .mini-btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.delta-toolbar {
  justify-content: space-between;
  margin-bottom: 2px;
}

.delta-time-btns {
  display: flex;
  gap: 6px;
}

.delta-right-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.delta-search {
  flex: 1;
  min-width: 180px;
  max-width: 260px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: var(--panel);
  color: var(--text);
}

.delta-search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.delta-sort-select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 13px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.delta-sort-select:focus {
  outline: none;
  border-color: var(--blue);
}

/* ─── Delta feed (Changes view) ───────────────────────────────────── */

.delta-intro {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid #cfe1ff;
  border-radius: 8px;
  background: #f7fbff;
  padding: 12px 14px;
  margin: 10px 0;
}

.delta-intro > div:first-child {
  display: grid;
  gap: 4px;
}

.delta-intro strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.delta-intro span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.delta-intro-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.delta-intro-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #244463;
  padding: 0 9px;
  white-space: nowrap;
}

.delta-intro-metrics strong {
  font-size: 13px;
}

.delta-breakdown-chart {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 10px;
}

/* Collapsible summary */
.delta-breakdown-chart > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.delta-breakdown-chart > summary::-webkit-details-marker { display: none; }
.delta-breakdown-chart > summary::marker { display: none; }
.delta-breakdown-chart > summary strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.delta-breakdown-chart > summary > span {
  color: var(--muted);
  font-size: 12px;
  flex: 1;
}
.delta-breakdown-chart > summary::after {
  content: 'Show ▸';
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.delta-breakdown-chart[open] > summary::after { content: 'Hide ▾'; }

.delta-breakdown-chart > .delta-bars {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.delta-bars {
  display: grid;
  gap: 8px;
}

.delta-bar-row {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) 44px 72px;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.delta-bar-row:hover {
  background: #eef6ff;
}

.delta-bar-row > span {
  font-size: 12px;
  font-weight: 760;
}

.delta-bar-row > i,
.delta-stat-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.delta-bar-row > i b,
.delta-stat-bar b {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--blue);
}

.delta-bar-row .bar-urgent {
  background: rgba(218, 48, 37, 0.58);
  min-width: 0;
}

.delta-bar-row strong {
  font-size: 13px;
}

.delta-bar-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

/* Label with inline color swatch inside each bar row */
.delta-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 760;
}
.delta-bar-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.delta-bar-swatch-new       { background: var(--blue); }
.delta-bar-swatch-escalated { background: #e07b1a; }
.delta-bar-swatch-kev       { background: var(--red); }
.delta-bar-swatch-patched   { background: var(--green); }

/* Color legend at bottom of breakdown chart */
.delta-color-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 14px;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line);
}
.dcl-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.dcl-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dcl-swatch-new       { background: var(--blue); }
.dcl-swatch-escalated { background: #e07b1a; }
.dcl-swatch-kev       { background: var(--red); }
.dcl-swatch-patched   { background: var(--green); }
.dcl-swatch-urgent    { background: rgba(218, 48, 37, 0.55); }
.dcl-divider          { width: 1px; height: 12px; background: var(--line); margin: 0 2px; }

.delta-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.delta-stat {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  background: var(--panel);
  text-align: left;
  transition: box-shadow 0.12s, border-color 0.12s, transform 0.1s;
  position: relative;
}

.delta-stat:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}

.delta-stat.active {
  box-shadow: 0 0 0 2px var(--blue);
  border-color: var(--blue);
}

.delta-stat.active::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--blue);
}

.delta-stat strong {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.delta-stat > span:not(.delta-stat-actnow):not(.delta-stat-clear) {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.delta-stat em {
  min-height: 28px;
  color: #526172;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.delta-stat-bar {
  width: 100%;
  display: block;
  height: 6px;
  margin-top: 3px;
}

.delta-stat-actnow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  background: #fff0f0;
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 2px;
  width: fit-content;
}

.delta-stat-clear {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.5;
}

.delta-stat-all    { border-top: 3px solid #8896aa; }
.delta-stat-new    { border-top: 3px solid var(--blue); }
.delta-stat-escalated { border-top: 3px solid #e07b1a; }
.delta-stat-kev    { border-top: 3px solid var(--red); }
.delta-stat-patched { border-top: 3px solid var(--green); }

.delta-stat-all.active    { box-shadow: 0 0 0 2px #8896aa; border-color: #8896aa; }
.delta-stat-new.active    { box-shadow: 0 0 0 2px var(--blue); border-color: var(--blue); }
.delta-stat-escalated.active { box-shadow: 0 0 0 2px #e07b1a; border-color: #e07b1a; }
.delta-stat-kev.active    { box-shadow: 0 0 0 2px var(--red); border-color: var(--red); }
.delta-stat-patched.active { box-shadow: 0 0 0 2px var(--green); border-color: var(--green); }

.delta-stat-all.active::after    { border-top-color: #8896aa; }
.delta-stat-new.active::after    { border-top-color: var(--blue); }
.delta-stat-escalated.active::after { border-top-color: #e07b1a; }
.delta-stat-kev.active::after    { border-top-color: var(--red); }
.delta-stat-patched.active::after { border-top-color: var(--green); }

.delta-feed {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.delta-section {
  border-top: 1px solid var(--line);
}

.delta-section:first-child {
  border-top: none;
}

.delta-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  cursor: default;
}

.delta-section.collapsed .delta-section-head {
  border-bottom: none;
}

.delta-section-new       { background: #eef4ff; color: var(--blue); }
.delta-section-escalated { background: #fff6ec; color: #9a4f00; }
.delta-section-kev       { background: #fff1f1; color: var(--red); }
.delta-section-patched   { background: #eef8f0; color: var(--green); }

.delta-section-toggle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.1s, background 0.1s;
}

.delta-section-toggle:hover {
  opacity: 1;
  background: rgba(0,0,0,0.07);
}

.delta-section-toggle svg {
  transition: transform 0.18s ease;
  transform: rotate(90deg);
}

.delta-section.collapsed .delta-section-toggle svg {
  transform: rotate(0deg);
}

/* section-label takes available space; count + badge pushed right */
.delta-section-label {
  flex: 0 0 auto;
}

.delta-section-description {
  flex: 1;
  min-width: 80px;
  color: currentColor;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.74;
  text-transform: none;
}

.delta-section-count {
  background: rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}

.delta-section-body {
  overflow: hidden;
}

.delta-section.collapsed .delta-section-body {
  display: none;
}

.delta-item {
  width: 100%;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.delta-item:last-child {
  border-bottom: none;
}

.delta-item:hover {
  background: var(--hover);
}

.delta-item:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.delta-item .score-pill {
  font-size: 11px;
  padding: 3px 9px;
  height: auto;
  min-width: 0;
  border-radius: 12px;
  text-align: center;
}

.delta-item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.delta-item-urgent {
  border-left: 3px solid var(--red);
  background: #fffbfb;
}

.delta-item-urgent:hover {
  background: #fff3f3;
}

.delta-item-body strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delta-item-body em {
  display: flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delta-item-body .delta-reasons {
  flex-wrap: wrap;
  white-space: normal;
  overflow: visible;
}

.delta-reason {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  max-width: 100%;
}

.delta-reason-chip {
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.delta-reason-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delta-reason-epss,
.delta-reason-score,
.delta-reason-escalated {
  background: #fff1df;
  color: #9a4a00;
}

.delta-reason-kev {
  background: #ffe4e4;
  color: #bd2d22;
}

.delta-reason-patched {
  background: #dcf7e6;
  color: #176c38;
}

.delta-reason-new {
  background: #e3efff;
  color: #1d5fd0;
}

.delta-reason-signal {
  background: #edf2f7;
  color: #526172;
}

.delta-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--muted);
}

/* Category tag shown on rows in mixed/flat views */
.delta-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.delta-cat.delta-section-new       { background: #ddeeff; color: var(--blue); }
.delta-cat.delta-section-escalated { background: #ffeedd; color: #8a4500; }
.delta-cat.delta-section-kev       { background: #ffe8e8; color: var(--red); }
.delta-cat.delta-section-patched   { background: #ddf5e4; color: var(--green); }

/* "Act now" badge inside section headers */
.delta-actnow-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  background: #ffe8e8;
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: auto;
  flex-shrink: 0;
}

.delta-section-label {
  flex: 1;
}

/* Top priority strip (Act now across all sections) */
.delta-top-strip {
  background: #fff8f8;
  border-bottom: 2px solid #f5c6c6;
}

.delta-top-strip-head {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--red);
  border-bottom: 1px solid #f5c6c6;
}

.delta-top-strip-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.delta-top-strip-head small {
  color: #8d4a45;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.delta-top-strip .delta-item {
  border-left: 3px solid var(--red);
  background: #fffbfb;
}

.delta-top-strip .delta-item:hover {
  background: #fff3f3;
}

.delta-empty-row {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

/* ─── Search results (keep existing .search-hit) ──────────────────── */

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.global-search-panel,
.search-result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.global-search-panel h2,
.search-result-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.search-hit {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
  margin-bottom: 7px;
}

.search-hit:hover {
  border-color: #95b8e8;
  background: #f1f7ff;
}

.global-search-row input {
  min-width: min(520px, 100%);
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.source-weight-input,
.source-rating-select {
  width: 76px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 8px;
  font-size: 12px;
}

.case-drawer-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  background: rgba(15, 23, 32, 0.18);
}

.case-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(520px, 100vw);
  overflow: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -18px 0 50px rgba(15, 23, 32, 0.18);
  padding: 16px;
}

.news-context {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.news-context strong {
  font-size: 14px;
  line-height: 1.3;
}

.news-context span,
.news-context p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.news-context p {
  margin: 0;
  color: #344252;
}

.inline-link {
  width: fit-content;
}

.source-evidence-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
  margin-bottom: 7px;
}

.source-evidence-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.source-evidence-row span,
.source-evidence-row small {
  color: var(--muted);
  font-size: 12px;
}

.source-evidence-row small {
  overflow-wrap: anywhere;
}

.source-evidence-row em {
  flex: 0 0 auto;
  color: #244463;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.case-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.case-drawer-head span {
  color: var(--muted);
  font-size: 12px;
}

.case-drawer-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.25;
}

.case-drawer-grid,
.wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.case-drawer-grid div,
.wizard-grid label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.case-drawer-grid span,
.wizard-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.case-drawer-grid strong {
  display: block;
  margin-top: 5px;
}

.wizard-grid input,
.wizard-grid select,
.case-drawer-actions select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 8px;
}

.clickable-row,
.clickable-card {
  cursor: pointer;
}

.clickable-row:hover,
.clickable-card:hover {
  background: var(--hover);
}

.detail-row-button {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
}

.detail-row-button:hover {
  border-color: var(--blue);
  background: #eef6ff;
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-left: 3px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 9px;
  margin-bottom: 7px;
}

.timeline-row span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-row strong {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.timeline-score,
.timeline-epss,
.timeline-urgency {
  border-left-color: #e07b1a;
}

.timeline-kev,
.timeline-patch {
  border-left-color: var(--red);
}

.timeline-first_seen,
.timeline-new_cves,
.timeline-active {
  border-left-color: var(--blue);
}

.timeline-note,
.timeline-case_status {
  border-left-color: var(--green);
}

.risk-trend {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
}

.risk-trend svg {
  display: block;
  width: 100%;
  height: 104px;
}

.trend-threshold {
  stroke: #f0b4ad;
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.trend-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-dot {
  fill: var(--panel);
  stroke: var(--blue);
  stroke-width: 2;
}

.trend-dot.kev {
  stroke: var(--red);
  fill: #ffe4e4;
}

.trend-dot.patch {
  stroke: var(--green);
  fill: #dcf7e6;
}

.trend-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.trend-meta strong {
  color: var(--text);
}

.mini-btn.action-detail {
  border-color: #b9d7ff;
  background: #eef6ff;
  color: #1d4ed8;
}

.mini-btn.action-detail:hover {
  border-color: #7bb3ff;
  background: #dcebff;
}

.triage-wizard {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(15, 23, 32, 0.24);
  padding: 18px;
}

.triage-wizard h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.digest-grid {
  display: grid;
  gap: 12px;
}

.digest-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.digest-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 16px;
}

.digest-list {
  display: grid;
  gap: 8px;
}

.digest-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.digest-row:hover {
  border-color: #95b8e8;
  background: #f1f7ff;
}

.digest-row strong,
.digest-row em {
  display: block;
}

.digest-row em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.digest-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.digest-split > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.digest-split > div > strong {
  display: block;
  margin-bottom: 8px;
}

.digest-markdown {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1720;
  color: #d7e3ee;
  padding: 12px;
  white-space: pre-wrap;
}

.detail-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.detail-panel,
.related {
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.detail-panel summary,
.related summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #344252;
  font-size: 13px;
  font-weight: 760;
}

.detail-panel summary::marker,
.related summary::marker {
  color: var(--muted);
}

.detail-panel summary svg {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.detail-body {
  display: grid;
  gap: 10px;
  padding: 10px 0 2px;
  color: #4b5865;
  font-size: 13px;
  line-height: 1.45;
}

.detail-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-groups > div,
.detail-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
}

.detail-groups strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  margin-bottom: 7px;
}

.detail-token-row,
.detail-groups > div > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-token {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: #344252;
  padding: 0 8px;
  font-size: 12px;
}

.detail-empty {
  color: var(--muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 9px;
}

.detail-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-subtle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.detail-row strong {
  flex: 0 0 auto;
  color: #344252;
  font-size: 12px;
}

.detail-divider {
  border-top: 1px solid var(--line);
}

.detail-bullets {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #526171;
}

.related {
  margin-top: 12px;
}

.related summary {
  color: var(--blue);
}

.related-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.related-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: #344252;
  font-size: 13px;
}

.sources-table {
  width: 100%;
  min-width: 1040px;
  table-layout: auto;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content-view:has(.sources-table) {
  overflow-x: auto;
}

.sources-table .col-source { width: 27%; }
.sources-table .col-status { width: 96px; }
.sources-table .col-type { width: 128px; }
.sources-table .col-region { width: 96px; }
.sources-table .col-quality { width: 240px; }
.sources-table .col-fetch { width: 120px; }
.sources-table .col-feed { width: auto; }
.sources-table .col-actions { width: 280px; }

.coverage-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.coverage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.coverage-head strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

.coverage-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.coverage-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eaf7f8;
  color: var(--teal) !important;
  padding: 6px 10px;
  font-weight: 800;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.coverage-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 11px;
}

.coverage-grid span,
.coverage-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.coverage-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.coverage-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.coverage-columns h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.coverage-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.coverage-row strong {
  color: #344252;
  font-size: 12px;
  text-align: right;
}

.coverage-gaps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.coverage-gaps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #fff1df;
  color: #8a4a00;
  padding: 5px 9px;
  font-size: 12px;
}

.coverage-backlog {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.coverage-backlog summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #344252;
  font-size: 13px;
  font-weight: 800;
}

.backlog-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.backlog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.backlog-row strong,
.backlog-row span {
  display: block;
}

.backlog-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.backlog-row em {
  justify-self: end;
  border-radius: 999px;
  background: #eef3f7;
  color: #344252;
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.sources-table th,
.sources-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.sources-table small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.sources-table th {
  color: var(--muted);
  font-weight: 700;
  background: #f8fafc;
}

.sort-head {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font: inherit;
  font-weight: 800;
}

.sort-head span {
  min-width: 18px;
  color: var(--blue);
  font-weight: 900;
}

.sort-head.active {
  color: var(--text);
}

.source-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 220px;
}

.source-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf7f8;
  color: var(--teal);
}

.source-avatar.news { background: #eaf2ff; color: var(--blue); }
.source-avatar.research { background: #f0ecff; color: #5742a9; }
.source-avatar.vendor { background: #fff6e8; color: #8b5100; }
.source-avatar.government { background: #e8f6ed; color: var(--green); }
.source-avatar.exploit { background: #fff0ed; color: var(--red); }

.source-note-icon {
  display: inline-flex;
  vertical-align: -3px;
  margin-right: 5px;
  color: var(--teal);
}

.source-note-icon svg {
  width: 14px;
  height: 14px;
}

.table-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
}

.table-status.ok {
  background: #e6f5ea;
  color: var(--green);
}

.table-status.skipped {
  background: #eef3f7;
  color: #526171;
}

.table-status.error {
  background: #feeceb;
  color: var(--red);
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.case-board,
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.case-card,
.event-card,
.advisory-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.case-head,
.event-head,
.advisory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.case-head strong {
  color: var(--muted);
  font-size: 12px;
}

.case-card h2 {
  margin: 10px 0;
  font-size: 17px;
  line-height: 1.35;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #526171;
  font-size: 12px;
}

.case-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sla-grid,
.event-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.event-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sla-grid div,
.event-stats div {
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 9px;
}

.sla-grid span,
.event-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.sla-grid strong,
.event-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

.event-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
}

.event-head > div:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf7f8;
  color: var(--teal);
}

.event-head strong,
.advisory-head strong {
  display: block;
}

.event-head span,
.advisory-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.event-score-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.event-card .score-pill {
  min-width: auto;
  height: 28px;
  padding: 0 11px;
}

.advisory-panel pre {
  margin: 14px 0 0;
  white-space: pre-wrap;
  overflow: auto;
  border-radius: 8px;
  background: #101923;
  color: #d7e4ef;
  padding: 16px;
  line-height: 1.5;
}

.table-status.new,
.table-status.under-assessment {
  background: #e7f0ff;
  color: var(--blue);
}

.table-status.coordinating,
.table-status.advisory-drafted {
  background: #fff1df;
  color: #8a4a00;
}

.table-status.published,
.table-status.monitoring,
.table-status.closed {
  background: #e6f5ea;
  color: var(--green);
}

/* ─── Cases compact list view ─────────────────────────────────────── */

.case-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.case-stats-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.case-stats-bar span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.case-stats-bar strong {
  color: var(--text);
  font-weight: 600;
}

.case-stat-danger {
  color: var(--red) !important;
}

.case-stat-danger strong {
  color: var(--red) !important;
}

.case-tabs {
  display: flex;
  gap: 4px;
}

.case-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.case-tab:hover {
  background: var(--hover);
  color: var(--text);
}

.case-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.case-tab-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.case-tab:not(.active) .case-tab-count {
  background: var(--line);
  color: var(--text);
}

.case-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.case-list-head,
.case-row {
  display: grid;
  grid-template-columns: 86px 130px minmax(0,1fr) 110px 70px 110px 36px;
  align-items: center;
  gap: 0;
}

.case-list-head {
  background: #f4f6f9;
  border-bottom: 1px solid var(--line);
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.case-list-head span,
.case-row > span,
.case-row > div {
  padding: 0 8px;
}

.case-row {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
  min-height: 44px;
}

.case-row:last-child {
  border-bottom: none;
}

.case-row:hover {
  background: var(--hover);
}

.case-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.case-row .score-pill {
  font-size: 11px;
  padding: 3px 9px;
  height: auto;
  min-width: 0;
  border-radius: 12px;
}

.case-row-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.case-row-title strong {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.case-row-title span {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 !important;
}

.case-due {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.case-due.overdue {
  color: var(--red);
  font-weight: 600;
}

.case-owner-cell {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-open-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.1s, color 0.1s;
  padding: 0;
  flex-shrink: 0;
}

.case-open-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────── */

.watchlist-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.watchlist-card:hover,
.watchlist-card:focus-visible {
  border-color: #8fb8e8;
  transform: translateY(-1px);
  box-shadow: 0 16px 44px rgba(24, 33, 43, 0.12);
  outline: none;
}

.watchlist-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.watchlist-head > div:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf7f8;
  color: var(--teal);
}

.watchlist-head strong {
  display: block;
  line-height: 1.3;
}

.watchlist-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.watchlist-count {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 800;
}

.watchlist-count::after {
  content: " matching clusters";
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}

.watchlist-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.watchlist-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  border-radius: 999px;
  background: #eef4fb;
  color: #344252;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.watchlist-stats svg {
  width: 14px;
  height: 14px;
}

.asset-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.asset-row strong {
  color: var(--text);
  font-size: 12px;
}

.watchlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.risk-model {
  display: grid;
  gap: 14px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.model-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow);
}

.guide-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow);
}

.guide-hero {
  grid-column: 1 / -1;
}

.guide-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 16px;
}

.guide-panel p {
  color: #4b5865;
  line-height: 1.5;
  margin-top: 8px;
}

.guide-panel code {
  border-radius: 6px;
  background: var(--panel-soft);
  padding: 2px 5px;
}

.guide-steps {
  margin: 12px 0 0;
  padding-left: 21px;
  color: #344252;
  line-height: 1.55;
}

.guide-steps li + li {
  margin-top: 5px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: .82rem;
  color: #344252;
}

.guide-table th,
.guide-table td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid #e2e8ef;
  vertical-align: top;
}

.guide-table thead th {
  font-weight: 600;
  color: #5a6a7a;
  background: #f6f8fa;
}

.guide-table tr:last-child td {
  border-bottom: none;
}

/* ── Feature 1: Remediation status chips ──────────────────────────────────── */

.chip.remediation-pending {
  background: #edf2f7;
  color: #344252;
}

.chip.remediation-in-progress {
  background: #eaf2ff;
  color: #174ea6;
}

.chip.remediation-deployed,
.chip.remediation-mitigated {
  background: #d4edda;
  color: #155724;
}

.chip.remediation-risk-accepted {
  background: #fff3cd;
  color: #856404;
}

/* ── Feature 2: SLA Overdue dashboard ────────────────────────────────────── */

.overdue-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.overdue-card {
  border: 2px solid #f5c6c6;
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.overdue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overdue-card h2 {
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.35;
}

.overdue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #526171;
  font-size: 12px;
  margin-bottom: 12px;
}

.overdue-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.overdue-counter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.overdue-days {
  font-size: 42px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
}

.overdue-days-label strong {
  display: block;
  font-size: 14px;
  color: #344252;
}

.overdue-days-label span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.overdue-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cve-description {
  margin: 10px 0 0;
  color: #344252;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Feature 3: Suppress modal and suppressed list ───────────────────────── */

.suppress-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 28, 0.6);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.suppress-modal {
  background: var(--panel);
  border-radius: 12px;
  padding: 24px;
  width: min(480px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.suppress-modal h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 17px;
}

.suppress-title {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.suppress-field {
  display: block;
  margin-bottom: 14px;
}

.suppress-field span {
  display: block;
  font-size: 12px;
  font-weight: 760;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.suppress-field textarea,
.suppress-field input,
.suppress-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel);
  color: var(--text);
  resize: vertical;
}

.suppress-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.suppressed-list {
  display: grid;
}

/* ── Feature 4: CVE lookup view ──────────────────────────────────────────── */

.cve-lookup-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cve-lookup-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: var(--shadow);
}

.cve-lookup-form h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 18px;
}

.cve-lookup-form p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}

.cve-lookup-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cve-lookup-input-row input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  font-family: monospace;
}

.cve-lookup-input-row input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.cve-lookup-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--red);
  font-size: 13px;
}

.cve-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow);
}

.cve-result-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.cve-result-header h2 {
  margin: 0;
  font-size: 22px;
  font-family: monospace;
}

.cve-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cve-result-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.cve-result-grid h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 760;
}

.cve-products {
  margin-top: 10px;
}

.cve-products strong {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cve-clusters {
  display: grid;
  gap: 4px;
}

.kev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #feeceb;
  color: var(--red);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
}


.guide-table code {
  font-size: .8rem;
  background: none;
  padding: 0;
}

.model-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.model-head > div:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--teal);
}

.model-head span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.threshold-grid,
.weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.threshold-grid > div,
.weight-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.policy-card.critical {
  background: #feeceb;
  color: var(--red);
}

.policy-card.high {
  background: #fff1df;
  color: #8a4a00;
}

.policy-card.medium {
  background: #eaf7f8;
  color: var(--teal);
}

.policy-card.info {
  background: #eef3f7;
  color: #344252;
}

.policy-card span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weight-card.major {
  border-color: #f0b9b3;
  background: #fff8f7;
}

.weight-card.reducing {
  border-color: #b9d9c1;
  background: #f5fbf7;
}

.score-simulator {
  display: grid;
  gap: 14px;
}

.simulator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.sim-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  cursor: pointer;
}

.sim-toggle strong {
  color: var(--teal);
}

.score-output {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: #101923;
  color: #d7e4ef;
  padding: 12px;
}

.score-output span {
  color: #9fb0bf;
  font-size: 12px;
  text-transform: uppercase;
}

.score-output strong {
  font-size: 30px;
}

.score-output em {
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 10px;
  font-style: normal;
  font-weight: 800;
}

.score-output em.critical { background: var(--red); color: #fff; }
.score-output em.high { background: var(--amber); color: #fff; }
.score-output em.medium { background: var(--teal); color: #fff; }
.score-output em.low { background: var(--muted); color: #fff; }

.workflow-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workflow-map div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.workflow-map strong {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
}

.workflow-map span {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-weight: 800;
}

.workflow-map p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.threshold-grid span,
.weight-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.threshold-grid strong,
.weight-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  padding: 24px;
  text-align: center;
}

.load-more-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  text-align: center;
}

.btn-error {
  background: #fdecea !important;
  color: #c0392b !important;
  border-color: #c0392b !important;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .brand {
    padding: 0 2px 9px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand span {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 2px 4px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .nav-section {
    display: none;
  }

  .nav-item {
    flex: 0 0 104px;
    min-height: 72px;
    grid-template-columns: 1fr;
    grid-template-rows: 28px minmax(24px, auto);
    place-items: center;
    gap: 5px;
    padding: 8px 6px;
    text-align: center;
    scroll-snap-align: start;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px 0 #5bc7d6;
  }

  .nav-item .icon {
    width: 30px;
    height: 30px;
  }

  .nav-copy strong {
    font-size: 11px;
    line-height: 1.15;
  }

  .nav-copy small {
    display: none;
  }

  .nav-count {
    position: absolute;
    top: 5px;
    right: 6px;
    min-width: 22px;
    min-height: 20px;
    font-size: 10px;
  }

  .source-health {
    display: none;
  }

  .metric-grid,
  .filters,
  .view-brief,
  .coverage-grid,
  .coverage-columns,
  .workflow-map,
  .search-results-grid,
  .digest-split,
  .case-drawer-grid,
  .wizard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .delta-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .delta-item {
    grid-template-columns: 70px minmax(0, 1fr) auto;
  }

  .brief-action {
    border-left: 0;
    padding-left: 0;
  }

  .field-search {
    grid-column: span 2;
  }

  .watchlist-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .case-board,
  .event-grid,
  .detail-groups,
  .detail-grid,
  .sla-grid,
  .event-stats {
    grid-template-columns: 1fr;
  }

  .case-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .case-tabs {
    flex-wrap: wrap;
  }

  /* Collapse SLA + Owner columns on tablet */
  .case-list-head,
  .case-row {
    grid-template-columns: 80px 110px minmax(0,1fr) 90px 36px;
  }

  .case-list-head span:nth-child(5),
  .case-list-head span:nth-child(6),
  .case-row .case-due,
  .case-row .case-owner-cell {
    display: none;
  }

  .result-line {
    display: grid;
  }

  .active-filters {
    text-align: left;
  }

  .card-head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title score"
      "actions actions";
    align-items: start;
  }

  .card-title {
    grid-area: title;
    font-size: 16px;
    line-height: 1.3;
  }

  .score-pill {
    grid-area: score;
    min-width: 92px;
    height: 28px;
    font-size: 11px;
  }

  .card-actions {
    grid-area: actions;
    width: 100%;
    min-width: 0;
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .open-link,
  .mini-btn {
    min-width: 0;
    justify-content: center;
    padding: 0 8px;
  }

  .open-link span,
  .mini-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 620px) {
  .workspace {
    padding: 12px;
  }

  .topbar {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  h1 {
    font-size: 22px;
  }

  .topbar p {
    font-size: 13px;
    line-height: 1.35;
  }

  .topbar-actions,
  .filter-head,
  .filter-actions {
    display: grid;
  }

  .topbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .refresh-status {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .metric-grid,
  .filters,
  .view-brief,
  .coverage-grid,
  .coverage-columns,
  .workflow-map,
  .search-results-grid,
  .digest-split,
  .case-drawer-grid,
  .wizard-grid {
    grid-template-columns: 1fr;
  }

  .delta-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heatmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delta-bar-row {
    grid-template-columns: 1fr 64px;
    gap: 6px 10px;
  }

  .delta-bar-row > i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .delta-bar-row em {
    text-align: left;
  }

  .why-now-head,
  .trend-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .delta-intro {
    display: grid;
  }

  .delta-intro-metrics {
    justify-content: flex-start;
  }

  .delta-item {
    grid-template-columns: 60px minmax(0, 1fr) auto;
    padding: 9px 12px;
  }

  .delta-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .delta-search {
    min-width: 120px;
    max-width: 100%;
  }

  .sidebar {
    padding: 8px 8px 9px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .nav-item {
    flex-basis: 86px;
    min-height: 66px;
  }

  .nav-copy strong {
    font-size: 10px;
  }

  .sources-table {
    min-width: 900px;
  }

  /* On small screens show title+status only */
  .case-list-head,
  .case-row {
    grid-template-columns: minmax(0,1fr) 36px;
  }

  .case-list-head span:not(:first-child):not(:last-child),
  .case-row .score-pill,
  .case-row .table-status,
  .case-row .chip,
  .case-row .case-due,
  .case-row .case-owner-cell {
    display: none;
  }

  .case-drawer {
    inset: 0;
    width: 100vw;
    border-left: 0;
    padding-bottom: 84px;
  }

  .global-search-row,
  .delta-toolbar,
  .source-tune-actions,
  .case-drawer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .triage-wizard {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 14px;
  }

  .field-search {
    grid-column: auto;
  }

  .card-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "score"
      "title"
      "actions";
    gap: 8px;
  }

  .card-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .score-pill {
    width: fit-content;
    max-width: 100%;
  }

  .card-title {
    font-size: 15px;
    line-height: 1.28;
    max-height: none;
  }

  .summary {
    -webkit-line-clamp: 4;
    font-size: 13px;
    line-height: 1.45;
  }

  .meta-row,
  .chip-row {
    gap: 5px;
  }

  .chip,
  .detail-token {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .filter-panel {
    padding: 10px;
  }

  .filter-head {
    height: auto;
    gap: 8px;
  }

  .filter-head > div:first-child span {
    font-size: 12px;
  }

  .filters {
    gap: 8px;
  }

  .field select,
  .search-box {
    min-height: 38px;
  }

  .quickbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .quickbar > span {
    flex: 0 0 auto;
  }

  .quick-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .view-brief {
    padding: 10px;
  }

  .brief-icon {
    width: 38px;
    height: 38px;
  }

  .brief-stats {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 66px;
    padding: 10px;
  }

  .metric strong {
    font-size: 22px;
  }

  .intel-card,
  .case-card,
  .event-card,
  .watchlist-card,
  .coverage-panel,
  .digest-panel,
  .global-search-panel,
  .search-result-panel {
    padding: 11px;
  }

  .digest-row {
    grid-template-columns: 1fr;
  }

  .delta-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delta-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .delta-item .score-pill {
    display: none;
  }

  .score-output {
    display: grid;
  }

  .score-output em {
    margin-left: 0;
    width: fit-content;
  }

  .detail-row {
    display: grid;
  }

  .backlog-row {
    grid-template-columns: 1fr;
  }

  .backlog-row em {
    justify-self: start;
  }

  .detail-row strong {
    flex: initial;
  }
}
