:root{--bg:#0b0f17;--panel:#121826;--line:#1f2a3d;--text:#dfe6f2;--muted:#8b98ad;--accent:#e2383f;
--critical:#e2383f;--high:#f07b2b;--medium:#e8b931;--low:#3d9be9;--info:#6b7a90;
/* theme tokens (2026-11-18): the page chrome reads its colours from here so html[data-theme="soft"] at the end of this
   file can repaint every page without touching the markup. These values are exactly the original dark look. */
--strong:#fff;--link:#7fb6ff;--head-bg:#070a10;--input-bg:#0b0f17;--well:#0b1018;--on-accent:#fff;--sev-ink:#000;
--shadow:rgba(0,0,0,.45);--err-bg:#3a1215;--good-bg:#0f2e1d;--good-line:#2f8f5b;--good-text:#c9f2d9;--bad-text:#f3b8bb;--bad-line:#5a2226;
--tint-blue-bg:#1b3354;--tint-blue-line:#2f5f96;--tint-blue-text:#cfe3ff;--tint-green-bg:#1f3f2c;--tint-amber-bg:#4a3a10;--tint-amber-text:#f6dd8d;
--tint-hot-bg:#54300f;--tint-hot-text:#fbc38a;--tint-red-bg:#4a1a1d;--tint-red-text:#ffc9cc;--tint-grey-bg:#2e3138;--tint-grey-text:#c7cbd3;
--c-red:#e5484d;--c-orange:#e0a03d;--c-ok:#1f9d55;--advice:#9fd49f;
--rx:#3d9be9;--tx:#e8b931;--chart-other:#6b7a90;--chart-internal:#2bb673;--map-attack:#e2383f;--map-blocked:#3d9be9;
--jump-bg:#141b27;--jump-line:#263041;--jump-text:#dbe4f0;--radius-sm:6px}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 system-ui,Segoe UI,Roboto,sans-serif}
a{color:var(--link);text-decoration:none}a:hover{text-decoration:underline}
header{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:10px 20px;background:var(--head-bg);border-bottom:2px solid var(--accent)}
.brand{font-weight:700;font-size:18px;color:var(--strong)}.brand span{color:var(--accent);font-weight:500}
nav{display:flex;flex-wrap:wrap;gap:4px;flex:1}nav a{color:var(--muted);padding:6px 10px;border-radius:6px}
nav a.on,nav a:hover{background:var(--panel);color:var(--strong);text-decoration:none}
.me{color:var(--muted);font-size:12px}
main{max-width:1280px;margin:0 auto;padding:20px 16px}
h1{font-size:22px;margin:0 0 16px}h2{font-size:15px;margin:0 0 10px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.card{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:16px;overflow-x:auto}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media(max-width:800px){.grid2{grid-template-columns:1fr}}
.tiles{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:16px}@media(max-width:700px){.tiles{grid-template-columns:repeat(2,1fr)}}
.tile{background:var(--panel);border:1px solid var(--line);border-top:4px solid;border-radius:10px;padding:14px;color:var(--muted);text-transform:capitalize}
.tile b{display:block;font-size:30px;color:var(--strong)}
.sides{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}@media(max-width:1200px){.sides{grid-template-columns:1fr}}
.side{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:14px;min-width:0}.side h2{margin:0 0 2px;font-size:17px}.side h2 a{color:inherit}.side>p{margin:0 0 10px;color:var(--muted);font-size:13px}
.side .tiles{gap:8px;margin-bottom:10px}.side .tile{padding:8px 10px;font-size:12px;background:var(--bg,var(--well))}.side .tile b{font-size:22px}
.tile.critical{border-top-color:var(--critical)}.tile.high{border-top-color:var(--high)}.tile.medium{border-top-color:var(--medium)}.tile.low{border-top-color:var(--low)}.tile.info{border-top-color:var(--info)}
table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top}
th{color:var(--muted);font-weight:500;font-size:12px;vertical-align:bottom}td small{color:var(--muted)}
.num{text-align:right}td.num,th.num{white-space:nowrap;font-variant-numeric:tabular-nums}.mono{font-family:Consolas,monospace;overflow-wrap:anywhere;word-break:normal}
.sev{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11px;font-weight:600;text-transform:uppercase;color:var(--sev-ink)}
.sev.critical{background:var(--critical);color:var(--on-accent)}.sev.high{background:var(--high)}.sev.medium{background:var(--medium)}.sev.low{background:var(--low)}.sev.info{background:var(--info);color:var(--on-accent)}
input,select,textarea,button{font:inherit;color:var(--text);background:var(--input-bg);border:1px solid var(--line);border-radius:var(--radius-sm);padding:8px 10px}
textarea{width:100%}button{background:var(--accent);border-color:var(--accent);color:var(--on-accent);cursor:pointer}
button.ghost{background:transparent;color:var(--muted)}button.ghost:hover{color:var(--strong);border-color:var(--muted)}
button.ghost.danger{color:var(--bad-text);border-color:var(--bad-line)}button.ghost.danger:hover{color:var(--strong);border-color:var(--critical)}button.ghost:hover{color:var(--strong);border-color:var(--muted)}
button.ghost.danger{color:var(--bad-text);border-color:var(--bad-line)}button.ghost.danger:hover{color:var(--strong);border-color:var(--critical)}
.search,.row{display:flex;flex-wrap:wrap;gap:8px}.search input{flex:1;min-width:180px}.row{margin-top:8px}
form.inline{display:inline}.actions{white-space:nowrap;vertical-align:middle}
.actions form.inline+form.inline,.actions a+form.inline,.actions form.inline+a{margin-left:6px}
td.actions button{padding:4px 10px;font-size:12px}
.login{max-width:360px;margin:12vh auto;display:flex;flex-direction:column;gap:12px}.login label{display:flex;flex-direction:column;gap:4px;color:var(--muted)}
.err{background:var(--err-bg);border:1px solid var(--critical);padding:10px;border-radius:6px}
.muted{color:var(--muted);font-size:12px}
.timeline{list-style:none;padding:0;margin:0}.timeline li{border-left:2px solid var(--line);padding:4px 0 12px 14px}
.kind{font-size:11px;text-transform:uppercase;padding:1px 6px;border-radius:4px;background:var(--line)}.kind.evidence{background:#5b2a86}.kind.status{background:#1d5d3a}.kind.finding{background:#7a2a1f}
.advice{color:var(--advice);font-size:12px;margin-top:4px}
.settings{display:flex;flex-direction:column;gap:10px;max-width:560px}.settings label{display:flex;flex-direction:column;gap:4px;color:var(--muted)}.settings h2{margin-top:10px}
.btn{display:inline-block;background:var(--accent);color:var(--on-accent);padding:8px 14px;border-radius:6px}.btn:hover{text-decoration:none;opacity:.9}
.pre{white-space:pre-wrap}
pre.mono{white-space:pre-wrap;word-break:break-all;background:var(--input-bg);border:1px solid var(--line);border-radius:6px;padding:10px 70px 10px 12px}
pre.has-copy{position:relative}
button.copy{position:absolute;top:6px;right:6px;padding:4px 10px;font-size:12px}
.tabs{font-size:15px;margin:0 0 12px}
/* settings: use the whole width, sections flow into columns */
.settings{display:block;max-width:none;columns:2 440px;column-gap:40px}
.settings label{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;break-inside:avoid}
.settings h2{break-after:avoid;margin-top:14px}
.settings h2:first-of-type{margin-top:0}
.settings p{break-inside:avoid}
.settings>button{column-span:all;margin-top:12px}
/* learning tables: headings aligned with their numbers, tags for lists */
th.num{text-align:right}
table.learn td,table.learn th{padding:10px 12px;vertical-align:middle}
table.learn td.num{font-variant-numeric:tabular-nums;white-space:nowrap}
table.learn td:first-child{font-weight:600}
.chip{display:inline-block;background:var(--input-bg);border:1px solid var(--line);border-radius:12px;padding:1px 9px;margin:2px 4px 2px 0;font-size:12px;white-space:nowrap}

#threatmap { height: 520px; border-radius: 10px; margin: 12px 0; }

/* registration form */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { width: auto; margin-top: 4px; }

/* 2FA setup QR code: white quiet zone so phones scan it in dark mode too */
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr img { background: #fff; padding: 10px; border-radius: 8px; width: 220px; height: 220px; image-rendering: pixelated; }

/* floating "buy us a coffee" button, bottom right (approved companies) */
.coffee { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 50;
  display: flex; align-items: center; gap: 0; height: 52px; min-width: 52px; padding: 0 14px; border-radius: 26px; font-size: 24px; text-decoration: none;
  background: #ffdd00; color: #1b1b1b; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: gap .2s; animation: coffee-in .4s ease-out; }
.coffee span { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 15px; font-weight: 600; transition: max-width .25s; }
.coffee:hover, .coffee:focus-visible { gap: 8px; } .coffee:hover span, .coffee:focus-visible span { max-width: 160px; }
.coffee:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@keyframes coffee-in { from { transform: translateY(20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .coffee, .coffee span { animation: none; transition: none; } }
@media print { .coffee { display: none; } }

/* location report */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.kpis div, .kpis a.kpi { border: 1px solid var(--line, #2a3a4d); border-radius: 10px; padding: 12px 14px; }
.kpis b { display: block; font-size: 26px; }
/* A counter that leads somewhere: the whole tile is the link, not just the words next to the number.
   It keeps the body text colour so the row still reads as figures rather than as a line of links. */
.kpis a.kpi { display: block; color: inherit; text-decoration: none; }
.kpis a.kpi:hover, .kpis a.kpi:focus-visible { border-color: var(--c-red); }
@media print {
  header, nav, .noprint, .printme, .coffee { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .card, .kpis div, .kpis a.kpi { border-color: #bbb !important; background: #fff !important; break-inside: avoid; }
  a { color: #000 !important; text-decoration: none; }
  .scroll { overflow: visible !important; }
}
/* main menu in blocks (dropdowns) */
details.menu{position:relative}
details.menu>summary{list-style:none;cursor:pointer;color:var(--muted);padding:6px 10px;border-radius:6px;user-select:none}
details.menu>summary::-webkit-details-marker{display:none}
details.menu>summary::after{content:" ▾";font-size:.8em}
details.menu>summary.on,details.menu>summary:hover,details.menu[open]>summary{background:var(--panel);color:var(--strong)}
details.menu .drop{position:absolute;top:calc(100% + 4px);left:0;z-index:60;min-width:200px;display:flex;flex-direction:column;gap:2px;padding:6px;background:var(--well);border:1px solid var(--line,#2a3a4d);border-radius:8px;box-shadow:0 8px 24px var(--shadow)}
details.menu .drop a{white-space:nowrap}
@media (max-width:700px){details.menu .drop{position:static;box-shadow:none}}

/* Assets: compact rows - badges for agents, ⓘ for details, actions behind ⚙ Manage (open in place, so the table scroll never clips them) */
table.assets td{vertical-align:middle}
table.assets td.nm{white-space:nowrap}
.pill{display:inline-block;font-size:11px;line-height:18px;padding:0 8px;border-radius:9px;background:var(--line);color:var(--text);margin:1px 4px 1px 0;white-space:nowrap}
.pill.ids{background:var(--tint-blue-bg);color:var(--tint-blue-text)}.pill.wz{background:var(--tint-green-bg);color:var(--good-text)}.pill.ok{background:var(--tint-green-bg);color:var(--good-text)}
.pill.warn{background:var(--tint-amber-bg);color:var(--tint-amber-text)}.pill.can{background:transparent;border:1px dashed #3d9be9;color:#9ccbf5;line-height:16px}.pill.off{background:var(--err-bg);color:var(--bad-text)}
.pill.score{min-width:30px;text-align:center;font-weight:600;font-variant-numeric:tabular-nums;margin-right:2px}.pill.hot{background:var(--tint-hot-bg);color:var(--tint-hot-text)}
table.assets td.sc{white-space:nowrap}
table.fixtbl td.nm{white-space:nowrap}table.fixtbl th.num,table.fixtbl td.num{text-align:center;width:90px}
table.fixtbl td.bad{color:var(--bad-text);font-weight:600}table.fixtbl td.good{color:var(--good-text);font-weight:600}table.fixtbl .z{color:var(--muted)}
/* 35 tables are wrapped in <div class="scroll"> for a sideways scroller, and until 2026-11-20 the only
   rule for it was the @media print override - so the wrapper was inert and the CARD scrolled instead,
   dragging its padding and background along. The scrollbar belongs on the table. */
.scroll{overflow-x:auto;overflow-y:visible}
/* Roles: one line per function with its level, so a role reads top to bottom instead of as a wall of
   checkboxes. Collapses to a single column on a narrow screen. */
.permgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px 16px;margin:6px 0}
.permrow{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.permrow>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.permrow select{max-width:190px}
/* Settings is a stack of blocks, each saving only its own fields. The Save belongs to the block
   above it, so it is separated from the next card rather than floating between two of them. */
form.settings{margin-bottom:14px}
form.settings p.sv{margin:14px 0 0;padding-top:12px;border-top:1px solid var(--line,#2a2f3a)}
form.settings h2:first-of-type{margin-top:0}
/* Network attack graph on the Suricata page. Geometry comes from SVG attributes and colour from here:
   the portal CSP refuses a style attribute, so a chart cannot carry its own inline fills. */
.suribars{display:block;max-width:100%}
.suribars .bar{fill:var(--c-red,#d9534f);opacity:.85}
.suribars .bar:hover{opacity:1}
.suribars .lbl{fill:var(--muted);font-size:10px}
.suribars .val{fill:var(--strong);font-size:10px;font-variant-numeric:tabular-nums}
/* "Can I fix this today?" - the badge on a vulnerability row and the one-click filters above the list.
   Measured 2026-11-21: 575 of 3,696 open vulnerability findings have a vendor fix; 3,037 do not. That
   fact lived in the detail text, which the list truncates, so it was visible by luck. */
.fixb{display:inline-block;font-size:11px;line-height:17px;padding:0 7px;border-radius:9px;margin:0 6px 2px 0;white-space:nowrap}
.fixb.yes{background:var(--tint-green-bg);color:var(--good-text)}
.fixb.no{background:var(--tint-amber-bg);color:var(--tint-amber-text)}
.fixbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0;color:var(--muted);font-size:13px}
.fixbar .fixf{padding:5px 11px;border-radius:8px;border:1px solid var(--line);text-decoration:none;color:var(--text)}
.fixbar .fixf.yes{border-color:var(--good-text)}.fixbar .fixf.no{border-color:var(--tint-amber-text)}
.fixbar .fixf.on{background:var(--well);border-width:2px}
.fixbar .fixf:hover{border-color:var(--accent)}
/* the OS card's severity split: each one links to the findings it counts */
.sevmix{display:inline-block;margin-top:2px}
.sevmix .sevb{display:inline-block;font-size:10px;line-height:15px;padding:0 5px;border-radius:7px;margin-right:3px;text-decoration:none}
.sevmix .sevb.critical{background:var(--err-bg);color:var(--bad-text)}
.sevmix .sevb.high{background:var(--tint-hot-bg);color:var(--tint-hot-text)}
.sevmix .sevb.medium{background:var(--tint-amber-bg);color:var(--tint-amber-text)}
.sevmix .sevb.low{background:var(--line);color:var(--muted)}
details.info{display:inline-block;vertical-align:middle}
details.info>summary{list-style:none;cursor:pointer;color:var(--muted);font-size:13px;padding:0 4px;border-radius:50%}
details.info>summary::-webkit-details-marker{display:none}
details.info>summary:hover,details.info[open]>summary{color:var(--strong)}
details.info>div{white-space:normal;margin-top:6px;padding:8px 10px;max-width:320px;font-size:12px;color:var(--muted);background:var(--well);border:1px solid var(--line);border-radius:8px}
details.act{display:inline-block;vertical-align:middle}
details.act>summary{list-style:none;cursor:pointer;color:var(--muted);font-size:12px;padding:4px 10px;border:1px solid var(--line);border-radius:6px;user-select:none}
details.act>summary::-webkit-details-marker{display:none}
details.act .drop form input[type=password]{width:210px;max-width:100%}details.act .drop>small{flex-basis:100%}
/* The action panel has a row to itself (colspan), so it is not squeezed into the last column any more:
   no top border, and no 520px cap, because here the full table width is available to wrap into. */
table.assets tr.actrow>td{border-top:0;padding-top:0}
table.assets tr.actrow details.act .drop{max-width:none}
details.act>summary::after{content:" ▾";font-size:.8em}
details.act>summary:hover,details.act[open]>summary{color:var(--strong);border-color:var(--accent)}
details.act .drop{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:8px;padding:8px;max-width:min(520px,86vw);white-space:normal;background:var(--well);border:1px solid var(--line);border-radius:8px}

/* compact controls inside tables (app type, save) */
select.mini{width:auto;max-width:170px;padding:4px 6px;font-size:.85rem}
button.mini{padding:4px 8px;font-size:.8rem}

/* action replies stay visible at the top of the window, wherever the page was scrolled */
main > p.err:first-child{position:sticky;top:8px;z-index:70;box-shadow:0 6px 18px var(--shadow)}

/* action replies: green when it worked */
p.err.good{background:var(--good-bg);border-color:var(--good-line);color:var(--good-text)}
/* A caution is not a failure: amber, so red stays reserved for something that actually refused or broke. */
p.err.warn{background:var(--tint-amber-bg);border-color:var(--warning,#b8860b);color:var(--tint-amber-text)}
/* buttons that ask before acting (data-confirm, see app.js) */
.jump{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:0 0 16px}
.jump a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-radius:10px;background:var(--jump-bg);border:1px solid var(--jump-line);color:var(--jump-text);font-size:13px;text-decoration:none}
.jump a:hover{border-color:var(--c-red)}
.jump b{font-size:18px;color:var(--strong)}
@media(max-width:1100px){.jump{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.jump{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Khmer / English */
html[lang=km] *:not(code):not(pre):not(.mono){font-family:"Khmer UI","Leelawadee UI","Khmer Sangam MN","Noto Sans Khmer",system-ui,sans-serif}
html[lang=km] body{line-height:1.75}
html[lang=km] h1,html[lang=km] h2,html[lang=km] h3,html[lang=km] p,html[lang=km] a,html[lang=km] li{letter-spacing:normal;word-spacing:normal}
html[lang=km] h1{line-height:1.45;font-weight:700}
a.lang{font-weight:600;padding:2px 8px;border:1px solid currentColor;border-radius:6px;text-decoration:none}
.langbar{text-align:right;margin:8px 0}
/* role permission checkboxes (Users > Roles): tidy wrapping grid instead of one run-on line */
.perms{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px}
.perms label.chk{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;color:var(--muted)}
.perms input[type=checkbox]{width:auto;padding:0;margin:0}
/* phones: tighter table cells so more columns fit before the card scrolls */
@media(max-width:600px){th,td{padding:6px 5px}main{padding:16px}.card{padding:12px}}
/* role permission checkboxes (Users > Roles): tidy wrapping grid instead of one run-on line */
.perms{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px}
.perms label.chk{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;color:var(--muted)}
.perms input[type=checkbox]{width:auto;padding:0;margin:0}
/* phones: tighter table cells so more columns fit before the card scrolls */
@media(max-width:600px){th,td{padding:6px 5px}main{padding:16px}.card{padding:12px}}
/* update progress (Vulnerabilities page) */
#fixprog progress{display:block;width:100%;height:14px;margin:8px 0}
#fixprog .sevchg{display:flex;flex-wrap:wrap;gap:6px 18px;margin:8px 0}
#fixprog td.warn{color:var(--c-red)}
#rescanprog progress{display:block;width:100%;height:14px;margin:8px 0}
#rescanprog .sevchg{display:flex;flex-wrap:wrap;gap:6px 18px;margin:8px 0}
#rescanprog .warn{color:var(--c-red)}
#rescanprog .newf{margin:6px 0;padding-left:18px}
#ipfind input[name=ip]{min-width:240px}
.ipacts{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
/* sortable tables and table search (app.js) */
table.sortable tr:first-child>th[aria-sort]{cursor:pointer;user-select:none}table.sortable tr:first-child>th[aria-sort]:hover{color:var(--text)}table.sortable th[aria-sort=ascending]::after{content:' ▲'}table.sortable th[aria-sort=descending]::after{content:' ▼'}table.sortable th[aria-sort=none]::after{content:' ⇅';opacity:.35}.tfilter{display:flex;align-items:center;gap:10px;margin:0 0 10px}.tfilter input{flex:0 1 340px;padding:6px 10px}.tfilter small{color:var(--muted)}@media print{.tfilter{display:none}table.sortable th::after{content:''!important}}
.sevlink{color:inherit;text-decoration:none;border-radius:6px;padding:2px 4px}.sevlink:hover{background:var(--line)}.fixmix a{color:inherit}.fixmix a:hover b{text-decoration:underline}
.riskq td:nth-child(2),.riskq td:nth-child(3),.riskq td:nth-child(4){text-align:center;width:44px}.riskq input[type=radio]{width:18px;height:18px}.riskq td:last-child input{width:100%;min-width:140px}
.mitre-tac{margin:0 0 20px}.mitre-tac h3{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:0 0 10px;padding-bottom:6px;border-bottom:1px solid var(--line)}
.mitre-cells{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.mitre-cell{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:10px 12px;font-size:.85rem}
.mitre-cell.hot{border-color:var(--accent);background:rgba(226,56,63,.10)}
.mitre-cell .pill{display:inline-block;background:var(--accent);color:var(--on-accent);border-radius:999px;padding:1px 8px;font-weight:700;font-size:.8rem;margin-left:4px}
.mitre-cell .tn{margin-top:3px}.mitre-cell .tn small{color:var(--muted)}
/* EDR process tree (Processes page) */
.proctree,.proctree ul{list-style:none;margin:0;padding-left:0}
.proctree ul{padding-left:18px;margin-left:7px;border-left:1px solid rgba(128,140,160,.22)}
.proctree li{padding:3px 0}
.proctree>li{padding-left:2px}

/* ===== Platform map (src/archmap.php). CSP: no inline <style>/style="" — all of it lives here ===== */
#archmap{--amx-ink:#e7eefb;--amx-dim:#9fb2cf;--amx-line:#2c3a55;color:var(--amx-ink);max-width:1240px}
#archmap h1{margin:0 0 4px}
#archmap h1 small{color:var(--amx-dim);font-weight:500}
#archmap .amx-sub{color:var(--amx-dim);margin:0 0 14px;max-width:74ch}
#archmap .amx-wrap{background:radial-gradient(1200px 500px at 50% -10%,rgba(61,155,233,.10),transparent 60%);border:1px solid var(--amx-line);border-radius:14px;padding:6px}
#archmap svg{display:block;width:100%;height:auto}
#archmap .amx-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 2px 6px}
#archmap .amx-controls button{background:#1e2d49;color:var(--amx-ink);border:1px solid var(--amx-line);border-radius:8px;padding:6px 12px;cursor:pointer;font:inherit}
#archmap .amx-controls button:hover{border-color:#4aa6ef}
#archmap .amx-cap{font-weight:600;min-height:1.4em;margin:0 2px 8px;color:var(--amx-ink)}
#archmap .amx-cap b{color:#4aa6ef}
#archmap .amx-legend{display:flex;gap:16px;flex-wrap:wrap;color:var(--amx-dim);font-size:13px;margin-left:auto}
#archmap .amx-sw{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:5px;vertical-align:-1px}
#archmap .amx-sw.r{background:#e5484d}#archmap .amx-sw.b{background:#4aa6ef}#archmap .amx-sw.y{background:#f3c251}
#archmap .amx-sw.g{background:#3fcf96}#archmap .amx-sw.v{background:#a78cf5}
#archmap .amx-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 2px 0}
#archmap .amx-steps div{background:#121b2e;border:1px solid var(--amx-line);border-left:3px solid #4aa6ef;border-radius:9px;padding:10px 12px}
#archmap .amx-steps b{display:block;color:var(--amx-ink)}
#archmap .amx-steps small{color:var(--amx-dim)}
#archmap .amx-steps div:nth-child(2){border-left-color:#38d0d6}
#archmap .amx-steps div:nth-child(3){border-left-color:#f3c251}
#archmap .amx-steps div:nth-child(4){border-left-color:#3fcf96}
@media(max-width:760px){#archmap .amx-steps{grid-template-columns:1fr 1fr}}
#archmap .card{fill:#1e2d49;stroke:#3a4c6e;stroke-width:1.2;background:none;border:0;padding:0;margin:0}
#archmap .hub{fill:#15223b;stroke:#3a4c6e;stroke-width:1.5}
#archmap .t{fill:#eef4ff;font:600 13px system-ui,sans-serif}
#archmap .t.t-sm{font-size:12px}
#archmap .t.t-red{fill:#e5484d}
#archmap .t.t-grn{fill:#3fcf96;letter-spacing:.06em}
#archmap .card.g{stroke:#3fcf96}#archmap .card.y{stroke:#f3c251}#archmap .card.v{stroke:#a78cf5}
#archmap .ts{fill:#b7c6e2;font:500 11px system-ui,sans-serif}
#archmap .tt{fill:#b7c6e2;font:700 11px system-ui,sans-serif;letter-spacing:.08em}
#archmap .link{fill:none;stroke:#546891;stroke-opacity:.4;stroke-width:2}
#archmap .flow{fill:none;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:3 9;opacity:.6}
#archmap .flow.b{stroke:#4aa6ef}#archmap .flow.c{stroke:#38d0d6}#archmap .flow.g{stroke:#3fcf96}#archmap .flow.v{stroke:#a78cf5}#archmap .flow.y{stroke:#f3c251}
#archmap.run .flow{animation:amx-dash 1s linear infinite}
@keyframes amx-dash{to{stroke-dashoffset:-24}}
#archmap .node rect{transition:stroke .25s,filter .25s}
#archmap .node.hot rect{stroke:#ffd36b;stroke-width:2.4;filter:drop-shadow(0 0 7px rgba(255,211,107,.65))}
#archmap .node.hot .t{fill:#fff}
#archmap .stamp-tx{font:700 12px system-ui,sans-serif;letter-spacing:.04em}
#archmap #amx-stamp{transition:opacity .3s}
@media(prefers-reduced-motion:reduce){#archmap.run .flow{animation:none}}

/* ===== Relationship Sankeys (src/secmon.php: EDR processes + ITDR identity); click handling is in app.js ===== */
svg.flowsk{max-width:940px;font:11px system-ui,sans-serif}
svg.flowsk .pn{cursor:pointer}
svg.flowsk .pn text{transition:opacity .15s}
svg.flowsk.sel .rb{opacity:.07}
svg.flowsk.sel .rb.on{opacity:1;animation:flowsk-pulse 1.1s ease-in-out infinite}
svg.flowsk.sel .pn{opacity:.3}
svg.flowsk.sel .pn.on{opacity:1}
svg.flowsk .pn:focus{outline:none}
@keyframes flowsk-pulse{0%,100%{stroke-opacity:.9}50%{stroke-opacity:.3}}
.flowsk-detail{margin-top:.5rem}
.sk-legend{margin:.5rem 0 .2rem}
.sk-n{color:#5b9bd5}.sk-w{color:#f6c453}.sk-b{color:#ff5d6c}
.sk-code{word-break:break-all}

/* ===== IDS health: Upgrade advisor bars + Docker list (src/idshealth.php) ===== */
.cap{margin:7px 0}
.cap-h{display:flex;justify-content:space-between;gap:8px;font-size:.85em;margin-bottom:3px}
svg.cap-bar{display:block;width:100%;height:9px;border-radius:5px}
svg.cap-bar rect.bg{fill:#8c9ab0;fill-opacity:.2}
svg.cap-bar rect.ok{fill:#2e9e5b}svg.cap-bar rect.warn{fill:#d79121}svg.cap-bar rect.off{fill:#c23b3b}
.h-sub{font-weight:500}
pre.prewrap{white-space:pre-wrap;overflow-wrap:anywhere}
/* ===== Break-glass sign-in form (src/breakglass.php) ===== */
main.bg-door{max-width:620px;margin:8vh auto;padding:0 16px}
main.bg-door form{display:flex;gap:8px;flex-wrap:wrap}
main.bg-door input{flex:1 1 320px;font-family:ui-monospace,monospace}

/* Automation (SOAR) page: mode radios */
.soar-mode{margin-right:14px}

/* ===== Compare page (src/compare.php), moved from an inline <style> ===== */
table.cmp{border-collapse:collapse;width:100%;min-width:640px}table.cmp th,table.cmp td{padding:7px 9px;text-align:center;border-bottom:1px solid var(--line,#e2e7ea)}table.cmp td.dom{text-align:left;font-weight:600;white-space:nowrap}table.cmp th.us,table.cmp td.us{background:rgba(31,111,107,.10)}.cmp-d{font-size:1.05rem;line-height:1}.cmp-d.f{color:#1e7a52}.cmp-d.p{color:#9a6a12}.cmp-d.n{color:#b23b3b}.cmp-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:700px){.cmp-two{grid-template-columns:1fr}}.cmp-two ul{margin:6px 0 0;padding-left:18px}.cmp-two li{margin:6px 0;font-size:.9rem}.cmp-uniq{display:grid;gap:10px}.cmp-uniq .u{border-left:3px solid #9a6a12;background:rgba(154,106,18,.06);border-radius:8px;padding:10px 13px}.cmp-uniq h3{margin:0 0 3px;font-size:.98rem}.cmp-uniq p{margin:0;color:var(--muted,#5a6672);font-size:.9rem}.cmp-verdict{border-left:3px solid #1f6f6b}
table.cmp th.cap-h{text-align:left}

/* ===== Playbooks page (src/playbooks.php), moved from an inline <style> ===== */
.pb-steps{margin:0;padding-left:18px}.pb-steps li{margin:2px 0;font-size:.85rem}
.pb-hot{background:#c0392b;color:#fff;border-radius:999px;padding:1px 9px;font-weight:700}
.pb-on{color:#1e7e34;font-weight:700}.pb-notify{color:#b8860b;font-weight:700}.pb-off{color:var(--muted,#8b98ad)}

/* ===== Provision page (src/provision.php), moved from an inline <style> ===== */
.prov .row{display:flex;gap:14px;flex-wrap:wrap}.prov label{display:block;margin:8px 0;flex:1;min-width:140px}
.prov input,.prov select,.prov textarea{width:100%;padding:6px;box-sizing:border-box}
.prov .ck{display:flex;gap:8px;align-items:center}
.prov-pre{white-space:pre-wrap;font-size:.8rem}

/* ===== Protection SLA page (src/sla.php), browser view only; the PDF keeps its own inline CSS ===== */
.sla-head{background:var(--panel,#121826);border:1px solid var(--line,#1f2a3d);border-radius:10px;padding:14px 18px;margin-bottom:12px}
.sla-head small{color:var(--muted,#8b98ad)}
.sla-head h1{margin:2px 0 4px}
.sla-big{font-size:34px;font-weight:700;line-height:1}
.sla-scorecell{width:25%;text-align:center}
.sla-ok{color:var(--c-ok)}.sla-warn{color:#d69e2e}.sla-bad{color:#e53e3e}

/* ===== SOC workflow page (src/socflow.php) ===== */
.soc-progress{margin:10px 0 16px}
.soc-stage{background:var(--panel,#121826);border:1px solid var(--line,#1f2a3d);border-left:3px solid var(--line,#1f2a3d);border-radius:10px;padding:12px 16px;margin:0 0 14px}
.soc-stage.soc-set{border-left-color:var(--c-ok)}
.soc-stage h2{margin:0 0 6px;font-size:1.02rem;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.soc-num{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:rgba(61,143,224,.14);color:var(--text,#dfe6f2);font-size:.85rem;font-weight:700;flex:none}
.soc-ok{font-size:.7rem;font-weight:600;color:var(--c-ok);border:1px solid var(--c-ok);border-radius:999px;padding:1px 8px}
.soc-todo{font-size:.7rem;font-weight:600;color:var(--muted,#8b98ad);border:1px solid var(--line,#1f2a3d);border-radius:999px;padding:1px 8px}
.soc-means{margin:0 0 6px}
.soc-ids{margin:0 0 8px;color:var(--muted,#8b98ad);font-size:.9rem}
.soc-links{margin:0 0 10px;display:flex;gap:8px;flex-wrap:wrap}
.soc-links a{font-size:.85rem;border:1px solid var(--line,#1f2a3d);border-radius:999px;padding:2px 10px;text-decoration:none}
.soc-vals{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0 0 8px;font-size:.9rem}
.soc-vals dt{color:var(--muted,#8b98ad)}
.soc-vals dd{margin:0}
@media(max-width:700px){.soc-vals{grid-template-columns:1fr}.soc-vals dt{margin-top:6px}}

/* ===== Platform map: info badge + explanation panel (src/archmap.php, drawn by public/app.js) ===== */
#archmap .amx-nfo{cursor:pointer}
#archmap .amx-nfo circle{fill:rgba(61,143,224,.18);stroke:#3d8fe0;stroke-width:1}
#archmap .amx-nfo text{fill:#9fc6ee;font:italic 700 10px/1 serif;pointer-events:none}
#archmap .amx-nfo:hover circle{fill:rgba(61,143,224,.42)}
#archmap .amx-nfo:focus{outline:none}
#archmap .amx-nfo:focus circle{stroke-width:2.2}
#archmap .amx-infos{margin:10px 0}
#archmap .amx-info{background:var(--panel,#121826);border:1px solid var(--line,#1f2a3d);border-left:3px solid #3d8fe0;border-radius:10px;padding:12px 16px;margin:0 0 10px}
#archmap .amx-info h3{margin:0 0 6px;font-size:1rem}
#archmap .amx-info dl{margin:0}
#archmap .amx-info dt{color:var(--muted,#8b98ad);font-size:.74rem;text-transform:uppercase;letter-spacing:.05em;margin-top:8px}
#archmap .amx-info dd{margin:3px 0 0}
#archmap .amx-info-x{float:right;margin-left:12px}

/* ===== SOC workflow: attaching systems, capabilities and recipients (src/socflow.php) ===== */
.soc-warn{background:rgba(224,160,61,.12);border:1px solid var(--c-orange);border-radius:8px;padding:8px 12px;margin:0 0 14px}
.soc-chip{display:inline-block;background:rgba(61,143,224,.16);border:1px solid #3d8fe0;border-radius:999px;
          padding:1px 10px;margin:0 6px 4px 0;font-size:.85rem}
.soc-links a.soc-cap-on{border-color:#1f9d55;color:#8fe0b4;background:rgba(31,157,85,.12)}
.soc-links a.soc-cap-off{opacity:.75}
.soc-pick{border:1px solid var(--line,#1f2a3d);border-radius:10px;padding:10px 14px;margin:0 0 12px}
.soc-pick legend{padding:0 6px;color:var(--muted,#8b98ad);font-size:.78rem;text-transform:uppercase;letter-spacing:.05em}
.soc-pick-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:4px 14px;
               max-height:240px;overflow-y:auto}
.soc-pick-item{display:flex;align-items:center;gap:7px;font-size:.9rem;margin:0;padding:2px 0;font-weight:400}
.soc-pick-item input{flex:none;margin:0}
@media(max-width:700px){.soc-pick-list{grid-template-columns:1fr}}

/* ===== Service traffic page (src/svctraffic.php) ===== */
.svc-table{width:100%;border-collapse:collapse;margin:6px 0 18px}
.svc-table th{text-align:left;font-size:.74rem;text-transform:uppercase;letter-spacing:.05em;
              color:var(--muted,#8b98ad);border-bottom:1px solid var(--line,#1f2a3d);padding:6px 10px 6px 0}
.svc-table td{padding:6px 10px 6px 0;border-bottom:1px solid rgba(31,42,61,.5);vertical-align:top}
.svc-table tr.svc-wide td{background:rgba(224,160,61,.08)}
.svc-flag{font-size:.7rem;font-weight:600;color:var(--c-orange);border:1px solid var(--c-orange);border-radius:999px;padding:0 7px;margin-left:5px}
.svc-h{display:inline-block;font-size:.8rem;color:var(--muted,#8b98ad);margin:0 9px 3px 0;white-space:nowrap}
.svc-h b{color:var(--text,#dfe6f2)}
@media(max-width:700px){.svc-table th:nth-child(5),.svc-table td:nth-child(5){display:none}}

/* period label beside a heading, the note under a service name, and the program column */
.svc-period{font-size:.72rem;font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted,#8b98ad);
            border:1px solid var(--line,#1f2a3d);border-radius:999px;padding:1px 9px;margin-left:8px;white-space:nowrap}
.svc-sub{font-size:.76rem;color:var(--muted,#8b98ad);font-weight:400;margin-top:2px}
.svc-table code{font-size:.82rem;background:rgba(61,143,224,.12);border-radius:4px;padding:1px 5px}
@media(max-width:700px){.svc-period{display:block;margin:4px 0 0;width:fit-content}}

/* the busiest hour for a machine, in the peak table */
.svc-h-top{background:var(--tint-blue-bg);border-color:var(--tint-blue-line);color:var(--tint-blue-text)}
/* IDS / IPS / Other function type badges (src/remotefix.php ftype_badge): the SOC team sees at a glance what a function does */
.ftype{display:inline-block;font-size:10px;font-weight:700;line-height:16px;padding:0 6px;border-radius:8px;letter-spacing:.3px;vertical-align:middle;white-space:nowrap}
.ftype.ids{background:var(--tint-blue-bg);color:var(--tint-blue-text)}
.ftype.ips{background:var(--tint-red-bg);color:var(--tint-red-text)}
.ftype.other{background:var(--tint-grey-bg);color:var(--tint-grey-text)}
.ftype-legend{font-size:12px;color:var(--muted,#9aa3ad);margin:4px 0 8px}
.ipsctl{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px;margin-left:4px}

/* Platform map: the attacker on the left, attacking the servers */
#archmap .atk-ring{fill:rgba(229,72,77,.12);stroke:#e5484d;stroke-width:1.5}
#archmap .atk-icon{font-size:24px}
#archmap path.flow.atk{stroke:#e5484d;stroke-dasharray:6 5;opacity:.75}
#archmap .link.appr{stroke:#f3c251;stroke-opacity:.55;stroke-width:1.2;stroke-dasharray:4 4}
#archmap .ts.t-appr{fill:#f3c251}
#archmap .lanbg{fill:rgba(229,72,77,.04);stroke:#3a4c6e;stroke-width:1.2;stroke-dasharray:6 6}
#archmap .card.r{stroke:#e5484d}

/* ---- Platform map: the inline-IPS condition walk (src/archmap.php). The portal allows no inline CSS. ---- */
#archmap .amx-h2{margin:34px 0 6px;font-size:19px}
#ipsf{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start;margin:14px 0 8px}
@media(max-width:900px){#ipsf{grid-template-columns:1fr}}
#ipsf .ipsf-scen{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px}
#ipsf .ipsf-s{font:inherit;font-size:13px;text-align:left;cursor:pointer;color:inherit;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.14);border-radius:9px;padding:7px 10px}
#ipsf .ipsf-s:hover{border-color:#4aa6ef}
#ipsf .ipsf-s[aria-pressed="true"]{border-color:#4aa6ef;background:rgba(74,166,239,.14)}
#ipsf .ipsf-s span{display:block;opacity:.62;font-size:11.5px;margin-top:1px}
#ipsf .ipsf-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;min-width:0}
#ipsf .ipsf-row{position:relative;padding:10px 12px 10px 42px;border-radius:10px;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.03);opacity:.4;
  transition:opacity .4s,border-color .4s}
#ipsf .ipsf-row.on{opacity:1;border-color:#4aa6ef}
#ipsf .ipsf-row.was{opacity:.8}
#ipsf .ipsf-row.pass.on{border-color:#3fcf96}
#ipsf .ipsf-row.hold.on{border-color:#f3c251}
#ipsf .ipsf-row.drop.on{border-color:#e5484d}
#ipsf .ipsf-dot{position:absolute;left:14px;top:13px;width:15px;height:15px;border-radius:50%;
  border:2px solid rgba(255,255,255,.3);transition:background .4s,border-color .4s,box-shadow .4s}
#ipsf .ipsf-row.on .ipsf-dot{border-color:#4aa6ef;background:#4aa6ef;box-shadow:0 0 0 5px rgba(74,166,239,.16)}
#ipsf .ipsf-row.pass.on .ipsf-dot{border-color:#3fcf96;background:#3fcf96;box-shadow:0 0 0 5px rgba(63,207,150,.16)}
#ipsf .ipsf-row.hold.on .ipsf-dot{border-color:#f3c251;background:#f3c251;box-shadow:0 0 0 5px rgba(243,194,81,.16)}
#ipsf .ipsf-row.drop.on .ipsf-dot{border-color:#e5484d;background:#e5484d;box-shadow:0 0 0 5px rgba(229,72,77,.18)}
#ipsf .ipsf-q{margin:0;font-size:14.5px}
#ipsf .ipsf-br{margin:5px 0 0;font-size:12.5px;opacity:.72;display:none}
#ipsf .ipsf-row.on .ipsf-br,#ipsf .ipsf-row.was .ipsf-br{display:block}
#ipsf .ipsf-br b{font-family:ui-monospace,Consolas,monospace;font-size:11.5px;letter-spacing:.03em;margin-right:5px}
#ipsf .ipsf-br b.y{color:#3fcf96}
#ipsf .ipsf-br b.n{color:#e5484d}
#ipsf .ipsf-why{margin:5px 0 0;font-size:12.5px;opacity:.6;display:none}
#ipsf .ipsf-row.on .ipsf-why{display:block}
#ipsf .ipsf-out{border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:14px 15px;
  background:rgba(255,255,255,.03);position:sticky;top:12px}
#ipsf .ipsf-tag{margin:0 0 5px;font-size:17px;font-weight:600}
#ipsf .ipsf-out.pass .ipsf-tag{color:#3fcf96}
#ipsf .ipsf-out.hold .ipsf-tag{color:#f3c251}
#ipsf .ipsf-out.drop .ipsf-tag{color:#e5484d}
#ipsf .ipsf-txt{margin:0;font-size:13px;opacity:.74}
#ipsf .ipsf-log{list-style:none;margin:11px 0 0;padding:0;font-family:ui-monospace,Consolas,monospace;font-size:11.5px;opacity:.64}
#ipsf .ipsf-log li{padding:4px 0;border-top:1px solid rgba(255,255,255,.1);word-break:break-word}
@media(prefers-reduced-motion:reduce){#ipsf *{transition:none}}

/* findings list: a long value - a base64 command, a 60-character host, a DOMAIN\MACHINE$ account -
   must break rather than widen the row. Without this an unbreakable token scrolls the card. */
.fdetail{display:block;overflow-wrap:anywhere;word-break:normal;color:var(--muted)}
/* Service traffic: live panel, "who connects to which port" Sankey, peer map and connections table (public/svcflow.js) */
.svc-live-top{display:flex;flex-wrap:wrap;align-items:center;gap:18px;margin-bottom:10px}
.svc-now{color:var(--muted);font-size:13px}.svc-now span{margin-right:6px}.svc-now b{font-size:26px;color:var(--link);font-variant-numeric:tabular-nums}
.svc-now-tx b{color:var(--tx)}
.svc-live-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px}@media(max-width:900px){.svc-live-grid{grid-template-columns:1fr}}
.svc-h3{font-size:13px;color:var(--muted);margin:0 0 4px;font-weight:500}
.svc-chart svg{width:100%;height:auto;display:block}
.svc-grid{stroke:var(--line);stroke-width:1}.svc-axis{fill:var(--muted);font-size:10px}
.svc-ln{fill:none;stroke-width:2;stroke-linejoin:round}.svc-ln.svc-rx{stroke:var(--rx)}.svc-ln.svc-tx{stroke:var(--tx)}
.svc-band{fill:transparent}.svc-band:hover{fill:rgba(127,182,255,.08)}
.svc-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:12px;margin-top:4px}
.svc-key::before{content:"";display:inline-block;width:14px;height:3px;margin-right:5px;vertical-align:middle;border-radius:2px}
.svc-key.svc-rx::before{background:var(--rx)}.svc-key.svc-tx::before{background:var(--tx)}
#svc-flow{position:relative}
.svc-controls{align-items:center;margin-bottom:8px}.svc-controls label{color:var(--muted);font-size:12px}.svc-controls select{padding:4px 6px}
.svc-chips{min-height:8px;margin-bottom:6px}.svc-chip{cursor:pointer;color:var(--tint-blue-text);border-color:var(--tint-blue-line);background:var(--tint-blue-bg)}.svc-chip:hover{border-color:var(--accent);text-decoration:none}
.svc-sankey{overflow-x:auto}.svc-sk{width:100%;min-width:720px;height:auto;display:block}
.svc-col{fill:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.svc-link{fill:none;stroke-opacity:.32;transition:stroke-opacity .15s}.svc-link:hover{stroke-opacity:.6}
.svc-lbl{fill:var(--text);font-size:11px;pointer-events:none}
.svc-node rect{stroke:rgba(0,0,0,.35)}.svc-click{cursor:pointer}.svc-click:hover rect{stroke:var(--strong)}
.svc-link.svc-dim{stroke-opacity:.06}.svc-node.svc-dim{opacity:.3}
.svc-tip{position:absolute;z-index:500;max-width:260px;white-space:pre-line;pointer-events:none;background:var(--head-bg);border:1px solid var(--line);border-radius:6px;padding:6px 9px;font-size:12px;box-shadow:0 4px 14px var(--shadow)}
.svc-map{height:420px;border-radius:8px;background:var(--input-bg)}
.svc-ext,.svc-int{font-size:.7rem;font-weight:600;border-radius:999px;padding:0 7px;white-space:nowrap}
.svc-ext{color:var(--bad-text);border:1px solid var(--bad-line)}.svc-int{color:#9fe0bf;border:1px solid #1d5d3a}
.svc-danger{display:inline-block;font-size:.7rem;font-weight:700;color:var(--on-accent);background:var(--critical);border-radius:999px;padding:0 8px;white-space:nowrap}
.svc-table tr.svc-risk td{background:rgba(226,56,63,.12)}
.svc-peers td.num,.svc-peers th.num{text-align:right}
/* invisible click area over a Sankey box and its label (public/svcflow.js) */
.svc-hit, .svc-node rect.svc-hit, .svc-click:hover rect.svc-hit { fill: transparent; stroke: none; pointer-events: all; }
/* live panel server picker (public/svcflow.js) */
.svc-pick { margin: 8px 0 4px; }
.svc-pickchip { cursor: pointer; border: 1px solid var(--line, #2a3242); background: transparent; color: inherit; }
.svc-pickchip.on { background: var(--rx); border-color: var(--rx); color: var(--on-accent); }
/* database exposure table on Service traffic (src/dbexpo.php db_expo_section) */
.dbx-table td{font-size:.84rem}
.dbx-ok{color:#3fb950}.dbx-warn{color:var(--medium)}.dbx-bad{color:var(--critical)}.dbx-unknown{color:#8b949e}
.dbx-advice{min-width:220px}
@media(max-width:700px){.dbx-table th:nth-child(n+5),.dbx-table td:nth-child(n+5){display:none}}

/* helpers that replace style="" attributes the CSP was silently dropping (index.php users/score/API keys/agents, auditchain.php) */
.fb-all{flex-basis:100%}.big2{font-size:2em}.big11{font-size:1.1rem}.w22{min-width:22em}h2.inl{display:inline}

/* ===== Theme switch in the header (public/index.php layout_top, action set_theme) ===== */
.theme-sw button{padding:2px 9px;font-size:12px}

/* =====================================================================================================
   Theme "soft" (owner 2026-11-18: "build this style to ids server too, user able to select that themes").
   A light neumorphic ("embossed") look: surfaces share the page colour and are lifted or pressed by two soft
   shadows (light top-left, dark bottom-right) instead of borders. Chosen per user (users.theme, set_theme) and
   painted only through html[data-theme="soft"], so the default dark theme above stays exactly as it was.
   Severity colours are deepened so badges and tiles keep their meaning on a light background.
   ===================================================================================================== */
/* contrast (review 2026-11-18): every text colour below is >= 4.5:1 on #e4e8ef (WCAG AA): links #0b55c4 ~5.6:1, muted #4a5868 ~5.9:1;
   severity fills are darkened so their white badge text passes too (critical ~6:1, high ~5.1:1, low ~5.6:1, info ~5.9:1); medium keeps dark ink */
html[data-theme="soft"]{
  --bg:#e4e8ef;--panel:#e4e8ef;--line:rgba(120,135,160,.28);--text:#1f2733;--muted:#4a5868;--accent:#0b55c4;
  --critical:#b4232f;--high:#a8520f;--medium:#c99a06;--low:#1f63b8;--info:#56657a;
  --strong:#1f2733;--link:#0b55c4;--head-bg:#e4e8ef;--input-bg:#e4e8ef;--well:#e4e8ef;--on-accent:#fff;--sev-ink:#fff;
  --shadow:rgba(163,177,198,.6);--err-bg:#f4dcdf;--good-bg:#d9eee2;--good-line:#4fb37a;--good-text:#17673b;--bad-text:#a3202b;--bad-line:#e2a3a9;
  --tint-blue-bg:#d3e2f7;--tint-blue-line:#9dbbe6;--tint-blue-text:#1b4f9c;--tint-green-bg:#d5eadc;--tint-amber-bg:#f1e5c0;--tint-amber-text:#6f5200;
  --tint-hot-bg:#f5dcc5;--tint-hot-text:#86400c;--tint-red-bg:#f5d5d8;--tint-red-text:#94202a;--tint-grey-bg:#d7dce5;--tint-grey-text:#3c4757;
  --c-red:#d93644;--c-orange:#b5690f;--c-ok:#1a7f45;--advice:#2b7a3d;
  --rx:#2f7fd6;--tx:#b38800;--chart-other:#6b7a90;--chart-internal:#1f9d55;--map-attack:#d93644;--map-blocked:#2f7fd6;
  --jump-bg:#e4e8ef;--jump-line:transparent;--jump-text:#1f2733;
  /* the two-shadow recipe; "inset" is the pressed variant */
  --nm-dark:rgba(163,177,198,.6);--nm-light:#ffffff;
  --raise:6px 6px 14px var(--nm-dark),-6px -6px 14px var(--nm-light);
  --raise-sm:3px 3px 7px var(--nm-dark),-3px -3px 7px var(--nm-light);
  --inset:inset 3px 3px 7px var(--nm-dark),inset -3px -3px 7px var(--nm-light);
  --inset-sm:inset 2px 2px 4px var(--nm-dark),inset -2px -2px 4px var(--nm-light);
  --r-lg:20px;--r-md:14px;--radius-sm:12px;
  color-scheme:light
}
html[data-theme="soft"] body{background:var(--bg);color:var(--text)}
html[data-theme="soft"] h2{color:var(--muted)}
/* header: one raised bar; the open page's menu entry is pressed in */
html[data-theme="soft"] header{border-bottom:0;box-shadow:0 6px 14px var(--nm-dark);position:relative;z-index:5}
html[data-theme="soft"] nav a.on,html[data-theme="soft"] nav a:hover,
html[data-theme="soft"] details.menu>summary.on,html[data-theme="soft"] details.menu>summary:hover,html[data-theme="soft"] details.menu[open]>summary{background:var(--bg);box-shadow:var(--inset-sm);border-radius:var(--radius-sm);text-decoration:none}
html[data-theme="soft"] details.menu .drop,html[data-theme="soft"] details.info>div,html[data-theme="soft"] details.act .drop{border-color:transparent;border-radius:var(--r-md);box-shadow:var(--raise)}
/* raised surfaces. Coloured strips (tiles, SOC stages, map info) carry meaning, so only the other sides lose their border */
html[data-theme="soft"] .card,html[data-theme="soft"] .side,html[data-theme="soft"] .kpis div,html[data-theme="soft"] .kpis a.kpi,html[data-theme="soft"] .sla-head,
html[data-theme="soft"] .mitre-cell,html[data-theme="soft"] .jump a,html[data-theme="soft"] .soc-pick{border-color:transparent;border-radius:var(--r-lg);box-shadow:var(--raise)}
html[data-theme="soft"] .tile,html[data-theme="soft"] .soc-stage,html[data-theme="soft"] #archmap .amx-info,html[data-theme="soft"] #archmap .amx-steps div{border-right-color:transparent;border-bottom-color:transparent;border-radius:var(--r-lg);box-shadow:var(--raise)}
html[data-theme="soft"] .tile{border-left-color:transparent}
html[data-theme="soft"] .soc-stage,html[data-theme="soft"] #archmap .amx-info,html[data-theme="soft"] #archmap .amx-steps div{border-top-color:transparent}
html[data-theme="soft"] .side .tile{box-shadow:var(--raise-sm);border-radius:var(--r-md)}
html[data-theme="soft"] .mitre-cell.hot{box-shadow:var(--raise),inset 0 0 0 2px var(--accent)}
html[data-theme="soft"] .jump a:hover{box-shadow:var(--inset)}
/* inputs and wells are pressed in */
html[data-theme="soft"] input,html[data-theme="soft"] select,html[data-theme="soft"] textarea{border-color:transparent;box-shadow:var(--inset)}
html[data-theme="soft"] input[type=checkbox],html[data-theme="soft"] input[type=radio]{box-shadow:none;accent-color:var(--accent)}
html[data-theme="soft"] pre.mono,html[data-theme="soft"] code,html[data-theme="soft"] .svc-table code{background:var(--bg);border-color:transparent;border-radius:var(--radius-sm);box-shadow:var(--inset-sm)}
html[data-theme="soft"] code{padding:1px 5px}
html[data-theme="soft"] .chip,html[data-theme="soft"] .pill.can,html[data-theme="soft"] .svc-pickchip,html[data-theme="soft"] .soc-links a,html[data-theme="soft"] .svc-period,html[data-theme="soft"] .soc-todo{border-color:transparent;box-shadow:var(--raise-sm)}
html[data-theme="soft"] .svc-pickchip.on{box-shadow:var(--inset-sm)}
html[data-theme="soft"] .svc-chart,html[data-theme="soft"] .svc-sankey,html[data-theme="soft"] .svc-map{border-radius:var(--r-md);box-shadow:var(--inset);padding:8px}
html[data-theme="soft"] .svc-map{padding:0}
/* buttons: raised, pressed while clicked. Primary = accent text on the raised surface; ghost = muted */
html[data-theme="soft"] button,html[data-theme="soft"] .btn,html[data-theme="soft"] details.act>summary{background:var(--bg);color:var(--accent);font-weight:600;border-color:transparent;border-radius:var(--radius-sm);box-shadow:var(--raise-sm)}
html[data-theme="soft"] button.ghost,html[data-theme="soft"] details.act>summary{color:var(--muted);font-weight:500}
html[data-theme="soft"] button.danger,html[data-theme="soft"] button.ghost.danger{color:var(--critical)}
html[data-theme="soft"] button:hover,html[data-theme="soft"] .btn:hover,html[data-theme="soft"] details.act>summary:hover{color:var(--strong);border-color:transparent;opacity:1;text-decoration:none}
html[data-theme="soft"] button.danger:hover,html[data-theme="soft"] button.ghost.danger:hover{color:var(--bad-text)}
html[data-theme="soft"] button:active,html[data-theme="soft"] .btn:active,html[data-theme="soft"] details.act[open]>summary,html[data-theme="soft"] button[aria-pressed="true"]{box-shadow:var(--inset-sm)}
/* keyboard focus must stay obvious without borders */
html[data-theme="soft"] :focus-visible{outline:2px solid var(--accent);outline-offset:2px}
html[data-theme="soft"] input:focus,html[data-theme="soft"] select:focus,html[data-theme="soft"] textarea:focus{outline:2px solid var(--accent);outline-offset:1px}
/* tables: no grid, only soft row separators */
html[data-theme="soft"] th,html[data-theme="soft"] td,html[data-theme="soft"] .svc-table td{border-bottom-color:var(--line)}
/* badges: medium (yellow) needs dark ink on a light page */
html[data-theme="soft"] .sev{box-shadow:1px 1px 3px var(--nm-dark)}
html[data-theme="soft"] .sev.medium{color:#1f2733}
html[data-theme="soft"] .kind.evidence,html[data-theme="soft"] .kind.status,html[data-theme="soft"] .kind.finding{color:#fff}
/* messages */
html[data-theme="soft"] .err{border-radius:var(--r-md);border-color:var(--bad-line);box-shadow:var(--raise-sm)}
html[data-theme="soft"] p.err.good{border-color:var(--good-line)}
/* progress bars: inset track, accent fill */
html[data-theme="soft"] progress{-webkit-appearance:none;appearance:none;height:14px;border:0;border-radius:999px;background:var(--bg);box-shadow:var(--inset-sm);overflow:hidden}
html[data-theme="soft"] progress::-webkit-progress-bar{background:transparent;border-radius:999px}
html[data-theme="soft"] progress::-webkit-progress-value{background:var(--accent);border-radius:999px}
html[data-theme="soft"] progress::-moz-progress-bar{background:var(--accent);border-radius:999px}
/* tooltips and Leaflet maps (threat map, service traffic peer map) */
html[data-theme="soft"] .svc-tip{background:#f3f5f9;color:var(--text);border-color:transparent;border-radius:var(--radius-sm);box-shadow:var(--raise)}
html[data-theme="soft"] #threatmap,html[data-theme="soft"] .leaflet-container{background:var(--bg);border-radius:var(--r-md);box-shadow:var(--inset)}
html[data-theme="soft"] .leaflet-popup-content-wrapper,html[data-theme="soft"] .leaflet-popup-tip,html[data-theme="soft"] .leaflet-tooltip{background:#f3f5f9;color:var(--text);box-shadow:var(--raise-sm)}
/* page-specific colours that were tuned for a dark page */
html[data-theme="soft"] .sk-n{color:#2f6fb0}html[data-theme="soft"] .sk-w{color:#9a6f00}html[data-theme="soft"] .sk-b{color:#c22a3a}
html[data-theme="soft"] .svc-int{color:var(--good-text);border-color:var(--good-line)}
html[data-theme="soft"] .soc-links a.soc-cap-on{color:var(--good-text)}
html[data-theme="soft"] .dbx-ok{color:var(--c-ok)}html[data-theme="soft"] .dbx-unknown{color:var(--muted)}
html[data-theme="soft"] .svc-node rect{stroke:rgba(31,39,51,.25)}
html[data-theme="soft"] .proctree ul{border-left-color:var(--line)}
/* backdoor timeline + flow pictures (src/lib.php, svg.bdchart): drawn with dark-page attributes; CSS beats SVG attributes */
html[data-theme="soft"] svg.bdchart line[stroke="#1f2a3d"]{stroke:var(--line)}
html[data-theme="soft"] svg.bdchart text[fill="#8b98ad"]{fill:var(--muted)}
html[data-theme="soft"] svg.bdchart rect[fill="#121826"]{fill:#f3f5f9}
html[data-theme="soft"] svg.bdchart text[fill="#dfe6f2"]{fill:var(--text)}
html[data-theme="soft"] svg.bdchart rect[fill="#3a1215"]{fill:var(--err-bg)}
html[data-theme="soft"] svg.bdchart text[fill="#fff"]{fill:var(--bad-text)}
/* Platform map: the diagram is drawn for a dark scene (SVG fills and labels), so its frame stays a dark inset
   "screen"; the text and controls around it follow the light theme */
html[data-theme="soft"] #archmap{--amx-ink:#1f2733;--amx-dim:#5c6b80;--amx-line:transparent}
html[data-theme="soft"] #archmap .amx-wrap{background:#111a2b;border-radius:var(--r-lg);box-shadow:var(--inset)}
html[data-theme="soft"] #archmap .amx-controls button{background:var(--bg);color:var(--accent);box-shadow:var(--raise-sm)}
html[data-theme="soft"] #archmap .amx-cap b{color:var(--accent)}
html[data-theme="soft"] #archmap .amx-steps div{background:var(--bg)}
/* inline-IPS walk (Platform map): its borders were white-on-dark */
html[data-theme="soft"] #ipsf .ipsf-s,html[data-theme="soft"] #ipsf .ipsf-row,html[data-theme="soft"] #ipsf .ipsf-out{background:var(--bg);border-color:transparent;box-shadow:var(--raise-sm)}
html[data-theme="soft"] #ipsf .ipsf-s[aria-pressed="true"]{box-shadow:var(--inset-sm),inset 0 0 0 2px #2f7fd6}
html[data-theme="soft"] #ipsf .ipsf-row.on{box-shadow:var(--raise-sm),inset 0 0 0 2px #2f7fd6}
html[data-theme="soft"] #ipsf .ipsf-row.pass.on{box-shadow:var(--raise-sm),inset 0 0 0 2px #1a7f45}
html[data-theme="soft"] #ipsf .ipsf-row.hold.on{box-shadow:var(--raise-sm),inset 0 0 0 2px #b38800}
html[data-theme="soft"] #ipsf .ipsf-row.drop.on{box-shadow:var(--raise-sm),inset 0 0 0 2px #d93644}
html[data-theme="soft"] #ipsf .ipsf-dot{border-color:rgba(31,39,51,.3)}
html[data-theme="soft"] #ipsf .ipsf-log li{border-top-color:var(--line)}
html[data-theme="soft"] #ipsf .ipsf-out.pass .ipsf-tag,html[data-theme="soft"] #ipsf .ipsf-br b.y{color:#1a7f45}
html[data-theme="soft"] #ipsf .ipsf-out.hold .ipsf-tag{color:#9a6f00}
html[data-theme="soft"] #ipsf .ipsf-out.drop .ipsf-tag,html[data-theme="soft"] #ipsf .ipsf-br b.n{color:#d93644}
/* subtle motion, off for people who ask for less */
html[data-theme="soft"] button,html[data-theme="soft"] .btn,html[data-theme="soft"] a:not(.coffee),html[data-theme="soft"] input,html[data-theme="soft"] select,
html[data-theme="soft"] textarea,html[data-theme="soft"] summary,html[data-theme="soft"] .jump a,html[data-theme="soft"] .chip{transition:box-shadow .15s ease,color .15s ease,background-color .15s ease}
@media (prefers-reduced-motion:reduce){html[data-theme="soft"] *{transition:none!important}}
/* printing: shadows waste toner and blur in PDFs */
@media print{html[data-theme="soft"] *{box-shadow:none!important}}

/* Containers page (src/containers.php) */
.ctab td, .ctab th { vertical-align: top; }
.ctab .badge { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: .85em; white-space: nowrap; }
.ctab .b-red { background: #7a1f1f; color: #fff; }
.ctab .b-ok { background: #1f5f36; color: #fff; }
.ctab .b-warn { background: #7a5a12; color: #fff; }
.ctab .b-mute { background: #444; color: #ddd; }
.ctab details pre { white-space: pre-wrap; max-width: 70ch; font-size: .85em; }
