/* Kuntur · "Cordillera": snow and stone, lagoon teal, flare only for what needs action. Light + night themes. */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  color-scheme: light;
  --page: #F3F4F1; --surface: #FBFBF9; --surface-2: #E9ECE6; --ink: #151B1D; --ink-2: #2E3639; --muted: #4A5457;
  --grid: #E1E4DD; --axis: #B9BEB6; --border: #D7DAD3; --rule-strong: #151B1D;
  --accent: #15706C; --accent-ink: #0E4F4C; --accent-wash: #E1EEEB; --on-accent: #F3F4F1; --accent-soft: #E1EEEB;
  --series-1: #15706C; --good: #15706C; --good-ink: #0E5A56; --warning: #B9862A; --serious: #C46A2E; --critical: #B4501A; --info: #7A8580;
  --sev-low: #6E9C97;
  /* severity scale from the Cordillera palette: flare > clay > ochre > lagoon > stone; -ink variants >= 4.5:1 on surface and wash */
  --sev-critical: #D8641F; --sev-critical-ink: #9C4413;
  --sev-high: #C08A45;     --sev-high-ink: #7A5118;
  --sev-medium: #A99A5C;   --sev-medium-ink: #5E5420;
  --sev-low-c: #6E9C97;    --sev-low-ink: #2F5B57;
  --sev-info: #9AA39D;     --sev-info-ink: #4A5457;
  --sev-wash: 16%;
  --bar: #6E9C97;
  --side: #F3F4F1; --side-fg: #2E3639; --side-muted: #4A5457; --side-hover: #E9ECE6; --side-active: #E9ECE6; --side-active-fg: #151B1D;
  --tri-ack-bg: #F3E6CC; --tri-ack-fg: #6E4A0E; --tri-res-bg: #DCECE9; --tri-res-fg: #0E5A56; --tri-sup-bg: #E9ECE6;
  --overlay: rgba(21,27,29,.35); --inverse: #151B1D; --on-inverse: #F3F4F1;
  --shadow: none;
  --radius: 4px;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-family: var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #1B2426; --surface: #222D2F; --surface-2: #2A3638; --ink: #ECEFEA; --ink-2: #C6CEC9; --muted: #9CA9A5;
    --grid: #2E3A3C; --axis: #4C5D5E; --border: #364446; --rule-strong: #C6CEC9;
    --accent: #4CC1B5; --accent-ink: #7FD9CF; --accent-wash: #1F3D3C; --on-accent: #1B2426; --accent-soft: #1F3D3C;
    --series-1: #4CC1B5; --good: #4CC1B5; --good-ink: #7FD9CF; --warning: #D9AD5B; --serious: #E59360; --critical: #F2884A; --info: #8E9B97;
    --sev-low: #6FB3AC;
    --sev-critical: #F2884A; --sev-critical-ink: #F6A877;
    --sev-high: #D3A15E;     --sev-high-ink: #E6C08E;
    --sev-medium: #B8AC6E;   --sev-medium-ink: #D8CD95;
    --sev-low-c: #6FB3AC;    --sev-low-ink: #A5D6D0;
    --sev-info: #6A7774;     --sev-info-ink: #B4BFBB;
    --sev-wash: 22%;
    --bar: #4F8F89;
    --side: #1B2426; --side-fg: #C6CEC9; --side-muted: #9CA9A5; --side-hover: #2A3638; --side-active: #2A3638; --side-active-fg: #ECEFEA;
    --tri-ack-bg: rgba(217,173,91,.18); --tri-ack-fg: #E6C08E; --tri-res-bg: rgba(76,193,181,.16); --tri-res-fg: #7FD9CF; --tri-sup-bg: rgba(236,239,234,.06);
    --overlay: rgba(0,0,0,.5); --inverse: #ECEFEA; --on-inverse: #1B2426;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #1B2426; --surface: #222D2F; --surface-2: #2A3638; --ink: #ECEFEA; --ink-2: #C6CEC9; --muted: #9CA9A5;
  --grid: #2E3A3C; --axis: #4C5D5E; --border: #364446; --rule-strong: #C6CEC9;
  --accent: #4CC1B5; --accent-ink: #7FD9CF; --accent-wash: #1F3D3C; --on-accent: #1B2426; --accent-soft: #1F3D3C;
  --series-1: #4CC1B5; --good: #4CC1B5; --good-ink: #7FD9CF; --warning: #D9AD5B; --serious: #E59360; --critical: #F2884A; --info: #8E9B97;
  --sev-low: #6FB3AC;
  --sev-critical: #F2884A; --sev-critical-ink: #F6A877;
  --sev-high: #D3A15E;     --sev-high-ink: #E6C08E;
  --sev-medium: #B8AC6E;   --sev-medium-ink: #D8CD95;
  --sev-low-c: #6FB3AC;    --sev-low-ink: #A5D6D0;
  --sev-info: #6A7774;     --sev-info-ink: #B4BFBB;
  --sev-wash: 22%;
  --bar: #4F8F89;
  --side: #1B2426; --side-fg: #C6CEC9; --side-muted: #9CA9A5; --side-hover: #2A3638; --side-active: #2A3638; --side-active-fg: #ECEFEA;
  --tri-ack-bg: rgba(217,173,91,.18); --tri-ack-fg: #E6C08E; --tri-res-bg: rgba(76,193,181,.16); --tri-res-fg: #7FD9CF; --tri-sup-bg: rgba(236,239,234,.06);
  --overlay: rgba(0,0,0,.5); --inverse: #ECEFEA; --on-inverse: #1B2426;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.45; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); font-size: 12px; }
