/* Tokens copied from the site's src/styles/global.css, plus the portal's neutrals and states. No webfonts: the CSP allows only 'self'. */
:root {
  --bg: #f1f1f5;
  --bg-deep: #e4e4ec;
  --surface: #ffffff;
  --surface-subtle: #f7f7fa;
  --panel: #0000c2;
  --panel-deep: #00009a;
  --panel-fg: #f2f2f8;
  --panel-dim: rgba(242, 242, 248, 0.72);
  --blue: #0000f2;
  --blue-hover: #2020ff;
  --blue-soft: #ebebff;
  --fg: #12122a;
  --fg-dim: #44445e;
  --fg-faint: #62627a;
  --line: rgba(18, 18, 42, 0.1);
  --line-strong: rgba(18, 18, 42, 0.18);
  --ok: #138a52;
  --ok-soft: #e6f4ec;
  --warn: #9a5b00;
  --warn-soft: #fdf3e1;
  --danger: #c22a2a;
  --danger-soft: #fbeaea;
  --font-display: 'Helvetica Neue', Arial, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(18, 18, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(18, 18, 42, 0.08);
  --max: 1040px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
code, .mono { font: 13px var(--font-mono); }
h1, h2, h3 { color: var(--fg); }
h1 { font: 400 30px/1.15 var(--font-display); letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 17px; font-weight: 600; margin: 32px 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
.muted { color: var(--fg-dim); }
.faint { color: var(--fg-faint); font-size: 13px; }
.error { color: var(--danger); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: the brand's blue panel, with GitHub-style tabs. One row at every width: tabs never wrap, and on a phone they scroll sideways. */
.bar { background: var(--panel); color: var(--panel-fg); border-bottom: 1px solid var(--panel-deep); position: relative; z-index: 20; }
.bar-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; height: 56px; }
.wordmark { font: 400 21px var(--font-display); letter-spacing: 0.18em; color: var(--panel-fg); flex: none; }
.wordmark:hover { color: #fff; text-decoration: none; }
.bar nav { display: flex; gap: 2px; align-self: stretch; min-width: 0; flex: none; overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { display: flex; align-items: center; flex: none; white-space: nowrap; padding: 0 12px; color: var(--panel-dim); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; }
.bar nav a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.06); }
.bar nav a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }

/* Account menu: the initial (and the email, where there is room) opens a panel with the full email, Account and Sign out. */
/* The tabs keep their room; a long email gives way first, then hides below 1120px. */
.account-menu { position: relative; flex: 0 1 auto; min-width: 0; margin-left: auto; }
.account-menu > summary { display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 4px 10px 4px 4px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; color: var(--panel-fg); font-size: 13px; }
.account-menu > summary:hover, .account-menu[open] > summary { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.5); }
.account-menu > summary::after { content: '▾'; font-size: 11px; color: var(--panel-dim); }
details.account-menu[open] > summary { margin-bottom: 0; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--panel); font-weight: 700; font-size: 13px; flex: none; }
.account-menu .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: max-content; min-width: 200px; max-width: min(340px, calc(100vw - 32px)); background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
.menu-email { margin: 0; padding: 8px 10px 10px; font-size: 13px; color: var(--fg-dim); border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }
.menu-panel a, .menu-panel button { display: flex; width: 100%; justify-content: flex-start; padding: 7px 10px; border-radius: var(--radius); color: var(--fg); font-size: 14px; font-weight: 500; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-subtle); color: var(--fg); text-decoration: none; }
.menu-panel a[aria-current="page"] { color: var(--blue); }
.menu-panel form { margin: 0; }
/* Below this the tabs need the room: the menu shows just the initial. */
@media (max-width: 1120px) {
  .account-menu { flex: none; }
  .account-menu .who { display: none; }
  .account-menu > summary { padding-right: 8px; }
  .bar nav { flex: 0 1 auto; }
}

main { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 64px; }

