/* =============================================
   ScamShield — style.css (v3, warm & soft)
   Oat paper, ink text, sage accent. Flat surfaces,
   no glows, no gradient washes. Risk colours are
   the only strong colour on the page.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Figtree:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces: warm oat, stepped lightly */
  --bg-base:    #f4efe8;
  --bg-panel:   #fbf8f3;
  --bg-panel2:  #f0e9e0;
  --bg-hover:   #e9e0d4;
  --border:     #e1d7ca;
  --border-lt:  #cfc2b2;

  /* Text: warm ink, not pure black */
  --text-primary:   #2b2830;
  --text-secondary: #57515c;
  --text-muted:     #6f6776;

  /* Accent: deep sage */
  --accent:        #3d6b63;
  --accent-hover:  #315a53;
  --accent-soft:   #3d6b63;
  --accent-glow:   #dfe9e3;   /* soft sage tint (name kept for compatibility) */

  /* Risk palette: muted, readable on oat */
  --green:         #35764f;
  --green-bg:      #e3efe5;
  --green-border:  #b7d2bf;

  --yellow:        #94600a;
  --yellow-bg:     #f7ebd0;
  --yellow-border: #e5cf9d;

  --red:           #b23b2d;
  --red-bg:        #f8e2dc;
  --red-border:    #e5b7ac;

  /* Shape */
  --radius:    18px;
  --radius-sm: 12px;
  --radius-xs: 9px;

  /* Depth: one soft warm shadow */
  --shadow: 0 1px 2px rgba(74,56,38,0.06), 0 10px 28px rgba(74,56,38,0.06);
  --transition: 0.18s ease;

  /* Type */
  --font-body:    'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Figtree', 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.65;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #cfe0d8; color: var(--text-primary); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

* { scrollbar-width: thin; scrollbar-color: var(--border-lt) transparent; }

/* ---------- Utility ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

/* ---------- Header ---------- */
.header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand { display: flex; align-items: center; gap: 12px; }

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 14px;
  background: var(--accent-glow);
  border: 1px solid #c3d6cc;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-tagline { font-size: 0.8rem; color: var(--text-muted); }

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  padding: 7px 14px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 999px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: soft-pulse 2.8s ease-in-out infinite;
}

@keyframes soft-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ---------- Main ---------- */
main { padding: 36px 0 56px; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card.stat-green  { background: var(--green-bg);  border-color: var(--green-border); }
.stat-card.stat-yellow { background: var(--yellow-bg); border-color: var(--yellow-border); }
.stat-card.stat-red    { background: var(--red-bg);    border-color: var(--red-border); }

.stat-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.stat-green .stat-value  { color: var(--green); }
.stat-yellow .stat-value { color: var(--yellow); }
.stat-red .stat-value    { color: var(--red); }

.stat-label { font-size: 0.84rem; font-weight: 500; color: var(--text-secondary); }

/* ---------- Layout (two-column) ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
  align-items: start;
}

/* ---------- Panels ---------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.panel-head h2 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }

.panel-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid #c3d6cc;
  border-radius: 999px;
  padding: 3px 12px;
}

/* ---------- Input panel ---------- */
.field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 9px;
}

textarea {
  width: 100%;
  min-height: 170px;
  background: #fffdfa;
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.96rem;
  line-height: 1.65;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 16px;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(61,107,99,0.16);
}

textarea::placeholder { color: #9a919f; }

.field-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.field-row .field-label { margin-bottom: 0; white-space: nowrap; }

.select {
  flex: 1;
  background-color: #fffdfa;
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-xs);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2357515c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(61,107,99,0.16); }

/* Optional: screenshot upload zone */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 16px;
  margin-bottom: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: var(--bg-panel2);
  border: 1.5px dashed var(--border-lt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.dropzone:hover,
.dropzone.dragover { border-color: var(--accent); background: var(--accent-glow); }

.dropzone strong { color: var(--accent); font-weight: 700; }

/* ---------- Samples ---------- */
.samples { margin-bottom: 22px; }
.samples-title { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.sample-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
}

.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-lt);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 999px;
}

.btn-ghost:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.actions { display: flex; align-items: center; gap: 12px; }
.btn-analyze { flex: 1; justify-content: center; }

