/* ── CVE-Datenbank (nur in cve-datenbank.html eingebunden) ────────────────── */

.cve-panel h2 {
  margin-bottom: 22px;
  font-size: 30px;
}

.cve-search-row {
  display: flex;
  gap: 12px;
}

.cve-search-row input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid #cfc7bb;
  border-radius: 0;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
}

.cve-search-row input:focus {
  outline: 2px solid #85aaa0;
  border-color: var(--blue);
}

.cve-search-row .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cve-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.cve-examples button {
  padding: 5px 12px;
  border: 1px solid #cfc7bb;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cve-examples button:hover {
  border-color: var(--orange);
  background: #f3ece1;
}

/* Filter-Chips */
.cve-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-top: 18px;
}

.cve-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cve-filter-label {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cve-chip {
  padding: 6px 14px;
  border: 1px solid #cfc7bb;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cve-chip:hover {
  border-color: var(--orange);
}

.cve-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #f8f5ef;
}

.cve-chip.active[data-severity="CRITICAL"] { border-color: #b84b43; background: #b84b43; }
.cve-chip.active[data-severity="HIGH"]     { border-color: #c97c4e; background: #c97c4e; }
.cve-chip.active[data-severity="MEDIUM"]   { border-color: #b8863c; background: #b8863c; }
.cve-chip.active[data-severity="LOW"]      { border-color: #798c85; background: #798c85; }

/* Paginierung */
.cve-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.cve-pagination span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.cve-pagination .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cve-detail-actions {
  margin-top: 22px;
}

.cve-detail-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cve-output {
  margin-top: 26px;
}

.cve-output:empty {
  margin-top: 0;
}

/* Ergebnisliste */
.cve-result-meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.cve-result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "badge id date"
    "badge desc desc";
  column-gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(169, 120, 69, 0.16);
  border-radius: 0;
  background: rgba(255, 253, 249, 0.84);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cve-result:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: 0 14px 32px rgba(24, 23, 22, 0.1);
}

.cve-result .cve-badge {
  grid-area: badge;
}

.cve-result strong {
  grid-area: id;
  font-family: var(--display);
  letter-spacing: 0;
}

.cve-result-desc {
  grid-area: desc;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cve-result-date {
  grid-area: date;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Severity-Badges */
.cve-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sev-critical { background: #b84b43; color: #fff; }
.sev-high     { background: #c97c4e; color: #fff; }
.sev-medium   { background: #b8863c; color: #fff; }
.sev-low      { background: #798c85; color: #fff; }
.sev-none     { background: #e7eaf0; color: #716e68; }

/* Detailansicht */
.cve-detail-card {
  padding: 26px;
  border: 1px solid rgba(169, 120, 69, 0.3);
  border-left: 4px solid var(--orange);
  background: #fffdf9;
  text-align: left;
}

.cve-detail-head h3 {
  margin: 12px 0 6px;
  font-size: 28px;
  letter-spacing: 0;
}

.cve-dates {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.cve-dates code {
  padding: 2px 6px;
  background: var(--paper);
  font-size: 12px;
  word-break: break-all;
}

.cve-desc {
  font-size: 15px;
  line-height: 1.65;
}

.cve-detail-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}

.cve-detail-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0;
}

.cve-detail-card h4 svg {
  width: 16px;
  height: 16px;
  color: var(--orange);
}

.cve-detail-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
}

.cve-detail-card ul small {
  color: var(--muted);
}

.cve-muted {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cve-refs {
  word-break: break-all;
}

.cve-source {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* Info-Karten & CTA */
.cve-info-card {
  padding: 26px;
  border: 1px solid rgba(169, 120, 69, 0.16);
  border-top: 3px solid var(--orange);
  background: rgba(255, 253, 249, 0.84);
}

.cve-info-card > svg {
  width: 26px;
  height: 26px;
  color: var(--orange);
}

.cve-info-card h3 {
  margin: 14px 0 10px;
  font-size: 20px;
}

.cve-info-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.cve-cta {
  margin-top: 40px;
}

.cve-cta strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 22px;
}

.cve-cta p {
  max-width: 640px;
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
}

/* Statistik-Band */
.cve-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.cve-stat {
  padding: 20px 22px;
  border: 1px solid rgba(169, 120, 69, 0.16);
  border-top: 3px solid var(--orange);
  background: rgba(255, 253, 249, 0.84);
}

.cve-stat b {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1.1;
}

.cve-stat .stat-critical { color: var(--red); }
.cve-stat .stat-kev { color: #b84b43; }

.cve-stat span {
  color: var(--muted);
  font-size: 13px;
}

/* KEV-Badge */
.cve-kev-badge {
  background: #8f2f28;
  color: #fff;
}

.cve-chip-kev.active {
  border-color: #8f2f28;
  background: #8f2f28;
}

.cve-chip-wl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cve-chip-wl svg {
  width: 14px;
  height: 14px;
}

/* Trefferliste: Aktionen, EPSS, Stern */
.cve-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cve-list-meta .cve-result-meta {
  margin: 0;
}

.cve-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #cfc7bb;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cve-action:hover {
  border-color: var(--orange);
  background: #f3ece1;
}

.cve-action svg {
  width: 14px;
  height: 14px;
}

.cve-result {
  position: relative;
  padding-right: 48px;
  cursor: pointer;
}

.cve-result:focus-visible {
  outline: 2px solid #85aaa0;
  outline-offset: 1px;
}

.cve-result-side {
  grid-area: date;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.cve-epss {
  padding: 2px 8px;
  border: 1px solid #cfc7bb;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.cve-star,
.cve-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #cfc7bb;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.cve-star svg,
.cve-remove svg {
  width: 15px;
  height: 15px;
}

.cve-star:hover,
.cve-remove:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.cve-star.saved {
  border-color: #b8863c;
  background: #b8863c;
  color: #fff;
  fill: #fff;
}

.cve-remove:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Detail: EPSS-Box und KEV-Box */
.cve-epss-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid rgba(169, 120, 69, 0.3);
  background: var(--paper);
}

.cve-epss-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cve-epss-box strong {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0;
}

.cve-epss-sub {
  color: var(--muted);
  font-size: 13px;
}

.cve-kev-box {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(184, 75, 67, 0.4);
  border-left: 4px solid var(--red);
  background: #fdf4f3;
}

.cve-kev-box h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #8f2f28;
  font-size: 14px;
  letter-spacing: 0;
}

.cve-kev-box h4 svg {
  width: 16px;
  height: 16px;
}

.cve-kev-box p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.6;
}

.cve-kev-box p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.button.wl-active {
  border-color: #b8863c;
  background: #b8863c;
  color: #fff;
}

.cve-wl-empty {
  background: var(--paper);
  border-left: 4px solid var(--orange);
  color: var(--ink);
}

.cve-sources {
  text-align: center;
}

.cve-sources a {
  color: var(--orange);
}

.cve-steps {
  max-width: 760px;
}

@media (max-width: 900px) {
  .cve-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .cve-search-row {
    flex-direction: column;
  }

  .cve-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cve-stat b {
    font-size: 22px;
  }

  .cve-result {
    grid-template-columns: 1fr;
    grid-template-areas: "badge" "id" "desc" "date";
    row-gap: 6px;
    justify-items: start;
    padding-right: 48px;
  }

  .cve-result-side {
    flex-wrap: wrap;
    justify-self: start;
  }

  .cve-detail-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cve-detail-card {
    padding: 20px;
  }
}
