/* ============================================================
 * Vilkax · /scan — consumer scan-anything page
 * ============================================================ */

.scan-page { background: var(--scan-bg); min-height: 100dvh; }

/* ── Hero ─────────────────────────────────────────────────── */
.scan-hero {
  text-align: center;
  padding: clamp(64px, 8vw, 100px) 24px 40px;
  position: relative;
}
.scan-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% -10%, rgba(91,107,255,0.14), transparent 70%);
  pointer-events: none;
}
.scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(91,107,255,0.38);
  background: rgba(91,107,255,0.10);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--scan-accent-text);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.scan-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--scan-accent);
  box-shadow: 0 0 0 0 rgba(91,107,255,0.6);
  animation: scanPulse 2.4s ease-out infinite;
}
@keyframes scanPulse {
  0%   { box-shadow: 0 0 0 0 rgba(91,107,255,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(91,107,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(91,107,255,0); }
}
.scan-hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--scan-ink-0);
  margin: 0 0 16px;
  line-height: 1.15;
}
.scan-hero p {
  font-size: clamp(14px, 2vw, 17px);
  color: var(--scan-ink-2);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Panel ────────────────────────────────────────────────── */
.scan-panel {
  max-width: 680px;
  margin: 0 auto 48px;
  padding: 0 20px;
}

/* Kind selector */
.scan-kinds {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.scan-kind {
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--scan-ink-2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  letter-spacing: 0.01em;
}
.scan-kind:hover { background: rgba(255,255,255,0.08); color: var(--scan-ink-0); }
.scan-kind[aria-pressed="true"] {
  background: rgba(91,107,255,0.18);
  border-color: rgba(91,107,255,0.55);
  color: var(--scan-accent-text);
}

/* Text input pane */
.scan-textarea-wrap {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.028);
  overflow: hidden;
  transition: border-color 0.15s;
}
.scan-textarea-wrap:focus-within {
  border-color: rgba(91,107,255,0.5);
  box-shadow: 0 0 0 3px rgba(91,107,255,0.10);
}
#scan-input {
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 16px 18px;
  font: inherit;
  font-size: 14px;
  color: var(--scan-ink-0);
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  line-height: 1.6;
  box-sizing: border-box;
}
#scan-input::placeholder { color: var(--scan-ink-4); }

.scan-input-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.scan-char-count { font-size: 11px; color: var(--scan-ink-4); margin-right: auto; }

/* Example pills */
.scan-examples { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.scan-examples-label { font-size: 11px; color: var(--scan-ink-4); }
.scan-example-pill {
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  /* ink-3 (#64748b) on the dark card measured 3.9:1 at 11px; ink-2 clears AA. */
  color: var(--scan-ink-2);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.scan-example-pill:hover { color: var(--scan-ink-1); border-color: rgba(255,255,255,0.22); }

/* Detected kind hint */
.scan-detected {
  font-size: 11.5px;
  color: var(--scan-ink-3);
  margin: 8px 2px 0;
}
.scan-detected strong { color: var(--scan-accent-text); }

/* File pane */
.scan-file-zone {
  border-radius: 16px;
  border: 2px dashed rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.025);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.scan-file-zone:hover,
.scan-file-zone.drag-over {
  border-color: rgba(91,107,255,0.5);
  background: rgba(91,107,255,0.05);
}
.scan-file-icon { margin-bottom: 14px; }
.scan-file-icon svg { width: 40px; height: 40px; opacity: 0.4; }
.scan-file-zone p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--scan-ink-2);
}
.scan-file-pick {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--scan-accent-link);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.scan-file-note { font-size: 11.5px !important; color: var(--scan-ink-4) !important; margin-top: 12px !important; }
#scan-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0,0,0,0); pointer-events: none; }
/* display:flex would override the UA [hidden]{display:none} rule — be explicit */
.scan-file-chosen[hidden], #scan-result[hidden], #scan-detected[hidden], #scan-error[hidden] { display: none; }
.scan-file-chosen {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(91,107,255,0.08);
  border: 1px solid rgba(91,107,255,0.25);
  margin-top: 14px;
  font-size: 13px;
  color: var(--scan-ink-0);
}
.scan-file-chosen svg { flex-shrink: 0; color: var(--scan-accent-link); }
.scan-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-file-meta { font-size: 11px; color: var(--scan-ink-3); }

/* Scan button */
.scan-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--scan-accent) 0%, var(--scan-accent-end) 100%);
  color: var(--scan-ink-0);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(91,107,255,0.28);
}
.scan-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.scan-btn:active:not(:disabled) { transform: translateY(0); }
.scan-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.scan-btn--loading { opacity: 0.7; cursor: default; }

