:root {
  --bg: #0a0e1a;
  --bg-2: #0d1322;
  --surface: #131a2d;
  --surface-2: #182241;
  --border: #1c2742;
  --border-hi: #2b3b66;
  --text: #e8eef9;
  --text-2: #9fadc6;
  --text-3: #6b7592;
  --cyan: #22d3ee;
  --green: #10b981;
  --orange: #fb923c;
  --red: #ef4444;
  --purple: #a78bfa;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(34,211,238,.06), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(16,185,129,.05), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Brand bar (lighter than apex) */
.demo-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; border-bottom: 1px solid var(--border);
  background: rgba(10,14,26,.85); backdrop-filter: saturate(140%) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  display: grid; place-items: center; color: #002635; font-weight: 800; font-size: 13px;
}
.brand-name { font-size: 15.5px; }
.brand-dot { color: var(--cyan); }
.demo-bar .badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--cyan);
  border: 1px solid rgba(34,211,238,.3); padding: 4px 10px; border-radius: 999px;
}
.demo-bar .right { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--text-2); }
.demo-bar .right .who { font-family: var(--mono); font-size: 12px; }
.demo-bar .right button.linklike {
  background: transparent; border: 0; color: var(--text-2); cursor: pointer; font-size: 13.5px;
}
.demo-bar .right button.linklike:hover { color: var(--cyan); }

/* Auth screens */
.auth-wrap { min-height: calc(100vh - 65px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 40px 36px;
}
.auth-card h1 {
  font-family: var(--serif); font-size: 28px; font-weight: 600;
  margin: 0 0 8px; letter-spacing: -.4px;
}
.auth-card .sub {
  color: var(--text-2); margin: 0 0 24px; font-size: 14.5px; line-height: 1.55;
}
.auth-card label {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; font-weight: 600;
}
.auth-card input[type="email"], .auth-card input[type="text"] {
  width: 100%; background: var(--bg); border: 1px solid var(--border-hi);
  color: var(--text); padding: 13px 14px; border-radius: 9px;
  font-family: var(--sans); font-size: 15px; outline: none; transition: border-color .15s;
}
.auth-card input[type="email"]:focus, .auth-card input[type="text"]:focus { border-color: var(--cyan); }
.auth-card input.otp {
  font-family: var(--mono); font-size: 24px; letter-spacing: 12px;
  text-align: center; padding: 16px 14px;
}
.auth-card button.primary {
  margin-top: 20px; width: 100%;
  background: linear-gradient(135deg, var(--cyan), #06b6d4);
  color: #002635; border: 0; padding: 13px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  border-radius: 9px; cursor: pointer; transition: filter .15s;
}
.auth-card button.primary:hover { filter: brightness(1.06); }
.auth-card button.primary:disabled { opacity: .6; cursor: not-allowed; filter: none; }
.auth-card .small {
  margin-top: 16px; font-size: 12.5px; color: var(--text-3); line-height: 1.55;
}
.auth-card .err {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  color: #fda4a4; font-size: 13.5px; display: none;
}
.auth-card .err.show { display: block; }
.auth-card .ok {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.3);
  color: #6ee7b7; font-size: 13.5px; display: none;
}
.auth-card .ok.show { display: block; }
.auth-foot {
  text-align: center; margin-top: 20px; font-size: 12.5px; color: var(--text-3);
}

/* Triage app shell */
.app-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  min-height: calc(100vh - 65px);
}
@media (max-width: 980px) { .app-grid { grid-template-columns: 1fr; } }
.app-pane {
  padding: 28px 32px; min-height: 600px;
  display: flex; flex-direction: column;
}
.app-pane.left { border-right: 1px solid var(--border); background: rgba(13,19,34,.4); }
.app-pane h2 {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  color: var(--cyan); letter-spacing: 2.2px; text-transform: uppercase;
  margin: 0 0 14px;
}
.app-pane .pane-sub { color: var(--text-3); font-size: 13px; margin: 0 0 18px; }

