:root {
  color-scheme: dark;
  --bg: #171717;
  --panel: #23201d;
  --panel-strong: #2c2925;
  --text: #f7f2ea;
  --muted: #b8b0a6;
  --line: rgba(255, 255, 255, 0.13);
  --red: #ef4444;
  --amber: #f59e0b;
  --cyan: #22d3ee;
  --green: #34d399;
  --violet: #a78bfa;
  --ink: #0e0e0f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.12), transparent 30rem),
    linear-gradient(135deg, #181717 0%, #211c19 48%, #121516 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(22, 22, 23, 0.82);
  overflow: hidden;
}

.hero-copy {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 13ch;
  margin-top: 12px;
  font-size: clamp(2.4rem, 5vw, 5.9rem);
  line-height: 0.95;
}

.lede {
  max-width: 740px;
  margin-top: 24px;
  color: #e6ded3;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.source-row a,
.link-set a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.84rem;
}

.source-row a:hover,
.link-set a:hover,
.chip:hover,
.refresh-button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.hero-visual {
  position: relative;
  min-height: 320px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(239, 68, 68, 0.08));
  background-size: 32px 32px, 32px 32px, auto;
  overflow: hidden;
}

.hero-visual span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 9px color-mix(in srgb, var(--tone), transparent 78%);
}

.radar-orbit,
.radar-core {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.radar-orbit {
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.orbit-one {
  width: 220px;
  height: 220px;
}

.orbit-two {
  width: 360px;
  height: 360px;
}

.radar-core {
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(239, 68, 68, 0.4));
  box-shadow: 0 0 42px rgba(34, 211, 238, 0.26);
}

.status-panel,
.controls,
.workspace,
.metrics {
  margin-top: 18px;
}

.status-panel {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(35, 32, 29, 0.82);
}

.status-panel div {
  display: grid;
  gap: 6px;
}

.refresh-button,
.chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.refresh-button {
  min-height: 42px;
  padding: 0 16px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  min-height: 120px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: rgba(35, 32, 29, 0.82);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric span {
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  font-size: 2.8rem;
  line-height: 1;
}

.metric.hot {
  border-left-color: var(--red);
}

.metric.rce {
  border-left-color: var(--amber);
}

.metric.zero {
  border-left-color: var(--violet);
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.5fr) minmax(260px, 0.85fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 18, 19, 0.74);
}

.search-block,
.filter-block {
  display: grid;
  gap: 10px;
  align-content: start;
}

.search-block label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.85rem;
}

.chip.active {
  border-color: rgba(34, 211, 238, 0.76);
  background: rgba(34, 211, 238, 0.18);
}

.compact {
  gap: 9px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #eee6dd;
  font-weight: 750;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.briefing,
.results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(35, 32, 29, 0.82);
}

.briefing {
  position: sticky;
  top: 16px;
  padding: 20px;
}

.briefing h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.briefing h2 + ol,
.briefing h2 + ul {
  margin-top: 0;
}

.briefing ul,
.briefing ol {
  padding-left: 18px;
  color: #e4dbd0;
  line-height: 1.55;
}

.briefing li + li {
  margin-top: 8px;
}

.results {
  min-width: 0;
  padding: 18px;
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.results h2 {
  margin-top: 6px;
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
}

.result-count {
  color: var(--muted);
  font-weight: 900;
}

.loading,
.error {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: #efe8dc;
  background: rgba(255, 255, 255, 0.06);
}

.error {
  border-color: rgba(239, 68, 68, 0.46);
  background: rgba(239, 68, 68, 0.14);
}

.cve-list {
  display: grid;
  gap: 12px;
}

.cve-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent 48%),
    rgba(20, 20, 21, 0.78);
}

.cve-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cve-id {
  color: #f8fafc;
  font-size: 1.08rem;
  font-weight: 950;
  text-decoration-color: rgba(248, 250, 252, 0.35);
  text-underline-offset: 3px;
}

.badges,
.taxonomy,
.link-set {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge,
.taxon {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.74rem;
  font-weight: 950;
}

.badge {
  color: #101010;
  background: var(--cyan);
}

.badge.critical {
  background: var(--red);
  color: #fff;
}

.badge.exploited {
  background: var(--amber);
  color: #17120a;
}

.badge.zero {
  background: var(--violet);
  color: #111;
}

.badge.ransomware {
  background: #f9fafb;
  color: #111;
}

.taxon {
  border: 1px solid var(--line);
  color: #e9e0d8;
  background: rgba(255, 255, 255, 0.07);
}

.cve-card h3 {
  margin-top: 12px;
  color: #fff7ed;
  font-size: 1.16rem;
  line-height: 1.32;
}

.summary {
  margin-top: 10px;
  color: #d8d0c8;
  line-height: 1.55;
}

.taxonomy {
  margin-top: 12px;
}

.cve-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.score {
  min-height: 64px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.94), rgba(245, 158, 11, 0.88));
  color: #101010;
  font-weight: 1000;
  text-align: center;
  padding: 10px;
}

.score span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.score strong {
  display: block;
  font-size: 1.72rem;
  line-height: 1;
}

dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: #eee6dd;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.link-set {
  padding-top: 2px;
}

.empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1040px) {
  .hero,
  .controls,
  .workspace,
  .cve-card {
    grid-template-columns: 1fr;
  }

  .briefing {
    position: static;
  }

  .hero-copy {
    padding: 32px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1480px);
    padding-top: 10px;
  }

  .hero-copy {
    padding: 24px;
  }

  .status-panel,
  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 96px;
  }

  .results-head {
    align-items: start;
    flex-direction: column;
  }

  dl div {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}
