/* CVE pages (internal/cvepages). The colours, fonts and most components come from the site stylesheet; this
   file adds what the CVE, list and KEV pages need. Every rule is scoped to a cve- class. One box per page:
   "Is my server affected?"; the rest is separated by rules. */
.cve-page { padding-block: 28px 72px; }
.cve-page.section { padding-block: 36px 72px; }
.cve-crumbs { margin-bottom: 1rem; }
.cve-crumbs span { color: var(--text); }
.cve-layout { padding-block: 0 24px; }
.cve-main h2 { font-size: 1.3rem; margin-top: 2.2rem; scroll-margin-top: 16px; }
.cve-main h3 { font-size: 1rem; margin-top: 1.2rem; }
.cve-head { margin-bottom: 1.4rem; }
.cve-id { font-size: clamp(1.9rem, 4vw, 2.5rem); font-family: var(--mono); font-weight: 500; letter-spacing: -0.02em; margin-bottom: .3rem; overflow-wrap: anywhere; }
.cve-title { font-size: 1.2rem; font-weight: 600; margin-bottom: .9rem; overflow-wrap: anywhere; }
.cve-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: .8rem; }
.cve-score { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid currentColor; border-radius: 3px; padding: 2px 9px;
  font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.cve-score b { font: 600 1.1rem var(--mono); letter-spacing: 0; }
.cve-score.sev-none, .cve-score-none { color: var(--muted); }
.cve-flag { display: inline-block; border-radius: 3px; padding: 3px 10px; font-size: .84rem; font-weight: 600; background: var(--bg-soft);
  border: 1px solid var(--rule); color: var(--text); }
.cve-flag:hover { text-decoration: none; border-color: var(--border); color: var(--text); }
.cve-flag-kev { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.cve-flag-kev:hover { color: var(--danger); }
.cve-flag-rejected { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.cve-kev-tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--danger);
  border: 1px solid currentColor; border-radius: 3px; padding: 0 5px; vertical-align: 1px; }

.cve-desc p { white-space: pre-line; overflow-wrap: anywhere; font-size: 1.03rem; }
/* the box "Is my server affected?" */
/* the call to check your own servers, under the head of a CVE that can be in a Linux package */
.cve-watch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 1.4rem 0 1.8rem; padding: 18px 22px; border-left: 4px solid var(--primary); background: var(--bg-soft); }
.cve-watch > div { flex: 1 1 320px; }
.cve-watch h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.cve-watch p { margin: 0; font-size: .94rem; color: var(--text-2); }
.cve-watch .btn { flex: none; }
.cve-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin: 1.8rem 0; }
.cve-box h2 { margin-top: 0; font-size: 1.2rem; }
.cve-check pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; margin: .4rem 0 1rem; }
.cve-cmds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.cve-cmds h3 { font-size: .9rem; margin: .4rem 0 0; }
/* known exploited: a red rule on the left, not a box */
.cve-box.cve-kev { border: 0; border-left: 4px solid var(--danger); border-radius: 0; background: var(--danger-soft); padding: 16px 20px; }
.cve-kev h2 { color: var(--danger); }
.cve-kev .kv dd, .cve-kev p { color: var(--text); }

.cve-metric { border-top: 1px solid var(--rule); padding: 14px 0 6px; }
.cve-metric-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: .5rem; color: var(--muted); font-size: .92rem; }
.cve-vector { display: inline-block; font-size: .82rem; margin-bottom: .6rem; overflow-wrap: anywhere; }
.cve-parts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 .8rem; font-size: .94rem; }
.cve-parts dt { color: var(--muted); }
.cve-parts dd { margin: 0; }
@media (max-width: 560px) { .cve-parts { grid-template-columns: 1fr; } .cve-parts dd { margin-bottom: 6px; } }

.cve-cwes, .cve-refs, .cve-guides { padding-left: 1.2em; }
.cve-cwes li, .cve-refs li, .cve-guides li { margin-bottom: .4rem; overflow-wrap: anywhere; }
.cve-refs .src { margin-left: 4px; }
.cve-affected td { font-size: .9rem; }
.cve-prod { min-width: 200px; overflow-wrap: anywhere; }
.cve-coll a { color: var(--muted); }
.cve-ver { overflow-wrap: anywhere; margin-bottom: 2px; }
.cve-st { display: inline-block; min-width: 6.2em; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.cve-st-affected { color: var(--danger); }
.cve-st-unaffected { color: var(--ok); }
.cve-st-unknown { color: var(--muted); }
.cve-attrib { margin-top: 2.4rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.cve-url { overflow-wrap: anywhere; }

/* the side: at a glance, the product, the lookup; rules between them */
.cve-glance, .cve-cta { border-top: 1px solid var(--rule); padding-top: 14px; }
.cve-cta { margin-top: 1.6rem; }
.cve-glance .kv { font-size: .9rem; }
.cve-cta p { margin-bottom: .8rem; }
.cve-search { margin-top: 1.6rem; }
.cve-search label { margin-bottom: .3rem; }
.cve-search-row { display: flex; gap: 8px; }
.cve-search-row input { flex: 1; min-width: 0; font-family: var(--mono); }
.cve-index-search { max-width: 560px; margin: 1.2rem 0 1rem; }

.cve-rows td { font-size: .9rem; }
.cve-rows td.c-id a { font-family: var(--mono); }
.cve-rows td:nth-child(2) { overflow-wrap: anywhere; }
.cve-pager { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 1.2rem; font-size: .94rem; }
.cve-pager span { color: var(--muted); }
.cve-years, .cve-products { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; }
.cve-products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cve-products li { overflow-wrap: anywhere; }
.cve-list-h { font-size: clamp(1.7rem, 3.5vw, 2.3rem); overflow-wrap: anywhere; }
.cve-filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin: 1.2rem 0; }
.cve-filters select { width: auto; max-width: 280px; }
.cve-filters .check { margin-bottom: 8px; }
.cve-more { border: 0; padding: 0 0 .6rem; }
.cve-more summary { display: inline-flex; color: var(--link); font-weight: 600; font-size: .94rem; }
.cve-more summary::after { content: none; }
.cve-more[open] summary { margin-bottom: .6rem; }
/* phones: each row of a list becomes a block: id and score, the title, then EPSS and dates */
@media (max-width: 640px) {
  .cve-rows thead { display: none; }
  .cve-rows, .cve-rows tbody { display: block; }
  .cve-rows tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .cve-rows td { display: block; padding: 0; border: 0; font-size: .9rem; }
  .cve-rows td.c-id { grid-column: 1; grid-row: 1; white-space: normal; }
  .cve-rows td.c-score { grid-column: 2; grid-row: 1; text-align: right; }
  .cve-rows td.c-title { grid-column: 1 / -1; grid-row: 2; }
  .cve-rows td.c-epss, .cve-rows td.c-added { grid-column: 1; grid-row: 3; text-align: left; color: var(--muted); font-size: .82rem; }
  .cve-rows td.c-date, .cve-rows td.c-due { grid-column: 2; grid-row: 3; text-align: right; color: var(--muted); font-size: .82rem; }
  .cve-rows td.c-epss::before { content: "EPSS "; }
  .cve-rows td.c-added::before { content: "Added "; }
  .cve-rows td.c-due::before { content: "Due "; }
  .cve-affected td { display: block; border: 0; padding: 4px 0; }
  .cve-affected thead { display: none; }
  .cve-affected tr { display: block; border-bottom: 1px solid var(--rule); padding: 6px 0; }
  .cve-prod { min-width: 0; }
}