.err { color: var(--critical); min-height: 1.2em; margin: 0; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* layout */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-fg); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; }
.brand b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; color: var(--ink); }
.brand span { display: block; font-size: 12px; color: var(--side-muted); }
.brand.big b { font-size: 26px; color: var(--ink); }
.login-card .brand span { color: var(--muted); }
nav { display: flex; flex-direction: column; padding: 4px 0 4px 12px; gap: 1px; }
nav a { color: var(--side-fg); padding: 7px 14px 7px 10px; border-radius: 0; display: flex; gap: 10px; align-items: center; margin-right: -1px; border-right: 2px solid transparent; }
nav a:hover { background: var(--side-hover); text-decoration: none; color: var(--side-active-fg); }
nav a.active { background: var(--side-active); color: var(--side-active-fg); font-weight: 600; border-right-color: var(--accent); }
.ico { width: 18px; text-align: center; color: var(--muted); }
.nav-h { font-size: 12px; color: var(--side-muted); padding: 16px 14px 6px 10px; border-bottom: 1px solid var(--border); margin: 0 12px 4px 0; }
/* collapsible sections: the title is a button with a rotating chevron */
.nav-sec { display: flex; flex-direction: column; }
button.nav-h { display: flex; align-items: center; gap: 6px; width: calc(100% - 12px); margin: 0 12px 4px 0; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; font-size: 12px; text-align: left; cursor: pointer; border-radius: 0; }
button.nav-h:hover { color: var(--side-fg); }
button.nav-h:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--side-fg); }
.nav-sec.single button.nav-h { cursor: default; }
.nav-sec.single button.nav-h:hover { color: var(--side-muted); }
.nav-sec.single .nav-chev, .nav-sec.single .nav-sum { display: none; }
.nav-chev { margin-left: auto; flex: none; opacity: .75; transition: transform .16s ease; }
.nav-sec.folded .nav-chev { transform: rotate(-90deg); }
.nav-sum { display: none; min-width: 16px; padding: 0 5px; border-radius: 999px; background: var(--side-active); color: var(--side-fg); font-size: 10px; font-weight: 600; letter-spacing: 0; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.nav-sum.on { display: inline-block; }
.nav-sum.dot { min-width: 0; width: 6px; height: 6px; padding: 0; background: var(--side-muted); }
.nav-g { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .16s ease, opacity .16s ease; }
.nav-gi { display: flex; flex-direction: column; gap: 1px; min-height: 0; overflow: hidden; }
.nav-sec.folded .nav-g { grid-template-rows: 0fr; opacity: 0; }
.nav-count { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--side-hover); color: var(--side-fg); font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .nav-chev, .nav-g { transition: none; } }
.side-foot { margin-top: auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.side-foot .muted { width: 100%; color: var(--side-muted); }
.side-foot .btn { color: var(--side-fg); border-color: var(--border); }
.side-foot .btn:hover { background: var(--side-hover); }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 32px; border-bottom: 1px solid var(--border); background: var(--page); position: sticky; top: 0; z-index: 5; }
.top h1 { font-family: var(--font-display); font-size: 22px; margin: 0; font-weight: 500; letter-spacing: -.01em; }
.top-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none; }
.view { padding: 26px 32px 60px; }
/* trial / plan notice (onboarding.js) sits between the top bar and the view: same side inset as the view */
#plan-banner { margin: 18px 32px 0; }

