/* ═══════════════════════════════════════════════════════════════
   cleanthis.io — scanner.css  (2026-10 redesign)
   Webpage Scanner report. The report markup is generated by
   webpage-scanner.js and is ALSO what the server turns into the PDF
   report (reportPdf.js has its own print CSS keyed on the same
   cti-* class names), so the class names stay as they are. This file
   carries the report's original layout rules, re-pointed at the new
   design tokens, followed by the new-look overrides at the bottom.
   ═══════════════════════════════════════════════════════════════ */

/* ── Token bridge: old --cti-* names → new design tokens ───────── */
:root {
  --cti-lime: var(--lime); --cti-lime-2: var(--lime); --cti-sage: var(--lime-ink);
  --cti-teal: var(--teal); --cti-teal-2: var(--teal); --cti-navy: var(--blue); --cti-navy-2: var(--blue);
  --cti-bg: var(--bg); --cti-surface: var(--surf); --cti-ink: var(--ink); --cti-ink-2: var(--ink2);
  --cti-text: var(--ink); --cti-muted: var(--muted); --cti-line: var(--line); --cti-line-2: var(--frame);
  --cti-error: var(--red); --cti-error-bg: var(--red-bg);
  --cti-radius: var(--radius-win); --cti-radius-sm: var(--radius-ctl); --cti-radius-pill: var(--radius-pill);
  --cti-font: var(--font-body);
  --cti-shadow-sm: none; --cti-shadow-md: var(--soft-win); --cti-shadow-lg: var(--soft-win);
}

/* ═══ Original report rules (from the pre-redesign style.css) ═══ */
/* ── Buttons ────────────────────────────────────────────── */
.cti-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--cti-radius-pill);
  border: 1.5px solid transparent;
  padding: 10px 18px;
  font-weight: 600; font-size: 14.5px; letter-spacing: -0.005em;
  background: transparent; color: var(--cti-ink);
  text-decoration: none;
  transition: transform .12s ease, background .2s ease, border-color .2s, color .2s, box-shadow .2s;
}
.cti-btn:active { transform: translateY(1px); }

.cti-btn--ghost { border-color: var(--cti-teal); color: var(--cti-teal); }
.cti-btn--ghost:hover { background: rgba(63,168,155,0.08); }

.cti-btn--nav {
  height: 32px; padding: 0 14px;
  font-size: 13px; font-weight: 600;
  border-color: var(--cti-line-2); color: var(--cti-ink-2);
}
.cti-btn--nav:hover { border-color: var(--cti-teal); color: var(--cti-teal); }

.cti-btn--primary { background: var(--cti-lime); color: #0F1419; border-color: var(--cti-lime); }
.cti-btn--primary:hover { background: var(--cti-lime-2); box-shadow: 0 8px 24px rgba(168,216,92,0.45); }
.cti-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
:root[data-theme="dark"] .cti-btn--primary { color: #0F1419; }

.cti-btn--big { padding: 16px 28px; font-size: 16px; width: 100%; margin-top: 18px; }
.cti-btn--sm { padding: 8px 14px; font-size: 13px; }

.cti-btn--preview { background: var(--cti-teal); color: #FFFFFF; border-color: var(--cti-teal); margin-top: 10px; }
.cti-btn--preview:hover { background: #36968B; border-color: #36968B; box-shadow: 0 8px 24px rgba(63,168,155,0.35); }
.cti-btn--preview:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.cti-btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

.cti-link-btn {
  background: transparent; border: 0; color: var(--cti-teal);
  font-weight: 600; font-size: 14px; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
.cti-link-btn:hover { color: var(--cti-sage); }

/* dark overrides */
:root[data-theme="dark"] .cti-btn--ghost { color: var(--cti-ink); border-color: var(--cti-line-2); }
:root[data-theme="dark"] .cti-btn--ghost:hover { background: var(--cti-surface); }
:root[data-theme="dark"] .cti-btn--nav { color: var(--cti-ink-2); border-color: var(--cti-line-2); }
:root[data-theme="dark"] .cti-btn--nav:hover { color: var(--cti-teal); border-color: var(--cti-teal); }


/* ── Progress ───────────────────────────────────────────── */
.cti-progress { padding: 18px 0 0; }
.cti-progress-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.cti-progress-label { font-weight: 600; font-size: 15px; }
.cti-progress-pct {
  font-variant-numeric: tabular-nums; font-weight: 700;
  color: var(--cti-teal); font-size: 16px;
}
.cti-progress-track {
  height: 8px; background: var(--cti-line);
  border-radius: var(--cti-radius-pill); overflow: hidden;
}
.cti-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cti-lime), var(--cti-teal));
  border-radius: var(--cti-radius-pill); transition: width .5s ease;
}
.cti-progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 13.5px; color: var(--cti-muted);
}
.cti-cancel {
  background: transparent; border: 0; color: var(--cti-muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.cti-cancel:hover { color: var(--cti-ink); }


/* ── Results (separate, wider box below the input) ───────── */
.cti-results-section { margin-top: 4px; }
/* The simulated scan progress bar (reuses .cti-progress) sits in the pending
   result box — trim the file-scanner's top padding so it's centred. */
.cti-scan-progress { padding: 4px 0 2px; }
/* File / download-URL note — a compact, non-blocking banner that sits ABOVE the
   result box when a file URL is entered. The scan proceeds and renders normally
   below it; this only points the user at the File Scanner. */
.cti-file-note[hidden] { display: none; } /* author display:flex below would otherwise override the [hidden] attribute (same specificity, later in source) */
.cti-file-note {
  display: flex; align-items: flex-start; gap: 10px;
  max-width: 1040px; margin: 0 auto 12px;
  padding: 12px 16px;
  border: 1px solid var(--cti-teal);
  background: rgba(63,168,155,0.08);
  border-radius: var(--cti-radius-sm);
  font-size: 14.5px; line-height: 1.5; color: var(--cti-ink-2);
}
:root[data-theme="dark"] .cti-file-note { background: rgba(79,191,176,0.10); }
.cti-file-note-icon { font-size: 18px; line-height: 1.4; flex: 0 0 auto; }
.cti-file-note a { color: var(--cti-teal); font-weight: 600; white-space: nowrap; }
.cti-file-note a:hover { text-decoration: underline; }
.cti-scanner-result {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 18px;
  background: var(--cti-bg);
  border: 1px dashed var(--cti-line-2);
  border-radius: var(--cti-radius-sm);
  color: var(--cti-ink-2);
  font-size: 15px;
  line-height: 1.5;
}
.cti-scanner-result p { margin: 0 0 8px; }
.cti-scanner-result p:last-child { margin-bottom: 0; }
.cti-scanner-result pre {
  background: var(--cti-surface);
  border: 1px solid var(--cti-line);
  border-radius: var(--cti-radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--cti-ink);
  overflow-x: auto;
  margin: 8px 0 0;
}
.cti-scanner-result code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--cti-surface);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--cti-line);
}
.cti-scanner-result-empty { color: var(--cti-muted); font-style: italic; }
.cti-scanner-result--error { border-style: solid; border-color: var(--cti-error); background: var(--cti-error-bg); }
.cti-scanner-result--ok    { border-style: solid; border-color: var(--cti-sage); }
.cti-scanner-result--info  { border-style: solid; border-color: var(--cti-teal); }
.cti-scanner-result--pending { border-style: solid; border-color: var(--cti-line-2); }

.cti-scanner-footnote {
  max-width: 720px;
  margin: 18px auto 16px;
  text-align: center;
  color: var(--cti-muted);
  font-size: 14px;
  line-height: 1.6;
}
.cti-scanner-footnote a { color: var(--cti-teal); text-decoration: none; font-weight: 600; }
.cti-scanner-footnote a:hover { text-decoration: underline; }

/* ── Result cards (verdict card + full-breakdown card) ──── */
.cti-result-card {
  background: var(--cti-surface);
  border: 1px solid var(--cti-line);
  border-radius: var(--cti-radius);
  box-shadow: var(--cti-shadow-sm);
  padding: 22px 24px;
}
/* The breakdown lives in its own card — the summary is a self-contained
   button (its own border/padding), so no inline-section spacing needed. */
.cti-detail-card .cti-detail { margin-top: 0; }