textarea.alert-input {
  width: 100%; flex: 1; min-height: 320px;
  background: #060914; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 16px 18px;
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  resize: vertical; outline: none;
}
textarea.alert-input:focus { border-color: var(--cyan); }
.app-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.app-actions button {
  background: linear-gradient(135deg, var(--cyan), #06b6d4); color: #002635;
  border: 0; padding: 10px 18px; font-weight: 600; font-size: 13.5px;
  border-radius: 8px; cursor: pointer; font-family: var(--sans);
}
.app-actions button:hover { filter: brightness(1.06); }
.app-actions button:disabled { opacity: .6; cursor: not-allowed; filter: none; }
.app-actions .ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-hi); padding: 9px 16px;
}
.app-actions .ghost:hover { color: var(--cyan); border-color: var(--cyan); filter: none; background: transparent; }
.app-actions .meter {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
  margin-left: auto; letter-spacing: 1.2px;
}
.sample-row { margin-top: 12px; }
.sample-row .sample-link {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
  cursor: pointer; margin-right: 14px;
  border-bottom: 1px dotted var(--text-3);
}
.sample-row .sample-link:hover { color: var(--cyan); border-color: var(--cyan); }

/* Verdict pane */
.verdict-empty {
  flex: 1; display: grid; place-items: center; color: var(--text-3);
  font-size: 14px; text-align: center; padding: 40px 20px;
  border: 1px dashed var(--border); border-radius: 12px;
}
.verdict-empty p { margin: 4px 0; }

.verdict {
  flex: 1; overflow: auto;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 24px;
  font-family: var(--sans);
}
.verdict-head {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px;
}
.sev-pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  font-weight: 700;
}
.sev-pill.crit { color: #fff; background: var(--red); }
.sev-pill.high { color: #1a0a02; background: var(--orange); }
.sev-pill.med { color: #002635; background: var(--cyan); }
.sev-pill.low { color: #002311; background: var(--green); }
.sev-pill.info { color: var(--text-2); background: var(--surface); border: 1px solid var(--border-hi); }
.conf-pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  color: var(--purple); background: rgba(167,139,250,.1);
  border: 1px solid rgba(167,139,250,.3);
}
.action-pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border-hi);
}
.verdict h3 {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  margin: 8px 0 14px; line-height: 1.3;
}
.verdict .reasoning {
  font-family: var(--serif); font-size: 16px; line-height: 1.7;
  color: #d4dbeb; white-space: pre-wrap;
}
.verdict h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--cyan); letter-spacing: 1.8px; text-transform: uppercase;
  margin: 22px 0 10px;
}
.verdict ul { padding-left: 1.2em; margin: 0 0 14px; }
.verdict li { font-size: 14px; color: var(--text-2); margin-bottom: 6px; line-height: 1.5; }
.verdict code {
  font-family: var(--mono); font-size: .85em;
  background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.18);
  color: #c9f5fd; padding: 1px 6px; border-radius: 4px;
}
.streaming-cursor::after {
  content: '▋'; color: var(--cyan);
  animation: blink 1s steps(2, start) infinite;
  margin-left: 2px;
}
@keyframes blink { to { visibility: hidden; } }

/* --- verdict pill (true positive / false positive / benign) --- */
.verdict-pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  font-weight: 600;
}
.verdict-pill.tp     { color: #ffd8c2; background: rgba(251,146,60,.12);  border: 1px solid rgba(251,146,60,.35); }
.verdict-pill.fp     { color: #c2e0ff; background: rgba(125,179,255,.10); border: 1px solid rgba(125,179,255,.30); }
.verdict-pill.benign { color: #c2ffd6; background: rgba(16,185,129,.10);  border: 1px solid rgba(16,185,129,.30); }

.stream-dot {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--cyan); opacity: 0.85;
  padding-left: 4px;
}
.stream-dot::before {
  content: '●'; margin-right: 6px;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:.25; } 50% { opacity:1; } }

/* --- report title --- */
.verdict .report-title {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  margin: 4px 0 18px; line-height: 1.3; letter-spacing: -.2px;
  color: var(--text);
}

/* --- section cards (Description / Analysis / Recommendations) --- */
.section-card {
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.015);
  padding: 16px 18px 18px;
}
.section-label {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  color: var(--cyan); letter-spacing: 1.8px; text-transform: uppercase;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.empty-section {
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  letter-spacing: .4px; margin: 4px 0;
}

/* --- entity table (Description section) --- */
.entity-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--sans); font-size: 13.5px;
}
.entity-table th, .entity-table td {
  text-align: left; vertical-align: top;
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.entity-table tr:last-child th,
.entity-table tr:last-child td { border-bottom: 0; }
.entity-table th {
  width: 170px; font-weight: 500;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-3); letter-spacing: .6px; text-transform: uppercase;
  padding-right: 16px;
}
.entity-table td { color: var(--text); line-height: 1.55; }
.entity-list {
  list-style: none; padding: 0; margin: 0;
}
.entity-list li {
  padding: 2px 0; color: var(--text); font-size: 13.5px;
  margin: 0; line-height: 1.55;
}
.entity-table code.hash {
  font-size: 11px; color: #9aaecf; word-break: break-all;
}
.mitre-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.mitre-cell code { font-size: 11.5px; }

