/* Simon Entra Scanner — customer portal */
:root {
  --ses-ink: #0f172a;
  --ses-muted: #64748b;
  --ses-line: #e2e8f0;
  --ses-bg: #f5f7fb;
  --ses-card: #ffffff;
  --ses-nav: #0b1730;
  --ses-nav-ink: #cbd5e1;
  --ses-accent: #2563eb;
  --ses-accent-soft: #e8efff;
  --ses-pass: #15803d;
  --ses-warn: #b45309;
  --ses-fail: #b91c1c;
  --ses-na: #64748b;
  --grade-a: #15803d;
  --grade-b: #4d7c0f;
  --grade-c: #b45309;
  --grade-d: #c2410c;
  --grade-f: #b91c1c;
  --radius: 10px;
}

html { font-size: 15px; }
body { background: var(--ses-bg); color: var(--ses-ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--ses-accent); }
.icon { flex-shrink: 0; vertical-align: -3px; }
.btn-primary { background: var(--ses-accent); border-color: var(--ses-accent); }
.btn { border-radius: 8px; }
.text-muted, .muted { color: var(--ses-muted) !important; }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; background: var(--ses-nav); color: var(--ses-nav-ink); padding: 18px 12px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; transition: width .2s ease, padding .2s ease; }
.sidebar nav { flex: 1; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 650; font-size: 1.02rem; padding: 4px 10px 18px; }
.brand:hover { color: #fff; }
.brand .icon { flex-shrink: 0; }
.nav-heading { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; color: #64748b; padding: 18px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ses-nav-ink); text-decoration: none; margin-bottom: 2px; position: relative; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(37,99,235,.28); color: #fff; }
.nav-item .icon { flex-shrink: 0; }
.nav-item > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The menu folds to its icons and back (data-nav-toggle, site.js); body.nav-collapsed is the folded state, remembered per browser. */
.nav-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-top: 12px; border: 0; border-radius: 8px; background: none; color: #64748b; font: inherit; font-size: .85rem; cursor: pointer; }
.nav-toggle:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-toggle .icon { flex-shrink: 0; transition: transform .2s ease; }
@media (min-width: 860.02px) {
  body.nav-collapsed .sidebar { width: 64px; padding-left: 8px; padding-right: 8px; }
  body.nav-collapsed .brand > span, body.nav-collapsed .nav-item > span, body.nav-collapsed .nav-toggle > span { display: none; }
  body.nav-collapsed .brand, body.nav-collapsed .nav-item, body.nav-collapsed .nav-toggle { justify-content: center; padding-left: 0; padding-right: 0; }
  body.nav-collapsed .nav-heading { height: 1px; padding: 0; margin: 12px 8px; background: rgba(255,255,255,.12); overflow: hidden; color: transparent; }
  body.nav-collapsed .nav-toggle .icon { transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .nav-toggle .icon { transition: none; } }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 28px; background: var(--ses-card); border-bottom: 1px solid var(--ses-line); }
.topbar .org { font-weight: 600; }
.topbar .who { display: flex; align-items: center; gap: 10px; }
.topbar .role { font-size: .75rem; background: var(--ses-accent-soft); color: var(--ses-accent); padding: 2px 8px; border-radius: 999px; }
.signout { color: var(--ses-muted); text-decoration: none; }
.content { padding: 28px; max-width: 1180px; width: 100%; }
.notice { max-width: 860px; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .nav-toggle { display: none; }   /* stacked above the page: nothing to fold */
  .content { padding: 18px; }
}

/* ---------- auth pages: sign in, register, passwords ---------- */
/* Lato is the brand's typeface (the public site's and the reports'); the Open Font License is in /fonts. */
@font-face { font-family: 'Lato'; src: url('../fonts/Lato-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../fonts/Lato-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

body.auth { background: var(--ses-nav); min-height: 100vh; }

/* The backdrop: a gradient, a faint grid and the radar (auth-backdrop.js), under everything. */
.auth-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; background: radial-gradient(1200px 800px at 15% 20%, #16305e 0%, #13254a 35%, var(--ses-nav) 75%); }
.auth-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.auth-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 100%);
}
.auth-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(11,23,48,.75) 100%); pointer-events: none; }

/* One centred column (register, passwords); the sign-in page puts its introduction beside the card. */
.auth-wrap { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 48px 16px 24px; }
.auth-wrap.with-intro { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 48px; max-width: 1180px; padding: 48px 32px; }
.auth-brand { display: flex; justify-content: center; margin-bottom: 22px; animation: auth-rise .8s cubic-bezier(.2,.7,.2,1) both; }
.auth-intro { color: #fff; max-width: 520px; animation: auth-rise .8s cubic-bezier(.2,.7,.2,1) both; }
.auth-card-wrap { display: flex; justify-content: center; animation: auth-rise .8s .12s cubic-bezier(.2,.7,.2,1) both; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* The lockup: the public site's mark and name. */
.lockup { display: inline-flex; align-items: center; gap: 14px; font-family: 'Lato', system-ui, sans-serif; line-height: 1.1; color: #fff; text-decoration: none; }
.lockup:hover { color: #fff; text-decoration: none; }
.pmark { display: inline-grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 1px 2px rgba(15,23,42,.3), 0 0 0 1px rgba(255,255,255,.08), 0 8px 30px rgba(37,99,235,.45); position: relative; }
.pmark svg { width: 57%; height: 57%; }
.pmark::after { content: ""; position: absolute; inset: -6px; border-radius: 20px; border: 1px solid rgba(96,165,250,.35); animation: auth-pulse 3.2s ease-out infinite; }
@keyframes auth-pulse { 0% { transform: scale(.92); opacity: .9; } 70% { transform: scale(1.25); opacity: 0; } 100% { opacity: 0; } }
.lockup-name { display: block; font-weight: 700; font-size: 1.35rem; letter-spacing: -.005em; white-space: nowrap; }
.lockup-by { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #93c5fd; margin-top: .35em; }

.auth-intro h1 { font-family: 'Lato', system-ui, sans-serif; font-weight: 700; font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: -.015em; line-height: 1.12; margin: 36px 0 14px; }
.auth-intro h1 em { font-style: normal; color: #93c5fd; }
.auth-intro p.lead { color: #cbd5e1; font-size: 1.05rem; line-height: 1.55; margin: 0 0 28px; }
.proofs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.proofs li { display: flex; align-items: flex-start; gap: 12px; color: #e2e8f0; font-size: .95rem; }
.proofs .tick { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(37,99,235,.22); border: 1px solid rgba(96,165,250,.35); color: #93c5fd; }
.proofs .tick .icon { stroke-width: 3; }
.proofs strong { color: #fff; font-weight: 600; }
.proofs small { display: block; color: #94a3b8; font-size: .85rem; margin-top: 2px; }

/* The card, with a thin light travelling along its top edge. */
.auth-card { width: 100%; max-width: 440px; background: var(--ses-card); border-radius: 18px; padding: 34px 36px 28px; box-shadow: 0 30px 80px rgba(2,6,23,.55), 0 0 0 1px rgba(255,255,255,.06); position: relative; overflow: hidden; }
.auth-wrap:not(.with-intro) .auth-card { max-width: none; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, #60a5fa, var(--ses-accent), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: auth-edge 4.5s ease-in-out infinite; }
@keyframes auth-edge { 0% { background-position: -60% 0; } 100% { background-position: 160% 0; } }
.auth-card h1 { font-family: 'Lato', system-ui, sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .75rem; }
.auth-card h2, .auth-card h3 { font-size: 1.05rem; }
.auth-card .sub { color: var(--ses-muted); font-size: .92rem; margin: -.4rem 0 22px; }
.auth-card .col-md-4, .auth-card .col-md-6, .auth-card .col-lg-4, .auth-card .col-lg-6 { width: 100%; max-width: 100%; flex: 0 0 100%; margin-left: 0; }
.auth-card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; font-weight: 600; padding: 11px 16px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.auth-card .btn:active { transform: translateY(1px); }
.auth-card .btn-ms { background: #fff; color: var(--ses-ink); border-color: var(--ses-line); }
.auth-card .btn-ms:hover { border-color: #cbd5e1; background: #f8fafc; box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.auth-card .btn-ms svg { width: 18px; height: 18px; }
.auth-card .btn-primary { background: linear-gradient(180deg, #2f6ff0, #2563eb); border-color: transparent; box-shadow: 0 6px 18px rgba(37,99,235,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.auth-card .btn-primary:hover { background: linear-gradient(180deg, #3b7bf5, #2a68ea); box-shadow: 0 8px 24px rgba(37,99,235,.45), inset 0 1px 0 rgba(255,255,255,.18); }
.auth-card .btn-primary .icon { transition: transform .2s; }
.auth-card .btn-primary:hover .icon { transform: translateX(3px); }
.auth-card .or { display: flex; align-items: center; gap: 12px; color: var(--ses-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0; }
.auth-card .or::before, .auth-card .or::after { content: ""; flex: 1; height: 1px; background: var(--ses-line); }
.auth-card .field { margin-bottom: 14px; }
.auth-card .field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: #334155; }
.auth-card .field .row-lbl { display: flex; justify-content: space-between; align-items: baseline; }
.auth-card .field .row-lbl a { font-size: .82rem; font-weight: 500; text-decoration: none; }
.auth-card .field .row-lbl a:hover { text-decoration: underline; }
.auth-card .input { position: relative; }
.auth-card .input .form-control { padding: 11px 13px; border-radius: 10px; border-color: #cbd5e1; }
.auth-card .input .form-control:focus { border-color: var(--ses-accent); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.auth-card .input.pw .form-control { padding-right: 42px; }
.auth-card .input .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px; color: var(--ses-muted); cursor: pointer; border-radius: 6px; display: grid; place-items: center; }
.auth-card .input .eye:hover { color: var(--ses-ink); background: #f1f5f9; }
.auth-card .input .eye svg { width: 18px; height: 18px; }
.auth-card .remember { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: #334155; margin: 2px 0 18px; cursor: pointer; }
.auth-card .remember input { width: 16px; height: 16px; accent-color: var(--ses-accent); margin: 0; }
.auth-card .card-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ses-line); text-align: center; font-size: .9rem; color: var(--ses-muted); }
.auth-card .card-foot p { margin: 0 0 6px; }
.auth-card .card-foot .small { font-size: .82rem; }
.auth-card .card-foot a { text-decoration: none; }
.auth-card .card-foot a:hover { text-decoration: underline; }
.auth-foot { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; gap: 6px; color: #94a3b8; font-size: .82rem; padding: 0 16px 24px; margin: 0; }
.with-intro + .auth-foot { margin-top: -24px; }

@media (max-width: 900px) {
  .auth-wrap.with-intro { grid-template-columns: 1fr; gap: 28px; padding: 32px 16px 40px; align-content: start; min-height: 0; }
  .auth-intro { max-width: none; text-align: center; }
  .auth-intro h1 { margin-top: 22px; font-size: 1.6rem; }
  .auth-intro p.lead { font-size: .95rem; margin-bottom: 0; }
  .proofs { display: none; }
  .auth-card { padding: 28px 22px 22px; }
  .with-intro + .auth-foot { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pmark::after, .auth-card::before, .auth-brand, .auth-intro, .auth-card-wrap { animation: none; }
  .auth-card::before { background-position: 50% 0; }
}

/* ---------- page furniture ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 1.55rem; font-weight: 650; margin: 0; }
.page-head p { color: var(--ses-muted); margin: 4px 0 0; }
.card-x { background: var(--ses-card); border: 1px solid var(--ses-line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card-x h2 { font-size: 1.08rem; font-weight: 650; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--ses-muted); font-weight: 500; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps-list li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ses-accent-soft); color: var(--ses-accent); font-weight: 650; display: grid; place-items: center; font-size: .85rem; }
.steps-list li.done::before { content: "✓"; background: #dcfce7; color: var(--ses-pass); }
code.copy { display: block; white-space: pre-wrap; background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; font-size: .82rem; }
table.table-x { width: 100%; border-collapse: collapse; }
table.table-x th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ses-muted); font-weight: 600; border-bottom: 1px solid var(--ses-line); padding: 8px 10px; text-align: left; }
table.table-x td { border-bottom: 1px solid var(--ses-line); padding: 11px 10px; vertical-align: middle; }
table.table-x tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--ses-muted); padding: 36px 12px; }

/* ---------- status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill .icon { width: 13px; height: 13px; }
.pill-pass, .pill-ready, .pill-completed { background: #dcfce7; color: var(--ses-pass); }
.pill-warn, .pill-limited, .pill-needsglobalreader { background: #fef3c7; color: var(--ses-warn); }
.pill-fail, .pill-failed, .pill-rejected { background: #fee2e2; color: var(--ses-fail); }
.pill-error, .pill-notperformed, .pill-information, .pill-disconnected, .pill-cancelled { background: #f1f5f9; color: var(--ses-na); }
.pill-running, .pill-queued, .pill-verifying, .pill-waiting { background: var(--ses-accent-soft); color: var(--ses-accent); }
.sev { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sev-critical { color: var(--ses-fail); }
.sev-high { color: var(--grade-d); }
.sev-medium { color: var(--ses-warn); }
.sev-low { color: var(--ses-na); }

/* ---------- grades ---------- */
.grade { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; color: #fff; font-weight: 750; font-size: 1.7rem; }
.grade.lg { width: 112px; height: 112px; border-radius: 24px; font-size: 3.6rem; }
.grade.sm { width: 34px; height: 34px; border-radius: 9px; font-size: 1.05rem; }
.grade.xs { width: 24px; height: 24px; border-radius: 7px; font-size: .78rem; font-weight: 750; flex-shrink: 0; }
.grade-A { background: var(--grade-a); } .grade-B { background: var(--grade-b); } .grade-C { background: var(--grade-c); }
.grade-D { background: var(--grade-d); } .grade-F { background: var(--grade-f); } .grade-NA { background: var(--ses-na); font-size: 1rem; }
.grade-hero { display: flex; gap: 26px; align-items: center; }
.grade-hero .score { font-size: 1.15rem; font-weight: 600; }
/* A scan type's icon (Ui.ScanTypeIcon): each kind of scan has its own glyph and colour, the same in both portals, and none of
   the grade or status colours. A new scan type adds its .st- colour here and in the other portal. */
.scan-type { display: inline-flex; align-items: center; gap: 10px; }
.scan-type-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; color: #fff; box-shadow: 0 1px 2px rgb(15 23 42 / .18); }
.scan-type-icon.xs { width: 18px; height: 18px; border-radius: 5px; }
.scan-type-icon.sm { width: 22px; height: 22px; border-radius: 6px; }
.scan-type-icon.lg { width: 40px; height: 40px; border-radius: 11px; }
.st-assessment { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.st-investigation { background: linear-gradient(135deg, #0d9488, #115e59); }
.st-narrative { background: linear-gradient(135deg, #475569, #1e293b); }
.head-with-type { display: flex; gap: 14px; align-items: center; }
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.category { display: flex; align-items: center; gap: 12px; border: 1px solid var(--ses-line); border-radius: var(--radius); padding: 12px; background: var(--ses-card); text-align: left; width: 100%; font: inherit; color: inherit; }
button.category { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.category:hover { border-color: #93b4f5; box-shadow: 0 2px 10px rgba(37,99,235,.08); }
.category .name { display: block; font-weight: 600; }
.category .meta { display: block; color: var(--ses-muted); font-size: .82rem; }

/* ---------- checks & paywall ---------- */
.check { border: 1px solid var(--ses-line); border-radius: var(--radius); background: var(--ses-card); padding: 16px 18px; margin-bottom: 10px; }
.check-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.check-title { font-weight: 600; }
.check-desc { color: var(--ses-muted); font-size: .88rem; margin: 6px 0 0; }
.locked { position: relative; margin-top: 12px; border-radius: 8px; overflow: hidden; border: 1px dashed var(--ses-line); }
.locked .blur { filter: blur(5px); user-select: none; pointer-events: none; padding: 12px 14px; color: var(--ses-muted); }
.locked .blur .bar { height: 10px; background: #cbd5e1; border-radius: 6px; margin: 8px 0; }
.locked .veil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ses-ink); font-weight: 600; font-size: .9rem; background: rgba(255,255,255,.35); }
.unlock-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: linear-gradient(120deg, #0b1730, #1e3a8a); color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px; }
.unlock-banner p { margin: 4px 0 0; color: #cbd5e1; }
.finding { border-left: 3px solid var(--ses-fail); padding: 6px 0 6px 12px; margin: 10px 0; }
.finding.ok { border-left-color: var(--ses-pass); }
.finding.note { border-left-color: var(--ses-na); }
.finding .t { font-weight: 600; }
.finding .d { color: #334155; font-size: .9rem; }
.recs { margin: 8px 0 0; padding-left: 18px; }

/* ---------- progress ---------- */
.progress-x { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress-x > div { height: 100%; background: var(--ses-accent); transition: width .4s; }
.step-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--ses-line); font-size: .9rem; }
.step-row:last-child { border-bottom: 0; }
.spinner-x { width: 16px; height: 16px; border: 2px solid var(--ses-accent-soft); border-top-color: var(--ses-accent); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- a scan in progress: dial, now reading, areas, collected so far ---------- */
.area-identity { --area: #2563eb; }
.area-email { --area: #0891b2; }
.area-devices { --area: #7c3aed; }
.area-collaboration { --area: #059669; }
.area-compliance { --area: #d97706; }
.area-activity { --area: #db2777; }
.area-other { --area: #64748b; }

.scan-live-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.scan-live-head h2 { margin-bottom: 4px; }
.scan-live-head p { max-width: 62ch; font-size: .925rem; }
.scan-live-elapsed { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--ses-accent-soft);
  color: var(--ses-accent); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scan-live-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ses-accent); animation: live-pulse 1.6s ease-in-out infinite; }
.scan-live-label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ses-muted); margin: 0 0 8px; }

.scan-live-grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.scan-live-overview .scan-live-label { margin-top: 18px; }
.scan-dial { position: relative; width: 260px; height: 260px; margin: 0 auto; }
.scan-dial-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scan-dial-sweep { position: absolute; inset: 40px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(37, 99, 235, 0) 0deg, rgba(37, 99, 235, 0) 290deg, rgba(37, 99, 235, .16) 345deg, rgba(37, 99, 235, .32) 360deg);
  animation: spin 3.2s linear infinite; }
.scan-dial-track { fill: none; stroke: #eef2f7; stroke-width: 6; }
.scan-dial-arc { fill: none; stroke: var(--ses-accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.scan-dial-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.scan-dial-center strong { font-size: 2.4rem; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.scan-dial-center span { margin-top: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scan-dial-center small { color: var(--ses-muted); }
.scan-dot { fill: #e2e8f0; transition: fill .4s ease; transform-box: fill-box; transform-origin: center; }
.scan-dot.is-running { fill: var(--area); animation: dot-pulse 1.2s ease-in-out infinite; }
.scan-dot.is-done { fill: var(--area); }
.scan-dot.is-unavailable, .scan-dot.is-failed { fill: #fff; stroke: #cbd5e1; stroke-width: 1.5; }
.scan-dot.is-new { animation: dot-pop 1.2s ease-out; }

.scan-now { list-style: none; padding: 0; margin: 0 0 18px; }
.scan-now-item { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--ses-line); border-radius: var(--radius); background: linear-gradient(90deg, color-mix(in srgb, var(--area) 7%, #fff), #fff 60%); }
.scan-now-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--area); animation: live-pulse 1.4s ease-in-out infinite; }
.scan-now-text strong { display: block; font-size: .925rem; }
.scan-now-text span { display: block; color: var(--ses-muted); font-size: .85rem; line-height: 1.35; }
.scan-now-item time { color: var(--ses-muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 2px; }
.scan-now-idle, .scan-now-more { color: var(--ses-muted); font-size: .875rem; padding: 4px 2px; }

.scan-areas { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.scan-area { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: .875rem; }
.scan-area-bar { grid-column: 1 / -1; grid-row: 2; height: 6px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.scan-area-bar > span { display: block; height: 100%; background: var(--area); border-radius: 999px; transition: width .6s ease; }
.scan-area-count { grid-column: 2; grid-row: 1; text-align: right; color: var(--ses-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.scan-area.is-complete .scan-area-name::after { content: " ✓"; color: var(--area); font-weight: 700; }

.scan-live-bottom { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ses-line); }
.scan-feed { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.scan-feed-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--ses-line); font-size: .875rem; }
.scan-feed-mark { width: 14px; height: 14px; border-radius: 50%; background: var(--area); position: relative; }
.scan-feed-mark::after { content: ""; position: absolute; left: 4.5px; top: 2px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.scan-feed-item.is-unavailable .scan-feed-mark, .scan-feed-item.is-failed .scan-feed-mark { background: #fff; border: 1.5px solid #cbd5e1; }
.scan-feed-item.is-unavailable .scan-feed-mark::after, .scan-feed-item.is-failed .scan-feed-mark::after { display: none; }
.scan-feed-detail { color: var(--ses-muted); font-variant-numeric: tabular-nums; text-align: right; }
.scan-feed-item.is-new { animation: feed-in .6s ease-out; }
.scan-feed-more { grid-column: 1 / -1; color: var(--ses-muted); font-size: .85rem; padding-top: 8px; }
.scan-tip { background: var(--ses-bg); border: 1px solid var(--ses-line); border-radius: var(--radius); padding: 16px 18px; margin-top: 6px; }
.scan-tip [data-live-tip] { font-size: .95rem; line-height: 1.5; min-height: 3em; transition: opacity .35s ease, transform .35s ease; }
.scan-tip [data-live-tip].is-leaving { opacity: 0; transform: translateY(4px); }

@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes dot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.45); } }
@keyframes dot-pop { 0% { transform: scale(2.2); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes feed-in { from { opacity: 0; transform: translateY(-6px); background: color-mix(in srgb, var(--area) 12%, #fff); } to { opacity: 1; transform: none; background: transparent; } }

@media (max-width: 860px) {
  .scan-live-grid, .scan-feed { grid-template-columns: 1fr; }
  .scan-dial { width: 230px; height: 230px; }
  .scan-dial-sweep { inset: 35px; }
  .scan-live-head { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-dial-sweep { animation: none; opacity: .5; }
  .scan-live-pulse, .scan-now-dot, .scan-dot.is-running, .scan-dot.is-new, .scan-feed-item.is-new { animation: none; }
}

/* ---------- unlock, downloads, changes ---------- */
.unlock-banner .small { color: #cbd5e1; }
.unlock-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex-shrink: 0; }
.unlock-actions form { margin: 0; }
.unlock-actions .btn { width: 100%; white-space: nowrap; }
.download-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--ses-line); border-radius: var(--radius); background: var(--ses-card); padding: 14px 18px; margin-bottom: 18px; }
.download-bar .btn svg { vertical-align: -2px; margin-right: 2px; }
.validation-summary-valid { display: none; }
/* Tenant snapshot: sections of tiles, each with its number, the change since the previous scan, a breakdown bar and, where something
   needs a look, a badge. A tile that opens its inventory table is one link (nothing clickable inside it). */
.snap-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.snap-intro p { margin: 0; color: var(--ses-muted); font-size: .86rem; }
.snap-intro a { font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.snap-section { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--ses-line); }
.snap-section:first-of-type { border-top: 0; margin-top: 4px; padding-top: 6px; }
.snap-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.snap-head h3 { font-size: .98rem; font-weight: 650; margin: 0; }
.snap-head p { font-size: .78rem; color: var(--ses-muted); margin: 0; }
.snap-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.snap-ic.blue { background: #e8efff; color: #2563eb; } .snap-ic.teal { background: #e0f5f1; color: #0f766e; } .snap-ic.violet { background: #efe9ff; color: #6d28d9; }
.snap-ic.amber { background: #fdf2e3; color: #b45309; } .snap-ic.rose { background: #fde8ec; color: #be123c; }
.snap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.snap-tile { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--ses-line); border-radius: 12px; padding: 12px 14px; background: #fff;
    color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.snap-tile:hover { border-color: #b9c9f5; box-shadow: 0 6px 16px rgba(15,23,42,.07); transform: translateY(-1px); color: inherit; }
a.snap-tile:focus-visible { outline: 2px solid var(--ses-accent); outline-offset: 2px; }
.snap-tile.missing { background: #fbfcfe; }
.snap-tile.missing .snap-n, .snap-tile.missing .snap-k { color: var(--ses-muted); }
.snap-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.snap-k { font-size: .82rem; font-weight: 600; color: var(--ses-muted); }
.snap-n { font-size: 1.6rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.snap-sub { font-size: .74rem; color: var(--ses-muted); }
.snap-delta { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.snap-delta.flat { color: var(--ses-muted); background: #f1f5f9; } .snap-delta.bad { color: #b45309; background: #fdf2e3; } .snap-delta.good { color: #15803d; background: #e7f6ec; }
.snap-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: #eef2f7; gap: 2px; }
.snap-bar span { display: block; height: 100%; min-width: 3px; }
.snap-legend { font-size: .74rem; color: var(--ses-muted); line-height: 1.5; }
.snap-legend .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.snap-legend .chip { display: inline-block; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; margin: 2px 2px 0 0; color: var(--ses-ink); }
.tone-ok { background: #22a05a; } .tone-bad { background: #dc2626; } .tone-warn { background: #f59e0b; } .tone-mute { background: #cbd5e1; }
.tone-blue { background: #3b82f6; } .tone-teal { background: #14b8a6; } .tone-violet { background: #8b5cf6; }
.snap-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; min-height: 20px; }
.snap-marker { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.snap-marker.warn { color: #b45309; background: #fdf2e3; } .snap-marker.bad { color: #b91c1c; background: #fdecec; }
.snap-go { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: .74rem; font-weight: 600; color: var(--ses-accent); opacity: .75; }
a.snap-tile:hover .snap-go { opacity: 1; }
.snap-ring { display: flex; align-items: center; gap: 10px; }
.snap-ring svg { width: 46px; height: 46px; transform: rotate(-90deg); flex: 0 0 auto; }
.snap-ring .track { fill: none; stroke: #eef2f7; stroke-width: 4; } .snap-ring .fill { fill: none; stroke: #f59e0b; stroke-width: 4; stroke-linecap: round; }
@media (prefers-reduced-motion: reduce) { .snap-tile { transition: none; } a.snap-tile:hover { transform: none; } }
@media (max-width: 520px) { .snap-grid { grid-template-columns: 1fr; gap: 10px; } .snap-n { font-size: 1.45rem; } }
.inventory-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inventory-filters .search-box { position: relative; flex: 1 1 260px; max-width: 420px; }
.inventory-filters .search-box svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--ses-muted); }
.inventory-filters .search-box input { padding-left: 30px; }
a.cat-chip { color: inherit; text-decoration: none; }
.cat-chip.warn { border-color: #fcd34d; background: #fffbeb; }
.cat-chip.warn.on { border-color: var(--ses-ink); background: var(--ses-ink); }
.inventory-table td.wide, .inventory-table th.wide { min-width: 200px; }
.inventory-table td { vertical-align: top; overflow-wrap: anywhere; }
.inventory-table td:not(.wide) { white-space: nowrap; overflow-wrap: normal; }
.inventory-table tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--ses-warn); }
.warn-chip { display: inline-block; margin: 2px 4px 0 0; font-size: .7rem; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 0 7px; }
.change-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--ses-line); }
.change-row:last-of-type { border-bottom: 0; }
.chg { flex: 0 0 auto; min-width: 92px; text-align: center; font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #f1f5f9; color: var(--ses-na); }
.chg-improved { background: #dcfce7; color: var(--ses-pass); }
.chg-worse { background: #fee2e2; color: var(--ses-fail); }
.change-row .fixed { color: var(--ses-pass); font-weight: 600; }
.change-row .new { color: var(--ses-fail); font-weight: 600; }
.price-table td, .price-table th { padding: 6px 10px; }
@media (max-width: 720px) { .unlock-banner { flex-direction: column; align-items: stretch; } }

/* ---------- results list ---------- */
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.results-head h2 { font-size: 1.15rem; font-weight: 650; margin: 0; }
.results-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn { border: 1px solid var(--ses-line); background: var(--ses-card); color: var(--ses-ink); border-radius: 999px; padding: 4px 12px; font-size: .84rem; font-weight: 500; }
.seg-btn span { color: var(--ses-muted); margin-left: 3px; font-weight: 600; }
.seg-btn:hover { border-color: #93b4f5; }
.seg-btn.active { background: var(--ses-ink); border-color: var(--ses-ink); color: #fff; }
.seg-btn.active span { color: #cbd5e1; }
.results-search { display: flex; gap: 8px; flex-wrap: wrap; }
.results-search .form-select { width: auto; min-width: 180px; }
.search-box { position: relative; margin: 0; }
.search-box .icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--ses-muted); pointer-events: none; }
.search-box input { padding-left: 30px; min-width: 220px; }
.check-list { display: flex; flex-direction: column; gap: 6px; }
/* Signs of compromise (the Urgent tab): red when an attacker may have got in, amber when something is worth checking. */
.signals.suspected { border-color: #fecaca; background: #fef2f2; }
.signals.review { border-color: #fde68a; background: #fffbeb; }
.check-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--ses-line); background: var(--ses-card); border-radius: var(--radius); padding: 12px 14px; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.check-row:hover, .check-row:focus-visible { border-color: #93b4f5; box-shadow: 0 2px 12px rgba(37,99,235,.08); outline: none; }
.check-row[hidden] { display: none; }
.status-mark { flex: 0 0 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.status-pass { background: #dcfce7; color: var(--ses-pass); }
.status-warn { background: #fef3c7; color: var(--ses-warn); }
.status-fail { background: #fee2e2; color: var(--ses-fail); }
.status-error, .status-notperformed, .status-information { background: #f1f5f9; color: var(--ses-na); }
.check-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.check-name { font-weight: 600; }
.check-meta { color: var(--ses-muted); font-size: .8rem; }
.check-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.check-side .issues { color: var(--ses-muted); font-size: .82rem; white-space: nowrap; }
.check-side .chev { color: #94a3b8; }
.fix-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; color: var(--ses-accent); background: var(--ses-accent-soft); border-radius: 999px; padding: 2px 8px; }
@media (max-width: 720px) {
  .check-row { flex-wrap: wrap; }
  .check-side { width: 100%; padding-left: 44px; flex-wrap: wrap; }
  .search-box input, .results-search .form-select { min-width: 0; width: 100%; }
  .results-search, .search-box { width: 100%; }
}

/* ---------- check dialog ---------- */
.check-modal .modal-content { border: 0; border-radius: 14px; }
.check-modal .modal-header { align-items: flex-start; border-bottom: 0; padding: 20px 24px 8px; }
.mh-meta { display: flex; gap: 10px; align-items: baseline; color: var(--ses-muted); font-size: .82rem; }
.check-modal .modal-title { font-size: 1.3rem; font-weight: 650; margin: 4px 0 8px; }
.mh-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs-x { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--ses-line); }
.tab-x { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 10px 12px; color: var(--ses-muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-x:hover { color: var(--ses-ink); }
.tab-x.active { color: var(--ses-accent); border-bottom-color: var(--ses-accent); }
.tab-count { background: var(--ses-accent-soft); color: var(--ses-accent); border-radius: 999px; font-size: .72rem; padding: 0 7px; }
.check-modal .modal-body { padding: 20px 24px 24px; }
.check-modal .modal-footer { border-top: 1px solid var(--ses-line); padding: 10px 24px; }
.check-about { color: var(--ses-muted); margin-bottom: 14px; }
.summary-box { border-radius: 10px; padding: 12px 14px; font-weight: 600; background: #f1f5f9; }
.summary-fail { background: #fef2f2; color: #7f1d1d; }
.summary-warn { background: #fffbeb; color: #78350f; }
.summary-pass { background: #f0fdf4; color: #14532d; }
.h-sec { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ses-muted); font-weight: 700; margin: 22px 0 8px; }
.entities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.entities details { flex-basis: 100%; }
.entities details summary { font-size: .8rem; color: var(--ses-accent); cursor: pointer; padding: 2px 0; }
.entities details .entity { display: inline-block; margin: 6px 6px 0 0; }
.entity { font-size: .8rem; background: #f1f5f9; border: 1px solid var(--ses-line); border-radius: 6px; padding: 1px 8px; overflow-wrap: anywhere; }
.how { color: var(--ses-muted); font-size: .88rem; white-space: pre-line; margin: 0; }
.lock-panel { position: relative; margin-top: 14px; border: 1px dashed #cbd5e1; border-radius: 10px; overflow: hidden; min-height: 210px; }
.lock-panel .blur { filter: blur(5px); padding: 16px; user-select: none; }
.lock-panel .bar { height: 12px; background: #cbd5e1; border-radius: 6px; margin: 10px 0; }
.lock-panel .bar.thin { height: 8px; background: #e2e8f0; }
.lock-panel.code { background: #0f172a; }
.lock-panel.code .bar { background: #334155; }
.lock-panel .veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 16px; background: rgba(255,255,255,.55); }
.lock-panel.code .veil { background: rgba(15,23,42,.55); color: #fff; }
.lock-panel .veil span { max-width: 440px; font-size: .9rem; }
.empty-state { text-align: center; color: var(--ses-muted); padding: 40px 16px; }
.empty-state p { max-width: 460px; margin: 10px auto 14px; }
.fix-intro { display: flex; gap: 12px; align-items: flex-start; background: var(--ses-accent-soft); color: #1e3a8a; border-radius: 10px; padding: 12px 14px; font-size: .9rem; }
.fix-intro code { color: inherit; }
.script-block { border-radius: 10px; overflow: hidden; background: #0f172a; margin: 10px 0 4px; }
.script-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; background: #1e293b; color: #94a3b8; font-size: .78rem; font-weight: 600; }
.script-block pre { margin: 0; padding: 12px 14px; max-height: 420px; overflow: auto; }
.script-block code { color: #e2e8f0; font-size: .8rem; white-space: pre; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.script-block pre.dns code { white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; border-radius: 6px; padding: 2px 9px; font-size: .76rem; }
.copy-btn:hover { border-color: #64748b; }
.copy-btn.copied { border-color: var(--ses-pass); color: #86efac; }
.fix-steps { list-style: none; padding: 0; margin: 0; }
.fix-step { border: 1px solid var(--ses-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.fix-head { display: flex; gap: 12px; align-items: flex-start; }
.fix-head .num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--ses-accent-soft); color: var(--ses-accent); font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.fix-title { font-weight: 650; }
.tool { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 1px 8px; margin-top: 3px; background: #f1f5f9; color: #334155; }
.tool-microsoftgraph { background: #e0f2fe; color: #075985; }
.tool-exchangeonline, .tool-securitycompliance { background: #ede9fe; color: #5b21b6; }
.tool-teams { background: #e0e7ff; color: #3730a3; }
.tool-dns { background: #fef3c7; color: #92400e; }
.tool-later { background: #fff7ed; color: var(--ses-warn); border: 1px solid #fed7aa; margin-left: 4px; }
.fix-text { margin: 10px 0 6px; font-size: .92rem; }
.caution { display: flex; gap: 8px; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 8px; padding: 8px 10px; font-size: .86rem; margin: 8px 0; }
.caution .icon { margin-top: 2px; }
.change-link { color: inherit; text-decoration: none; border-bottom: 1px dashed #94a3b8; }
.change-link:hover { color: var(--ses-accent); }

/* ---------- Ask AI ---------- */
.ai { display: flex; flex-direction: column; gap: 12px; }
.ai-notice { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--ses-muted); background: #f8fafc; border: 1px solid var(--ses-line); border-radius: 8px; padding: 8px 10px; margin: 0; }
.ai-notice .icon { margin-top: 1px; }
.ai-thread { display: flex; flex-direction: column; gap: 12px; }
.ai-start { text-align: center; padding: 18px 8px 6px; color: var(--ses-muted); }
.ai-start p { margin-bottom: 12px; }
.ai-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ai-suggest button { border: 1px solid var(--ses-line); background: var(--ses-card); color: var(--ses-ink); border-radius: 999px; padding: 6px 12px; font-size: .84rem; text-align: left; white-space: pre-line; }
.ai-suggest button:hover { border-color: #93b4f5; background: var(--ses-accent-soft); }
.ai-msg { max-width: 92%; }
.ai-user { align-self: flex-end; }
.ai-user .ai-body { background: var(--ses-accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 9px 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-assistant { align-self: flex-start; }
.ai-assistant .ai-body { background: #f1f5f9; border-radius: 14px 14px 14px 4px; padding: 10px 14px; overflow-wrap: anywhere; }
.ai-assistant .ai-body.streaming { white-space: pre-wrap; }
.ai-assistant .ai-body.streaming:empty::after { content: "Thinking…"; color: var(--ses-muted); animation: none; }
.ai-assistant .ai-body.streaming::after { content: "▍"; color: var(--ses-accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-body > :last-child { margin-bottom: 0; }
.ai-body p, .ai-body ul, .ai-body ol { margin-bottom: .6rem; }
.ai-body pre { position: relative; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 70px 12px 14px; font-size: .8rem; overflow: auto; }
.ai-body pre code { color: inherit; white-space: pre; }
.ai-body :not(pre) > code { background: #e2e8f0; border-radius: 4px; padding: 0 4px; font-size: .85em; color: #0f172a; }
.ai-body table { font-size: .85rem; border-collapse: collapse; margin-bottom: .6rem; }
.ai-body th, .ai-body td { border: 1px solid var(--ses-line); padding: 4px 8px; }
.ai-copy { position: absolute; top: 6px; right: 6px; }
.ai-note { font-size: .76rem; color: var(--ses-muted); margin: 4px 4px 0; }
.ai-error { align-self: stretch; background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; border-radius: 8px; padding: 8px 12px; font-size: .86rem; }
.ai-form { position: sticky; bottom: -24px; background: var(--ses-card); padding: 10px 0 2px; border-top: 1px solid var(--ses-line); }
.ai-form textarea { width: 100%; resize: vertical; min-height: 64px; border: 1px solid var(--ses-line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .92rem; }
.ai-form textarea:focus { outline: none; border-color: var(--ses-accent); box-shadow: 0 0 0 3px var(--ses-accent-soft); }
.ai-form-foot { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.ai-form-foot [data-ai-send] { margin-left: auto; }

/* ---------- scanner app tabs (Settings → Microsoft 365) ---------- */
.app-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 18px; }
.app-tab { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--ses-line); border-radius: var(--radius); background: var(--ses-card); padding: 12px 14px; color: var(--ses-ink); text-decoration: none; }
.app-tab > .icon { margin-top: 3px; color: var(--ses-muted); }
.app-tab strong { display: block; }
.app-tab small { display: block; color: var(--ses-muted); }
.app-tab:hover { border-color: #93b4f5; color: var(--ses-ink); }
.app-tab.active { border-color: var(--ses-accent); box-shadow: 0 0 0 3px var(--ses-accent-soft); }
.app-tab.active > .icon { color: var(--ses-accent); }

/* ---------- new investigation ---------- */
.person-picker { position: relative; }
.person-picker .search-box input { padding-left: 32px; }
.person-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 360px; overflow: auto; background: var(--ses-card); border: 1px solid var(--ses-line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15,23,42,.14); }
.person-row { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--ses-line); background: none; padding: 9px 12px; font: inherit; color: inherit; }
.person-row:last-child { border-bottom: 0; }
.person-row:hover, .person-row:focus { background: var(--ses-accent-soft); outline: none; }
.person-main { display: flex; flex-direction: column; min-width: 0; }
.person-main small, .person-side small { color: var(--ses-muted); }
.person-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.person-badge { font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: #f1f5f9; color: var(--ses-na); }
.person-badge.deleted { background: #fee2e2; color: var(--ses-fail); }
.person-badge.disabled { background: #fef3c7; color: var(--ses-warn); }
.person-badge.guest { background: #e0e7ff; color: #3730a3; }
.person-empty { padding: 12px; color: var(--ses-muted); font-size: .9rem; }
.person-chosen { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--ses-accent); background: var(--ses-accent-soft); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.period-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.period-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--ses-line); border-radius: 10px; padding: 10px 12px; cursor: pointer; margin: 0; }
.period-option:has(input:checked) { border-color: var(--ses-accent); background: var(--ses-accent-soft); }
.period-option input { margin-top: 4px; }
.period-option small { display: block; color: var(--ses-muted); font-size: .8rem; }
.retention-note { display: flex; gap: 8px; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 8px; padding: 8px 10px; font-size: .86rem; }

/* ---------- investigation workspace ---------- */
.cat-signins { background: #2563eb; } .cat-files { background: #0891b2; } .cat-sharing { background: #d97706; } .cat-mail { background: #7c3aed; }
.cat-teams { background: #4f46e5; } .cat-identity { background: #dc2626; } .cat-admin { background: #475569; } .cat-other { background: #94a3b8; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.inv-person { display: flex; gap: 16px; align-items: flex-start; }
.avatar { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--ses-muted); font-weight: 700; }
.eyebrow .scan-type-icon { margin-right: 6px; }
.inv-person h1 { font-size: 1.55rem; font-weight: 650; margin: 2px 0; }
.inv-person .meta { color: var(--ses-muted); }
.inv-person .badges { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: .84rem; color: #334155; }
.status-badge { font-weight: 700; border-radius: 999px; padding: 1px 10px; }
.status-active { background: #dcfce7; color: var(--ses-pass); }
.status-disabled { background: #fef3c7; color: var(--ses-warn); }
.status-deleted { background: #fee2e2; color: var(--ses-fail); }
.badges .lwd { color: var(--ses-fail); font-weight: 600; }
.inv-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--ses-card); border: 1px solid var(--ses-line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .v { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.kpi .k { color: var(--ses-muted); font-size: .82rem; }
.kpi.bad .v { color: var(--ses-fail); }
.indicators { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 18px; }
.indicator { background: var(--ses-card); border: 1px solid var(--ses-line); border-left: 4px solid var(--ses-na); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.indicator.sev-high { border-left-color: var(--ses-fail); }
.indicator.sev-medium { border-left-color: var(--ses-warn); }
.indicator p { font-size: .9rem; margin: 6px 0 10px; flex: 1; }
.ind-head { display: flex; gap: 8px; align-items: baseline; }
.ind-sev { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ses-na); }
.sev-high .ind-sev { color: var(--ses-fail); } .sev-medium .ind-sev { color: var(--ses-warn); }
.ind-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ind-foot .btn { white-space: nowrap; }
.no-indicators { display: flex; gap: 10px; align-items: flex-start; color: #14532d; background: #f0fdf4; border-color: #bbf7d0; }
/* The line under the tabs is drawn inside the bar (no tab reaches below it), so a bar that scrolls sideways never scrolls up and down. */
.inv-tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--ses-line); margin-bottom: 14px; overflow-x: auto; overflow-y: hidden; }
.inv-tabs a { padding: 10px 14px; color: var(--ses-muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.inv-tabs a:hover { color: var(--ses-ink); }
.inv-tabs a.active { color: var(--ses-accent); border-bottom-color: var(--ses-accent); }
.inv-filters { background: var(--ses-card); border: 1px solid var(--ses-line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; z-index: 5; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.filter-row .search-box input { padding-left: 30px; min-width: 240px; }
.filter-row .form-select { width: auto; max-width: 260px; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: .86rem; margin: 0; white-space: nowrap; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ses-line); background: var(--ses-card); border-radius: 999px; padding: 3px 10px; font-size: .82rem; }
.cat-chip .n { color: var(--ses-muted); font-weight: 600; }
.cat-chip.on { border-color: var(--ses-ink); background: var(--ses-ink); color: #fff; }
.cat-chip.on .n { color: #cbd5e1; }
.cat-chip.empty { opacity: .45; }
.more-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.more-filters label { font-size: .8rem; color: var(--ses-muted); margin: 0; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.active-filters:empty { display: none; }
.active-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid #93b4f5; background: var(--ses-accent-soft); color: #1e3a8a; border-radius: 999px; padding: 2px 6px 2px 10px; font-size: .8rem; }
.active-chip .k { font-weight: 700; }
.active-chip .v { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-chip .x { font-weight: 700; padding: 0 4px; }
.chart-card { padding: 14px 16px 6px; }
.chart-head { display: flex; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.chart-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-back svg { vertical-align: -2px; }
.view-switch .btn { min-width: 92px; }
.chart-hint { flex-basis: 100%; }
@media (max-width: 575.98px) { .view-switch { width: 100%; } .view-switch .btn { flex: 1 1 0; } }
.chart { height: 300px; width: 100%; }
.event-list { background: var(--ses-card); border: 1px solid var(--ses-line); border-radius: var(--radius); margin-bottom: 18px; }
.list-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--ses-line); }
.list-count { font-weight: 600; }
.ev-row { display: grid; grid-template-columns: 64px minmax(160px, 1.1fr) minmax(180px, 2fr) minmax(120px, 1.1fr) minmax(90px, .8fr) minmax(130px, 1fr) 40px; gap: 10px; align-items: start;
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f1f5f9; background: none; padding: 7px 14px; font: inherit; font-size: .86rem; color: inherit; }
button.ev-row:hover, button.ev-row:focus-visible { background: #f8fafc; outline: none; }
.ev-header { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ses-muted); font-weight: 700; background: #f8fafc; }
.event-list.tall .ev-header { position: sticky; top: var(--inv-filters-h, 0px); z-index: 2; }
.ev-row > span { min-width: 0; overflow-wrap: anywhere; }
.ev-row small { display: block; color: var(--ses-muted); font-size: .76rem; }
.ev-time { font-variant-numeric: tabular-nums; color: #334155; }
.ev-activity { display: flex; gap: 7px; align-items: baseline; font-weight: 600; }
.ev-app { color: #334155; }
.ev-day { padding: 6px 14px; font-size: .76rem; font-weight: 700; color: var(--ses-muted); background: #fbfcfe; border-bottom: 1px solid #f1f5f9; position: sticky; top: 0; z-index: 1; }
.event-list.tall .ev-day { top: calc(var(--inv-filters-h, 0px) + 33px); }
.ev-row.flagged { box-shadow: inset 3px 0 0 var(--ses-fail); }
.ev-row.failed .ev-activity { color: var(--ses-fail); }
.ev-row.bg { color: #64748b; }
.ev-flags { display: flex; gap: 4px; justify-content: flex-end; }
.flag-mark, .unmanaged-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .7rem; font-weight: 800; }
.flag-mark { background: #fee2e2; color: var(--ses-fail); }
.unmanaged-mark { background: #fef3c7; color: var(--ses-warn); }
.ext-badge { display: inline-block; font-size: .68rem; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.ev-body { max-height: 640px; overflow-y: auto; }
.event-list.tall .ev-body { max-height: none; overflow: visible; }
.ev-sentinel { height: 1px; }
.ev-modal-meta { display: flex; gap: 8px; align-items: center; color: var(--ses-muted); font-size: .82rem; }
.ev-modal-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.flag-chip { background: #fee2e2; color: #7f1d1d; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }
.ev-kv { grid-template-columns: 170px 1fr; }
.pivots { display: flex; flex-wrap: wrap; gap: 8px; }
details.raw { margin-top: 16px; }
details.raw summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
details.raw pre { position: relative; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 14px; font-size: .76rem; max-height: 420px; overflow: auto; margin-top: 8px; }
details.raw code { color: inherit; white-space: pre; }
.raw-copy { position: absolute; top: 8px; right: 8px; }
.table-wrap { overflow-x: auto; }
.table-x.compact td, .table-x.compact th { padding: 7px 8px; font-size: .86rem; }
.table-x .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-x td.warn { color: var(--ses-warn); font-weight: 600; }
.table-x td.key { overflow-wrap: anywhere; min-width: 13rem; max-width: 420px; }
.inv-table .table-wrap { max-height: 560px; overflow: auto; }
/* File actions: the same colours as the chart's File actions view (investigation.js FILE_COLORS). */
.fa-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; margin-right: 2px; }
.fa-viewed { background: #cbd5e1; } .fa-other { background: #94a3b8; } .fa-uploaded { background: #059669; } .fa-edited { background: #0891b2; }
.fa-moved { background: #6366f1; } .fa-shared { background: #d97706; } .fa-downloaded { background: #db2777; } .fa-deleted { background: #1e293b; }
.file-actions td .small { max-width: 46ch; }
.inv-table thead th { position: sticky; top: 0; background: var(--ses-card); z-index: 1; }
.table-x a.pivot { color: var(--ses-muted); }
.table-x a.pivot:hover { color: var(--ses-accent); }
.row-external td:first-child { box-shadow: inset 3px 0 0 var(--ses-warn); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.inventory { list-style: none; padding: 0; margin: 0; }
ul.inventory li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
ul.inventory li.flagged strong { color: var(--ses-fail); }
.preview-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.preview-bar { display: grid; grid-template-columns: 160px 1fr 70px; gap: 10px; align-items: center; font-size: .88rem; }
.preview-bar .track { background: #f1f5f9; border-radius: 6px; height: 10px; overflow: hidden; }
.preview-bar .fill { display: block; height: 100%; border-radius: 6px; }
.preview-bar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ses-muted); }
@media (max-width: 900px) {
  .ev-row { grid-template-columns: 56px 1fr; row-gap: 2px; }
  .ev-row > span:nth-child(n+3) { grid-column: 2; }
  .ev-row > span:empty { display: none; }
  .ev-header { display: none; }
  .event-list.tall .ev-day { top: 0; }
  .inv-filters { position: static; }
  .inv-actions { align-items: flex-start; }
  .filter-row .search-box input { min-width: 0; }
}

/* ---------- assessment results: overview, reports, tabs ---------- */
.overview { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.35fr); gap: 28px; align-items: start; }
.overview-main { display: flex; gap: 22px; align-items: flex-start; }
/* The grade keeps its square: as a flex item it would otherwise shrink to the letter's width beside long text. */
.overview-main .grade { flex-shrink: 0; }
.overview-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.overview-text .score { font-size: 1.15rem; }
.overview-text .score b { font-size: 1.5rem; }
.overview-text .counts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.overview .urgent { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .88rem; color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.overview .urgent svg { color: var(--ses-fail); flex-shrink: 0; }
/* A failed critical check held the grade down: said right under the score. */
.overview .capped { display: flex; align-items: flex-start; gap: 6px; font-size: .88rem; color: #78350f; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 10px; }
.overview .capped svg { color: var(--ses-warn); flex-shrink: 0; margin-top: 2px; }
.overview .trend { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; text-decoration: none; border-radius: 999px; padding: 3px 10px; align-self: flex-start; }
.overview .trend.up { color: #14532d; background: #f0fdf4; }
.overview .trend.down { color: #7f1d1d; background: #fef2f2; }
.overview .trend.flat { color: var(--ses-muted); background: #f1f5f9; }
.overview .trend:hover { text-decoration: underline; }
.overview-areas { border-left: 1px solid var(--ses-line); padding-left: 24px; min-width: 0; }
.areas-head { font-weight: 650; font-size: .92rem; margin-bottom: 8px; }
.areas-head span { color: var(--ses-muted); font-weight: 400; font-size: .78rem; margin-left: 6px; }
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.area { display: flex; align-items: center; gap: 9px; border: 0; background: none; border-radius: 8px; padding: 4px 6px; font: inherit; color: inherit; text-align: left; min-width: 0; }
.area:hover, .area:focus-visible { background: #f1f5f9; outline: none; }
.area.active { background: var(--ses-accent-soft); box-shadow: inset 0 0 0 1px #93b4f5; }
.area .name { flex: 1; min-width: 0; font-size: .86rem; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area .meta { color: var(--ses-muted); font-size: .76rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.reports { padding: 18px 20px; }
.reports-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.reports-head h2 { margin: 0; }
.reports-head .locked-note svg { vertical-align: -2px; }
.report-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.report-tile { display: flex; gap: 12px; border: 1px solid var(--ses-line); border-radius: 10px; padding: 12px 14px; background: #fbfcfe; min-width: 0; }
.report-tile .rt-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ses-accent-soft); color: var(--ses-accent); flex-shrink: 0; }
.report-tile .rt-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.report-tile .rt-title { font-weight: 650; font-size: .93rem; }
.report-tile .rt-desc { color: var(--ses-muted); font-size: .8rem; line-height: 1.35; }
.report-tile .rt-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.report-tile .rt-actions .btn svg { vertical-align: -2px; margin-right: 2px; }
.report-tile .rt-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; padding: 6px 8px; border-radius: 7px; background: #fff7ed; color: #7c2d12; font-size: .78rem; line-height: 1.35; }
.report-tile .rt-note svg { flex-shrink: 0; margin-top: 2px; }
.report-tile .rt-note a { color: inherit; font-weight: 600; }
.report-extra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--ses-line); font-size: .84rem; color: var(--ses-muted); }
.report-extra b { color: var(--ses-ink, #0f172a); font-weight: 650; }
.report-extra svg { vertical-align: -2px; }
.report-extra .btn svg { margin-right: 2px; }
.report-tile.locked { background: #f8fafc; }
.report-tile.locked .rt-icon { background: #e2e8f0; color: #64748b; }
.report-tile.locked .rt-icon::after { content: ""; position: absolute; right: -5px; bottom: -5px; width: 17px; height: 17px; border-radius: 50%; background-color: #fff; box-shadow: 0 0 0 1px #cbd5e1;
  background-repeat: no-repeat; background-position: center; background-size: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }

/* Scan results tabs: a bar of their own under the overview, each tab with an icon and its count. The open tab is filled with the
   accent colour, or red (an attacker may have got in) or amber (worth checking) for Urgent. On a narrow screen the tabs wrap onto
   a second row rather than scroll. */
.page-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 2px 0 16px; background: var(--ses-card); border: 1px solid var(--ses-line);
    border-radius: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.page-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 14px; border-radius: 9px;
    color: var(--ses-muted); font: inherit; font-weight: 600; white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s; }
.page-tabs button:hover { background: #f1f5f9; color: var(--ses-ink); }
.page-tabs button.active { background: var(--ses-accent); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.28); }
.page-tabs button:focus-visible { outline: 2px solid var(--ses-accent); outline-offset: 2px; }
.page-tabs .tab-short { display: none; }
.page-tabs .tab-count { min-width: 22px; text-align: center; font-size: .74rem; font-weight: 700; color: var(--ses-muted); background: #eef2f7; border-radius: 999px; padding: 1px 7px; }
.page-tabs button.active .tab-count { color: var(--ses-accent); background: #fff; }
.page-tabs button[data-tone="suspected"] { color: var(--ses-fail); }
.page-tabs button[data-tone="review"] { color: var(--ses-warn); }
.page-tabs button[data-tone="suspected"].active { background: var(--ses-fail); color: #fff; box-shadow: 0 4px 12px rgba(185,28,28,.28); }
.page-tabs button[data-tone="review"].active { background: var(--ses-warn); color: #fff; box-shadow: 0 4px 12px rgba(180,83,9,.28); }
.page-tabs .tab-count.suspected { color: #fff; background: var(--ses-fail); }
.page-tabs .tab-count.review { color: #fff; background: var(--ses-warn); }
.page-tabs button.active .tab-count.suspected { color: var(--ses-fail); background: #fff; }
.page-tabs button.active .tab-count.review { color: var(--ses-warn); background: #fff; }
/* Until Urgent is opened, its count pulses softly. */
.page-tabs button:not(.active) .tab-count.suspected { animation: tab-pulse-fail 2s ease-in-out infinite; }
.page-tabs button:not(.active) .tab-count.review { animation: tab-pulse-warn 2s ease-in-out infinite; }
@keyframes tab-pulse-fail { 0%, 100% { box-shadow: 0 0 0 0 rgba(185,28,28,.45); } 60% { box-shadow: 0 0 0 6px rgba(185,28,28,0); } }
@keyframes tab-pulse-warn { 0%, 100% { box-shadow: 0 0 0 0 rgba(180,83,9,.45); } 60% { box-shadow: 0 0 0 6px rgba(180,83,9,0); } }
/* A tab's panel eases in as it opens. */
[data-page-panel]:not([hidden]) { animation: panel-in .2s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .page-tabs button { transition: none; }
    .page-tabs .tab-count, [data-page-panel] { animation: none !important; }
}
@media (max-width: 720px) {
    .page-tabs button { flex: 1 1 40%; justify-content: center; }
    .page-tabs .tab-long { display: none; }
    .page-tabs .tab-short { display: inline; }
}
@media (max-width: 1100px) {
  .overview { grid-template-columns: 1fr; gap: 18px; }
  .overview-areas { border-left: 0; padding-left: 0; border-top: 1px solid var(--ses-line); padding-top: 16px; }
}
@media (max-width: 560px) {
  .areas { grid-template-columns: 1fr; }
  .overview-main { gap: 14px; }
  .overview-main .grade.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 2.4rem; }
}
.filter-note { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }
.filter-note[hidden] { display: none; }

/* ---------- branding ---------- */
.branding-remove { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ses-line); }
.brand-preview { border: 1px solid var(--ses-line); border-radius: 10px; padding: 18px 20px; background: #fff; }
.brand-preview img { display: block; max-width: 200px; max-height: 64px; width: auto; height: auto; object-fit: contain; margin-bottom: 8px; }
.brand-preview .by { font-size: .8rem; font-weight: 700; color: #64748b; }
.brand-preview .title { font-size: 1.35rem; font-weight: 700; color: #1e40af; margin-top: 10px; line-height: 1.2; }
.brand-preview .credit { font-size: .78rem; color: #94a3b8; }


/* Tenants: choosing one to sign in to, the signed-in banner, and the lists in settings and on the dashboard. */
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; color: var(--ses-muted); text-decoration: none; margin-bottom: 8px; }
.back-link:hover { color: var(--ses-accent); }
.tenant-pick { list-style: none; padding: 0; margin: 4px 0 0; border: 1px solid var(--ses-line); border-radius: var(--radius); }
.tenant-pick li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--ses-line); }
.tenant-pick li:last-child { border-bottom: 0; }
.tenant-pick-name strong, .tenant-pick-new strong { display: block; }
.tenant-pick-name small, .tenant-pick-new small { display: block; color: var(--ses-muted); overflow-wrap: anywhere; }
.tenant-pick-state { text-align: right; max-width: 260px; }
.tenant-pick-new form, .page-head > .btn { flex-shrink: 0; white-space: nowrap; }
.tenant-pick-new { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 14px; padding: 14px; border: 1px dashed #b8c6e0; border-radius: var(--radius); background: #fafbfe; }
.signed-in-as { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin-bottom: 16px; border: 1px solid #bbf7d0; border-radius: var(--radius); background: #f0fdf4; }
.signed-in-as > .icon { color: var(--ses-pass); margin-top: 3px; }
.signed-in-as strong { display: block; }
.signed-in-as small { display: block; color: var(--ses-muted); }
.signed-in-as a { white-space: nowrap; }
.tenant-status { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
.tenant-status:hover .small { text-decoration: underline; }
.tenant-mini { list-style: none; padding: 0; margin: 0; }
.tenant-mini li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--ses-line); }
.tenant-mini li:last-child { border-bottom: 0; }
.tenant-mini strong, .tenant-mini small { display: block; }
.tenant-mini small { color: var(--ses-muted); }
@media (max-width: 720px) {
  .tenant-pick li { grid-template-columns: 1fr; gap: 8px; }
  .tenant-pick-state { text-align: left; max-width: none; }
  .tenant-pick-new { flex-direction: column; align-items: stretch; }
  .signed-in-as { flex-wrap: wrap; }
}

/* One tenant's summary on the scans page, and grade trends. */
.tenant-summary { display: grid; grid-template-columns: minmax(220px, auto) minmax(200px, 260px) 1fr; gap: 22px; align-items: start; }
.tenant-summary.no-trend { grid-template-columns: minmax(220px, auto) 1fr; }
.tenant-summary-grade { display: flex; gap: 14px; align-items: center; }
.tenant-summary-grade .score { font-size: 1.35rem; font-weight: 650; }
.tenant-summary-facts { grid-template-columns: 110px 1fr; }
.tenant-summary-facts dd div + div { margin-top: 4px; }
.sparkline { width: 100%; height: 48px; display: block; }
.sparkline polyline { fill: none; stroke: var(--ses-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sparkline-guide { stroke: var(--ses-line); stroke-dasharray: 3 3; }
.trend { font-weight: 600; font-variant-numeric: tabular-nums; }
.trend.up { color: var(--ses-pass); }
.trend.down { color: var(--ses-fail); }
.grade-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.scan-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 14px; }
.scan-filters .form-select { width: auto; min-width: 180px; max-width: 100%; }
.sparkline circle { fill: var(--ses-card); stroke: var(--ses-accent); stroke-width: 1.5; }
.sparkline circle.latest { fill: var(--ses-accent); }
@media (max-width: 900px) {
  .tenant-summary, .tenant-summary.no-trend { grid-template-columns: 1fr; }
}
/* On phones each row of a .stack-table is a labelled stack (cells carry data-label) instead of a wide table row. */
@media (max-width: 720px) {
  table.stack-table thead { display: none; }
  table.stack-table, table.stack-table tbody, table.stack-table tr { display: block; width: 100%; }
  table.stack-table tr { padding: 10px 0; border-bottom: 1px solid var(--ses-line); }
  table.stack-table tr:last-child { border-bottom: 0; }
  table.table-x.stack-table td { display: flex; gap: 10px; align-items: center; border: 0; padding: 3px 0; overflow-wrap: anywhere; }
  table.stack-table td[data-label]::before { content: attr(data-label); flex: 0 0 100px; white-space: nowrap; color: var(--ses-muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
  table.table-x.stack-table td.text-end { justify-content: flex-start; padding-top: 6px; }
  table.table-x.stack-table td:first-child:not([data-label]) { display: block; }
}

/* Deleting data: what goes, what stays, and the confirmation. */
.deletion-list { margin: 0; padding-left: 1.1rem; }
.deletion-list li { margin-bottom: 6px; }
.deletion-list.gone li::marker { color: var(--ses-fail); }
.deletion-list.kept li::marker { color: var(--ses-pass); }
.danger-card { border-color: #fecaca; }
.danger-card h2 { color: var(--ses-fail); }
.privacy-card { max-width: 860px; }
.privacy-options { grid-template-columns: 140px 1fr; gap: 10px 16px; margin-bottom: 14px; }
@media (max-width: 575.98px) { .privacy-options { grid-template-columns: 1fr; } .privacy-options dd { margin-bottom: 8px; } }
.page-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--ses-line); }
.page-foot a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.page-foot a:hover { text-decoration: underline; }
.reauth-step.done p { color: var(--ses-pass); font-weight: 600; }

/* Key dates on the new investigation form: label, day, flag, remove. */
.key-dates-field { border: 0; padding: 0; margin-left: 0; margin-right: 0; }
.key-dates-field legend { float: none; width: auto; font-size: 1rem; margin-bottom: 4px; }
.key-dates { display: grid; gap: 8px; }
.key-date-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px auto auto; gap: 10px; align-items: center; }
.key-date-flag { display: flex; gap: 6px; align-items: center; margin: 0; white-space: nowrap; font-size: .9rem; }
.key-date-flag .form-check-input { margin: 0; }
.key-date-remove { color: var(--ses-muted); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.key-date-remove:hover { color: var(--ses-fail); }
.badges .key-date { color: var(--ses-ink); font-weight: 600; }
@media (max-width: 640px) {
  .key-date-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--ses-line); }
  .key-date-row input[data-key-label] { grid-column: 1 / -1; }
}
.connected-as { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--ses-line); border-radius: var(--radius); background: var(--ses-card); }
.connected-as > .icon { color: var(--ses-accent); }
.connected-as strong, .connected-as small { display: block; }
.connected-as small { color: var(--ses-muted); }

/* ---------- account type (sign-up) ---------- */
.type-choice { border: 0; padding: 0; margin: 0; }
.type-choice legend { font-size: 1rem; float: none; width: auto; }
.type-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--ses-line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; background: var(--ses-card); }
.type-option input { margin-top: 4px; accent-color: var(--ses-accent); }
.type-option strong, .type-option small { display: block; }
.type-option small { color: var(--ses-muted); }
.type-option:has(input:checked) { border-color: var(--ses-accent); background: var(--ses-accent-soft); }
.type-option:has(input:focus-visible) { outline: 2px solid var(--ses-accent); outline-offset: 2px; }

/* ---------- a requirement callout (connect pages) ---------- */
.requirement { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); background: var(--ses-accent-soft); border: 1px solid #c7d7fe; }
.requirement > .icon { color: var(--ses-accent); margin-top: 2px; flex-shrink: 0; }
.requirement strong, .requirement span { display: block; }
.requirement span { color: var(--ses-muted); font-size: .875rem; }

/* Threat Narrative: an overview, then one account at a time beside the list of accounts. */
.flag { width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); object-fit: cover; vertical-align: -2px; flex-shrink: 0; }
.tn-label { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 700; color: var(--ses-muted); margin-bottom: 8px; }
.tn-note { color: var(--ses-muted); font-size: .8rem; margin: 10px 0 0; }
.tn-bad { color: var(--ses-fail); }
.tn-initials { width: 34px; height: 34px; border-radius: 10px; background: #e2e8f0; color: #334155; display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex-shrink: 0; }
.tn-main { min-width: 0; }
.tn-person { display: flex; gap: 16px; align-items: center; }
.tn-person h2 { margin: 0 0 2px; font-size: 1.3rem; }
.tn-person-text { min-width: 0; overflow-wrap: anywhere; }
.tn-person-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: .86rem; color: var(--ses-muted); }
.tn-why { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ses-line); }
.tn-why ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.tn-why-check { font-weight: 600; }
.tn-why-check::after { content: ":"; }
.tn-gaps { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 9px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: .86rem; }
.tn-gaps .icon { flex-shrink: 0; margin-top: 2px; }
.tn-gaps ul { margin: 4px 0 0; padding-left: 18px; }
.tn-places { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tn-places li { display: grid; grid-template-columns: minmax(150px, 220px) minmax(80px, 1fr) 110px 190px; grid-template-areas: "name bar count when"; align-items: center; gap: 2px 16px; }
.tn-place-name { grid-area: name; display: flex; align-items: center; gap: 8px; font-weight: 550; min-width: 0; }
.tn-place-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-bar { grid-area: bar; display: flex; height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.tn-bar .ok { background: var(--ses-accent); }
.tn-bar .bad { background: var(--ses-fail); }
.tn-place-count { grid-area: count; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tn-place-count small { display: block; font-weight: 500; }
.tn-place-when { grid-area: when; font-size: .8rem; color: var(--ses-muted); }
.tn-ips td, .tn-ips th { font-size: .86rem; white-space: nowrap; }
.tn-ips td small { white-space: nowrap; }
.tn-ips code { color: var(--ses-ink); font-size: .84rem; }
.tn-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; margin-bottom: 6px; }
.tn-dot { width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; display: inline-block; }
.tn-dot.risk { background: var(--ses-fail); }
.tn-dot.security { background: #d97706; }
.tn-timeline, .tn-timeline ol { list-style: none; margin: 0; padding: 0; }
.tn-day + .tn-day { margin-top: 16px; }
.tn-day-label { position: sticky; top: 0; background: var(--ses-card); font-size: .8rem; font-weight: 700; color: var(--ses-ink); padding: 8px 0; z-index: 1; }
.tn-moment { position: relative; display: flex; gap: 12px; padding: 7px 0 7px 2px; }
.tn-moment::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--ses-line); }
.tn-moment:first-child::before { top: 14px; }
.tn-moment:last-child::before { bottom: calc(100% - 14px); }
.tn-moment .tn-dot { position: relative; margin-top: 5px; box-shadow: 0 0 0 3px var(--ses-card); }
.tn-moment.risk { background: linear-gradient(90deg, #fef2f2, transparent 70%); border-radius: 8px; }
.tn-moment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tn-time { font-variant-numeric: tabular-nums; color: var(--ses-muted); font-size: .84rem; min-width: 40px; }
.tn-times { font-size: .78rem; font-weight: 700; color: var(--ses-muted); background: var(--ses-bg); border-radius: 999px; padding: 0 8px; }
.tn-moment-meta { font-size: .82rem; color: var(--ses-muted); margin-top: 2px; padding-left: 50px; overflow-wrap: anywhere; }
.tn-moment-meta code { color: var(--ses-muted); font-size: .8rem; }
.tn-access { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; }
.tn-access .tn-count { margin-left: 6px; color: var(--ses-muted); font-weight: 600; }
.tn-access ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tn-access li { font-size: .88rem; line-height: 1.3; }
.tn-access li small { display: block; color: var(--ses-muted); }
.tn-access li.flagged span { color: var(--ses-fail); font-weight: 600; }
@media (max-width: 720px) {
  .tn-places li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name count" "bar bar" "when when"; gap: 4px 12px; }
}
@media (max-width: 560px) {
  .tn-person { align-items: flex-start; }
  .tn-moment-meta { padding-left: 0; }
}
.tn-dot.sent { background: var(--ses-accent); }
.tn-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tn-kind { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ses-line); border-radius: 999px; padding: 3px 11px; font-size: .82rem; color: var(--ses-ink); text-decoration: none; background: var(--ses-card); }
.tn-kind b { font-weight: 650; color: var(--ses-muted); }
.tn-kind:hover { border-color: #93b4f5; color: var(--ses-ink); }
.tn-kind.active { background: var(--ses-ink); border-color: var(--ses-ink); color: #fff; }
.tn-kind.active b { color: #cbd5e1; }
.tn-outside { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #92400e; background: #fef3c7; border-radius: 4px; padding: 0 5px; margin-right: 4px; }
.tn-mailbox-facts { grid-template-columns: 190px 1fr; font-size: .9rem; }
.tn-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tn-rules > li { border: 1px solid var(--ses-line); border-radius: 9px; padding: 10px 12px; }
.tn-rules > li.flagged { border-color: #fde68a; background: #fffbeb; }
.tn-rules > li.strong { border-color: #fecaca; background: #fef2f2; }
.tn-rule-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 2px; }
.tn-rule-signs { margin: 6px 0 0; padding-left: 18px; font-size: .84rem; color: var(--ses-ink); }
@media (max-width: 560px) { .tn-mailbox-facts { grid-template-columns: 1fr; } }
.tn-dot.mailrules { background: #7c3aed; }
.tn-dot.mail { background: #0891b2; }
.tn-dot.files { background: #16a34a; }
.tn-dot.teams { background: #db2777; }
/* The halves of an audit search split to fit, under it. */
.tn-search-part { margin-left: 1.25rem; }
.tn-elsewhere { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.tn-elsewhere li { display: grid; grid-template-columns: 150px 1fr; gap: 2px 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ses-line); }
.tn-elsewhere li > :last-child { grid-column: 2; }
@media (max-width: 560px) { .tn-elsewhere li { grid-template-columns: 1fr; } .tn-elsewhere li > :last-child { grid-column: 1; } }

/* ---------- Threat Narrative: the story first, then one view at a time ---------- */
.page-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; color: #475569; font-weight: 600; text-decoration: none; }
.page-tabs a:hover { background: #f1f5f9; color: var(--ses-ink); }
.page-tabs a.active { background: var(--ses-accent); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.28); }
.page-tabs a.active .tab-count { color: var(--ses-accent); background: #fff; }
.page-tabs a[data-tone="suspected"] { color: var(--ses-fail); }
.page-tabs a[data-tone="review"] { color: var(--ses-warn); }
.page-tabs a[data-tone="suspected"].active { background: var(--ses-fail); color: #fff; box-shadow: 0 4px 12px rgba(185,28,28,.28); }
.page-tabs a[data-tone="review"].active { background: var(--ses-warn); color: #fff; box-shadow: 0 4px 12px rgba(180,83,9,.28); }
.page-tabs a.active .tab-count.suspected { color: var(--ses-fail); background: #fff; }
.page-tabs a.active .tab-count.review { color: var(--ses-warn); background: #fff; }
@media (max-width: 640px) { .page-tabs a { flex: 1 1 40%; justify-content: center; } }

/* One line while evidence is still arriving. */
.tn-status { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; margin-bottom: 14px; border: 1px solid #c7d7fe; background: var(--ses-accent-soft); border-radius: var(--radius); font-size: .88rem; }
.tn-status .spinner-x { flex-shrink: 0; margin-top: 3px; }

/* The answer first: how serious, and the bottom line. */
.tn-alarm { border-radius: var(--radius); border: 1px solid var(--ses-line); border-left: 6px solid var(--ses-na); background: var(--ses-card); padding: 18px 22px; margin-bottom: 14px; }
.tn-alarm.tier-high { border-left-color: var(--ses-fail); background: linear-gradient(90deg, #fef2f2, #fff 55%); }
.tn-alarm.tier-medium { border-left-color: var(--ses-warn); background: linear-gradient(90deg, #fffbeb, #fff 55%); }
.tn-alarm.tier-low, .tn-alarm.tier-none { border-left-color: var(--ses-pass); background: linear-gradient(90deg, #f0fdf4, #fff 55%); }
.tn-tier { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ses-na); }
.tier-high .tn-tier { color: var(--ses-fail); }
.tier-medium .tn-tier { color: var(--ses-warn); }
.tier-low .tn-tier, .tier-none .tn-tier { color: var(--ses-pass); }
.tn-alarm h2 { font-size: 1.22rem; font-weight: 700; margin: 6px 0 12px; line-height: 1.35; }
.tn-bottom { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.tn-bottom li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; line-height: 1.5; }
.tn-bottom li .icon { margin-top: 3px; }
.tn-bottom li.red .icon { color: var(--ses-fail); }
.tn-bottom li.amber .icon { color: var(--ses-warn); }
.tn-bottom li.green .icon { color: var(--ses-pass); }
.tn-bottom li.grey .icon { color: var(--ses-na); }
.tn-bottom a { white-space: nowrap; font-size: .85rem; }

/* Four numbers, each with its tone. */
.tn-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tn-tile { display: block; background: var(--ses-card); border: 1px solid var(--ses-line); border-top: 3px solid #94a3b8; border-radius: var(--radius); padding: 12px 14px; color: var(--ses-ink); text-decoration: none; }
.tn-tile:hover { border-color: #cbd5e1; color: var(--ses-ink); }
.tn-tile .v { font-size: 1.55rem; font-weight: 750; line-height: 1.15; }
.tn-tile .k { color: var(--ses-muted); font-size: .82rem; line-height: 1.35; }
.tn-tile.red { border-top-color: var(--ses-fail); } .tn-tile.red .v { color: var(--ses-fail); }
.tn-tile.amber { border-top-color: var(--ses-warn); } .tn-tile.amber .v { color: var(--ses-warn); }

/* Timeline at a glance: accounts by week, the most serious mark in each. */
.tn-glance-wrap { overflow-x: auto; padding-bottom: 4px; }
.tn-glance { border-collapse: separate; border-spacing: 2px; font-size: .78rem; min-width: 100%; }
.tn-glance thead th { font-size: .7rem; font-weight: 600; color: var(--ses-muted); text-align: left; padding: 0 0 4px; white-space: nowrap; }
.tn-glance tbody th { position: sticky; left: 0; z-index: 1; background: var(--ses-card); text-align: left; padding: 3px 12px 3px 0; font-weight: 550; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tn-glance tbody th a { color: inherit; text-decoration: none; }
.tn-glance tbody th a:hover { text-decoration: underline; }
.tn-glance tr.turned th { color: var(--ses-muted); font-weight: 500; font-style: italic; }
.tn-glance td { width: 26px; min-width: 26px; height: 26px; padding: 0; background: #f1f5f9; border-radius: 5px; text-align: center; }
.tn-glance td a { display: block; height: 100%; text-decoration: none; }
.tn-glance td.has a:hover .tn-mark, .tn-glance td.has a:focus-visible .tn-mark { outline: 2px solid var(--ses-accent); outline-offset: 1px; }
.tn-mark { display: inline-grid; place-items: center; width: 100%; height: 100%; min-height: 14px; border-radius: 5px; font-weight: 800; font-size: .7rem; color: #fff; }
.tn-mark.in { background: var(--ses-fail); }
.tn-mark.risk { background: #ea580c; }
.tn-mark.change { background: var(--ses-warn); }
.tn-mark.verify { background: #fde68a; color: #78350f; }
.tn-mark.held { background: #cbd5e1; color: #334155; }
.tn-mark.secured { background: var(--ses-pass); }
.tn-heat, .tn-heat-key { display: block; width: 100%; height: 100%; border-radius: 5px; background: #64748b; }
.tn-heat-key { display: inline-block; width: 14px; height: 14px; opacity: .6; vertical-align: -2px; }
.tn-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .78rem; color: var(--ses-muted); }
.tn-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.tn-legend .tn-mark { width: 14px; height: 14px; min-height: 0; font-size: .58rem; border-radius: 4px; }

/* Views: segmented links, sub-tabs, filters, pages. */
.tn-filterbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; }
.tn-seg { display: inline-flex; max-width: 100%; overflow-x: auto; border: 1px solid var(--ses-line); border-radius: 9px; background: var(--ses-card); }
.tn-seg a { flex-shrink: 0; white-space: nowrap; padding: 5px 12px; font-size: .85rem; font-weight: 600; color: #334155; text-decoration: none; border-right: 1px solid var(--ses-line); }
.tn-seg a:last-child { border-right: 0; }
.tn-seg a:hover { background: var(--ses-bg); color: var(--ses-ink); }
.tn-seg a.active { background: var(--ses-accent-soft); color: var(--ses-accent); }
.tn-seg .n { color: var(--ses-muted); font-weight: 700; font-size: .75rem; margin-left: 3px; }
.tn-filterbar .search-box { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ses-line); border-radius: 9px; padding: 3px 10px; background: var(--ses-card); margin: 0; }
.tn-filterbar .search-box input { border: 0; outline: 0; font-size: .86rem; width: 200px; background: transparent; }
.tn-subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; }
.tn-subtabs a { border: 1px solid var(--ses-line); background: var(--ses-card); color: #334155; border-radius: 999px; padding: 5px 13px; font-size: .86rem; font-weight: 600; text-decoration: none; }
.tn-subtabs a.active { background: var(--ses-ink); border-color: var(--ses-ink); color: #fff; }
.tn-subtabs a .n { font-weight: 700; font-size: .74rem; color: var(--ses-muted); margin-left: 3px; }
.tn-subtabs a.active .n { color: #cbd5e1; }
.tn-pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: .84rem; color: var(--ses-muted); }
.tn-pager .btns { display: flex; gap: 6px; }
.tn-nowrap th, .tn-nowrap td { white-space: nowrap; }

/* The story: days oldest first; cases as cards, the rest a line each. */
.tn-story { display: grid; gap: 14px; }
.tn-dayhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 6px 0 4px; }
.tn-dayhead h3 { font-size: .95rem; font-weight: 700; margin: 0; }
.tn-dayhead .sum { font-size: .8rem; color: var(--ses-muted); }
.tn-quiet { position: relative; text-align: center; color: var(--ses-muted); font-size: .78rem; }
.tn-quiet::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--ses-line); }
.tn-quiet span { position: relative; background: var(--ses-bg); padding: 0 10px; }
.tn-rows { display: grid; gap: 6px; }
.tn-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: start; background: var(--ses-card); border: 1px solid var(--ses-line); border-left: 4px solid #94a3b8; border-radius: 9px; padding: 9px 12px; font-size: .9rem; }
.tn-row.red { border-left-color: var(--ses-fail); }
.tn-row.amber { border-left-color: var(--ses-warn); }
.tn-row.green { border-left-color: var(--ses-pass); }
.tn-row .t { font-variant-numeric: tabular-nums; color: var(--ses-muted); font-size: .82rem; padding-top: 1px; }
.tn-row .what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tn-row .what strong { font-weight: 650; overflow-wrap: anywhere; }
.tn-row .meta { color: var(--ses-muted); font-size: .8rem; margin-top: 2px; overflow-wrap: anywhere; }
.tn-row .side { display: flex; gap: 6px; align-items: center; }
.tn-acct { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; color: #334155; background: #f1f5f9; border-radius: 999px; padding: 1px 9px 1px 3px; text-decoration: none; white-space: nowrap; }
.tn-acct i { font-style: normal; width: 18px; height: 18px; border-radius: 6px; background: #cbd5e1; display: inline-grid; place-items: center; font-size: .6rem; font-weight: 800; color: #1e293b; }
.tn-acct:hover { background: #e2e8f0; color: var(--ses-ink); }
.tn-badge { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #f1f5f9; color: #334155; white-space: nowrap; }
.tn-badge.red { background: #fee2e2; color: var(--ses-fail); }
.tn-badge.amber { background: #fef3c7; color: var(--ses-warn); }
.tn-badge.green { background: #dcfce7; color: var(--ses-pass); }
.tn-badge.blue { background: var(--ses-accent-soft); color: var(--ses-accent); letter-spacing: 0; text-transform: none; }
.tn-ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82em; background: #f1f5f9; border-radius: 5px; padding: 0 5px; white-space: nowrap; }

.tn-case { background: var(--ses-card); border: 1px solid #fecaca; border-left: 6px solid var(--ses-fail); border-radius: var(--radius); overflow: hidden; }
.tn-case.amber { border-color: #fde68a; border-left-color: var(--ses-warn); }
details.tn-case > summary { list-style: none; cursor: pointer; }
details.tn-case > summary::-webkit-details-marker { display: none; }
details.tn-case > summary .tn-case-head h4::after { content: " ▸"; color: var(--ses-muted); font-weight: 400; }
details.tn-case[open] > summary .tn-case-head h4::after { content: " ▾"; }
.tn-case-head { padding: 14px 18px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.tn-case-head .label { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ses-fail); }
.tn-case.amber .tn-case-head .label { color: var(--ses-warn); }
.tn-case-head h4 { font-size: 1.02rem; font-weight: 700; margin: 3px 0 4px; line-height: 1.35; }
.tn-case-head .facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: #475569; }
.tn-case-head .facts > span { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tn-case-body { border-top: 1px solid var(--ses-line); padding: 12px 18px 14px; display: grid; gap: 12px; }
.tn-case-verdict { font-weight: 650; font-size: .92rem; }
.tn-case-verdict small { display: block; font-weight: 400; color: var(--ses-muted); font-size: .82rem; margin-top: 2px; }
.tn-case-note { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; color: #1e3a8a; background: var(--ses-accent-soft); border-radius: 8px; padding: 8px 10px; }
.tn-case-note.warn { color: #78350f; background: #fffbeb; }
.tn-case-note .icon { margin-top: 2px; }
.tn-case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; font-size: .86rem; }
.tn-sub { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ses-muted); margin-bottom: 6px; }
.tn-acts { list-style: none; margin: 0; padding: 0; }
.tn-acts li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px solid #f1f5f9; font-size: .88rem; overflow-wrap: anywhere; }
.tn-acts li:first-child { border-top: 0; }
.tn-acts .t { color: var(--ses-muted); font-variant-numeric: tabular-nums; font-size: .8rem; padding-top: 1px; }
.tn-acts .sig { display: inline-block; min-width: 86px; margin-right: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ses-muted); }
.tn-acts .sig.persist { color: var(--ses-fail); }
.tn-acts .sig.collect { color: #7c3aed; }
.tn-acts .sig.exfil { color: #be185d; }
.tn-case-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; background: #f8fafc; border-top: 1px solid var(--ses-line); padding: 9px 18px; font-size: .84rem; }
.tn-standing { display: inline-flex; gap: 8px; align-items: center; }

.tn-pressure { background: var(--ses-card); border: 1px solid var(--ses-line); border-left: 6px solid #94a3b8; border-radius: var(--radius); padding: 14px 18px; }
.tn-pressure h4 { font-size: .98rem; font-weight: 700; margin: 4px 0 6px; line-height: 1.4; }
.tn-pressure .small span + span::before { content: " "; }
.tn-spark { display: flex; align-items: flex-end; gap: 1px; height: 34px; margin: 10px 0 4px; }
.tn-spark span { flex: 1; min-height: 1px; background: #cbd5e1; border-radius: 1px 1px 0 0; }
.tn-spark-axis { display: flex; justify-content: space-between; gap: 8px; font-size: .7rem; color: var(--ses-muted); }
.tn-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 18px; margin-top: 10px; font-size: .84rem; }
.tn-sources div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--ses-line); padding: 3px 0; }

.tn-checks { background: var(--ses-card); border: 1px dashed #cbd5e1; border-radius: var(--radius); padding: 14px 18px; }
.tn-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.tn-checks li { display: flex; gap: 8px; align-items: flex-start; }
.tn-checks li .icon { margin-top: 3px; color: var(--ses-pass); }
.tn-checks li.found .icon { color: var(--ses-warn); }
.tn-checks li.unchecked { color: var(--ses-muted); }
.tn-checks li.unchecked .icon { color: var(--ses-na); }

/* Accounts: the list by concern beside one account. */
.tn-layout2 { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.tn-acc-side { position: sticky; top: 16px; padding: 10px; max-height: calc(100vh - 32px); overflow: auto; }
.tn-acc-group { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ses-muted); margin: 10px 8px 4px; }
.tn-acc { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 9px; color: var(--ses-ink); text-decoration: none; }
.tn-acc:hover { background: var(--ses-bg); color: var(--ses-ink); }
.tn-acc.active { background: var(--ses-accent-soft); }
.tn-acc.active .tn-initials { background: var(--ses-accent); color: #fff; }
.tn-acc .nm { display: block; font-weight: 600; font-size: .9rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-acc .mt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: .76rem; color: var(--ses-muted); }
.tn-acc .marks { display: inline-flex; gap: 2px; }
.tn-acc .marks .tn-mark { width: 14px; height: 14px; min-height: 0; font-size: .55rem; border-radius: 4px; }
.tn-acc-select { display: none; }
.tn-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ses-line); font-size: .86rem; color: #334155; }
.tn-facts b { font-weight: 700; color: var(--ses-ink); }
.tn-facts .bad, .tn-facts .bad b { color: var(--ses-fail); }
.tn-facts .flag { margin-left: 2px; }

.tn-cov td, .tn-cov th { text-align: center; white-space: nowrap; }
.tn-cov td:first-child, .tn-cov th:first-child { text-align: left; }
.tn-cov .yes { color: var(--ses-pass); font-weight: 700; }

@media (max-width: 1100px) { .tn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .tn-layout2 { grid-template-columns: 1fr; }
  .tn-acc-side { display: none; }
  .tn-acc-select { display: block; margin-bottom: 14px; }
  .tn-case-facts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-head { flex-direction: column; gap: 10px; }
  .head-with-type { align-items: flex-start; }
  .tn-alarm { padding: 14px 16px; }
  .tn-alarm h2 { font-size: 1.06rem; }
  .tn-row { grid-template-columns: 1fr; gap: 2px; }
  .tn-row .side { flex-wrap: wrap; }
  .tn-acts li { grid-template-columns: 1fr; gap: 0; }
  .tn-case-head { grid-template-columns: 1fr; }
  .tn-case-head, .tn-case-body, .tn-case-foot { padding-left: 14px; padding-right: 14px; }
  .tn-glance tbody th { max-width: 120px; }
  .tn-filterbar .search-box input { width: 140px; }
}

/* A results page's actions beside its status: Share. */
.head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Shared results, as an outside reviewer sees them: whose results, shared with whom and until when, then the page alone. */
.review-shell { min-height: 100vh; display: flex; flex-direction: column; }
.review-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 28px; background: var(--ses-card); border-bottom: 1px solid var(--ses-line); }
.review-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ses-ink); }
.review-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ses-muted); font-size: .88rem; }
.review-shell .content { flex: 1; margin: 0 auto; }
.review-foot { color: var(--ses-muted); font-size: .8rem; text-align: center; padding: 16px; }
.share-events td { padding-top: 0; border-top: 0; }
@media (max-width: 700px) {
  .review-bar { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
}
