body { font-family: 'Inter', sans-serif; }
.mono { font-family: 'JetBrains Mono', monospace; }
.card { background: rgb(15 23 42); border: 1px solid rgb(30 41 59); border-radius: 1rem; padding: 1.5rem; }
.btn { padding: .6rem 1.1rem; border-radius: .75rem; font-weight: 600; transition: all .15s; }
.btn-primary { background: rgb(6 182 212); color: rgb(2 6 23); }
.btn-primary:hover { background: rgb(34 211 238); }
.btn-ghost { border: 1px solid rgb(51 65 85); color: white; }
.btn-ghost:hover { background: rgb(30 41 59); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input { padding: .7rem 1rem; border-radius: .75rem; background: rgb(2 6 23); border: 1px solid rgb(30 41 59); color: white; width: 100%; }
.input:focus { outline: none; box-shadow: 0 0 0 2px rgb(6 182 212); }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.sev-critical { background: rgb(127 29 29); color: rgb(254 202 202); }
.sev-high { background: rgb(154 52 18); color: rgb(254 215 170); }
.sev-medium { background: rgb(113 63 18); color: rgb(254 240 138); }
.sev-low, .sev-info { background: rgb(30 41 59); color: rgb(203 213 225); }
.st-verified, .st-done, .st-open-ok { background: rgb(20 83 45); color: rgb(187 247 208); }
.st-pending, .st-queued, .st-running { background: rgb(30 58 138); color: rgb(191 219 254); }
.st-lapsed, .st-failed { background: rgb(127 29 29); color: rgb(254 202 202); }
.st-resolved { background: rgb(30 41 59); color: rgb(148 163 184); }
table { width: 100%; font-size: .875rem; }
th { text-align: left; color: rgb(100 116 139); font-weight: 600; padding: .5rem; border-bottom: 1px solid rgb(30 41 59); }
td { padding: .5rem; border-bottom: 1px solid rgb(30 41 59 / .5); vertical-align: top; }
.copy { cursor: pointer; }
.copy:hover { color: rgb(34 211 238); }
.mbadge { display: inline-block; min-width: 2.6rem; text-align: center; padding: .05rem .35rem; border-radius: .35rem; font-size: .65rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.m-get { background: rgb(20 83 45); color: rgb(187 247 208); }
.m-post { background: rgb(30 64 175); color: rgb(191 219 254); }
.m-put { background: rgb(133 77 14); color: rgb(254 240 138); }
.m-delete { background: rgb(153 27 27); color: rgb(254 202 202); }
.m-ws { background: rgb(91 33 182); color: rgb(221 214 254); }
.m-other { background: rgb(51 65 85); color: rgb(203 213 225); }
.tag { display: inline-block; padding: 0 .4rem; border-radius: 9999px; font-size: .65rem; border: 1px solid rgb(51 65 85); color: rgb(148 163 184); }
.chip { padding: .2rem .7rem; border-radius: 9999px; font-size: .75rem; border: 1px solid rgb(51 65 85); color: rgb(203 213 225); background: rgb(2 6 23); }
.chip:hover { border-color: rgb(6 182 212); }
.chip-on { background: rgb(8 51 68); border-color: rgb(34 211 238); color: white; }
.tag-auth, .tag-admin, .tag-upload { border-color: rgb(194 65 12); color: rgb(253 186 116); }
.tag-user-data, .tag-object-id { border-color: rgb(161 98 7); color: rgb(253 224 71); }
.tag-no-auth, .tag-masked, .tag-introspection { border-color: rgb(220 38 38); color: rgb(252 165 165); background: rgb(69 10 10 / .5); }
.tag-write, .tag-realtime { border-color: rgb(29 78 216); color: rgb(147 197 253); }
.row { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border-radius: .5rem; }
.row:hover, .row-on { background: rgb(30 41 59); }
.tnode { display: flex; align-items: center; gap: .15rem; padding-top: .2rem; padding-bottom: .2rem; white-space: nowrap; }
.tnode:hover { background: rgb(15 23 42); }
.thost { font-weight: 700; color: white; margin-top: .4rem; }
.caret { width: 1rem; color: rgb(100 116 139); text-align: center; }
.seg { color: rgb(203 213 225); cursor: default; }
.heat-1 { color: rgb(226 232 240); }
.heat-2 { color: rgb(253 224 71); }
.heat-3 { color: rgb(253 186 116); font-weight: 700; }
.chip:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- host page ---------- */
.kpi { background: rgb(15 23 42); border: 1px solid rgb(30 41 59); border-radius: 1rem; padding: 1rem 1.25rem; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid rgb(30 41 59); margin-bottom: 1rem; overflow-x: auto; }
.tab { padding: .6rem 1rem; font-size: .875rem; font-weight: 600; color: rgb(148 163 184); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: white; }
.tab-on { color: white; border-bottom-color: rgb(34 211 238); }
.drawer { background: rgb(15 23 42); border: 1px solid rgb(30 41 59); border-radius: 1rem; padding: 1.25rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.code { font-family: 'JetBrains Mono', monospace; font-size: .72rem; white-space: pre-wrap; word-break: break-all; background: rgb(2 6 23); border: 1px solid rgb(30 41 59); border-radius: .5rem; padding: .75rem; color: rgb(203 213 225); max-height: 16rem; overflow: auto; }
.swatch { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; flex-shrink: 0; }
.bar { height: .55rem; background: #3987e5; border-radius: 0 4px 4px 0; }
.crumb { padding: .1rem .3rem; border-radius: .3rem; }
.crumb:hover { background: rgb(30 41 59); }
.icicle-cell { cursor: pointer; outline: none; }
.icicle-cell rect { transition: opacity .12s; }
.icicle-cell:hover rect, .icicle-cell:focus rect { opacity: .82; }
.icicle-cell:focus-visible rect { stroke: rgb(34 211 238); stroke-width: 2px; }
.icicle-label { font: 600 11px 'JetBrains Mono', monospace; pointer-events: none; }
.viz-tip { position: absolute; z-index: 10; max-width: 22rem; pointer-events: none; background: rgb(2 6 23); border: 1px solid rgb(51 65 85); border-radius: .6rem; padding: .6rem .75rem; box-shadow: 0 10px 30px rgb(0 0 0 / .5); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; width: 16rem; background: rgb(15 23 42); border: 1px solid rgb(51 65 85); border-radius: .75rem; padding: .35rem; box-shadow: 0 10px 30px rgb(0 0 0 / .5); }
.menu-list button { display: block; width: 100%; text-align: left; padding: .5rem .65rem; border-radius: .5rem; font-size: .875rem; }
.menu-list button:hover { background: rgb(30 41 59); }
.step { border: 1px solid rgb(30 41 59); border-radius: .75rem; padding: .75rem 1rem; color: rgb(100 116 139); }
.step-on { border-color: rgb(34 211 238); color: white; background: rgb(8 51 68 / .4); }
.step-done { color: rgb(187 247 208); }
.meter { height: .5rem; background: #184f95; border-radius: 9999px; overflow: hidden; }
.meter-fill { height: 100%; background: #3987e5; border-radius: 9999px; transition: width .4s; }
.pulse { width: .6rem; height: .6rem; border-radius: 9999px; background: rgb(34 211 238); box-shadow: 0 0 0 0 rgb(34 211 238 / .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .6rem rgb(34 211 238 / 0); } 100% { box-shadow: 0 0 0 0 rgb(34 211 238 / 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } .meter-fill, .icicle-cell rect { transition: none; } }

/* ---------- domain list & domain page ---------- */
.domain-card { display: block; padding: 1.5rem; border-radius: 1rem; background: rgb(15 23 42); border: 1px solid rgb(30 41 59); transition: border-color .15s, transform .15s, box-shadow .15s; }
.domain-card:hover { border-color: rgb(6 182 212 / .6); box-shadow: 0 0 0 1px rgb(6 182 212 / .15), 0 12px 30px -12px rgb(6 182 212 / .25); }
.domain-card:focus-visible { outline: 2px solid rgb(34 211 238); outline-offset: 2px; }
.dot { width: .5rem; height: .5rem; border-radius: 9999px; display: inline-block; }
.dot-ok { background: rgb(52 211 153); }
.dot-bad { background: rgb(248 113 113); }
.dot-pending { background: rgb(56 189 248); }
.finding { padding: .9rem 1rem; border-radius: .75rem; background: rgb(2 6 23); border: 1px solid rgb(30 41 59); }
/* Compact findings: collapsible severity groups + a pager below. */
.finding-group > summary { display: flex; }
.finding-group > summary::before { content: '▸ '; color: rgb(100 116 139); }
.finding-group[open] > summary::before { content: '▾ '; }
.finding-pager { border-top: 1px solid rgb(30 41 59); padding-top: .75rem; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.flow-node { padding: .5rem .8rem; border-radius: .6rem; background: rgb(2 6 23); border: 1px solid rgb(51 65 85); color: rgb(226 232 240); }
.flow-node-waf { border-color: rgb(34 211 238 / .6); color: rgb(165 243 252); }
.flow-node-warn { border-color: rgb(251 146 60 / .7); color: rgb(254 215 170); }
.flow-node-bad { border-color: rgb(248 113 113 / .8); color: rgb(254 202 202); background: rgb(69 10 10 / .4); }
.flow-arrow { width: 2rem; height: 2px; background: rgb(71 85 105); position: relative; }
.flow-arrow::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid rgb(71 85 105); border-right: 0; }
.flow-warn { background: rgb(251 146 60); }
.flow-warn::after { border-left-color: rgb(251 146 60); }
.flow-bad { background: rgb(248 113 113); }
.flow-bad::after { border-left-color: rgb(248 113 113); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary::before, details.mt-4 > summary::before, details.mt-5 > summary::before { content: '▸ '; color: rgb(100 116 139); }
details[open].card > summary::before, details[open].mt-4 > summary::before, details[open].mt-5 > summary::before { content: '▾ '; }
.sched-icon { width: 2.25rem; height: 2.25rem; border-radius: .75rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; color: rgb(103 232 249); background: rgb(8 51 68 / .6); border: 1px solid rgb(14 116 144 / .6); }
.settings-h { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: rgb(100 116 139); margin-bottom: .75rem; }

/* clickable KPI and mini tiles */
.kpi { position: relative; }
.kpi-click { cursor: pointer; transition: border-color .15s, background .15s; width: 100%; }
.kpi-click:hover { border-color: rgb(6 182 212 / .6); }
.kpi-click:focus-visible, .mini-tile:focus-visible { outline: 2px solid rgb(34 211 238); outline-offset: 2px; }
.kpi-on { border-color: rgb(34 211 238); background: rgb(8 51 68 / .45); }
.kpi-hint { position: absolute; top: .75rem; right: .9rem; font-size: .8rem; color: rgb(71 85 105); transition: color .15s; }
.kpi-click:hover .kpi-hint, .kpi-on .kpi-hint { color: rgb(34 211 238); }
.mini-tile { text-align: left; padding: .75rem 1rem; border-radius: .75rem; background: rgb(2 6 23); border: 1px solid rgb(30 41 59); cursor: pointer; transition: border-color .15s; }
.mini-tile:hover { border-color: rgb(6 182 212 / .6); }
.mini-on { border-color: rgb(34 211 238); background: rgb(8 51 68 / .45); }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px rgb(34 211 238); } 100% { box-shadow: 0 0 0 2px rgb(34 211 238 / 0); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* PCI DSS compliance card */
.pci-row { padding: .5rem 0; }
.pci-label { font-weight: 600; }
.pci-violation { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: .5rem 0; cursor: pointer; }
.pci-violation:hover .pci-label { color: rgb(255 255 255); }


/* ---------- app shell: left sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 15.5rem; display: flex; flex-direction: column; z-index: 40;
    background: rgb(2 6 23); border-right: 1px solid rgb(30 41 59); }
@media (min-width: 1024px) { body.signed-in #shell { padding-left: 15.5rem; } }
@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgb(0 0 0 / .6); }
    .sidebar.open { transform: none; }
}
.side-scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .5); z-index: 30; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
    background: rgb(2 6 23 / .9); backdrop-filter: blur(6px); border-bottom: 1px solid rgb(30 41 59); }
@media (min-width: 1024px) { .topbar { display: none !important; } }
.side-group { margin-top: 1.25rem; }
.side-label { display: flex; align-items: center; gap: .5rem; padding: 0 .75rem .4rem; font-size: .65rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: rgb(100 116 139); }
.side-dot { width: .45rem; height: .45rem; border-radius: 9999px; }
.side-link { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .45rem .75rem; border-radius: .5rem;
    font-size: .875rem; color: rgb(148 163 184); text-align: left; }
.side-link:hover { color: white; background: rgb(15 23 42); }
.side-link svg { width: 1rem; height: 1rem; flex-shrink: 0; opacity: .8; }
.side-on { color: white; background: rgb(15 23 42); box-shadow: inset 2px 0 0 rgb(34 211 238); }
.side-foot { padding: .9rem; border-top: 1px solid rgb(30 41 59); }
/* product identity: JS Mapper = cyan, Attack Surface = violet */
.prod-js { color: rgb(103 232 249); border-color: rgb(14 116 144); background: rgb(8 51 68 / .5); }
.prod-pci { color: rgb(110 231 183); border-color: rgb(4 120 87); background: rgb(2 44 34 / .5); }
.prod-asm { color: rgb(196 181 253); border-color: rgb(91 33 182); background: rgb(46 16 101 / .4); }
.prod-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .5rem; border-radius: 9999px; border: 1px solid;
    font-size: .65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.handoff { display: inline-flex; align-items: center; gap: .35rem; }
.handoff svg { width: .85em; height: .85em; flex-shrink: 0; }
.eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
html { scroll-padding-top: 1.5rem; }
/* real buttons inside a dropdown form keep their own look */
.menu-list .btn { text-align: center; }
.menu-list .btn-primary { background: rgb(6 182 212); color: rgb(2 6 23); }
.menu-list .btn-primary:hover { background: rgb(34 211 238); }