/* ── Result card ──────────────────────────────────────────── */
.scan-result {
  max-width: 680px;
  margin: 0 auto 32px;
  padding: 0 20px;
  animation: scanResultIn 0.3s cubic-bezier(0.18,0.9,0.28,1.08);
}
@keyframes scanResultIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.scan-result-card {
  border-radius: 18px;
  border: 1px solid var(--verdict-border);
  background: var(--verdict-bg);
  padding: 22px 24px;
}
.scan-verdict-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.scan-verdict-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--verdict-icon-bg);
  flex-shrink: 0;
}
.scan-verdict-icon svg { width: 22px; height: 22px; stroke: var(--verdict-fg); }
.scan-verdict-label {
  font-size: 20px;
  font-weight: 800;
  color: var(--verdict-fg);
  letter-spacing: -0.01em;
}
.scan-verdict-conf {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--verdict-fg);
  opacity: 0.7;
  background: var(--verdict-icon-bg);
  padding: 4px 10px;
  border-radius: 999px;
}
.scan-reasons {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scan-reasons li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--scan-ink-1);
  line-height: 1.5;
}
.scan-reasons-dot {
  flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--verdict-fg);
  margin-top: 8px;
  opacity: 0.7;
}
.scan-safety-tip {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  font-size: 12.5px;
  color: var(--scan-ink-2);
  line-height: 1.5;
}
/* "We couldn't read this" — a statement about OUR reach, not about the sender,
   so it reads informational (blue) rather than alarming (amber/red). It sits
   above the findings because it qualifies every one of them. */
.scan-unread-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.09);
  border: 1px solid rgba(96, 165, 250, 0.30);
  font-size: 12.5px;
  color: var(--scan-ink-2);
  line-height: 1.5;
}
.scan-unread-note strong { color: #93c5fd; }
.scan-tactics {
  margin-top: 14px;
}
.scan-tactics-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--scan-ink-4);
  margin-bottom: 8px;
}
.scan-tactics-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.scan-tactic-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--verdict-fg);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--verdict-fg);
  border-radius: 999px;
  padding: 4px 11px;
  line-height: 1.3;
  cursor: default;
}
.scan-model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.scan-model-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--scan-ink-4);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.scan-again-btn {
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(91,107,255,0.4);
  background: rgba(91,107,255,0.10);
  color: var(--scan-accent-text);
  cursor: pointer;
  transition: background 0.12s;
}
.scan-again-btn:hover { background: rgba(91,107,255,0.18); }

/* Verdict themes */
.scan-result-card[data-verdict="ok"] {
  --verdict-bg: rgba(34,197,94,0.07);
  --verdict-border: rgba(34,197,94,0.30);
  --verdict-fg: var(--scan-ok-fg);
  --verdict-icon-bg: rgba(34,197,94,0.14);
}
.scan-result-card[data-verdict="watch"] {
  --verdict-bg: rgba(192,123,255,0.07);
  --verdict-border: rgba(192,123,255,0.30);
  --verdict-fg: var(--scan-watch-fg);
  --verdict-icon-bg: rgba(192,123,255,0.14);
}
.scan-result-card[data-verdict="warn"] {
  --verdict-bg: rgba(245,158,11,0.07);
  --verdict-border: rgba(245,158,11,0.30);
  --verdict-fg: var(--scan-warn-fg);
  --verdict-icon-bg: rgba(245,158,11,0.14);
}
.scan-result-card[data-verdict="block"] {
  --verdict-bg: rgba(239,68,68,0.07);
  --verdict-border: rgba(239,68,68,0.32);
  --verdict-fg: var(--scan-block-fg);
  --verdict-icon-bg: rgba(239,68,68,0.14);
}

/* Error state */
.scan-error {
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.06);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--scan-block-fg);
  margin-top: 12px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(20px + 14px);
  padding-right: calc(20px + 14px);
  box-sizing: border-box;
}

/* Privacy footer */
.scan-privacy {
  text-align: center;
  font-size: 11px;
  color: var(--scan-ink-5);
  letter-spacing: 0.04em;
  padding: 0 20px 60px;
  max-width: 680px;
  margin: 0 auto;
}
.scan-privacy-sep { margin: 0 8px; opacity: 0.5; }