/* Page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line-strong); }
.page-head .lead { margin: 6px 0 0; color: var(--fg-dim); max-width: 64ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { display: inline-block; font-size: 13px; margin-bottom: 8px; color: var(--fg-dim); }
.crumb::before { content: '← '; }

/* Buttons: primary is the default, so an unclassed button still looks right. */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 500 14px/20px var(--font-body); padding: 7px 14px; border: 1px solid var(--blue); border-radius: var(--radius);
  background: var(--blue); color: #fff; cursor: pointer; white-space: nowrap; text-decoration: none; box-shadow: var(--shadow);
}
button:hover, .btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; text-decoration: none; }
button:disabled { opacity: 0.55; cursor: default; }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-subtle); color: var(--fg); border-color: rgba(18, 18, 42, 0.3); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 3px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; box-shadow: none; padding: 0; color: var(--blue); font-weight: 500; }
.btn-link:hover { background: none; color: var(--blue-hover); text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { color: var(--danger); background: none; }
form.inline { display: inline; margin: 0; }

/* Forms */
.field { margin: 0 0 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--fg-faint); margin: 6px 0 0; }
input[type=email], input[type=text], input[type=tel], input[type=number], input[type=date], select, textarea {
  font: inherit; width: 100%; max-width: 420px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--fg); box-shadow: inset 0 1px 0 rgba(18, 18, 42, 0.03);
}
textarea { max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 0, 242, 0.15); }
input[type=number] { max-width: 120px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.row .field { margin: 0; flex: 1 1 200px; max-width: 420px; }
.row input { max-width: none; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.org-only { display: none; }
.card:has(input[name=kind][value=org]:checked) .org-only { display: block; }
.card:has(input[name=kind][value=org]:checked) .individual-only { display: none; }

/* A row of named steps (sign-up); wraps on a phone */
.steps-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; list-style: none; padding: 0; margin: 0 0 20px; font-size: 13px; color: var(--fg-faint); }
.steps-strip li { display: inline-flex; align-items: center; gap: 8px; }
.steps-strip li + li::before { content: '→'; color: var(--fg-faint); }
.steps-strip .done { color: var(--ok); }
.steps-strip .current { color: var(--fg); font-weight: 600; }

/* Inline code entry in a table row */
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.code-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.code-form input { width: 130px; padding: 4px 8px; font-size: 14px; }

/* Choice cards (radio pickers) */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; }
.choice:hover { border-color: rgba(0, 0, 242, 0.45); }
.choice:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); background: #fafaff; }
.choice input { margin-top: 3px; accent-color: var(--blue); }
.choice strong { display: block; font-weight: 600; }
.choice span { font-size: 13px; color: var(--fg-dim); }

/* Boxes (GitHub "Box") */
.box { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 24px; overflow: hidden; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface-subtle); border-bottom: 1px solid var(--line); }
.box-head h2, .box-head h3 { margin: 0; font-size: 14px; }
.box-body { padding: 16px; }
.box-body > :last-child { margin-bottom: 0; }
.box-row { padding: 14px 16px; border-top: 1px solid var(--line); }
.box-head + .box-row, .box-row:first-child { border-top: 0; }
.box-row-flex { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.box-foot { padding: 12px 16px; background: var(--surface-subtle); border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-dim); }

/* A finding's own value, under its title */
.finding-value { margin: 4px 0; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); background: var(--surface-subtle); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: #fafafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
td ul { margin: 0; padding-left: 18px; }
td form { margin: 0; }

