/* Tokens. Light is the default; theme.js sets data-theme="dark" on <html> for the dark theme.
   Colour carries meaning only: severity, priority and status. Numbers and surfaces stay neutral. */
:root {
  color-scheme: light;
  --bg: #e5e9ef;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: #0f1b2d;
  --heading: #0b1f3a;
  --muted: #4d5d71;
  --faint: #8a97a8;
  --line: #d4dbe4;
  --line-strong: #bcc6d2;
  --hover: #eef3f9;
  --selected: #e3ecf8;
  --accent: #1d5fd1;
  --accent-ink: #ffffff;
  --topbar: #0b1f3a;
  --topbar-ink: #ffffff;
  --topbar-muted: #a9bdd6;
  --critical: #c8312b;
  --high: #e0701b;
  --medium: #d29f00;
  --low: #2f8f5b;
  --info: #3b74d9;
  --kev: #7a3fd1;
  --good: #1f8a52;
  --bad: #c8312b;
  --amber: #c98a00;
  --p1: var(--critical);
  --p2: var(--high);
  --p3: var(--medium);
  --p4: var(--low);
  --chart-grid: #e6eaf0;
  --band: #0b1f3a;
  --band-ink: #ffffff;
  --band-muted: #a9bdd6;
  --band-line: rgba(255, 255, 255, 0.14);
  --band-alert: #ff6b5e;
  --band-warn: #f5b83d;
  --band-good: #5fd39a;
  --radius: 6px;
  --radius-sm: 4px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0d12;
  --surface: #141a22;
  --surface-2: #1a212b;
  --ink: #e4eaf1;
  --heading: #f2f5f9;
  --muted: #9aa7b6;
  --faint: #6c7886;
  --line: #283241;
  --line-strong: #3a4659;
  --hover: #1d2530;
  --selected: #1d2b40;
  --accent: #5b95ff;
  --accent-ink: #0d1117;
  --topbar: #080c11;
  --topbar-ink: #e4eaf1;
  --topbar-muted: #8696aa;
  --critical: #f0564b;
  --high: #f08b3e;
  --medium: #e2b52f;
  --low: #45b37d;
  --info: #6a9bf0;
  --kev: #a37cf0;
  --good: #45b37d;
  --bad: #f0564b;
  --amber: #e2b52f;
  --chart-grid: #222b36;
  --band: #1c2633;
  --band-ink: #f2f5f9;
  --band-muted: #9aa7b6;
  --band-line: #2e3a4a;
  --band-alert: #ff6b5e;
  --band-warn: #f5b83d;
  --band-good: #5fd39a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }

/* ---------- sign-in card ---------- */
body.auth { display: grid; place-items: center; padding: 16px; font-size: 16px; line-height: 1.5; }
.card { width: 100%; max-width: 460px; padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.card h1 { margin: 0 0 16px; font-size: 26px; font-weight: 600; color: var(--heading); }
.card h2 { margin: 4px 0 12px; font-size: 19px; font-weight: 600; }
.card p { margin: 0 0 16px; color: var(--muted); }
.who { margin-bottom: 4px; font-size: 14px; }
.reports { margin: 0 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.reports li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.code { font-size: 13px; }

button { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; }
.primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.primary:hover { filter: brightness(1.08); }
.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.secondary:hover { border-color: var(--muted); }
.link { background: none; border: 0; padding: 4px 0; color: var(--accent); }
a.button { display: inline-flex; align-items: center; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none; white-space: nowrap; }
button:focus-visible, select:focus-visible, input:focus-visible, tr:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.notice { padding: 12px 14px; color: var(--ink); background: color-mix(in srgb, var(--amber) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--surface)); border-radius: var(--radius); }
.notice.slim { padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }

/* ---------- app frame: navy sidebar of reports, white top bar (the Design mockup) ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; background: var(--topbar); color: var(--topbar-ink); z-index: 30; }
.side-brand { padding: 18px 18px 14px; border-bottom: 1px solid color-mix(in srgb, var(--topbar-ink) 12%, transparent); }
.side-brand img { display: block; width: 100%; max-width: 200px; height: auto; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); color: var(--topbar-muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.side-nav a .ic { width: 19px; height: 19px; }
.side-nav a:hover { color: var(--topbar-ink); background: color-mix(in srgb, var(--topbar-ink) 7%, transparent); }
.side-nav a[aria-current] { color: var(--topbar-ink); background: color-mix(in srgb, var(--accent) 55%, var(--topbar)); }
.side-nav a:focus-visible { outline: 2px solid var(--topbar-ink); outline-offset: -2px; }
/* ISG-only pages: their own section, an amber marker so they never read as part of the client's view */
.side-group { margin: 14px 12px 4px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--topbar-ink) 14%, transparent);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-warn); }
.side-nav a.admin { position: relative; }
.side-nav a.admin::before { content: ""; position: absolute; left: 2px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--band-warn); }
.side-foot { margin: auto 0 0; padding: 14px 20px; font-size: 11px; color: var(--topbar-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 24px; min-height: 64px; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); color: var(--ink); padding: 6px 8px; }
.menu-btn .ic { width: 20px; height: 20px; display: block; }
.top-title { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.top-title strong { font-size: 19px; font-weight: 700; color: var(--heading); line-height: 1.2; }
.top-client { font-size: 13px; color: var(--muted); }
.client-pick { display: flex; align-items: center; gap: 8px; }
.client-pick select { min-width: 0; padding: 3px 8px; font-weight: 600; }
.admin-tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); padding: 2px 7px; border-radius: var(--radius-sm); white-space: nowrap; }
.top-tools { display: flex; align-items: center; gap: 14px; }
.range select { min-width: 150px; font-weight: 600; }
.range select:disabled { opacity: 0.55; cursor: not-allowed; }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px; border-radius: var(--radius); }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: var(--hover); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--topbar); color: var(--topbar-ink); font-size: 13px; font-weight: 700; flex: none; }
.user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-text strong { font-size: 13.5px; font-weight: 600; color: var(--heading); white-space: nowrap; }
.user-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); display: grid; gap: 6px; min-width: 180px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(10, 20, 35, 0.18); }
.user-menu .menu button { width: 100%; text-align: left; }
.report { width: 100%; max-width: 1660px; margin: 0 auto; padding: 22px 24px 40px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform 0.18s ease-out; box-shadow: 10px 0 30px rgba(10, 20, 35, 0.25); }
  .shell.nav-open .sidebar { transform: none; }
  .menu-btn { display: inline-flex; }
  .user-text { display: none; }
  .top-title strong { font-size: 16px; }
}
@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .top-tools { width: 100%; }
  .range { flex: 1; } .range select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ---------- page building blocks (ui.js): banner, tabs, KPI tiles, panels. Every report uses them. ---------- */
