/* ============================================
   TRUST AI v1.0 — Professional Dark UI
   Mobile-first · RTL/LTR · Transparent risk
   ============================================ */

:root,
[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-card: #111827;
  --bg-elevated: #1a2332;
  --border: #1e2a3a;
  --border-focus: #22d3ee;
  --header-bg: rgba(10, 15, 26, 0.92);

  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #22d3ee;
  --primary-dim: #0891b2;
  --primary-bg: rgba(34, 211, 238, 0.12);

  --low: #22c55e;
  --low-bg: rgba(34, 197, 94, 0.12);
  --medium: #eab308;
  --medium-bg: rgba(234, 179, 8, 0.12);
  --high: #f97316;
  --high-bg: rgba(249, 115, 22, 0.12);
  --severe: #ef4444;
  --severe-bg: rgba(239, 68, 68, 0.12);
  --unknown: #94a3b8;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --font-ar: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-en: "Inter", system-ui, sans-serif;
  --transition: 0.2s ease;
  --shadow: 0 8px 24px rgba(0,0,0,0.4);
  --link-blue: #3b82f6;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --bg-elevated: #e2e8f0;
  --border: #cbd5e1;
  --border-focus: #0891b2;
  --header-bg: rgba(241, 245, 249, 0.94);

  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --primary: #0891b2;
  --primary-dim: #0e7490;
  --primary-bg: rgba(8, 145, 178, 0.12);

  --low: #16a34a;
  --low-bg: rgba(22, 163, 74, 0.12);
  --medium: #ca8a04;
  --medium-bg: rgba(202, 138, 4, 0.12);
  --high: #ea580c;
  --high-bg: rgba(234, 88, 12, 0.12);
  --severe: #dc2626;
  --severe-bg: rgba(220, 38, 38, 0.12);
  --unknown: #64748b;

  --shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  --link-blue: #2563eb;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body,
html[dir="ltr"] body { font-family: var(--font-en); }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0 var(--space-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.logo-img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.45));
  transition: filter 0.3s ease;
}

.logo:hover .logo-img {
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.7));
}

.logo-text {
  background: linear-gradient(135deg, #67e8f9 0%, #22d3ee 45%, #a5f3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-icon { color: var(--primary); font-size: 1.3rem; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-actions .icon-btn {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
}

.lang-switch {
  display: flex;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  padding: 2px;
  border: 1px solid var(--border);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--primary);
  color: #0a0f1a;
}

.icon-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover { border-color: var(--primary); color: var(--primary); }


.ai-status-bar {
  margin-top: var(--space-sm);
  text-align: center;
}

/* ── LIVE bar + alert signal lights ───────────────────────────────────── */
.live-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.55rem;
  padding: 0.35rem 0.5rem;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444, 0 0 14px rgba(239, 68, 68, 0.55);
  animation: liveDotPulse 1.4s ease-in-out infinite;
}

.live-text {
  font-style: italic;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  font-family: var(--font-en), system-ui, sans-serif;
  background: linear-gradient(90deg, #f87171, #fbbf24, #34d399, #60a5fa, #f87171);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: liveTextShine 3.5s linear infinite, liveTextPulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.45));
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px #ef4444, 0 0 14px rgba(239, 68, 68, 0.55); }
  50% { opacity: 0.55; transform: scale(0.75); box-shadow: 0 0 3px #ef4444, 0 0 8px rgba(239, 68, 68, 0.3); }
}

@keyframes liveTextShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes liveTextPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(248, 113, 113, 0.35)); opacity: 0.92; }
  50% { filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.7)); opacity: 1; }
}

.live-alerts {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.alert-btn {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.alert-btn:hover { transform: scale(1.15); }
.alert-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.alert-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0.35;
  transition: opacity 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.alert-green .alert-core {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.35);
}
.alert-blue .alert-core {
  background: #3b82f6;
  box-shadow: 0 0 4px rgba(59, 130, 246, 0.35);
}
.alert-orange .alert-core {
  background: #f97316;
  box-shadow: 0 0 4px rgba(249, 115, 22, 0.35);
}
.alert-red .alert-core {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.35);
}

.alert-btn.active .alert-core {
  opacity: 1;
  transform: scale(1.15);
  animation: alertPulse 0.9s ease-in-out infinite;
}

.alert-btn.active.alert-green .alert-core {
  box-shadow: 0 0 8px #22c55e, 0 0 18px rgba(34, 197, 94, 0.65), 0 0 28px rgba(34, 197, 94, 0.3);
}
.alert-btn.active.alert-blue .alert-core {
  box-shadow: 0 0 8px #3b82f6, 0 0 18px rgba(59, 130, 246, 0.65), 0 0 28px rgba(59, 130, 246, 0.3);
}
.alert-btn.active.alert-orange .alert-core {
  box-shadow: 0 0 8px #f97316, 0 0 18px rgba(249, 115, 22, 0.7), 0 0 28px rgba(249, 115, 22, 0.35);
}
.alert-btn.active.alert-red .alert-core {
  box-shadow: 0 0 10px #ef4444, 0 0 22px rgba(239, 68, 68, 0.75), 0 0 34px rgba(239, 68, 68, 0.4);
  animation: alertPulseFast 0.55s ease-in-out infinite;
}

.live-alerts.has-severe .alert-btn:not(.active) .alert-core { opacity: 0.18; }
.live-alerts.has-high .alert-btn:not(.active) .alert-core { opacity: 0.22; }

@keyframes alertPulse {
  0%, 100% { transform: scale(1.1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.7; }
}

@keyframes alertPulseFast {
  0%, 100% { transform: scale(1.2); opacity: 1; }
  50% { transform: scale(0.75); opacity: 0.55; }
}

.live-alerts.idle .alert-core {
  animation: alertIdleGlow 2.8s ease-in-out infinite;
}
.live-alerts.idle .alert-green .alert-core { animation-delay: 0s; }
.live-alerts.idle .alert-blue .alert-core { animation-delay: 0.35s; }
.live-alerts.idle .alert-orange .alert-core { animation-delay: 0.7s; }
.live-alerts.idle .alert-red .alert-core { animation-delay: 1.05s; }

@keyframes alertIdleGlow {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.5; }
}