/* Flash messages */
.flash { padding: 12px 16px; border: 1px solid; border-radius: var(--radius); margin: 0 0 20px; font-size: 14px; }
.flash a { font-weight: 600; }
.flash-info { background: var(--blue-soft); border-color: rgba(0, 0, 242, 0.25); color: #000080; }
.flash-success { background: var(--ok-soft); border-color: rgba(19, 138, 82, 0.3); color: #0c5a35; }
.flash-warn { background: var(--warn-soft); border-color: rgba(154, 91, 0, 0.3); color: #6b3f00; }
.flash-error { background: var(--danger-soft); border-color: rgba(194, 42, 42, 0.3); color: #8f1d1d; }
.safety { border-color: rgba(194, 42, 42, 0.4); }
.safety .box-head { background: var(--danger-soft); }
.safety .box-head h2 { color: #8f1d1d; }
.safety-links { margin: 12px 0 0; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; border: 1px solid var(--line-strong); color: var(--fg-dim); background: var(--surface); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); border-color: rgba(19, 138, 82, 0.35); background: var(--ok-soft); }
.badge-warn { color: var(--warn); border-color: rgba(154, 91, 0, 0.35); background: var(--warn-soft); }
.badge-danger { color: var(--danger); border-color: rgba(194, 42, 42, 0.35); background: var(--danger-soft); }
.badge-info { color: var(--blue); border-color: rgba(0, 0, 242, 0.3); background: var(--blue-soft); }
.badge-plain::before { display: none; }

/* Stats */
/* Each card spans three subgrid rows, so labels, numbers and hints line up across a row even when a label wraps. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 4px; align-content: start; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); }
.stat-value { font: 400 28px/1.2 var(--font-display); align-self: end; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 12px; color: var(--fg-faint); }

/* Empty states */
.blankslate { text-align: center; padding: 40px 24px; }
.blankslate h3 { font-size: 17px; margin-bottom: 6px; }
.blankslate p { color: var(--fg-dim); max-width: 52ch; margin: 0 auto 16px; }

/* Hero callout (dashboard, teaser) */
.callout { background: var(--panel); color: var(--panel-fg); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.callout h2 { color: #fff; margin: 0 0 4px; font: 400 22px/1.25 var(--font-display); }
.callout p { margin: 0; color: var(--panel-dim); max-width: 60ch; }
.callout a:not(.btn) { color: #fff; }
.callout .btn, .callout button { background: #fff; color: var(--panel); border-color: #fff; }
.callout .btn:hover, .callout button:hover { background: var(--blue-soft); color: var(--panel); }
.callout form { margin: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; }

/* Danger zone (disclosure as the confirm step) */
.danger-zone { border-color: rgba(194, 42, 42, 0.45); }
.danger-zone .box-head { background: var(--danger-soft); color: #8f1d1d; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 12px; }

/* Signed-out pages: a centered card */
.auth main { max-width: 440px; padding-top: 56px; }
.auth .wordmark-center { display: block; text-align: center; color: var(--panel); margin-bottom: 20px; font: 400 26px var(--font-display); letter-spacing: 0.2em; }
.auth .card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 28px; }
.auth .card h1 { font-size: 24px; margin-bottom: 8px; }
.auth .card input { max-width: none; }
.auth .below { text-align: center; margin-top: 16px; font-size: 14px; color: var(--fg-dim); }
.assure { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-subtle); border: 1px solid var(--line); font-size: 13px; color: var(--fg-dim); }

@media (max-width: 640px) {
  /* Two rows on a phone: the wordmark and account menu, then the tabs, scrolling sideways with a fade at the edge. */
  .bar-inner { flex-wrap: wrap; height: auto; gap: 0 12px; padding-top: 8px; }
  .bar nav { order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); height: 44px; margin: 0 calc(-1 * var(--gutter)); padding: 0 48px 0 var(--gutter);
    mask-image: linear-gradient(to right, #000 85%, transparent); -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); }
  .account-menu .who { display: none; }
  .account-menu > summary { padding: 3px 8px 3px 3px; }
  h1 { font-size: 25px; }
  .page-head { align-items: flex-start; }
  th, td { padding: 10px 12px; }
}

/* Admin: users */
.box-body > .hint { font-size: 13px; color: var(--fg-faint); margin: 10px 0 0; }
ul.hint { padding-left: 18px; }
ul.hint li { margin: 2px 0; }

/* Welcome steps */
.welcome { max-width: 680px; margin: 0 auto; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.step-count { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); }
.welcome-body h1 { margin-bottom: 8px; }
.welcome-body .lead { color: var(--fg-dim); margin-bottom: 20px; }
.welcome-pairs { display: grid; gap: 12px; margin: 0 0 20px; }
.welcome-pairs div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-subtle); }
.welcome-pairs dt { font-weight: 600; }
.welcome-pairs dd { margin: 2px 0 0; color: var(--fg-dim); }
.welcome-report { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-subtle); margin-bottom: 16px; }
.welcome-report p { margin: 2px 0 0; color: var(--fg-dim); }
.welcome-list { list-style: none; padding: 0; margin: 0 0 16px; }
.welcome-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.welcome-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 16px; }
.welcome-code .code-form { flex-wrap: wrap; }
.welcome-code label { font-weight: 600; font-size: 14px; width: 100%; }
.welcome-start { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.welcome-nav { display: flex; justify-content: space-between; gap: 8px; padding: 12px 16px; background: var(--surface-subtle); border-top: 1px solid var(--line); }

/* Overview journey checklist */
.journey { margin-bottom: 24px; }
.journey-steps { list-style: none; margin: 0; padding: 0; }
.journey-step { display: grid; grid-template-columns: 32px 1fr auto; gap: 4px 12px; align-items: start; padding: 16px 20px; border-top: 1px solid var(--line-strong); }
.journey-step:first-child { border-top: 0; }
.journey-step h3 { margin: 0 0 2px; font-size: 16px; }
.journey-step p { margin: 0; }
.journey-mark { font-size: 18px; line-height: 1.4; text-align: center; }
.journey-detail { font-weight: 600; margin-top: 4px; }
.journey-action form { margin: 0; }
.journey-done .box-body p { margin: 0; }
.journey-upcoming, .journey-skipped { opacity: .75; }
.journey-current { background: var(--blue-soft); }
@media (max-width: 640px) {
  .journey-step { grid-template-columns: 32px 1fr; padding: 14px 16px; }
  .journey-action { grid-column: 2; margin-top: 8px; }
}

/* Free check: what the numbers mean, and how the full report compares */
.terms { display: grid; gap: 12px; margin: 0; }
.terms dt { font-weight: 600; }
.terms dd { margin: 2px 0 0; color: var(--fg-dim); }
.compare-corner { background: var(--surface-subtle); }
.compare th, .compare td { vertical-align: top; }
.compare th[scope="row"] { font-weight: 600; }

/* Terms and privacy links (LegalLinks, AgreeLine in ui/kit.tsx). */
.help-link { font-size: 13px; font-weight: 500; color: var(--blue); text-decoration: none; }
.help-link:hover { text-decoration: underline; }
.help-links { display: flex; gap: 12px; }
.support-line { margin: 16px 0 0; font-size: 13px; }
.legal-links { display: flex; justify-content: center; gap: 16px; margin: 24px 0 0; font-size: 13px; }
.legal-links a, .agree a { color: var(--fg-dim); }
.legal-links a:hover, .agree a:hover { color: var(--fg); }
.agree { margin-top: 12px; font-size: 13px; color: var(--fg-dim); }
.attest { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.attest input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--fg); }
.attest a { color: var(--fg); }

/* Small forms that sit inline in a table cell or list item (Members, Admins on /org). */
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.inline-form select { min-width: 12.5em; }
td .inline-form + .inline-form { margin-left: 10px; }
td.actions form { display: inline; }
td.actions form + form { margin-left: 12px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 16px; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.org-brief ul { margin: 0; padding-left: 18px; min-width: 16rem; }
.org-brief li { margin: 4px 0; }
.box-lead { margin: 0; padding: 12px 16px 0; }
.welcome-sub { font-size: 1.05rem; margin: 28px 0 8px; }

/* A printed or saved-as-PDF report: the report itself, without the portal around it. */
@media print {
  .bar, .report-nav, .legal-links, .help-link, .support-line, .no-print, .danger-zone, .fix-form, .crumb, form, .evidence { display: none !important; }
  body, main { background: #fff; }
  .box { break-inside: avoid; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  details > summary { display: none; }
}
.start-notes { margin: 4px 0 16px; padding-left: 18px; font-size: 0.9rem; color: var(--fg-dim); } .start-notes li { margin: 4px 0; }


/* Evidence page: a readable record of one check, never the raw output. */
.evidence-items { list-style: none; padding: 0; margin: 12px 0 0; }
.evidence-items li { padding: 6px 0; border-top: 1px solid var(--line, rgba(0, 0, 0, 0.08)); overflow-wrap: anywhere; }
.evidence-text { margin-top: 12px; max-height: 70vh; overflow: auto; padding: 12px; border: 1px solid var(--line, rgba(0, 0, 0, 0.08)); border-radius: 6px; font-size: 0.9rem; overflow-wrap: anywhere; }
.evidence-text p { margin: 0 0 6px; }

/* Shared bits that used to live with the report: progress spinner, row labels. */
.progress { display: flex; align-items: center; gap: 12px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--blue-soft); border-top-color: var(--blue); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--fg-faint); margin: 6px 0 0; }
.nowrap { white-space: nowrap; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg-deep); color: var(--fg-dim); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius); background: var(--surface-subtle); border: 1px solid var(--line); color: var(--fg-dim); font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }

/* ---------- Report ---------- */
.report { --nav-h: 46px; }
.report .box { scroll-margin-top: calc(var(--nav-h) + 16px); }
.report [id^="finding-"], .report .fix { scroll-margin-top: calc(var(--nav-h) + 16px); }
.box-lead { margin: 0; padding: 12px 16px 0; font-size: 14px; color: var(--fg-dim); }
.box-lead + .box-row { border-top: 0; }

/* Section links: stuck to the top of the window while reading; they scroll sideways on a phone. */
.report-nav { position: sticky; top: 0; z-index: 10; display: flex; gap: 2px; margin: -8px 0 20px; padding: 6px; height: var(--nav-h);
  background: rgba(241, 241, 245, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; }
.report-nav::-webkit-scrollbar { display: none; }
.report-nav a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 12px; border-radius: var(--radius); color: var(--fg-dim); font-size: 13px; font-weight: 500; white-space: nowrap; }
.report-nav a:hover { background: var(--surface); color: var(--fg); text-decoration: none; }
.report-nav .count { height: 18px; min-width: 18px; font-size: 11px; }

/* Summary: the exposure scale and the counts side by side, the assessment underneath. */
.summary-top { display: grid; grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.6fr); gap: 20px 32px; align-items: start; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.level-label { margin: 0 0 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; margin: 0; padding: 0; }
.level { display: flex; align-items: flex-end; height: 34px; padding: 0 8px 5px; border-top: 4px solid; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-faint); border-radius: 2px; }
.level-low { border-color: rgba(19, 138, 82, 0.35); }
.level-moderate { border-color: rgba(154, 91, 0, 0.35); }
.level-high { border-color: rgba(194, 42, 42, 0.35); }
.level-severe { border-color: rgba(143, 29, 29, 0.45); }
.level-current { font-size: 12px; }
.level-low.level-current { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.level-moderate.level-current { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.level-high.level-current { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.level-severe.level-current { border-color: #8f1d1d; color: #fff; background: var(--danger); }
.level-text { margin: 10px 0 0; font-weight: 600; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 0; }
.glance div { display: flex; flex-direction: column; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-subtle); }
.glance dt { font-size: 12px; color: var(--fg-faint); line-height: 1.3; }
.glance dd { margin: 4px 0 0; font: 400 22px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.summary-prose p { font-size: 16px; line-height: 1.6; max-width: 72ch; }
.summary-prose > :last-child { margin-bottom: 0; }

/* Changes on a recheck */
.changes { list-style: none; padding: 0; margin: 0; }
.changes li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.changes li:first-child { border-top: 0; padding-top: 0; }

/* The analyst's write-up: prose paragraphs, then links to the findings they rest on. */
.narrative p { max-width: 72ch; }
.narrative h3 { font-size: 16px; margin-bottom: 6px; }
.finding-refs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin: 10px 0 0; }

/* What to do: one numbered checklist; the first three are marked as top fixes. */
.fix-progress { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--fg-dim); white-space: nowrap; }
.fix-bar { appearance: none; -webkit-appearance: none; width: 120px; height: 8px; border: 0; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.fix-bar::-webkit-progress-bar { background: var(--bg-deep); border-radius: 999px; }
.fix-bar::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
.fix-bar::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
.fix { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 12px; }
.fix-top { background: linear-gradient(to right, var(--blue) 0 3px, transparent 3px); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 700; }
.fix-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 28px; margin-bottom: 4px; }
.fix-head h3 { margin: 0 4px 0 0; }
.tag-top { background: var(--blue-soft); border-color: rgba(0, 0, 242, 0.25); color: var(--blue); }
.fix-body > p { margin: 0 0 8px; }
.fix-steps { margin: 0 0 12px; padding-left: 20px; }
.fix-steps li { margin: 2px 0; }
.fix-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fix-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.fix-state { font-size: 13px; font-weight: 600; color: var(--ok); }
.fix-done .step-num { background: var(--ok-soft); color: var(--ok); }
.fix-done .guide-title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--fg-dim); }
.fix-done .fix-body > p, .fix-done .fix-steps { opacity: 0.6; }

/* Routes: a numbered stepper, a line joining the steps. */
.chain h3 { font-size: 16px; }
.stepper { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.stepper li { position: relative; counter-increment: step; padding: 0 0 14px 40px; min-height: 28px; }
.stepper li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1.5px solid var(--line-strong); font-size: 12px; font-weight: 700; color: var(--fg-dim); }
.stepper li:not(:last-child)::after { content: ''; position: absolute; left: 12.5px; top: 26px; bottom: 0; width: 1.5px; background: var(--line-strong); }
.stepper li:last-child { padding-bottom: 0; }
.stepper li:last-child::before { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.stepper .evidence { display: flex; margin-top: 4px; }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.path li { display: inline-flex; align-items: center; gap: 6px; }
.path li + li::before { content: '→'; color: var(--fg-faint); }
.chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-subtle); font-size: 13px; overflow-wrap: anywhere; }
.chip small { color: var(--fg-faint); margin-left: 4px; }
.path li:last-child .chip { border-color: rgba(194, 42, 42, 0.4); background: var(--danger-soft); }
.path-label { font-size: 12px; font-weight: 600; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }

/* Findings: a card per detail, then tables for breaches and accounts. */
.group-head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 16px 16px 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-dim); }
.findings-group .group-head { padding: 0 0 8px; }
.group-head + .box-row { border-top: 0; }
.findings-group > p { font-size: 14px; }
.findings-group .table-wrap { margin: 0 -16px -14px; border-top: 1px solid var(--line); }
.finding-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 12px; margin-bottom: 6px; }
.finding-head h3 { margin: 0; font-size: 15px; }
.why-it-matters { margin: 0 0 10px; max-width: 72ch; }
.finding-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--radius); background: var(--surface-subtle); border: 1px solid var(--line); overflow-wrap: anywhere; }
.field-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); }
.finding-detail { font-size: 14px; margin-bottom: 8px; }
.how-we-know { margin: 0 0 8px; }
.how-we-know > summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--blue); }
.how-we-know > summary::before { content: '▸'; font-size: 11px; transition: transform 0.15s; }
.how-we-know[open] > summary::before { transform: rotate(90deg); }
details.how-we-know[open] > summary { margin-bottom: 6px; }
.how-we-know p { font-size: 14px; color: var(--fg-dim); padding-left: 12px; border-left: 2px solid var(--line-strong); max-width: 72ch; }
.paywall { display: inline-block; margin: 0 0 8px; font-size: 13px; padding: 4px 10px; border-radius: var(--radius); background: var(--warn-soft); color: #6b3f00; }
.finding-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--fg-faint); }
.finding-link { color: inherit; text-decoration: none; }
.finding-link:hover, .finding-link:focus-visible { text-decoration: underline; }

