﻿/* TekShield 365 — styles from the approved mockups (design/mockups.html).
   Microsoft admin-portal look: navy header, white panels on cool grey, 4px radii, 1px borders, no shadows.
   System fonts only (no third-party font hosts, keeps the CSP strict). */
:root {
  --navy: #13233D; --ink: #1B2330; --ink-2: #3D4756; --muted: #5A6474;
  --line: #DDE1E7; --line-2: #EEF0F3; --bg: #F3F4F6; --panel: #FFFFFF;
  --blue: #1F5FBF; --blue-dk: #164A96;
  --good: #1B7A3A; --warn: #A15C00; --bad: #B3261E;
  --sev-crit: #8E1B14; --sev-high: #D9480F; --sev-med: #E8A317; --sev-low: #8A94A3;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
a { color: var(--blue); } a:hover { color: var(--blue-dk); }
h1, h2, h3 { text-wrap: balance; }
h1:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }

/* Chrome */
.hdr { background: var(--navy); color: #fff; }
.hdr .in { max-width: 1240px; margin: 0 auto; padding: 0 24px; min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; }
.brand:hover { color: #fff; }
.hlink { color: #D6DCE6; text-decoration: none; padding: 8px 2px; } .hlink:hover { color: #fff; }
.tenant { display: flex; align-items: center; gap: 8px; color: #D6DCE6; font-size: 13px; border-left: 1px solid #33435E; padding-left: 20px; }
.tenant strong { color: #fff; font-weight: 600; }
.sample { font-size: 12px; color: var(--navy); background: #FFD27A; padding: 2px 8px; border-radius: 3px; font-weight: 600; }
.nav { background: #fff; border-bottom: 1px solid var(--line); }
.nav .in { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 0 4px; }
.tab { display: flex; align-items: center; gap: 6px; padding: 0 14px; min-height: 44px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--navy); }
.tab.on { color: var(--navy); font-weight: 600; border-bottom-color: var(--blue); }
.tab.locked { color: var(--muted); cursor: default; }
.strip { background: #FFF7E6; border-bottom: 1px solid #F1DDB0; color: #5C3D00; font-size: 13px; }
.strip .in { max-width: 1240px; margin: 0 auto; padding: 8px 24px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px; }
/* Footer stays at the bottom of the window on short pages: body is a column, the footer takes the leftover space above it. */
body { display: flex; flex-direction: column; min-height: 100vh; }
.foot { border-top: 1px solid var(--line); background: #fff; margin-top: auto; }
.foot .in { max-width: 1240px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; color: var(--muted); }
.page-title { margin: 0; font-size: 24px; color: var(--navy); }

/* Blocks */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; min-width: 0; }
.panel-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.panel-h h2 { margin: 0; font-size: 15px; color: var(--navy); }
.panel-h .sub { color: var(--muted); font-size: 13px; }
.lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.btn-p { background: var(--blue); color: #fff; } .btn-p:hover { background: var(--blue-dk); color: #fff; }
.btn-s { background: #fff; color: var(--ink); border-color: #B9C0CA; } .btn-s:hover { background: var(--bg); color: var(--ink); }
.btn-lg { min-height: 44px; padding: 0 20px; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
td:first-child, th:first-child { padding-left: 20px; }
td:last-child, th:last-child { padding-right: 20px; }
.scroll { overflow-x: auto; }
.right { text-align: right; }

.sev { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sev::before { content: ""; width: 9px; height: 9px; border-radius: 1px; background: var(--c); }
.sev.critical { --c: var(--sev-crit); } .sev.high { --c: var(--sev-high); } .sev.medium { --c: var(--sev-med); } .sev.low { --c: var(--sev-low); } .sev.info { --c: #C5CBD4; }
.ev { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 3px; letter-spacing: .02em; white-space: nowrap; border: 1px solid var(--navy); }
.ev.observed { background: var(--navy); color: #fff; }
.ev.inferred { background: #fff; color: var(--navy); }
.ev.notassessable { background: #E6E8EC; color: #4A5361; border-color: #E6E8EC; }
.res { font-weight: 600; white-space: nowrap; }
.res.fail, .res.error { color: var(--bad); } .res.warning { color: var(--warn); } .res.pass { color: var(--good); } .res.notassessable { color: var(--muted); }
.grade { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; border-radius: 3px; }
.g-good { background: var(--good); } .g-warn { background: var(--warn); } .g-bad { background: var(--bad); } .g-na { background: #E6E8EC; color: #4A5361; }
.bar { height: 8px; background: #E9ECF0; border-radius: 2px; overflow: hidden; flex: 1; }
.bar > span { display: block; height: 100%; }
.ghost { display: inline-block; height: 10px; border-radius: 2px; background: #E3E6EB; vertical-align: middle; }
.step-dot { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.chip { display: inline-block; font-size: 12px; border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px; background: #F8F9FA; white-space: nowrap; }
.notice { padding: 12px 16px; border-radius: 4px; border: 1px solid; font-size: 13px; }
.notice.err { background: #FDECEA; border-color: #F3C1BC; color: #7A1B14; }
.notice.ok { background: #E8F4EC; border-color: #B9DCC3; color: #134F26; }
.notice.info { background: #EEF4FD; border-color: #C4D8F5; color: #163C73; }
.notice.warn { background: #FFF6E5; border-color: #F2D59B; color: #6B4600; }
input.field, select.field { font: inherit; color: var(--ink); background: #fff; border: 1px solid #B9C0CA; border-radius: 4px; min-height: 40px; padding: 0 10px; }

/* Score */
.big-score { font-size: 88px; line-height: 1; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.scale { display: flex; height: 10px; border-radius: 2px; overflow: hidden; }
.scale span { display: block; height: 100%; }
.scale-lbl { display: flex; font-size: 11.5px; color: var(--muted); }
.scale-lbl span { text-align: center; }

/* Pipeline */
.pipe { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.pipe li { flex: 1 1 140px; padding: 12px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pipe li:last-child { border-right: 0; }
.pipe .k { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pipe li.done .k::after { content: " · done"; color: var(--good); }
.pipe li.skipped .k::after { content: " · skipped"; }
.pipe li.failed .k::after { content: " · failed"; color: var(--bad); }
.pipe li.running { background: #EEF4FD; box-shadow: inset 0 -3px 0 var(--blue); }
.pipe li.running .k { color: var(--blue); }
.pipe li.waiting { color: var(--muted); }
.log { background: #0F1A2C; color: #C9D2DF; border-radius: 0 0 4px 4px; padding: 14px 20px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; overflow-x: auto; white-space: pre-wrap; min-height: 80px; }
.log .t { color: #7D8BA3; } .log .c { color: #7FB2FF; } .log .ok { color: #7BD88F; } .log .w { color: #F2C46D; }

/* Findings */
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #F8FAFD; }
tr.selected td { background: #EEF4FD; } tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

@media (max-width: 640px) {
  .tenant { border-left: 0; padding-left: 0; }
  .kv { grid-template-columns: 1fr; }
  .big-score { font-size: 72px; }
  .wrap { padding: 16px; }
}
/* Printable report (/app/report) — the browser's "Save as PDF" creates the PDF */
.print-toolbar { display: flex; gap: 12px; align-items: center; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.print-page { width: 100%; max-width: 820px; margin: 0 auto; padding: 32px 24px; background: #fff; display: flex; flex-direction: column; gap: 14px; }
.print-page h2 { font-size: 17px; color: var(--navy); margin: 18px 0 4px; border-bottom: 2px solid var(--navy); padding-bottom: 4px; }
.print-page h3 { font-size: 15px; margin: 6px 0; color: var(--navy); }
.print-page p { margin: 4px 0; }
.print-page ol { margin: 4px 0 4px 20px; padding: 0; }
.print-page td:first-child, .print-page th:first-child { padding-left: 8px; }
.print-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid var(--navy); padding-bottom: 12px; }
.print-brand { font-size: 22px; font-weight: 700; color: var(--navy); }
.print-score { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.print-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 24px; margin: 0; flex: 1 1 320px; }
.print-counts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.print-counts dd { margin: 0; font-weight: 600; font-size: 16px; }
.print-finding { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; break-inside: avoid; }
.print-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
@media print {
  .no-print { display: none !important; }
  html, body { background: #fff; }
  body { display: block; min-height: 0; }
  .print-page { padding: 0; max-width: none; }
  .grade, .sev::before, .ev.observed { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 16mm; }
}

/* Expired free report: details faded and unclickable, message on top */
.expired-wrap { position: relative; }
.expired-fade { filter: blur(3px); opacity: .35; pointer-events: none; user-select: none; }
.expired-notice { position: absolute; inset: 0; margin: auto; height: fit-content; max-width: 520px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 6px; padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 12px 32px rgba(19,35,61,.18); }
.expired-notice h2 { margin: 0; font-size: 20px; color: var(--navy); }
.expired-notice p { margin: 0; color: var(--ink-2); }
.expired-notice.static { position: static; margin: 0 auto; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Blazor */
#blazor-error-ui { background: #FFF7E6; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Something went wrong on this part of the page."; }

/* Finding decisions (Batch C) */
.state { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 3px; padding: 2px 8px; white-space: nowrap; border: 1px solid; }
.state.acceptedrisk { background: #FFF6E5; border-color: #F0D49A; color: #6B4A00; }
.state.falsepositive { background: #F1F3F6; border-color: #D3D9E2; color: #3E4A5C; }
.state.fixed { background: #E8F4EC; border-color: #B9DCC3; color: #134F26; }
.history { font-size: 12.5px; border-collapse: collapse; width: 100%; }
.history td { padding: 4px 8px 4px 0; vertical-align: top; }

/* Copilot & AI page */
.ai-row { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.ai-row .mono { white-space: nowrap; }
.ready-gauge { position: relative; width: 220px; max-width: 100%; height: 8px; border-radius: 4px; margin-top: 6px;
  background: linear-gradient(90deg, #E9B8B4 0 40%, #F3DDA8 40% 70%, #B9DCC3 70%); }
.ready-gauge i { position: absolute; top: -4px; width: 3px; height: 16px; background: var(--navy); transform: translateX(-1px); }

/* Free teaser (approved design 30 Nov): serious results fade out under a note. The faded rows hold no real names. */
.teaser { position: relative; display: flex; flex-direction: column; }
.teaser-fade { position: relative; max-height: 300px; overflow: hidden; filter: blur(1.2px); opacity: .9; pointer-events: none; user-select: none; }
.teaser-fade::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(243,244,246,0) 0%, rgba(243,244,246,0) 20%, rgba(243,244,246,.8) 60%, rgba(243,244,246,1) 92%); }
.ph-rows { padding: 2px 20px 12px 74px; }
.ph-rows div { display: flex; gap: 10px; padding: 4px 0; }
.ph-rows span { display: inline-block; height: 10px; border-radius: 3px; background: #C9CED6; }
.teaser > .teaser-note { margin-top: -150px; position: relative; z-index: 1; }
.teaser-note { background: #FFFEFB; border: 2px solid var(--navy); border-left-width: 6px; border-radius: 6px;
  box-shadow: 0 18px 40px rgba(20,33,61,.16); padding: 28px 36px 24px; color: #23272E; }
.teaser-note .from { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.teaser-note .mono-av { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 36px; }
.teaser-note .from b { display: block; font-size: 13.5px; color: var(--navy); }
.teaser-note .from span { font-size: 12px; color: #7A7468; }
.teaser-note h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.3; color: var(--navy); }
.teaser-note p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: #3A3F47; }
.teaser-note ol { margin: 4px 0 16px; padding-left: 22px; font-size: 14.5px; line-height: 1.7; }
.teaser-note mark { background: linear-gradient(transparent 55%, #FFE58F 55%); color: inherit; font-weight: 700; padding: 0 2px; }
.teaser-note .go { padding-top: 16px; border-top: 1px dashed #B9B2A2; font-size: 15px; color: var(--navy); }
.teaser-note .go a { color: var(--navy); }
.teaser-note .small { font-size: 12px; color: #7A7468; margin-top: 10px; }
@media (max-width: 640px) { .teaser-note { padding: 20px 18px; } .ph-rows { padding-left: 20px; } }

/* Scan again: area picker (paid plans) */
.rescan { position: relative; }
.rescan > summary { list-style: none; cursor: pointer; }
.rescan > summary::-webkit-details-marker { display: none; }
.rescan-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(340px, 90vw); background: #fff; border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 12px 30px rgba(20,33,61,.15); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.rescan-panel label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.rescan-panel label.area-opt { align-items: flex-start; }
.rescan-panel label.area-opt input { margin-top: 3px; }
.rescan-panel .desc { display: block; font-size: 12.5px; }

/* Copilot & AI page */
.ai-jump { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; position: sticky; top: 0; z-index: 5; background: var(--bg, #F4F6F9); padding: 8px 0; border-bottom: 1px solid var(--line); }
.ai-jump .ai-top { margin-left: auto; }
main [id] { scroll-margin-top: 56px; }
.ai-parts th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 0; }
.ai-why { display: block; font-size: 12px; margin-top: 2px; }
.ai-intro { margin: 0; padding: 12px 20px 8px; font-size: 13.5px; }
.ai-link { display: inline-block; margin-top: 8px; font-size: 13px; }

/* Findings: free plan sees the finding but not how to fix it */
.free-lock { display: flex; flex-direction: column; gap: 12px; }
.free-lock-cta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #FAFBFC; }
.free-lock-fade { display: flex; flex-direction: column; gap: 18px; filter: blur(3px); opacity: .4; pointer-events: none; user-select: none; }

/* Findings: summary strip */
.fs-strip { display: grid; grid-template-columns: minmax(170px, auto) minmax(220px, 1.3fr) minmax(220px, 1fr) minmax(240px, 1.3fr); gap: 20px 28px; padding: 16px 20px; align-items: start; }
.fs-strip button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.fs-score { display: flex; flex-direction: column; gap: 4px; }
.fs-score-row { display: flex; align-items: center; gap: 12px; }
.fs-change { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fs-change.up { color: var(--good); } .fs-change.down { color: var(--bad); }
.fs-results, .fs-sev, .fs-areas { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fs-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: #E6EAF0; }
.fs-seg { height: 100%; min-width: 3px; border-radius: 0; }
.fs-seg.pass, .dot.pass { background: var(--good); } .fs-seg.warn, .dot.warn { background: var(--warn); }
.fs-seg.fail, .dot.fail { background: var(--bad); } .fs-seg.na, .dot.na { background: #B6BEC9; }
.fs-seg:focus-visible, .fs-key:focus-visible, .fs-chip:focus-visible, .fs-area:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.fs-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.fs-key { display: inline-flex; align-items: center; gap: 6px; }
.fs-key .dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sev-dots-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; }
.fs-chip.on { border-color: var(--navy); background: #EEF2F8; }
.fs-area { display: grid; grid-template-columns: 74px 1fr 32px; gap: 8px; align-items: center; padding: 2px 4px; border-radius: 4px; font-size: 13px; }
.fs-area.on { background: #EEF2F8; }
.fs-area .bar { height: 8px; border-radius: 3px; background: #E6EAF0; overflow: hidden; display: block; }
.fs-area .bar span { display: block; height: 100%; }
.fs-area .val { text-align: right; font-weight: 600; }
.fs-area .val-na { grid-column: 2 / 4; font-size: 12px; }
@media (max-width: 900px) { .fs-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fs-strip { grid-template-columns: 1fr; } }

/* Settings: extra access (Exchange, Azure) */
.extra-block { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.extra-block:last-child { border-bottom: 0; }
.extra-block h3 { margin: 0 0 6px; font-size: 14.5px; color: var(--navy); }
.extra-block ol { margin: 8px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.extra-block .small { font-size: 12.5px; }
.code-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.code { flex: 1 1 420px; min-width: 0; margin: 0; padding: 12px 14px; background: #F4F6F9; border: 1px solid var(--line); border-radius: 6px;
  font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Dashboard: what each area checks */
.area-checks { border-bottom: 1px solid var(--line); }
.area-checks:last-child { border-bottom: 0; }
.area-checks > summary { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; padding: 12px 20px; cursor: pointer; }
.area-checks > summary::before { content: "▸"; color: var(--muted); width: 12px; }
.area-checks[open] > summary::before { content: "▾"; }
.area-checks .count { font-weight: 600; font-size: 13px; color: var(--navy); }
.area-checks .desc { font-size: 13px; }
.area-checks ul { list-style: none; margin: 0; padding: 0 20px 12px 44px; display: flex; flex-direction: column; gap: 6px; }
.area-checks li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.area-checks li .sev { min-width: 74px; }
.area-checks li .id { font-size: 12px; }
.carried { display: inline-block; font-size: 11.5px; color: var(--muted); border: 1px dashed #C9CED6; border-radius: 3px; padding: 1px 6px; white-space: nowrap; }

/* Loader: TekShield shield with a turning ring (no third-party logo) */
.ts-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.ts-loader.inline { padding: 32px 0; }
/* Overlay: fixed and centred on the screen, page behind blurred, no layout space (nothing jumps).
   Fades in after 150 ms so quick loads never flash. */
.ts-loader.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(243, 244, 246, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; animation: ts-fade .2s ease-out .15s forwards; }
.ts-loader.overlay .ts-loader-mark { width: 72px; height: 72px; }
@keyframes ts-fade { to { opacity: 1; } }
.ts-loader-mark { position: relative; width: 56px; height: 56px; display: inline-block; }
.ts-loader-mark .ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: ts-spin 1.1s linear infinite; }
.ts-loader-mark .ring circle { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 60 120; }
.ts-loader-mark .shield { position: absolute; left: 50%; top: 50%; width: 42%; height: 46%; transform: translate(-50%, -52%); }
.ts-loader-mark .shield path { fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linejoin: round; }
.ts-loader-mark .shield .tick { stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; }
.ts-loader-text { font-size: 13px; }
@keyframes ts-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ts-loader-mark .ring { animation-duration: 3s; } }

/* Page loader in the layout: shown until the page itself has rendered its <main> (live pages connect first). */
body:has(main) .page-loader { display: none; }
.ts-loader-mark .track { position: absolute; inset: 0; width: 100%; height: 100%; }
.ts-loader-mark .track circle { fill: none; stroke: #DCE3EE; stroke-width: 4; }

/* AI summary page */
/* AI summary: score on top, first paragraph as a lead, the rest at a comfortable reading width. */
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.ai-score { display: flex; align-items: baseline; gap: 8px; }
.ai-score .big { font-size: 40px; font-weight: 700; line-height: 1; }
.ai-summary { display: flex; flex-direction: column; gap: 16px; }
.ai-summary p { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.ai-summary p:first-child { font-size: 18px; line-height: 1.55; font-weight: 600; padding-left: 14px; border-left: 3px solid var(--navy); }
.ai-note { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Findings: API source tucked under "Technical details" (review 1 Dec) */
.tech > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tech > summary::before { content: "▸ "; }
.tech[open] > summary::before { content: "▾ "; }

/* Copilot & AI: app permissions as chips; risky ones in red */
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.perm { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; line-height: 18px; background: #EEF2F7; color: var(--ink-2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.perm.risky { background: #FDECEA; color: #8A1C12; font-weight: 600; }
.perm.more { background: transparent; color: var(--muted, #5B6B80); font-family: inherit; }
.perm-rest { display: inline; }
.perm-rest > summary { display: inline-block; cursor: pointer; }
.perm-rest[open] > summary { display: none; }
.perm-rest > .perm { margin: 0 4px 4px 0; }

/* Until the live session renders the page; static pages (with a header) hide it at once */
body:has(.hdr) .boot-loader, body:has(main) .boot-loader { display: none; }

/* Copilot & AI: "coming soon" list */
.soon-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--blue); opacity: .55; }

/* AI summary history: date filter and the list of past scans. */
.ai-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 4px 20px 16px; }
.ai-pick { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; text-align: left; }
.ai-row-current { background: #EEF4FD; }
.ai-row-current .ai-pick { font-weight: 700; }

/* Findings: the detail panel stays in view beside the list, however far down the list is scrolled. */
.detail-sticky { position: sticky; top: 16px; align-self: flex-start; max-height: calc(100vh - 32px); overflow-y: auto; }
@media (max-width: 980px) { .detail-sticky { position: static; max-height: none; overflow-y: visible; } }

/* Fix plan: intro and progress, one group per time bucket, one card per problem with its steps always shown. */
.fix-intro { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.fix-progress { display: flex; flex-direction: column; gap: 8px; }
.fix-how { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fix-how li { counter-increment: step; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.fix-how li::before { content: counter(step); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fix-group { display: flex; flex-direction: column; gap: 10px; }
.fix-group-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-top: 8px; }
.fix-group-h h2 { margin: 0; font-size: 18px; }
.fix-card { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.fix-card-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.fix-title { font-size: 16px; }
.fix-meta { font-size: 13px; }
.fix-why { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.fix-why .lbl { display: block; margin-bottom: 2px; }
.fix-steps { margin: 6px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.fix-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fix-hint { font-size: 12.5px; }
.fix-details { margin-left: auto; font-size: 13px; }

/* Fix plan groups: collapsible header, severity circles. */
.fix-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink); font: inherit; }
.fix-toggle h2 { margin: 0; font-size: 18px; }
.chev { display: inline-block; font-size: 14px; color: var(--muted); transition: transform .15s; }
.chev.open { transform: rotate(90deg); }
.sev-dots { display: inline-flex; gap: 6px; }
.sev-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--c); background: #fff; color: var(--c); font: inherit; font-size: 12px; font-weight: 700; line-height: 1; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sev-dot.critical { --c: var(--sev-crit); } .sev-dot.high { --c: var(--sev-high); } .sev-dot.medium { --c: var(--sev-med); } .sev-dot.low { --c: var(--sev-low); }
.sev-dot.on { background: var(--c); color: #fff; }
.sev-dot:disabled { opacity: .35; cursor: default; }
.sev-dot:focus-visible, .fix-toggle:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.fix-filter-note { font-size: 13px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }

/* Compare scans page: score before and after, tiles, delta colours. */
.cmp-score { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 20px 24px; }
.cmp-side { display: flex; flex-direction: column; gap: 4px; }
.cmp-num { font-size: 40px; font-weight: 700; line-height: 1; }
.cmp-num small { font-size: 16px; font-weight: 600; color: var(--muted); }
.cmp-arrow { font-size: 28px; color: var(--muted); }
.cmp-delta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; }
.cmp-delta strong { font-size: 28px; line-height: 1.1; }
.cmp-delta.up strong, .cmp-delta-cell.up { color: var(--good); }
.cmp-delta.down strong, .cmp-delta-cell.down { color: var(--bad); }
.cmp-delta.flat strong, .cmp-delta-cell.flat { color: var(--muted); }
.cmp-delta-cell { font-weight: 700; }
.cmp-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.cmp-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px 16px; font-size: 14px; }
.cmp-tile strong { font-size: 20px; margin-right: 4px; }
.cmp-tile.bad { border-left: 4px solid var(--bad); }
.cmp-tile.good { border-left: 4px solid var(--good); }

/* Copilot & AI: one block per check with a status stripe, aligned item rows. */
.ai-check { --c: #C5CBD4; padding: 14px 20px 14px 16px; border-top: 1px solid var(--line); border-left: 4px solid var(--c); display: flex; flex-direction: column; gap: 8px; }
.ai-check.fail { --c: var(--bad); } .ai-check.warning { --c: var(--warn); } .ai-check.pass { --c: var(--good); } .ai-check.error { --c: var(--bad); }
.ai-check-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-check-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-check-m { font-size: 12.5px; }
.ai-items { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; }
.ai-items li { display: grid; grid-template-columns: minmax(110px, 200px) 1fr; gap: 4px 16px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line-2); }
.ai-name { font-weight: 600; word-break: break-word; }
.ai-detail .perm-chips { margin-top: 0; }
@media (max-width: 640px) { .ai-items li { grid-template-columns: 1fr; } }