.ai-status {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.ai-status.on {
  background: var(--low-bg);
  color: var(--low);
  border: 1px solid var(--low);
}

.ai-status.off {
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* Main */
.main { flex: 1; padding: var(--space-lg) 0; }

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Hero */
.hero { text-align: center; margin-bottom: var(--space-xl); }

.hero-title {
  font-size: 1.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
}

.hero-tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.hero-desc { color: var(--text-muted); font-size: 0.95rem; }
.hero-extra {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: var(--space-sm);
  max-width: 360px;
  margin-inline: auto;
}

/* Input card */
.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.input-area {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: var(--space-md);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 120px;
  transition: var(--transition);
  line-height: 1.55;
}

.input-area:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.privacy-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: var(--space-sm) 0 var(--space-md);
}

.image-preview {
  margin: var(--space-md) 0;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.image-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
  background: #000;
}

.btn-remove {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.btn-label { display: inline-flex; align-items: center; justify-content: center; user-select: none; }

.btn-primary {
  background: var(--primary);
  color: #0a0f1a;
}

.btn-primary:hover { background: #67e8f9; }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  width: 100%;
}

.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Layers info */
.layers-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.layer-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Analyzing */
.analyzing-box {
  text-align: center;
  padding: var(--space-xl) 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Result */
.result-heading {
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  text-align: center;
}

.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.risk-gauge { width: 140px; height: 140px; }

.gauge-svg { width: 100%; height: 100%; }

.gauge-arc {
  transition: stroke-dashoffset 0.8s ease;
}

.gauge-score {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-en);
}

.gauge-label { font-size: 0.7rem; }

.score-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.score-num {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-en);
  display: none; /* shown inside gauge */
}

.level-badge {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid;
}

.mode-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.mode-badge.hybrid,
.mode-badge.ai-vision,
.mode-badge.ai {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
}

/* Result sections */
.result-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.result-section h3 {
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.reason-list,
.action-list {
  list-style: none;
  padding: 0;
}

.reason-list li,
.action-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.reason-list li:last-child,
.action-list li:last-child { border-bottom: none; }

html[dir="rtl"] .reason-list li,
html[dir="rtl"] .action-list li {
  padding: 0.4rem 1.2rem 0.4rem 0;
}

.reason-list li::before {
  content: "⚠";
  position: absolute;
  inset-inline-start: 0;
  color: var(--medium);
}

.action-list li::before {
  content: "→";
  position: absolute;
  inset-inline-start: 0;
  color: var(--primary);
}

.action-list li.ai-action::before { content: "✦"; color: #a78bfa; }

/* Data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  padding: 0.45rem 0.4rem;
  text-align: start;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table .num {
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.data-table .url-cell code {
  font-size: 0.7rem;
  color: var(--text-dim);
  word-break: break-all;
}

.mini-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  min-width: 50px;
}

.mini-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* Category cards */
.cat-grid {
  display: grid;
  gap: var(--space-sm);
}

.cat-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
}

.cat-name { font-size: 0.8rem; font-weight: 600; }
.cat-val { font-size: 0.75rem; color: var(--text-muted); margin: 2px 0 6px; }
.cat-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.cat-bar > div { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* AI box */
.ai-box {
  background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(167,139,250,0.08));
  border: 1px solid rgba(34,211,238,0.25);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.ai-box h3 {
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.ai-box p { font-size: 0.88rem; margin-bottom: var(--space-sm); }

.ai-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.ai-indicators {
  list-style: none;
  font-size: 0.82rem;
}

.ai-indicators li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

.error-text { color: var(--severe); font-size: 0.85rem; }

.disclaimer {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  margin: var(--space-md) 0;
  line-height: 1.5;
}

.muted { color: var(--text-dim); font-size: 0.85rem; }

/* Footer */
.footer {
  text-align: center;
  padding: var(--space-md) 0 var(--space-lg);
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 85dvh;
  overflow-y: auto;
  padding: var(--space-lg);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.modal-header h2 { font-size: 1.1rem; }

.modal-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.examples-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.example-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  text-align: start;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: var(--transition);
  width: 100%;
}

.example-item:hover { border-color: var(--primary); }

.ex-title { font-weight: 600; font-size: 0.9rem; }
.ex-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* Settings fields */
.field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  margin-top: var(--space-md);
}

.field-select,
.field-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.field-select:focus,
.field-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.settings-btns { margin-top: var(--space-md); }

.free-title {
  font-size: 0.85rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
}

.free-models-list {
  list-style: none;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.model-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  flex-wrap: wrap;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.model-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-bg);
}

.model-card.is-paid {
  border-color: rgba(249, 115, 22, 0.35);
}

.model-card-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.model-icon {
  flex-shrink: 0;
  border-radius: 6px;
  display: block;
}

.model-card-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.model-card-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.model-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.model-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.model-badge.free {
  background: var(--low-bg);
  color: var(--low);
}

.model-badge.paid {
  background: var(--high-bg);
  color: var(--high);
}

.model-badge.vision {
  background: var(--primary-bg);
  color: var(--primary);
}

.model-key-link {
  color: var(--link-blue) !important;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.model-key-link:hover {
  text-decoration: underline;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

.install-btn.hidden,
.hidden {
  display: none !important;
}

[data-theme="light"] .logo-text {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 45%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .header {
  box-shadow: 0 1px 0 var(--border);
}

[data-theme="light"] .toast {
  box-shadow: var(--shadow);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  z-index: 200;
  box-shadow: var(--shadow);
  max-width: 90vw;
  text-align: center;
}

.toast.error {
  border-color: var(--severe);
  color: #fca5a5;
}

.toast.hidden { display: none; }

/* Utilities */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Desktop */
@media (min-width: 540px) {
  #app { padding: 0 var(--space-lg); }
  .modal-panel {
    border-radius: var(--radius);
    margin-bottom: 2rem;
    max-height: 80vh;
  }
  .modal { align-items: center; }
}

.input-card.drag-over { outline: 2px dashed var(--accent, #22d3ee); outline-offset: -6px; }

/* ── Voice mic button ─────────────────────────────────────────────────── */
.input-wrap {
  position: relative;
}

.input-wrap .input-area {
  padding-inline-end: 3rem;
}

.mic-btn {
  position: absolute;
  bottom: 0.75rem;
  inset-inline-end: 0.65rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2;
}

.mic-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.mic-btn.listening {
  border-color: var(--severe);
  color: var(--severe);
  background: var(--severe-bg);
  animation: micPulse 1.2s ease-in-out infinite;
}

.mic-btn .mic-pulse {
  display: none;
}

.mic-btn.listening .mic-pulse {
  display: block;
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--severe);
  opacity: 0.5;
  animation: micRing 1.2s ease-out infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes micRing {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ── About / methodology page ─────────────────────────────────────────── */
.about-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, #67e8f9, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
  line-height: 1.55;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.about-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.about-list {
  margin: var(--space-sm) 0 0;
  padding-inline-start: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.about-list li {
  margin-bottom: 0.4rem;
}

.about-list strong {
  color: var(--text);
}

.about-contact {
  text-align: center;
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.06), transparent 60%);
}

.contact-link {
  display: inline-block;
  margin: var(--space-md) 0 var(--space-sm);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  background: var(--primary-bg);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  direction: ltr;
}

.contact-link:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
}

.about-contact-hint {
  font-size: 0.82rem !important;
  color: var(--text-dim) !important;
}

/* Footer contact */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-contact {
  color: var(--primary);
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.85;
  transition: var(--transition);
}

.footer-contact:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Source report ─────────────────────────────────────────────── */
.sr-verdict{display:flex;gap:1rem;align-items:center;border:1.5px solid;border-radius:14px;padding:1rem;background:var(--bg-card);margin-bottom:1rem}
.sr-score{font-size:2.6rem;font-weight:700;line-height:1}.sr-score small{font-size:.9rem;color:var(--text-muted)}
.sr-vlabel{font-weight:700;margin-bottom:.25rem}.sr-verdict p{margin:0;color:var(--text-muted)}
.sr-svg{width:100%;height:auto;display:block;margin:.5rem 0;color:var(--text-muted)}
.sr-axis{font-size:10.5px;fill:var(--text-muted)}.sr-num{font-size:11px;fill:var(--text);font-weight:600}
.sr-grid{stroke:var(--border);stroke-width:1}.sr-ring{fill:none;stroke:var(--border);stroke-width:1}
.sr-node{fill:var(--bg-elevated)}.sr-nt{font-size:14px;font-weight:700;fill:var(--text)}.sr-nb{font-size:12.5px;font-weight:600}
.sr-radar{max-width:340px;margin-inline:auto}
.sr-sentences{margin:.5rem 0 0;padding-inline-start:0;list-style:none;font-size:.85rem;color:var(--text-muted)}
.sr-sentences li{padding:.25rem 0;border-bottom:1px solid var(--border)}.sr-sentences b{color:var(--text);margin-inline-end:.3rem}
.sr-link{border:1px solid var(--border);border-radius:12px;padding:.75rem;margin-bottom:.75rem;background:var(--bg-card)}
.sr-link-url{overflow-wrap:anywhere;margin-bottom:.5rem}
.sr-split{display:flex;flex-wrap:wrap;font-family:monospace;font-size:.95rem;margin:.5rem 0;direction:ltr}
.sr-seg{padding:.2rem .35rem;border-radius:4px}.sr-seg.proto{color:var(--text-dim)}.sr-seg.sub{background:var(--medium-bg);color:var(--medium)}
.sr-seg.dom{background:var(--primary-bg);color:var(--primary);font-weight:700}.sr-seg.tld{background:var(--high-bg);color:var(--high)}.sr-seg.path{color:var(--text-dim)}
.sr-table th{text-align:start;color:var(--text-muted);font-weight:500;width:35%}
.sr-h4{margin:.75rem 0 .35rem;font-size:.9rem;color:var(--text-muted)}
.sr-flags,.sr-queries,.sr-checks{list-style:none;padding:0;margin:0}
.sr-flags li{padding:.25rem 0}.sr-flags .bad{color:var(--high)}.sr-flags .ok{color:var(--low)}
.sr-compare{display:flex;gap:.5rem;align-items:stretch;flex-wrap:wrap}
.sr-cmp-box{flex:1;min-width:140px;border:1px solid var(--border);border-radius:12px;padding:.75rem;background:var(--bg-card);display:flex;flex-direction:column;gap:.25rem;overflow-wrap:anywhere}
.sr-cmp-k{font-size:.75rem;color:var(--text-muted)}.sr-cmp-arrow{align-self:center;font-size:1.6rem;color:var(--primary)}
.sr-note{margin:.5rem 0 0;padding:.5rem .75rem;border-radius:8px}.sr-note.bad{background:var(--severe-bg);color:var(--severe)}.sr-note.ok{background:var(--low-bg);color:var(--low)}
.sr-checks li{display:flex;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--border)}
.sr-checks p{margin:.15rem 0 0;color:var(--text-muted);font-size:.85rem}
.sr-pending{flex:none;align-self:flex-start;font-size:.7rem;padding:.15rem .5rem;border-radius:999px;background:var(--medium-bg);color:var(--medium)}
.sr-queries li{margin:.25rem 0}.sr-queries code{overflow-wrap:anywhere}

.ai-test-result{white-space:pre-line;margin:.5rem 0;padding:.6rem .75rem;border-radius:8px;font-size:.85rem;overflow-wrap:anywhere;line-height:1.5}
.ai-test-result.ok{background:var(--low-bg);color:var(--low)}
.ai-test-result.bad{background:var(--severe-bg);color:var(--severe)}

/* ── History ─────────────────────────────────────────────────────────── */
.history-list { list-style: none; max-height: 55vh; overflow-y: auto; }
.history-empty { color: var(--text-muted); padding: 1rem 0; text-align: center; }
.history-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
}
.history-item-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.history-score { font-weight: 700; font-size: 1.05rem; }
.history-level { font-size: 0.78rem; color: var(--text-muted); }
.history-date { font-size: 0.72rem; color: var(--text-dim); margin-inline-start: auto; }
.history-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Link cards ──────────────────────────────────────────────────────── */
.link-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
}
.link-card.link-warn { border-color: rgba(249, 115, 22, 0.4); }
.link-card.link-danger { border-color: rgba(239, 68, 68, 0.5); background: var(--severe-bg); }
.link-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.link-host { font-size: 0.9rem; overflow-wrap: anywhere; }
.link-score-badge {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
}
.link-url {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
  margin-bottom: 0.35rem;
}
.link-flags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.link-flags li {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--high-bg);
  color: var(--high);
}

/* ── Mode banner & sensitive ─────────────────────────────────────────── */
.mode-banner {
  font-size: 0.8rem;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin: var(--space-md) 0;
  border: 1px solid var(--border);
}
.offline-banner {
  background: var(--low-bg);
  color: var(--low);
  border-color: rgba(34, 197, 94, 0.3);
}
.ai-banner {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: rgba(34, 211, 238, 0.3);
}
.sensitive-warn {
  background: var(--severe-bg);
  color: var(--severe);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.kbd-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  text-align: center;
}
.home-extra-btns { margin-top: 0.35rem; }
.result-actions-row { margin-bottom: 0.5rem; flex-wrap: wrap; }

/* ── Elderly mode ────────────────────────────────────────────────────── */
html.elderly {
  font-size: 19px;
}
html.elderly .btn {
  min-height: 48px;
  font-size: 1.05rem;
  padding: 0.75rem 1.1rem;
}
html.elderly .input-area {
  font-size: 1.1rem;
  line-height: 1.7;
}
html.elderly .icon-btn {
  width: 42px;
  height: 42px;
}
html.elderly .hero-title { font-size: 1.85rem; }
html.elderly .header-actions { gap: 0.45rem; }

/* ── Print / PDF ─────────────────────────────────────────────────────── */
@media print {
  .header, .live-bar, .ai-status-bar, .btn-row, .lang-switch,
  #btn-mic, .mic-btn, .modal, .toast, .layers-info, .mode-banner,
  .home-extra-btns, .kbd-hint, #btn-upload, #file-input {
    display: none !important;
  }
  body, #app {
    max-width: 100%;
    background: #fff;
    color: #000;
  }
  .view { display: none !important; }
  #view-result.view.active { display: block !important; }
  .score-card, .result-section, .ai-box {
    break-inside: avoid;
    border-color: #ccc;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   v1.6 — CLIENT (العميل) full-screen center + Models panel (لوحة النماذج)
   ═══════════════════════════════════════════════════════════════════════ */

/* Header button + hero call-to-action */
.client-btn { color: var(--primary); border-color: var(--primary-dim); }
.client-cta {
  display: flex; align-items: center; gap: var(--space-md);
  width: 100%; text-align: start; cursor: pointer;
  padding: var(--space-md) var(--space-lg); margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--primary-bg), transparent 70%), var(--bg-card);
  border: 1px solid var(--primary-dim); border-radius: var(--radius);
  color: var(--text); font-family: inherit;
  transition: border-color var(--transition), transform var(--transition);
}
.client-cta:hover { border-color: var(--primary); transform: translateY(-1px); }
.client-cta-icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 14px; background: var(--primary-bg); color: var(--primary);
}
.client-cta-text { display: flex; flex-direction: column; gap: 2px; }
.client-cta-text strong { font-size: 1.05rem; }
.client-cta-text small { color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; }

