:root {
  --bg: #0f1115; --card: #171a21; --edge: #262b36;
  --ink: #e8ebf2; --dim: #9aa3b5;
  --accent: #6ea8fe; --good: #3ecf8e; --warn: #f5b455; --bad: #f2707d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, "Segoe UI", sans-serif; }
header { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 26px; border-bottom: 1px solid var(--edge); }
.brand h1 { margin: 0; font-size: 26px; }
.brand h1 span { font-size: 20px; }
.tag { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
.health { font-size: 12px; color: var(--dim); border: 1px solid var(--edge);
  border-radius: 8px; padding: 6px 10px; }
.toolbar { display: flex; gap: 10px; align-items: center;
  padding: 14px 26px; border-bottom: 1px solid var(--edge); flex-wrap: wrap; }
.spacer { flex: 1; }
.stats { color: var(--dim); font-size: 13px; }
main { display: grid; grid-template-columns: 7fr 3fr; gap: 16px;
  padding: 16px 26px; }
@media (max-width: 1100px) { main { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--edge);
  border-radius: 12px; padding: 14px 16px; }
.card h2 { margin: 0 0 10px; font-size: 15px; }
.sub { color: var(--dim); font-weight: 400; font-size: 12px; }
aside { display: grid; gap: 16px; align-content: start; }
.stack { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; }
.empty { color: var(--dim); font-size: 13px; }
button { border: none; border-radius: 8px; padding: 9px 14px;
  font: inherit; cursor: pointer; }
.primary { background: var(--accent); color: #0d1220; font-weight: 600; }
.warn { background: var(--warn); color: #221a08; font-weight: 600; }
.ghost { background: transparent; color: var(--accent);
  border: 1px solid var(--edge); }
button:disabled { opacity: .5; cursor: wait; }
#attempts-grid { width: 100%; height: 560px; }
.decision { font-weight: 700; font-size: 12px; padding: 2px 8px;
  border-radius: 6px; display: inline-block; }
.decision.ALLOW { color: var(--good); border: 1px solid var(--good); }
.decision.HOLD_FOR_HUMAN { color: var(--warn); border: 1px solid var(--warn); }
.decision.DENY { color: var(--bad); border: 1px solid var(--bad); }
.hold-card, .alert-card, .rex-row { border: 1px solid var(--edge);
  border-radius: 10px; padding: 10px 12px; background: var(--bg);
  font-size: 13px; }
.hold-card b, .alert-card b { font-size: 13px; }
.hold-card .why, .alert-card .why, .rex-row .why { color: var(--dim);
  font-size: 12px; margin: 4px 0; }
.alert-card { border-left: 3px solid var(--warn); }
.alert-card.sev-high { border-left-color: var(--bad); }
.row-actions { display: flex; gap: 8px; margin-top: 8px; }
.row-actions button { padding: 5px 10px; font-size: 12px; }
.approve { background: var(--good); color: #062b1a; font-weight: 600; }
.deny { background: var(--bad); color: #2b0a0e; font-weight: 600; }
.rex-row.caught { border-left: 3px solid var(--good); }
.rex-row.missed { border-left: 3px solid var(--bad); }
.rex-row .verdict { font-weight: 700; }
.modal { position: fixed; inset: 0; background: rgba(5,6,10,.75);
  display: flex; align-items: center; justify-content: center; z-index: 10; }
.modal.hidden { display: none; }
.modal-card { background: var(--card); border: 1px solid var(--edge);
  border-radius: 12px; padding: 20px; width: min(720px, 92vw);
  max-height: 84vh; display: grid; gap: 12px; }
.modal-card pre { white-space: pre-wrap; font-size: 13px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--edge); border-radius: 8px;
  padding: 14px; max-height: 55vh; overflow-y: auto; }
footer { color: var(--dim); font-size: 12px; text-align: center;
  padding: 20px 0 30px; }
footer a { color: var(--accent); }
