:root {
  color-scheme: light;
  --ink: #18232b;
  --muted: #62717d;
  --line: #d8e0e4;
  --paper: #ffffff;
  --wash: #f3f6f6;
  --accent: #007f79;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: #006b67; }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 0 3vw;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.brand { color: var(--ink); font-size: 20px; font-weight: 750; text-decoration: none; }
.site-header nav { display: flex; align-items: stretch; align-self: stretch; gap: 28px; }
.site-header nav a {
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { border-color: var(--accent); color: var(--ink); }
main { width: min(1500px, 94vw); margin: 36px auto 64px; }
.site-footer { width: min(1500px, 94vw); margin: -32px auto 28px; color: var(--muted); font-size: 12px; }
.intro { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; }
.intro p:last-child { color: var(--muted); }
button {
  border: 0;
  border-radius: 5px;
  padding: 11px 16px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.secondary-button {
  border: 1px solid var(--accent);
  background: white;
  color: #006b67;
}
.secondary-button:hover { background: #edf8f7; }
.text-button {
  padding: 7px 0;
  background: transparent;
  color: #006b67;
  text-decoration: underline;
}
.text-button:hover { color: var(--ink); }
.results-bar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin: 20px 0 12px;
}
.catalog-controls { margin-top: 30px; }
.quick-find {
  display: grid;
  grid-template-columns: 120px minmax(280px, 650px) 1fr;
  gap: 12px 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.quick-find > label { font-weight: 800; }
.quick-find > div { display: flex; gap: 8px; }
.quick-find small { color: var(--muted); }
.filter-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.filter-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 14px;
}
.filter-heading span { color: var(--muted); font-size: 13px; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.filter-grid > label,
.filter-field { min-width: 0; }
.filter-grid > label > span,
.filter-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}
input, select {
  width: 100%;
  border: 1px solid #b9c6cc;
  border-radius: 5px;
  padding: 10px 12px;
  background: white;
  font: inherit;
}
.multi-select { position: relative; }
.multi-select summary {
  overflow: hidden;
  width: 100%;
  min-height: 43px;
  padding: 10px 34px 10px 12px;
  border: 1px solid #b9c6cc;
  border-radius: 5px;
  background: white;
  cursor: pointer;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select summary::after {
  content: "▾";
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--muted);
}
.multi-select[open] summary { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 127, 121, .12); }
.multi-select-panel {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  width: min(340px, 86vw);
  padding: 10px;
  border: 1px solid #b9c6cc;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(22, 48, 57, .18);
}
.option-search { margin-bottom: 8px; }
.option-list { overflow-y: auto; max-height: 310px; border-top: 1px solid var(--line); }
.option-list label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 8px 5px;
  border-bottom: 1px solid #edf1f2;
  cursor: pointer;
}
.option-list label:hover { background: #f7fbfb; }
.option-list label[hidden] { display: none; }
.option-list input { flex: 0 0 auto; width: auto; margin-top: 3px; }
.option-list span { overflow-wrap: anywhere; }
.filter-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.watchlist-message { color: var(--muted); font-size: 13px; white-space: normal; }
.metadata { color: var(--muted); font-size: 13px; text-align: right; }
.notice { padding: 12px 16px; border-left: 4px solid #b36b00; background: #fff6df; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
thead th { position: sticky; top: 0; z-index: 1; background: #f8fafa; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7fbfb; }
td span { color: var(--muted); }
.cve { white-space: nowrap; font-weight: 750; }
.date { white-space: nowrap; }
.status-pill {
  display: inline-block;
  min-width: 70px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf1f2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}
.status-known { background: #f9dfe1; color: #a3222d; }
.cvss-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 76px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 800;
  white-space: nowrap;
}
.cvss-pill small { font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.cvss-critical { background: #f9dfe1; color: #a3222d; }
.cvss-high { background: #fff0d9; color: #9b5200; }
.cvss-medium { background: #fff8cc; color: #716000; }
.cvss-low, .cvss-none { background: #e1f4eb; color: #17633a; }
.cvss-unavailable { color: var(--muted); }
.empty { padding: 60px; color: var(--muted); text-align: center; }
.pagination { display: flex; justify-content: center; gap: 24px; margin-top: 24px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 34px 0;
}
.watchlist-banner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid #b8d8d5;
  border-radius: 7px;
  background: #f2f9f8;
}
.watchlist-banner .eyebrow { margin-bottom: 3px; }
.watchlist-banner h2, .watchlist-banner p { margin: 0; }
.watchlist-banner h2 { font-size: 21px; }
.watchlist-banner > div:first-child > p:last-child { margin-top: 4px; color: var(--muted); }
.watchlist-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.compact-watchlist { margin: 16px 0; }
.stat-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid #a6b6bd;
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.stat-card:hover { border-left-color: var(--accent); box-shadow: 0 5px 20px rgba(22, 48, 57, .08); }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card span { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.stat-card strong { display: block; margin: 8px 0 3px; font-size: 34px; line-height: 1; }
.stat-danger { border-left-color: #bd2e38; }
.stat-danger strong { color: #bd2e38; }
.stat-critical { border-left-color: #bd2e38; }
.stat-critical strong { color: #bd2e38; }
.window-picker {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.window-picker a {
  padding: 8px 15px;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.window-picker a:hover { color: var(--ink); }
.window-picker a[aria-current="page"] { background: var(--accent); color: white; }
.window-picker button {
  margin-left: 4px;
  padding: 8px 15px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: white;
  color: #006b67;
  font-size: inherit;
  font-weight: 700;
}
.window-picker button:hover { background: #edf8f7; }
.window-picker button[aria-pressed="true"] { background: var(--accent); color: white; }
.panel { margin-top: 34px; }
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 14px; }
.panel-heading h2 { margin: 0; font-size: 26px; }
.table-joined { border-radius: 7px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.dashboard-grid .panel { margin: 0; }
.vendor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.vendor-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.vendor-list a:nth-child(odd) { border-right: 1px solid var(--line); }
.vendor-list a:hover { background: #f7fbfb; }
.vendor-list strong { color: var(--accent); }
.empty-compact { margin: 0; padding: 20px; color: var(--muted); }
.source-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.source-panel h2 { margin: 0 0 18px; font-size: 26px; }
.source-panel dl { margin: 0; }
.source-panel dl div { margin-top: 13px; }
.source-panel dd { overflow-wrap: anywhere; font-size: 13px; }
.source-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; }
.source-actions button { padding: 8px 13px; }
.additions-panel { margin-top: 38px; }
.status-card { max-width: 900px; margin-top: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.status-list { margin: 0; }
.status-list div { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.status-list div:last-child { border-bottom: 0; }
.success-text { color: #187244; }
.error-text { color: #a3222d; }
.back { display: inline-block; margin-bottom: 24px; }
.detail { max-width: 900px; padding: clamp(24px, 5vw, 56px); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.detail h2 { margin: 16px 0 32px; font-size: 24px; font-weight: 600; }
.detail section { margin-top: 34px; }
.detail section p { white-space: pre-wrap; }
.provenance-panel { margin: 30px 0; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #f8fbfb; }
.provenance-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 15px; }
.provenance-heading h3 { margin: 0; font-size: 19px; }
.provenance-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.provenance-list > div { padding: 15px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.provenance-list > div > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.provenance-list span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.provenance-list p { margin: 9px 0; color: var(--muted); font-size: 13px; }
.provenance-list small { display: block; margin-bottom: 8px; color: var(--muted); }
.record-label { margin: 30px 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cwe-details { display: grid; gap: 12px; }
.cwe-details article { padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--wash); }
.cwe-details article > div { display: flex; gap: 10px; align-items: baseline; }
.cwe-id { color: #006b67; font-size: 13px; font-weight: 800; white-space: nowrap; }
.cwe-details article p { margin: 9px 0; white-space: normal; }
.mitre-link { font-size: 13px; }
.nvd-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; border: 1px solid var(--line); background: var(--line); }
.nvd-facts div { padding: 14px; background: var(--wash); }
.nvd-facts small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.nvd-risk-summary { margin-top: 34px; padding: 20px; border: 1px solid #b8d8d5; border-radius: 7px; background: #f2f9f8; }
.nvd-risk-summary .record-label { margin-top: 0; }
.nvd-risk-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.nvd-risk-heading h3 { margin: 0; font-size: 30px; }
.nvd-risk-heading h3 span { color: #a3222d; font-size: 17px; }
.nvd-risk-heading p { margin: 6px 0 0; color: var(--muted); }
.risk-factor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; border: 1px solid var(--line); background: var(--line); }
.risk-factor-grid > div { padding: 14px; background: var(--paper); }
.risk-factor-grid dd { font-size: 17px; }
.risk-factor-grid small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.section-intro { color: var(--muted); }
.reference-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.reference-list li { padding: 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--wash); }
.reference-list a { overflow-wrap: anywhere; font-weight: 700; }
.reference-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.reference-meta span { padding: 3px 7px; border-radius: 999px; background: #dcefed; color: #006b67; font-size: 11px; font-weight: 800; }
.reference-meta small { color: var(--muted); font-size: 12px; }
.other-references { margin-top: 14px; }
.other-references summary { color: #006b67; cursor: pointer; font-weight: 750; }
.other-references .compact { margin-top: 10px; }
.cvss-technical { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 5px; background: #f8fbfb; }
.cvss-technical summary { color: #006b67; cursor: pointer; font-weight: 750; }
.cvss-technical p { margin: 10px 0; color: var(--muted); white-space: normal; }
.cvss-technical code { overflow-wrap: anywhere; font-size: 13px; }
.nvd-source { margin-top: 12px; color: var(--muted); font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.facts div { padding: 16px; background: var(--wash); }
dt { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
dd { margin: 5px 0 0; font-weight: 700; }

@media (max-width: 800px) {
  .site-header { align-items: flex-start; flex-direction: column; padding-top: 14px; }
  .site-header nav { width: 100%; min-height: 48px; }
  .intro, .results-bar { align-items: stretch; flex-direction: column; }
  .watchlist-banner { align-items: flex-start; flex-direction: column; }
  .metadata { text-align: left; }
  .quick-find { grid-template-columns: 1fr; }
  .quick-find > div { width: 100%; }
  .filter-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .filter-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .provenance-list { grid-template-columns: 1fr; }
  .nvd-facts { grid-template-columns: 1fr; }
  .nvd-risk-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .risk-factor-grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .site-header nav { gap: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .vendor-list { grid-template-columns: 1fr; }
  .vendor-list a:nth-child(odd) { border-right: 0; }
  .provenance-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .risk-factor-grid { grid-template-columns: 1fr; }
  .status-list div { grid-template-columns: 1fr; gap: 4px; }
}