/* --- analysis section --- */
.analysis-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.analysis-row:last-child { border-bottom: 0; padding-bottom: 0; }
.analysis-row:first-child { padding-top: 0; }
.analysis-label {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-3); letter-spacing: .6px; text-transform: uppercase;
  padding-top: 2px;
}
.analysis-text {
  font-family: var(--serif); font-size: 15px; line-height: 1.65;
  color: #d4dbeb; white-space: pre-wrap;
}

/* --- recommendations groups --- */
.rec-group {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.rec-group:last-child { border-bottom: 0; padding-bottom: 0; }
.rec-group:first-child { padding-top: 2px; }
.rec-label {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  margin-bottom: 8px;
}
.rec-group.rec-imm   .rec-label { color: #fb923c; }
.rec-group.rec-erad  .rec-label { color: var(--red); }
.rec-group.rec-recov .rec-label { color: var(--green); }
.rec-group.rec-prev  .rec-label { color: #a78bfa; }
.rec-group.rec-mon   .rec-label { color: var(--cyan); }
.rec-group ul { padding-left: 1.15em; margin: 0; }
.rec-group li {
  font-family: var(--sans); font-size: 14px; color: var(--text);
  line-height: 1.55; margin-bottom: 5px;
}

/* responsive: stack the entity/analysis labels above values on narrow screens */
@media (max-width: 640px) {
  .entity-table th { width: auto; display: block; padding-bottom: 2px; }
  .entity-table td { display: block; padding-top: 0; padding-bottom: 10px; }
  .analysis-row { grid-template-columns: 1fr; gap: 4px; }
  .analysis-label { padding-top: 0; }
}

.error-banner {
  margin-top: 12px; padding: 12px 14px; border-radius: 8px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  color: #fda4a4; font-size: 13.5px;
}

footer.demo-foot {
  border-top: 1px solid var(--border);
  padding: 18px 28px; font-size: 12.5px; color: var(--text-3);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
footer.demo-foot a { color: var(--text-2); }
footer.demo-foot a:hover { color: var(--cyan); }

/* ============================================
   6-agent pipeline UI
   ============================================ */

.client-label {
  display: block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-3);
  margin: 6px 0 6px;
}
.client-select {
  width: 100%; padding: 10px 12px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--sans); font-size: 13.5px;
  margin-bottom: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239fadc6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
  padding-right: 34px;
}
.client-select:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,.12);
}

