/* Monitor Global de Antisemitismo — design system
   Dark newsroom aesthetic, serif body copy, tight tables, mobile-first. */

:root {
  --bg:        #0a0e14;
  --bg-raise: #10161f;
  --bg-card:  #141b26;
  --border:   #1e2835;
  --text:     #e5e9f0;
  --text-dim: #9ca9bb;
  --text-faint:#5d6b82;
  --accent:   #f5b842;   /* amber — mark / primary */
  --link:     #6ab7ff;
  --critical: #ff4466;
  --high:     #ff8c42;
  --medium:   #e8b83c;
  --low:      #6b7fa3;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: Georgia, 'Times New Roman', 'Source Serif Pro', serif;
  --font-mono: 'SF Mono', Menlo, Consolas, monospace;

  --radius: 4px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ===================== HEADER ===================== */
.site-header {
  background: var(--bg-raise);
  padding: 56px 0 0;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-serif);
}
.brand-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
}
.brand-sub {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.intro-lede {
  padding: 32px 0 0;
}
.intro-lede .container {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.intro-lede-body {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.header-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-link {
  color: var(--text-dim);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius);
}
.nav-link:hover { color: var(--text); background: var(--bg-card); text-decoration: none; }
.nav-primary {
  background: var(--accent);
  color: #0a0e14 !important;
  font-weight: 600;
}
.nav-primary:hover { background: #ffcc66; text-decoration: none; }
.lang-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 5px 9px;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.05em;
}
.lang-toggle:hover { color: var(--text); border-color: var(--text-dim); }

/* ===================== WORKSPACE (2-col main area) ===================== */
.workspace { padding: 28px 0 48px; }
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
/* Both columns in the workspace grid share the same vertical envelope so
   Recent Incidents (left) and LIVE feed (right) look balanced. Each column
   flexes internally: head stays put, list fills remaining space and
   scrolls. */
.workspace-grid > .timeline,
.workspace-grid > .live {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
  min-height: 520px;
  height: calc(100vh - 180px);
}
.workspace-grid > .timeline > .incident-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.workspace-grid > .timeline > .incident-list::-webkit-scrollbar { width: 6px; }
.workspace-grid > .timeline > .incident-list::-webkit-scrollbar-track { background: transparent; }
.workspace-grid > .timeline > .incident-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.workspace-grid > .timeline > .timeline-status { flex: 0 0 auto; }

@media (max-width: 980px) {
  .workspace-grid { grid-template-columns: 1fr; gap: 20px; }
  .workspace-grid > .timeline,
  .workspace-grid > .live {
    max-height: 70vh;
    min-height: 420px;
    height: auto;
  }
}

/* ===================== LIVE FEED ===================== */
/* Streaming scanner view — items drip in one at a time. Antisemitism
   matches highlighted red; they also propagate to the Incidents timeline
   on the left. Matches .timeline column height exactly so both panels
   look balanced. */
.live {
  padding: 0;
  background: transparent;
}
.workspace-grid > .live > .live-head { flex: 0 0 auto; }
.workspace-grid > .live > .live-lead { flex: 0 0 auto; }
.live-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 6px;
  gap: 12px; flex-wrap: wrap;
}
.live-head h2 {
  margin: 0;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--critical);
  box-shadow: 0 0 0 0 rgba(255, 68, 102, 0.6);
  animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 68, 102, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 68, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 68, 102, 0); }
}
.live-meta {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.live-lead {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 13px;
  max-width: 70ch;
  line-height: 1.5;
}
.live-lead em {
  color: var(--critical);
  font-style: normal;
  font-weight: 600;
}
.live-stream {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* In the 2-col workspace grid, .live-stream fills remaining space in its
     fixed-height column so it matches the incidents list on the left.
     Fallback (when not inside .workspace-grid, e.g. /matches page) uses
     explicit max-height. */
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
@media (max-width: 980px) {
  .live-stream { max-height: 380px; }
}
.live-stream::-webkit-scrollbar { width: 6px; }
.live-stream::-webkit-scrollbar-track { background: transparent; }
.live-stream::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.live-item {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  padding: 7px 10px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  display: flex; align-items: flex-start; gap: 10px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.15s ease;
  /* anchor styling override */
  text-decoration: none;
}
.live-item:hover {
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
.live-item.in { opacity: 1; transform: translateY(0); }
.live-item.matched {
  background: rgba(255, 68, 102, 0.07);
  border-left-color: var(--critical);
  color: var(--text);
}
.live-item.matched:hover {
  background: rgba(255, 68, 102, 0.14);
}
.live-item .li-lang {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 20px;
}
.live-item .li-src {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.live-item.matched .li-src {
  background: rgba(255, 68, 102, 0.15);
  color: var(--critical);
}
.live-item .li-text {
  flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.live-item.matched .li-text { font-weight: 500; }
.live-item .li-tag {
  flex: 0 0 auto;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--critical);
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid var(--critical);
  border-radius: 2px;
}
.live-empty {
  color: var(--text-faint);
  font-size: 14px;
  text-align: center;
  padding: 20px 0;
}

/* ===================== CONTINENTAL INDEX ===================== */
.continental-index {
  padding: 22px 0 0;
}
.continental-index .container {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.cidx-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  margin-top: 10px;
}
@media (max-width: 980px) {
  .cidx-bars { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
  .cidx-bars { grid-template-columns: repeat(2, 1fr); }
}
.cidx-cell {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cidx-cell:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(245, 184, 66, 0.04);
}
.cidx-cell.selected {
  border-color: var(--accent);
  background: rgba(245, 184, 66, 0.1);
}
.cidx-cell:disabled,
.cidx-cell.empty {
  cursor: default;
  opacity: 0.55;
}
.cidx-label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.35;
  min-height: 30px;
}
.cidx-score {
  display: flex; align-items: baseline; gap: 4px;
  margin-top: 8px;
}
.cidx-num {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.cidx-band {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.cidx-bar-track {
  margin-top: 8px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.cidx-bar-fill {
  height: 100%;
  background: var(--text-faint);
  border-radius: 2px;
  transition: width 0.4s ease;
}
/* Per-band colors. Apply to both the score number and the bar fill. */
.cidx-cell.calm     .cidx-num,
.cidx-cell.calm     .cidx-band   { color: var(--text-faint); }
.cidx-cell.calm     .cidx-bar-fill { background: var(--text-faint); }
.cidx-cell.low      .cidx-num,
.cidx-cell.low      .cidx-band   { color: #4ade80; }
.cidx-cell.low      .cidx-bar-fill { background: #4ade80; }
.cidx-cell.moderate .cidx-num,
.cidx-cell.moderate .cidx-band   { color: #f5b842; }
.cidx-cell.moderate .cidx-bar-fill { background: #f5b842; }
.cidx-cell.elevated .cidx-num,
.cidx-cell.elevated .cidx-band   { color: #fb923c; }
.cidx-cell.elevated .cidx-bar-fill { background: #fb923c; }
.cidx-cell.critical .cidx-num,
.cidx-cell.critical .cidx-band   { color: #ef4444; }
.cidx-cell.critical .cidx-bar-fill { background: #ef4444; }
.cidx-sub {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.cidx-footer {
  margin-top: 22px;
  text-align: right;
}
.cidx-embed-link {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.cidx-embed-link:hover { color: var(--accent); }
.cidx-method-link {
  color: var(--accent) !important;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.cidx-method-link:hover { opacity: 0.75; text-decoration: underline; }

/* ===================== WATCHLIST ===================== */
.watchlist {
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border);
}
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.wl-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: left;
  display: flex; flex-direction: column; gap: 6px;
  font: inherit;
  color: inherit;
}
.wl-cell:hover {
  border-color: var(--accent);
  background: rgba(245, 184, 66, 0.04);
}
.wl-cell.selected {
  border-color: var(--accent);
  background: rgba(245, 184, 66, 0.1);
}
.wl-cell.dim { opacity: 0.45; }
.wl-cell.dim:hover { opacity: 0.8; }
.wl-head {
  display: flex; align-items: baseline; gap: 6px;
}
.wl-flag { font-size: 16px; line-height: 1; }
.wl-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}
.wl-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}
.wl-cell.dim .wl-count { color: var(--text-faint); }
.wl-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.wl-bar-fill {
  height: 100%;
  background: var(--medium);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.wl-bar-fill.hot { background: var(--critical); }
.wl-bar-fill.warn { background: var(--high); }

/* ===================== COUNTRY STRIP (legacy, keeping selectors for .section-head) ===================== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px; flex-wrap: wrap;
}
.section-head h2 {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.section-hint {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.section-head-right {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.placeholder {
  color: var(--text-faint);
  font-size: 13px;
  padding: 18px 0;
  text-align: center;
  grid-column: 1 / -1;
}

/* ===================== FILTERS ===================== */
.filters {
  padding: 0;
}
.filters .container {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raise);
  position: sticky;
  top: 0;
  z-index: 10;
}
.filter-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.filter { display: flex; flex-direction: column; gap: 4px; }
.filter-lbl {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 11px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  min-width: 140px;
}

/* ===================== HINT / TOOLTIP ===================== */
.hint-wrap {
  position: relative;
  display: inline-block;
  line-height: 1;
}
.hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--text-faint);
  color: var(--text-faint);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  cursor: help;
  font-family: var(--font-mono);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.hint-wrap:hover .hint-icon,
.hint-wrap:focus-within .hint-icon {
  border-color: var(--accent);
  color: var(--accent);
}
.hint-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  padding: 12px 14px;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: normal;
  z-index: 40;
  display: none;
  pointer-events: none;
}
.hint-tooltip strong {
  color: var(--text);
  font-weight: 700;
}
.hint-tooltip .hint-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 8px;
  padding: 4px 0;
}
.hint-tooltip .hint-row b {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 2px;
}
.hint-row.crit b { color: var(--critical); }
.hint-row.high b { color: var(--high); }
.hint-row.med  b { color: var(--medium); }
.hint-row.low  b { color: var(--low); }
.hint-wrap:hover .hint-tooltip,
.hint-wrap:focus-within .hint-tooltip {
  display: block;
}
.hint-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}
.filter select:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.filter-clear {
  margin-left: auto;
  align-self: flex-end;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
}
.filter-clear:hover { color: var(--text); border-color: var(--text-dim); }
.filter-active {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ===================== TIMELINE ===================== */
.timeline { padding: 0; }
.section-title {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.timeline-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px;
  flex: 0 0 auto;
}
.hint-tooltip-wide { width: 340px; }
.hint-tooltip .hint-p {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
}
.hint-tooltip .hint-p:first-of-type { margin-top: 8px; }
.hint-tooltip a {
  color: var(--accent);
  font-weight: 600;
  pointer-events: auto;
}
.hint-wrap:hover .hint-tooltip,
.hint-wrap:focus-within .hint-tooltip { pointer-events: auto; }
.incident-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; flex-direction: column;
  gap: 14px;
}
.incident {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--low);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.incident.critical { border-left-color: var(--critical); }
.incident.high     { border-left-color: var(--high); }
.incident.medium   { border-left-color: var(--medium); }
.incident.low      { border-left-color: var(--low); }

.incident-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.inc-flag { font-size: 16px; }
.inc-country {
  font-weight: 700;
  color: var(--text);
}
.inc-type {
  text-transform: uppercase;
  color: var(--text-dim);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 2px;
  background: rgba(255,255,255,0.04);
  letter-spacing: 0.08em;
}
.inc-severity {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.inc-severity.critical { color: var(--critical); }
.inc-severity.high     { color: var(--high); }
.inc-severity.medium   { color: var(--medium); }
.inc-severity.low      { color: var(--low); }
.inc-when { color: var(--text-faint); }
.inc-method { color: var(--text-faint); }
.inc-verified {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.inc-trusted {
  color: #8be1f2;
  background: rgba(139, 225, 242, 0.10);
  border: 1px solid rgba(139, 225, 242, 0.30);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}
.filter-verified {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  cursor: pointer;
  margin-left: 12px;
}
.filter-verified input[type=checkbox] {
  accent-color: #4ade80;
  margin: 0;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.filter-verified .filter-lbl {
  margin: 0;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
}

/* Language toggle (used on subpages; home has its own button) */
.lang-toggle-link {
  font-size: 11px;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.lang-toggle-link:hover { color: var(--text); background: var(--bg-elev); }

.cidx-explain {
  margin: 4px 0 6px;
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.cidx-explain-read {
  margin: 0 0 14px;
  line-height: 1.5;
  color: var(--text-dim);
}
.cidx-explain-read strong {
  color: var(--text);
  font-weight: 600;
}
/* ===================== ALERTS STRIP ===================== */
.alerts-strip {
  background: linear-gradient(90deg, rgba(239,68,68,0.06), rgba(239,68,68,0.02));
  border-bottom: 1px solid rgba(239,68,68,0.28);
  padding: 12px 0;
}
.alerts-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.alerts-head strong { color: var(--text); letter-spacing: 0.05em; }
.alerts-hint { font-family: var(--font-mono); color: var(--text-faint); text-transform: none; letter-spacing: 0; }
.alerts-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.7);
  animation: alerts-pulse 2s ease-in-out infinite;
}
@keyframes alerts-pulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.5; }
}
.alerts-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 4px;
  font-size: 13px;
}
.alert-warning {
  background: rgba(251,191,36,0.08);
  border-color: rgba(251,191,36,0.35);
}
.alert-continent { font-weight: 600; color: var(--text); }
.alert-type { color: var(--text); text-transform: lowercase; }
.alert-stat { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; }
.alert-factor {
  background: rgba(239,68,68,0.25);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}
.alert-warning .alert-factor {
  background: rgba(251,191,36,0.25);
  color: #fcd34d;
}

/* ===================== ARCHIVO ===================== */
.archive-form {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 12px;
}
.archive-form .form-row {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end;
}
.archive-form .filter.full { flex: 1 1 100%; }
.archive-form .filter.full input[type=text] {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.archive-form input[type=date] {
  padding: 6px 10px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.btn-primary {
  background: var(--accent, #f5b842);
  color: #0a0e14;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.btn-secondary:hover { background: var(--bg-elev); }
.search-status {
  margin-top: 14px; font-size: 13px; color: var(--text-dim);
  font-family: var(--font-mono);
}
.archive-paginate {
  display: flex; align-items: center; gap: 16px;
  margin-top: 24px; justify-content: center;
}
.paginate-btn {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.paginate-btn:disabled { opacity: 0.4; cursor: default; }
.paginate-info {
  color: var(--text-faint); font-family: var(--font-mono); font-size: 12px;
}
.inc-lang {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.inc-lang.translated {
  color: var(--accent);
  border-color: rgba(245, 184, 66, 0.4);
}
.inc-translation-note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-faint);
  font-style: italic;
}
.inc-original-text {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--border);
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--text-dim);
  display: none;
  line-height: 1.5;
}
.inc-original-text.open { display: block; }
.inc-original-toggle {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
}
.inc-original-toggle:hover { color: var(--text); }

.incident-desc {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 10px;
}

.incident-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}
.incident-actions a,
.incident-actions button {
  color: var(--link);
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
}
.incident-actions button { color: var(--text-dim); }
.incident-actions button:hover { color: var(--text); }
.incident-actions a:hover { text-decoration: underline; }
.act-copied { color: var(--accent) !important; }

.timeline-status {
  margin-top: 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--font-mono);
}
.timeline-status button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
.timeline-status button:hover { border-color: var(--text-dim); }

/* ===================== SUBSCRIBE ===================== */
.subscribe {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-raise);
  text-align: center;
}
.subscribe h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 6px;
}
.subscribe-blurb {
  color: var(--text-dim);
  margin: 0 0 20px;
  font-size: 14px;
}
.subscribe-form {
  display: flex; justify-content: center; gap: 8px;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.subscribe-form input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
}
.subscribe-form input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.subscribe-form button {
  background: var(--accent);
  color: #0a0e14;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.subscribe-form button:hover { background: #ffcc66; }
.subscribe-status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-dim);
  min-height: 1em;
}
.subscribe-status.ok { color: #6ab184; }
.subscribe-status.error { color: var(--critical); }

/* ===================== METHODOLOGY PAGE ===================== */
.methodology { padding: 30px 0 60px; }
.methodology .container { max-width: 900px; }
.m-section { margin-bottom: 40px; }
.m-section h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.m-section h3 {
  font-size: 14px;
  color: var(--accent);
  margin: 18px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.m-section p {
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 12px;
  font-size: 15px;
}
.m-section em { color: var(--accent); font-style: normal; }
.m-section code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text);
}
.m-flow {
  counter-reset: flow;
  padding: 0;
  list-style: none;
  margin: 12px 0;
}
.m-flow li {
  counter-increment: flow;
  position: relative;
  padding: 10px 14px 10px 46px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}
.m-flow li::before {
  content: counter(flow);
  position: absolute;
  left: 12px; top: 10px;
  width: 22px; height: 22px;
  background: var(--accent);
  color: #0a0e14;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.m-flow li strong { color: var(--text); }
.m-list {
  padding-left: 20px;
  margin: 10px 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}
.m-list li { margin-bottom: 4px; }
.m-list strong { color: var(--text); }
.m-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}
.m-table th, .m-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.m-table th {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.m-table td:first-child {
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}
.m-table td:nth-child(2) { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; }
.m-note {
  background: rgba(245, 184, 66, 0.06);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px;
  color: var(--text-dim);
}
.m-code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
  margin: 14px 0;
}

/* ===================== FOOTER ===================== */
.site-footer {
  padding: 24px 0 36px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }
.footer-dim { color: var(--text-faint); margin-top: 8px; max-width: 64ch; margin-left: auto; margin-right: auto; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 720px) {
  .site-header .container { gap: 12px; }
  .brand-title { font-size: 22px; }
  .brand-sub { font-size: 11px; white-space: normal; }
  .intro-lede-body { font-size: 12px; }
  .metrics .container { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .metric-num { font-size: 28px; }
  .country-bars { grid-template-columns: 1fr; }
  .filter-row { gap: 8px; }
  .filter select { min-width: 0; }
  .filter-clear { margin-left: 0; }
  .incident-desc { font-size: 15px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .header-nav { gap: 8px; }
  .nav-link { padding: 4px 8px; font-size: 12px; }
  .metrics .container { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .metric-num { font-size: 24px; }
  .incident-meta { font-size: 10px; gap: 6px; }
  .incident-desc { font-size: 14px; }
}
