/* ──────────────────────────────────────────────────────────────────────────
   style.css – PhishGuard UI
   Visual language: modern, editorial, fluid. Large type and generous space,
   frosted-glass surfaces with barely-there borders, slow colour fields that
   drift behind the page, and content that eases in as you scroll.
   Every ambient motion is slow (≥ 7 s) and low-contrast so it never tires.
   ────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --bg:        #06080f;
  --bg-card:   #0d111b;
  --bg-card2:  #121826;
  --surface:   rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border:    rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);
  --text:      #f3f5f9;
  --text-muted:#9aa3b2;
  /* --text-dim clears 4.5:1 (WCAG AA) on the page, cards and hovered glass surfaces. */
  --text-dim:  #858d9d;
  --accent:    #5ad1ff;
  --accent-2:  #7c8cff;
  --accent2:   #3fd58f;
  --red:       #ff5c6c;
  --orange:    #ff8a4c;
  --yellow:    #f0c05a;
  --purple:    #b48cff;
  --info:      #6fb6ff;
  /* The same colours as channels, for tints: rgba(var(--accent-rgb), 0.12). Defined once, not per theme,
     so a tint is the same in both themes, as the literal values were. */
  --accent-rgb:   90, 209, 255;
  --accent-2-rgb: 124, 140, 255;
  --accent2-rgb:  63, 213, 143;
  --red-rgb:      255, 92, 108;
  --orange-rgb:   255, 138, 76;
  --yellow-rgb:   240, 192, 90;
  --purple-rgb:   180, 140, 255;
  --info-rgb:     111, 182, 255;
  --ink-rgb:      15, 23, 42;
  --radius-lg: 28px;
  --radius:    20px;
  --radius-sm: 14px;
  --pill:      999px;
  --radius-xs:  10px;
  --radius-2xs: 6px;
  --focus-ring: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
  /* Type scale. Fields stay at --text-lg (16px) or more so that iOS does not zoom in on focus. */
  --text-2xs:  11px;
  --text-xs:   12px;
  --text-sm:   13px;
  --text-md:   14px;
  --text-base: 15px;
  --text-lg:   16px;
  --text-xl:   17px;
  --text-2xl:  20px;
  --text-3xl:  22px;
  --text-4xl:  24px;
  --text-5xl:  28px;
  --text-6xl:  36px;
  --text-7xl:  44px;
  --shadow:    0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 28px rgba(0, 0, 0, 0.35);
  --ease:      cubic-bezier(0.22, 0.61, 0.21, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  --sheen:     linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 45%);
  --glass-bg:        rgba(10, 13, 22, 0.58);
  --glass-bg-strong: rgba(10, 13, 22, 0.80);
  --field-bg:        rgba(6, 8, 15, 0.55);
  --field-bg-focus:  rgba(6, 8, 15, 0.85);
  --fill:            rgba(255, 255, 255, 0.06);
  --fill-soft:       rgba(255, 255, 255, 0.035);
  --line:            rgba(255, 255, 255, 0.08);
  --line-soft:       rgba(255, 255, 255, 0.05);
  --track:           rgba(255, 255, 255, 0.08);
  --on-accent:       #06080f;
}

html { scroll-behavior: smooth; }
/* Keep anchor targets clear of the floating navbar */
[id] { scroll-margin-top: 84px; }

body {
  position: relative; z-index: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Fluid ambient background ────────────────────────────────────────────── */
.bg-fluid {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.blob {
  position: absolute; border-radius: 50%; will-change: transform;
  mix-blend-mode: screen;
}
.blob-1 {
  width: 68vmax; height: 68vmax; top: -30vmax; left: -18vmax;
  background: radial-gradient(circle, rgba(var(--accent-rgb),0.20) 0%, rgba(var(--accent-rgb),0.06) 38%, transparent 68%);
  animation: drift-a 46s ease-in-out infinite alternate;
}
.blob-2 {
  width: 62vmax; height: 62vmax; top: 4vmax; right: -26vmax;
  background: radial-gradient(circle, rgba(var(--accent-2-rgb),0.18) 0%, rgba(var(--accent-2-rgb),0.05) 40%, transparent 68%);
  animation: drift-b 58s ease-in-out infinite alternate;
}
.blob-3 {
  width: 56vmax; height: 56vmax; bottom: -28vmax; left: 22vmax;
  background: radial-gradient(circle, rgba(var(--accent2-rgb),0.13) 0%, rgba(var(--accent2-rgb),0.04) 40%, transparent 68%);
  animation: drift-c 52s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(0,0,0) scale(1); }        to { transform: translate3d(9vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift-b { from { transform: translate3d(0,0,0) scale(1.05); }     to { transform: translate3d(-8vmax, 10vmax, 0) scale(0.96); } }
@keyframes drift-c { from { transform: translate3d(0,0,0) scale(0.98); }     to { transform: translate3d(7vmax, -7vmax, 0) scale(1.06); } }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: var(--surface); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: var(--radius-2xs); font-size: var(--text-sm); font-family: var(--font-mono);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-2xs); }
::selection { background: rgba(var(--accent-rgb),0.28); color: #fff; }

/* Scroll reveal. Implemented as a keyframe animation (not a transition) so
   elements that declare their own hover transitions cannot override the
   opacity easing. JS toggles: .in-view (entered), .from-above (entered from
   the top edge, so it drifts down instead of rising), .settled (animation done →
   fill dropped so hover transforms work). --reveal-delay is set per batch. */
.reveal { opacity: 0; }
.reveal.in-view {
  animation: reveal-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}
.reveal.in-view.from-above { animation-name: reveal-in-down; }
.reveal.in-view.settled { animation: none; opacity: 1; }
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes reveal-in-down {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: none; }
}

.pulse-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.16);
  animation: pulse-soft 3s ease-in-out infinite;
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 0 2px rgba(var(--accent-rgb),0.10); }
  50%      { opacity: 1;   box-shadow: 0 0 0 5px rgba(var(--accent-rgb),0.16); }
}

/* ── Floating glass navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  padding: 12px 16px 0;
  transition: padding 0.3s var(--ease);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 10px 0 20px;
  height: 54px; display: flex; align-items: center; justify-content: space-between;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border); border-radius: var(--pill);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled .nav-inner { background: var(--glass-bg-strong); border-color: var(--border-hi); box-shadow: 0 14px 44px rgba(0,0,0,0.35); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--text-xl); letter-spacing: -0.01em; }
.shield-icon { font-size: var(--text-2xl); }
.brand-mark {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(var(--accent-rgb),0.28);
}
.brand-mark svg { width: 16px; height: 16px; }
.nav-links { list-style: none; display: flex; gap: 4px; }
.nav-links a {
  display: inline-block; color: var(--text-muted); font-size: var(--text-md); font-weight: 500;
  padding: 8px 14px; border-radius: var(--pill);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 66px);
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  align-items: center; gap: 56px;
  max-width: 1200px; margin: 0 auto; padding: 72px 24px 80px;
}
.hero-content { animation: hero-in 1.1s var(--ease) both; }
.hero-visual  { animation: hero-in 1.3s var(--ease) 0.15s both; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); padding: 7px 14px 7px 12px; border-radius: var(--pill);
  font-size: var(--text-sm); font-weight: 500; letter-spacing: 0.01em;
  margin-bottom: 26px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero-title {
  font-size: clamp(40px, 5.6vw, 72px); font-weight: 700;
  line-height: 1.04; margin-bottom: 24px; letter-spacing: -0.035em;
}
.gradient-text {
  background: linear-gradient(100deg, #8fe6ff 0%, #5ad1ff 30%, #7c8cff 62%, #3fd58f 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradient-flow 14s ease-in-out infinite alternate;
}
@keyframes gradient-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.hero-subtitle { color: var(--text-muted); font-size: var(--text-xl); max-width: 520px; margin-bottom: 40px; line-height: 1.6; letter-spacing: -0.005em; }
.hero-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 40px; }
.stat-card {
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 12px; text-align: center;
  transition: transform 0.4s var(--ease), border-color 0.3s, background 0.3s;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--border-hi); background: var(--sheen), var(--surface-2); }
.stat-value {
  font-size: var(--text-4xl); font-weight: 700; color: var(--text);
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.stat-label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px; }
.stat-value.stat-text {
  display: flex; align-items: center; justify-content: center; min-height: 36px;
  font-size: var(--text-md); line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance;
}

/* Balanced headings and orphan-free paragraphs where supported. */
h1, h2, h3, .hero-title, .bento-title, .step-title { text-wrap: balance; }
p, .hero-subtitle, .step-desc, .bento-desc, .cat-desc, .di-col p { text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Hero visual — fluid orb */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.orb-scene { position: relative; width: 380px; height: 380px; }
.orb {
  position: absolute; inset: 40px;
  background: conic-gradient(from 210deg, #5ad1ff, #7c8cff 35%, #3fd58f 65%, #5ad1ff);
  filter: blur(34px) saturate(120%);
  opacity: 0.55;
  border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%;
  animation: orb-morph 18s ease-in-out infinite alternate, spin-slow 90s linear infinite;
}
@keyframes orb-morph {
  0%   { border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%; transform: scale(1); }
  50%  { border-radius: 58% 42% 44% 56% / 40% 58% 42% 60%; transform: scale(1.06); }
  100% { border-radius: 42% 58% 52% 48% / 56% 46% 54% 44%; transform: scale(0.98); }
}
@keyframes spin-slow { from { rotate: 0deg; } to { rotate: 360deg; } }
.orb-ring {
  position: absolute; inset: 18px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 0 60px rgba(255,255,255,0.03);
  animation: ring-breathe 12s ease-in-out infinite alternate;
}
.orb-ring-2 { inset: -6px; border-color: rgba(255,255,255,0.05); animation-delay: -6s; }
@keyframes ring-breathe { from { transform: scale(0.985); opacity: 0.8; } to { transform: scale(1.015); opacity: 1; } }
.orb-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 150px; height: 150px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
  color: var(--text);
}
.orb-core svg { width: 40px; height: 40px; }
.orb-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: 500; letter-spacing: 0.01em; }

.orb-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--pill);
  background: var(--glass-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 34px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.10);
  font-size: var(--text-sm); font-weight: 500; color: var(--text); white-space: nowrap;
  animation: float 9s ease-in-out infinite alternate;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.chip-1 { top: 24px;  left: -6px;   animation-delay: 0s; }
.chip-2 { top: 78px;  right: -34px; animation-delay: -3s; }
.chip-2 .chip-dot { background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.chip-3 { bottom: 74px; left: -42px; animation-delay: -5.5s; }
.chip-3 .chip-dot { background: var(--accent2); box-shadow: 0 0 10px var(--accent2); }
.chip-4 { bottom: 18px; right: 6px; animation-delay: -7.5s; }
.chip-4 .chip-dot { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
@keyframes float { from { transform: translateY(-7px); } to { transform: translateY(7px); } }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--pill);
  font-weight: 600; font-size: var(--text-base); cursor: pointer; border: none;
  letter-spacing: -0.005em;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, filter 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, #7fdcff 0%, var(--accent) 40%, var(--accent-2) 100%);
  color: var(--on-accent); box-shadow: 0 10px 30px rgba(var(--accent-rgb),0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(var(--accent-rgb),0.32); filter: saturate(112%); text-decoration: none; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-outline {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--border-hi); transform: translateY(-2px); text-decoration: none; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { position: relative; padding: 110px 24px; }
.section-dark {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.02) 12%, rgba(255,255,255,0.02) 88%, rgba(255,255,255,0) 100%);
}
.container { max-width: 1200px; margin: 0 auto; }
/* The archived course benchmark is not about this product: its results stay collapsed. */
.benchmark-details > summary { display: flex; justify-content: center; list-style: none; cursor: pointer; }
.benchmark-details > summary::-webkit-details-marker { display: none; }
.benchmark-summary span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 18px;
  border: 1px solid var(--border); border-radius: var(--pill); background: var(--sheen), var(--surface);
  font-size: var(--text-md); font-weight: 600; color: var(--text-muted); transition: color 0.2s, border-color 0.2s;
}
.benchmark-summary span::after {
  content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease);
}
.benchmark-details[open] > .benchmark-summary { margin-bottom: 28px; }
.benchmark-details[open] > .benchmark-summary span::after { transform: rotate(-135deg) translateY(-2px); }
.benchmark-summary:hover span { color: var(--accent); border-color: var(--accent); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  display: inline-block; font-size: var(--text-md); font-weight: 600; letter-spacing: 0.01em;
  color: var(--accent); margin-bottom: 14px;
}
.section-header h2 { font-size: clamp(32px, 4.2vw, 48px); font-weight: 700; margin-bottom: 14px; letter-spacing: -0.03em; line-height: 1.08; }
.section-header p { color: var(--text-muted); max-width: 640px; margin: 0 auto; font-size: var(--text-xl); line-height: 1.55; }

