/* ai-mentions.css — the "AI mentions" card on /health/ (js/ai-mentions.js).
   Tokens from main.css :root only. The headline number is deliberately shown
   as a fraction, never as a score out of 100: the denominator is the honest
   part, so it gets the same visual weight as the numerator. */

/* Matches .cwv-body / .cannib-body — without the top pad the first line
   collides with the card-head divider. */
.aim-body { padding: 18px 20px 20px; }

.aim-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 780px;
}

/* ── Never-run state ───────────────────────────────────────── */
.aim-qs {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-control, 13px);
  background: rgba(var(--wash-rgb), 0.03);
}
.aim-qs-head { font-size: 12px; color: var(--muted-2); margin-bottom: 8px; }
.aim-qs ul { margin: 0; padding-left: 18px; }
.aim-qs li {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.aim-panel-note { font-size: 12px; color: var(--muted-2); margin-bottom: 14px; }
.aim-panel-note code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}
.aim-note { font-size: 12.5px; color: var(--muted-2); margin: 0 0 14px; }

/* ── Results header ────────────────────────────────────────── */
.aim-head-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.aim-big { display: flex; align-items: baseline; gap: 10px; }
.aim-big-n {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* The denominator is not decoration — it is what makes the number checkable. */
.aim-big-of { font-size: 19px; font-weight: 500; color: var(--muted-2); }
.aim-big-label { font-size: 12.5px; color: var(--muted); }
.aim-meta { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted-2); }
.aim-failed { margin-top: 3px; color: var(--muted-2); }

.aim-trend {
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.aim-trend--none { color: var(--muted-2); }
.aim-spark {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--r-chip);
  background: rgba(var(--wash-rgb), 0.05);
  border: 1px solid var(--line);
}

/* ── Per-question rows ─────────────────────────────────────── */
.aim-qs-list { display: grid; gap: 8px; margin-bottom: 16px; }
.aim-q {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--r-control, 13px);
  background: rgba(var(--wash-rgb), 0.02);
}
.aim-q.is-hit { border-left-color: rgba(var(--accent-rgb), 0.55); }
.aim-q.is-miss { border-left-color: rgba(230, 196, 122, 0.45); }
.aim-q.is-unknown { border-left-color: var(--line-strong); }
.aim-q-text { font-size: 13px; line-height: 1.5; color: var(--text); }
.aim-q-verdict { margin-top: 3px; font-size: 12px; color: var(--muted-2); }
.aim-q.is-hit .aim-q-verdict { color: var(--accent-text); }
.aim-q-urls { margin-top: 4px; font-size: 11.5px; color: var(--muted-2); }
.aim-q-urls a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.aim-q-urls a:hover { color: var(--text); }

/* ── Who was named instead ─────────────────────────────────── */
.aim-rivals { margin-bottom: 16px; }
.aim-rivals-head { font-size: 12px; color: var(--muted-2); margin-bottom: 8px; }
.aim-rival {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px 6px 0;
  padding: 4px 10px;
  border-radius: var(--r-chip);
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text);
}
.aim-rival-n {
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

/* ── Actions + footer ──────────────────────────────────────── */
.aim-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.aim-status { font-size: 12px; color: var(--muted); }
.aim-status.is-danger { color: var(--danger); }
.aim-status a { color: var(--accent-bright); }
.aim-foot {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 780px;
}

/* ── Measured: who actually arrived from an AI ────────────────────────
   The free, measured counterpart to the paid panel above it — the owner's
   own GA4 'ai-assistant' medium. Given a lit surface rather than the quiet
   footnote treatment on purpose: everything else on this card is a model
   answering a question we paid it to answer, and this is the one block on
   it that is simply true. */
.aim-ga {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-control, 13px);
  background: var(--panel-2);
  box-shadow: inset 0 1px 0 0 var(--edge-hi);
}
.aim-ga-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.aim-ga-title { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.aim-ga-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.aim-ga-lead strong { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.aim-ga-srcs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.aim-ga-src {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-chip);
  background: rgba(var(--wash-rgb), 0.05);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.aim-ga-src b { color: var(--text); font-weight: 600; }
.aim-ga-foot {
  margin: 11px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted-3);
  max-width: 78ch;
}

/* The "where the questions come from" line. Quieter than the lead above it —
   it answers a follow-up question, it isn't the pitch. */
.aim-lead--how { color: var(--muted-2); font-size: 12.5px; }

/* ── Collapsed question list ─────────────────────────────────────
   Three questions by default; the rest open on demand. The count line
   above already carries the verdict, so the full list is detail. */
.aim-q--over { display: none; }
.aim-qs-list.is-open .aim-q--over { display: block; }
.aim-qs-list .showall-btn { margin-top: 10px; }