/* buttons & inputs */
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 4px; padding: 7px 12px; font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.good { color: var(--good-ink); }
.btn.bad { color: var(--critical); }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 7px 10px; }
input:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 28px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login-card .brand { padding: 0 0 6px; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); }

/* cards & grids */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: transparent; border: 0; border-top: 1px solid var(--rule-strong); border-radius: 0; padding: 14px 0 6px; min-width: 0; }
.card h2 { font-family: var(--font-body); font-size: 15px; margin: 0 0 2px; font-weight: 600; }
.card .sub { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.card-head { display: flex; align-items: baseline; gap: 10px; }
.card-head a { margin-left: auto; font-size: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { color: var(--ink-2); font-size: 12.5px; }
.kpi .value { font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); }
.kpi .hint { color: var(--muted); font-size: 12px; }
.kpi.alert .value { color: var(--critical); }
.kpi a.value:hover { text-decoration: none; opacity: .85; }
.section-title { font-size: 15px; color: var(--ink); margin: 28px 0 10px; font-weight: 600; }

/* bars (hbar chart) */
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; cursor: default; border-radius: 6px; padding: 2px 4px; margin: 0 -4px; }
.hbar.clickable { cursor: pointer; }
.hbar:hover { background: var(--surface-2); }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hbar .lbl small { color: var(--muted); margin-left: 6px; }
.hbar .track { height: 10px; position: relative; border-left: 1px solid var(--axis); }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--bar)); border-radius: 0; min-width: 2px; }
.hbar .val { font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 32px; text-align: right; }
.hbar .val.zero { color: var(--muted); }
.hbars.wide .hbar { grid-template-columns: minmax(150px, 54%) 1fr auto; }
.hbar .lbl .sev { margin-right: 8px; min-width: 62px; }

/* stacked status bar */
.stack { display: flex; height: 10px; border-radius: 0; overflow: hidden; gap: 2px; background: var(--surface); }
.stack span { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 0; margin-right: 5px; vertical-align: -1px; }
.status-rows { display: flex; flex-direction: column; gap: 12px; }
.status-row .top-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }

/* severity */
/* one severity scale for pills, bars and chips: an element with .s-<sev> (or .sev.<sev>) gets --c (fill) and --ci (text) */
.s-critical, .sev.critical { --c: var(--sev-critical); --ci: var(--sev-critical-ink); }
.s-high, .sev.high { --c: var(--sev-high); --ci: var(--sev-high-ink); }
.s-medium, .sev.medium { --c: var(--sev-medium); --ci: var(--sev-medium-ink); }
.s-low, .sev.low { --c: var(--sev-low-c); --ci: var(--sev-low-ink); }
.s-info, .sev.info { --c: var(--sev-info); --ci: var(--sev-info-ink); }
.sev { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 8px 0 7px; border-radius: 99px; white-space: nowrap;
  color: var(--ci, var(--sev-info-ink)); background: color-mix(in srgb, var(--c, var(--sev-info)) var(--sev-wash), transparent); vertical-align: 1px; }
.sev::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--sev-info)); flex: none; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st.approved { color: var(--good-ink); }
.st.blocked { color: var(--sev-critical-ink); }
.st.unreviewed { color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--good); }
.dot.off { background: var(--axis); }
.chip { display: inline-block; padding: 1px 7px; border-radius: 3px; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; margin: 1px 3px 1px 0; white-space: nowrap; }
.chip.warn { color: var(--sev-critical-ink); }
.trust { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px; font-weight: 600; white-space: nowrap; margin-left: 6px; vertical-align: 1px; background: var(--surface-2); }
.trust.confirmed { color: var(--good-ink); }
.trust.likely { color: var(--accent-ink); }
.trust.review { color: var(--sev-critical-ink); }
.evidence-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.chip.env-wsl, .chip.env-container, .chip.env-vm { background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; }
/* extension permissions: risky browser permissions take the severity scale; IDE extensions have no permission model */
.perm { display: inline-block; font-family: var(--font-mono); font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 5px; margin: 1px 3px 1px 0; white-space: nowrap; cursor: help;
  color: var(--ci, var(--ink-2)); background: color-mix(in srgb, var(--c, var(--sev-info)) var(--sev-wash), transparent); }