/* Full-screen shell */
.client-screen {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  animation: fadeIn 0.2s ease;
}
.client-screen.hidden { display: none !important; }
.cl-bar {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 0.6rem var(--space-md);
  background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.cl-bar-title { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.cl-bar-title h2 { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-ai-chip {
  font-size: 0.72rem; padding: 0.25rem 0.6rem; border-radius: var(--radius-full);
  border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap;
  max-width: 34vw; overflow: hidden; text-overflow: ellipsis;
}
.cl-ai-chip.on { color: var(--low); border-color: var(--low); background: var(--low-bg); }
.cl-models-btn { padding: 0.35rem 0.7rem; font-size: 0.8rem; min-height: 0; }
.cl-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cl-wrap { max-width: 980px; margin: 0 auto; padding: var(--space-md) var(--space-md) 4rem; }

/* Composer */
.cl-composer {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-md); margin-bottom: var(--space-md);
}
.cl-sub { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: var(--space-md); }
.cl-kinds { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: var(--space-sm); }
.cl-kind {
  font-family: inherit; font-size: 0.82rem; cursor: pointer;
  padding: 0.35rem 0.85rem; border-radius: var(--radius-full);
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
}
.cl-kind.active { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); font-weight: 600; }
.cl-drop { border: 1px dashed transparent; border-radius: var(--radius); }
.cl-drop.drag-over { border-color: var(--primary); background: var(--primary-bg); }
.cl-text { width: 100%; min-height: 130px; }
.cl-tray { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: var(--space-sm); }
.cl-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-elevated); }
.cl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-thumb-x {
  position: absolute; top: 2px; inset-inline-end: 2px; width: 22px; height: 22px;
  border-radius: 50%; border: 0; cursor: pointer; line-height: 1;
  background: rgba(0,0,0,0.7); color: #fff; font-size: 14px;
}
.cl-tray.static .cl-thumb { width: 96px; height: 96px; }