/* Responsive */
@media (max-width: 540px) {
  .scan-kinds { gap: 5px; }
  .scan-kind { font-size: 11.5px; padding: 5px 11px; }
  .scan-input-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .scan-char-count { margin-right: 0; }
  .scan-verdict-conf { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scan-badge-dot { animation: none; }
  .scan-result { animation: none; }
  .scan-btn { transition: none; }
}

/* ── Conversion path ──────────────────────────────────────────────────────
   The demo pages used to end at the result panel. Someone who had just been
   handed a real verdict — the highest-intent moment the site has — was offered
   nothing to do next. Shared by /scan/ and /predict/. */
.scan-next {
  max-width: 720px;
  margin: 44px auto 8px;
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.scan-next h2 { margin: 0 0 10px; font-size: clamp(20px, 3vw, 27px); line-height: 1.25; }
.scan-next p { margin: 0 auto 20px; max-width: 56ch; line-height: 1.6; opacity: 0.85; }

/* ============================================================
 * Result-card sections the server always sent and this page
 * never rendered. Audit 2026-09-09.
 *   .scan-support  — the high-stakes resource floor
 *   .scan-route    — the one independent verification check
 *   .scan-ai-note  — the EU AI Act Art. 50 disclosure
 * ============================================================ */

/* ── High-stakes support ────────────────────────────────────
 * Present only for the categories the safety doctrine reserves for
 * "human review + resources ONLY". It sits at the TOP of the card and
 * is the most prominent thing on it when it appears — quiet urgency,
 * not alarm: someone reading this may be in the middle of the worst
 * hour of their year, and a flashing red panel is not help. */
.scan-support {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(127, 207, 230, 0.07);
  border: 1px solid rgba(127, 207, 230, 0.30);
}
.scan-support-h {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--scan-ink-1, #e7eef7);
}
.scan-support-intro {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--scan-ink-2, #94a3b8);
}
.scan-support-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scan-support-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.scan-support-name    { font-size: 13px; font-weight: 700; color: var(--scan-ink-1, #e7eef7); }
.scan-support-what    { font-size: 12.5px; line-height: 1.5; color: var(--scan-ink-2, #94a3b8); }
/* The contact string is the single most important character sequence on
   the card when this block shows. It is selectable, wraps rather than
   truncates, and is never abbreviated. */
.scan-support-contact {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #7fcfe6;
  user-select: all;
  overflow-wrap: anywhere;
}
.scan-support-when    { font-size: 12px; color: var(--scan-ink-3, #6b7588); }
.scan-support-link {
  align-self: flex-start;
  margin-top: 4px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.32);
}
.scan-support-link:hover { background: rgba(59, 130, 246, 0.20); color: #dbeafe; }

/* ── Verification route ─────────────────────────────────────
 * The actionable half of a warning. Styled as instruction, not as
 * decoration: the check itself is the largest text in the block. */
.scan-route {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-inline-start: 3px solid rgba(127, 207, 230, 0.55);
}
.scan-route-h {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #7fcfe6;
}
.scan-route-check {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--scan-ink-1, #e7eef7);
}
.scan-route-why,
.scan-route-genuine {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--scan-ink-2, #94a3b8);
}
.scan-route-not-h {
  margin: 11px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #f5b066;
}
.scan-route-not {
  margin: 5px 0 0;
  padding-inline-start: 18px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--scan-ink-2, #94a3b8);
}
.scan-route-not li { margin-top: 3px; }

/* ── AI disclosure (EU AI Act Art. 50) ──────────────────────
 * Subtle, but never hidden and never behind a disclosure toggle: the
 * server sends it on every verdict precisely so it is always on screen.
 * Contrast is kept above the 4.5:1 floor rather than faded to grey. */
.scan-ai-note {
  margin: 14px 0 0;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  line-height: 1.5;
  color: var(--scan-ink-2, #94a3b8);
}

.scan-support-link:focus-visible {
  outline: 2px solid #7fcfe6;
  outline-offset: 2px;
}

/* ── Clarifying questions ──────────────────────────────────────────────────
   The web front door used to stop at a verdict even when the engine had said
   which fact it was missing — the phone and desktop shells both ask. This is
   that block: the question, an honest note that the read above was made
   without the answer, and three replies. Styled as a quiet prompt rather than
   an alarm, because a question is not a finding. */
.scan-clarify {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
}
.scan-clarify-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--scan-ink-2);
  margin-bottom: 6px;
}
.scan-clarify-note {
  font-size: 12px;
  color: var(--scan-ink-2);
  line-height: 1.5;
}
.scan-clarify-q {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--scan-ink-1);
}
.scan-clarify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.scan-clarify-btn {
  appearance: none;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  color: var(--scan-ink-1);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: background 120ms ease, border-color 120ms ease;
}
.scan-clarify-btn:hover { background: rgba(255,255,255,0.11); }
.scan-clarify-btn:focus-visible {
  outline: 2px solid var(--scan-accent, #7aa2ff);
  outline-offset: 2px;
}
.scan-clarify-done {
  font-size: 13px;
  line-height: 1.5;
  color: var(--scan-ink-1);
}

/* ── "Not enough information" ─────────────────────────────────────────────
   A message that asks you to send money, hand over a code, install something
   or follow a link is safe or unsafe depending on WHO sent it — a fact no
   amount of text analysis can supply. This card used to render such a message
   GREEN, because the verdict had only two directions and "undetermined" fell
   into "safe". A reader shown green stops thinking.

   Amber, not slate: the owner's rule is that an unverified ask is NOT safe
   until the reader confirms who sent it. Still no accusation (the label says
   "not confirmed safe", not "scam"); the question underneath settles it. */
.scan-result-card[data-verdict="unknown"] {
  --verdict-bg: rgba(245,158,11,0.10);
  --verdict-border: rgba(245,158,11,0.40);
  --verdict-fg: #f59e0b;
  --verdict-icon-bg: rgba(245,158,11,0.16);
}

/* ============================================================
 * THE ANALYST READ
 * ------------------------------------------------------------
 * The server always sent `analyst_read`; the card never drew it, so a
 * link check read "Worth a look · 93% confidence" over "Lack of
 * context". This is the block that replaces a number with something a
 * person can do.
 *
 * Typographic rather than decorative. It is the most important prose on
 * the card, so it is set LARGER than the findings beneath it, with a
 * quiet inline-start rule tinted to the verdict instead of a second
 * coloured panel competing with the band above it. Every offset is a
 * logical property, so Arabic mirrors without a single [dir] override.
 * ============================================================ */
.scan-read {
  margin-top: 16px;
  padding: 2px 0 2px 0;
  padding-inline-start: 15px;
  border-inline-start: 2px solid var(--verdict-fg, #7fcfe6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.scan-read-block { display: block; }
.scan-read-h {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--scan-ink-3, #64748b);
}
/* The single sentence the whole card exists to deliver. */
.scan-read-ask {
  margin: 7px 0 0;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--scan-ink-0, #f8fafc);
  text-wrap: pretty;
}
/* "This step cannot be undone." Calm, not alarming: a statement of fact
   about the mechanics of the ask, which is why it is a lock rather than a
   warning triangle and why it never blinks or reddens. */
.scan-read-irreversible {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 9px 0 0;
  padding: 5px 11px;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.34);
}
.scan-read-irreversible-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 14px;
  height: 14px;
}
.scan-read-irreversible-icon svg { width: 100%; height: 100%; stroke: currentColor; }
.scan-read-identity {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--scan-ink-2, #94a3b8);
}
/* Ordered, because the order is the advice. The numeral sits in the
   margin so the step text keeps one left edge with everything else. */
.scan-read-steps {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: scan-read-step;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.scan-read-steps li {
  counter-increment: scan-read-step;
  position: relative;
  padding-inline-start: 28px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--scan-ink-1, #e2e8f0);
}
.scan-read-steps li::before {
  content: counter(scan-read-step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--verdict-fg, #7fcfe6);
  background: var(--verdict-icon-bg, rgba(255,255,255,0.06));
}
/* The lever, folded away. It is the sentence that generalises to the next
   approach; it is not what someone needs in the first five seconds. */
.scan-read-lever {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scan-read-lever > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
  border-radius: 10px;
}
.scan-read-lever > summary::-webkit-details-marker { display: none; }
.scan-read-lever > summary:hover { background: rgba(255, 255, 255, 0.04); }
.scan-read-lever > summary:focus-visible {
  outline: 2px solid var(--scan-accent, #5B6BFF);
  outline-offset: 2px;
}
.scan-read-lever-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 17px;
  height: 17px;
  color: var(--scan-ink-3, #64748b);
}
.scan-read-lever-icon svg { width: 100%; height: 100%; stroke: currentColor; }
.scan-read-lever-sum {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.scan-read-lever-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--scan-ink-3, #64748b);
}
.scan-read-lever-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--scan-ink-1, #e2e8f0);
  overflow-wrap: anywhere;
}
.scan-read-lever-chev {
  flex-shrink: 0;
  display: inline-flex;
  width: 15px;
  height: 15px;
  color: var(--scan-ink-3, #64748b);
  transition: transform 140ms var(--vlx-ease-out, ease);
}
.scan-read-lever-chev svg { width: 100%; height: 100%; stroke: currentColor; }
.scan-read-lever[open] .scan-read-lever-chev { transform: rotate(90deg); }
/* Mirrored for Arabic: the chevron points the way reading runs. */
[dir="rtl"] .scan-read-lever-chev { transform: scaleX(-1); }
[dir="rtl"] .scan-read-lever[open] .scan-read-lever-chev { transform: scaleX(-1) rotate(90deg); }
.scan-read-lever-how {
  margin: 0;
  padding: 0 13px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--scan-ink-2, #94a3b8);
}

@media (max-width: 540px) {
  .scan-read { padding-inline-start: 12px; gap: 14px; }
  .scan-read-ask { font-size: 15.5px; }
  .scan-read-steps li { font-size: 13px; padding-inline-start: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .scan-read-lever-chev { transition: none; }
}

/* The findings follow the read and the question now, so they need the gap the
   header used to give them. `.scan-clarify` is always in the DOM (hidden until
   a question arrives), so this one selector covers every combination. */
.scan-clarify + .scan-reasons { margin-top: 16px; }
/* ── Support band — the review_only rung of the shared response ladder ─────
   The high-stakes floor (grooming, sextortion, trafficking ...) is human
   review + resources ONLY. A red "Dangerous" band there reads as an automated
   verdict, so the card goes calm: blue, resources first (scan-response.js). */
.scan-result-card[data-verdict="support"] {
  --verdict-bg: rgba(96,165,250,0.08);
  --verdict-border: rgba(96,165,250,0.34);
  --verdict-fg: #93c5fd;
  --verdict-icon-bg: rgba(96,165,250,0.16);
}
.scan-plan-note {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--scan-ink-0);
}

/* ── Context check — "who is asking?" ─────────────────────────────────────
   A message that asks for money, a code, an install, a link or an account
   action cannot be cleared from its text alone; the server sends a few
   questions instead of a green. The band is AMBER, not slate: there is a
   concrete ask on the table and the reader has something to do. The questions
   are drawn as a conversation — the bot asks, the reader replies. */
.scan-result-card[data-verdict="context"] {
  --verdict-bg: rgba(245,158,11,0.07);
  --verdict-border: rgba(245,158,11,0.34);
  --verdict-fg: var(--scan-warn-fg);
  --verdict-icon-bg: rgba(245,158,11,0.14);
}
.scan-context { margin-top: 14px; }
.scan-context-headline {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--scan-ink-0);
}
.scan-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scan-chat-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.scan-chat-bubble--bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-end-start-radius: 4px;
  color: var(--scan-ink-1);
}
.scan-chat-bubble--me {
  align-self: flex-end;
  background: rgba(91,107,255,0.16);
  border: 1px solid rgba(91,107,255,0.34);
  border-end-end-radius: 4px;
  color: var(--scan-ink-0);
}
.scan-chat-text { margin: 0; }
.scan-chat-why {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--scan-ink-2);
}
.scan-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.scan-chat-btn[aria-pressed="true"] {
  background: rgba(91,107,255,0.22);
  border-color: rgba(91,107,255,0.6);
  color: var(--scan-ink-0);
}
.scan-chat-btn:disabled { opacity: 0.55; cursor: default; }
.scan-chat-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.scan-chat-status {
  margin: 0;
  font-size: 12.5px;
  color: var(--scan-ink-2);
}
.scan-chat-status:empty { display: none; }
.scan-steps {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-inline-start: 3px solid rgba(127, 207, 230, 0.55);
}
.scan-steps-list {
  margin: 8px 0 0;
  padding-inline-start: 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--scan-ink-1);
}
.scan-steps-list li { margin-top: 4px; }

/* "We couldn't judge this" — like the unread note, a statement about what we
   were given, not about the sender. */
.scan-evidence-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(148,163,184,0.08);
  border: 1px solid rgba(148,163,184,0.30);
  font-size: 12.5px;
  color: var(--scan-ink-2);
  line-height: 1.5;
}
.scan-evidence-note strong { color: var(--scan-ink-1); }
.scan-evidence-ask-h { margin: 8px 0 0; color: var(--scan-ink-1); }
.scan-evidence-ask { margin: 4px 0 0; padding-inline-start: 18px; }

/* ── Assessment (signed-in): what we see, what could come next ──
 * Folded away under the route. Explains the band, never restates it as
 * alarm: no number, a planning window, and the limits always listed. */
.scan-assess {
  margin-top: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scan-assess-sum {
  padding: 10px 13px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--scan-ink-1, #e2e8f0);
  border-radius: 10px;
}
.scan-assess-sum:hover { background: rgba(255, 255, 255, 0.04); }
.scan-assess-sum:focus-visible {
  outline: 2px solid var(--scan-accent, #5B6BFF);
  outline-offset: 2px;
}
.scan-assess-body { padding: 0 13px 12px; }
.scan-assess-row {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--scan-ink-2, #94a3b8);
}
.scan-assess-k {
  font-weight: 700;
  color: var(--scan-ink-1, #e2e8f0);
}
.scan-assess-lim-h {
  margin: 11px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--scan-ink-3, #64748b);
}
.scan-assess-lim {
  margin: 4px 0 0;
  padding-inline-start: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--scan-ink-2, #94a3b8);
}
.scan-assess-lim li { margin-top: 3px; }

/* "Why, and why not": the two readings of the same evidence, folded away. */
.scan-why {
  margin-top: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scan-why-sum {
  padding: 10px 13px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--scan-ink-1, #e2e8f0);
  border-radius: 10px;
}
.scan-why-sum:hover { background: rgba(255, 255, 255, 0.04); }
.scan-why-sum:focus-visible {
  outline: 2px solid var(--scan-accent, #5B6BFF);
  outline-offset: 2px;
}
.scan-why-body { padding: 0 13px 12px; }
.scan-why-hyp {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-inline-start: 3px solid rgba(148, 163, 184, 0.5);
}
.scan-why-hyp[data-kind="threat"] { border-inline-start-color: rgba(248, 113, 113, 0.7); }
.scan-why-hyp[data-kind="ordinary"] { border-inline-start-color: rgba(96, 165, 250, 0.7); }
.scan-why-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--scan-ink-1, #e2e8f0);
}
.scan-why-k { font-weight: 700; }
.scan-why-sub {
  margin: 8px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--scan-ink-3, #64748b);
}
.scan-why-list {
  margin: 3px 0 0;
  padding-inline-start: 18px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--scan-ink-2, #94a3b8);
}
.scan-why-list li { margin-top: 2px; }
.scan-why-none {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--scan-ink-3, #64748b);
  font-style: italic;
}
.scan-why-change {
  margin: 9px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--scan-ink-2, #94a3b8);
}
.scan-why-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--scan-ink-3, #64748b);
}

/* A reassuring answer set aside: a calm pause and an open question. */
.scan-coaching {
  margin: 10px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-inline-start: 3px solid rgba(127, 207, 230, 0.55);
}
.scan-coaching-guidance,
.scan-coaching-q {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--scan-ink-1, #e2e8f0);
}
.scan-coaching-q {
  margin-top: 7px;
  color: var(--scan-ink-2, #94a3b8);
  font-style: italic;
}

/* "Report this as a scam" (scan-report.js): signed in, never on the
   review-only floor. Same pill shape as "Scan another". */
.scan-report { margin-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.scan-report-btn {
  font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(91,107,255,0.4); background: rgba(91,107,255,0.10);
  color: var(--scan-accent-text); cursor: pointer;
}
.scan-report-btn:hover { background: rgba(91,107,255,0.18); }
.scan-report-btn:disabled { cursor: default; opacity: 0.7; }
.scan-report-btn--ghost { background: transparent; }
.scan-report-hint, .scan-report-msg { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--scan-ink-2); }
.scan-report-link { font-size: 12.5px; font-weight: 700; color: var(--scan-accent-link); }

/* Platform actions beside a verdict (scan-platform.js): "Explain this" and the
   consented outcome check-in. Same pill as "Report this as a scam". */
.scan-plat { margin-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.scan-plat-btn {
  font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(91,107,255,0.4); background: rgba(91,107,255,0.10);
  color: var(--scan-accent-text); cursor: pointer;
}
.scan-plat-btn:hover { background: rgba(91,107,255,0.18); }
.scan-plat-btn:disabled { cursor: default; opacity: 0.7; }
.scan-plat-btn--ghost { background: transparent; }
.scan-plat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-plat-h { margin: 0; font-size: 13px; font-weight: 700; color: var(--scan-ink-1); }
.scan-plat-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--scan-ink-1); }
.scan-plat-msg, .scan-plat-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--scan-ink-2); }
.scan-plat-warn { margin: 0; font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--scan-warn-fg); }
.scan-plat-link { font-size: 12.5px; font-weight: 700; color: var(--scan-accent-link); }
.scan-plat-explain { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.scan-plat-list { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; color: var(--scan-ink-2); }

/* "Check a document or profile" */
.scan-pc { max-width: 680px; margin: 0 auto 32px; padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.scan-pc-h { margin: 0; font-size: 18px; font-weight: 700; color: var(--scan-ink-0); }
.scan-pc-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.scan-pc-form { display: flex; flex-direction: column; gap: 8px; }
.scan-pc-label, .scan-pc-note { font-size: 13px; line-height: 1.5; color: var(--scan-ink-2); margin: 0; }
.scan-pc-note a { color: var(--scan-accent-link); font-weight: 700; }
.scan-pc-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--scan-ink-1); }
.scan-pc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.scan-pc-row .scan-pc-input:last-child { flex: 1 1 220px; min-width: 0; }
.scan-pc-input, .scan-pc-textarea {
  font: inherit; font-size: 13.5px; color: var(--scan-ink-0); background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; padding: 8px 10px; max-width: 100%;
}
.scan-pc-textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.scan-pc-result { display: flex; flex-direction: column; gap: 6px; }

/* "Was this right?" + tune my alerts (scan-feedback.js). Tap targets >= 44px. */
.scan-vfb { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.scan-vfb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scan-vfb-q { font-size: 13px; font-weight: 700; color: var(--scan-ink-1); margin-inline-end: 4px; }
.scan-vfb-btn, .scan-vfb-chip {
  font: inherit; font-size: 13px; font-weight: 600; min-height: 44px; min-width: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid rgba(91,107,255,0.4); background: transparent;
  color: var(--scan-accent-text); cursor: pointer;
}
.scan-vfb-chip { font-weight: 500; }
.scan-vfb-btn:hover:not(:disabled), .scan-vfb-chip:hover:not(:disabled) { background: rgba(91,107,255,0.12); }
.scan-vfb-btn:focus-visible, .scan-vfb-chip:focus-visible, .scan-vfb-why summary:focus-visible { outline: 2px solid var(--scan-accent-link); outline-offset: 2px; }
.scan-vfb-btn[aria-pressed="true"], .scan-vfb-btn[aria-checked="true"], .scan-vfb-chip[aria-pressed="true"] { background: rgba(91,107,255,0.22); }
.scan-vfb-btn:disabled:not([aria-pressed="true"]), .scan-vfb-chip:disabled:not([aria-pressed="true"]) { opacity: 0.55; cursor: default; }
.scan-vfb-reasons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.scan-vfb-sub, .scan-vfb-status { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--scan-ink-2); }
.scan-vfb-why summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--scan-accent-link); min-height: 44px; display: flex; align-items: center; }
.scan-vfb-tune { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) { .scan-vfb-btn, .scan-vfb-chip { transition: background-color .15s ease; } }

/* ══ P36 result layout ════════════════════════════════════════════════════
   Hero → What to do now → Why → question → actions footer, matching the
   desktop app. Colours ride the existing --verdict-* variables per band. */

/* Mode picker: one row that scrolls sideways when narrow; 44px targets. */
.scan-kinds {
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.scan-kind {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border-color: transparent;
  background: transparent;
  white-space: nowrap;
}
.scan-kind:focus-visible { outline: 2px solid var(--scan-accent-text); outline-offset: 1px; }
.scan-kind[data-kind="auto"]::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-inline-end: 7px; vertical-align: 1px; background: currentColor; opacity: 0.7;
}
.scan-kbd-hint { font-size: 11.5px; color: var(--scan-ink-3); white-space: nowrap; }

/* Hero. */
.scan-hero-v {
  align-items: flex-start;
  gap: 16px;
  margin: -22px -24px 18px;
  padding: 22px 24px 20px;
  border-radius: 18px 18px 0 0;
  background: radial-gradient(120% 160% at 0% 0%, var(--verdict-icon-bg), transparent 62%);
  border-bottom: 1px solid var(--verdict-border);
  animation: scanHeroIn 0.42s cubic-bezier(0.22,1,0.36,1) both;
}
.scan-hero-v .scan-verdict-icon { width: 52px; height: 52px; border-radius: 16px; border: 1px solid var(--verdict-border); }
.scan-hero-v .scan-verdict-icon svg { width: 26px; height: 26px; }
.scan-hero-v-body { min-width: 0; flex: 1; }
.scan-hero-v .scan-verdict-label { margin: 0; font-size: 24px; line-height: 1.2; }
.scan-hero-v-summary { margin: 6px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--scan-ink-0); }
.scan-hero-v-based {
  display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0;
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: var(--scan-accent-text); background: rgba(91,107,255,0.14); border: 1px solid rgba(91,107,255,0.4);
  animation: scanHeroIn 0.36s cubic-bezier(0.22,1,0.36,1) both;
}
.scan-hero-v-based svg { width: 14px; height: 14px; stroke: currentColor; }
@keyframes scanHeroIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.scan-sec-h {
  margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--scan-ink-3, var(--scan-ink-2));
}

/* What to do now: numbered and prominent. */
.scan-read-block--do {
  padding: 16px 18px; border-radius: 14px;
  background: var(--verdict-icon-bg); border: 1px solid var(--verdict-border);
}
.scan-read-block--do .scan-read-h { color: var(--verdict-fg); }
.scan-read-block--do .scan-read-steps { counter-reset: vxstep; list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; }
.scan-read-block--do .scan-read-steps li {
  counter-increment: vxstep; position: relative; padding-inline-start: 40px; min-height: 28px;
  font-size: 14.5px; line-height: 1.55; color: var(--scan-ink-0);
}
.scan-read-block--do .scan-read-steps li::before {
  content: counter(vxstep); position: absolute; inset-inline-start: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--scan-bg); background: var(--verdict-fg);
}

