:root {
  --bg: #000;
  --panel: #0a0a0a;
  --border: #2a2a2a;
  --border-dim: #1a1a1a;
  --fg: #c0c0c0;
  --fg-dim: #666;
  --fg-faint: #555;
  --accent: #1dc974;
  --good: #1dc974;
  --warn: #e0a020;
  --high: #d85a30;
  --bad: #e05050;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html, body { background: var(--bg); color: var(--fg); }

body {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 1.5rem 1rem 3rem;
}

.wrap { max-width: 900px; margin: 0 auto; }

.masthead { margin-bottom: 1.25rem; }
.masthead h1 {
  font-size: 16px; font-weight: 500; color: var(--accent);
  letter-spacing: 0.5px; margin-bottom: 0.25rem;
}
.tagline { color: var(--fg-dim); font-size: 12px; margin-bottom: 0.6rem; }
.ethics {
  color: var(--fg-faint); font-size: 11px; line-height: 1.6;
  border-left: 2px solid var(--border); padding-left: 0.6rem; max-width: 70ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.panel {
  background: var(--panel);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem;
  min-height: 220px;
}
.panel-head {
  color: var(--accent); font-size: 12px; font-weight: 500;
  letter-spacing: 0.5px; margin-bottom: 0.8rem;
}

.row { display: flex; align-items: center; gap: 8px; margin-bottom: 0.8rem; }
.ps { color: var(--accent); font-size: 12px; white-space: nowrap; }

.cli {
  background: transparent; border: none; border-bottom: 0.5px solid #333;
  color: #e0e0e0; font-family: var(--mono); font-size: 13px;
  outline: none; flex: 1; padding: 3px 4px; border-radius: 0;
}
.cli:focus { border-bottom-color: var(--accent); }

.btn {
  background: transparent; border: 0.5px solid #333; border-radius: 8px;
  color: var(--fg-dim); font-family: var(--mono); font-size: 12px;
  padding: 5px 12px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn:hover, .btn:focus { color: var(--accent); border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: default; }

.out { line-height: 1.8; }
.note { color: var(--fg-faint); font-size: 11px; }
.lbl { color: var(--fg-faint); }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.muted { color: var(--fg-dim); }
.err { color: var(--bad); }
.sub { color: var(--accent); font-size: 12px; margin: 0.6rem 0 0.2rem; }

.chip {
  display: inline-block; border: 0.5px solid #333; border-radius: 3px;
  padding: 1px 6px; margin: 2px 3px 2px 0; font-size: 11px; color: var(--fg-dim);
}

.kev-list { max-height: 420px; overflow-y: auto; }
.kev-item {
  border-bottom: 0.5px solid var(--border-dim); padding: 8px 2px; cursor: pointer;
}
.kev-item:hover, .kev-item:focus-within { background: #111; }
.kev-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kev-cve { color: #e0e0e0; }
.kev-meta { color: var(--fg-dim); font-size: 11px; margin-top: 2px; }
.kev-detail {
  margin-top: 6px; padding: 6px 8px; background: #0e0e0e;
  border-radius: 4px; font-size: 11px; color: #999; display: none;
}
.kev-detail.open { display: block; }

/* abuse.ch live feeds (urlhaus / feodo) — same look as the kev list */
.feed-list { max-height: 300px; overflow-y: auto; margin-bottom: 0.4rem; }
.feed-item {
  border-bottom: 0.5px solid var(--border-dim); padding: 7px 2px;
}
.feed-item:hover { background: #111; }
.feed-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.feed-host { color: #e0e0e0; word-break: break-all; }
.feed-url {
  color: var(--fg-dim); font-size: 11px; margin-top: 2px; word-break: break-all;
}
.feed-meta { color: var(--fg-faint); font-size: 11px; margin-top: 2px; }
.chip.bad-chip { color: var(--bad); border-color: var(--bad); }

.sev {
  display: inline-block; padding: 0 6px; border-radius: 3px;
  font-size: 10px; font-weight: 500; border: 0.5px solid; white-space: nowrap;
}
/* Severity colors as classes (not inline styles) so the strict CSP
   `style-src 'self'` keeps blocking inline styles without breaking the badge. */
.sev-critical { color: var(--bad); border-color: var(--bad); }
.sev-high { color: var(--high); border-color: var(--high); }
.sev-medium { color: var(--warn); border-color: var(--warn); }
.sev-low { color: var(--good); border-color: var(--good); }

/* Spacing utilities that replace former inline style attributes. */
.kev-line { margin-top: 3px; }
.list-empty { padding: 8px 0; }

.ransom {
  color: var(--bad); font-size: 10px; border: 0.5px solid var(--bad);
  border-radius: 3px; padding: 0 5px;
}

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 1.5rem; color: var(--fg-faint); font-size: 11px;
}
.foot a { color: var(--accent); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