/* ── Email Input Card ────────────────────────────────────────────────────── */
.email-input-card {
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 28px 22px;
  margin-bottom: 32px; box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.email-input-row { display: flex; gap: 12px; align-items: stretch; }

.email-input-wrap {
  flex: 1; position: relative; display: flex; align-items: center;
  background: var(--field-bg); border: 1px solid var(--border);
  border-radius: var(--pill); overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.email-input-wrap:focus-within { border-color: rgba(var(--accent-rgb),0.6); box-shadow: var(--focus-ring); background: var(--field-bg-focus); }
.email-input-wrap.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.email-icon { padding: 0 8px 0 18px; font-size: var(--text-lg); color: var(--text-muted); flex-shrink: 0; }
.email-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: var(--text-base); padding: 15px 0;
  font-family: var(--font-mono);
}
.email-input::placeholder { color: var(--text-dim); font-family: inherit; }

.btn-clear {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  padding: 0 16px; font-size: var(--text-sm); opacity: 0; pointer-events: none;
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  /* Hidden clear control must leave the tab order too; visibility flips after the fade. */
  visibility: hidden; transition: opacity 0.2s, color 0.2s, visibility 0s linear 0.2s;
}
.btn-clear.visible { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.btn-clear .ico { width: 15px; height: 15px; vertical-align: -0.15em; }
.safety-dot .ico { width: 15px; height: 15px; vertical-align: -0.2em; }
.col-title .ico { width: 14px; height: 14px; vertical-align: 0; color: var(--accent2); }
.btn-clear:hover { color: var(--text); }

.btn-analyze { padding: 0 26px; white-space: nowrap; flex-shrink: 0; height: auto; }

/* Quick examples */
.quick-examples { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.examples-label { font-size: var(--text-sm); color: var(--text-dim); flex-shrink: 0; }
.example-tag {
  padding: 5px 13px; border-radius: var(--pill); font-size: var(--text-xs); font-weight: 500;
  cursor: pointer; border: 1px solid; font-family: var(--font-mono);
  transition: background 0.2s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.example-tag:hover { transform: translateY(-1px); }
.legit-tag { background: rgba(var(--accent2-rgb),0.08); border-color: rgba(var(--accent2-rgb),0.28); color: var(--accent2); }
.legit-tag:hover { background: rgba(var(--accent2-rgb),0.16); }
.phish-tag { background: rgba(var(--red-rgb),0.08); border-color: rgba(var(--red-rgb),0.28); color: var(--red); }
.phish-tag:hover { background: rgba(var(--red-rgb),0.16); }
.disp-tag { background: rgba(var(--purple-rgb),0.08); border-color: rgba(var(--purple-rgb),0.30); color: var(--purple); }
.disp-tag:hover { background: rgba(var(--purple-rgb),0.16); }
.susp-tag { background: rgba(var(--yellow-rgb),0.08); border-color: rgba(var(--yellow-rgb),0.30); color: var(--yellow); }
.susp-tag:hover { background: rgba(var(--yellow-rgb),0.16); }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.loading-area { text-align: center; padding: 48px; }
.loading-spinner {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  margin: 0 auto 18px;
  background: conic-gradient(from 0deg, transparent 0 60%, var(--accent) 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 58%, #000 60%);
          mask: radial-gradient(circle, transparent 0 58%, #000 60%);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-muted); font-size: var(--text-md); }

/* Result-shaped placeholder with the hero's scanning beam. */
.loading-area:has(.skeleton) { padding: 0 0 12px; text-align: left; }
.loading-area .loading-text { text-align: center; margin-top: 14px; }
.skeleton { position: relative; overflow: hidden; border-radius: var(--radius); }
.sk-banner, .sk-card {
  background: var(--sheen), var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.sk-banner { display: flex; align-items: center; gap: 18px; padding: 24px 30px; margin-bottom: 16px; }
.sk-circle { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sk-ring { width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0; border: 7px solid var(--track); }
.sk-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sk-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.skeleton i, .sk-circle {
  display: block; height: 10px; border-radius: var(--pill);
  background: linear-gradient(90deg, var(--fill) 0%, var(--surface-2) 50%, var(--fill) 100%);
  background-size: 200% 100%; animation: sk-shimmer 1.6s ease-in-out infinite;
}
.sk-circle { height: 56px; }
.skeleton .w-30 { width: 30%; } .skeleton .w-40 { width: 40%; } .skeleton .w-45 { width: 45%; }
.skeleton .w-60 { width: 60%; } .skeleton .w-75 { width: 75%; } .skeleton .w-90 { width: 90%; }
.sk-lines .w-45 { height: 14px; }
.sk-beam {
  position: absolute; left: 0; right: 0; top: 0; height: 60px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb),0.10) 60%, rgba(var(--accent-rgb),0.35) 97%, transparent);
  border-bottom: 1px solid rgba(var(--accent-rgb),0.6);
  animation: sk-sweep 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes sk-sweep { from { transform: translateY(-60px); } to { transform: translateY(330px); } }
@media (max-width: 1024px) { .sk-cols { grid-template-columns: 1fr; } .sk-cols .sk-card:nth-child(n+2) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton i, .sk-circle { animation: none; }
  .sk-beam { display: none; }
}

/* View transitions: circular theme reveal from the toggle; short crossfade otherwise. */
::view-transition-group(root) { animation-duration: 0.28s; }
:root.theme-transition::view-transition-old(root),
:root.theme-transition::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.theme-transition::view-transition-new(root) { animation: theme-reveal 0.6s var(--ease) both; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to   { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0)); }
}
.hidden { display: none !important; }

/* ── Disposable Check Card (always-visible result card) ──────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.disposable-check-card { margin-top: 12px; animation: fadeSlideIn 0.6s var(--ease); }
.disposable-check-card.is-disposable {
  border-color: rgba(var(--purple-rgb),0.35);
  background: linear-gradient(135deg, rgba(var(--purple-rgb),0.12), rgba(var(--purple-rgb),0.03)), var(--bg-card);
}
.disposable-check-card.suspected-disposable {
  border-color: rgba(var(--yellow-rgb),0.38);
  background: linear-gradient(135deg, rgba(var(--yellow-rgb),0.12), rgba(var(--yellow-rgb),0.03)), var(--bg-card);
}
.disposable-check-card.not-disposable {
  border-color: rgba(var(--accent2-rgb),0.28);
  background: linear-gradient(135deg, rgba(var(--accent2-rgb),0.10), rgba(var(--accent2-rgb),0.02)), var(--bg-card);
}

.disp-check-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.disp-check-icon { font-size: var(--text-5xl); flex-shrink: 0; line-height: 1; }
.disp-check-body { flex: 1; min-width: 0; }
.disp-check-label { font-size: var(--text-base); font-weight: 700; margin-bottom: 5px; letter-spacing: -0.01em; }
.is-disposable        .disp-check-label { color: var(--purple); }
.suspected-disposable .disp-check-label { color: var(--yellow); }
.not-disposable       .disp-check-label { color: var(--accent2); }
.disp-check-detail { font-size: var(--text-md); color: var(--text-muted); line-height: 1.55; }

.disp-confidence-badge {
  display: inline-block; margin-top: 8px;
  padding: 3px 10px; border-radius: var(--pill); font-size: var(--text-2xs); font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(var(--yellow-rgb),0.14); color: var(--yellow);
  border: 1px solid rgba(var(--yellow-rgb),0.3);
}

.disp-learn-sm {
  display: inline-block; font-size: var(--text-xs); font-weight: 600;
  color: var(--purple); opacity: 0.85; transition: opacity 0.2s;
}
.disp-learn-sm:hover { opacity: 1; text-decoration: none; }
.suspected-disposable .disp-learn-sm { color: var(--yellow); }
.not-disposable .disp-learn-sm { color: var(--accent2); }

/* ── Sender observation history ──────────────────────────────────────────── */
.sender-history-card { margin-top: 12px; animation: fadeSlideIn 0.6s var(--ease); }
.sender-history-row { display: flex; align-items: flex-start; gap: 14px; }
.sender-history-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: var(--radius-xs);
  color: var(--text-muted); background: rgba(141,162,189,0.10);
  border: 1px solid rgba(141,162,189,0.18);
}
.sender-history-icon .ico { width: 21px; height: 21px; }
.sender-history-body { flex: 1; min-width: 0; }
.sender-history-label { font-size: var(--text-base); font-weight: 700; margin-bottom: 5px; letter-spacing: -0.01em; }
.sender-history-detail { font-size: var(--text-md); color: var(--text-muted); line-height: 1.55; }
.history-first .sender-history-icon,
.history-first .sender-history-label,
.history-seen .sender-history-icon,
.history-seen .sender-history-label { color: var(--info); }
.history-unavailable .sender-history-icon,
.history-unavailable .sender-history-label { color: var(--text-muted); }

/* ── Disposable Info Card ────────────────────────────────────────────────── */
.disposable-info-card {
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; margin-top: 32px;
}
/* A summary may hold a heading but no block wrapper: icon, title, line and chevron sit on a grid. */
.di-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
.di-header > .di-icon { grid-row: 1 / span 2; }
.di-header > .di-title { align-self: end; }
.di-header > .di-sub { grid-column: 2; align-self: start; }
.di-icon { font-size: var(--text-6xl); }
.di-title { display: block; font-size: var(--text-2xl); font-weight: 700; color: var(--text); letter-spacing: -0.02em; text-wrap: wrap; transition: color 0.2s; }
.di-sub { display: block; font-size: var(--text-md); color: var(--text-muted); margin-top: 3px; }
/* The guide is a <details>: its header is the summary, and links to #disposable-info open it. */
.disposable-info-card:not([open]) { padding-block: 22px; }
.disposable-info-card > summary { list-style: none; cursor: pointer; }
.disposable-info-card > summary::-webkit-details-marker { display: none; }
.disposable-info-card > summary::after {
  content: ''; grid-column: 3; grid-row: 1 / span 2; width: 8px; height: 8px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease);
}
.disposable-info-card[open] > summary { margin-bottom: 26px; }
.disposable-info-card[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.disposable-info-card > summary:hover .di-title { color: var(--accent); }
.di-body { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-bottom: 24px; }
.di-col h4 { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); margin-bottom: 10px; letter-spacing: 0.01em; }
.di-col p { font-size: var(--text-md); color: var(--text-muted); line-height: 1.65; }
.di-col ul { list-style: none; padding: 0; }
.di-col ul li { font-size: var(--text-md); color: var(--text-muted); padding: 4px 0 4px 16px; position: relative; }
.di-col ul li::before { content: ''; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }
.di-domains { display: flex; flex-wrap: wrap; gap: 6px; }
.di-domains code {
  background: rgba(var(--purple-rgb),0.10); border: 1px solid rgba(var(--purple-rgb),0.2);
  color: var(--purple); padding: 3px 9px; border-radius: var(--pill); font-size: var(--text-2xs);
}
.di-quick-test {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--border);
}
.di-test-label { font-size: var(--text-sm); color: var(--text-dim); flex-shrink: 0; }
.pill-disp         { background: rgba(var(--purple-rgb),0.15); color: var(--purple); }
.pill-disp-suspect { background: rgba(var(--yellow-rgb),0.15); color: var(--yellow); }
@media (max-width: 1024px) { .di-body { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .disposable-banner { flex-wrap: wrap; } }

/* ── Verdict Banner ──────────────────────────────────────────────────────── */
.result-area { margin-top: 4px; }
.verdict-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 30px; border-radius: var(--radius); margin-bottom: 18px;
  border: 1px solid; animation: fadeSlideIn 0.6s var(--ease);
}
.verdict-banner::after {
  content: ''; position: absolute; right: -20%; top: -60%; width: 60%; height: 220%;
  background: radial-gradient(circle, currentColor, transparent 60%); opacity: 0.10; pointer-events: none;
}
.banner-phish   { background: rgba(var(--red-rgb),0.08);  border-color: rgba(var(--red-rgb),0.26);  color: var(--red); }
.banner-legit   { background: rgba(var(--accent2-rgb),0.08);  border-color: rgba(var(--accent2-rgb),0.26);  color: var(--accent2); }
.banner-neutral { background: var(--fill-soft); border-color: var(--border-hi); color: var(--info); }
.banner-neutral .vb-title { color: var(--info); }
.banner-neutral .vb-icon { color: var(--info); background: var(--fill); border-color: var(--border-hi); }
.vb-scope { max-width: 560px; margin: 8px 0 0; font-size: var(--text-sm); line-height: 1.6; color: var(--text-muted); }
.sender-no-risk { font-size: var(--text-sm); line-height: 1.6; color: var(--text-muted); }
.request-error { margin: 12px 0; font-size: var(--text-sm); line-height: 1.6; color: var(--red); }
.banner-suspect { background: rgba(var(--yellow-rgb),0.08);  border-color: rgba(var(--yellow-rgb),0.30);  color: var(--yellow); }
.vb-left { display: flex; align-items: flex-start; gap: 18px; color: var(--text); position: relative; z-index: 1; }
/* The strongest findings, under the verdict: the full lists follow below. */
.key-findings { margin-top: 14px; max-width: 620px; text-align: left; }
.key-findings[hidden] { display: none; }
.kf-title { margin: 0 0 8px; font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.kf-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.kf-item { display: flex; align-items: baseline; gap: 9px; font-size: var(--text-md); line-height: 1.5; color: var(--text); }
.kf-item .level-label { flex-shrink: 0; }
.signals-card { margin-top: 16px; }
.signals-card > summary { display: flex; align-items: center; list-style: none; cursor: pointer; }
.signals-card > summary::-webkit-details-marker { display: none; }
.signals-card > summary .col-title { margin-bottom: 0; transition: color 0.2s; }
.signals-card > summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease);
}
.signals-card[open] > summary { margin-bottom: 16px; }
.signals-card[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.signals-card > summary:hover .col-title { color: var(--accent); }
.vb-icon { font-size: var(--text-6xl); line-height: 1; }
.vb-title { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.02em; }
/* Result headings take focus only so screen readers announce the verdict; they are not controls. */
.vb-title:focus, .crb-title:focus { outline: none; }
.banner-phish   .vb-title { color: var(--red); }
.banner-legit   .vb-title { color: var(--accent2); }
.banner-suspect .vb-title { color: var(--yellow); }
.banner-suspect .vb-prob  { color: var(--yellow); }
.suspect-note {
  margin-top: 8px; font-size: var(--text-sm); color: var(--yellow);
  background: rgba(var(--yellow-rgb),0.10); border: 1px solid rgba(var(--yellow-rgb),0.2); border-radius: var(--radius-xs);
  padding: 6px 11px; max-width: 480px;
}
.vb-email { font-size: var(--text-sm); color: var(--text-muted); margin-top: 3px; font-family: var(--font-mono); }
.vb-right { text-align: right; color: var(--text); position: relative; z-index: 1; }
.vb-prob-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: 500; letter-spacing: 0.01em; }
.vb-prob { font-size: var(--text-7xl); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* ── Result Columns ──────────────────────────────────────────────────────── */
.result-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col-card[hidden] { display: none; }
/* What to do after acting on a risky message; hidden with the result area it follows. */
.remediation-card { margin-top: 16px; padding: 18px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--sheen), var(--surface); }
.remediation-card[hidden], .content-result-area.hidden + .remediation-card { display: none; }
.remediation-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.65; }
.remediation-card li + li { margin-top: 6px; }
.accuracy-tip p { margin: 8px 0 0; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.65; }
.accuracy-tip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.accuracy-tip-actions:not(:has(button:not([hidden]))) { display: none; }
.accuracy-tip-actions [hidden], .mailbox-hint [hidden] { display: none; }
.btn-inline { height: auto; padding: 6px 14px; font-size: var(--text-sm); }
.mailbox-hint[hidden] { display: none; }
.content-result-area.hidden ~ .accuracy-tip { display: none; }
/* How to verify it yourself: official channels for organizations the message names. */
.official-list { display: grid; gap: 14px; }
.official-item p { margin: 0 0 6px; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.6; }
.official-statement { margin: 6px 0 0; padding: 8px 12px; border-left: 2px solid var(--border); color: var(--text-muted); font-size: var(--text-sm); line-height: 1.6; }
.official-statement cite { display: block; margin-top: 4px; font-style: normal; font-size: var(--text-xs); }
.official-statement a { color: var(--accent2); }
.col-card {
  position: relative;
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.col-title {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.01em; margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.col-count { font-weight: 400; color: var(--text-dim); }

/* Prob bars */
.prob-bars { margin-bottom: 16px; }
.prob-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.prob-label { font-size: var(--text-xs); font-weight: 600; width: 108px; flex-shrink: 0; line-height: 1.25; }
.phish-label { color: var(--red); }
.legit-label { color: var(--accent2); }
.prob-bar-track { flex: 1; height: 8px; background: var(--track); border-radius: var(--pill); overflow: hidden; }
.prob-bar { height: 100%; border-radius: var(--pill); width: 0%; transition: width 0.9s var(--ease); }
.phish-bar { background: linear-gradient(90deg, #ff5c6c, #ff8a94); }
.legit-bar { background: linear-gradient(90deg, #3fd58f, #7ae6b4); }
.prob-pct { font-size: var(--text-xs); font-weight: 600; width: 44px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* Risk pills */
.risk-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 4px 10px; border-radius: var(--pill); font-size: var(--text-2xs); font-weight: 600; }
.pill-suspect { background: rgba(var(--yellow-rgb),0.14); color: var(--yellow); border: 1px solid rgba(var(--yellow-rgb),0.3); }
.pill-high    { background: rgba(var(--red-rgb),0.14); color: var(--red); }
.pill-med     { background: rgba(var(--yellow-rgb),0.14); color: var(--yellow); }
.pill-feat    { background: rgba(var(--accent-rgb),0.12); color: var(--accent); }

/* Risk list */
.risk-list { display: flex; flex-direction: column; gap: 8px; }
.risk-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); }
.risk-high   { background: rgba(var(--red-rgb),0.08); }
.risk-medium { background: rgba(var(--yellow-rgb),0.08); }
.risk-low    { background: var(--fill-soft); }
.risk-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.risk-critical { background: rgba(var(--red-rgb),0.10); }
.risk-high   .risk-dot, .risk-critical .risk-dot { background: var(--red); }
.risk-medium .risk-dot { background: var(--yellow); }
.risk-low    .risk-dot { background: var(--text-dim); }
.risk-msg { font-size: var(--text-md); line-height: 1.55; }
.no-risk { font-size: var(--text-sm); color: var(--accent2); padding: 8px; text-align: center; }

/* Feature breakdown */
/* Two columns of signals once the card is opened; one on narrow screens. */
.feature-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.fb-row { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.fb-row:last-child { border-bottom: none; padding-bottom: 0; }
.fb-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.fb-label { font-size: var(--text-md); font-weight: 600; }
.fb-val { font-size: var(--text-2xs); font-weight: 700; padding: 2px 8px; border-radius: var(--pill); font-family: var(--font-mono); }
.fv-phish { background: rgba(var(--red-rgb),0.15);  color: var(--red); }
.fv-legit { background: rgba(var(--accent2-rgb),0.15);  color: var(--accent2); }
.fv-sus   { background: rgba(var(--yellow-rgb),0.12);  color: var(--yellow); }
.fb-desc { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 6px; line-height: 1.5; }
.fb-bar-track { height: 4px; background: var(--track); border-radius: var(--pill); overflow: hidden; margin-bottom: 3px; }
.fb-bar { height: 100%; border-radius: var(--pill); transition: width 0.6s ease; }
.fb-imp { font-size: var(--text-2xs); color: var(--text-dim); }

/* ── Metrics Section ─────────────────────────────────────────────────────── */
.metrics-grid { display: flex; flex-direction: column; gap: 28px; }
.metrics-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--sheen), var(--surface); }
.metrics-table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.metrics-table th {
  padding: 14px 18px; text-align: right;
  font-size: var(--text-xs); font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.01em; border-bottom: 1px solid var(--border);
}
.metrics-table th:first-child { text-align: left; }
.metrics-table td { padding: 14px 18px; text-align: right; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.metrics-table td:first-child { text-align: left; }
.metrics-table tr:last-child td { border-bottom: none; }
.metrics-table tr:hover td { background: var(--fill-soft); }
.cell-best { color: var(--accent2); font-weight: 600; }
.row-best td:first-child { color: var(--accent); }
.clf-name { font-weight: 600; }
.loading-cell { color: var(--text-muted); text-align: center; padding: 24px; }
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-card { background: var(--sheen), var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.chart-title { font-size: var(--text-md); font-weight: 600; margin-bottom: 16px; color: var(--text); letter-spacing: -0.01em; }

/* ── Feature Category Cards ─────────────────────────────────────────────── */
.feature-cards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 64px; }
.feature-category-card {
  position: relative; overflow: hidden;
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: transform 0.5s var(--ease), border-color 0.3s, box-shadow 0.5s var(--ease), background 0.3s;
}
.feature-category-card::after {
  content: ''; position: absolute; width: 240px; height: 240px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent, var(--accent)), transparent 62%);
  opacity: 0.10; pointer-events: none; transition: opacity 0.5s;
}
.feature-category-card:hover { transform: translateY(-4px); border-color: var(--border-hi); box-shadow: var(--shadow-sm); background: var(--sheen), var(--surface-2); }
.feature-category-card:hover::after { opacity: 0.18; }
.feature-category-card:nth-child(1) { --card-accent: var(--accent); }
.feature-category-card:nth-child(2) { --card-accent: var(--accent2); }
.feature-category-card:nth-child(3) { --card-accent: var(--purple); }
.fc-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; position: relative; z-index: 1; }
.fc-icon { font-size: var(--text-5xl); }
.fc-title { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; }
.fc-count { font-size: var(--text-xs); color: var(--text-muted); margin-top: 3px; }
.url-header    .fc-title { color: var(--text); }
.domain-header .fc-title { color: var(--text); }
.html-header   .fc-title { color: var(--text); }
.fc-list { list-style: none; padding: 0; position: relative; z-index: 1; }
.fc-list li {
  font-size: var(--text-md); color: var(--text-muted); padding: 7px 0 7px 16px;
  border-bottom: 1px solid var(--line-soft); position: relative;
}
.fc-list li::before { content: ''; position: absolute; left: 0; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--card-accent, var(--accent)); opacity: 0.8; }
.fc-list li:last-child { border-bottom: none; }