/* Progress */
.cl-progress { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 var(--space-md); }
.cl-step {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem;
  padding: 0.3rem 0.75rem; border-radius: var(--radius-full);
  border: 1px solid var(--border); color: var(--text-dim);
}
.cl-step i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.cl-step.active { color: var(--primary); border-color: var(--primary); }
.cl-step.active i { background: var(--primary); animation: clPulse 1s infinite; }
.cl-step.done { color: var(--low); border-color: var(--low); }
.cl-step.done i { background: var(--low); }
@keyframes clPulse { 50% { opacity: 0.25; } }

/* Cards */
.cl-out { display: flex; flex-direction: column; gap: var(--space-md); }
.cl-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-md) var(--space-lg);
}
.cl-h { font-size: 1.05rem; font-weight: 700; margin-bottom: var(--space-sm); }
.cl-h4 { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin: var(--space-md) 0 var(--space-xs); }
.cl-p { line-height: 1.85; color: var(--text); }
.cl-note { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; margin: var(--space-xs) 0; }
.cl-note-warn { color: var(--medium); background: var(--medium-bg); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; font-size: 0.88rem; line-height: 1.7; margin-top: var(--space-sm); }
.cl-pre { white-space: pre-wrap; background: var(--bg-elevated); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); font-size: 0.85rem; line-height: 1.7; max-height: 260px; overflow: auto; }
.cl-empty { text-align: center; padding: var(--space-md); }

/* Verdict */
.cl-verdict {
  display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: var(--space-lg); align-items: center;
  border-color: var(--lv); box-shadow: 0 0 0 1px var(--lv) inset;
}
.cl-gauge { width: 100%; height: auto; display: block; }
.cl-gauge-num { font-size: 30px; font-weight: 700; font-family: var(--font-en); }
.cl-tick { font-size: 8px; fill: var(--text-dim); }
.cl-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--space-sm); }
.cl-pill { font-size: 0.78rem; padding: 0.25rem 0.7rem; border-radius: var(--radius-full); border: 1px solid var(--border); color: var(--text-muted); }
.cl-pill.lv { color: var(--lv); border-color: var(--lv); background: color-mix(in srgb, var(--lv) 14%, transparent); font-weight: 700; }
.cl-headline { font-size: 1.1rem; font-weight: 600; line-height: 1.6; }
.cl-crit { margin-top: var(--space-sm); padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); background: var(--severe-bg); color: var(--severe); font-size: 0.9rem; line-height: 1.6; }
.cl-unverified { padding: 0.7rem var(--space-md); border-radius: var(--radius-sm); background: var(--primary-bg); color: var(--text); font-size: 0.88rem; line-height: 1.7; border-inline-start: 3px solid var(--primary); }

/* Event */
.cl-type { margin-bottom: var(--space-sm); line-height: 1.8; }
.cl-type-tag { font-size: 0.75rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 0.1rem 0.6rem; margin-inline-end: 0.4rem; }
.cl-steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 0.6rem; margin: var(--space-sm) 0; }
.cl-steps li { counter-increment: s; position: relative; padding-inline-start: 2.2rem; line-height: 1.75; }
.cl-steps li::before {
  content: counter(s); position: absolute; inset-inline-start: 0; top: 0.1rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-bg); color: var(--primary); font-size: 0.78rem; font-weight: 700;
}
.cl-harm { color: var(--high); }
.cl-ai { border-color: var(--primary-dim); }
.cl-ai.bad { border-color: var(--severe); }
.cl-ai.off { border-style: dashed; }
.cl-meta { display: flex; gap: var(--space-md); flex-wrap: wrap; color: var(--text-muted); font-size: 0.82rem; margin: var(--space-sm) 0; }
.spinner.inline { display: inline-block; width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; margin-inline-end: 0.4rem; }