.page-banner { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; padding: 20px 26px; margin-bottom: 14px; border-radius: var(--radius);
  color: var(--band-ink); background: linear-gradient(115deg, var(--band) 0%, color-mix(in srgb, var(--band) 72%, var(--accent)) 100%); }
.page-banner h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; color: var(--band-ink); }
.page-banner p { margin: 4px 0 0; color: var(--band-muted); font-size: 15px; }
.page-banner-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.page-banner-side strong { font-size: 15px; }
.page-banner-side span { color: var(--band-muted); font-size: 12px; }
.page-banner select { background: color-mix(in srgb, var(--band-ink) 10%, var(--band)); color: var(--band-ink); border-color: var(--band-line); margin-bottom: 4px; }
.page-tabs { margin: -4px 0 14px; border-bottom: 1px solid var(--line-strong); }

.tiles { display: grid; gap: 12px; margin-bottom: 14px; }
.tiles.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tiles.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tiles.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile { --tone: var(--accent); display: flex; align-items: center; gap: 14px; padding: 16px 16px; border-radius: var(--radius); min-width: 0; cursor: default;
  background: color-mix(in srgb, var(--tone) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 22%, var(--line)); }
.tile.bad { --tone: var(--bad); } .tile.warn { --tone: var(--amber); } .tile.good { --tone: var(--good); }
.tile-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, var(--surface)); }
.tile-ic .ic { width: 28px; height: 28px; }
.tile.blue .tile-ic { color: var(--surface); background: var(--tone); }
.tile-body { min-width: 0; }
.tile .label { display: block; color: color-mix(in srgb, var(--tone) 75%, var(--ink)); }
.tile strong { display: block; font-size: 36px; line-height: 1.05; font-weight: 700; color: var(--heading); letter-spacing: -0.02em; }
.tile.bad strong { color: var(--bad); } .tile.warn strong { color: color-mix(in srgb, var(--amber) 85%, var(--ink)); }
.tile-delta { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--faint); }
.tile-delta.good { color: var(--good); } .tile-delta.bad { color: var(--bad); }

