/* ── Alerts feed ───────────────────────────────────────────────────────────
   Replaces the Telegram subscription path: the same risk events, published
   on the site instead of requiring a chat id. Severity drives colour, using
   the existing brand tokens -- no new palette.
   ------------------------------------------------------------------------ */

.alerts-head { padding: 56px 0 24px; }

.alerts-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 18ch;
}

.alerts-sub {
  margin: 0 0 26px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

/* Filters ---------------------------------------------------------------- */

.alerts-filters { display: flex; flex-wrap: wrap; gap: 8px; }

.sev-btn {
  font: 500 12px/1 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 999px;
  /* 44px tall: a 12px font in a pill is otherwise a ~26px tap target. */
  padding: 0 16px;
  min-height: 44px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.sev-btn:hover { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 34%, transparent); }

.sev-btn.is-on {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* Feed ------------------------------------------------------------------- */

.alerts-status { color: var(--muted); font-size: 13px; margin: 20px 0 10px; }

.alert-feed { list-style: none; margin: 0 0 72px; padding: 0; display: grid; gap: 10px; }

.alert-row {
  display: grid;
  grid-template-columns: 3px 1fr auto;
  gap: 0 14px;
  align-items: center;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .18s ease, background .18s ease;
}

.alert-row:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

/* The severity stripe carries the colour, so the text stays high-contrast. */
.alert-stripe { align-self: stretch; border-radius: 2px; background: var(--muted); }
.alert-row[data-sev="critical"] .alert-stripe { background: var(--warn, #e0894f); }
.alert-row[data-sev="warning"]  .alert-stripe { background: color-mix(in srgb, var(--warn, #e0894f) 62%, var(--muted)); }
.alert-row[data-sev="info"]     .alert-stripe { background: var(--accent); }

.alert-main { min-width: 0; }

.alert-kind {
  font: 500 11px/1 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.alert-row[data-sev="critical"] .alert-kind { color: var(--warn, #e0894f); }

.alert-line { margin: 0; font-size: 15px; line-height: 1.45; }

.alert-token {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  /* 44px hit area without changing the painted inline link. */
  position: relative;
}
.alert-token::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: 50%; transform: translateY(-50%); height: 44px;
}
.alert-token:hover { color: var(--accent); }

.alert-move { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.alert-move b { color: var(--fg); font-weight: 500; }

.alert-meta {
  text-align: right;
  font: 400 12px/1.5 'IBM Plex Mono', ui-monospace, monospace;
  color: var(--muted);
  white-space: nowrap;
}

.alert-empty {
  border: 1px dashed color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
}

/* Below 560px the right-hand meta column and the message fight for width,
   so the row stacks and the meta becomes a caption. */
@media (max-width: 560px) {
  .alert-row { grid-template-columns: 3px 1fr; }
  .alert-meta { grid-column: 2; text-align: left; margin-top: 8px; }
}