/* Warnings */
.cl-warns { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.cl-warn { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.85rem; border-radius: var(--radius-sm); line-height: 1.7; font-size: 0.92rem; border-inline-start: 4px solid var(--unknown); background: var(--bg-elevated); }
.cl-sev { flex: none; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: var(--radius-full); margin-top: 0.15rem; }
.cl-warn.critical { border-color: var(--severe); background: var(--severe-bg); } .cl-warn.critical .cl-sev { background: var(--severe); color: #fff; }
.cl-warn.high { border-color: var(--high); background: var(--high-bg); } .cl-warn.high .cl-sev { background: var(--high); color: #fff; }
.cl-warn.medium { border-color: var(--medium); background: var(--medium-bg); } .cl-warn.medium .cl-sev { background: var(--medium); color: #1a1a1a; }
.cl-warn.info { border-color: var(--primary); } .cl-warn.info .cl-sev { background: var(--primary-bg); color: var(--primary); }

/* Charts */
.cl-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-md); }
.cl-chart { background: var(--bg-elevated); border-radius: var(--radius-sm); padding: var(--space-md); margin: 0; }
.cl-chart-wide { margin-top: var(--space-md); }
.cl-chart figcaption { font-size: 0.88rem; font-weight: 600; margin-bottom: var(--space-sm); }
.cl-chart figcaption small { display: block; font-weight: 400; color: var(--text-muted); margin-top: 2px; }
.cl-svg { width: 100%; height: auto; display: block; }
.cl-axis { font-size: 11px; fill: var(--text-muted); font-family: inherit; }
.cl-val { font-size: 10px; fill: var(--text); font-weight: 700; font-family: var(--font-en); }
.cl-donut { max-width: 190px; margin: 0 auto; }
.cl-donut-num { font-size: 26px; font-weight: 700; fill: var(--text); font-family: var(--font-en); }
.cl-legend { list-style: none; margin-top: var(--space-sm); display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; }
.cl-legend li { display: grid; grid-template-columns: 12px 1fr auto 3rem; gap: 0.5rem; align-items: center; }
.cl-legend i { width: 12px; height: 12px; border-radius: 3px; }
.cl-legend b { font-family: var(--font-en); } .cl-legend em { color: var(--text-muted); font-style: normal; text-align: end; font-family: var(--font-en); }
.cl-scrollx { overflow-x: auto; }
.cl-arc { max-width: none; }
.cl-dimbars { display: flex; flex-direction: column; gap: 0.55rem; }
.cl-dim { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 2.2rem; gap: 0.6rem; align-items: center; font-size: 0.85rem; }
.cl-dim b { text-align: end; font-family: var(--font-en); }
.cl-track { height: 10px; border-radius: 99px; background: var(--border); overflow: hidden; }
.cl-fill { height: 100%; border-radius: 99px; transition: width 0.8s ease; }
.cl-fill.low { background: var(--low); } .cl-fill.medium { background: var(--medium); } .cl-fill.high { background: var(--high); } .cl-fill.severe { background: var(--severe); }

/* Entities / claims / tools */
.cl-ent { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.cl-ent-k { min-width: 90px; font-size: 0.82rem; color: var(--text-muted); }
.cl-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cl-chips code, .cl-queries code { background: var(--bg-elevated); border: 1px solid var(--border); padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.8rem; word-break: break-all; }
.cl-ai-ents, .cl-queries { list-style: none; margin-top: var(--space-sm); display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.88rem; line-height: 1.7; }
.cl-claims { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.cl-claim { display: flex; gap: 0.7rem; padding: 0.65rem 0.8rem; background: var(--bg-elevated); border-radius: var(--radius-sm); line-height: 1.7; font-size: 0.9rem; }
.cl-claim small { color: var(--text-muted); }
.cl-verdict-tag { flex: none; align-self: flex-start; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: var(--radius-full); background: var(--medium-bg); color: var(--medium); }
.cl-claim.supported .cl-verdict-tag { background: var(--low-bg); color: var(--low); }
.cl-claim.false .cl-verdict-tag, .cl-claim.misleading .cl-verdict-tag { background: var(--severe-bg); color: var(--severe); }
.cl-claim.unsupported .cl-verdict-tag { background: var(--high-bg); color: var(--high); }
.cl-tools { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.5rem; margin-top: var(--space-sm); }
.cl-tools a {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; text-decoration: none;
  padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); background: var(--bg-elevated); font-size: 0.88rem; transition: border-color var(--transition);
}
.cl-tools a:hover, .cl-tools a:focus-visible { border-color: var(--primary); }
.cl-tools em { font-style: normal; color: var(--primary); font-size: 0.78rem; white-space: nowrap; }
.cl-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }
.cl-actions ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; line-height: 1.7; font-size: 0.92rem; }
.cl-do { border-inline-start: 3px solid var(--low); padding-inline-start: var(--space-md); }
.cl-dont { border-inline-start: 3px solid var(--severe); padding-inline-start: var(--space-md); }
.cl-details summary { cursor: pointer; font-weight: 600; line-height: 1.7; }
.cl-details[open] summary { margin-bottom: var(--space-md); }
.cl-final { margin-top: var(--space-xs); }

@media (max-width: 640px) {
  .cl-verdict { grid-template-columns: 1fr; }
  .cl-verdict-gauge { max-width: 240px; margin: 0 auto; }
  .cl-card { padding: var(--space-md); }
  .cl-dim { grid-template-columns: 1fr 2.2rem; }
  .cl-dim .cl-track { grid-column: 1 / -1; order: 3; }
  .cl-ai-chip { display: none; }
}

/* ── Models panel ───────────────────────────────────────────────────── */
.mp { max-width: 560px; }
.mp-status { font-size: 0.85rem; padding: 0.5rem 0.85rem; border-radius: var(--radius-sm); margin-bottom: var(--space-md); border: 1px solid var(--border); color: var(--text-muted); }
.mp-status.on { color: var(--low); border-color: var(--low); background: var(--low-bg); }
.mp-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.4rem; margin-bottom: var(--space-md); }
.mp-tab {
  position: relative; display: flex; align-items: center; gap: 0.5rem; justify-content: center;
  padding: 0.55rem 0.5rem; font-family: inherit; font-size: 0.85rem; cursor: pointer;
  background: var(--bg-elevated); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.mp-tab .model-icon { width: 20px; height: 20px; }
.mp-tab.active { border-color: var(--primary); color: var(--text); background: var(--primary-bg); font-weight: 600; }
.mp-live { position: absolute; top: 5px; inset-inline-end: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--low); box-shadow: 0 0 8px var(--low); }
.mp-section { margin-bottom: var(--space-md); }
.mp-h { font-size: 0.92rem; font-weight: 700; margin-bottom: var(--space-sm); }
.mp-models { display: flex; flex-direction: column; gap: 0.45rem; }
.mp-model {
  display: flex; align-items: center; gap: 0.75rem; text-align: start; width: 100%;
  padding: 0.7rem 0.85rem; cursor: pointer; font-family: inherit; color: var(--text);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
.mp-model:hover { border-color: var(--primary-dim); }
.mp-model.active { border-color: var(--primary); background: var(--primary-bg); }
.mp-radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text-dim); position: relative; }
.mp-model.active .mp-radio { border-color: var(--primary); }
.mp-model.active .mp-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.mp-model-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mp-model-main strong { font-size: 0.9rem; font-weight: 600; }
.mp-model-main code { font-size: 0.72rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-badge.text { background: var(--bg-card); color: var(--text-dim); border: 1px solid var(--border); }
.mp-key { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-md); background: var(--bg-elevated); }
.mp-keylink { margin-bottom: var(--space-md); padding-bottom: var(--space-md); border-bottom: 1px dashed var(--border); }
.mp-kl-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.mp-kl-label { font-size: 0.82rem; color: var(--text-muted); }
.mp-kl-url { display: block; font-size: 0.95rem; color: var(--primary); margin-bottom: var(--space-sm); word-break: break-all; }
.mp-kl-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.mp-kl-btns .btn { padding: 0.5rem 0.9rem; font-size: 0.85rem; text-decoration: none; }
.mp-kl-docs { font-size: 0.8rem; color: var(--text-muted); }
.mp-kl-steps { margin-top: var(--space-sm); font-size: 0.8rem; color: var(--text-muted); line-height: 1.7; }
.mp-keyfield { display: flex; gap: 0.4rem; align-items: stretch; }
.mp-keyfield .field-input { flex: 1; min-width: 0; font-family: var(--font-en); letter-spacing: 0.04em; }
.mp-iconbtn { flex: none; width: 42px; display: grid; place-items: center; cursor: pointer; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mp-iconbtn:hover, .mp-iconbtn.on { color: var(--primary); border-color: var(--primary); }
.mp-keyhint { margin-top: 0.4rem; font-size: 0.78rem; color: var(--text-dim); min-height: 1.2em; }
.mp-keyhint.ok { color: var(--low); } .mp-keyhint.warn { color: var(--medium); }
.mp-adv { margin-top: var(--space-sm); font-size: 0.85rem; }
.mp-adv summary { cursor: pointer; color: var(--text-muted); }
.mp-privacy { margin-top: var(--space-md); font-size: 0.78rem; color: var(--text-dim); line-height: 1.7; }

/* Print: only the client dossier */
@media print {
  body.client-open #app { display: none !important; }
  body.client-open .client-screen { position: static; display: block; background: #fff; color: #000; }
  .cl-bar, .cl-composer, .cl-progress, .cl-final, .cl-details { display: none !important; }
  .cl-scroll { overflow: visible; }
  .cl-card { break-inside: avoid; border-color: #ccc; background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  .client-screen, .cl-fill, .gauge-fill { animation: none !important; transition: none !important; }
}

/* ── v2 Tools section ─────────────────────────────────────────── */
.tools-section {
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.tools-title {
  font-size: 1.05rem;
  margin: 0 0 var(--space-md);
  color: var(--text);
}
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 520px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
}
.tool-card {
  display: block;
  width: 100%;
  text-align: start;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.4;
}
.tool-card:hover, .tool-card:focus-visible {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg));
  outline: none;
}

.fraud-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: var(--space-md);
}
@media (min-width: 560px) {
  .fraud-toolbar { flex-direction: row; align-items: center; }
  .fraud-toolbar .text-input { flex: 1; }
}
.fraud-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  border: 1px solid var(--border);
}
.fraud-status.ok { border-color: var(--low); color: var(--low); }
.fraud-status.warn { border-color: var(--medium); color: var(--medium); }
.fraud-status.err { border-color: var(--severe); color: var(--severe); }
.fraud-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fraud-stats span {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}
.fraud-results { display: flex; flex-direction: column; gap: 0.75rem; }
.fraud-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: var(--bg-card);
}
.fraud-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.fraud-card .risk-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-inline-start: 0.4rem;
  vertical-align: middle;
}
.risk-tag.high, .risk-tag.critical { background: color-mix(in srgb, var(--severe) 20%, transparent); color: var(--severe); }
.risk-tag.medium { background: color-mix(in srgb, var(--medium) 20%, transparent); color: var(--medium); }
.risk-tag.low { background: color-mix(in srgb, var(--low) 20%, transparent); color: var(--low); }
.fraud-card p { margin: 0.4rem 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }
.fraud-card .meta { font-size: 0.78rem; color: var(--text-dim); }