/* Panel: navy header bar with icon, title, an optional note and tools; the body is inset, tables run edge to edge. */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; margin-bottom: 14px; }
.panel-head { --head: var(--band); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 18px; background: var(--head); color: var(--band-ink); }
.panel.purple > .panel-head { --head: color-mix(in srgb, var(--kev) 70%, var(--band)); }
.panel-head h2 { margin: 0 auto 0 0; font-size: 15px; font-weight: 600; color: var(--band-ink); }
.panel-head .ic { width: 20px; height: 20px; }
.panel-head h2 + .panel-note { margin-left: -2px; }
.panel-note { color: var(--band-muted); font-size: 12.5px; }
.panel > :not(.panel-head):not(.table-scroll) { margin-left: 18px; margin-right: 18px; }
.panel > :last-child:not(.table-scroll):not(.panel-head) { margin-bottom: 18px; }
.panel > .panel-head + :not(.table-scroll), .panel > :first-child:not(.panel-head):not(.table-scroll) { margin-top: 16px; }
.head-btn { display: inline-flex; align-items: center; padding: 5px 12px; font-size: 12.5px; font-weight: 600; border-radius: var(--radius-sm); text-decoration: none; cursor: pointer;
  background: transparent; color: var(--band-ink); border: 1px solid color-mix(in srgb, var(--band-ink) 40%, transparent); }
.head-btn:hover { background: color-mix(in srgb, var(--band-ink) 12%, transparent); }

.tabs { display: flex; gap: 2px; overflow-x: auto; margin-bottom: -1px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 9px 12px 11px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--heading); border-bottom-color: var(--accent); }

.filters { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
select, input[type=search] { font: inherit; font-size: 13px; letter-spacing: 0; text-transform: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); padding: 6px 10px; color: var(--ink); min-width: 160px; }