/* --- pipeline (agent cards) --- */
.pipeline {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 18px;
}
.agent-card {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 14px; align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(13,19,34,.6);
  transition: border-color .2s, background-color .2s;
}
.agent-card.running  { border-color: var(--cyan); background: rgba(34,211,238,.04); }
.agent-card.complete { border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.03); }
.agent-card.error    { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.06); }
.agent-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; font-size: 12px;
  background: var(--surface); color: var(--text-3);
  border: 1px solid var(--border);
}
.agent-card.running  .agent-num { background: var(--cyan); color: #002635; border-color: var(--cyan); animation: pulse 1.4s ease-in-out infinite; }
.agent-card.complete .agent-num { background: var(--green); color: #002311; border-color: var(--green); }
.agent-card.error    .agent-num { background: var(--red); color: #fff; border-color: var(--red); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,211,238,.6); }
  50%      { box-shadow: 0 0 0 6px rgba(34,211,238,0); }
}
.agent-body { min-width: 0; }
.agent-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
}
.agent-label { font-weight: 500; font-size: 14px; color: var(--text); }
.agent-status {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--text-3);
}
.agent-card.running  .agent-status { color: var(--cyan); }
.agent-card.complete .agent-status { color: var(--green); }
.agent-card.error    .agent-status { color: var(--red); }
.agent-message {
  margin-top: 6px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-2);
  line-height: 1.5;
}
.agent-summary {
  margin-top: 6px;
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.agent-time {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  white-space: nowrap;
}

/* --- final report --- */
.final-report { margin-top: 8px; }

.verdict-banner {
  border: 1px solid var(--border-hi); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 18px;
  background: var(--bg-2);
}
.verdict-banner.escalate {
  border-color: rgba(239,68,68,.45);
  background: linear-gradient(180deg, rgba(239,68,68,.06), rgba(239,68,68,.02));
}
.verdict-banner.falsepos {
  border-color: rgba(16,185,129,.4);
  background: linear-gradient(180deg, rgba(16,185,129,.06), rgba(16,185,129,.02));
}
.verdict-banner.needsl2 {
  border-color: rgba(251,146,60,.4);
  background: linear-gradient(180deg, rgba(251,146,60,.06), rgba(251,146,60,.02));
}
.vb-headline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.big-verdict {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  letter-spacing: 2.2px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 6px;
}
.verdict-banner.escalate .big-verdict { background: var(--red); color: #fff; }
.verdict-banner.falsepos .big-verdict { background: var(--green); color: #002311; }
.verdict-banner.needsl2  .big-verdict { background: var(--orange); color: #1a0a02; }
.conf-chip, .prio-chip, .sla-chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  color: var(--text-2); border: 1px solid var(--border-hi); background: var(--surface);
}
.prio-chip { color: var(--orange); border-color: rgba(251,146,60,.35); }
.vb-reason {
  margin-top: 14px;
  font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--text);
}
.vb-exec {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--serif); font-size: 14.5px; line-height: 1.65; color: var(--text-2);
}
.vb-label {
  display: block;
  font-family: var(--mono); font-size: 10px; color: var(--text-3);
  letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 4px;
}
.vb-foot {
  margin-top: 14px;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
  letter-spacing: .4px;
}

/* --- report sections --- */
.report-section {
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,.015);
}
.rs-label {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  color: var(--cyan); letter-spacing: 1.8px; text-transform: uppercase;
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.rs-empty {
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  letter-spacing: .4px; margin: 4px 0;
}

/* Subhead within a consolidated section card */
.rs-subhead {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  color: var(--text-2); letter-spacing: 1.4px; text-transform: uppercase;
  margin: 22px 0 10px;
}

/* Alert-metadata strip at the top of section 1 */
.alert-meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding: 10px 12px; margin-bottom: 12px;
  background: rgba(255,255,255,.025); border-radius: 8px;
  border: 1px solid var(--border);
}
.alert-meta-grid > div { display: flex; flex-direction: column; gap: 2px; }
.rs-key {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--text-3);
}
.rs-val {
  font-family: var(--sans); font-size: 13px; color: var(--text);
}

/* Evidence two-column layout (supporting / mitigating) */
.evidence-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 6px;
}
.evidence-col {
  padding: 10px 12px;
  background: rgba(255,255,255,.02);
  border-radius: 8px; border: 1px solid var(--border);
}
.ec-label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 6px;
}
@media (max-width: 640px) {
  .evidence-cols { grid-template-columns: 1fr; }
}

/* --- entity table (final report version) --- */
.entity-table, .ti-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--sans); font-size: 13px;
}
.entity-table th, .ti-table th {
  text-align: left; font-weight: 500;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
  letter-spacing: .6px; text-transform: uppercase;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--border);
}
.entity-table td, .ti-table td {
  text-align: left; vertical-align: top;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text);
}
.entity-table tr:last-child td, .ti-table tr:last-child td { border-bottom: 0; }