.phone-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: var(--space-md);
}
@media (min-width: 480px) {
  .phone-form { flex-direction: row; }
  .phone-form .text-input { flex: 1; }
}
.phone-result {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--bg-card);
  margin-bottom: var(--space-md);
}
.phone-result h3 { margin: 0 0 0.5rem; }
.phone-result ul { margin: 0.5rem 0 0; padding-inline-start: 1.2rem; }
.phone-result li { margin-bottom: 0.35rem; font-size: 0.9rem; line-height: 1.5; }

.quest-body, .victim-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}
.quest-body h3, .victim-body h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}
.quest-body ul, .victim-body ul {
  padding-inline-start: 1.2rem;
  margin: 0.4rem 0 0.8rem;
}
.quest-body li, .victim-body li { margin-bottom: 0.35rem; }
.quest-body a { color: var(--primary); word-break: break-all; }
.evidence-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-inline-start: 0.35rem;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: var(--space-md);
}
.report-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.report-form textarea.text-input {
  resize: vertical;
  min-height: 100px;
}

/* Victim help contacts */
.contacts-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.75rem 0 1.25rem;
}
.contact-region {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: var(--bg-card);
}
.contact-region h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: var(--primary);
}
.contact-item {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border);
}
.contact-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.contact-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}
.contact-phone {
  margin: 0.2rem 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.contact-phone a {
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.contact-phone a:hover {
  text-decoration: underline;
}
.contact-web {
  margin: 0.15rem 0;
  font-size: 0.82rem;
  word-break: break-all;
}
.contact-web a {
  color: var(--text-muted);
}

.contact-phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}
.contact-phone-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.02em;
  user-select: all;
}
.contact-phone-link:hover {
  text-decoration: underline;
}
.btn-copy-phone {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.3;
}
.btn-copy-phone:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-copy-phone.copied {
  border-color: var(--low);
  color: var(--low);
}