.perms { display: flex; flex-wrap: wrap; gap: 3px; }
.perms .perm, .perms .chip { margin: 0; }
.nowrap { white-space: nowrap; }
.access-all { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 18px; padding: 0 7px; border-radius: 5px; white-space: nowrap; cursor: help;
  color: var(--sev-info-ink); border: 1px dashed color-mix(in srgb, var(--sev-info-ink) 45%, transparent); }

/* tables */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { min-width: 240px; flex: 1 1 240px; max-width: 420px; }
.toolbar .count { color: var(--muted); font-size: 12px; margin-left: auto; }
.table-wrap { overflow-x: auto; background: transparent; border: 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); border-radius: 0; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--page); position: sticky; top: 0; cursor: pointer; user-select: none; }
th.nosort { cursor: default; }
th .arrow { color: var(--muted); font-size: 10px; margin-left: 3px; }
td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr:hover td { background: var(--surface-2); }
td .t-main { font-weight: 550; }
td:first-child .t-main { white-space: nowrap; }
td .t-sub { color: var(--muted); font-size: 12px; word-break: break-all; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 6px 0 14px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 8px 12px; font: inherit; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 600; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 30; }
.drawer-bg { position: absolute; inset: 0; background: var(--overlay); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(640px, 100%); background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; padding: 22px 24px; box-shadow: none; }
.drawer-panel h2 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -.01em; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; margin: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
/* checkbox + its label on one line; a long label wraps next to the box, never below it */
.check-row { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; }
.check-row > input[type="checkbox"] { flex: none; margin: 3px 0 0; }