/* Why: rows with icons. */
.scan-why-v { margin-top: 16px; }
.scan-why-v .scan-reasons li {
  align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
}
.scan-reasons-icon {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  background: var(--verdict-icon-bg);
}
.scan-reasons-icon svg { width: 14px; height: 14px; stroke: var(--verdict-fg); }

/* The question: large answers. */
.scan-clarify { border-radius: 16px; }
.scan-clarify-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.scan-clarify-btn { flex: 1 1 110px; min-height: 48px; font-size: 15px; border-radius: 12px; }
.scan-clarify-q { font-size: 15.5px; line-height: 1.5; }

/* Actions footer. */
.scan-actions-v {
  margin: 20px -24px -22px; padding: 16px 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.12);
  border-radius: 0 0 18px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.scan-actions-v button { min-height: 44px; }
.scan-actions-v .scan-model-row { margin: 0; padding: 0; border: 0; }

/* Loading. */
.scan-progress {
  border-radius: 18px; padding: 20px 22px;
  border: 1px solid rgba(91,107,255,0.28); background: rgba(91,107,255,0.05);
}
.scan-progress-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--scan-ink-0); }
.scan-progress-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--scan-accent-text); animation: scanPulse 1.4s ease-in-out infinite; }
@keyframes scanPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.scan-progress-bar { list-style: none; display: flex; gap: 6px; padding: 0; margin: 12px 0 16px; }
.scan-progress-bar li { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.10); }
.scan-progress-bar li.is-now { background: rgba(91,107,255,0.55); }
.scan-progress-bar li.is-done { background: var(--scan-accent-text); }
.scan-skel {
  height: 12px; border-radius: 8px; margin-top: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  background-size: 200% 100%; animation: scanShimmer 1.3s ease-in-out infinite;
}
.scan-skel--hero { height: 56px; border-radius: 14px; margin-top: 0; }
.scan-skel--short { width: 62%; }
@keyframes scanShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.scan-progress-slow { margin: 14px 0 0; font-size: 12.5px; color: var(--scan-ink-2); }