/* ── v3 Shield status card ─────────────────────────────────────────────── */
.shield-card { border-color: var(--primary-dim); background: linear-gradient(135deg, var(--primary-bg), transparent 70%); }
.shield-lead { color: var(--text-muted); margin: 0 0 .75rem; }
.shield-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.shield-row { display: flex; align-items: center; gap: .65rem; padding: .5rem .7rem; border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--border); font-size: .92rem; }
.shield-dot { display: inline-grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: .8rem; }
.shield-row.ok .shield-dot { background: var(--low-bg); color: var(--low); }
.shield-row.warn .shield-dot { background: var(--severe-bg); color: var(--severe); }
.shield-row.info .shield-dot { background: var(--medium-bg); color: var(--medium); }
.shield-note { color: var(--text-dim); font-size: .8rem; margin: .75rem 0 0; }

/* ═════════════ v3.1 additions ═════════════ */

/* Install call-to-action + help */
.install-cta { display:flex; align-items:center; gap:.8rem; width:100%; margin:.2rem 0 1rem; padding:.85rem 1rem; border-radius:14px; border:1px dashed var(--border-focus); background:var(--primary-bg); color:var(--text); font:inherit; cursor:pointer; text-align:start; }
.install-cta > span:first-child { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:var(--border-focus); color:#04202b; font-weight:700; font-size:1.2rem; }
.install-cta-text { display:flex; flex-direction:column; gap:.1rem; }
.install-cta-text small { color:var(--text-muted); }
.install-cta:hover { background:color-mix(in srgb, var(--border-focus) 22%, transparent); }
.install-icon { display:block; margin:.2rem auto .6rem; border-radius:18px; box-shadow:0 8px 24px rgba(34,211,238,.25); }
.install-steps { margin:.5rem 0 1rem; padding-inline-start:1.3rem; line-height:1.9; }
.install-steps li { margin-bottom:.3rem; }

/* Caller dossier */
.pn-card { border:1px solid var(--border); border-inline-start:5px solid var(--lv, var(--border)); background:var(--bg-card); border-radius:14px; padding:1rem; margin-top:1rem; }
.pn-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; flex-wrap:wrap; }
.pn-level { color:#fff; font-weight:700; padding:.25rem .8rem; border-radius:999px; font-size:.9rem; }
.pn-num { font-size:1.15rem; direction:ltr; unicode-bidi:plaintext; }
.pn-h { margin:1rem 0 .4rem; font-size:.95rem; color:var(--primary, var(--border-focus)); }
.pn-meter-track { position:relative; height:12px; background:var(--border); border-radius:99px; overflow:hidden; }
.pn-meter-fill { height:100%; border-radius:99px; transition:width .8s ease; }
.pn-tick { position:absolute; top:0; width:2px; height:100%; background:var(--bg); opacity:.7; }
.pn-meter-scale { display:flex; justify-content:space-between; font-size:.7rem; color:var(--text-dim); margin-top:.2rem; direction:ltr; }
.pn-dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.5rem; margin:0; }
.pn-dl > div { background:var(--bg-elevated); border-radius:10px; padding:.5rem .7rem; }
.pn-dl dt { font-size:.75rem; color:var(--text-muted); } .pn-dl dd { margin:0; font-weight:600; }
.pn-inds, .pn-do, .pn-cannot { list-style:none; padding:0; margin:0; display:grid; gap:.4rem; }
.pn-ind { padding:.5rem .7rem; border-radius:10px; background:var(--bg-elevated); border-inline-start:4px solid var(--medium); }
.pn-ind.high { border-color:var(--severe); } .pn-ind.low { border-color:var(--low); }
.pn-do li::before { content:"✓ "; color:var(--low); font-weight:700; }
.pn-cannot li::before { content:"• "; color:var(--text-dim); }
.pn-type, .pn-if { background:var(--bg-elevated); border-radius:10px; padding:.5rem .8rem; margin-bottom:.4rem; border-inline-start:4px solid var(--severe); }
.pn-type.medium { border-color:var(--medium); } .pn-if { border-color:var(--border-focus); }
.pn-type summary, .pn-if summary { cursor:pointer; }
.pn-type p, .pn-if ol, .pn-type ul { margin:.4rem 0; line-height:1.8; }
.pn-real { background:var(--primary-bg); padding:.7rem .9rem; border-radius:10px; line-height:1.8; }
.pn-looks { display:flex; flex-wrap:wrap; gap:.5rem; }
.pn-look { padding:.4rem .8rem; border:1px solid var(--border); border-radius:999px; text-decoration:none; color:var(--text); font-size:.85rem; }
.pn-disc { margin-top:1rem; }
.pn-section-title { margin:1.2rem 0 .5rem; font-size:1rem; }