/* deploy */
pre.code { font-family: var(--font-mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 12px 14px; overflow-x: auto; font-size: 12.5px; margin: 8px 0; white-space: pre-wrap; word-break: break-all; }
.code-wrap { position: relative; }
pre.code.selectable { user-select: all; -webkit-user-select: all; cursor: text; }
pre.code.selectable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.code-wrap .btn { position: absolute; top: 8px; right: 8px; }

/* events */
.timeline { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 110px 22px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; align-items: start; }
.ev:last-child { border-bottom: 0; }
.ev .when { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ev .badge { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; background: var(--surface-2); color: var(--ink-2); }
.ev .badge.added { color: var(--accent-ink); }
.ev .badge.removed { color: var(--muted); }
.ev .badge.finding { color: var(--sev-critical-ink); }
.ev .badge.enrolled { color: var(--good-ink); }

.tip { position: fixed; pointer-events: none; z-index: 50; background: var(--inverse); color: var(--on-inverse); padding: 6px 9px; border-radius: 6px; font-size: 12px; max-width: 300px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--inverse); color: var(--on-inverse); padding: 10px 16px; border-radius: 4px; z-index: 60; font-size: 13px; }
.banner { background: var(--accent-wash); border: 0; border-top: 2px solid var(--accent); border-radius: 0; padding: 14px 16px; margin-bottom: 16px; }
.banner b { display: block; margin-bottom: 4px; }

@media (max-width: 1100px) { .cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax var(--overlay); }
  .menu-btn { display: inline-block; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .view { padding: 16px; }
  #plan-banner { margin: 12px 16px 0; }
  .top { padding: 12px 16px; }
  .kv { grid-template-columns: 1fr; }
}
@media (forced-colors: active) { .hbar .fill, .stack span { forced-color-adjust: none; } }
.code-wrap pre.code { font-family: var(--font-mono); padding-right: 76px; }

/* risk overview KPIs: neutral numbers, severity only as a thin accent; framed as work to do */
.kpi.warn .value, .kpi.serious .value, .kpi.alert .value { color: var(--ink); }
.kpi.act { position: relative; overflow: hidden; }
.kpi.act .value { color: var(--ink); }
.kpi.act::before { content: ""; position: absolute; left: 0; top: -1px; width: 32px; height: 3px; background: var(--c, transparent); }
.kpi .value-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kpi .value-row .unit { color: var(--muted); font-size: 12.5px; }
.kpi.act .value.calm { color: var(--ink-2); font-size: 22px; font-weight: 500; letter-spacing: -.01em; padding: 6px 0 5px; display: inline-flex; align-items: center; gap: 8px; }
.kpi .value.calm::before { content: "✓"; font-size: 13px; color: var(--good-ink); font-family: var(--font-body); }
.delta { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.delta.up { color: var(--ci, var(--ink-2)); }
.delta.down { color: var(--good-ink); }
.kpi .progress { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.kpi .progress span { display: block; height: 100%; border-radius: 2px; background: var(--good); opacity: .75; }

/* coverage / adoption progress bar */
.cover-bar { height: 6px; border-radius: 0; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.cover-bar .fill { height: 100%; border-radius: 0; }

/* triage status badges */
.triage { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; font-family: var(--font-mono); letter-spacing: .01em; white-space: nowrap; }
.triage-open       { background: var(--surface-2); color: var(--ink-2); }
.triage-acknowledged { background: var(--tri-ack-bg); color: var(--tri-ack-fg); }
.triage-resolved   { background: var(--tri-res-bg); color: var(--tri-res-fg); }
.triage-suppressed { background: var(--tri-sup-bg); color: var(--muted); }

/* bulk-action floating bar */
.bulk-bar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; background: var(--inverse); color: var(--on-inverse); padding: 10px 16px; border-radius: 4px;
  box-shadow: none; font-size: 13px; transition: transform .2s, opacity .2s; z-index: 80; white-space: nowrap; }
.bulk-bar.visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.bulk-bar .count { font-weight: 700; min-width: 28px; text-align: center; }
.bulk-bar button { background: color-mix(in srgb, var(--on-inverse) 15%, transparent); border: none; color: var(--on-inverse); padding: 5px 11px; border-radius: 7px; font: inherit; font-size: 12px; cursor: pointer; }
.bulk-bar button:hover { background: color-mix(in srgb, var(--on-inverse) 28%, transparent); }
.bulk-bar .sep { width: 1px; height: 20px; background: color-mix(in srgb, var(--on-inverse) 20%, transparent); margin: 0 4px; }

/* live refresh badge */
.live-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-left: auto; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.live-btn { background: none; border: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.live-btn:hover { background: var(--surface-2); color: var(--ink); }
.live-cd { color: var(--muted); font-size: 11px; }
.beta-pill { margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid var(--border); background: transparent; color: var(--muted); vertical-align: middle; border-radius: 3px; }
/* soft live-refresh re-render: no entry animations/transitions replay */
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }

/* MFA (mfa.js) */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.mfa-enroll { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-top: 14px; }
.mfa-qr { background: #fff; padding: 8px; border-radius: 4px; border: 1px solid var(--border); image-rendering: pixelated; }
.mfa-steps { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.mfa-secret { font-family: var(--font-mono); font-size: 14px; letter-spacing: .04em; background: var(--surface-2); padding: 3px 7px; border-radius: 6px; display: inline-block; margin-top: 4px; word-break: break-all; user-select: all; }
.mfa-codes { columns: 2; font-family: var(--font-mono); font-size: 14px; padding-left: 26px; margin: 8px 0 14px; }
.mfa-codes li { padding: 3px 0; }
body.mfa-gate #nav a:not([data-route="security"]), body.mfa-gate #nav .nav-h, body.mfa-gate #live-badge { display: none; }
/* language picker (EN / ES) */
.lang-pick{display:inline-flex;gap:2px;align-items:center}
.lang-pick button{padding:2px 6px;border-radius:3px;font-size:12px}
.lang-pick button.active{font-weight:700;text-decoration:none;background:var(--accent-soft, rgba(127,127,127,.15))}
.login-lang{text-align:right;margin:0}
#side-lang{margin-top:6px}

/* multi-org switcher (clients.js) */
.org-switch { padding: 0 16px 12px; }
.org-switch label { display: block; }
.org-switch span { display: block; color: var(--side-muted); margin-bottom: 4px; }
.org-switch select { width: 100%; max-width: 100%; }
/* Local scan import (scanimport.js, import.html) */
.imp-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.imp-banner p { margin: 0; flex: 1 1 280px; }
.imp-tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 3px; padding: 1px 7px; white-space: nowrap; }
.imp-chip { color: var(--accent-ink); }
.imp-note { margin: 0; color: var(--ink-2); }
.imp-card h2 { margin: 0 0 4px; }
.imp-card p { margin: 0 0 10px; }
.imp-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* simple overview (overview.js): one headline, the items that need a decision, what is already decided */
.ovs-headline { font-family: var(--font-display); font-size: 24px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; margin: 0 0 22px; max-width: 900px; overflow-wrap: anywhere; }
.ovs-headline .ovs-need { color: var(--sev-critical-ink); font-weight: 700; }
.ovs-card { border-top: 1px solid var(--rule-strong); padding: 14px 0 6px; margin-bottom: 26px; max-width: 980px; }
.ovs-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.ovs-list { list-style: none; margin: 0; padding: 0; }
.ovs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 0; border-bottom: 1px solid var(--grid); }
.ovs-main { flex: 1 1 320px; min-width: 0; }
.ovs-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.ovs-name a { color: var(--ink); }
.ovs-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ovs-why { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.ovs-act { display: flex; gap: 8px; flex: none; }
.ovs-act .btn { min-height: 32px; }
/* plugin group (overview.js groupPlugins): one row per AI app, members in a <details> */
.ovs-group { align-items: flex-start; }
.ovs-members { margin-top: 8px; }
.ovs-members > summary { cursor: pointer; color: var(--accent-ink); font-size: 13px; font-weight: 600; width: max-content; max-width: 100%; }
.ovs-members > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ovs-members ul { list-style: none; margin: 6px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--grid); }
.ovs-member { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
.ovs-member:last-child { border-bottom: 0; }
.ovs-member .ovs-main { flex: 1 1 220px; }
.ovs-member .ovs-name { font-size: 14px; font-weight: 500; }
.ovs-done { color: var(--good-ink); margin: 6px 0 10px; }
.ovs-done::before { content: "✓ "; }
.ovs-sum { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.ovs-sum a { color: var(--ink-2); }
.ovs-sum b { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ink); margin-right: 4px; }
.ovs-full { margin-top: 8px; }
.ovs-full > summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; padding: 8px 0; width: max-content; max-width: 100%; }
.ovs-full > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ovs-full[open] > summary { margin-bottom: 14px; }
.ovs-empty { max-width: 640px; padding: 28px 0; }
.ovs-empty h2 { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 10px; }
.ovs-empty p { color: var(--ink-2); font-size: 15px; }
.ovs-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
/* Inventory area tabs (one nav entry for every kind) */
.inv-tabs { display: flex; flex-direction: row; flex-wrap: wrap; gap: 2px 4px; padding: 0; border-bottom: 1px solid var(--border); margin: 0 0 18px; }
.inv-tabs a { display: block; padding: 8px 10px; margin: 0 0 -1px; color: var(--ink-2); background: none; border: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.inv-tabs a:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.inv-tabs a.active { color: var(--ink); background: none; font-weight: 600; border-bottom-color: var(--accent); }
@media (max-width: 860px) {
  .ovs-headline { font-size: 19px; margin-bottom: 16px; }
  .ovs-act { width: 100%; }
  .ovs-act .btn { flex: 1 1 0; min-height: 40px; white-space: normal; }
  .ovs-empty h2 { font-size: 22px; }
  .inv-tabs a { padding: 6px 8px; font-size: 13px; }
}
/* deferred MFA enrollment reminder (mfa.js graceBanner) */
#demo-banner, #mfa-grace-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
#demo-banner p, #mfa-grace-banner p { margin: 0; flex: 1 1 280px; }
#tok-list td { white-space: nowrap; min-width: 72px; } /* scrolls in .table-wrap on narrow screens */
#aud td { min-width: 96px; } /* audit log: scrolls in .table-wrap on narrow screens instead of squeezing */
#aud td.aud-detail { min-width: 300px; overflow-wrap: anywhere; }