/* ---------- Empty state ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 24px;
  text-align: center;
  border: 1.5px dashed var(--border-lt);
  border-radius: var(--radius-sm);
  background: var(--bg-panel2);
}

.empty-icon { font-size: 2.4rem; opacity: 0.8; }
.empty-state h3 { font-size: 1.05rem; color: var(--text-primary); }
.empty-state p { font-size: 0.92rem; color: var(--text-secondary); max-width: 260px; }

/* ---------- Result content ---------- */
.result { display: flex; flex-direction: column; gap: 20px; animation: settle 0.4s ease both; }

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

/* ===== Risk banner ===== */
.risk-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1.5px solid;
}

.risk-banner.risk-safe    { background: var(--green-bg);  border-color: var(--green-border); }
.risk-banner.risk-caution { background: var(--yellow-bg); border-color: var(--yellow-border); }
.risk-banner.risk-danger  { background: var(--red-bg);    border-color: var(--red-border); }

.risk-icon { font-size: 2.3rem; line-height: 1; }
.risk-info { flex: 1; min-width: 0; }

.risk-label { font-size: 0.84rem; font-weight: 600; margin-bottom: 2px; color: var(--text-secondary); }

.risk-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.risk-banner.risk-safe    .risk-title { color: var(--green); }
.risk-banner.risk-caution .risk-title { color: var(--yellow); }
.risk-banner.risk-danger  .risk-title { color: var(--red); }

.risk-score-wrap { text-align: right; }

.risk-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.risk-banner.risk-safe    .risk-score { color: var(--green); }
.risk-banner.risk-caution .risk-score { color: var(--yellow); }
.risk-banner.risk-danger  .risk-score { color: var(--red); }

.risk-score-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-top: 4px; }

/* ----- Score bar ----- */
.score-bar-wrap { display: flex; flex-direction: column; gap: 8px; }

.score-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.score-bar-track {
  position: relative;
  height: 10px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
}

/* tick marks at 33% / 66% show where the zones change */
.score-bar-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent calc(33.3% - 1px), var(--bg-panel) calc(33.3% - 1px) calc(33.3% + 1px), transparent calc(33.3% + 1px)),
    linear-gradient(90deg, transparent calc(66.6% - 1px), var(--bg-panel) calc(66.6% - 1px) calc(66.6% + 1px), transparent calc(66.6% + 1px));
  pointer-events: none;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(.2,.8,.2,1);
}

/* ----- Signals ----- */
.signals-title { font-size: 0.98rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }

.signals-list { display: flex; flex-direction: column; gap: 10px; }

.signal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  background: #fffdfa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.signal-item.severity-high   { border-left: 4px solid var(--red); }
.signal-item.severity-medium { border-left: 4px solid #c98a1b; }
.signal-item.severity-low    { border-left: 4px solid var(--accent); }
.signal-item.severity-info   { border-left: 4px solid var(--border-lt); }

.signal-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.signal-body { flex: 1; min-width: 0; }
.signal-name { font-weight: 700; color: var(--text-primary); }
.signal-desc { color: var(--text-secondary); font-size: 0.86rem; margin-top: 3px; line-height: 1.55; }

.signal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 1px;
}

.signal-badge.severity-high   { background: var(--red-bg);      color: var(--red);    border: 1px solid var(--red-border); }
.signal-badge.severity-medium { background: var(--yellow-bg);   color: var(--yellow); border: 1px solid var(--yellow-border); }
.signal-badge.severity-low    { background: var(--accent-glow); color: var(--accent); border: 1px solid #c3d6cc; }
.signal-badge.severity-info   { background: var(--bg-panel2);   color: var(--text-muted); border: 1px solid var(--border); }

/* Safe signals */
.safe-signals { display: flex; flex-direction: column; gap: 8px; }

.safe-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.safe-item::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 50%;
}

/* Recommendation: "what to do next" */
.recommendation {
  padding: 16px 18px;
  background: var(--accent-glow);
  border: 1px solid #c3d6cc;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  color: var(--text-primary);
}