.ti-verdict {
  display: inline-block;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.ti-verdict.mal { color: #fff; background: var(--red); }
.ti-verdict.sus { color: #1a0a02; background: var(--orange); }
.ti-verdict.cln { color: #002311; background: var(--green); }
.ti-verdict.unk { color: var(--text-2); background: var(--surface); border: 1px solid var(--border-hi); }
.ti-table code.tag {
  font-family: var(--mono); font-size: 10.5px;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(167,139,250,.1); color: #d6c9ff;
  border: 1px solid rgba(167,139,250,.25);
}

/* --- KB matches list --- */
.kb-list { list-style: none; padding: 0; margin: 0; }
.kb-list li {
  padding: 8px 12px; margin-bottom: 6px;
  border-left: 3px solid var(--border-hi);
  background: rgba(255,255,255,.02);
  border-radius: 4px;
  font-size: 13px; color: var(--text); line-height: 1.5;
}
.kb-list li.kb-blocklist     { border-left-color: var(--red); }
.kb-list li.kb-exclusion     { border-left-color: var(--green); }
.kb-list li.kb-asset_inventory { border-left-color: var(--orange); }
.kb-list li.kb-past_alert    { border-left-color: var(--purple); }
.kb-type {
  display: inline-block;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px;
  background: var(--surface); color: var(--text-2);
  margin-right: 8px;
  border: 1px solid var(--border);
}

/* --- analysis grid (final report version) --- */
.analysis-grid .analysis-row {
  display: grid; grid-template-columns: 170px 1fr;
  gap: 16px; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.analysis-grid .analysis-row:last-child { border-bottom: 0; padding-bottom: 0; }
.analysis-grid .analysis-row:first-child { padding-top: 0; }
.analysis-grid .analysis-label {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  letter-spacing: .6px; text-transform: uppercase;
  padding-top: 2px;
}
.analysis-grid .analysis-text {
  font-family: var(--sans); font-size: 14px; line-height: 1.6;
  color: var(--text); white-space: pre-wrap;
}
.bullet-list { padding-left: 1.2em; margin: 4px 0 0; }
.bullet-list li { margin-bottom: 4px; line-height: 1.5; }
.mitre-chip {
  display: inline-block;
  font-family: var(--sans); font-size: 12px;
  padding: 4px 10px; border-radius: 6px; margin: 2px 4px 2px 0;
  background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.25);
  color: var(--text);
}
.mitre-chip code {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--cyan); margin-right: 4px;
}

/* --- playbook section --- */
.pb-header {
  font-family: var(--sans); font-size: 14px; color: var(--text);
  padding-bottom: 8px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.pb-reason {
  font-family: var(--serif); font-size: 14.5px; line-height: 1.55;
  color: var(--text-2); margin-bottom: 12px;
}
.pb-block { margin: 12px 0; }
.pb-label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 6px;
}
.pb-prose {
  font-family: var(--serif); font-size: 14px; line-height: 1.6;
  color: var(--text); white-space: pre-wrap;
}

/* investigation steps */
.step-list {
  list-style: none; padding: 0; margin: 0;
  counter-reset: stepc;
}
.step-list li {
  position: relative;
  padding: 12px 0 14px 36px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  counter-increment: stepc;
}
.step-list li:last-child { border-bottom: 0; }
.step-list li::before {
  content: counter(stepc);
  position: absolute; left: 0; top: 13px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  background: var(--surface); color: var(--cyan);
  border: 1px solid var(--border-hi);
}
.step-title {
  font-family: var(--sans); font-weight: 500; font-size: 14px;
  color: var(--text); margin-bottom: 6px;
}
.step-meta {
  font-family: var(--sans); font-size: 12.5px; color: var(--text-2);
  line-height: 1.5; margin-bottom: 4px;
}
.step-meta .meta-k {
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
  letter-spacing: .6px; text-transform: uppercase; margin-right: 4px;
}
.step-query {
  margin: 6px 0;
  padding: 8px 10px; border-radius: 6px;
  background: rgba(34,211,238,.04); border: 1px solid rgba(34,211,238,.18);
  overflow-x: auto;
}
.step-query code {
  font-family: var(--mono); font-size: 12px; color: #c9f5fd;
  white-space: pre-wrap; word-break: break-all;
  background: transparent; border: none; padding: 0;
}

/* responsive */
@media (max-width: 720px) {
  .analysis-grid .analysis-row { grid-template-columns: 1fr; gap: 4px; }
  .agent-card { grid-template-columns: 32px 1fr; }
  .agent-time { grid-column: 2; padding-top: 2px; }
}