/* Timeout / offline. */
.scan-state {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; border-radius: 18px;
  border: 1px solid rgba(245,158,11,0.35); background: rgba(245,158,11,0.06);
}
.scan-state-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(245,158,11,0.14); }
.scan-state-icon svg { width: 22px; height: 22px; stroke: var(--scan-warn-fg); }
.scan-state-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--scan-ink-0); }
.scan-state-body { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--scan-ink-2); }
.scan-state-actions { margin-top: 12px; }
.scan-state-actions .scan-btn { width: auto; min-height: 44px; padding: 0 22px; }

@media (max-width: 540px) {
  .scan-kind { font-size: 12.5px; padding: 0 13px; }
  .scan-hero-v { flex-direction: column; }
  .scan-clarify-btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-hero-v, .scan-hero-v-based, .scan-progress-dot, .scan-skel { animation: none; }
}
.scan-actions-v > [hidden] { display: none !important; }
.scan-actions-v > * { margin-top: 0 !important; margin-bottom: 0 !important; }

/* Share-for-accuracy: a toggle with the explanation behind an info button. */
.scan-report-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scan-report-share-label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 13px; color: var(--scan-ink-1); }
.scan-switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0;
  width: 40px; height: 24px; border-radius: 999px; position: relative; cursor: pointer;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.18);
  transition: background 0.15s;
}
.scan-switch::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--scan-ink-0); transition: transform 0.15s;
}
.scan-switch:checked { background: rgba(91,107,255,0.75); border-color: rgba(91,107,255,0.9); }
.scan-switch:checked::after { transform: translateX(16px); }
[dir="rtl"] .scan-switch:checked::after { transform: translateX(-16px); }
.scan-switch:focus-visible, .scan-report-info:focus-visible { outline: 2px solid var(--scan-accent-text); outline-offset: 2px; }
.scan-report-info {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 13px; color: var(--scan-ink-2);
  display: inline-grid; place-items: center;
}
.scan-report-tip { margin: 0; }
@media (prefers-reduced-motion: reduce) { .scan-switch, .scan-switch::after { transition: none; } }
