/* =================================================================
   THREATBRIEF — Daily Cyber Threat Intelligence Brief
   SOC command-console aesthetic: stenciled intelligence-briefing
   typography, terminal monospace data, near-black surface layers.
   ================================================================= */

:root {
  /* Surfaces */
  --bg-base:        #0A0D12;
  --bg-elev-1:      #0F141B;
  --bg-elev-2:      #11161D;
  --bg-elev-3:      #161D26;
  --border-subtle:  #1B2430;
  --border-strong:  #283341;

  /* Text */
  --text-primary:   #E5E7EB;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;
  --text-faint:     #475569;

  /* Threat severity scale */
  --sev-critical:   #FF3D5A;
  --sev-high:       #FF8A3D;
  --sev-elevated:   #FFB23F;
  --sev-guarded:    #FFE45C;
  --sev-normal:     #00D9A3;
  --sev-info:       #5BC0EB;

  /* Misc */
  --signal-pulse:   #FF3D5A;
  --link:           #5BC0EB;

  /* Geometry */
  --rad-xs: 2px;
  --rad-sm: 4px;
  --rad-md: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle CRT/scan-line + grid texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background:
    repeating-linear-gradient(0deg,
      transparent 0,
      transparent 2px,
      rgba(255,255,255,0.012) 2px,
      rgba(255,255,255,0.012) 3px),
    radial-gradient(ellipse at center,
      transparent 50%,
      rgba(0,0,0,0.35) 100%);
  mix-blend-mode: overlay;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(91, 192, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 192, 235, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-elev-1); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3D4A5F; }

/* =================================================================
   LAYOUT
   ================================================================= */

.shell { max-width: 1680px; margin: 0 auto; padding: 24px; }

/* =================================================================
   HEADER / CLASSIFIED BANNER
   ================================================================= */

.classification-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--sev-critical);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
  border-radius: var(--rad-xs);
  position: relative;
  overflow: hidden;
}
.classification-bar::before, .classification-bar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; width: 60px;
  background: repeating-linear-gradient(45deg,
    rgba(0,0,0,0.4) 0, rgba(0,0,0,0.4) 8px,
    transparent 8px, transparent 16px);
}
.classification-bar::before { left: 0; }
.classification-bar::after { right: 0; }
.classification-bar span { position: relative; z-index: 1; }

header.brand {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-mark {
  font-family: 'Saira Stencil One', cursive;
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow: 0 0 30px rgba(229, 231, 235, 0.08);
}
.brand-mark .accent {
  color: var(--sev-critical);
  text-shadow: 0 0 20px rgba(255, 61, 90, 0.4);
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.brand-meta strong { color: var(--text-primary); font-weight: 600; }

.brand-status {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.brand-status .timestamp {
  font-size: 28px;
  color: var(--text-primary);
  letter-spacing: 0;
  font-weight: 600;
  text-transform: none;
  margin-bottom: 4px;
}

/* Live pulse */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--signal-pulse);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 12px var(--signal-pulse);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* =================================================================
   GLOBAL THREAT-LEVEL HEADER STRIP
   ================================================================= */

.global-strip {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 16px;
  margin-bottom: 24px;
}

.global-level {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--rad-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.global-level::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--sev-critical), var(--sev-elevated));
}
.global-level .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.global-level .reading {
  font-family: 'Saira Stencil One', cursive;
  font-size: 56px;
  line-height: 1;
  color: var(--sev-high);
  text-shadow: 0 0 30px rgba(255, 138, 61, 0.3);
}
.global-level .reading.crit { color: var(--sev-critical); text-shadow: 0 0 30px rgba(255, 61, 90, 0.4); }
.global-level .description {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 28ch;
}
.global-level .gauge {
  margin-top: 16px;
  height: 6px;
  background: var(--bg-elev-3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.global-level .gauge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    var(--sev-normal) 0%,
    var(--sev-guarded) 30%,
    var(--sev-elevated) 55%,
    var(--sev-high) 75%,
    var(--sev-critical) 95%);
  opacity: 0.3;
}
.global-level .gauge-marker {
  position: absolute;
  top: -3px;
  width: 2px; height: 12px;
  background: var(--text-primary);
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  transition: left 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

/* KPI tiles */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--rad-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color 0.2s ease;
}
.kpi:hover { border-color: var(--border-strong); }
.kpi-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.kpi-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.kpi-delta.up { color: var(--sev-critical); }
.kpi-delta.down { color: var(--sev-normal); }

/* =================================================================
   GLOBAL THREAT MAP (Leaflet heatmap)
   ================================================================= */

