:root {
  --bg: #f7f7f8; --panel: #ffffff; --text: #1d1d20; --muted: #6b6b75;
  --border: #e2e2e7; --hover: #f1f1f4; --accent: #2f5bd3;
  --crit-bg: #fde3e3; --crit-fg: #a11919; --high-bg: #feebd6; --high-fg: #9a4a00;
  --known-fg: #a11919;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141417; --panel: #1c1c20; --text: #e9e9ee; --muted: #9a9aa6;
    --border: #2e2e35; --hover: #25252b; --accent: #8aa8ff;
    --crit-bg: #4a1717; --crit-fg: #ffb3b3; --high-bg: #45290c; --high-fg: #ffc98f;
    --known-fg: #ff9a9a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
       background: var(--bg); color: var(--text); }
a { color: var(--accent); }
.muted { color: var(--muted); }

header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
         flex-wrap: wrap; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
         background: var(--panel); }
h1 { font-size: 1.25rem; margin: 0 0 .2rem; }
header p { margin: 0; }
.src { font-size: 12px; }

#view-cves { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.25rem; padding: 1.25rem 1.5rem; }
@media (max-width: 860px) { #view-cves { grid-template-columns: 1fr; } }

aside { background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
        padding: 1rem; align-self: start; position: sticky; top: 1rem; }
.f { margin: 0 0 .9rem; border: 0; padding: 0; min-width: 0; }
.f > label, legend { display: block; font-weight: 600; font-size: 12px; text-transform: uppercase;
                     letter-spacing: .03em; color: var(--muted); margin-bottom: .3rem; padding: 0; }
input, select, button { font: inherit; color: inherit; }
input[type=search], input[type=number], input[type=date], select {
  width: 100%; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); min-width: 0; }
.row { display: flex; align-items: center; gap: .4rem; }
.chk { display: inline-flex; align-items: center; gap: .3rem; margin-right: .8rem; cursor: pointer; }
.presets { display: flex; gap: .3rem; margin-bottom: .4rem; }
button { border: 1px solid var(--border); background: var(--bg); border-radius: 6px;
         padding: .3rem .6rem; cursor: pointer; }
button:hover:not(:disabled) { background: var(--hover); }
button:disabled { opacity: .45; cursor: default; }
button.active { border-color: var(--accent); color: var(--accent); }
button.secondary { width: 100%; }

#results { min-width: 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.toolbar p { margin: 0; }
.toolbar select { width: auto; margin-left: .3rem; }
.tablewrap { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; cursor: pointer;
     user-select: none; position: sticky; top: 0; z-index: 1; background: var(--panel); }