.recommendation strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-hover);
  margin-bottom: 6px;
}

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Analyzing state ---------- */
.skeleton {
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--bg-panel2) 25%, var(--bg-hover) 37%, var(--bg-panel2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

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

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

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---------- Info panel ---------- */
.info-panel { margin-bottom: 0; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.info-item {
  background: var(--bg-panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.info-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
  margin-bottom: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.info-item h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.info-item p  { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

.disclaimer {
  font-size: 0.84rem;
  color: var(--text-secondary);
  background: var(--bg-panel2);
  border-left: 3px solid var(--border-lt);
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stats     { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  main { padding: 24px 0 40px; }
  .layout { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .header-status { font-size: 0.78rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn-analyze { width: 100%; justify-content: center; }
  .field-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .btn-ghost:not(.sample-btn) { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .stats     { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px 16px; }
  .info-grid { grid-template-columns: 1fr; }
  .risk-banner { flex-wrap: wrap; padding: 18px; }
  .risk-score-wrap { text-align: left; width: 100%; }
  .risk-score { font-size: 2.6rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* =============================================
   Engine v2 additions: URLs, actions, errors
   ============================================= */

/* Inline input error (empty / malformed text) */
.input-error-msg {
  color: var(--red);
  font-size: 0.8rem;
  margin: -10px 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-error-msg:not([hidden])::before { content: '⚠'; }

textarea.input-error {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-bg);
}

/* Extracted URL list (plain text, never rendered as links) */
.url-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.url-item {
  background: var(--bg-panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
}

.url-item.url-suspicious { border-left: 3px solid var(--red); }
.url-item.url-clean      { border-left: 3px solid var(--green); }

.url-item code {
  display: block;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: var(--text-primary);
  word-break: break-all;
  background: none;
}

.url-traits {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.url-traits.url-ok { color: var(--green); }

/* Recommended actions list */
.action-list {
  list-style: none;
  margin-top: 4px;
}

.action-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.action-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Heuristic disclaimer under results */
.result-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px 14px;
  background: var(--bg-panel2);
  border: 1px dashed var(--border-lt);
  border-radius: var(--radius-xs);
}

/* =============================================
   Gemini integration: mode toggle, AI panel,
   consent overlay, hybrid verdict
   ============================================= */

/* ---------- Mode toggle ---------- */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mode-toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mode-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}
.mode-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* AI-mode header tint */
.header-status.status-ai .status-dot {
  background: var(--yellow);
  box-shadow: 0 0 6px var(--yellow);
}

/* ---------- AI result panel ---------- */
.ai-result { margin-top: 18px; }

.ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 14px 0;
}

.spinner-dark {
  border-color: var(--border-lt);
  border-top-color: var(--accent);
}

.ai-notice {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-panel2);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
}

/* ---------- Hybrid verdict banner ---------- */
.hybrid-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-panel2);
  margin-bottom: 12px;
}
.hybrid-banner.hybrid-low    { border-color: var(--green-border); }
.hybrid-banner.hybrid-medium { border-color: var(--yellow-border); }
.hybrid-banner.hybrid-high   { border-color: var(--red-border); }

.hybrid-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hybrid-title { font-size: 0.95rem; font-weight: 700; }
.hybrid-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.3);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ---------- Disagreement ---------- */
.ai-disagreement {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}
.ai-disagreement strong { color: var(--yellow); }
.ai-disagreement p { color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }

/* ---------- AI findings ---------- */
.ai-findings { display: flex; flex-direction: column; gap: 10px; }

.ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.ai-cat-chip {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  padding: 3px 10px;
  border-radius: 20px;
}
.ai-cat-chip:has(+ .ai-conf) { /* noop guard */ }
.ai-conf { font-size: 0.72rem; color: var(--text-muted); }

.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tactic-chip {
  font-size: 0.68rem;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-lt);
  border-radius: 20px;
  padding: 2px 8px;
}
.lang-chip {
  font-size: 0.68rem;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 20px;
  padding: 2px 8px;
}

.ai-explanation {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.ai-evidence {
  background: var(--bg-panel2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  margin-bottom: 6px;
}
.ai-claim { font-size: 0.8rem; font-weight: 600; }
.ai-quote {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  word-break: break-word;
}

/* ---------- Consent overlay ---------- */
.consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.consent-overlay[hidden] { display: none; }

.consent-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 480px;
  box-shadow: var(--shadow);
}
.consent-card h3 { margin-bottom: 10px; }
.consent-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }
.consent-card ul {
  list-style: none;
  margin-bottom: 16px;
}
.consent-card li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 4px 0;
}
.consent-actions { display: flex; gap: 10px; }

@media (max-width: 700px) {
  .consent-actions { flex-direction: column; }
  .hybrid-banner { flex-direction: column; align-items: flex-start; }
}