.map-card {
  margin-bottom: 16px;
}
.map-shell {
  position: relative;
  height: 460px;
  background: #060912;
  border-radius: 0 0 var(--rad-md) var(--rad-md);
  overflow: hidden;
}
#threat-map {
  position: absolute;
  inset: 0;
  background: #060912;
}
/* Force Leaflet panes to fit the SOC palette */
#threat-map .leaflet-container {
  background: #060912;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}
#threat-map .leaflet-tile {
  filter: invert(0.92) hue-rotate(180deg) saturate(0.45) brightness(0.78) contrast(1.05);
}
#threat-map .leaflet-control-attribution {
  background: rgba(10,13,18,0.78);
  color: var(--text-muted);
  font-size: 10px;
  border-top-left-radius: 4px;
}
#threat-map .leaflet-control-attribution a { color: var(--link); }
#threat-map .leaflet-control-zoom a {
  background: var(--bg-elev-2);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
#threat-map .leaflet-control-zoom a:hover { background: var(--bg-elev-3); }
.country-marker {
  background: transparent;
  border: none;
}
.country-marker .ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid currentColor;
  box-shadow: 0 0 12px currentColor, inset 0 0 6px currentColor;
  opacity: 0.92;
  transition: transform 0.15s ease;
}
.country-marker:hover .ring { transform: scale(1.3); }
.threat-popup .leaflet-popup-content-wrapper {
  background: var(--bg-elev-2);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--rad-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.threat-popup .leaflet-popup-tip { background: var(--bg-elev-2); border: 1px solid var(--border-strong); }
.threat-popup .leaflet-popup-content {
  margin: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.55;
  min-width: 200px;
}
.threat-popup .pop-name {
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.threat-popup .pop-row {
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.threat-popup .pop-row b { color: var(--text-primary); }
.threat-popup .pop-actors {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 6px;
}
.map-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 500;
  background: rgba(10,13,18,0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--rad-sm);
  padding: 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
.map-legend .legend-title { color: var(--text-primary); font-weight: 600; margin-bottom: 4px; }
.map-legend .legend-row { display: flex; align-items: center; gap: 6px; }
.map-legend .swatch { width: 10px; height: 10px; border-radius: 50%; }
.map-source-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 500;
  background: rgba(10,13,18,0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--rad-sm);
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.map-source-badge .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sev-normal); margin-right: 6px; box-shadow: 0 0 6px var(--sev-normal); }
.map-source-badge.is-direct .dot { background: var(--sev-elevated); box-shadow: 0 0 6px var(--sev-elevated); }

/* =================================================================
   MAIN GRID
   ================================================================= */

.main-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--rad-md);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elev-2);
  border-radius: var(--rad-md) var(--rad-md) 0 0;
}
.card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: '';
  width: 4px; height: 14px;
  background: var(--sev-info);
  border-radius: 1px;
}
.card-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* =================================================================
   COUNTRY THREAT TABLE
   ================================================================= */

.country-table-wrap {
  padding: 0;
  max-height: 720px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.country-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.country-table thead {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-elev-2);
}
.country-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  cursor: pointer;
}
.country-table th:hover { color: var(--text-primary); }
.country-table th.sort-active { color: var(--sev-info); }
.country-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.country-table tr { transition: background 0.15s ease; }
.country-table tbody tr:hover { background: var(--bg-elev-2); }
.country-table .flag {
  display: inline-block;
  width: 20px; text-align: center;
  margin-right: 8px;
  font-size: 14px;
  vertical-align: middle;
}
.country-table .country-name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
}
.country-table .iso {
  color: var(--text-muted);
  font-size: 10px;
  margin-left: 6px;
}

.score-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}
.score-num {
  font-weight: 600;
  width: 32px;
  text-align: right;
}
.score-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-elev-3);
  border-radius: 2px;
  overflow: hidden;
}
.score-bar > span {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

.sev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--rad-xs);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid;
  white-space: nowrap;
}
.sev-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.sev-critical { color: var(--sev-critical); border-color: rgba(255,61,90,0.4); background: rgba(255,61,90,0.08); }
.sev-high     { color: var(--sev-high);     border-color: rgba(255,138,61,0.4); background: rgba(255,138,61,0.08); }
.sev-elevated { color: var(--sev-elevated); border-color: rgba(255,178,63,0.4); background: rgba(255,178,63,0.08); }
.sev-guarded  { color: var(--sev-guarded);  border-color: rgba(255,228,92,0.35); background: rgba(255,228,92,0.06); }
.sev-normal   { color: var(--sev-normal);   border-color: rgba(0,217,163,0.35); background: rgba(0,217,163,0.06); }

.country-table .threats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.threat-chip {
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--rad-xs);
  background: var(--bg-elev-3);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-weight: 500;
}