th:hover { color: var(--text); }
th.sorted::after { content: " ▾"; }
th.sorted.asc::after { content: " ▴"; }
td { white-space: nowrap; }
td.wide { white-space: normal; min-width: 260px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--hover); }
tbody tr:last-child td { border-bottom: 0; }
td.cve { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.empty { text-align: center; padding: 2rem; color: var(--muted); cursor: default; }

.badge { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.CRITICAL { background: var(--crit-bg); color: var(--crit-fg); }
.badge.HIGH { background: var(--high-bg); color: var(--high-fg); }
.known { color: var(--known-fg); font-weight: 600; }
.overdue { color: var(--muted); }

.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: .8rem; }

dialog { width: min(820px, 94vw); max-height: 88vh; border: 1px solid var(--border); border-radius: 12px;
         padding: 0; background: var(--panel); color: var(--text); }
dialog::backdrop { background: rgb(0 0 0 / .45); }
.dhead { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.2rem;
         border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2; background: var(--panel); }
.dhead h2 { margin: 0; font-size: 1.1rem; }
.close { font-size: 1.3rem; line-height: 1; border: 0; background: none; }
#d-body { padding: 1rem 1.2rem 1.4rem; }
#d-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 1.2rem 0 .4rem; }
#d-body p { margin: .3rem 0; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
ul.refs { padding-left: 1.1rem; margin: .3rem 0; }
ul.refs li { margin: .2rem 0; word-break: break-all; }
.tag { display: inline-block; font-size: 11px; border: 1px solid var(--border); border-radius: 4px;
       padding: 0 .3rem; margin-left: .3rem; color: var(--muted); word-break: normal; }

/* let vendor/product wrap so all columns fit on typical screens */
#view-cves td.vp { white-space: normal; min-width: 90px; max-width: 170px; }
td.wide { min-width: 220px; }

/* ------------------------------------------------------------ tabs */
.tabs { display: flex; gap: .25rem; align-self: flex-end; margin-bottom: -1rem; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
               padding: .55rem .9rem; font-weight: 600; color: var(--muted); }
.tabs button:hover { background: var(--hover); color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ analytics */
:root {
  --sev-crit: #1c5cab; --sev-high: #86b6ef;          /* ordinal blue, validated */
  --st-good: #0ca30c; --st-warn: #fab219; --st-crit: #d03b3b;
  --grid: #e1e0d9; --axis: #c3c2b7;
}
@media (prefers-color-scheme: dark) {
  :root { --sev-crit: #6da7ec; --sev-high: #184f95; --grid: #2c2c2a; --axis: #383835; }
}
#view-analytics { padding: 1.25rem 1.5rem; display: grid; gap: 1.25rem; max-width: 1200px; margin-inline: auto; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; }
.card h2, h2.sect { font-size: 15px; margin: 0; }
h2.sect { margin-bottom: .6rem; }
.sub { margin: .15rem 0 0; font-size: 13px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
             flex-wrap: wrap; margin-bottom: .8rem; }
.foot { font-size: 12px; margin: .5rem 0 0; }

.status { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; align-items: start; }
.status .icon { font-size: 18px; line-height: 1.3; font-weight: 700; }
.status .icon.good { color: var(--st-good); } .status .icon.warn { color: var(--st-warn); }
.status .icon.crit { color: var(--st-crit); }
.status .headline { font-size: 15px; font-weight: 600; margin: 0; }
.status .lines { grid-column: 2; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.status .lines li { margin: .15rem 0; }
.status .lines strong { color: var(--text); font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1.1rem; }
.kpi .label { font-size: 13px; color: var(--muted); margin: 0; }
.kpi .value { font-size: 30px; font-weight: 600; margin: .15rem 0 .35rem; line-height: 1.1; }
.kpi .split { display: flex; gap: 1rem; font-size: 13px; color: var(--muted); margin: 0; }
.kpi .split strong { color: var(--text); font-weight: 600; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem;
      vertical-align: -1px; }
.sw.crit { background: var(--sev-crit); } .sw.high { background: var(--sev-high); }

.legend { display: flex; gap: 1rem; font-size: 13px; color: var(--muted); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .cap { fill: var(--text); font-size: 11px; font-weight: 600; }
.chart .seg-crit { fill: var(--sev-crit); } .chart .seg-high { fill: var(--sev-high); }
.chart .col { cursor: default; outline: none; }
.chart .col.link { cursor: pointer; }
.chart .col.link:hover .seg-crit, .chart .col.link:hover .seg-high { filter: brightness(1.12); }
.chart .col .hit { fill: transparent; }
.chart .col:hover .hit, .chart .col:focus .hit { fill: var(--hover); }
.chart .col:focus-visible .hit { stroke: var(--accent); stroke-width: 1; }
.tableview { margin-top: .6rem; font-size: 13px; }
.tableview summary { cursor: pointer; color: var(--accent); }
.tableview table { margin-top: .5rem; width: auto; min-width: 320px; }
.tableview td, .tableview th { padding: .3rem .8rem; cursor: default; }

.tip { position: fixed; z-index: 10; pointer-events: none; background: var(--panel); color: var(--text);
       border: 1px solid var(--border); border-radius: 8px; padding: .5rem .7rem; font-size: 13px;
       box-shadow: 0 4px 16px rgb(0 0 0 / .15); min-width: 150px; }
.tip .t { color: var(--muted); margin-bottom: .25rem; }
.tip .r { display: flex; align-items: center; gap: .5rem; }
.tip .r b { min-width: 2.2em; text-align: right; font-variant-numeric: tabular-nums; }
.tip .key { width: 12px; height: 3px; border-radius: 2px; }

.tablewrap.flat { border: 0; border-radius: 0; }
table.runs th { cursor: default; }
table.runs tbody tr { cursor: default; }
table.runs td { font-variant-numeric: tabular-nums; }
table.runs td.det { white-space: normal; min-width: 220px; color: var(--muted); }
.res { font-weight: 600; } .res::before { margin-right: .3rem; }
.res.good::before { content: "✓"; color: var(--st-good); }
.res.crit::before { content: "✕"; color: var(--st-crit); }
.res.info::before { content: "↻"; color: var(--muted); }
.cvelink { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.status .visually-label { font-weight: 600; color: var(--muted); }

/* nicknames + enrichment */
.alias { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 4px; font: 600 11px/1.6 system-ui, sans-serif;
         border: 1px solid var(--accent); color: var(--accent); vertical-align: 1px; white-space: nowrap; }
.alias.big { font-size: 12px; vertical-align: 2px; }
.f.two { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.f.two label { display: block; font-weight: 600; font-size: 12px; text-transform: uppercase;
               letter-spacing: .03em; color: var(--muted); margin-bottom: .3rem; }
/* sticky sidebar must scroll on its own when taller than the window */
aside { max-height: calc(100vh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 860px) { aside { position: static; max-height: none; } }
td.cve { white-space: nowrap; }
.aliases { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; max-width: 170px; white-space: normal; }
.aliases .alias { margin-left: 0; }

/* news + early warning */
.tabs .count { display: inline-block; min-width: 1.4em; padding: 0 .35rem; margin-left: .25rem; border-radius: 999px;
               background: var(--crit-bg); color: var(--crit-fg); font-size: 11px; line-height: 1.6; text-align: center; }
.badge.MEDIUM, .badge.LOW, .badge.NONE { background: var(--hover); color: var(--muted); border: 1px solid var(--border); }
#view-early { padding: 1.25rem 1.5rem; display: grid; gap: .8rem; }
#view-early .intro h2 { font-size: 15px; margin: 0; }
#view-early .intro .sub { max-width: 900px; }
.toolbar.ew { flex-wrap: wrap; gap: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .2rem; }
table.ew td.wide { min-width: 240px; white-space: normal; }
td.headline a, .refs.news a { color: var(--text); text-decoration: none; }
td.headline a:hover, .refs.news a:hover { color: var(--accent); text-decoration: underline; }
.outlet { display: inline-block; font-size: 11px; font-weight: 600; color: var(--muted); margin-right: .4rem;
          text-transform: uppercase; letter-spacing: .02em; }
.refs.news { list-style: none; padding-left: 0; }
.refs.news li { word-break: normal; margin: .35rem 0; }
.refs.news .when { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: .5rem; font-size: 12px; }
.note { background: var(--hover); border-left: 3px solid var(--st-warn); padding: .5rem .7rem; border-radius: 4px; }
table.runs tr.click { cursor: pointer; }
table.runs tr.click:hover { background: var(--hover); }
.hotswitch { margin-right: 1rem; }
.hot { display: inline-block; margin-left: .3rem; padding: 0 .35rem; border-radius: 4px; font: 600 11px/1.6 system-ui, sans-serif;
       background: var(--crit-bg); color: var(--crit-fg); vertical-align: 1px; }
select:disabled { opacity: .5; }

/* logo */
.brand { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.brand .logo { height: 48px; width: auto; flex: none; }
@media (max-width: 860px) { .brand .logo { height: 30px; } }
header .src { margin-top: .15rem; }
aside { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* header right side: user in the top-right corner, tabs at the bottom */
header { position: relative; }
.hright { display: flex; flex-direction: column; align-items: flex-end; align-self: stretch; justify-content: flex-end; }
.session { position: absolute; top: .55rem; right: 1.5rem; font-size: 12px; display: flex; gap: .5rem; align-items: center;
           color: var(--muted); }
.session .user { display: inline-flex; align-items: center; gap: .35rem; color: var(--text); }
.session .sep { color: var(--border); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 12px; }
button.link:hover { text-decoration: underline; background: none; }

/* login page */
body.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
              padding: 2rem 1.8rem 1.6rem; box-shadow: 0 8px 30px rgb(0 0 0 / .08); }
.login-card .mark { display: block; margin: 0 auto .7rem; filter: drop-shadow(0 3px 8px rgb(28 79 174 / .3)); }
.login-card h1.wordmark { font-size: 2rem; text-align: center; margin: 0; }
.login-card .tagline { display: block; text-align: center; margin: .8rem 0 1.7rem; }
.login-card > p { text-align: center; margin: .2rem 0 1.4rem; }
.login-card input { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 6px;
                    background: var(--bg); font-size: 15px; }
.login-card input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
button.primary { width: 100%; padding: .6rem; margin-top: .4rem; border: 0; border-radius: 6px; font-weight: 600;
                 background: var(--accent); color: #fff; font-size: 15px; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); }
@media (prefers-color-scheme: dark) { button.primary { color: #0b0b0b; } }
.login-error { color: var(--crit-fg); background: var(--crit-bg); border-radius: 6px; padding: .5rem .7rem; margin: .2rem 0 .6rem; font-size: 13px; }
@media (max-width: 860px) { header { padding-top: 2.1rem; } .session { top: .6rem; right: 1rem; } }

/* software inventory tab */
#view-software { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.25rem; padding: 1.25rem 1.5rem; }
#view-software .sw-status { grid-column: 1 / -1; }
@media (max-width: 860px) { #view-software { grid-template-columns: 1fr; } }
#view-software aside { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow-y: auto; }
#sw-results { min-width: 0; }
.sw-status .headline { font-size: 15px; font-weight: 600; margin: 0 0 .3rem; }
.sw-status .headline strong { font-weight: 700; }
.sw-status .lines { margin: 0 0 .6rem; padding: 0; list-style: none; color: var(--muted); }
.sw-status .lines li { margin: .15rem 0; }
.sw-status .lines strong { color: var(--text); font-weight: 600; }
.sw-status code, .note code { font-size: 12.5px; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.seg label { flex: 1; text-align: center; padding: .35rem .2rem; cursor: pointer; font-size: 13px; border-right: 1px solid var(--border); }
.seg label:last-child { border-right: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .seg label:has(input:checked) { color: #0b0b0b; } }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.small { font-size: 12px; }
td.vcell { white-space: normal; min-width: 180px; max-width: 300px; }
td .vlist { margin-top: .1rem; }
td.ver { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
#sw-table tbody tr { cursor: pointer; }
.chip { display: inline-block; margin: .1rem .15rem .1rem 0; padding: 0 .4rem; border: 1px solid var(--border); border-radius: 4px;
        font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.stale { color: var(--muted); border-style: dashed; }
a.plink { color: var(--text); text-decoration: none; }
a.plink:hover { color: var(--accent); text-decoration: underline; }

/* early warning: update status + rules */
.ew-status { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; margin-top: .7rem; font-size: 13px; }
.ew-status .icon { font-weight: 700; }
.ew-status .icon.good { color: var(--st-good); } .ew-status .icon.warn { color: var(--st-warn); }
.ew-status > span:last-child:not(:nth-child(2)) { flex-basis: 100%; padding-left: 1.2rem; }
.ew-rules ul { margin: .4rem 0 0; padding-left: 1.2rem; max-width: 900px; }
.ew-rules li { margin: .25rem 0; }
.tip .hint { margin-top: .35rem; padding-top: .3rem; border-top: 1px solid var(--border); color: var(--accent); font-size: 12px; }
th .qm { display: inline-block; width: 13px; height: 13px; line-height: 13px; border-radius: 50%; border: 1px solid var(--border);
         font-size: 9px; text-align: center; color: var(--muted); vertical-align: 1px; margin-left: .15rem; }

/* footer */
.site-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 1.6rem 1rem 1.4rem;
               border-top: 1px solid var(--border); margin-top: 1rem; }
.site-footer .wink { font-style: italic; }
body.login-page { grid-template-rows: 1fr auto; }
body.login-page .site-footer { border-top: 0; margin-top: 0; padding-bottom: .4rem; align-self: end; }

/* Lucide icons (icons.svg sprite). Presentation must be set here: <use> doesn't inherit from the sprite. */
.ic { width: 1.05em; height: 1.05em; vertical-align: -0.17em; flex: none;
      fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs button .ic { width: 16px; height: 16px; margin-right: .3rem; vertical-align: -3px; opacity: .85; }
.tabs button[aria-selected="true"] .ic { opacity: 1; color: var(--accent); }
.session .user .ic { width: 18px; height: 18px; color: var(--muted); }
button.link .ic { width: 14px; height: 14px; vertical-align: -2px; }
.status .icon .ic, .ew-status .icon .ic { width: 20px; height: 20px; vertical-align: -4px; }
.status .icon { line-height: 1; padding-top: 1px; }
.hot .ic, .stale-tag .ic { width: 11px; height: 11px; margin-right: .2rem; vertical-align: -1px; }
/* keep logo/title and tabs on one row on wide screens; the title side shrinks and wraps instead */
@media (min-width: 1800px) {
  header { flex-wrap: nowrap; }
  header .brand { flex: 1 1 auto; min-width: 0; }
  header .hright { flex: none; }
}

/* Systrust product brand */
.wordmark { font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--text); }
.wordmark span { color: var(--brand); }
.tagline { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
:root { --brand: #2f6fe0; }
@media (prefers-color-scheme: dark) { :root { --brand: #7aa5f5; } }
header .product { display: flex; align-items: center; gap: .6rem; flex: none; text-decoration: none; color: inherit;
                  padding-right: 1.1rem; border-right: 1px solid var(--border); align-self: stretch; }
header .product .mark { width: 44px; height: 44px; }
header .wordmark-wrap { display: flex; flex-direction: column; gap: .3rem; }
header .wordmark { font-size: 1.65rem; }
header .brand-text { min-width: 0; }
@media (max-width: 860px) {
  header .product .mark { width: 32px; height: 32px; }
  header .wordmark { font-size: 1.3rem; }
  header .tagline { display: none; }
}
@media (max-width: 600px) { header .brand { flex-wrap: wrap; } header .product { border-right: 0; } }
.login-card .for-org { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.4rem;
                       padding-top: 1.1rem; border-top: 1px solid var(--border); font-size: 12px; }
.login-card .for-org img { height: 30px; width: auto; }
.site-footer strong { color: var(--text); font-weight: 700; }

/* sync history: unchanged runs (shown via "Show unchanged runs") */
table.runs tr.quiet td { color: var(--muted); }
.res.none { font-weight: 400; }
.card-head > label.chk { white-space: nowrap; font-size: 13px; }

/* audit tab */
#view-audit { display: grid; gap: 1.25rem; padding: 1.25rem 1.5rem; max-width: 1400px; margin-inline: auto; }
.au-status .headline { display: flex; align-items: center; gap: .45rem; font-size: 16px; font-weight: 700; margin: 0 0 .4rem; }
.au-status .headline .ic { width: 22px; height: 22px; }
.au-status .headline.good .ic { color: var(--st-good); }
.au-status .headline.bad { color: var(--st-crit); }
.au-status .lines { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.au-status .lines li { margin: .2rem 0; }
.au-status .lines strong { color: var(--text); }
code.hash { font-size: 12px; word-break: break-all; user-select: all; color: var(--text); }
.warnnum { color: var(--crit-fg); font-weight: 600; }
.ic.warnic { color: var(--st-warn); vertical-align: -3px; }
.au-filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; margin: .2rem 0 .7rem; font-size: 13px; }
.au-filters label { display: flex; flex-direction: column; gap: .2rem; color: var(--muted); }
.au-filters label.grow { flex: 1 1 220px; }
.au-filters select, .au-filters input { padding: .35rem .45rem; border: 1px solid var(--border); border-radius: 6px;
                                        background: var(--bg); color: var(--text); font-size: 13px; }
a.btn { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; border: 1px solid var(--border);
        border-radius: 6px; text-decoration: none; color: var(--text); font-size: 13px; white-space: nowrap; background: var(--panel); }
a.btn:hover { border-color: var(--accent); color: var(--accent); }
table.au td.det { white-space: normal; min-width: 260px; }
table.au tr.au-detail td { background: var(--hover); }
table.au tr.au-detail pre { margin: .4rem 0 0; font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
table.au code { font-size: 12px; }
.hashcell { white-space: nowrap; }
.res.none::before { content: "·"; color: var(--muted); }
.res.crit { color: var(--crit-fg); }
/* CVE detail: change history */
ol.hist { list-style: none; margin: .3rem 0 .4rem; padding: 0 0 0 .9rem; border-left: 2px solid var(--border); }
ol.hist li { position: relative; margin: 0 0 .8rem; }
ol.hist li::before { content: ""; position: absolute; left: calc(-.9rem - 6px); top: .35rem; width: 10px; height: 10px;
                     border-radius: 50%; background: var(--panel); border: 2px solid var(--muted); }
ol.hist li.h-added::before { border-color: var(--st-good); }
ol.hist li.h-updated::before { border-color: var(--accent); }
ol.hist li.h-removed::before { border-color: var(--st-crit); }
ol.hist .h-top { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
ol.hist details { margin-top: .25rem; font-size: 12.5px; }
ol.hist summary { cursor: pointer; color: var(--accent); }
table.hist-fields { border-collapse: collapse; margin-top: .3rem; }
table.hist-fields th { text-align: left; font-weight: 600; padding: .15rem .8rem .15rem 0; vertical-align: top; white-space: nowrap; }
table.hist-fields td { padding: .15rem .4rem .15rem 0; vertical-align: top; word-break: break-word; }
table.hist-fields td.old { color: var(--muted); text-decoration: line-through; }
.site-footer .build { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

/* "new since your last visit" */
.new { display: inline-block; padding: 0 .35rem; border-radius: 4px; font: 700 10px/1.7 system-ui, sans-serif;
       letter-spacing: .05em; background: var(--accent); color: #fff; vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .new { color: #0b0b0b; } }
.tabs .count.new { background: var(--accent); color: #fff; font-weight: 700; }
@media (prefers-color-scheme: dark) { .tabs .count.new { color: #0b0b0b; } }

/* overview (start page) */
#view-overview { padding: 1.25rem 1.5rem; display: grid; gap: 1.25rem; max-width: 1200px; margin-inline: auto; }
.ov-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.5rem; }
.ov-head .ov-title { flex: 1 1 320px; }
.ov-head h2 { font-size: 18px; margin: 0; }
.ov-seg { flex: none; min-width: 330px; }
.ov-seen { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 13px; color: var(--muted);
           padding-top: .6rem; border-top: 1px solid var(--border); }
.ov-seen button.link { font-size: 13px; }
.ov-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.ov-tile { display: flex; flex-direction: column; gap: .1rem; background: var(--panel); border: 1px solid var(--border);
           border-top: 3px solid var(--border); border-radius: 10px; padding: .8rem 1rem; text-decoration: none; color: var(--text); }
.ov-tile:hover { border-color: var(--accent); }
.ov-tile.crit { border-top-color: var(--st-crit); } .ov-tile.warn { border-top-color: var(--st-warn); }
.ov-tile.good { border-top-color: var(--st-good); }
.ov-tile .label { font-size: 13px; color: var(--muted); }
.ov-tile .value { font-size: 28px; font-weight: 600; line-height: 1.15; }
.ov-tile .value .new { font-size: 10px; vertical-align: 6px; }
.ov-tile .sub { font-size: 12.5px; color: var(--muted); }
.ov-tile .sub strong { color: var(--text); }
a.more { font-size: 13px; white-space: nowrap; text-decoration: none; }
a.more:hover { text-decoration: underline; }
.ov-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1.25rem; }
.empty-note { margin: .2rem 0; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.empty-note .ic { color: var(--st-good); width: 18px; height: 18px; }
table.ov tr.click { cursor: pointer; }
table.ov tr.click:hover { background: var(--hover); }
table.ov td.wide { white-space: normal; min-width: 220px; }
table.ov td.det { white-space: normal; min-width: 240px; }
table.ov .outlet { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.tag.known { color: var(--known-fg); border-color: currentColor; }
.more-note { margin: .5rem 0 0; }
ul.ov-list { list-style: none; margin: 0; padding: 0; }
ul.ov-list li { display: grid; grid-template-columns: 8.2rem 1fr; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--border); font-size: 13.5px; }
ul.ov-list li:first-child { border-top: 0; }
ul.ov-list li.click { cursor: pointer; } ul.ov-list li.click:hover { background: var(--hover); }
ul.ov-list .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
ul.ov-list .res { margin: 0 .3rem; }
.ic.okic { color: var(--st-good); } .ic.badic { color: var(--st-crit); }
ul.ov-ops { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
ul.ov-ops li { display: flex; gap: .5rem; align-items: flex-start; font-size: 14px; }
ul.ov-ops li .ic { width: 18px; height: 18px; margin-top: 1px; }
ul.ov-ops li.good .ic { color: var(--st-good); } ul.ov-ops li.warn .ic { color: var(--st-warn); }
ul.ov-ops li.crit .ic { color: var(--st-crit); }
@media (max-width: 860px) { .ov-seg { min-width: 0; flex-basis: 100%; } .ov-two { grid-template-columns: 1fr; } }

/* software: manual entries */
.toolbar .addbtn { margin-left: auto; margin-right: .8rem; }
button.addbtn { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border: 1px solid var(--accent);
                border-radius: 6px; background: var(--panel); color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
button.addbtn:hover { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { button.addbtn:hover { color: #0b0b0b; } }
button.addbtn.small { font-size: 12px; padding: .2rem .55rem; }
.tag.manual { color: var(--accent); border-color: currentColor; }
.tag.manual .ic { width: 11px; height: 11px; margin-right: .2rem; vertical-align: -1px; }
.h3row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
td.acts { white-space: nowrap; text-align: right; }
button.iconbtn { border: 1px solid transparent; background: none; padding: .2rem; border-radius: 5px; color: var(--muted); cursor: pointer; }
button.iconbtn:hover { border-color: var(--border); color: var(--accent); background: var(--hover); }
button.iconbtn.danger:hover { color: var(--crit-fg); }
button.iconbtn .ic { width: 16px; height: 16px; vertical-align: -3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
dialog.form-dlg { width: min(640px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--border); border-radius: 12px;
                  background: var(--panel); color: var(--text); }
dialog.form-dlg::backdrop { background: rgb(0 0 0 / .45); }
.swf-body { padding: .4rem 1.3rem .2rem; }
.swf-body fieldset { border: 1px solid var(--border); border-radius: 8px; margin: .7rem 0; padding: .5rem .9rem .8rem; }
.swf-body legend { font-weight: 700; font-size: 13px; padding: 0 .3rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .9rem; }
.grid2 .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.swf-body input, .swf-body textarea { width: 100%; padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 6px;
                                       background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.swf-body input:focus, .swf-body textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.swf-body .req { color: var(--crit-fg); }
.swf-body .hint { margin: .25rem 0 0; color: var(--muted); min-height: 1em; }
.swf-foot { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: .8rem 1.3rem 1.1rem;
            border-top: 1px solid var(--border); }
.swf-foot button.primary { width: auto; padding: .5rem 1.2rem; margin: 0; }
dialog.form-dlg[open] { max-height: calc(100vh - 2rem); display: flex; }
dialog.form-dlg form { display: flex; flex-direction: column; min-height: 0; width: 100%; }
dialog.form-dlg .swf-body { overflow-y: auto; min-height: 0; }
.swf-body fieldset { margin: .5rem 0; }

/* EOL tab */
#view-eol { padding: 1.25rem 1.5rem; display: grid; gap: 1.25rem; max-width: 1300px; margin-inline: auto; }
.eol-tiles .ov-tile { cursor: pointer; }
.eol-tiles .ov-tile.sel { outline: 2px solid var(--accent); outline-offset: -1px; }
.lc-badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
            border: 1px solid var(--border); color: var(--muted); }
.lc-badge.crit { background: var(--crit-bg); color: var(--crit-fg); border-color: transparent; }
.lc-badge.warn { background: var(--high-bg); color: var(--high-fg); border-color: transparent; }
.lc-badge.good { color: var(--st-good); border-color: currentColor; }
.lc-past { color: var(--crit-fg); font-weight: 600; }
.lc-soon { color: var(--high-fg); font-weight: 600; }
table.eol td.src { white-space: nowrap; font-size: 13px; }
table.eol tr.lc-machines td { background: var(--hover); }
table.eol tr.lc-machines .chip { margin-bottom: .2rem; }
.ic.xl { width: 12px; height: 12px; vertical-align: -1px; }
.eolstale { align-self: center; }
.lc-hidden { color: var(--high-fg); } .lc-hidden .ic { vertical-align: -2px; } .lc-hidden button.link { font-size: inherit; }
button.iconbtn.labeled { display: inline-flex; align-items: center; gap: .25rem; font-size: 12.5px; color: var(--accent);
                         border-color: var(--border); padding: .15rem .45rem; }
button.iconbtn.labeled .ic { width: 14px; height: 14px; }
#sw-table th.acts { width: 1%; }
.tag.lc-unver { color: var(--high-fg); border-color: currentColor; }
.tag.lc-unver .ic, .lc-unver-txt .ic { width: 11px; height: 11px; margin-right: .2rem; vertical-align: -1px; }
.lc-unver-txt { color: var(--high-fg); }
.lc-note { max-width: 560px; margin-top: .15rem; }
.tag.lc-ver { color: var(--st-good); border-color: currentColor; }
.tag.lc-ver .ic { width: 11px; height: 11px; margin-right: .2rem; vertical-align: -1px; }
table.eol td.src .iconbtn.labeled { margin-top: .2rem; }
.swf-foot .grow { flex: 1; }
button.link.danger { color: var(--crit-fg); }

/* Overview: all seven tiles in one row on wide screens; even rows (4 + 3, then 2 per row) when narrower */
#ov-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .75rem; }
#ov-tiles .ov-tile { padding: .7rem .8rem; }
#ov-tiles .ov-tile .label { font-size: 12.5px; line-height: 1.3; min-height: 2.6em; }
#ov-tiles .ov-tile .value { font-size: 26px; }
#ov-tiles .ov-tile .sub { font-size: 12px; }
@media (max-width: 1100px) { #ov-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px)  { #ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Overview: eight tiles. One row on wide screens, 4 + 4 below, 2 per row on phones (never an orphan tile). */
#view-overview { max-width: 1440px; }
#ov-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (max-width: 1500px) { #ov-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px)  { #ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Exposure tab */
#view-exposure { padding: 1.25rem 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; max-width: 1400px; margin-inline: auto; }
.ex-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .ex-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ex-tiles .ov-tile { cursor: pointer; }
table.ex td.cve .ex-name, table.exd td.cve .ex-name { font-family: system-ui, sans-serif; font-size: 12px; white-space: normal; max-width: 320px; }
table.ex td.det { min-width: 220px; }
.exchk { align-self: center; white-space: nowrap; }
.ex-cve { margin: .35rem 0 .6rem; }
.ex-cve .chip { margin-bottom: .15rem; }
/* checkboxes inside filter bars: box beside its label, all on one row of their own */
.au-filters label.chk { flex-direction: row; align-items: center; gap: .4rem; color: var(--text); white-space: nowrap; }
.au-filters .checks { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* Exposure: assessments by people */
.lc-badge.info { color: var(--accent); border-color: currentColor; }
.lc-badge.acc { color: var(--high-fg); border-color: currentColor; border-style: dashed; }
table.ex .ex-by { margin-top: .2rem; white-space: nowrap; }
table.ex .ex-by .ic, .ex-decbox .ic, .ex-cve .ic, #ex-status .lines .ic { width: 13px; height: 13px; vertical-align: -2px; }
.ex-decbox { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-top: .6rem; padding: .55rem .75rem;
             border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.ex-decbox.expired { border-color: var(--crit-fg); }
.ex-decbox > div:first-child { min-width: 0; }
.ex-decacts { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; }
.exf-opts { display: grid; gap: .45rem; margin: .2rem 0 .8rem; }
.exf-opts label { display: flex; gap: .55rem; align-items: flex-start; padding: .45rem .6rem; border: 1px solid var(--border);
                  border-radius: 8px; cursor: pointer; }
.exf-opts label:has(input:checked) { border-color: var(--accent); background: var(--hover); }
.exf-opts input { margin-top: .2rem; accent-color: var(--accent); }
.exf-vers { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .3rem; }
.exf-vers label.chk { display: inline-flex; align-items: center; gap: .35rem; font-size: 13px; }
.swf-body .flabel { display: block; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.swf-body select { width: 100%; padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 6px;
                   background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
button.primary.danger { background: var(--crit-fg); }
button.primary.danger:hover:not(:disabled) { background: var(--crit-fg); }
tr.muted-row td { color: var(--muted); }
table.exd td.det { min-width: 260px; max-width: 460px; }
.swf-body input[type=radio], .swf-body input[type=checkbox] { width: auto; padding: 0; flex: none; }
.exf-opts label > span { flex: 1; }