/* Two side-by-side actions under the verdict. */
.cti-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 4px;
}
/* Secondary action button (e.g. Download PDF) — teal outline, fills on hover. */
.cti-btn--ghost { border-color: var(--cti-teal); color: var(--cti-teal); background: transparent; }
.cti-btn--ghost:hover { background: var(--cti-teal); color: #fff; border-color: var(--cti-teal); }
:root[data-theme="dark"] .cti-btn--ghost { border-color: var(--cti-teal); color: var(--cti-teal); }
:root[data-theme="dark"] .cti-btn--ghost:hover { background: var(--cti-teal); color: #0F1419; border-color: var(--cti-teal); }
.cti-btn--sm { padding: 8px 16px; font-size: 13.5px; }

/* ── "Report this result" inline panel ──────────────────────────────────
   A lightweight feedback form toggled under the result actions: radio choice
   (too harsh / dangerous / other) + optional note → POST /api/report-scan. */
.cti-report-panel {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--cti-line, #e5e7eb);
  border-radius: 12px;
  background: var(--cti-surface, #fff);
}
.cti-report-panel-q { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; color: var(--cti-ink); }
.cti-report-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cti-report-opt {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; line-height: 1.4; cursor: pointer; color: var(--cti-ink);
}
.cti-report-opt input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--cti-teal); }
.cti-report-opt b { font-weight: 700; }
.cti-report-note {
  width: 100%; box-sizing: border-box; resize: vertical;
  padding: 9px 11px; font: inherit; font-size: 13.5px;
  border: 1px solid var(--cti-line, #e5e7eb); border-radius: 9px;
  background: var(--cti-bg, #fff); color: var(--cti-ink); margin-bottom: 10px;
}
.cti-report-note:focus { outline: none; border-color: var(--cti-teal); }
.cti-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cti-report-msg { font-size: 13px; color: var(--cti-muted, #5C6770); }
.cti-report-msg--err { color: var(--cti-error, #DC2626); }
.cti-report-thanks { font-size: 14.5px; font-weight: 600; color: var(--cti-teal); padding: 4px 0; }
:root[data-theme="dark"] .cti-report-panel { background: var(--cti-surface); border-color: var(--cti-line-2); }
:root[data-theme="dark"] .cti-report-note { background: var(--cti-bg); border-color: var(--cti-line-2); }

/* Height-capped, internally-scrolling container for long host / third-party
   lists that are expanded by default. */
.cti-scroll-cap {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid var(--cti-line);
  border-radius: var(--cti-radius-sm);
  background: var(--cti-bg);
}
.cti-scroll-cap .cti-tp-list { margin-top: 0; }

/* ── Inline text-highlight tokens (backlog #7) ──────────── */
.cti-hl-num { font-weight: 700; color: var(--cti-teal-2); }
.cti-hl-host {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--cti-teal-2);
  word-break: break-all;
}
.cti-hl-brand { font-weight: 700; color: var(--cti-teal-2); }
.cti-hl-threat {
  font-family: var(--font-mono);
  color: var(--cti-error);
  font-weight: 600;
}
/* Listed-finding tags are threat literals (miner signatures, blocklist
   categories) — danger-tinted monospace chips. */
.cti-finding-tags--threat span {
  font-family: var(--font-mono);
  color: var(--cti-error);
  border-color: var(--cti-error);
}

/* ── AI prompt-injection quoted evidence (#12a) ─────────── */
.cti-inject-quotes { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cti-inject-item {
  border-left: 3px solid var(--cti-error);
  background: var(--cti-error-bg);
  border-radius: var(--cti-radius-sm);
  padding: 8px 12px;
}
.cti-inject-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 5px; }
.cti-inject-pattern { font-size: 11px; font-weight: 700; color: var(--cti-error); text-transform: uppercase; letter-spacing: 0.03em; }
.cti-inject-where { font-size: 11px; color: var(--cti-muted); }
.cti-inject-text {
  margin: 0; padding: 0; border: 0;
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.5; color: var(--cti-ink-2);
  word-break: break-word; white-space: pre-wrap;
}
.cti-inject-hit { background: rgba(231,76,60,0.18); color: var(--cti-error); font-weight: 700; padding: 0 2px; border-radius: 3px; }
.cti-inject-kind {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--cti-ink); background: var(--cti-surface-2, rgba(0,0,0,0.05));
  border: 1px solid var(--cti-border); border-radius: 999px; padding: 1px 8px;
}
.cti-inject-more { margin-top: 6px; }
.cti-inject-more > summary { cursor: pointer; font-size: 11px; color: var(--cti-muted); user-select: none; }
.cti-inject-more > summary:hover { color: var(--cti-ink); }
.cti-inject-more .cti-inject-text { margin-top: 6px; }

@media (max-width: 720px) {
  .cti-scanner { padding: 20px 18px; }
  .cti-scanner-row { flex-direction: column; }
  .cti-scanner-btn { width: 100%; padding: 14px 16px; }
  .cti-result-card { padding: 18px 16px; }
  .cti-result-actions .cti-btn { flex: 1 1 auto; }
}

/* ── Scan-result verdict states ──────────────────────────
   A full result is two stacked cards (verdict + breakdown), so the outer
   panel becomes a transparent flex column — the cards carry the surface. The
   transient pending/error/info states keep the simple bordered box above. */
.cti-scanner-result--clean,
.cti-scanner-result--clean-caution,
.cti-scanner-result--suspicious,
.cti-scanner-result--malicious,
.cti-scanner-result--unreachable,
.cti-scanner-result--unknown {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Verdict block (top of result panel) ─────────────────── */
.cti-verdict { margin-bottom: 18px; }
.cti-verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px 11px 16px;
  border-radius: var(--cti-radius-pill);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.15;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 6px rgba(15, 20, 25, 0.10);
}
.cti-verdict-label { text-transform: uppercase; letter-spacing: 0.035em; }
.cti-verdict-badge .cti-verdict-icon { transform: scale(1.1); }
.cti-verdict-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255,255,255,0.35);
}
.cti-verdict-badge--clean       { background: #DCFCE7; color: #14532D; border-color: #4ADE80; }
/* Clean verdict but the Legitimacy score is red ("no known threats — but
   scam-like signs"): amber like suspicious — the label carries the nuance,
   the tone carries the caution. */
.cti-verdict-badge--clean-caution { background: #FEF3C7; color: #78350F; border-color: #FBBF24; }
.cti-verdict-badge--suspicious  { background: #FEF3C7; color: #78350F; border-color: #FBBF24; }
.cti-verdict-badge--malicious   { background: #FEE2E2; color: #7F1D1D; border-color: #F87171; }
.cti-verdict-badge--unknown     { background: var(--cti-line); color: var(--cti-ink-2); border-color: var(--cti-line-2); }
/* Unreachable: we couldn't load the page itself — a neutral "incomplete", not a
   clean bill. Slate tone keeps it distinct from both the green clean badge and
   the amber/red threat badges. */
.cti-verdict-badge--unreachable { background: #E2E8F0; color: #334155; border-color: #CBD5E1; }
:root[data-theme="dark"] .cti-verdict-badge--clean       { background: #052e16; color: #BBF7D0; border-color: #16a34a; }
:root[data-theme="dark"] .cti-verdict-badge--clean-caution { background: #451a03; color: #FDE68A; border-color: #b45309; }
:root[data-theme="dark"] .cti-verdict-badge--suspicious  { background: #451a03; color: #FDE68A; border-color: #b45309; }
:root[data-theme="dark"] .cti-verdict-badge--malicious   { background: #450a0a; color: #FECACA; border-color: #dc2626; }
:root[data-theme="dark"] .cti-verdict-badge--unknown     { background: var(--cti-line-2); color: var(--cti-ink-2); border-color: var(--cti-line-2); }
:root[data-theme="dark"] .cti-verdict-badge--unreachable { background: #1e293b; color: #cbd5e1; border-color: #334155; }

/* Verdict badge + site-category chip sit on one wrapping row. */
.cti-verdict-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
/* Site-category chip — content category (adult/gambling/news/…), a separate
   axis from the safety verdict. Outlined + smaller than the verdict badge so
   it reads as a secondary tag, colour-coded by sensitivity. */
.cti-cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--cti-radius-pill);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.cti-cat-chip--restricted { background: #FEF3C7; color: #92400E; border-color: #F59E0B; }
.cti-cat-chip--neutral    { background: rgba(63,168,155,0.12); color: var(--cti-teal-2); border-color: var(--cti-teal); }
.cti-cat-chip--none       { background: transparent; color: var(--cti-muted); border-color: var(--cti-line-2); }
:root[data-theme="dark"] .cti-cat-chip--restricted { background: #451a03; color: #FDE68A; border-color: #B45309; }
:root[data-theme="dark"] .cti-cat-chip--neutral    { background: rgba(79,191,176,0.16); color: var(--cti-teal-2); border-color: var(--cti-teal); }

/* ── Scam Radar — brand-clone / impersonation lens ──────────────────────
   Chip on the verdict-badges row (at-a-glance) + a dedicated card. Tinted by
   impersonation severity: danger = likely phishing clone (escalates verdict),
   warn = impersonation caution (does not flip the verdict). */
.cti-scam-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--cti-radius-pill);
  font-size: 13px; font-weight: 700; border: 1px solid; white-space: nowrap;
}
.cti-scam-chip::before { content: "⚠"; }
.cti-scam-chip--danger::before { content: "✕"; }
.cti-scam-chip--danger { background: #FEE2E2; color: #7F1D1D; border-color: #DC2626; }
.cti-scam-chip--warn   { background: #FEF3C7; color: #78350F; border-color: #F59E0B; }
:root[data-theme="dark"] .cti-scam-chip--danger { background: #450a0a; color: #fecaca; border-color: #b91c1c; }
:root[data-theme="dark"] .cti-scam-chip--warn   { background: #451a03; color: #FDE68A; border-color: #B45309; }

.cti-scam-lens {
  margin: 16px 0; padding: 16px 18px;
  border-radius: var(--cti-radius); border: 1px solid; border-left-width: 4px;
}
.cti-scam-lens--danger { background: rgba(220,38,38,0.06); border-color: #DC2626; }
.cti-scam-lens--warn   { background: rgba(245,158,11,0.07); border-color: #F59E0B; }
.cti-scam-head { display: flex; align-items: flex-start; gap: 12px; }
.cti-scam-icon {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.cti-scam-lens--danger .cti-scam-icon { background: #FEE2E2; color: #7F1D1D; }
.cti-scam-lens--warn   .cti-scam-icon { background: #FEF3C7; color: #78350F; }
.cti-scam-headtext { min-width: 0; }
.cti-scam-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--cti-ink); }
.cti-scam-tag {
  margin: 2px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--cti-muted);
}
.cti-scam-domains { margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.cti-scam-dom-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.cti-scam-dom-label { flex: none; min-width: 120px; font-size: 12px; font-weight: 600; color: var(--cti-muted); }
.cti-scam-dom { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.cti-scam-dom--bad  { color: #B91C1C; font-weight: 700; }
.cti-scam-dom--good { color: var(--cti-teal-2); }
:root[data-theme="dark"] .cti-scam-dom--bad { color: #fca5a5; }
.cti-scam-why { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--cti-ink); }
.cti-scam-reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.cti-scam-reason { position: relative; padding-left: 20px; font-size: 14px; color: var(--cti-ink); line-height: 1.45; }
.cti-scam-reason::before { content: "•"; position: absolute; left: 5px; color: var(--cti-muted); font-weight: 700; }
.cti-scam-reason--anchor::before    { content: "●"; left: 4px; color: #B91C1C; }
.cti-scam-reason--amplifier::before { content: "▲"; left: 4px; color: #B91C1C; }
.cti-scam-advice { margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--cti-ink); }

/* Scoped under .cti-verdict so this beats the generic `.cti-scanner-result p`
   margin (0 0 8px) on specificity — otherwise the spacing never applied. */
.cti-verdict .cti-verdict-summary {
  /* A clear empty line above (separating it from the score wheels) and below
     (before the URL/meta line) so the flag reason stands on its own. */
  margin: 34px 0 30px;
  color: var(--cti-ink);
  font-size: 15px;
}
.cti-verdict-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cti-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.cti-verdict-meta > span:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--cti-bg);
  border: 1px solid var(--cti-line);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--cti-ink-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Safety scores (three independent 0–100 sub-scores) ─────────── */
.cti-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 2px;
}
.cti-score { text-align: center; }
.cti-score--none { opacity: 0.78; }
.cti-score-ringwrap { line-height: 0; }
/* Bot-protection-wall "not measured" state: a muted ring with an amber "!" badge
   (baked into the ring SVG, so it renders in the PDF too) — the number doesn't
   reflect the real site. */
.cti-score--blocked { opacity: 0.85; }
.cti-score--blocked .cti-score-driver { color: var(--cti-ink-2); }
.cti-scores-blocked-note {
  margin: 6px 0 2px; font-size: 12px;
  color: #b45309; text-align: center;
}
.cti-ring { width: 88px; height: 88px; display: inline-block; }
/* Theme-aware track (overrides the baked light-grey attribute on screen). */
.cti-ring-track { stroke: var(--cti-line); }
/* Very faint band-coloured glow behind the arc — SCREEN ONLY (the PDF stylesheet
   doesn't define it, so print stays crisp). Kept low-alpha so it reads as polish. */
.cti-ring-arc { transition: stroke-dasharray .4s ease; }
.cti-score--green .cti-ring-arc { filter: drop-shadow(0 0 3px rgba(63, 168, 155, 0.45)); }
.cti-score--amber .cti-ring-arc { filter: drop-shadow(0 0 3px rgba(217, 119, 6, 0.45)); }
.cti-score--red   .cti-ring-arc { filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.5)); }
.cti-score-name { font-size: 13px; font-weight: 800; color: var(--cti-ink); margin-top: 2px; }
.cti-score-driver { font-size: 11.5px; color: var(--cti-ink-2); line-height: 1.35; margin-top: 2px; }
.cti-score-cov { color: var(--cti-muted); }
@media (max-width: 560px) {
  .cti-scores { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cti-ring { width: 72px; height: 72px; }
  .cti-score-name { font-size: 12px; }
  .cti-score-driver { font-size: 10.5px; }
}
.cti-scanner-cached { color: var(--cti-muted); }
.cti-scanner-fresh  { color: var(--cti-teal); font-weight: 600; }
.cti-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--cti-teal);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.cti-link-btn:hover { color: var(--cti-teal-2); }

/* ── Findings list ─────────────────────────────────────── */
.cti-findings {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  border-top: 1px solid var(--cti-line);
}
.cti-finding {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cti-line);
}
.cti-finding-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: var(--cti-bg);
  border: 1px solid var(--cti-line);
  color: var(--cti-muted);
  line-height: 1;
}
.cti-finding--clean .cti-finding-icon  { background: #DCFCE7; color: #14532D; border-color: #BBF7D0; }
.cti-finding--listed .cti-finding-icon { background: #FEE2E2; color: #7F1D1D; border-color: #FECACA; }
.cti-finding--error  .cti-finding-icon { background: #FEF3C7; color: #78350F; border-color: #FDE68A; }
.cti-finding--notice .cti-finding-icon { background: #DBEAFE; color: #1E3A8A; border-color: #BFDBFE; font-style: italic; }
.cti-finding--sev-medium.cti-finding--listed .cti-finding-icon { background: #FEF3C7; color: #78350F; border-color: #FDE68A; }
:root[data-theme="dark"] .cti-finding--notice .cti-finding-icon { background: #172554; color: #BFDBFE; border-color: #1E3A8A; }
:root[data-theme="dark"] .cti-finding--clean .cti-finding-icon  { background: #052e16; color: #BBF7D0; border-color: #14532D; }
:root[data-theme="dark"] .cti-finding--listed .cti-finding-icon { background: #450a0a; color: #FECACA; border-color: #7F1D1D; }
:root[data-theme="dark"] .cti-finding--error  .cti-finding-icon { background: #451a03; color: #FDE68A; border-color: #78350F; }
:root[data-theme="dark"] .cti-finding--sev-medium.cti-finding--listed .cti-finding-icon { background: #451a03; color: #FDE68A; border-color: #78350F; }

.cti-finding-body { min-width: 0; flex: 1 1 auto; }
.cti-finding-source {
  font-size: 15px;
  font-weight: 800;
  color: var(--cti-ink);
}
.cti-finding-result {
  margin-top: 2px;
  font-size: 14px;
  color: var(--cti-ink-2);
}
.cti-finding-sev {
  color: var(--cti-muted);
  font-weight: 500;
}
.cti-finding-note {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--cti-muted);
}
.cti-finding-tags {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cti-finding-tags span {
  font-size: 11px;
  background: var(--cti-bg);
  border: 1px solid var(--cti-line);
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--cti-muted);
}
/* Clickable CVE / advisory chips (analyzer #9 — CVE → NVD, info[] → advisory) */
.cti-finding-tags a.cti-cve-link {
  font-size: 11px;
  background: var(--cti-bg);
  border: 1px solid var(--cti-line);
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--cti-teal);
  text-decoration: none;
}
.cti-finding-tags a.cti-cve-link:hover {
  text-decoration: underline;
  border-color: var(--cti-teal);
}
.cti-cve-advisory { font-style: italic; }
.cti-finding-ref {
  margin-top: 4px;
  font-size: 13px;
}
.cti-finding-ref a {
  color: var(--cti-teal);
  text-decoration: none;
}
.cti-finding-ref a:hover { text-decoration: underline; }

/* Named-tracker list (Webpage Scanner analyzer #5) */
.cti-tracker-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cti-tracker-row {
  padding: 7px 10px;
  background: var(--cti-bg);
  border: 1px solid var(--cti-line);
  border-radius: 8px;
}
.cti-tracker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.cti-tracker-name { font-weight: 600; font-size: 13px; }
.cti-tracker-domain { font-size: 12px; color: var(--cti-muted); }
.cti-tracker-uncat {
  margin-top: 4px;
  font-size: 11px;
  font-style: italic;
  color: var(--cti-muted);
}
/* Sub-section label inside the merged "Page behaviour" card (Aggressive) —
   separates the third-party-company list from the full host inventory. */
.cti-deton-sub {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cti-ink);
}
/* Muted one-line caption under a page-behaviour section heading, so the
   "third-party companies" vs "every host" lists read as clearly distinct. */
.cti-deton-cap {
  margin: 1px 0 4px;
  font-size: 11.5px;
  color: var(--cti-muted);
  line-height: 1.4;
}
/* "third-party" badge on a behavioural actor row (#13/#15) — amber so an
   outside script doing the fingerprinting / recording catches the eye. */
.cti-actor-tp {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fdeede;
  border: 1px solid #f3c98a;
  color: #9a5a00;
}
:root[data-theme="dark"] .cti-actor-tp { background: #3a2811; border-color: #6e4a1d; color: #f3cf99; }

/* Expandable "what this gathers" explainer for behavioural findings (#13-#16,
   backlog #22). Curated education copy only — never the captured fingerprint
   values. Reused in both the report and the graph layer rows. */
.cti-explainer {
  margin-top: 10px;
  border: 1px solid var(--cti-line);
  border-radius: 8px;
  background: var(--cti-bg);
}
.cti-explainer > summary {
  cursor: pointer;
  list-style: none;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cti-teal);
  user-select: none;
}
.cti-explainer > summary::-webkit-details-marker { display: none; }
.cti-explainer > summary::before {
  content: "▸ ";
  display: inline-block;
  color: var(--cti-muted);
  transition: transform 0.12s ease;
}
.cti-explainer[open] > summary::before { content: "▾ "; }
.cti-explainer-list {
  margin: 0;
  padding: 2px 16px 10px 28px;
  list-style: disc;
}
.cti-explainer-list li {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--cti-muted);
  margin-top: 6px;
}
.cti-explainer-list li strong { color: var(--cti-ink); font-weight: 700; }

/* Vulnerable-library severity chip (analyzer #9). Notice-tier finding, so
   these stay informational-looking — they describe the library's worst known
   issue without implying the page itself is malicious. */
.cti-lib-sev {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--cti-line);
  color: var(--cti-muted);
}
.cti-lib-sev--critical { background: #fde7e7; border-color: #f5b5b5; color: #9b1c1c; }
.cti-lib-sev--high     { background: #fdeede; border-color: #f3c98a; color: #9a5a00; }
.cti-lib-sev--medium   { background: #fdf6dd; border-color: #ecd98a; color: #82670a; }
.cti-lib-sev--low      { background: #eef2f7; border-color: #d4dde7; color: #4b5563; }
:root[data-theme="dark"] .cti-lib-sev--critical { background: #3a1414; border-color: #6e2525; color: #f3b4b4; }
:root[data-theme="dark"] .cti-lib-sev--high     { background: #3a2811; border-color: #6e4a1d; color: #f3cf99; }
:root[data-theme="dark"] .cti-lib-sev--medium   { background: #332e10; border-color: #5e561c; color: #ecdc93; }
:root[data-theme="dark"] .cti-lib-sev--low      { background: #20262e; border-color: #39434f; color: #c0c9d4; }

/* ── Slice C: report layout (highlights + collapsed detail) ───────── */
.cti-section-title {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cti-muted);
}
.cti-highlights { margin-bottom: 4px; }
.cti-highlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cti-highlight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--cti-line);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--cti-bg);
}
.cti-highlight--danger { border-left-color: #DC2626; }
.cti-highlight--warn   { border-left-color: #F59E0B; }
.cti-highlight--info   { border-left-color: #2563EB; }
.cti-highlight-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.cti-highlight--danger .cti-highlight-icon { background: #FEE2E2; color: #7F1D1D; }
.cti-highlight--warn   .cti-highlight-icon { background: #FEF3C7; color: #78350F; }
.cti-highlight--info   .cti-highlight-icon { background: #DBEAFE; color: #1E3A8A; }
:root[data-theme="dark"] .cti-highlight--danger .cti-highlight-icon { background: #450a0a; color: #FECACA; }
:root[data-theme="dark"] .cti-highlight--warn   .cti-highlight-icon { background: #451a03; color: #FDE68A; }
:root[data-theme="dark"] .cti-highlight--info   .cti-highlight-icon { background: #172554; color: #BFDBFE; }
.cti-highlight-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.cti-highlight-label { font-size: 14px; font-weight: 700; color: var(--cti-ink); }
.cti-highlight-src { font-size: 12px; color: var(--cti-muted); }
.cti-highlight-sev { font-size: 11px; color: var(--cti-muted); text-transform: lowercase; }

.cti-highlights-clear {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #14532D;
}
:root[data-theme="dark"] .cti-highlights-clear { color: #BBF7D0; }
.cti-highlights-clear .cti-finding-icon { width: 22px; height: 22px; }
.cti-highlights-clear--unknown { color: var(--cti-ink-2); font-weight: 500; }
:root[data-theme="dark"] .cti-highlights-clear--unknown { color: var(--cti-ink-2); }

/* Collapsed full-detail section */
.cti-detail { margin-top: 14px; }
.cti-detail-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cti-teal);
  border: 1px solid var(--cti-teal);
  border-radius: 10px;
  background: color-mix(in srgb, var(--cti-teal) 7%, transparent);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cti-detail-summary::-webkit-details-marker { display: none; }
.cti-detail-summary:hover {
  color: var(--cti-teal-2);
  background: color-mix(in srgb, var(--cti-teal) 13%, transparent);
  border-color: var(--cti-teal-2);
}
.cti-detail[open] > .cti-detail-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
/* Swap the show/hide verb on open. */
.cti-detail-verb--hide { display: none; }
.cti-detail[open] > .cti-detail-summary .cti-detail-verb--show { display: none; }
.cti-detail[open] > .cti-detail-summary .cti-detail-verb--hide { display: inline; }
.cti-detail-clean { color: var(--cti-muted); font-weight: 500; }
.cti-detail-chevron { margin-left: auto; font-size: 15px; transition: transform 0.15s ease; }
.cti-detail[open] .cti-detail-chevron { transform: rotate(180deg); }
.cti-detail-body {
  border: 1px solid var(--cti-teal);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 4px 14px 8px;
}
.cti-group-title {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cti-muted);
}
.cti-group-title + .cti-findings { margin-top: 6px; }

/* Redirect hops (analyzer #8) */
.cti-hop-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cti-hop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--cti-ink-2);
}
.cti-hop-host {
  background: var(--cti-bg);
  border: 1px solid var(--cti-line);
  border-radius: 6px;
  padding: 1px 7px;
  word-break: break-all;
}
.cti-hop-arrow { color: var(--cti-muted); }
.cti-hop-status { color: var(--cti-muted); font-size: 11px; }

/* Third-party connection list (analyzer #6) */
.cti-tp-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cti-tp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 12px;
}
.cti-tp-domain {
  font-family: var(--font-mono);
  color: var(--cti-teal-2);
  word-break: break-all;
}
.cti-tp-count { color: var(--cti-muted); }
.cti-tp-types { color: var(--cti-muted); font-size: 11px; font-style: italic; }
.cti-tp-more { margin-top: 6px; }
.cti-tp-more > summary { cursor: pointer; font-size: 12px; color: var(--cti-teal); }
.cti-tp-more > summary:hover { color: var(--cti-teal-2); }
.cti-tp-list--rest { margin-top: 6px; }

/* Aggressive-tier page screenshot */
.cti-shot {
  margin: 16px 0 4px;
}
/* The frame wraps just the image so the reveal overlay aligns to it (not the
   caption), and overflow:hidden clips the scaled blur cleanly at the edges. */
.cti-shot-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.cti-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--cti-line-2);
  border-radius: 8px;
  background: #fff;
}
.cti-shot figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--cti-muted);
}

/* Cloaking card (#17 dual-pass) — the side-by-side "visitor view vs bot view".
   Tinted by severity (high = danger, medium = warn). */
.cti-cloak-card {
  margin: 16px 0 4px;
  padding: 16px;
  border: 1px solid var(--cti-line-2);
  border-radius: 12px;
  border-left: 4px solid var(--cti-error);
  background: color-mix(in srgb, var(--cti-error) 6%, var(--cti-surface));
}
.cti-cloak-card--medium {
  border-left-color: #D97706;
  background: color-mix(in srgb, #D97706 6%, var(--cti-surface));
}
/* Source-axis (ad/device-varies) warning — informational blue, not an alarm. */
.cti-cloak-card--notice {
  border-left-color: #2563EB;
  background: color-mix(in srgb, #2563EB 5%, var(--cti-surface));
}
.cti-cloak-head { display: flex; align-items: center; gap: 8px; }
.cti-cloak-icon { font-size: 18px; line-height: 1; }
.cti-cloak-title { font-weight: 800; font-size: 15px; color: var(--cti-ink); }
.cti-cloak-note { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--cti-ink-2); }
.cti-cloak-shots {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cti-cloak-shot { margin: 0; }
.cti-cloak-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--cti-line-2);
  border-radius: 8px;
  background: #fff;
}
.cti-cloak-shot figcaption {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cti-muted);
  text-align: center;
}
@media (max-width: 560px) { .cti-cloak-shots { grid-template-columns: 1fr; } }

/* Adult-site screenshot: blurred behind a click-to-reveal overlay. The overlay
   button always covers the image (so a click toggles --nsfw both ways); only
   when --nsfw is it visibly tinted + captioned. Revealed = clean image with a
   transparent click target (subtle hover veil hints it re-blurs, no text). */
.cti-shot--nsfw .cti-shot-frame img {
  filter: blur(14px);
  transform: scale(1.08); /* hide the soft blurred edges under overflow:hidden */
}
.cti-shot-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  color: #fff;
  text-align: center;
}
.cti-shot--nsfw .cti-shot-reveal { background: rgba(15, 20, 25, 0.55); }
.cti-shot:not(.cti-shot--nsfw) .cti-shot-reveal:hover { background: rgba(15, 20, 25, 0.14); }
.cti-shot--nsfw .cti-shot-reveal:hover { background: rgba(15, 20, 25, 0.42); }
.cti-shot-reveal-title,
.cti-shot-reveal-cta { display: none; }
.cti-shot--nsfw .cti-shot-reveal-title { display: block; font-weight: 700; font-size: 15px; letter-spacing: 0.01em; }
.cti-shot--nsfw .cti-shot-reveal-cta { display: block; font-size: 13px; opacity: 0.92; text-decoration: underline; }
.cti-shot-expired {
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--cti-muted);
  font-style: italic;
}

/* Download button after its link can no longer be re-minted (past 15-min TTL) */
.cti-btn--expired,
.cti-btn--expired:hover {
  background: var(--cti-muted);
  border-color: var(--cti-muted);
  cursor: not-allowed;
  opacity: 0.85;
}

/* Preview page whose signed link expired while the modal sat open */
.cti-preview-expired {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 24px;
  font-size: 13px;
  font-style: italic;
  color: var(--cti-muted);
  text-align: center;
}

/* ── Visual graph view — the CONNECTION MAP (full-screen overlay) ─────── */
.cti-graph-open { overflow: hidden; }
.cti-graph-overlay { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column; background: var(--cti-bg); }
.cti-graph-overlay[hidden] { display: none; }

/* severity → --c (drives pips, dots, badges, card borders) */
.cti-graph-sev-high   { --c: #DC2626; }
.cti-graph-sev-medium { --c: #D97706; }
.cti-graph-sev-notice { --c: #3B6FE0; }
.cti-graph-sev-clean  { --c: var(--cti-teal); }
.cti-graph-sev-error,
.cti-graph-sev-neutral{ --c: var(--cti-muted); }

/* topbar */
.cti-graph-topbar { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--cti-surface); border-bottom: 1px solid var(--cti-line); }
.cti-graph-title { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.cti-graph-title span { color: var(--cti-teal); font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.cti-graph-layers { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; margin-left: 8px; }
.cti-graph-layers-lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cti-muted); }
.cti-graph-chip { font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border: 1.5px solid var(--cti-line-2); background: var(--cti-bg); color: var(--cti-ink-2); padding: 6px 13px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; transition: background .15s, border-color .15s, color .15s; }
.cti-graph-chip:hover { border-color: var(--cti-teal); }
.cti-graph-chip.on { background: var(--cti-navy); border-color: var(--cti-navy); color: #fff; }
:root[data-theme="dark"] .cti-graph-chip.on { background: var(--cti-teal); border-color: var(--cti-teal); color: #0F1419; }
.cti-graph-chip--base { cursor: default; border-style: dashed; color: var(--cti-muted); }
.cti-graph-chip--base:hover { border-color: var(--cti-line-2); }
.cti-graph-pip { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--cti-muted)); flex: 0 0 auto; }
.cti-graph-chip-ct { font-size: 11px; font-weight: 800; opacity: 0.7; }
/* mobile layers-as-tabs (item #4) — hidden on desktop, shown ≤720px */
.cti-graph-tabs { display: none; }
.cti-graph-tab { font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; border: 1.5px solid var(--cti-line-2); background: var(--cti-surface); color: var(--cti-ink-2); padding: 7px 13px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.cti-graph-tab.is-active { background: var(--cti-navy); border-color: var(--cti-navy); color: #fff; }
:root[data-theme="dark"] .cti-graph-tab.is-active { background: var(--cti-teal); border-color: var(--cti-teal); color: #0F1419; }
.cti-graph-tab-ct { font-size: 10px; font-weight: 800; opacity: 0.7; }
.cti-graph-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* Compact icon-only close (both desktop + mobile) — red so it reads as exit but
   takes minimal space, keeping the topbar controls from overflowing. */
.cti-graph-close { width: 32px; padding: 0; flex: 0 0 auto; font-size: 15px; font-weight: 800; line-height: 1; border-color: var(--cti-error); color: var(--cti-error); }
.cti-graph-close:hover { background: var(--cti-error); border-color: var(--cti-error); color: #fff; }
:root[data-theme="dark"] .cti-graph-close { border-color: var(--cti-error); color: var(--cti-error); }
:root[data-theme="dark"] .cti-graph-close:hover { background: var(--cti-error); border-color: var(--cti-error); color: #fff; }
/* Expand all — amber-filled so it gets noticed (the neutral nav-button outline
   blended in and users missed it). Same amber as the BETA pill / warn accents. */
.cti-graph-expand-btn,
:root[data-theme="dark"] .cti-graph-expand-btn { background: #F59E0B; border-color: #F59E0B; color: #0F1419; }
.cti-graph-expand-btn:hover,
:root[data-theme="dark"] .cti-graph-expand-btn:hover { background: #D97706; border-color: #D97706; color: #fff; }

/* body / canvas */
.cti-graph-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--cti-bg); border-bottom: 1px solid var(--cti-line); }
.cti-graph-tools:empty { display: none; }
.cti-graph-tools-lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cti-muted); }
.cti-graph-tools-grp { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cti-graph-tools-sep { width: 1px; height: 22px; background: var(--cti-line); }
.cti-graph-range { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--cti-ink-2); }
.cti-graph-range input[type="range"] { width: 130px; accent-color: var(--cti-teal); cursor: pointer; }
.cti-graph-numin { font: inherit; font-size: 12.5px; font-weight: 800; width: 3.6em; text-align: center; border: 1.5px solid var(--cti-line-2); background: var(--cti-surface); color: var(--cti-ink-2); border-radius: 8px; padding: 4px 6px; -moz-appearance: textfield; appearance: textfield; }
.cti-graph-numin::-webkit-outer-spin-button, .cti-graph-numin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cti-graph-numin:focus { outline: none; border-color: var(--cti-teal); }
.cti-graph-filterbtn { display: none; }
.cti-graph-sort { font: inherit; font-size: 12.5px; font-weight: 700; border: 1.5px solid var(--cti-line-2); background: var(--cti-surface); color: var(--cti-ink-2); border-radius: 8px; padding: 5px 8px; cursor: pointer; }
.cti-graph-clearf { font: inherit; font-size: 12.5px; font-weight: 700; border: 0; background: none; color: var(--cti-teal); cursor: pointer; text-decoration: underline; padding: 0; }
/* Filter dropdown menus (Category / Domain) — checkbox lists, all on by default */
.cti-graph-dd { position: relative; display: inline-block; }
.cti-graph-ddbtn { font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1.5px solid var(--cti-line-2); background: var(--cti-surface); color: var(--cti-ink-2); padding: 5px 11px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.cti-graph-ddbtn:hover { border-color: var(--cti-teal); }
.cti-graph-ddbtn.is-active { border-color: var(--cti-teal); color: var(--cti-teal); }
.cti-graph-ddcaret { font-size: 10px; opacity: 0.7; }
.cti-graph-ddbadge { font-size: 10.5px; font-weight: 800; background: var(--cti-teal); color: #fff; border-radius: 999px; padding: 1px 6px; }
:root[data-theme="dark"] .cti-graph-ddbadge { color: #0F1419; }
.cti-graph-ddmenu { display: none; position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 232px; max-width: 320px; background: var(--cti-surface); border: 1px solid var(--cti-line-2); border-radius: 12px; box-shadow: var(--cti-shadow-md); padding: 8px; }
.cti-graph-dd.is-open > .cti-graph-ddmenu { display: block; }
.cti-graph-ddhead { display: flex; align-items: center; gap: 10px; padding: 2px 4px 6px; }
.cti-graph-ddall { font: inherit; font-size: 11.5px; font-weight: 700; border: 0; background: none; color: var(--cti-teal); cursor: pointer; text-decoration: underline; padding: 0; }
.cti-graph-ddsearch { font: inherit; font-size: 12.5px; width: 100%; border: 1.5px solid var(--cti-line-2); background: var(--cti-bg); color: var(--cti-ink-2); border-radius: 8px; padding: 6px 9px; }
.cti-graph-ddsearch:focus { outline: none; border-color: var(--cti-teal); }
.cti-graph-ddlist { display: flex; flex-direction: column; gap: 1px; max-height: 46vh; overflow-y: auto; }
.cti-graph-ddlist--dom { max-height: 240px; }
.cti-graph-ddrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--cti-ink-2); padding: 5px 6px; border-radius: 7px; cursor: pointer; }
.cti-graph-ddrow:hover { background: var(--cti-bg); }
.cti-graph-ddrow input[type="checkbox"] { accent-color: var(--cti-teal); cursor: pointer; flex: 0 0 auto; }
.cti-graph-ddsw { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.cti-graph-ddtext { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cti-graph-ddcount { font-size: 11px; font-weight: 800; color: var(--cti-muted); flex: 0 0 auto; }
.cti-graph-ddsub { font-size: 11px; font-weight: 700; color: var(--cti-muted); }
.cti-graph-ddsep { height: 1px; background: var(--cti-line); margin: 6px 2px; }
.cti-graph-body { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.cti-graph-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; user-select: none; -webkit-user-select: none; }
.cti-graph-canvas.is-grabbing { cursor: grabbing; }

/* nodes */
.cti-graph-edge { fill: none; stroke-linecap: round; }
.cti-graph-node { cursor: pointer; }
.cti-graph-glow { opacity: 0.10; pointer-events: none; }
.cti-graph-ring { transition: stroke-width .12s; }
.cti-graph-favwrap { transition: transform .12s ease; transform-box: fill-box; transform-origin: center; }
.cti-graph-node:hover .cti-graph-favwrap { transform: scale(1.09); }
.cti-graph-node.is-selected .cti-graph-ring { stroke-width: 5; }
.cti-graph-favicon { pointer-events: none; }
.cti-graph-countbadge { fill: #0F1419; stroke: var(--cti-surface); stroke-width: 1.5; pointer-events: none; }
.cti-graph-count { font-size: 11px; font-weight: 800; fill: #fff; pointer-events: none; }
.cti-graph-flag { stroke: var(--cti-surface); stroke-width: 1.5; pointer-events: none; }
.cti-graph-flagtxt { font-size: 12px; font-weight: 900; fill: #fff; pointer-events: none; }
.cti-graph-label { font-size: 12px; font-weight: 700; fill: var(--cti-muted); opacity: 0.62; paint-order: stroke; stroke: var(--cti-bg); stroke-width: 3px; pointer-events: none; transition: opacity .12s, fill .12s; }
.cti-graph-label.first { fill: var(--cti-ink-2); opacity: 0.9; }
.cti-graph-node:hover .cti-graph-label, .cti-graph-node.is-selected .cti-graph-label { fill: var(--cti-ink); opacity: 1; }
/* category bubbles (the level between root and host leaves) */
.cti-graph-catnode { cursor: pointer; }
.cti-graph-caticon { pointer-events: none; }
.cti-graph-catcount { font-size: 14px; font-weight: 800; fill: var(--cti-ink); pointer-events: none; }
.cti-graph-catlabel { font-weight: 800; opacity: 0.92; fill: var(--cti-ink-2); }

/* legend */
.cti-graph-legend { position: absolute; left: 16px; bottom: 16px; z-index: 6; background: var(--cti-surface); border: 1px solid var(--cti-line); border-radius: var(--cti-radius-sm); box-shadow: var(--cti-shadow-md); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; font-weight: 600; color: var(--cti-ink-2); max-width: 60%; }
.cti-graph-legend-title { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cti-ink); font-weight: 800; width: 100%; }
.cti-graph-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cti-graph-sw { width: 13px; height: 13px; border-radius: 50%; border: 3px solid; display: inline-block; background: var(--cti-surface); }
.cti-graph-kbadge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 900; }

/* floating summary / host panel */
/* Request journey (Slice 1) — drawn AS BUBBLES inside the SVG canvas, above the
   connection map (shares pan/zoom). Rounded RECTANGLES + their own text styles
   distinguish them from the map's circular favicon nodes. SVG elements, so these
   use fill/stroke, not color/background. */
.cti-jny-node { cursor: grab; }
.cti-graph-canvas.is-grabbing .cti-jny-node { cursor: grabbing; }
.cti-jny-rect { fill: var(--cti-surface); stroke: var(--cti-line-2); stroke-width: 1.5; }
.cti-jny-node--start .cti-jny-rect { stroke: var(--cti-teal); stroke-width: 2; }
.cti-jny-node--final .cti-jny-rect { stroke: var(--cti-teal); stroke-width: 2.5; }
.cti-jny-node.is-selected .cti-jny-rect { stroke: var(--cti-teal); stroke-width: 3.5; }
/* A flagged hop / landing: danger colour wins over the role/selected stroke so the
   bubble itself reads as flagged, alongside its corner "!" badge. */
.cti-jny-node--flagged-listed .cti-jny-rect { stroke: #DC2626; stroke-width: 2.5; }
.cti-jny-node--flagged-notice .cti-jny-rect { stroke: #D97706; stroke-width: 2.5; }
.cti-graph-htag--jny { border-color: var(--cti-teal); color: var(--cti-teal); }
.cti-graph-copy { margin-top: 10px; }
.cti-jny-role-t { fill: var(--cti-ink-2); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.cti-jny-host-t { fill: var(--cti-ink); font-size: 13px; font-weight: 700; }
.cti-jny-path-t { fill: var(--cti-ink-2); font-size: 10.5px; font-family: var(--font-mono); }
.cti-jny-conn { stroke: var(--cti-ink-2); stroke-width: 1.5; stroke-opacity: 0.7; }
.cti-jny-arrowhead { fill: var(--cti-ink-2); fill-opacity: 0.8; }
.cti-jny-status-t { fill: var(--cti-ink-2); font-size: 10px; font-weight: 700; }
.cti-jny-note-t { fill: var(--cti-ink-2); font-size: 10px; font-weight: 600; }
.cti-jny-note-t--clid { fill: #D97706; font-weight: 700; }
.cti-jny-note-t--host { fill: var(--cti-teal); }
.cti-graph-panel { position: absolute; top: 14px; right: 14px; z-index: 10; width: 320px; max-width: 40vw; max-height: 72vh; overflow-y: auto; background: var(--cti-surface); border: 1px solid var(--cti-line); border-radius: var(--cti-radius-sm); box-shadow: var(--cti-shadow-md); padding: 16px 18px; }
.cti-graph-vbadge { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; padding: 6px 13px; border-radius: 999px; background: var(--c); }
.cti-graph-sitehead { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }
.cti-graph-sitehead img { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--cti-line); }
.cti-graph-h { font-size: 15.5px; font-weight: 800; word-break: break-all; line-height: 1.2; }
.cti-graph-mono { font-family: var(--font-mono); font-size: 14px; }
.cti-graph-urlrow { font-family: var(--font-mono); font-size: 12px; color: var(--cti-muted); word-break: break-all; margin: 0 0 14px; }
.cti-graph-sec { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cti-muted); margin: 16px 0 8px; }
.cti-graph-why { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.cti-graph-why li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.42; color: var(--cti-ink-2); }
.cti-graph-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; margin-top: 3px; background: var(--c, var(--cti-muted)); }
.cti-graph-pnote { font-size: 13.5px; line-height: 1.5; color: var(--cti-ink-2); margin: 0; }
.cti-graph-hint { font-size: 12.5px; color: var(--cti-muted); margin: 14px 0 0; }
.cti-graph-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cti-graph-stat { background: var(--cti-bg); border: 1px solid var(--cti-line); border-radius: 10px; padding: 9px 11px; }
.cti-graph-stat-n { font-size: 19px; font-weight: 800; line-height: 1; }
.cti-graph-stat-l { font-size: 10.5px; color: var(--cti-muted); margin-top: 3px; }
.cti-graph-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--cti-teal); cursor: pointer; background: none; border: 0; padding: 0; margin-bottom: 10px; }
.cti-graph-tagrow { margin: 6px 0; }
.cti-graph-htag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; padding: 3px 10px; border-radius: 999px; }
.cti-graph-htag--first { background: var(--cti-teal); }
.cti-graph-htag--third { background: #6366F1; }
.cti-graph-flags { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0 0; }
.cti-graph-flagpill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.cti-graph-flagpill--tr { background: rgba(217,119,6,0.15); color: #B45309; }
.cti-graph-flagpill--bl { background: rgba(220,38,38,0.14); color: #DC2626; }
.cti-graph-flagpill--notice { background: rgba(217,119,6,0.15); color: #B45309; }
.cti-graph-flagpill--fp { background: rgba(124,58,237,0.14); color: #7C3AED; }
:root[data-theme="dark"] .cti-graph-flagpill--fp { color: #C4B5FD; }
.cti-graph-reqlist { list-style: none; margin: 8px 0 0; padding: 0; }
.cti-graph-req { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding: 8px 2px; border-top: 1px solid var(--cti-line); cursor: pointer; font-size: 12.5px; }
.cti-graph-req:first-child { border-top: none; }
.cti-graph-req:hover { background: var(--cti-bg); }
.cti-graph-req-method { flex: 0 0 auto; font-size: 10px; font-weight: 900; letter-spacing: 0.04em; color: var(--cti-teal-2); text-transform: uppercase; }
.cti-graph-req-type { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: var(--cti-muted); background: var(--cti-bg); border: 1px solid var(--cti-line); border-radius: 999px; padding: 0 7px; }
.cti-graph-req-url { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 11.5px; color: var(--cti-ink-2); }
.cti-graph-req-full { display: none; flex-basis: 100%; margin-top: 4px; font-family: var(--font-mono); font-size: 11.5px; color: var(--cti-ink); word-break: break-all; }
.cti-graph-req--open .cti-graph-req-url { display: none; }
.cti-graph-req--open .cti-graph-req-full { display: block; }

/* draggable layer list-cards (spawned by the Layers chips) */
.cti-graph-lcard { position: absolute; z-index: 6; width: 268px; background: var(--cti-surface); border: 1px solid var(--cti-line); border-radius: var(--cti-radius-sm); box-shadow: var(--cti-shadow-md); overflow: hidden; }
.cti-graph-lcard-head { display: flex; align-items: center; gap: 9px; padding: 11px 13px; cursor: grab; border-bottom: 1px solid var(--cti-line); border-left: 4px solid var(--c); }
.cti-graph-lcard-head:active { cursor: grabbing; }
.cti-graph-lcard-t { font-size: 13.5px; font-weight: 800; flex: 1 1 auto; }
.cti-graph-lcard-ct { font-size: 11px; font-weight: 700; color: var(--cti-muted); background: var(--cti-bg); border: 1px solid var(--cti-line); border-radius: 999px; padding: 1px 8px; }
.cti-graph-lcard-x { cursor: pointer; color: var(--cti-muted); font-size: 18px; line-height: 1; border: 0; background: none; padding: 0 2px; }
.cti-graph-lcard-x:hover { color: var(--cti-ink); }
.cti-graph-lcard-body { max-height: 300px; overflow-y: auto; }
.cti-graph-lrow { border-top: 1px solid var(--cti-line); }
.cti-graph-lrow:first-child { border-top: 0; }
.cti-graph-lrow-h { display: flex; align-items: center; gap: 9px; padding: 9px 13px; cursor: pointer; font-size: 13px; color: var(--cti-ink-2); }
.cti-graph-lrow-h:hover { background: var(--cti-bg); }
.cti-graph-lrow.is-open > .cti-graph-lrow-h { font-weight: 700; background: var(--cti-bg); }
.cti-graph-lt { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cti-graph-muted { color: var(--cti-muted); }
.cti-graph-chev { color: var(--cti-muted); font-size: 12px; transition: transform .15s; }
.cti-graph-lrow.is-open > .cti-graph-lrow-h .cti-graph-chev { transform: rotate(180deg); }
.cti-graph-lrow-b { display: none; padding: 2px 13px 12px 30px; font-size: 13px; line-height: 1.5; color: var(--cti-ink-2); }
.cti-graph-lrow.is-open .cti-graph-lrow-b { display: block; }

/* Re-scan / Scan-another buttons relocated into the scan box (#1) */
.cti-scanner-postactions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--cti-line);
}

/* Floating scroll-to-top (#1) */
.cti-scrolltop {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cti-teal); color: #fff; border: none;
  box-shadow: var(--cti-shadow-md); cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.18s, transform 0.18s, background 0.18s;
}
.cti-scrolltop.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cti-scrolltop:hover { background: var(--cti-teal-2); }
.cti-scrolltop svg { width: 24px; height: 24px; }
.cti-graph-open .cti-scrolltop { display: none; }

/* Cancel button inside the scan progress bar (webpage-scanner). Scoped to the
   scan variant so the file-scanner's shared .cti-progress-meta is untouched. */
.cti-scan-progress .cti-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cti-scan-cancel {
  flex: 0 0 auto; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  color: var(--cti-error); background: none; border: 1.5px solid var(--cti-error);
  padding: 4px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.cti-scan-cancel:hover { background: var(--cti-error); color: #fff; }

@media (max-width: 720px) {
  .cti-graph-topbar { gap: 8px; }
  .cti-graph-title span { display: none; }
  .cti-graph-layers { display: none; }
  .cti-graph-filterbtn { display: inline-flex; }
  .cti-graph-filterbtn.is-active { background: var(--cti-navy); border-color: var(--cti-navy); color: #fff; }
  /* Filters live in a drop-down panel below the topbar on phones (the desktop
     strip is too wide). Closed by default; the Filters button toggles .is-open.
     Stacked vertically with hidden separators; capped + scrollable so it can't
     run off-screen or collide with the bottom tab bar / panel. */
  .cti-graph-tools { display: none; flex-direction: column; align-items: stretch; gap: 10px; max-height: 50vh; overflow-y: auto; box-shadow: var(--cti-shadow-md); }
  .cti-graph-tools.is-open { display: flex; }
  .cti-graph-tools .cti-graph-tools-sep { display: none; }
  .cti-graph-tools .cti-graph-tools-grp { gap: 8px; flex-direction: column; align-items: stretch; }
  /* the Category/Domain menus render inline (accordion), not as floating popovers */
  .cti-graph-dd { display: block; }
  .cti-graph-ddbtn { width: 100%; justify-content: space-between; }
  .cti-graph-ddmenu { position: static; min-width: 0; max-width: none; box-shadow: none; border: 0; border-radius: 0; padding: 6px 2px 2px; }
  .cti-graph-ddlist--dom { max-height: 180px; }
  .cti-graph-controls { margin-left: auto; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  /* Smaller, single-line control buttons so the row fits without wrapping a
     button's label onto two lines or pushing the close button off-screen. */
  .cti-graph-controls .cti-btn--nav { height: 30px; padding: 0 9px; font-size: 11.5px; white-space: nowrap; flex: 0 0 auto; }
  .cti-graph-close { width: 30px; padding: 0; }
  .cti-graph-tabs { display: flex; position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 11; gap: 6px; overflow-x: auto; padding: 4px; scrollbar-width: none; }
  .cti-graph-tabs::-webkit-scrollbar { display: none; }
  .cti-graph-panel { top: auto; left: 8px; right: 8px; bottom: 56px; width: auto; max-width: none; max-height: 42%; }
  /* Tapping the active tab collapses the bottom sheet for a bigger graph view;
     tapping again (or another tab) re-expands it. */
  .cti-graph-panel.is-collapsed { display: none; }
  .cti-graph-tab.is-active::after { content: "⌄"; font-size: 11px; opacity: 0.8; margin-left: 2px; }
  .cti-graph-tabs.is-collapsed .cti-graph-tab.is-active::after { content: "⌃"; }
  .cti-graph-legend { display: none; }
  .cti-graph-lcard { display: none; }
}


/* ═══════════════════════════════════════════════════════════════
   New look (2026-10 redesign) — everything below overrides the
   original rules above. Screen only: the PDF uses its own print CSS.
   ═══════════════════════════════════════════════════════════════ */

/* ── Page: hero + scan box ─────────────────────────────────────── */
.sc-hero { padding-top: 72px; padding-bottom: 64px; border-bottom: 2px solid var(--line); }
.sc-hero::before { display: none; }
.sc-hero__in { display: flex; flex-direction: column; gap: 24px; }
.sc-hero__top { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; }
.sc-hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.sc-h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; }
.sc-hero__text .lead { max-width: 620px; font-size: 18px; line-height: 1.65; }
.sc-boo { flex: 1 1 200px; display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.sc-bubble { flex: none; width: 180px; padding: 10px 14px; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; color: var(--ink2); margin-bottom: 44px; box-shadow: none; position: relative; overflow: visible; }
/* the speech-bubble tail, pointing right at Boo (a bordered square turned so its corner faces him) */
.sc-bubble::after { content: ""; position: absolute; right: -7px; bottom: 14px; width: 10px; height: 10px; background: var(--surf); border-right: 2px solid var(--frame); border-bottom: 2px solid var(--frame); transform: rotate(-45deg); }
.sc-box__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.sc-form { display: flex; flex-wrap: wrap; gap: 12px; }
.sc-input { flex: 999 1 380px; min-width: 0; font-family: var(--font-mono); }
.sc-depth { flex: 1 1 auto; }
.sc-depth .seg__opt { align-items: flex-start; gap: 3px; padding: 8px 14px; min-width: 128px; text-align: left; }
.sc-depth__sub { font-size: 11px; color: var(--muted); }
/* the chosen depth is filled teal, a different green from the lime Scan button */
.sc-depth .seg__opt[aria-checked="true"] { background: var(--teal); color: var(--bg); box-shadow: none; }
.sc-depth .seg__opt[aria-checked="true"] .sc-depth__sub { color: var(--bg); opacity: .85; }
.sc-go { flex: 1 1 auto; justify-content: center; min-width: 120px; }
.sc-go:disabled { opacity: .7; cursor: progress; }
.sc-desc { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink2); }
.sc-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sc-try .label { font-size: 13px; letter-spacing: 0; margin-right: 4px; }
.sc-post:empty { display: none; }
.sc-post { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-aside { margin: 0; font-size: 14px; color: var(--muted); }
.sc-aside a { color: var(--ink2); }
.sc-results { padding-top: 32px; }
.sc-results:has(#scan-result[hidden]):has(#scan-file-note[hidden]) { display: none; }
.sc-results .shell { display: flex; flex-direction: column; gap: 14px; }
.sc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.sc-tile { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.sc-tile .spr-ico { width: 32px; height: 32px; }
.sc-tile h3 { margin: 0; font-family: var(--font-mono); font-weight: 400; font-size: 18px; }
.sc-tile p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.sc-depths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 22px; }
.sc-depths__p { margin: 0; padding: 22px; font-size: 16px; line-height: 1.65; color: var(--ink2); }
.sc-verdicts { gap: 12px; }
.sc-verdicts .label { letter-spacing: 0; font-size: 13px; }
.sc-vchips { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-vchip { cursor: default; color: var(--ink); }
.sc-vchip--ok { border-color: var(--lime-ink); }
.sc-vchip--warn { border-color: var(--amber); }
.sc-vchip--bad { border-color: var(--red); }
.page-scan .psec::before { display: none; }

/* ── Buttons inside the report (cti-btn → new .btn look) ───────── */
.cti-btn {
  font-family: var(--font-mono); font-weight: 400; font-size: 14px; line-height: 1; letter-spacing: 0;
  padding: 10px 14px; border: 2px solid var(--frame); border-radius: var(--radius-ctl);
  background: var(--surf); color: var(--ink); cursor: pointer;
  box-shadow: 0 10px 20px -10px var(--soft-btn);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cti-btn:hover { transform: translateY(-2px); }
.cti-btn--primary, .cti-btn--primary:hover { background: var(--lime); color: var(--on-lime); border-color: var(--hard); box-shadow: 0 10px 24px -10px var(--lime-glow); }
.cti-btn--ghost, .cti-btn--ghost:hover,
:root[data-theme="dark"] .cti-btn--ghost, :root[data-theme="dark"] .cti-btn--ghost:hover { background: var(--surf); color: var(--ink); border-color: var(--frame); }
.cti-btn--big { width: auto; margin-top: 0; padding: 12px 18px; font-size: 15px; }
.cti-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.cti-btn-icon { width: 16px; height: 16px; }

/* ── Result container ──────────────────────────────────────────── */
.cti-scanner-result {
  max-width: none; width: 100%; margin: 0; padding: 18px 20px; background: var(--surf);
  border: 2px solid var(--frame); border-radius: var(--radius-win); box-shadow: var(--soft-win);
  color: var(--ink2); font-size: 15px;
}
.cti-scanner-result--error { border-color: var(--red); background: var(--red-bg); }
.cti-scanner-result--info { border-color: var(--teal); background: var(--teal-bg); }
.cti-scanner-result--ok { border-color: var(--lime-ink); }
.cti-scanner-result--clean, .cti-scanner-result--clean-caution, .cti-scanner-result--suspicious,
.cti-scanner-result--malicious, .cti-scanner-result--unreachable, .cti-scanner-result--unknown {
  background: transparent; border: none; box-shadow: none; padding: 0; gap: 24px;
}
.cti-scanner-result code, .cti-scanner-result pre { font-family: var(--font-mono); border-radius: var(--radius-sm); }
.cti-file-note { max-width: none; margin: 0; border: 2px solid var(--teal); border-radius: var(--radius-ctl); background: var(--teal-bg); }
:root[data-theme="dark"] .cti-file-note { background: var(--teal-bg); }

/* ── Progress (the scan is running) ────────────────────────────── */
.cti-scan-progress { padding: 4px 0; font-family: var(--font-mono); }
.cti-progress-label { font-weight: 400; font-size: 14px; color: var(--ink); }
.cti-progress-pct { font-weight: 400; color: var(--teal); font-size: 14px; }
.cti-progress-track { height: 14px; border: 2px solid var(--frame); border-radius: var(--radius-sm); background: var(--surf2); }
.cti-progress-bar { border-radius: 0; background: repeating-linear-gradient(90deg, var(--lime) 0 8px, transparent 8px 11px); transition: width .5s steps(6); }
.cti-progress-meta { font-size: 13px; }
.cti-scan-cancel { font-family: var(--font-mono); font-size: 12px; padding: 5px 10px; border: 2px solid var(--frame); border-radius: var(--radius-sm); background: var(--surf); color: var(--ink2); cursor: pointer; }
.cti-scan-cancel:hover { color: var(--red); border-color: var(--red); }

/* ── Cards ─────────────────────────────────────────────────────── */
.cti-result-card { border: 2px solid var(--frame); border-radius: var(--radius-win); box-shadow: var(--soft-win); padding: 24px; }
.cti-scanner-result--malicious .cti-verdict-card { border-color: var(--red); }
.cti-scanner-result--suspicious .cti-verdict-card, .cti-scanner-result--clean-caution .cti-verdict-card { border-color: var(--amber); }
.cti-scanner-result--clean .cti-verdict-card { border-color: var(--lime-ink); }

/* ── Verdict: traffic light + big mono name ───────────────────── */
.cti-verdict { margin-bottom: 8px; }
.cti-verdict-badges { gap: 10px 14px; align-items: center; }
.cti-verdict-badge {
  --l1: var(--line); --l2: var(--line); --l3: var(--line);
  padding: 0; border: 0 !important; background: transparent !important; border-radius: 0;
  gap: 16px; font-family: var(--font-mono); font-weight: 400;
}
.cti-verdict-badge::before {
  content: ""; flex: none; width: 74px; height: 28px; border: 2px solid var(--frame); border-radius: 8px;
  background:
    radial-gradient(circle at 15px 50%, var(--l1) 0 7px, transparent 8px),
    radial-gradient(circle at 35px 50%, var(--l2) 0 7px, transparent 8px),
    radial-gradient(circle at 55px 50%, var(--l3) 0 7px, transparent 8px),
    var(--bg);
}
.cti-verdict-badge .cti-verdict-icon { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cti-verdict-label { text-transform: none; letter-spacing: 0; font-size: clamp(24px, 3vw, 33px); line-height: 1.1; }
.cti-verdict-badge--malicious { --l1: var(--red); color: var(--red) !important; }
.cti-verdict-badge--suspicious, .cti-verdict-badge--clean-caution { --l2: var(--amber); color: var(--amber) !important; }
.cti-verdict-badge--clean { --l3: var(--lime); color: var(--lime-ink) !important; }
.cti-verdict-badge--unreachable, .cti-verdict-badge--unknown { color: var(--ink2) !important; }
.cti-verdict .cti-verdict-summary { font-size: 17px; line-height: 1.55; color: var(--ink); margin: 14px 0 0; }
.cti-verdict-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cti-cat-chip, .cti-scam-chip { font-family: var(--font-mono); font-weight: 400; border-width: 2px; border-radius: var(--radius-pill); }

/* ── Scores: a 3-up strip under the verdict ───────────────────── */
.cti-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; border: 2px solid var(--frame); border-radius: var(--radius-ctl); background: var(--bg); overflow: hidden; }
.cti-score { padding: 14px 12px; border-right: 2px solid var(--frame); }
.cti-score:last-child { border-right: 0; }
.cti-ring text { font-family: var(--font-mono) !important; font-weight: 400 !important; }
.cti-score-name { font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.cti-score-driver { font-size: 12.5px; color: var(--ink2); }
.cti-scores-blocked-note { border-radius: var(--radius-ctl); }

/* ── "What we found" ──────────────────────────────────────────── */
.cti-section-title, .cti-group-title { font-family: var(--font-mono); font-weight: 400; color: var(--ink); letter-spacing: 0; text-transform: none; }
.cti-section-title { font-size: 20px; margin: 4px 0 12px; }
.cti-group-title { font-size: 13px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.cti-highlight { border: 2px solid var(--frame); border-radius: var(--radius-ctl); background: var(--surf); padding: 12px 14px; gap: 14px; }
.cti-highlight--danger { border-color: var(--red); background: var(--red-bg); }
.cti-highlight--warn { border-color: var(--amber); background: var(--amber-bg); }
.cti-highlight--info { border-color: var(--frame); }
.cti-highlight-icon, :root[data-theme="dark"] .cti-highlight-icon { border-radius: var(--radius-sm); font-family: var(--font-mono); font-weight: 400; background: var(--surf2) !important; color: var(--ink) !important; border: 2px solid var(--frame); }
.cti-highlight--danger .cti-highlight-icon { color: var(--red) !important; border-color: var(--red); }
.cti-highlight--warn .cti-highlight-icon { color: var(--amber) !important; border-color: var(--amber); }
.cti-highlight-label { font-family: var(--font-mono); font-weight: 400; font-size: 14.5px; }
.cti-highlight-src, .cti-highlight-sev { font-family: var(--font-mono); }
.cti-highlights-clear { border-radius: var(--radius-ctl); border-width: 2px; }

/* ── Full report: disclosure + findings ───────────────────────── */
.cti-detail-card { padding: 0; overflow: hidden; }
.cti-detail-summary { border: 0 !important; border-radius: 0 !important; background: var(--bar) !important; font-family: var(--font-mono); font-weight: 400; padding: 14px 18px; min-height: 48px; }
.cti-detail[open] > .cti-detail-summary { border-bottom: 2px solid var(--frame) !important; }
.cti-detail-label { font-weight: 400; color: var(--ink); }
.cti-detail-clean { color: var(--muted); }
.cti-detail-body { padding: 8px 20px 20px; }
.cti-finding { border-bottom: 2px solid var(--line); }
.cti-finding-icon { border-radius: var(--radius-sm); font-family: var(--font-mono); font-weight: 400; border-width: 2px; }
.cti-finding--clean .cti-finding-icon, :root[data-theme="dark"] .cti-finding--clean .cti-finding-icon { background: var(--lime-bg); color: var(--lime-ink); border-color: var(--lime-ink); }
.cti-finding--listed .cti-finding-icon, :root[data-theme="dark"] .cti-finding--listed .cti-finding-icon { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.cti-finding--sev-medium.cti-finding--listed .cti-finding-icon, .cti-finding--error .cti-finding-icon,
:root[data-theme="dark"] .cti-finding--sev-medium.cti-finding--listed .cti-finding-icon, :root[data-theme="dark"] .cti-finding--error .cti-finding-icon { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.cti-finding--notice .cti-finding-icon, :root[data-theme="dark"] .cti-finding--notice .cti-finding-icon { background: var(--surf2); color: var(--blue); border-color: var(--blue); font-style: normal; }
.cti-finding-source { font-family: var(--font-mono); font-weight: 400; color: var(--ink); }
.cti-finding-tags span, .cti-graph-chip { border-radius: var(--radius-sm); font-family: var(--font-mono); }

/* ── Scam lens, cloaking, screenshot ──────────────────────────── */
.cti-scam-lens, .cti-cloak-card { border-width: 2px; border-radius: var(--radius-ctl); }
.cti-scam-lens--danger { background: var(--red-bg); border-color: var(--red); }
.cti-scam-lens--warn { background: var(--amber-bg); border-color: var(--amber); }
.cti-scam-title { font-family: var(--font-mono); font-weight: 400; }
.cti-scam-icon { border-radius: var(--radius-sm); }
.cti-shot-frame { border: 2px solid var(--frame); border-radius: var(--radius-ctl); overflow: hidden; }
.cti-shot figcaption { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ── Report-this-result panel ─────────────────────────────────── */
.cti-report-panel { border-width: 2px; border-radius: var(--radius-ctl); }

/* ── Back-to-top button ───────────────────────────────────────── */
.cti-scrolltop { width: 48px; height: 48px; border: 2px solid var(--hard); border-radius: var(--radius-ctl); background: var(--lime); color: var(--on-lime); font-family: var(--font-mono); font-size: 20px; box-shadow: 0 10px 24px -10px var(--lime-glow); }
.cti-scrolltop:hover { background: var(--lime); }

/* ── Connection map overlay: type only ────────────────────────── */
.cti-graph-overlay { font-family: var(--font-body); }
.cti-graph-title, .cti-graph-tab, .cti-graph-lcard-t { font-family: var(--font-mono); font-weight: 400; }

@media (max-width: 767px) {
  .sc-hero { padding-top: 40px; padding-bottom: 40px; }
  .sc-h1 { font-size: 34px; line-height: 1.12; }
  .sc-boo { display: none; }
  .sc-depth { width: 100%; }
  .sc-depth .seg__opt { min-width: 0; }
  .sc-go { width: 100%; }
  .cti-result-card { padding: 18px; }
  .cti-scores { grid-template-columns: 1fr; }
  .cti-score { border-right: 0; border-bottom: 2px solid var(--line); display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; align-items: center; }
  .cti-score:last-child { border-bottom: 0; }
  .cti-score-ringwrap { grid-row: 1 / span 2; }
  .cti-score-name { margin-top: 0; align-self: end; }
  .cti-score-driver { align-self: start; }
  .cti-detail-body { padding: 4px 14px 14px; }
}
.cti-verdict-badge { box-shadow: none !important; }
.cti-shot-frame { max-width: 760px; }

/* Connection map's own light/dark switch */
.cti-theme-toggle { width: 56px; height: 30px; border-radius: var(--radius-ctl); border: 2px solid var(--frame); background: var(--surf); padding: 0 8px; display: inline-flex; align-items: center; justify-content: space-between; flex: 0 0 auto; cursor: pointer; }
.cti-theme-toggle:hover { border-color: var(--teal); }
.cti-theme-icon { display: grid; place-items: center; width: 14px; height: 14px; }
.cti-theme-icon svg { display: block; }
.cti-theme-icon--sun { color: var(--ink); }
.cti-theme-icon--moon { color: var(--muted); }
:root[data-theme="dark"] .cti-theme-icon--sun { color: var(--muted); }
:root[data-theme="dark"] .cti-theme-icon--moon { color: var(--lime); }

/* ── [onion] captcha mirror: the answer panel under the Deep progress bar ───── */
.cti-captcha { display: grid; gap: 12px; margin-top: 12px; }
.cti-captcha-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; }
.cti-captcha-clock { font-family: var(--font-mono); font-size: 13px; color: var(--cti-muted, #5C6770); }
.cti-captcha-why, .cti-captcha-label { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--cti-ink); }
.cti-captcha-shot { margin: 0; }
.cti-captcha-input { max-width: 14ch; }
.cti-scanner-captcha { display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1.5px solid var(--cti-teal); border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--cti-teal); }