/* News verdict */
.nv-card { border-width:2px; border-color:var(--nv, var(--border)); }
.nv-banner { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; padding:.9rem; border-radius:14px; background:color-mix(in srgb, var(--nv, #94a3b8) 12%, var(--bg-card)); }
.nv-icon { width:84px; height:84px; flex:none; }
.nv-banner-text { flex:1; min-width:200px; }
.nv-label { margin:0; font-size:1.7rem; font-weight:800; line-height:1.2; }
.nv-sub { margin:.2rem 0 0; color:var(--text-muted); }
.nv-headline { margin:.5rem 0 0; font-weight:600; line-height:1.7; }
.nv-conf { display:flex; flex-direction:column; align-items:center; }
.nv-ring { width:84px; height:84px; } .nv-ring-num { font-size:19px; font-weight:800; }
.nv-conf small { color:var(--text-muted); font-size:.72rem; }
.nv-basis { margin:.6rem 0 0; display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.nv-chip { display:inline-block; color:#fff; font-size:.72rem; font-weight:700; padding:.12rem .55rem; border-radius:999px; }
.nv-chip.basis { background:var(--bg-elevated); color:var(--text); border:1px solid var(--border); font-weight:500; }
.nv-chip.rating { background:var(--bg-elevated); color:var(--text); border:1px solid var(--border); }
.nv-expl { line-height:2; white-space:pre-line; }
.nv-balance { display:flex; height:16px; border-radius:99px; overflow:hidden; background:var(--border); }
.nv-seg { display:block; height:100%; }
.nv-legend { display:flex; flex-wrap:wrap; gap:1rem; font-size:.82rem; color:var(--text-muted); margin:.4rem 0 0; }
.nv-legend i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-inline-end:.35rem; }
.nv-claims, .nv-evid { list-style:none; padding:0; margin:0; display:grid; gap:.6rem; }
.nv-claim { display:flex; gap:.7rem; padding:.7rem; border-radius:12px; background:var(--bg-elevated); border-inline-start:4px solid var(--c); }
.nv-claim p { margin:0 0 .25rem; font-weight:600; }
.nv-ev { display:flex; gap:.7rem; padding:.7rem; border-radius:12px; background:var(--bg-elevated); border-inline-start:4px solid var(--c); }
.nv-badge { flex:none; display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:var(--bg-card); border:1px solid var(--border); font-weight:800; }
.nv-ev-body { min-width:0; flex:1; }
.nv-ev-top { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.nv-ev-title { margin:.3rem 0 0; font-weight:600; } .nv-ev-sum { margin:.2rem 0 0; color:var(--text-muted); line-height:1.7; }
.nv-ev-meta { display:flex; gap:.8rem; margin-top:.35rem; font-size:.8rem; color:var(--text-dim); }
.nv-ev-meta a { color:var(--border-focus); }
.nv-timeline { list-style:none; margin:0; padding:0 .8rem; border-inline-start:2px solid var(--border); display:grid; gap:.6rem; }
.nv-timeline li { display:grid; gap:.1rem; } .nv-timeline b { color:var(--border-focus); font-size:.82rem; }
.nv-rev { display:flex; gap:.8rem; flex-wrap:wrap; align-items:center; font-size:.85rem; }
.nv-rev a { color:var(--border-focus); }
.nv-off { border-style:dashed; }
@media (max-width:520px) { .nv-label { font-size:1.35rem; } .nv-icon, .nv-ring { width:68px; height:68px; } }
@media print { .install-cta, #btn-install { display:none !important; } }
.nv-chip { white-space:nowrap; flex:none; align-self:flex-start; }
.nv-claim > div { min-width:0; }

.mp-lock{margin:.9rem 0;padding:.8rem;border:1px solid var(--border,#2a3547);border-radius:12px}
.mp-lock .field-input{margin:.4rem 0}
#mp-lock-msg:not(:empty){display:block}
#mp-lock-msg.hidden{display:none}

.tp-list{list-style:none;margin:.3rem 0 .8rem;padding:0}
.tp-item{padding:.45rem .1rem;line-height:1.6;border-bottom:1px solid rgba(148,163,184,.15);overflow-wrap:anywhere}
.tp-src{display:inline-block;font-size:.72rem;padding:.05rem .45rem;border-radius:999px;border:1px solid currentColor;margin-inline-end:.35rem}
.tp-local{color:#22d3ee}.tp-ai{color:#a78bfa}.tp-web{color:#fbbf24}.tp-info{color:#94a3b8}
.tp-cert{font-style:normal;font-size:.75rem;opacity:.8;margin-inline-start:.35rem}
.tp-high{color:#f97316}.tp-medium{color:#eab308}.tp-low{color:#94a3b8}
.tp-no .tp-item{opacity:.85}
.tp-toggle{display:flex;gap:.5rem;align-items:center;margin-top:.6rem}
.tp-hint{font-size:.8rem}

.kr-list{list-style:none;margin:.4rem 0;padding:0}
.kr-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;padding:.5rem 0;border-bottom:1px solid rgba(148,163,184,.15)}
.kr-name{font-weight:600;flex:1 1 7rem}
.kr-key{font-family:ui-monospace,monospace;opacity:.8}
.kr-on{color:#22c55e;font-size:.85rem}
.kr-row .btn{padding:.35rem .8rem;min-height:2.2rem}
.kr-hint{border:0;font-size:.8rem}
#mp-keyring-msg.hidden{display:none}

.nv-srcs{margin:.35rem 0;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.nv-src{display:inline-block;padding:.15rem .55rem;border-radius:999px;border:1px solid var(--accent,#22d3ee);color:var(--accent,#22d3ee);font-size:.78rem;text-decoration:none;direction:ltr}
.nv-manip{margin:.5rem 0}
.nv-queries,.nv-others{margin:.5rem 0;font-size:.9rem}
.nv-queries ul{margin:.3rem 0;padding-inline-start:1.2rem}
.nv-unlinked{opacity:.72}
.nv-unl-note{color:#f59e0b;font-size:.8rem;margin:.2rem 0}
.nv-fxlist,.nv-fx{list-style:none;margin:.3rem 0;padding:0}
.nv-fx li{display:flex;gap:.5rem;align-items:flex-start;padding:.25rem 0;line-height:1.55}
.nv-fx li i{flex:0 0 .6rem;height:.6rem;border-radius:50%;background:var(--c);margin-top:.5rem}
.nv-fxnote{font-size:.8rem}

.cl-deep{display:flex;align-items:center;gap:.5rem;font-size:.85rem;flex:1 1 100%;margin-bottom:.4rem;line-height:1.5}
.cl-deep.hidden{display:none}

/* ── Text inputs (phone, fraud search, report form): readable in BOTH themes ─────────── */
:root,[data-theme="dark"]{color-scheme:dark}
[data-theme="light"]{color-scheme:light}
.text-input{
  width:100%;min-height:46px;box-sizing:border-box;
  background:var(--bg-elevated);color:var(--text);-webkit-text-fill-color:var(--text);caret-color:var(--primary,#22d3ee);
  border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:.7rem .85rem;font-family:inherit;font-size:1rem;line-height:1.4;
}
.text-input::placeholder{color:var(--text-dim);-webkit-text-fill-color:var(--text-dim);opacity:1}
.text-input:focus{outline:none;border-color:var(--border-focus);box-shadow:0 0 0 3px var(--primary-bg)}
.text-input:-webkit-autofill{-webkit-text-fill-color:var(--text);box-shadow:0 0 0 1000px var(--bg-elevated) inset}
input[type="tel"].text-input{direction:ltr;text-align:start;letter-spacing:.03em;font-variant-numeric:tabular-nums}
textarea.text-input{min-height:96px;resize:vertical}
.phone-preview{min-height:1.4rem;margin:.1rem 0 .6rem;font-size:.9rem;color:var(--text-muted);direction:auto}
.phone-preview strong{color:var(--text);direction:ltr;unicode-bidi:isolate}
.phone-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.8rem}

.in-list{list-style:none;margin:.3rem 0;padding:0}
.in-row{display:flex;gap:.6rem;align-items:flex-start;padding:.5rem 0;border-bottom:1px solid rgba(148,163,184,.15)}
.in-row>i{flex:0 0 .7rem;height:.7rem;border-radius:50%;background:var(--c);margin-top:.45rem}
.in-tag{font-size:.75rem;color:var(--c);border:1px solid var(--c);border-radius:999px;padding:.05rem .5rem;margin-inline-start:.3rem}
.in-notes{margin:.25rem 0 0;padding-inline-start:1.1rem;font-size:.88rem;color:var(--text-muted)}