/* ── Signals bento ───────────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.bento-card {
  position: relative; overflow: hidden; grid-column: span 2;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: transform 0.5s var(--ease), border-color 0.3s, box-shadow 0.5s var(--ease), background 0.3s;
}
.bento-card:hover { transform: translateY(-4px); border-color: var(--border-hi); box-shadow: var(--shadow-sm); background: var(--sheen), var(--surface-2); }
.bento-hero { grid-column: span 4; }
.bento-tall { grid-row: span 2; }
.bento-wide { grid-column: span 4; }
.bento-hero::after, .bento-wide::after {
  content: ''; position: absolute; width: 360px; height: 360px; right: -140px; top: -170px; border-radius: 50%;
  background: radial-gradient(circle, var(--bento-glow, var(--accent)), transparent 62%); opacity: 0.12; pointer-events: none;
}
.bento-wide { --bento-glow: var(--accent2); }
.bento-head { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.bento-title { font-size: var(--text-xl); font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.bento-hero .bento-title { font-size: var(--text-2xl); }
.bento-kicker { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.bento-desc { font-size: var(--text-md); color: var(--text-muted); line-height: 1.65; position: relative; z-index: 1; }
.bento-note { font-size: var(--text-xs); color: var(--text-dim); line-height: 1.55; margin-top: auto; }
.bento-demo {
  position: relative; z-index: 1; margin-top: auto;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--field-bg); border: 1px solid var(--line);
}
.bento-demo code, .svc-row code, .tld-chips code { background: none; border: none; padding: 0; font-size: var(--text-sm); }
.demo-tag {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 3px 10px; border-radius: var(--pill); font-size: var(--text-2xs); font-weight: 600;
}
.tag-bad    { background: rgba(var(--red-rgb),0.14);  color: var(--red); }
.tag-good   { background: rgba(var(--accent2-rgb),0.14);  color: var(--accent2); }
.tag-purple { background: rgba(var(--purple-rgb),0.15); color: var(--purple); }
.tag-info   { background: rgba(var(--info-rgb),0.15); color: var(--info); }
.lk-row, .align-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 0; }
.lk-row + .lk-row, .align-row + .align-row { border-top: 1px solid var(--line-soft); }
.lk-label { font-size: var(--text-2xs); font-weight: 600; color: var(--text-dim); letter-spacing: 0.02em; }
.lk-domain { font-size: var(--text-lg) !important; color: var(--text); overflow-wrap: anywhere; }
.lk-domain mark { background: rgba(var(--red-rgb),0.18); color: var(--red); border-radius: var(--radius-2xs); padding: 0 2px; }
.rnd-name { display: block; font-size: var(--text-xl) !important; color: var(--text); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.rnd-name span { color: var(--text-dim); letter-spacing: 0; }
.rnd-meter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 14px 0 10px; }
.rnd-meter span { height: 7px; border-radius: var(--pill); background: var(--track); }
.rnd-meter span.on { background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.rnd-caption { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.tld-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tld-chips code { padding: 5px 12px; border-radius: var(--pill); color: var(--orange); background: rgba(var(--orange-rgb),0.10); border: 1px solid rgba(var(--orange-rgb),0.24); }
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--field-bg); border: 1px solid var(--line); }
.svc-row code { color: var(--text); overflow-wrap: anywhere; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; align-items: center; position: relative; z-index: 1; }
.auth-demo { margin-top: 0; }
.auth-pills { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; }
.align-row code { color: var(--text); overflow-wrap: anywhere; }

.signals-all { margin-top: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--sheen), var(--surface); }
.signals-all > summary {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; list-style: none; cursor: pointer;
  padding: 18px 24px; border-radius: var(--radius);
}
.signals-all > summary::-webkit-details-marker { display: none; }
.signals-all > summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease);
}
.signals-all[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.signals-all > summary:hover .signals-all-title { color: var(--accent); }
.signals-all-title { font-size: var(--text-base); font-weight: 650; transition: color 0.2s; }
.signals-all-sub { font-size: var(--text-sm); color: var(--text-muted); }
.signals-all .feature-cards-grid { margin: 0; padding: 0 18px 18px; }

/* ── Pipeline ────────────────────────────────────────────────────────────── */
/* Timeline: a rail through numbered nodes, filled as the section scrolls by. */
.pipeline-steps {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  max-width: 920px; margin: 0 auto 56px;
  view-timeline: --pipeline block;
}
.pipeline-steps::before, .pipeline-steps::after {
  content: ''; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px; border-radius: var(--pill);
}
.pipeline-steps::before { background: var(--track); }
.pipeline-steps::after {
  background: linear-gradient(180deg, var(--accent), var(--accent-2) 60%, var(--accent2));
  transform-origin: top; transform: scaleY(1);
}
.step { position: relative; display: flex; align-items: flex-start; gap: 22px; }
.step-num {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px var(--bg), 0 8px 22px rgba(var(--accent-rgb),0.28);
}
.step-body {
  flex: 1; min-width: 0; padding: 18px 22px;
  background: var(--sheen), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: transform 0.45s var(--ease), background 0.3s, border-color 0.3s;
}
.step:hover .step-body { background: var(--sheen), var(--surface-2); border-color: var(--border-hi); transform: translateX(6px); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .pipeline-steps::after {
      animation: rail-fill linear both;
      animation-timeline: --pipeline;
      animation-range: entry 30% exit 45%;
    }
    .step-num {
      animation: node-on linear both;
      animation-timeline: view();
      animation-range: entry 70% cover 40%;
    }
  }
}
@keyframes rail-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes node-on {
  from { color: var(--text-muted); background: var(--bg-card2); box-shadow: 0 0 0 6px var(--bg), inset 0 0 0 1px var(--border-hi); }
  to   { color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 6px var(--bg), 0 8px 22px rgba(var(--accent-rgb),0.28); }
}
.step-title { font-size: var(--text-lg); font-weight: 600; margin-bottom: 4px; letter-spacing: -0.01em; }
.step-desc { font-size: var(--text-md); color: var(--text-muted); line-height: 1.65; }
.tech-stack { text-align: center; }
.tech-label { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); margin-bottom: 14px; }
.tech-items { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tech-badge {
  background: var(--surface); border: 1px solid var(--border); padding: 6px 15px; border-radius: var(--pill);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.tech-badge:hover { border-color: var(--border-hi); color: var(--text); background: var(--surface-2); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 56px 24px 28px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 48px; padding-bottom: 36px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text); font-size: var(--text-lg); }
.footer-tagline { margin-top: 14px; max-width: 340px; font-size: var(--text-sm); line-height: 1.65; color: var(--text-muted); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
/* Links are 32px tall tap targets (WCAG 2.5.8 asks for 24px); the padding replaces the old 10px gap
   and the last link's padding hangs into the space below, so the text sits where it did. */
.footer-col { display: flex; flex-direction: column; margin-bottom: -5px; }
.footer-col h2 { font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 9px; }
.footer-col a { padding: 5px 0; font-size: var(--text-md); color: var(--text-muted); width: fit-content; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--border); font-size: var(--text-xs); color: var(--text-dim);
}
@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Demo Tabs — segmented control ───────────────────────────────────────── */
.demo-tabs {
  position: relative; display: flex; gap: 4px; margin: 0 auto 26px; padding: 4px;
  max-width: 520px;
  border: 1px solid var(--border); border-radius: var(--pill);
  background: var(--surface);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
/* Sliding highlight, positioned by which tab is active */
.demo-tabs::before {
  content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 6px); border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--border-hi);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.45s var(--ease);
}
.demo-tabs:has(.demo-tab:nth-child(2).active)::before { transform: translateX(calc(100% + 4px)); }
.demo-tab {
  position: relative; z-index: 1;
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; background: transparent; border: none; cursor: pointer;
  font-size: var(--text-md); font-weight: 600; color: var(--text-muted); border-radius: var(--pill);
  transition: color 0.25s;
}
.demo-tab:hover { color: var(--text); }
.demo-tab.active { color: var(--text); }
/* The SMS tab is shown only when /api/config enables it; display: flex above would override [hidden]. */
.demo-tab[hidden] { display: none; }
.demo-tabs:has(#tab-sms:not([hidden]))::before { width: calc((100% - 16px) / 3); }
.demo-tabs:has(.demo-tab:nth-child(3).active)::before { transform: translateX(calc(200% + 8px)); }
@media (max-width: 560px) {
  .demo-tabs:has(#tab-sms:not([hidden])) .demo-tab { padding: 10px 6px; gap: 5px; font-size: var(--text-sm); }
}
@media (max-width: 420px) {
  .demo-tabs:has(#tab-sms:not([hidden])) .demo-tab .ico { display: none; }
}
.sms-count { margin: 6px 0 0; text-align: right; }
.sms-sender-line { margin: 0 0 8px; }

.tab-panel.hidden { display: none; }

/* ── Content Input Card ──────────────────────────────────────────────────── */
.content-input-card {
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 26px; box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.raw-email-upload-row { margin-bottom: 20px; }
.file-dropzone { padding: 16px; border: 1px dashed var(--border-hi); border-radius: var(--radius-sm); }
.file-dropzone:focus-visible, .file-dropzone.drag-active { outline: 2px solid var(--accent, #5ad1ff); outline-offset: 3px; }
.file-drop-hint { margin: 0 0 12px; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.6; }
.raw-email-file {
  width: 100%; padding: 12px 14px; background: var(--field-bg);
  border: 1px dashed var(--border-hi); border-radius: var(--radius-sm); color: var(--text);
  transition: border-color 0.25s, background 0.25s;
}
.raw-email-file:hover { border-color: rgba(var(--accent-rgb),0.6); background: rgba(var(--accent-rgb),0.04); }
.raw-email-file::file-selector-button {
  margin-right: 12px; padding: 7px 15px; border-radius: var(--pill); cursor: pointer;
  border: 1px solid var(--border-hi); background: var(--surface-2); color: var(--text);
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600;
  transition: background 0.2s;
}
.raw-email-file::file-selector-button:hover { background: rgba(255,255,255,0.11); }
.raw-email-status { color: var(--text-muted); font-size: var(--text-sm); margin-top: 8px; }
.content-input-subject-row { margin-bottom: 18px; }
.content-input-body-row { margin-bottom: 20px; }
.content-label {
  display: block; font-size: var(--text-sm); font-weight: 600; color: var(--text-muted);
  margin-bottom: 8px; letter-spacing: 0.01em;
}
.content-subject-input {
  width: 100%; padding: 12px 16px; background: var(--field-bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-size: var(--text-md); outline: none; transition: border-color 0.25s, box-shadow 0.25s; box-sizing: border-box;
}
.content-subject-input:focus { border-color: rgba(var(--accent-rgb),0.6); box-shadow: var(--focus-ring); }
.content-body-textarea {
  width: 100%; padding: 14px 16px; background: var(--field-bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-size: var(--text-md); font-family: inherit; resize: vertical; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s; line-height: 1.65; box-sizing: border-box;
}
.content-body-textarea:focus { border-color: rgba(var(--accent-rgb),0.6); box-shadow: var(--focus-ring); }
.content-body-textarea.shake { animation: shake 0.4s ease; }
.content-subject-input:disabled, .content-body-textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.content-input-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; margin-bottom: 18px; }
.content-input-actions [hidden] { display: none; }
.content-input-actions .btn-analyze { padding: 12px 24px; }
.btn-ghost {
  padding: 11px 20px; background: transparent; border: 1px solid var(--border);
  border-radius: var(--pill); color: var(--text-muted); font-size: var(--text-md); font-weight: 600;
  cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--border-hi); color: var(--text); background: var(--surface); }
.result-report { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.result-report[hidden] { display: none; }
.result-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.result-actions .result-report { margin: 0; }
.copy-trigger { display: inline-flex; align-items: center; gap: 8px; }
.copy-trigger .ico { width: 15px; height: 15px; vertical-align: 0; }
.copy-buffer { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Download report: one pill holding a label and a button per format. */
.download-group { display: inline-flex; align-items: stretch; min-height: 40px; border: 1px solid var(--border-hi); border-radius: var(--pill); background: var(--surface); }
.download-label { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 15px; font-size: var(--text-sm); font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.download-label .ico { width: 15px; height: 15px; vertical-align: 0; }
.download-option { min-height: 38px; padding: 6px 12px; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--text-muted); font: inherit; font-size: var(--text-sm); font-weight: 650; cursor: pointer; }
.download-option:last-child { padding-right: 15px; border-radius: 0 var(--pill) var(--pill) 0; }
.download-option:hover { color: var(--accent); background: var(--fill-soft); }

/* Recent checks: a per-browser list under the demo tabs. */
.recent-checks { margin-top: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--sheen), var(--surface); }
.recent-checks > summary {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  padding: 14px 18px; font-size: var(--text-md); font-weight: 650; color: var(--text-muted);
}
.recent-checks > summary::-webkit-details-marker { display: none; }
.recent-checks > summary::after {
  content: ''; margin-left: auto; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease);
}
.recent-checks[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.recent-checks > summary:hover { color: var(--text); }
.recent-count { font-weight: 500; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.recent-body { padding: 0 18px 18px; }
.recent-note, .recent-empty { font-size: var(--text-sm); line-height: 1.5; color: var(--text-dim); }
.recent-empty { margin-top: 10px; color: var(--text-muted); }
.recent-empty[hidden], .recent-list[hidden], .recent-clear[hidden] { display: none; }
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.recent-item {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 9px 12px; border-radius: var(--radius-xs); background: var(--fill-soft); border-left: 3px solid var(--text-dim);
  font-size: var(--text-sm);
}
.recent-safe     { border-left-color: var(--accent2); }
.recent-low      { border-left-color: var(--info); }
.recent-medium, .recent-unknown { border-left-color: var(--yellow); }
.recent-high     { border-left-color: var(--orange); }
.recent-critical { border-left-color: var(--red); }
.recent-mode { font-size: var(--text-2xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.recent-main { display: flex; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.recent-label { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.recent-domain { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); overflow-wrap: anywhere; }
.recent-score { font-family: var(--font-mono); font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.recent-time { color: var(--text-dim); white-space: nowrap; }
.recent-clear { margin-top: 14px; }
@media (max-width: 640px) {
  .recent-item { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .recent-mode { grid-column: 1 / -1; }
  .recent-time { grid-column: 1 / -1; }
}

/* "Why this score?" disclosure under the sender verdict */
.score-breakdown { margin: -6px 0 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--sheen), var(--surface); }
.score-breakdown[hidden] { display: none; }
.score-breakdown > summary {
  display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer;
  padding: 12px 18px; font-size: var(--text-sm); font-weight: 600; color: var(--text-muted);
}
.score-breakdown > summary::-webkit-details-marker { display: none; }
.score-breakdown > summary::after {
  content: ''; margin-left: auto; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease);
}
.score-breakdown[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.score-breakdown > summary:hover { color: var(--text); }
.sb-body { padding: 0 18px 16px; }
/* How to get an original .eml: collapsed by default under the upload area. */
.eml-guide { margin: 12px 0 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--sheen), var(--surface); }
.eml-guide > summary {
  display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer;
  /* Whole-pixel height (42px with borders) so content below keeps its pixel grid. */
  padding: 10px 16px; font-size: var(--text-sm); line-height: 20px; font-weight: 600; color: var(--text-muted);
}
.eml-guide > summary::-webkit-details-marker { display: none; }
.eml-guide > summary::after {
  content: ''; margin-left: auto; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease);
}
.eml-guide[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.eml-guide > summary:hover { color: var(--text); }
.eml-guide-body { padding: 0 16px 12px; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.6; }
.eml-guide-body p { margin: 0 0 8px; }
.eml-guide-body ul { margin: 0; padding-left: 18px; }
.eml-guide-body li + li { margin-top: 4px; }
.sb-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sb-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 8px 12px; border-radius: var(--radius-xs); background: var(--fill-soft); }
.sb-points { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-high   .sb-points { color: var(--red); }
.sb-medium .sb-points { color: var(--yellow); }
.sb-low    .sb-points { color: var(--text-muted); }
.sb-msg { font-size: var(--text-sm); line-height: 1.5; color: var(--text-muted); }
.sb-formula { margin-top: 12px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-dim); }

/* Keyboard hints: hidden on touch-only devices */
.kbd-hint { margin-top: 14px; font-size: var(--text-xs); color: var(--text-dim); }
.kbd-hint-inline { margin: 0 auto 0 0; }
kbd {
  display: inline-block; min-width: 20px; padding: 1px 6px; text-align: center;
  font-family: var(--font-mono); font-size: var(--text-2xs); line-height: 18px; color: var(--text-muted);
  background: var(--fill); border: 1px solid var(--border-hi); border-bottom-width: 2px; border-radius: var(--radius-2xs);
}
@media (hover: none) and (pointer: coarse) { .kbd-hint { display: none; } }
.report-trigger { min-height: 40px; padding: 8px 15px; border: 1px solid var(--border-hi); border-radius: var(--pill); background: var(--surface); color: var(--text-muted); font: inherit; font-size: var(--text-sm); font-weight: 650; cursor: pointer; }
.report-trigger:hover { color: var(--accent); border-color: var(--accent); }
.report-trigger span { margin-left: 9px; }
/* Translatable label text leading a trigger is not the trailing ↗ icon. */
.report-trigger > span[data-i18n]:first-child { margin-left: 0; }
.feedback-dialog { width: min(520px, calc(100vw - 28px)); max-height: min(88vh, 800px); overflow: auto; margin: auto; padding: 27px; border: 1px solid var(--border-hi); border-radius: var(--radius); background: var(--bg-card2); color: var(--text); box-shadow: var(--shadow); }
.feedback-dialog [hidden] { display: none !important; }
.feedback-dialog::backdrop { background: rgba(2, 6, 15, .78); backdrop-filter: blur(5px); }

/* Dialog enter/exit: fade + lift, with @starting-style for the opening frame. */
.feedback-dialog, .pg-confirm {
  opacity: 0; transform: translateY(10px) scale(0.98);
  transition: opacity 0.25s var(--ease), transform 0.32s var(--ease), overlay 0.32s allow-discrete, display 0.32s allow-discrete;
}
.feedback-dialog[open], .pg-confirm[open] { opacity: 1; transform: none; }
.feedback-dialog::backdrop, .pg-confirm::backdrop {
  transition: background-color 0.3s, backdrop-filter 0.3s, overlay 0.32s allow-discrete, display 0.32s allow-discrete;
}
@starting-style {
  .feedback-dialog[open], .pg-confirm[open] { opacity: 0; transform: translateY(10px) scale(0.98); }
  .feedback-dialog[open]::backdrop, .pg-confirm[open]::backdrop { background-color: transparent; backdrop-filter: blur(0); }
}

.pg-confirm {
  width: min(440px, calc(100vw - 28px)); margin: auto; padding: 24px;
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  background: var(--bg-card2); color: var(--text); box-shadow: var(--shadow);
}
.pg-confirm::backdrop { background: rgba(2, 6, 15, .62); backdrop-filter: blur(4px); }
.pg-confirm-message { font-size: var(--text-base); line-height: 1.6; }
.pg-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.pg-confirm-ok { padding: 11px 20px; }
@media (prefers-reduced-motion: reduce) {
  .feedback-dialog, .pg-confirm, .feedback-dialog::backdrop, .pg-confirm::backdrop { transition: none; }
}
.feedback-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.feedback-head h2 { font-size: var(--text-5xl); letter-spacing: -.03em; }
.feedback-eyebrow { color: var(--accent); font-size: var(--text-2xs); font-weight: 750; letter-spacing: .15em; }
.feedback-intro, .feedback-privacy { color: var(--text-muted); font-size: var(--text-sm); line-height: 1.55; }
.feedback-intro { margin: 8px 0 20px; }
.feedback-privacy { margin: 4px 0 18px; }
.feedback-dialog label:not(.feedback-consent) { display: block; margin: 16px 0 7px; font-size: var(--text-xs); font-weight: 700; }
.feedback-dialog select, .feedback-dialog textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--border-hi); border-radius: var(--radius-xs); background: var(--field-bg); color: var(--text); font: inherit; font-size: var(--text-md); }
.feedback-dialog textarea { resize: vertical; min-height: 100px; }
.feedback-optional { color: var(--text-dim); font-weight: 400; }
.feedback-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 19px; font-size: var(--text-sm); font-weight: 650; }
.feedback-consent input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); }
.feedback-close { border: 0; background: transparent; color: var(--text-muted); font-size: var(--text-5xl); line-height: 1; cursor: pointer; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.feedback-success { padding: 13px; border: 1px solid rgba(var(--accent2-rgb),.35); border-radius: var(--radius-xs); color: var(--accent2); overflow-wrap: anywhere; }

/* ── Content Result Area ─────────────────────────────────────────────────── */
.content-result-area { margin-top: 4px; }

/* Risk Banner */
.content-risk-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 30px; border-radius: var(--radius); margin-bottom: 18px;
  border: 1px solid transparent; gap: 16px; animation: fadeSlideIn 0.6s var(--ease);
}
.content-risk-banner::after {
  content: ''; position: absolute; right: -20%; top: -60%; width: 60%; height: 220%;
  background: radial-gradient(circle, currentColor, transparent 60%); opacity: 0.10; pointer-events: none;
}
.crb-safe     { background: rgba(var(--accent2-rgb),0.09);  border-color: rgba(var(--accent2-rgb),0.28);  color: var(--accent2); }
.crb-low      { background: rgba(var(--info-rgb),0.09); border-color: rgba(var(--info-rgb),0.28); color: var(--info); }
.crb-medium, .crb-unknown { background: rgba(var(--yellow-rgb),0.09);  border-color: rgba(var(--yellow-rgb),0.30);  color: var(--yellow); }
.crb-high     { background: rgba(var(--orange-rgb),0.09);  border-color: rgba(var(--orange-rgb),0.32);  color: var(--orange); }
.crb-critical { background: rgba(var(--red-rgb),0.10);  border-color: rgba(var(--red-rgb),0.36);  color: var(--red); }

.crb-left  { display: flex; align-items: flex-start; gap: 18px; color: var(--text); position: relative; z-index: 1; }
.crb-icon  { font-size: var(--text-6xl); line-height: 1; }
.crb-title { font-size: var(--text-3xl); font-weight: 700; margin-bottom: 4px; letter-spacing: -0.02em; }
.crb-sub   { font-size: var(--text-md); color: var(--text-muted); }
.crb-type  { margin-top: 6px; font-size: var(--text-md); font-weight: 600; color: var(--text); }
.crb-type[hidden] { display: none; }
.crb-requested { margin-top: 8px; font-size: var(--text-md); color: var(--text); }
.crb-requested[hidden] { display: none; }
.crb-right { text-align: right; flex-shrink: 0; color: var(--text); position: relative; z-index: 1; }
.crb-score-label { font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.crb-score { font-size: var(--text-7xl); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* Category Grid */
.content-category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; margin-bottom: 18px;
}
.cat-empty {
  grid-column: 1/-1; text-align: center; padding: 34px;
  color: var(--text-muted); font-size: var(--text-md);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.cat-card {
  position: relative; overflow: hidden;
  background: var(--sheen), var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  transition: transform 0.45s var(--ease), border-color 0.3s;
}
.cat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0 var(--pill) var(--pill) 0;
  background: var(--cat-accent, transparent);
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--border-hi); }
.cat-card.cat-high   { --cat-accent: var(--orange); }
.cat-card.cat-medium { --cat-accent: var(--yellow); }
.cat-card.cat-low    { --cat-accent: var(--info); }
.cat-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.cat-icon { font-size: var(--text-4xl); line-height: 1; flex-shrink: 0; margin-top: 2px; }
.cat-title-wrap { flex: 1; }
.cat-title { font-size: var(--text-base); font-weight: 600; margin-bottom: 2px; letter-spacing: -0.01em; }
.cat-count { font-size: var(--text-xs); color: var(--text-muted); }
.cat-level-badge, .level-label {
  font-size: var(--text-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 9px; border-radius: var(--pill); flex-shrink: 0;
}
/* Indicator rows: the pill states the level in words next to the decorative
   dot; sized to the message's first line so the row stays one line tall.
   Critical and high text is lighter than --red / --orange so the small type
   keeps 4.5:1 on its tint where the colour fields brighten the card. */
.level-label { padding: 2px 8px; line-height: 15.5px; white-space: nowrap; }
.level-critical { background: rgba(var(--red-rgb),0.16);  color: #ff7a86; }
.level-high   { background: rgba(var(--orange-rgb),0.16);  color: #ffa06e; }
.level-medium { background: rgba(var(--yellow-rgb),0.16);  color: var(--yellow); }
.level-low    { background: rgba(var(--info-rgb),0.16); color: var(--info); }
.level-info   { background: var(--fill); color: var(--text-muted); }
.cat-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.cat-keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-pill {
  background: var(--fill); border: 1px solid var(--border);
  padding: 3px 11px; border-radius: var(--pill); font-size: var(--text-xs); color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── ML Classifier Card (Content tab) ───────────────────────────────────── */
.content-ml-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.10) 0%, rgba(var(--accent-2-rgb),0.05) 100%), var(--surface);
  border: 1px solid rgba(var(--accent-rgb),0.24);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 18px 0;
}
.ml-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.ml-card-title {
  font-size: var(--text-lg); font-weight: 600; color: var(--text); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.ml-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); font-size: var(--text-2xs); font-weight: 700;
  padding: 3px 9px; border-radius: var(--pill); letter-spacing: 0.06em;
}
.ml-card-sub { font-size: var(--text-md); color: var(--text-muted); margin-top: 4px; }
.ml-card-metrics { display: flex; gap: 10px; flex-wrap: wrap; }
.ml-metric {
  display: flex; flex-direction: column; align-items: center;
  background: var(--field-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px; min-width: 76px;
}
.ml-metric-k { font-size: var(--text-2xs); color: var(--text-muted); letter-spacing: 0.01em; }
.ml-metric-v { font-size: var(--text-lg); font-weight: 700; color: var(--text); margin-top: 2px; letter-spacing: -0.01em; }

.ml-contribs { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.ml-contribs-title { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 8px; }
.ml-contribs-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-token {
  background: rgba(var(--orange-rgb),0.10); border: 1px solid rgba(var(--orange-rgb),0.3);
  color: #ffc27a; font-family: var(--font-mono); font-size: var(--text-xs);
  padding: 3px 11px; border-radius: var(--pill); cursor: help;
}

/* Bottom row: technical indicators + safety signals + method note.
   auto-fit collapses tracks of hidden cards so the visible ones fill the row. */
.content-bottom-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 16px; align-items: start; }
.safety-list { display: flex; flex-direction: column; gap: 8px; }
.safety-item { display: flex; align-items: flex-start; gap: 8px; font-size: var(--text-sm); }
.safety-dot { color: var(--accent2); font-weight: 700; flex-shrink: 0; }
.safety-msg { color: var(--text-muted); line-height: 1.5; }
.method-note-text { font-size: var(--text-md); color: var(--text-muted); line-height: 1.7; }
.method-note-text strong { color: var(--text); }

/* ── Email Authenticity Verification Card ────────────────────────────────── */
.verify-desc { font-size: var(--text-md); color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }
.btn-verify {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--pill); border: 1px solid rgba(var(--accent-rgb),0.4);
  background: rgba(var(--accent-rgb),0.10); color: var(--accent);
  font-size: var(--text-sm); font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.3s var(--ease);
}
.btn-verify:hover { background: rgba(var(--accent-rgb),0.18); transform: translateY(-1px); }
.btn-verify-sm { padding: 6px 13px; font-size: var(--text-xs); }

/* Full-width verification card below the result columns */
.verify-card-wide { margin-top: 16px; animation: fadeSlideIn 0.6s var(--ease); }
.verify-card-wide .verify-idle { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.verify-card-wide .verify-idle .verify-desc { margin-bottom: 0; max-width: 720px; }
.verify-card-wide .btn-verify { flex-shrink: 0; }
.verify-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; align-items: start; }
.verify-group .verify-section-title { border-top: none; margin-top: 0; padding-top: 0; }
.verify-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.verify-footer .verify-verdict { flex: 1 1 320px; margin-top: 0; }

.verify-loading {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--text-sm); color: var(--text-muted); padding: 6px 0;
}
.verify-spinner {
  width: 18px; height: 18px; border: 2px solid rgba(var(--accent-rgb),0.2);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; flex-shrink: 0;
}

/* Steps */
.verify-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.verify-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--fill-soft); border: 1px solid var(--line-soft);
  transition: background 0.25s, border-color 0.25s;
}
.verify-step.vstep-ok   { background: rgba(var(--accent2-rgb),0.07);  border-color: rgba(var(--accent2-rgb),0.2); }
.verify-step.vstep-fail { background: rgba(var(--red-rgb),0.07);  border-color: rgba(var(--red-rgb),0.2); }
.verify-step.vstep-warn { background: rgba(var(--yellow-rgb),0.07);  border-color: rgba(var(--yellow-rgb),0.2); }
.verify-step.vstep-skip { opacity: 0.45; }
.vstep-icon  { font-size: var(--text-xl); line-height: 1; flex-shrink: 0; margin-top: 1px; }
.vstep-label { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.vstep-detail{ font-size: var(--text-sm); color: var(--text-muted); margin-top: 3px; line-height: 1.5; word-break: break-word; }

.verify-section-title {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.01em;
  color: var(--text-muted);
  padding: 12px 0 6px; border-top: 1px solid var(--border);
  margin-top: 8px;
}
.verify-section-title:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.verify-step.vstep-info { background: rgba(var(--accent-rgb),0.06); border-color: rgba(var(--accent-rgb),0.16); }

.vstep-badge {
  display: inline-block; font-size: var(--text-2xs); font-weight: 500;
  background: var(--fill); color: var(--text-muted);
  border-radius: var(--pill); padding: 1px 8px; margin-left: 6px;
  vertical-align: middle;
}

.verify-verdict {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 15px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600;
  line-height: 1.5; margin-top: 6px;
}
.vv-ok         { background: rgba(var(--accent2-rgb),0.10); color: var(--accent2); border: 1px solid rgba(var(--accent2-rgb),0.3); }
.vv-fail       { background: rgba(var(--red-rgb),0.10); color: var(--red);     border: 1px solid rgba(var(--red-rgb),0.3); }
.vv-warn       { background: rgba(var(--yellow-rgb),0.10); color: var(--yellow);  border: 1px solid rgba(var(--yellow-rgb),0.3); }
.vv-suspicious { background: rgba(var(--red-rgb),0.12); color: #ff7d8a;        border: 1px solid rgba(var(--red-rgb),0.4); }

/* ── Icon system ─────────────────────────────────────────────────────────── */
/* Stroke icons share one weight; tiles give them an app-icon-like backdrop. */
.ico { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
.ico-lead { width: 18px; height: 18px; margin-top: 1px; }

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--line);
}
.icon-tile .ico { width: 22px; height: 22px; vertical-align: 0; }
.tile-high   { background: rgba(var(--orange-rgb),0.14);  color: var(--orange); border-color: rgba(var(--orange-rgb),0.22); }
.tile-medium { background: rgba(var(--yellow-rgb),0.14);  color: var(--yellow); border-color: rgba(var(--yellow-rgb),0.22); }
.tile-low    { background: rgba(var(--info-rgb),0.14); color: var(--info);   border-color: rgba(var(--info-rgb),0.22); }
.tile-purple { background: rgba(var(--purple-rgb),0.14); color: var(--purple); border-color: rgba(var(--purple-rgb),0.22); }
.tile-grad-cyan, .tile-grad-mint, .tile-grad-violet {
  color: var(--on-accent); border-color: transparent;
  box-shadow: 0 10px 24px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.35);
}
.tile-grad-cyan   { background: linear-gradient(135deg, #8fe6ff, #5ad1ff 55%, #38a8ff); }
.tile-grad-mint   { background: linear-gradient(135deg, #9df0c6, #3fd58f 55%, #22b877); }
.tile-grad-violet { background: linear-gradient(135deg, #d3bfff, #b48cff 55%, #8c6bff); }
.tile-grad-cyan .ico, .tile-grad-mint .ico, .tile-grad-violet .ico { stroke-width: 2; }

/* Placements */
.demo-tab .ico { width: 17px; height: 17px; vertical-align: 0; }
.email-icon { display: inline-flex; align-items: center; }
.email-icon .ico { width: 18px; height: 18px; vertical-align: 0; }
.pill .ico { width: 12px; height: 12px; vertical-align: -0.12em; margin-right: 2px; }
.btn-verify .ico { width: 15px; height: 15px; vertical-align: 0; }
.best-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px;
  padding: 2px 8px; border-radius: var(--pill); font-size: var(--text-2xs); font-weight: 600;
  background: rgba(var(--accent-rgb),0.12); color: var(--accent); vertical-align: middle;
}
.best-badge .ico { width: 12px; height: 12px; vertical-align: 0; }

.fc-icon.icon-tile { width: 48px; height: 48px; border-radius: var(--radius-sm); }
.di-icon.icon-tile { width: 52px; height: 52px; border-radius: var(--radius-sm); }
.cat-icon.icon-tile { width: 40px; height: 40px; border-radius: var(--radius-sm); margin-top: 0; }

.disp-check-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.disp-check-icon .ico { width: 22px; height: 22px; vertical-align: 0; }
.is-disposable        .disp-check-icon { color: var(--purple);  background: rgba(var(--purple-rgb),0.14); border-color: rgba(var(--purple-rgb),0.22); }
.suspected-disposable .disp-check-icon { color: var(--yellow);  background: rgba(var(--yellow-rgb),0.14);  border-color: rgba(var(--yellow-rgb),0.22); }
.not-disposable       .disp-check-icon { color: var(--accent2); background: rgba(var(--accent2-rgb),0.14);  border-color: rgba(var(--accent2-rgb),0.22); }

.vb-icon, .crb-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid; box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.vb-icon .ico, .crb-icon .ico { width: 28px; height: 28px; vertical-align: 0; }
.banner-phish   .vb-icon  { color: var(--red);     background: rgba(var(--red-rgb),0.14);  border-color: rgba(var(--red-rgb),0.28); }
.banner-suspect .vb-icon  { color: var(--yellow);  background: rgba(var(--yellow-rgb),0.14);  border-color: rgba(var(--yellow-rgb),0.28); }
.banner-legit   .vb-icon  { color: var(--accent2); background: rgba(var(--accent2-rgb),0.14);  border-color: rgba(var(--accent2-rgb),0.28); }
.crb-safe       .crb-icon { color: var(--accent2); background: rgba(var(--accent2-rgb),0.14);  border-color: rgba(var(--accent2-rgb),0.28); }
.crb-low        .crb-icon { color: var(--info);    background: rgba(var(--info-rgb),0.14); border-color: rgba(var(--info-rgb),0.28); }
.crb-medium .crb-icon, .crb-unknown .crb-icon { color: var(--yellow); background: rgba(var(--yellow-rgb),0.14); border-color: rgba(var(--yellow-rgb),0.28); }
.crb-high       .crb-icon { color: var(--orange);  background: rgba(var(--orange-rgb),0.14);  border-color: rgba(var(--orange-rgb),0.28); }
.crb-critical   .crb-icon { color: var(--red);     background: rgba(var(--red-rgb),0.14);  border-color: rgba(var(--red-rgb),0.28); }

.vstep-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: var(--radius-xs); margin-top: 0;
  background: var(--fill); color: var(--text-muted);
}
.vstep-icon .ico { width: 16px; height: 16px; vertical-align: 0; }
.vstep-ok   .vstep-icon { color: var(--accent2); background: rgba(var(--accent2-rgb),0.14); }
.vstep-fail .vstep-icon { color: var(--red);     background: rgba(var(--red-rgb),0.14); }
.vstep-warn .vstep-icon { color: var(--yellow);  background: rgba(var(--yellow-rgb),0.14); }
.vstep-info .vstep-icon { color: var(--accent);  background: rgba(var(--accent-rgb),0.14); }
.verify-section-title { display: flex; align-items: center; gap: 7px; }
.verify-section-title .ico { width: 14px; height: 14px; vertical-align: 0; color: var(--accent); }
.verify-verdict .ico-lead { flex-shrink: 0; }
.footer-brand .brand-mark { width: 24px; height: 24px; border-radius: var(--radius-xs); }
.footer-brand .brand-mark .ico { width: 14px; height: 14px; vertical-align: 0; }

/* ── Theme toggle ────────────────────────────────────────────────────────── */
.nav-right { display: flex; align-items: center; gap: 6px; }
.theme-toggle {
  position: relative; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.theme-toggle .ico { width: 17px; height: 17px; vertical-align: 0; position: absolute; transition: opacity 0.25s, transform 0.35s var(--ease); }
.theme-toggle .ico-sun  { opacity: 0; transform: rotate(-40deg) scale(0.7); }
.theme-toggle .ico-moon { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .ico-sun  { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .ico-moon { opacity: 0; transform: rotate(40deg) scale(0.7); }
.theme-toggle-auto {
  position: absolute; right: 2px; bottom: 2px; width: 13px; height: 13px; border-radius: 50%;
  font-size: 8.5px; /* fits the 13px badge, off the type scale */ font-weight: 700; line-height: 13px; text-align: center;
  background: var(--accent); color: var(--on-accent); opacity: 0; transform: scale(0.6);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
:root[data-theme-mode="auto"] .theme-toggle-auto { opacity: 1; transform: none; }

/* ── Language toggle (EN / 中文) ─────────────────────────────────────────── */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  height: 36px; padding: 0 10px; border-radius: var(--pill); cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-muted);
  font-family: inherit; font-size: var(--text-sm); font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.lang-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.lang-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* i18n.js marks the toggle busy while the other language's strings load. */
.lang-toggle[aria-busy="true"] { cursor: progress; opacity: 0.6; }
.lang-option.is-active { color: var(--text); font-weight: 750; }
.lang-sep { color: var(--text-dim); }
/* Phones: show only the language to switch to, so the navbar still fits. */
@media (max-width: 480px) {
  .lang-toggle { padding: 0 8px; min-width: 40px; justify-content: center; }
  .lang-option.is-active, .lang-sep { display: none; }
}

/* lang-init.js hides a non-English page until i18n.js has translated it, so
   English never flashes first; the delayed animation reveals the page anyway
   if i18n.js cannot load. */
:root[data-i18n-pending] body { visibility: hidden; animation: i18n-reveal 0s linear 2s forwards; }
@keyframes i18n-reveal { to { visibility: visible; } }

/* Chinese text: wide tracking and forced capitals are Latin conventions. */
:lang(zh-CN) .feedback-eyebrow { letter-spacing: 0.08em; font-size: var(--text-2xs); }
:lang(zh-CN) .footer-col h2,
:lang(zh-CN) .recent-mode,
:lang(zh-CN) .cat-level-badge,
:lang(zh-CN) .level-label { letter-spacing: 0.02em; }

/* ── Light theme ─────────────────────────────────────────────────────────── */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:        #f4f6fb;
  --bg-card:   #ffffff;
  --bg-card2:  #f7f9fd;
  --surface:   rgba(255, 255, 255, 0.62);
  --surface-2: rgba(255, 255, 255, 0.92);
  --border:    rgba(15, 23, 42, 0.08);
  --border-hi: rgba(15, 23, 42, 0.16);
  --text:      #0f172a;
  --text-muted:#56627a;
  --text-dim:  #626c81;
  --accent:    #0a7fd6;
  --accent-2:  #5b5fe6;
  --accent2:   #159a63;
  --red:       #dc2f4a;
  --orange:    #dd6b1f;
  --yellow:    #b7860b;
  --purple:    #7c4ddb;
  --info:      #2563eb;
  --shadow:    0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.08);
  --sheen:     linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0) 45%);
  --glass-bg:        rgba(255, 255, 255, 0.62);
  --glass-bg-strong: rgba(255, 255, 255, 0.85);
  --field-bg:        rgba(255, 255, 255, 0.75);
  --field-bg-focus:  #ffffff;
  --fill:            rgba(15, 23, 42, 0.05);
  --fill-soft:       rgba(15, 23, 42, 0.03);
  --line:            rgba(15, 23, 42, 0.08);
  --line-soft:       rgba(15, 23, 42, 0.05);
  --track:           rgba(15, 23, 42, 0.08);
  --on-accent:       #ffffff;
}
:root[data-theme="light"] .blob { mix-blend-mode: multiply; }
:root[data-theme="light"] .blob-1 { background: radial-gradient(circle, rgba(var(--accent-rgb),0.26) 0%, rgba(var(--accent-rgb),0.08) 38%, transparent 68%); }
:root[data-theme="light"] .blob-2 { background: radial-gradient(circle, rgba(var(--accent-2-rgb),0.22) 0%, rgba(var(--accent-2-rgb),0.07) 40%, transparent 68%); }
:root[data-theme="light"] .blob-3 { background: radial-gradient(circle, rgba(var(--accent2-rgb),0.18) 0%, rgba(var(--accent2-rgb),0.05) 40%, transparent 68%); }
:root[data-theme="light"] .section-dark {
  background: linear-gradient(180deg, rgba(var(--ink-rgb),0) 0%, rgba(var(--ink-rgb),0.025) 12%, rgba(var(--ink-rgb),0.025) 88%, rgba(var(--ink-rgb),0) 100%);
}
:root[data-theme="light"] .gradient-text { background-image: linear-gradient(100deg, #0a7fd6 0%, #2aa6f2 30%, #5b5fe6 62%, #159a63 100%); }
/* #0a6fbd keeps the small eyebrow at 4.8:1 on the light page (the accent is 3.9:1). */
:root[data-theme="light"] .section-eyebrow { color: #0a6fbd; }
:root[data-theme="light"] .btn-primary { color: #ffffff; background: linear-gradient(135deg, #2aa6f2 0%, #0a7fd6 45%, #5b5fe6 100%); box-shadow: 0 10px 30px rgba(10,127,214,0.25); }
:root[data-theme="light"] .brand-mark { color: #ffffff; }
:root[data-theme="light"] .orb { opacity: 0.42; }
:root[data-theme="light"] .orb-ring { border-color: rgba(var(--ink-rgb),0.08); box-shadow: none; }
:root[data-theme="light"] .orb-chip, :root[data-theme="light"] .scan-card {
  box-shadow: 0 14px 34px rgba(var(--ink-rgb),0.10), inset 0 1px 0 rgba(255,255,255,0.9);
}
:root[data-theme="light"] .icon-tile { box-shadow: inset 0 1px 0 rgba(255,255,255,0.8); }
:root[data-theme="light"] .tile-grad-cyan, :root[data-theme="light"] .tile-grad-mint, :root[data-theme="light"] .tile-grad-violet { color: #ffffff; }
:root[data-theme="light"] .ml-token { color: #b45309; }
/* Level pills keep ≥ 4.5:1 text contrast on their tint (the theme's accent
   shades are 2.7–4.3:1 there). */
:root[data-theme="light"] .level-critical { color: #b91c3c; }
:root[data-theme="light"] .level-high     { color: #9a3412; }
:root[data-theme="light"] .level-medium   { color: #7c5800; }
:root[data-theme="light"] .level-low      { color: #1d4ed8; }
:root[data-theme="light"] .demo-tabs::before { background: #ffffff; }
:root[data-theme="light"] .stat-value { color: var(--text); }
:root[data-theme="light"] .navbar.scrolled .nav-inner { box-shadow: 0 14px 44px rgba(var(--ink-rgb),0.10); }

/* ── Hero illustration: message under a scanning beam ────────────────────── */
.scan-card {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 232px; padding: 18px 18px 20px; border-radius: var(--radius); overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border-hi);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
  animation: card-float 11s ease-in-out infinite alternate;
}
@keyframes card-float { from { transform: translate(-50%, -52%) rotate(-0.6deg); } to { transform: translate(-50%, -48%) rotate(0.6deg); } }
.scan-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.scan-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(var(--accent-rgb),0.3);
}
.scan-lines { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.scan-body { display: flex; flex-direction: column; gap: 8px; }
.scan-line-skel {
  display: block; height: 7px; border-radius: var(--pill);
  background: var(--fill); border: 1px solid var(--line-soft);
}
.scan-line-skel.dim { opacity: 0.6; }
.scan-line-skel.w-35 { width: 35%; } .scan-line-skel.w-40 { width: 40%; } .scan-line-skel.w-55 { width: 55%; }
.scan-line-skel.w-60 { width: 60%; } .scan-line-skel.w-75 { width: 75%; } .scan-line-skel.w-80 { width: 80%; }
.scan-line-skel.w-90 { width: 90%; }
.scan-line-skel.flagged {
  background: linear-gradient(90deg, rgba(var(--red-rgb),0.55), rgba(var(--red-rgb),0.25));
  border-color: rgba(var(--red-rgb),0.45); box-shadow: 0 0 12px rgba(var(--red-rgb),0.25);
  animation: flag-pulse 3.2s ease-in-out infinite;
}
@keyframes flag-pulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
.scan-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
}
.scan-badge svg { width: 14px; height: 14px; }
.scan-badge-ok { background: rgba(var(--accent2-rgb),0.18); color: var(--accent2); border: 1px solid rgba(var(--accent2-rgb),0.35); }
.scan-badge-alert {
  position: absolute; right: 12px; bottom: 44px;
  background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(var(--red-rgb),0.4);
  animation: badge-pop 3.2s ease-in-out infinite;
}
@keyframes badge-pop { 0%, 100% { transform: scale(0.94); } 50% { transform: scale(1.06); } }
.scan-beam {
  position: absolute; left: 0; right: 0; top: 0; height: 40px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb),0.20) 55%, rgba(var(--accent-rgb),0.55) 96%, transparent);
  border-bottom: 1px solid rgba(var(--accent-rgb),0.85);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb),0.35);
  animation: beam-sweep 6.5s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes beam-sweep { from { transform: translateY(-40px); } to { transform: translateY(calc(100% + 170px)); } }
.orb-scene .orb { opacity: 0.5; }

/* ── Score rings ─────────────────────────────────────────────────────────── */
.score-ring { position: relative; width: 104px; height: 104px; margin: 0 auto 6px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring-track { fill: none; stroke: var(--track); stroke-width: 6.5; }
.ring-fg {
  fill: none; stroke-width: 6.5; stroke-linecap: round;
  stroke-dasharray: 276.46; stroke-dashoffset: 276.46;
  transition: stroke-dashoffset 1.1s var(--ease), stroke 0.3s;
}
.score-ring .vb-prob, .score-ring .crb-score {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: var(--text-3xl); line-height: 1; letter-spacing: -0.03em;
}
.vb-right, .crb-right { text-align: center; }
.vb-prob-label, .crb-score-label { margin: 0; }

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .orb, .orb-ring, .orb-chip, .pulse-dot, .gradient-text,
  .hero-content, .hero-visual, .scan-card, .scan-beam, .scan-badge-alert,
  .scan-line-skel.flagged { animation: none !important; }
  .scan-beam { display: none; }
  .ring-fg { transition: none; }
  .reveal { opacity: 1; }
  .reveal.in-view { animation: none; }
  .demo-tabs::before, .btn, .stat-card, .feature-category-card, .bento-card, .cat-card, .step-body, .example-tag { transition: none; }
  .btn-primary:hover, .btn-outline:hover, .stat-card:hover, .feature-category-card:hover, .bento-card:hover,
  .cat-card:hover, .step:hover .step-body, .example-tag:hover, .btn-verify:hover { transform: none; }
}

/* ── Forced colours (Windows high contrast) ──────────────────────────────── */
/* Tints, shadows and gradients are dropped in this mode, so status that relied
   on them gets a system colour or a border; the colour fields are hidden. */
@media (forced-colors: active) {
  .bg-fluid, .orb, .orb-ring { display: none; }
  /* Qualified so the rule outranks the per-level colours (.risk-high .risk-dot …). */
  .risk-item .risk-dot, .orb-chip .chip-dot, .pulse-dot { forced-color-adjust: none; background: CanvasText; box-shadow: none; }
  .score-ring svg { forced-color-adjust: none; }
  .ring-track { stroke: CanvasText; }
  /* setRing() sets the level colour inline; the system colour wins here. */
  .ring-fg { stroke: Highlight !important; }
  .level-label, .cat-level-badge, .pill, .kw-pill, .tag-bad, .tag-good, .tag-purple, .tag-info,
  .disp-confidence-badge, .ml-badge, .best-badge { border: 1px solid CanvasText; }
  /* Fields that show focus with a glow get a real outline. */
  .email-input-wrap:focus-within, .content-subject-input:focus, .content-body-textarea:focus,
  .ocr-language-select:focus, .feedback-dialog select:focus { outline: 2px solid Highlight; outline-offset: 2px; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; min-height: 0; gap: 40px; }
  .hero-visual { display: none; }
  .hero-stats { grid-template-columns: repeat(2,1fr); }
  .result-cols { grid-template-columns: 1fr; }
  .feature-breakdown { grid-template-columns: 1fr; }
  .verify-groups { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-card { grid-column: span 1; }
  .bento-hero, .bento-wide { grid-column: span 2; }
  .bento-tall { grid-row: auto; }
  .charts-row { grid-template-columns: 1fr; }
  .feature-cards-grid { grid-template-columns: 1fr; }
  .content-category-grid { grid-template-columns: 1fr; }
  .content-bottom-row { grid-template-columns: 1fr; }
  .section { padding: 88px 24px; }
}
@media (max-width: 640px) {
  .navbar { padding: 10px 10px 0; }
  .nav-inner { padding: 0 8px 0 14px; height: 50px; }
  .nav-links { display: none; }
  .section { padding: 64px 16px; }
  .section-header { margin-bottom: 36px; }
  .email-input-row { flex-direction: column; }
  .email-input-wrap { border-radius: var(--radius-sm); }
  .btn-analyze { width: 100%; justify-content: center; padding: 14px 24px; }
  .content-input-actions .btn-analyze { width: auto; flex: 1 1 100%; }
  .content-input-actions .btn-ghost { flex: 0 1 auto; }
  .verify-card-wide .verify-idle { flex-direction: column; align-items: flex-start; }
  .bento { grid-template-columns: 1fr; }
  .bento-card, .bento-hero, .bento-wide { grid-column: auto; }
  .auth-layout { grid-template-columns: 1fr; }
  .lk-row, .align-row { grid-template-columns: 56px minmax(0, 1fr); }
  .lk-row .demo-tag, .align-row .demo-tag { grid-column: 2; justify-self: start; }
  .verdict-banner { flex-direction: column; gap: 12px; text-align: center; }
  .vb-left { flex-direction: column; text-align: center; }
  .vb-right { text-align: center; }
  .quick-examples {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
    scrollbar-width: none; overscroll-behavior-x: contain;
    /* The row fades out at its right edge, showing that more examples scroll in. */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .quick-examples::-webkit-scrollbar { display: none; }
  .quick-examples > * { flex: 0 0 auto; }
  .content-risk-banner { flex-direction: column; align-items: flex-start; }
  .crb-right { text-align: left; }
  .demo-tabs { max-width: none; }
  .step:hover .step-body { transform: none; }
}

/* Keep the analyst login reachable when section navigation is collapsed. */
.case-login {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 14px; border-radius: var(--pill);
  border: 1px solid var(--border-hi); background: var(--surface-2);
  color: var(--text); font-size: var(--text-xs); font-weight: 650; white-space: nowrap;
  text-decoration: none; flex-shrink: 0;
}
.case-login:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.case-login:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 900px) { .nav-links { display: none; } }

/* Section menu for narrow screens, where .nav-links is collapsed. */
.nav-menu-toggle {
  position: relative; display: none; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border-hi); color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.nav-menu-toggle:hover { border-color: var(--accent); }
.nav-menu-toggle .ico { position: absolute; width: 18px; height: 18px; vertical-align: 0; transition: opacity 0.2s, transform 0.3s var(--ease); }
.nav-menu-toggle .ico-close { opacity: 0; transform: rotate(-45deg) scale(0.7); }
.navbar.menu-open .nav-menu-toggle .ico-menu { opacity: 0; transform: rotate(45deg) scale(0.7); }
.navbar.menu-open .nav-menu-toggle .ico-close { opacity: 1; transform: none; }
.nav-inner { position: relative; }
@media (max-width: 900px) {
  .nav-menu-toggle { display: inline-flex; }
  .navbar.menu-open .nav-links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    display: flex; flex-direction: column; gap: 2px; padding: 8px;
    /* Opaque: a backdrop-filter nested inside .nav-inner's cannot blur the page. */
    background: var(--bg-card2);
    border: 1px solid var(--border-hi); border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: menu-in 0.28s var(--ease) both;
  }
  .navbar.menu-open .nav-links a { display: block; padding: 12px 16px; border-radius: var(--radius-sm); font-size: var(--text-base); color: var(--text); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .navbar.menu-open .nav-links { animation: none; }
  .nav-menu-toggle .ico { transition: none; }
}

/* Benchmark rows become compact cards on phones instead of a sideways-scrolling table. */
@media (max-width: 640px) {
  .metrics-table-wrap { overflow-x: visible; }
  .metrics-table thead { display: none; }
  .metrics-table, .metrics-table tbody { display: block; width: 100%; }
  .metrics-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
  .metrics-table tr:last-child { border-bottom: none; }
  .metrics-table td, .metrics-table td:first-child { padding: 0; border: none; text-align: left; }
  .metrics-table td:first-child { grid-column: 1 / -1; font-size: var(--text-base); }
  .metrics-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: var(--text-2xs); font-weight: 600; color: var(--text-dim); letter-spacing: 0.02em; }
  .metrics-table tr:hover td { background: none; }
}
.nav-case-item { display: none; }
@media (max-width: 640px) {
  /* The bar keeps the brand, language, theme and menu; the case login is in the menu. */
  .nav-right > .case-login { display: none; }
  .navbar.menu-open .nav-links .nav-case-item { display: block; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
  .disposable-info-card, .disposable-info-card:not([open]) { padding: 18px 20px; }
  .di-header { column-gap: 12px; }
  .di-header > .di-title { font-size: var(--text-xl); }
  .case-login { min-height: 40px; padding: 8px 10px; font-size: var(--text-2xs); }
  .case-login span[aria-hidden="true"] { display: none; }
  .nav-brand { gap: 7px; font-size: var(--text-lg); }
  .theme-toggle { flex-shrink: 0; }
}

/* Plain-text extraction evidence, shared by both themes. */
.visual-evidence { margin: 1rem 0; padding: 1rem; border: 1px solid var(--border, #64748b); border-radius: var(--radius-sm); min-width: 0; }
.visual-evidence[hidden] { display: none; }
.visual-evidence section { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--border, #64748b); }
.visual-evidence pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 20rem; overflow: auto; font-size: var(--text-md); }
.visual-evidence h3, .visual-evidence h4 { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.visual-evidence p { margin: .5rem 0; overflow-wrap: anywhere; }
.visual-original-preview { margin: .75rem 0; }
.visual-original-preview summary { cursor: pointer; font-weight: 600; }
.visual-original-preview summary:focus-visible { outline: 2px solid var(--accent, #5ad1ff); outline-offset: 3px; }
.visual-original-preview-scroll { max-height: 28rem; overflow: auto; border: 1px solid var(--border, #64748b); border-radius: var(--radius-xs); }
.visual-original-preview img { display: block; max-width: none; width: auto; height: auto; }

.ocr-language-select { width: 100%; min-height: 44px; padding: 12px; border: 1px solid var(--border-hi); border-radius: var(--radius-sm); background: var(--field-bg); color: var(--text); font: inherit; }
.ocr-language-select:focus-visible { outline: 2px solid var(--accent, #5ad1ff); outline-offset: 3px; }

/* Themed selects: the chevron is drawn with gradients so no image source is needed. */
.ocr-language-select, .feedback-dialog select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.ocr-language-select:hover, .feedback-dialog select:hover { border-color: rgba(var(--accent-rgb),0.5); }
.ocr-language-select:focus, .feedback-dialog select:focus { border-color: rgba(var(--accent-rgb),0.6); box-shadow: var(--focus-ring); outline: none; }
.ocr-language-select option, .feedback-dialog select option { background: var(--bg-card2); color: var(--text); }

/* iOS Safari zooms into any focused field whose text is under 16px. Target touch-first
   devices rather than a width so landscape phones and tablets are covered too; mouse
   and trackpad users keep the compact desktop sizes. */
/* iOS Safari zooms in on a field under 16px. A platform threshold, not a step on the type scale. */
@media (hover: none) and (pointer: coarse) {
  .email-input, .content-subject-input, .content-body-textarea, .ocr-language-select,
  .feedback-dialog select, .feedback-dialog textarea, .copy-buffer { font-size: 16px; }
}

/* Upload drop target */
.content-input-card .file-dropzone {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center;
  padding: 18px 20px; background: var(--fill-soft);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.content-input-card .file-dropzone > :not(.drop-icon):not(.file-drop-hint) { grid-column: 1 / -1; }
.content-input-card .file-dropzone .file-drop-hint { margin: 0; }
.content-input-card .file-dropzone .content-label { margin-top: 16px; }
.content-input-card .file-dropzone:hover { border-color: rgba(var(--accent-rgb),0.45); }
.content-input-card .file-dropzone.drag-active {
  border-style: solid; border-color: var(--accent); outline: none;
  background: rgba(var(--accent-rgb),0.08); box-shadow: var(--focus-ring);
}
.drop-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-sm); color: var(--accent);
  background: rgba(var(--accent-rgb),0.10); border: 1px solid rgba(var(--accent-rgb),0.22);
  transition: transform 0.35s var(--ease);
}
.drop-icon .ico { width: 22px; height: 22px; vertical-align: 0; }
.file-dropzone.drag-active .drop-icon { transform: translateY(-2px) scale(1.06); }
.raw-email-file { cursor: pointer; }

/* ── Skip link ─────────────────────────────────────────────────────────────
   Off-screen until focused by keyboard; sits above the sticky navbar. */
.skip-link {
  position: fixed; top: -64px; left: 16px; z-index: 200;
  padding: 8px 14px; border-radius: var(--radius-xs); font-weight: 600;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Hidden visually but still read by screen readers (e.g. live status messages). */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Cancel while a sender analysis runs (next to the busy Analyze button) ── */
.email-input-row .btn-cancel { flex-shrink: 0; white-space: nowrap; }
.email-input-row .btn-cancel[hidden] { display: none; }

/* ── Without JavaScript ──────────────────────────────────────────────────────
   <noscript> notices (English only: nothing can translate them), and controls
   that do nothing without scripts are hidden where the browser supports the
   `scripting` media feature. */
.noscript-notice {
  margin: 0 0 24px; padding: 14px 18px; border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--yellow-rgb),0.45); background: rgba(var(--yellow-rgb),0.10);
  color: var(--text); font-size: var(--text-base); line-height: 1.55;
}
.noscript-notice strong { font-weight: 700; }
#demo .noscript-notice { max-width: 720px; margin: 0 auto 28px; }
@media (scripting: none) {
  .theme-toggle, .lang-toggle, .nav-menu-toggle,
  .demo-tabs, .tab-panel, .recent-checks { display: none; }
}

/* ── 404 page (404.html) ─────────────────────────────────────────────────── */
.nf-brand { color: var(--text); text-decoration: none; }
.nf-brand:hover { text-decoration: none; }
.nf-main {
  max-width: 640px; margin: 0 auto; padding: 96px 24px 80px;
  min-height: calc(100vh - 66px); display: flex; flex-direction: column; justify-content: center;
}
.nf-code {
  font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.nf-main h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 16px; }
.nf-lead { color: var(--text-muted); font-size: var(--text-lg); margin-bottom: 32px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.nf-actions .btn { text-decoration: none; }
:root[data-theme="light"] .nf-code { color: #0a6fbd; }
:lang(zh-CN) .nf-code { letter-spacing: 0.04em; }
@media (max-width: 640px) {
  .nf-main { padding: 56px 16px 64px; min-height: 0; }
  .nf-actions .btn { width: 100%; justify-content: center; }
}
