:root {
  --brand: #026c39;
  --brand-tint: rgba(2, 108, 57, 0.1);
  --brand-dark: #015a2f;
  --ink: #0f172a;
  --muted: #4b5563;
  --faint: #94a3b8;
  --bg: #f5f8fc;
  --line: rgba(0, 0, 0, 0.08);
  --line-dark: rgba(15, 23, 42, 0.15);
  --red: #dc2626;
  --amber: #92400e;
  --heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--body); }

header {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 16px 28px; display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .wordmark { height: 28px; width: auto; display: block; }
.brand small { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.14em; }
.who { font-size: 13px; color: var(--muted); }
.who a { color: var(--brand); font-weight: 600; text-decoration: none; }
.who a:hover { text-decoration: underline; }

main { max-width: 1080px; margin: 30px auto 90px; padding: 0 22px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 0 0 14px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input[type='text'], input[type='password'], input:not([type]) {
  font: inherit; color: var(--ink); padding: 11px 14px; flex: 1; min-width: 160px;
  background: #fff; border: 1px solid var(--line-dark); border-radius: 8px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: var(--faint); }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
textarea.safepaths {
  font: inherit; font-size: 13px; color: var(--ink); padding: 10px 14px; width: 100%;
  background: #fff; border: 1px solid var(--line-dark); border-radius: 8px;
  outline: none; resize: vertical; transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.safepaths::placeholder { color: var(--faint); }
textarea.safepaths:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

button {
  font: inherit; font-weight: 600; padding: 11px 20px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--brand); color: #fff; transition: background 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:hover { background: var(--brand-dark); }
button.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-dark); }
button.ghost:hover { background: #f8fafc; }
button.small { padding: 8px 14px; font-size: 13px; }
button.quiet { background: transparent; color: var(--muted); border: 0; padding: 8px 10px; font-size: 13px; }
button.quiet:hover { color: var(--red); background: transparent; }
button.danger { background: var(--red); }
button.danger:hover { background: #b91c1c; }
button.g { background: #fff; color: #3c4043; border: 1px solid var(--line-dark); }
button.g:hover { background: #f8fafc; }
button.g svg { width: 16px; height: 16px; }

.muted { color: var(--muted); font-size: 13.5px; }
.tiny { color: var(--faint); font-size: 12.5px; }
.err { color: var(--red); font-size: 13px; margin: 8px 0 0; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  padding: 4px 11px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.06em; flex: none;
}
.pill.active { background: var(--brand-tint); color: var(--brand); }
.pill.pending { background: rgba(15, 23, 42, 0.06); color: var(--muted); }

code { font-family: var(--mono); font-size: 12.5px; color: var(--brand); background: var(--brand-tint); padding: 2px 7px; border-radius: 5px; }
pre {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; background: #0f172a; color: #e2e8f0;
  padding: 14px 16px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 12px 0 0;
}
.keychip { font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* Platform-operator marker in the header (Cognito `admin` group). */
.adminbadge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--brand); padding: 2px 7px; border-radius: 5px; vertical-align: middle;
}

/* ---- page head (home) ---- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.pagehead h1 { font-family: var(--heading); font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.pagehead p { margin: 2px 0 0; }

/* ---- sites overview grid ---- */
.sitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.scard {
  display: flex; flex-direction: column; gap: 13px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; text-decoration: none; color: inherit;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.scard:hover { border-color: rgba(2, 108, 57, 0.35); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); transform: translateY(-1px); }
.sc-top { display: flex; align-items: center; gap: 10px; }
.sc-top .dom {
  font-family: var(--heading); font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Owner label — only rendered in the admin (cross-owner) sites grid. */
.sc-owner {
  margin-top: -6px; font-family: var(--mono); font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-stats { display: flex; gap: 18px; align-items: center; min-height: 36px; flex-wrap: wrap; }
.sc-stats .ms { font-size: 11px; color: var(--muted); line-height: 1.3; }
.sc-stats .ms b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.sc-stats .spark-wrap { margin-left: auto; }
svg.spark polyline { stroke: var(--brand); }
.pendinghint { font-size: 13px; color: var(--muted); min-height: 36px; display: flex; align-items: center; }
.sc-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.sc-foot .go { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--brand); flex: none; }

.riskchip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; letter-spacing: 0.05em; text-transform: uppercase;
}
.riskchip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.rk-neutral { background: rgba(15, 23, 42, 0.05); color: var(--muted); }
.rk-low { background: rgba(16, 185, 129, 0.1); color: #047857; }
.rk-medium { background: rgba(245, 158, 11, 0.13); color: var(--amber); }
.rk-high, .rk-critical { background: rgba(220, 38, 38, 0.09); color: #b91c1c; }

/* ---- site workspace ---- */
.crumb { font-size: 13px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--ink); }
.sitehero { display: flex; align-items: center; gap: 14px; margin: 12px 0 0; flex-wrap: wrap; }
.sitehero h1 { font-family: var(--heading); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.sitehero .actions { margin-left: auto; display: flex; gap: 8px; }
.warnbanner {
  background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); color: var(--amber);
  padding: 11px 15px; border-radius: 10px; font-size: 13.5px; margin: 14px 0 0;
}
/* overflow-y hidden + invisible scrollbar: the active tab's -1px margin
   otherwise makes Windows paint a permanent scrollbar widget here. */
.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line-dark); margin: 20px 0 22px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .soon {
  font-size: 9px; font-weight: 800; background: var(--brand-tint); color: var(--brand);
  padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; letter-spacing: 0.06em;
}

/* ---- live measurements: KPI tiles + 7-day chart ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tile .tl { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.tile .tv { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.tile .ts { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

.chart-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.chart-head b { font-size: 14px; }
.chart { display: flex; }
.yaxis { position: relative; width: 42px; flex: none; }
.ytick { position: absolute; right: 10px; transform: translateY(50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.plot { flex: 1; height: 160px; position: relative; }
.gl { position: absolute; left: 0; right: 0; height: 1px; background: rgba(15, 23, 42, 0.06); }
.gl.base { background: rgba(15, 23, 42, 0.15); }
.cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 10px; }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.col .bar { width: 100%; max-width: 22px; background: var(--brand); border-radius: 4px 4px 0 0; }
.col:hover .bar { background: var(--brand-dark); }
.col .tip {
  position: absolute; left: 50%; transform: translateX(-50%); opacity: 0; pointer-events: none;
  transition: opacity 0.12s; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap; z-index: 2;
}
.col:hover .tip, .col .tip.show { opacity: 1; }
.xlabs { display: flex; gap: 10px; margin: 8px 0 0 42px; }
.xlabs span { flex: 1; text-align: center; font-size: 11px; color: var(--faint); }
.chart-empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13.5px; }
details.tinytable { margin-top: 16px; }
details.tinytable summary { cursor: pointer; color: var(--faint); font-size: 12.5px; }
details.tinytable table { border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
details.tinytable td, details.tinytable th { padding: 4px 14px 4px 0; text-align: left; color: var(--muted); font-variant-numeric: tabular-nums; }
details.tinytable th { font-weight: 600; color: var(--ink); }

/* ---- privacy inspector ---- */
.toolrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.toolrow .spacer { flex: 1; }
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ptable th, .ptable td { text-align: left; padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.ptable th { border-top: 0; color: var(--faint); font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.ptable code { white-space: nowrap; }
.status {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 3px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.status.ok { background: var(--brand-tint); color: var(--brand); }
.status.warn { background: rgba(245, 158, 11, 0.13); color: var(--amber); }
.status.bad { background: rgba(220, 38, 38, 0.09); color: #b91c1c; }
.status.neutral { background: rgba(15, 23, 42, 0.06); color: var(--muted); }
details.preview summary { color: var(--brand); font-weight: 700; font-size: 12px; }
details.preview pre { margin: 8px 0 0; max-width: 460px; }
.policyline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.policyline .why { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .ptable { display: block; overflow-x: auto; white-space: nowrap; }
  details.preview pre { max-width: 78vw; }
}

/* ---- setup steps (settings tab) ---- */
.sect h3 { font-family: var(--heading); font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
.sect .lede { margin: 0 0 12px; }
.steps { display: grid; gap: 10px; }
.step { display: flex; gap: 13px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.step .body { flex: 1; min-width: 0; }
.step .t { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.connected {
  display: flex; align-items: center; gap: 9px; padding: 12px 15px; flex-wrap: wrap;
  border-radius: 10px; background: var(--brand-tint); font-size: 14px; color: var(--ink);
}
.connected .ok { color: var(--brand); font-weight: 700; }
.danger-zone { border-color: rgba(220, 38, 38, 0.3); }

/* privacy toggles */
.switchrow { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.switchrow:first-of-type { border-top: 0; padding-top: 4px; }
.switchrow .sw-body { flex: 1; min-width: 0; }
.switchrow .sw-t { font-weight: 600; font-size: 14px; }
.switchrow .sw-d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 40px; height: 22px; flex: none; margin-top: 3px; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch .knob { position: absolute; inset: 0; border-radius: 99px; background: rgba(15, 23, 42, 0.18); transition: background 0.15s; }
.switch .knob::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.switch input:checked + .knob { background: var(--brand); }
.switch input:checked + .knob::after { left: 21px; }
.switch input:disabled { cursor: wait; }

/* ---- heat maps tab ---- */
.heatctl { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.heatctl .meta { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.seg { display: inline-flex; border: 1px solid var(--line-dark); border-radius: 8px; overflow: hidden; flex: none; }
.seg button { background: #fff; color: var(--muted); border: 0; border-radius: 0; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.seg button + button { border-left: 1px solid var(--line-dark); }
.seg button:hover { background: #f8fafc; color: var(--ink); }
.seg button.on, .seg button.on:hover { background: var(--brand); color: #fff; }
select.pagesel {
  font: inherit; font-size: 13.5px; padding: 8px 12px; border: 1px solid var(--line-dark);
  border-radius: 8px; background: #fff; color: var(--ink); min-width: 170px; max-width: 100%;
}
.heatwrap { display: flex; gap: 14px; align-items: flex-start; }
.heatstage { flex: 1; min-width: 0; }
.heatside { width: 280px; flex: none; display: grid; gap: 12px; }
@media (max-width: 900px) { .heatwrap { flex-direction: column; } .heatside { width: 100%; } }
.framescroll { max-height: 68vh; overflow-y: auto; border-radius: 10px; border: 1px solid var(--line-dark); }
.pageframe { position: relative; background: #fff; overflow: hidden; }
.pageframe .ghost {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.07) 0 9%, transparent 9%),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(15, 23, 42, 0.05) 30px 39px);
}
.pageframe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pageframe .noclicks {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, 0.55); text-align: center; padding: 20px;
}
.sband {
  position: absolute; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: flex-end;
  border-top: 1px dashed rgba(15, 23, 42, 0.22); padding: 3px 8px 0 8px;
}
.sband span {
  font-size: 10.5px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, 0.85); border-radius: 5px; padding: 1px 7px;
}
.heatlegend { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--faint); margin-top: 10px; }
.heatlegend .grad { width: 150px; height: 8px; border-radius: 99px; }
.elrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 7px 0; border-top: 1px solid var(--line); }
.elrow:first-of-type { border-top: 0; padding-top: 2px; }
.elrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elrow .bar { width: 64px; height: 4px; border-radius: 99px; background: rgba(15, 23, 42, 0.08); flex: none; }
.elrow .bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.elrow .cnt { font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.reachrow { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); padding: 2px 0; }
.reachrow .lbl { width: 38px; flex: none; font-variant-numeric: tabular-nums; }
.reachrow .bar { flex: 1; height: 6px; border-radius: 99px; background: rgba(15, 23, 42, 0.06); }
.reachrow .bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); opacity: 0.85; }
.reachrow .pct { width: 36px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }

/* collecting state: a miniature page with heat blobs fading in/out */
.heatwait { text-align: center; padding: 40px 24px 34px; }
.heatwait .mini {
  position: relative; width: 150px; height: 190px; margin: 0 auto 20px; overflow: hidden;
  border: 1px solid var(--line-dark); border-radius: 9px; background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0 16%, transparent 16%),
    repeating-linear-gradient(180deg, transparent 0 18px, rgba(15, 23, 42, 0.06) 18px 24px);
  background-color: #fff;
}
.heatwait .blob {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  filter: blur(11px); opacity: 0; animation: heatpulse 3.2s ease-in-out infinite;
}
@keyframes heatpulse {
  0%, 100% { opacity: 0; transform: scale(0.55); }
  50% { opacity: 0.75; transform: scale(1); }
}
.heatwait h3 { font-family: var(--heading); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.heatwait p { max-width: 460px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) {
  .heatwait .blob { animation: none; opacity: 0.5; }
}

details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details summary:hover { color: var(--ink); }

/* ---- compliance scan panel (get_scan / run_scan) ---- */
.scanpanel {
  border-radius: 12px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #0b1727 0%, #0e2b1c 100%); color: #e2e8f0;
}
.scanpanel .inner { padding: 17px 19px; position: relative; }
.scanpanel .rings { position: absolute; top: -52px; right: -52px; width: 200px; height: 200px; opacity: 0.14; pointer-events: none; }
.scanpanel .rings circle { fill: none; stroke: #34d399; stroke-width: 1; }
.scanhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scanhead .ic {
  flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(52, 211, 153, 0.13); color: #34d399;
}
.scanhead .t { font-weight: 700; font-size: 14px; color: #fff; }
.scanhead .when { font-size: 12px; color: #7d8ea6; }
.scanhead .rescan {
  margin-left: auto; background: rgba(255, 255, 255, 0.08); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14); padding: 7px 14px; font-size: 12.5px; border-radius: 8px;
}
.scanhead .rescan:hover { background: rgba(255, 255, 255, 0.16); }
.scanhead .rescan[disabled] { opacity: 0.6; cursor: default; }
.scanhead .rescan.busy svg { animation: whirl 0.9s linear infinite; }
@keyframes whirl { to { transform: rotate(360deg); } }
.scanwave { height: 3px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, 0.07); margin-top: 16px; position: relative; }
.scanwave::after {
  content: ''; position: absolute; inset: 0; width: 45%;
  background: linear-gradient(90deg, transparent, #34d399, transparent);
  animation: sweep 1.3s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(320%); } }
.scanverdict { display: flex; align-items: center; gap: 12px; margin-top: 15px; flex-wrap: wrap; }
.risklvl {
  flex: none; font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 99px;
}
.rl-critical { background: rgba(239, 68, 68, 0.18); color: #fca5a5; box-shadow: 0 0 20px rgba(239, 68, 68, 0.28); }
.rl-high { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.rl-medium { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.rl-low { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.scanverdict .hl { font-size: 13.5px; color: #cbd5e1; flex: 1; min-width: 200px; line-height: 1.5; }
.sb-critical { background: #dc2626; } .sb-high { background: #ef4444; }
.sb-medium { background: #f59e0b; } .sb-low { background: #10b981; }
.sevbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, 0.07); margin-top: 15px; }
.sevbar span { display: block; height: 100%; width: 0; transition: width 0.9s cubic-bezier(0.22, 0.8, 0.35, 1); }
.sevkey { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: #7d8ea6; }
.sevkey i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.scanstats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.scanstats .chip {
  flex: 1; min-width: 86px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 10px 12px; text-align: center;
}
.scanstats .chip b { display: block; font-family: var(--heading); font-size: 22px; font-weight: 800; color: #fff; }
.scanstats .chip.hot b { color: #fca5a5; }
.scanstats .chip.good b { color: #6ee7b7; }
.scanstats .chip span { font-size: 9.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #7d8ea6; }
details.scanreport { margin-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; }
details.scanreport summary { color: #94a3b8; font-size: 13px; font-weight: 600; }
details.scanreport summary:hover { color: #e2e8f0; }
.ssec { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #34d399; margin: 16px 0 2px; }
.ssec .c { color: #7d8ea6; letter-spacing: 0; }
.sfind {
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px; padding: 13px 15px; margin-top: 10px;
}
.sfind .fh { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.sfind .fn { font-weight: 700; color: #fff; font-size: 13.5px; }
.sfind .fv { color: #7d8ea6; font-size: 11.5px; }
.sfind .spill {
  margin-left: auto; flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 99px;
}
.sp-critical { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.sp-high { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
.sp-medium { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }
.sp-low { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.sfind p { color: #a7b4c6; margin: 8px 0 0; font-size: 12.5px; line-height: 1.55; }
.sfind p b { color: #e2e8f0; }
.sfind .fx {
  margin-top: 9px; padding: 8px 12px; border-left: 2px solid #34d399;
  background: rgba(52, 211, 153, 0.07); border-radius: 0 7px 7px 0; color: #a7b4c6; font-size: 12.5px;
}
.sfind .fx b { color: #6ee7b7; }
.sfind details summary { font-size: 11.5px; color: #7d8ea6; margin-top: 8px; }
.sfind code.ev {
  display: block; font: 500 11px/1.6 var(--mono); color: #a7b4c6; background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 7px; padding: 7px 10px; margin-top: 7px; overflow-wrap: anywhere;
}
.spass { color: #a7b4c6; font-size: 12.5px; margin: 8px 0 0; padding-left: 18px; }
.spass li { margin: 3px 0; }
.scan-msg { margin: 14px 0 0; color: #94a3b8; font-size: 13px; }
.scan-msg.err { color: #fca5a5; }

/* login */
.hero { text-align: center; padding: 64px 24px 48px; }
.hero .halo { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 16px; display: block; }
.hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.hero h1 { font-family: var(--heading); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.hero p { color: var(--muted); max-width: 420px; margin: 0 auto 26px; }

.empty { border: 1px dashed var(--line-dark); border-radius: 12px; text-align: center; padding: 44px 20px; color: var(--muted); background: #fff; }

/* skeleton shimmer */
.skel, .skel-s { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; position: relative; background: #fff; }
.skel { height: 120px; margin-bottom: 14px; }
.skel-s { height: 36px; }
.skel::after, .skel-s::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(15, 23, 42, 0.04) 50%, transparent 70%);
  animation: shimmer 1.4s infinite; transform: translateX(-100%);
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* modal */
.overlay {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px;
  background: rgba(15, 23, 42, 0.45); animation: fadein 0.15s ease-out;
}
.modal {
  width: 100%; max-width: 560px; max-height: 82vh; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25); animation: rise 0.18s ease-out;
}
.modal .m-head { padding: 20px 24px 0; }
.modal .m-head h3 { font-family: var(--heading); font-size: 18px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.modal .m-body { padding: 14px 24px; overflow-y: auto; }
.modal .m-foot { padding: 14px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }
.quote { font-size: 13.5px; color: var(--muted); background: var(--bg); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 12px 15px; margin: 10px 0; }
@keyframes fadein { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.prop { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; margin: 2px 0; }
.prop:hover { background: var(--bg); }
.prop .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* toasts */
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(420px, calc(100vw - 40px)); }
.toast {
  padding: 12px 17px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: center;
  background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25); animation: rise 0.2s ease-out;
}
.toast.bad { background: var(--red); }

@media (max-width: 560px) {
  main { margin-top: 20px; }
  .sitehero .actions { margin-left: 0; width: 100%; }
  .pagehead { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) { .sitegrid { grid-template-columns: 1fr; } }