/* ---------- shared labels and marks ---------- */
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.mark { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--info); flex: none; }
.mark[data-sev=Critical], .mark[data-prio="1"] { background: var(--p1); }
.mark[data-sev=High], .mark[data-prio="2"] { background: var(--p2); }
.mark[data-sev=Medium], .mark[data-prio="3"] { background: var(--p3); }
.mark[data-sev=Low], .mark[data-prio="4"] { background: var(--p4); }
.mark[data-sev=KEV] { background: var(--kev); }
.mark[data-sev=Ransomware] { background: var(--critical); }
.mark[data-sev=Total] { background: var(--faint); }
.delta { font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.down { color: var(--good); }
.delta.up { color: var(--bad); }
.delta.flat { color: var(--faint); }

.mix-rows.bands li { grid-template-columns: 8px 1fr auto 56px; padding: 9px 0; }
.mix-rows.bands li:first-child { border-top: 0; }

/* ---------- exposure matrix (risk dashboard) ---------- */
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { border-left: 0; background: none; color: var(--ink); text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix thead th { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line-strong); }
.matrix thead th span { display: inline-flex; align-items: center; gap: 6px; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 18px; }
.matrix th:last-child, .matrix td:last-child { padding-right: 18px; }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix tbody tr:nth-child(even) { background: none; }
.matrix tbody th { text-transform: none; letter-spacing: 0; font-size: inherit; }
.matrix .row-head strong { display: block; font-size: 15px; font-weight: 600; color: var(--heading); }
.matrix .row-head small { color: var(--muted); font-size: 12px; }
.matrix .row-head .hosts-line { display: block; color: var(--ink); font-weight: 600; }
.matrix .cell { display: inline-flex; align-items: baseline; gap: 8px; justify-content: flex-end; }
.matrix .cell strong { font-size: 22px; font-weight: 600; color: var(--heading); min-width: 2ch; }
.matrix .cell .delta { min-width: 46px; text-align: left; }

/* ---------- severity and priority mix (risk dashboard) ---------- */
.mix + .mix { margin-top: 22px; }
.mix-bar { display: flex; height: 12px; border-radius: 2px; overflow: hidden; background: var(--surface-2); margin: 8px 0 10px; gap: 2px; }
.mix-bar > span { display: block; height: 100%; min-width: 2px; }
.mix-bar > span[data-k="1"] { background: var(--p1); } .mix-bar > span[data-k="2"] { background: var(--p2); }
.mix-bar > span[data-k="3"] { background: var(--p3); } .mix-bar > span[data-k="4"] { background: var(--p4); }
.mix-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.mix-rows li { display: grid; grid-template-columns: 8px 1fr auto 44px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.mix-rows strong { font-weight: 600; text-align: right; }
.mix-rows small { color: var(--muted); text-align: right; }
.mix-total { display: flex; justify-content: space-between; align-items: baseline; }
.mix-total strong { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ---------- panels, grids, charts ---------- */
.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .panel { margin-bottom: 0; }
.chart { height: 260px; }
.chart.tall { height: 300px; }
.empty { color: var(--muted); font-size: 13px; padding: 20px 0; margin: 0; }
.footnote { color: var(--muted); font-size: 12px; background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius-sm); margin: 14px 0 0; }
.muted { color: var(--muted); font-size: 12px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--heading); text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; white-space: nowrap; border-bottom: 1px solid var(--line-strong); }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th + th, td + td { border-left: 1px solid var(--line); }
table.compact th, table.compact td { padding: 8px 10px; font-size: 12.5px; }
table.clickable tbody tr { cursor: pointer; }
table.clickable tbody tr:hover { background: var(--hover); }
table.clickable tbody tr.selected { background: var(--selected); }

/* Refresh now on Data Health: requested, picked up, rebuilt */
.refresh-run { margin: 0 18px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.refresh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.refresh-head .secondary { padding: 5px 12px; font-size: 12.5px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps li { position: relative; padding-left: 22px; font-size: 12.5px; }
.steps li::before { content: ""; position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--faint); box-sizing: border-box; }
.steps li strong { display: block; }
.steps li span { color: var(--muted); }
.steps li.done::before { background: var(--good); border-color: var(--good); }
.steps li.active::before { border-color: var(--accent); border-top-color: transparent; animation: refresh-spin 1s linear infinite; }
.steps li.warn::before { background: var(--amber); border-color: var(--amber); }
.steps li.bad::before { background: var(--bad); border-color: var(--bad); }
.steps li.bad span { color: var(--bad); }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.active::before { animation: none; border-top-color: var(--accent); } }
@container (max-width: 600px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* All Clients: score, count and data cells with a small change line beside them */
.all-clients td { white-space: nowrap; }
.ac-score, .ac-num, .ac-data { display: inline-flex; align-items: center; gap: 8px; }
.ac-data .link { padding: 0; }
.chg { font-size: 11.5px; font-weight: 600; color: var(--faint); }
.chg.good { color: var(--good); } .chg.bad { color: var(--bad); }

.sev, .st, .pill, .status, .kev-badge, .exp { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.sev::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--info); }
.sev.s1::before { background: var(--p1); } .sev.s2::before { background: var(--p2); } .sev.s3::before { background: var(--p3); } .sev.s4::before { background: var(--p4); }
.bar-sev { display: inline-block; width: 4px; height: 20px; border-radius: 1px; background: var(--info); }
.bar-sev.s1 { background: var(--p1); } .bar-sev.s2 { background: var(--p2); } .bar-sev.s3 { background: var(--p3); } .bar-sev.s4 { background: var(--p4); }
.exp { color: var(--muted); font-weight: 500; } .exp.ext { color: var(--ink); font-weight: 600; }
.kev-badge { color: var(--kev); border: 1px solid color-mix(in srgb, var(--kev) 50%, transparent); padding: 1px 6px; border-radius: var(--radius-sm); font-size: 11px; letter-spacing: 0.04em; }
.st, .pill, .status { padding: 2px 8px; border-radius: var(--radius-sm); }
.st.open { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.st.resolved { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.pill.p1 { color: var(--p1); background: color-mix(in srgb, var(--p1) 13%, transparent); }
.pill.p2 { color: var(--p2); background: color-mix(in srgb, var(--p2) 13%, transparent); }
.pill.p3 { color: color-mix(in srgb, var(--p3) 80%, var(--ink)); background: color-mix(in srgb, var(--p3) 15%, transparent); }
.pill.p4 { color: var(--p4); background: color-mix(in srgb, var(--p4) 13%, transparent); }
.status.good { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.status.warn { color: color-mix(in srgb, var(--amber) 80%, var(--ink)); background: color-mix(in srgb, var(--amber) 15%, transparent); }
.status.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.status.none { color: var(--muted); background: var(--surface-2); }
.trend { font-size: 16px; font-weight: 600; color: var(--muted); }
.trend.good { color: var(--good); } .trend.bad { color: var(--bad); }
.current { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.progress { height: 6px; width: 100px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 1px; overflow: hidden; display: inline-block; }
.fill { display: block; height: 100%; background: var(--faint); }
.fill.good { background: var(--good); } .fill.warn { background: var(--amber); } .fill.bad { background: var(--bad); } .fill.blue { background: var(--accent); }
.score { font-size: 14px; font-weight: 600; }

/* ---------- program & risk engine ---------- */
.weights { display: grid; gap: 10px; }
.weight-row { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.weight-row strong { font-weight: 600; text-align: right; }
.weight-track { height: 6px; border-radius: 1px; background: var(--surface-2); overflow: hidden; }
.flow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 6px 0 12px; }
.node { background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 12px; font-weight: 600; }
.arrow { color: var(--faint); }
.metric { cursor: help; border-bottom: 1px dotted var(--faint); }
table.kpis td { white-space: nowrap; }
table.kpis td:first-child { white-space: normal; min-width: 170px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* "How risk is scored": a panel that opens and closes */
.how > summary { list-style: none; cursor: pointer; }
.how > summary::-webkit-details-marker { display: none; }
.how > summary::before { content: "▸"; display: inline-block; width: 10px; color: var(--band-muted); transition: transform 0.15s; }
.how[open] > summary::before { transform: rotate(90deg); }
.how > summary:hover { background: color-mix(in srgb, var(--band-ink) 6%, var(--band)); }
.how-grid { gap: 28px; margin-bottom: 0; }
.how h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--heading); }

/* remediation queue tools */
.queue-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--muted); border: 0; border-radius: 0; padding: 6px 12px; font-size: 12.5px; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button:hover { color: var(--ink); background: var(--hover); }
.seg button.active { color: var(--heading); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.seg .count { color: var(--faint); font-weight: 600; }
.seg button.active .count { color: var(--muted); }
.queue-foot { display: flex; align-items: center; gap: 14px; margin-top: 10px; }

/* ---------- vulnerabilities list and details ---------- */
.list-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.list-tools input[type=search] { min-width: 260px; }
.check { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; }
.list-tools .push { margin-left: auto; }
.details { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(620px, 100vw); margin: 0; overflow: auto; background: var(--surface); border-left: 1px solid var(--line);
  padding: 20px 22px 24px; box-shadow: -10px 0 30px rgba(10, 20, 35, 0.22); animation: drawer-in 0.18s ease-out; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .details { animation: none; } }
table.hosts td { vertical-align: top; }
table.hosts td:not(:first-child) { white-space: nowrap; }
.details-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.details-head h2 { margin: 0 0 10px; font-size: 17px; font-weight: 600; color: var(--heading); }
.close { background: none; color: var(--muted); border: 1px solid var(--line); padding: 2px 10px; font-size: 18px; line-height: 1.2; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chips > span { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 8px; font-size: 12px; }
.field h3 { margin: 14px 0 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.field p { margin: 0; white-space: pre-line; }
.field pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.45 Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 10px; border-radius: var(--radius-sm); max-height: 240px; overflow: auto; }
.refs { margin: 0; padding-left: 18px; font-size: 12px; word-break: break-all; }

/* ---------- emerging threats (layout from the Design mockup) ---------- */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.tw-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; align-items: center; padding: 18px 24px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: var(--radius); }
.tw-doc { position: relative; display: grid; place-items: center; color: var(--heading); }
.tw-doc .ic { width: 84px; height: 84px; stroke-width: 1.6; }
.tw-doc span { position: absolute; bottom: 8px; left: 12px; right: 12px; text-align: center; background: var(--heading); color: var(--surface); font-weight: 700; font-size: 15px;
  border-radius: 4px; padding: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tw-name h2 { margin: 0; font-size: 26px; font-weight: 700; color: var(--heading); }
.tw-verdict { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 10px; border-radius: var(--radius-sm); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.tw-verdict.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.tw-verdict.warn { color: color-mix(in srgb, var(--amber) 80%, var(--ink)); background: color-mix(in srgb, var(--amber) 12%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.tw-verdict.good { color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.tw-card .sub { margin: 4px 0 8px; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.tw-card .detail { margin: 0; font-size: 15.5px; line-height: 1.5; max-width: 125ch; }
.tw-card .detail strong { color: var(--heading); }


/* The two columns end on the same line, as in the mockup: the table's rows share any spare height, and the
   remediation steps stretch when the table is the taller side. */
.tw-cols .panel, .tw-side .panel { margin-bottom: 0; }
.tw-cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.tw-cols > .panel { display: flex; flex-direction: column; }
.tw-cols > .panel > .table-scroll { flex: 1; }
.tw-cols > .panel table.tw-hosts { height: 100%; }
.tw-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tw-side > .panel.purple { flex: 1; display: flex; flex-direction: column; }
.tw-side > .panel.purple > .tw-steps { flex: 1; align-items: stretch; }
.link.inline { padding: 0; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

table.tw-hosts td { padding: 12px 14px; font-size: 13.5px; }
.tw-host { display: block; }
.tw-host-name { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
td.nowrap { white-space: nowrap; }
table.tw-hosts td:first-child { min-width: 170px; }
table.tw-hosts td:nth-child(2), table.tw-hosts td:nth-child(3) { white-space: nowrap; }
.tw-status { --tone: var(--muted); display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: var(--radius-sm); color: var(--tone);
  background: color-mix(in srgb, var(--tone) 10%, var(--surface)); line-height: 1.2; white-space: nowrap; }
.tw-status.bad { --tone: var(--bad); } .tw-status.warn { --tone: color-mix(in srgb, var(--amber) 85%, var(--ink)); } .tw-status.good { --tone: var(--good); }
.tw-status .ic { width: 22px; height: 22px; }
.tw-status strong { display: block; font-size: 13px; font-weight: 600; }
.tw-status small { display: block; font-size: 12px; }

.tw-about { display: grid; gap: 12px; }
.tw-what { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; }
.tw-what-ic { display: grid; place-items: center; width: 64px; height: 56px; border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.tw-what-ic .ic { width: 34px; height: 34px; }
.tw-about h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--heading); }
.tw-about p { margin: 0; font-size: 13.5px; }
.tw-what a { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.tw-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tw-facts > div { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid var(--line); }
.tw-facts .ic { width: 28px; height: 28px; color: var(--heading); }
.tw-facts p { font-weight: 600; }
.bad-text { color: var(--bad); }

.tw-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tw-steps li { --tone: var(--accent); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 14px 8px 12px; font-size: 13px; line-height: 1.3;
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--tone) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 22%, var(--line)); }
.tw-steps li.s1 { --tone: var(--bad); } .tw-steps li.s2 { --tone: var(--accent); } .tw-steps li.s3 { --tone: var(--good); } .tw-steps li.s4 { --tone: var(--kev); }
.tw-steps li + li::before { content: "›"; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); color: var(--tone); font-size: 20px; font-weight: 700; }
.tw-steps .n { position: absolute; top: -9px; left: -6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--tone); color: var(--surface); font-weight: 700; font-size: 12px; }
.tw-steps .ic { width: 28px; height: 28px; color: var(--tone); }
.tw-source { color: var(--muted); font-size: 13px; margin-bottom: 10px !important; }

.means { margin-bottom: 0; gap: 28px; }
.means h3, .step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--heading); }
.tone::before { content: ""; width: 4px; height: 18px; border-radius: 1px; background: var(--info); }
.tone.good::before { background: var(--good); } .tone.bad::before { background: var(--bad); }
.bullets { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.bullets li::marker { color: var(--faint); }
.bullets.cols { columns: 2; column-gap: 40px; display: block; }
.bullets.cols li { break-inside: avoid; margin-bottom: 10px; }
.steps { margin-bottom: 0; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); min-width: 0; display: flex; flex-direction: column; }
.step p { margin: 0 0 12px; color: var(--muted); }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; flex: none; }
.code-wrap { position: relative; margin-top: auto; }
pre.code { margin: 0; padding: 12px 14px; padding-right: 70px; font: 12.5px/1.55 Consolas, "Cascadia Mono", monospace; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
pre.code .c { color: var(--muted); }
.copy { position: absolute; top: 8px; right: 8px; padding: 3px 10px; font-size: 12px; }
/* Laid out by the width the report gets (the sidebar takes part of the screen), not the screen width. */
.report { container-type: inline-size; }
@container (max-width: 1250px) {
  .tw-cols { grid-template-columns: minmax(0, 1fr); }
  .tw-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
}
@container (max-width: 1230px) {
  .g3, .grid.g3.wide-last { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3.wide-last > :last-child { grid-column: 1 / -1; }
  table.kpis .progress { width: 60px; }
}
@container (max-width: 1100px) { .tiles.n5, .tiles.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 850px) {
  .g2, .g3, .g4, .grid.g3.wide-last { grid-template-columns: minmax(0, 1fr); }
  .tiles.n4, .tiles.n5, .tiles.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bullets.cols { columns: 1; }
}
@container (max-width: 760px) { .tw-side { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 420px) { .tiles.n4, .tiles.n5, .tiles.n6 { grid-template-columns: minmax(0, 1fr); } .tile strong { font-size: 30px; } }
@media (max-width: 900px) { .tw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tw-steps li:nth-child(3)::before { display: none; } }
@media (max-width: 600px) {
  .page-banner { padding: 16px; } .page-banner h1 { font-size: 22px; } .page-banner-side { align-items: flex-start; }
  .tw-card { grid-template-columns: 1fr; padding: 16px; gap: 10px; } .tw-doc { justify-self: start; } .tw-doc .ic { width: 64px; height: 64px; } .tw-doc span { font-size: 12px; bottom: 6px; }
  .tw-facts { grid-template-columns: 1fr; } .tw-what { grid-template-columns: 1fr; }
}

/* ---------- penetration testing (layout from the Design mockup) ---------- */
.tiles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pt-row1 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr); }
.pt-row2 { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.pt-stack { display: grid; gap: 14px; min-width: 0; }
.pt-stack > .panel { margin-bottom: 0; }
.chart.short { height: 210px; }
.donut-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.donut { height: 210px; }
.donut-legend li { grid-template-columns: 8px 1fr auto 40px; }
.donut-legend li:first-child { border-top: 0; }
table.pt-coverage td { white-space: nowrap; }
table.pt-coverage th, table.pt-coverage td { padding: 7px 8px; }
td.num { text-align: right; }
.pt-barcell { display: flex; align-items: center; gap: 6px; min-width: 76px; }
.pt-barcell strong { font-weight: 600; min-width: 3ch; text-align: right; }
.pt-bar { --w: 0%; flex: 1; height: 8px; border-radius: 2px; background: var(--surface-2); position: relative; overflow: hidden; }
.pt-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--accent); }
.pt-bar.good::after { background: var(--good); } .pt-bar.warn::after { background: var(--amber); } .pt-bar.bad::after { background: var(--bad); }
.pt-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 9px; border-radius: var(--radius-sm); color: #fff; background: var(--accent); }
.pt-badge.bad { background: var(--bad); } .pt-badge.warn { background: var(--amber); } .pt-badge.good { background: var(--good); }
.pt-crumb { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pt-path { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 6px; }
.pt-node { --tone: var(--accent); position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.pt-node.escalation { --tone: var(--high); } .pt-node.target { --tone: var(--bad); }
.pt-node + .pt-node::before { content: "\203A"; position: absolute; left: -9px; top: 12px; color: var(--faint); font-weight: 700; }
.pt-node-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); }
.pt-node-ic .ic { width: 20px; height: 20px; }
.pt-node strong { font-size: 12px; font-weight: 600; line-height: 1.2; }
.pt-node small { font-size: 11px; color: var(--muted); line-height: 1.2; overflow-wrap: anywhere; }
.pt-outcome { font-size: 12.5px; padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 25%, var(--line)); }
.pt-rings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.pt-ring-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.pt-ring { --p: 0%; --c: var(--accent); display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 77%), conic-gradient(var(--c) var(--p), var(--surface-2) 0); }
.pt-ring strong { font-size: 18px; font-weight: 700; color: var(--heading); }
.pt-ring-item > strong { font-size: 13px; font-weight: 600; color: var(--heading); }
.pt-ring-item small { font-size: 11.5px; color: var(--muted); }
.pt-outcomes { list-style: none; padding: 0; display: grid; }
.pt-outcomes li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.pt-outcomes li:first-child { border-top: 0; }
.pt-outcomes strong { display: block; font-size: 13px; font-weight: 600; }
.pt-outcomes small { color: var(--muted); font-size: 12px; }
.pt-out-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pt-out-ic .ic { width: 18px; height: 18px; }
.pt-out-val { font-weight: 700; font-size: 15px; white-space: nowrap; }
.pt-out-val.good { color: var(--good); } .pt-out-val.bad { color: var(--bad); }
.pt-milestones { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); position: relative; }
.pt-milestones::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: var(--line-strong); }
.pt-milestones li { --tone: var(--accent); position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 6px; }
.pt-milestones li.ms-complete { --tone: var(--good); } .pt-milestones li.ms-in-progress { --tone: var(--amber); }
.ms-date { font-size: 12px; font-weight: 700; color: var(--tone); }
.ms-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tone); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--tone); z-index: 1; }
.ms-text { font-size: 12px; color: var(--ink); }
@container (max-width: 1230px) { .pt-row1, .pt-row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pt-row1 > :first-child, .pt-row2 > :first-child { grid-column: 1 / -1; } }
@container (max-width: 850px) { .pt-row1, .pt-row2 { grid-template-columns: minmax(0, 1fr); } .tiles.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 420px) { .donut-wrap { grid-template-columns: minmax(0, 1fr); } .tiles.n3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- executive overview ---------- */
.ex-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.ex-score { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: center; }
.ex-dial { --tone: var(--accent); display: grid; place-content: center; text-align: center; width: 140px; height: 140px; border-radius: 50%;
  border: 10px solid color-mix(in srgb, var(--tone) 22%, var(--surface)); border-top-color: var(--tone); border-right-color: var(--tone); }
.ex-dial.good { --tone: var(--good); } .ex-dial.warn { --tone: var(--amber); } .ex-dial.bad { --tone: var(--bad); }
.ex-dial strong { font-size: 40px; line-height: 1; font-weight: 700; color: var(--heading); }
.ex-dial span { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tone); }
.ex-breakdown { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ex-breakdown li { display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(60px, 1fr) 34px; gap: 10px; align-items: center; font-size: 13px; }
.ex-breakdown strong { text-align: right; font-size: 15px; }
.ex-svc { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ex-svc a { color: var(--heading); font-weight: 600; text-decoration: none; }
.ex-svc a:hover { color: var(--accent); text-decoration: underline; }
.ex-svc .ic { width: 18px; height: 18px; color: var(--accent); }
.ex-card-head { display: flex; align-items: center; gap: 10px; }
.ex-sub { margin: 14px 0 6px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.ex-list { list-style: none; padding: 0; margin: 0; display: grid; }
.ex-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ex-list li:first-child { border-top: 0; }
.ex-threats { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ex-threats li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ex-threats li > div strong { display: block; font-size: 15px; color: var(--heading); }
.ex-threat-counts { grid-column: 1 / -1; }
@container (max-width: 1100px) { .ex-row { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 520px) { .ex-score { grid-template-columns: minmax(0, 1fr); justify-items: center; } .ex-breakdown { width: 100%; } }

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .report { padding: 14px 16px 30px; }
  .card { padding: 28px 22px; }
  select, input[type=search] { min-width: 0; width: 100%; }
  .filter { flex: 1 1 100%; justify-content: space-between; }
  .filter select { width: auto; flex: 1; max-width: 220px; }
  .tabs { width: 100%; }
  .weight-row { grid-template-columns: 110px 1fr 38px; }
}

/* KEV table needs the most room on the first dashboard row */
.g3.wide-last { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr) minmax(0, 1.65fr); }
table.compact td:nth-child(2) { white-space: nowrap; }