/* Evidence: a quiet row of links. */
.evidence { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.evidence-label { color: var(--fg-faint); }
.evidence-links { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.evidence-link { font-weight: 500; white-space: nowrap; }
.evidence-link::before { content: '↗ '; font-size: 11px; }
.finding-foot .evidence { margin-left: auto; }
td .evidence-label { display: none; }
details.evidence-more { display: inline-block; }
.evidence-more > summary { color: var(--blue); font-weight: 500; }
details.evidence-more[open] > summary { margin-bottom: 4px; }

/* How we investigated: coverage as four labelled cells. */
.coverage { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 16px 0 0; }
.coverage:first-child { margin-top: 0; }
.cov { padding: 10px 12px; border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); background: var(--surface-subtle); }
.cov dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-dim); }
.cov dd { margin: 4px 0 0; font-size: 14px; }
.cov-found { border-left-color: var(--danger); }
.cov-clear { border-left-color: var(--ok); }
.cov-blocked { border-left-color: var(--warn); }
.cov-not-covered { border-left-color: var(--line-strong); }

/* Timeline: dates down a line. */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 0 0 14px 18px; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 3.5px; top: 17px; bottom: 0; width: 1px; background: var(--line-strong); }
.tl-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-text .evidence { display: flex; margin-top: 2px; }

.method-line { margin: 12px 0 0; }

@media (max-width: 760px) {
  .summary-top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .report-nav { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; border-left: 0; border-right: 0; }
  .glance { grid-template-columns: repeat(2, 1fr); }
  .glance div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .finding-foot .evidence { margin-left: 0; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .fix { grid-template-columns: 24px minmax(0, 1fr); gap: 0 10px; }
  .step-num { width: 24px; height: 24px; font-size: 12px; }
}