/* Filter row */
.country-filters {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elev-2);
  flex-wrap: wrap;
}
.filter-input {
  background: var(--bg-elev-3);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--rad-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 200px;
}
.filter-input:focus { border-color: var(--sev-info); }
.filter-pill {
  background: var(--bg-elev-3);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--rad-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-pill:hover { color: var(--text-primary); border-color: var(--border-strong); }
.filter-pill.active {
  background: var(--bg-elev-3);
  border-color: var(--sev-info);
  color: var(--sev-info);
}

/* =================================================================
   SIDE COLUMN (advisory feed + KEV digest)
   ================================================================= */

.side-stack { display: flex; flex-direction: column; gap: 16px; min-height: 0; }

.feed {
  padding: 0;
  overflow-y: auto;
  max-height: 340px;
  -webkit-overflow-scrolling: touch;
}
.feed-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  transition: background 0.15s ease;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.feed-item:hover { background: var(--bg-elev-2); }
.feed-item:last-child { border-bottom: 0; }
.feed-item:focus-visible { outline: 2px solid var(--sev-info); outline-offset: -2px; }
a.feed-item, a.feed-item:visited { color: inherit; }
.feed-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 1px;
}
.feed-title {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 4px;
}
.feed-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* =================================================================
   DATA SOURCE STATUS PANEL
   ================================================================= */

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
}
.source-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--rad-sm);
  padding: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  position: relative;
}
.source-card .source-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 11px;
}
.source-card .source-desc {
  color: var(--text-muted);
  font-size: 10px;
  font-family: 'Inter Tight', sans-serif;
  line-height: 1.4;
}
.source-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-live    { background: var(--sev-normal); box-shadow: 0 0 8px var(--sev-normal); }
.status-degrade { background: var(--sev-elevated); box-shadow: 0 0 6px var(--sev-elevated); }
.status-offline { background: var(--sev-critical); }
.status-keyed   { background: var(--text-muted); }

/* =================================================================
   THREAT ACTOR / VENDOR STATS
   ================================================================= */

.vendor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.bar-list {
  padding: 12px 18px 18px;
}
.bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 32px;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.bar-row .name { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .count { text-align: right; color: var(--text-secondary); }
.bar-row .bar {
  height: 6px;
  background: var(--bg-elev-3);
  border-radius: 3px;
  overflow: hidden;
}
.bar-row .bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sev-info), var(--sev-elevated));
  border-radius: 3px;
}

/* =================================================================
   FOOTER
   ================================================================= */

footer.brief-foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
footer a { color: var(--text-secondary); text-decoration: none; border-bottom: 1px dotted var(--text-faint); }
footer a:hover { color: var(--sev-info); border-color: var(--sev-info); }

/* =================================================================
   RESPONSIVE
   ================================================================= */

@media (max-width: 1280px) {
  .main-grid { grid-template-columns: 1fr; }
  .vendor-grid { grid-template-columns: 1fr; }
  .global-strip { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .shell { padding: 14px; }
  .brand-mark { font-size: 40px; }
  .brand-status .timestamp { font-size: 20px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .country-table th:nth-child(4),
  .country-table td:nth-child(4) { display: none; } /* hide threats column */
  header.brand { grid-template-columns: 1fr; }
  .brand-status { text-align: left; }
  /* Let the classification banner wrap so the brief id stays visible
     instead of being clipped by the bar's overflow:hidden. */
  .classification-bar { flex-wrap: wrap; row-gap: 2px; letter-spacing: 0.1em; }
}
@media (max-width: 480px) {
  .classification-bar { font-size: 9px; letter-spacing: 0.06em; padding: 6px 12px; }
  .classification-bar::before, .classification-bar::after { width: 32px; }
}

/* Loader skeleton */
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--bg-elev-2), var(--bg-elev-3), var(--bg-elev-2));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 2px;
  height: 1em; min-width: 4ch;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Refresh button */
.refresh-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: var(--rad-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.refresh-btn:hover { color: var(--text-primary); border-color: var(--sev-info); }
.refresh-btn:active { transform: translateY(1px); }
.refresh-btn.spinning::before {
  content: '↻';
  display: inline-block;
  margin-right: 6px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =================================================================
   UTILITY CLASSES — replacements for former inline `style=` attrs.
   These exist so the dashboard's CSP can be `style-src 'self'` only,
   with no `'unsafe-inline'`. Dynamic widths set via CSSOM in app.js.
   ================================================================= */

/* Spacing utilities */
.mt-6  { margin-top: 6px;  }
.mt-8  { margin-top: 8px;  }
.mt-12 { margin-top: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-right { text-align: right; }

/* Skeleton placeholder widths */
.skel-w3  { width: 3ch; }
.skel-w4  { width: 4ch; }
.skel-w5  { width: 5ch; }
.skel-w10 { width: 10ch; }
.skel-w26 { width: 26ch; }
.skel-w28 { width: 28ch; }
.skel-w30 { width: 30ch; }
.skel-w32 { width: 32ch; }

/* KEV feed container max-height (was inline) */
.feed-kev { max-height: 320px; }

/* Severity color mappings, applied as classes on rings/swatches/text. */
.sev-critical  { color: var(--sev-critical);  }
.sev-high      { color: var(--sev-high);      }
.sev-elevated  { color: var(--sev-elevated);  }
.sev-guarded   { color: var(--sev-guarded);   }
.sev-normal    { color: var(--sev-normal);    }
.text-faint-em { color: var(--text-faint); font-weight: 400; }

/* Legend swatches: solid fill + matching glow per severity. */
.swatch.sev-critical { background: var(--sev-critical); box-shadow: 0 0 6px var(--sev-critical); }
.swatch.sev-high     { background: var(--sev-high);     box-shadow: 0 0 6px var(--sev-high);     }
.swatch.sev-elevated { background: var(--sev-elevated); box-shadow: 0 0 6px var(--sev-elevated); }
.swatch.sev-guarded  { background: var(--sev-guarded);  box-shadow: 0 0 6px var(--sev-guarded);  }
.swatch.sev-normal   { background: var(--sev-normal);   box-shadow: 0 0 6px var(--sev-normal);   }

/* Score-bar fills: width set via CSSOM (--w custom property) and color via class. */
.score-bar > span { width: var(--w, 0%); display: block; height: 100%; border-radius: inherit; }
.score-bar > span.sev-critical { background: var(--sev-critical); }
.score-bar > span.sev-high     { background: var(--sev-high);     }
.score-bar > span.sev-elevated { background: var(--sev-elevated); }
.score-bar > span.sev-guarded  { background: var(--sev-guarded);  }
.score-bar > span.sev-normal   { background: var(--sev-normal);   }

/* Vendor / actor bar fills — width via CSSOM. */
.bar > span                { width: var(--w, 0%); }
.bar > span.bar-actor      { background: linear-gradient(90deg, var(--sev-critical), var(--sev-elevated)); }

/* Country marker rings — color set by severity class on the ring div. */
.ring.sev-critical { color: var(--sev-critical); }
.ring.sev-high     { color: var(--sev-high);     }
.ring.sev-elevated { color: var(--sev-elevated); }
.ring.sev-guarded  { color: var(--sev-guarded);  }
.ring.sev-normal   { color: var(--sev-normal);   }

/* CVE id display */
.cve-id { font-family: 'JetBrains Mono', monospace; color: var(--sev-info); }

/* Initial gauge marker position (overridden by CSSOM at runtime). */
.gauge-marker { left: 50%; }

/* Brand-meta proxy badge color (was inline span style). */
.proxy-badge { color: var(--sev-normal); }

/* =================================================================
   US DoS Live Travel Threats — dedicated section
   ================================================================= */
.dos-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px 0;
}
.dos-threats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  max-height: 560px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dos-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
}
.dos-empty code {
  padding: 1px 6px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--sev-info);
}
.dos-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-left-width: 3px;
  border-radius: 4px;
  background: var(--bg-elev-2);
}
.dos-row.sev-critical { border-left-color: var(--sev-critical); }
.dos-row.sev-high     { border-left-color: var(--sev-high);     }
.dos-row.sev-elevated { border-left-color: var(--sev-elevated); }
.dos-row.sev-normal   { border-left-color: var(--sev-normal);   }
.dos-badge {
  align-self: start;
  font-family: 'Saira Stencil One', monospace;
  font-size: 22px;
  text-align: center;
  padding: 8px 0;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  letter-spacing: 1px;
}
.dos-badge.sev-critical { color: var(--sev-critical); }
.dos-badge.sev-high     { color: var(--sev-high);     }
.dos-badge.sev-elevated { color: var(--sev-elevated); }
.dos-badge.sev-normal   { color: var(--sev-normal);   }
.dos-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.dos-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.dos-country {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.dos-headline {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}
.dos-excerpt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dos-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-top: 4px;
}
.dos-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.dos-link {
  color: var(--sev-info);
  text-decoration: none;
  border-bottom: 1px dotted var(--sev-info);
  transition: color 120ms ease, border-color 120ms ease;
}
.dos-link:hover {
  color: var(--sev-elevated);
  border-bottom-color: var(--sev-elevated);
}
.dos-when {
  margin-left: auto;
  color: var(--text-faint);
}
