:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --border: #e3e6ea;
  --text: #14171f;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #eef2ff;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --yellow: #ca8a04;
  --yellow-soft: #fef9c3;
  --grey: #9ca3af;
  --grey-soft: #f3f4f6;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.app-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-mark {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.client-switcher { position: relative; }
.client-switcher summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-weight: 600;
}
.client-switcher summary:hover { border-color: var(--text-muted); }
.client-switcher summary::-webkit-details-marker { display: none; }
.client-switcher summary .chev { color: var(--text-muted); font-size: 11px; }
.client-switcher summary .csw-summary-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-switcher .menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
  padding: 6px;
}
.client-switcher .menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
}
/* Not var(--grey-soft) — verified via computed-style + screenshot testing
   that its ~5% luminance delta against the menu's white background is real
   but visually imperceptible. This darker neutral gives a clearly visible
   affordance without introducing a new hue into the switcher's palette. */
.client-switcher .menu a:hover { background: #e6e8eb; }
.client-switcher .menu a.active { background: var(--accent-soft); }
.client-switcher .menu a.active .domain { color: var(--accent); opacity: 0.75; }
.client-switcher .menu .domain { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avatar: same circular-initial language as .src-avatar on the Sources page
   (style.css ~L460), just sized for a compact header row. Tinted accent for
   the currently active client, neutral grey for the rest — the same
   active/inactive vocabulary .menu a.active already uses. */
.client-switcher .csw-avatar {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--grey-soft); color: var(--text-muted);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
}
.client-switcher .csw-avatar--current { background: var(--accent-soft); color: var(--accent); }

.client-switcher .csw-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.client-switcher .csw-name-row { display: flex; align-items: center; gap: 6px; }
.client-switcher .csw-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-switcher .csw-current-pill {
  flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--green); background: var(--green-soft); padding: 1px 6px; border-radius: 999px;
}

.client-switcher .csw-status { flex: none; display: flex; align-items: center; gap: 6px; }
.client-switcher .csw-status-text { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Sizing for the shared .status-dot--{color} vocabulary (defined once near
   the engine-tabs rules below) wherever it appears inside the switcher. */
.client-switcher .status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }

.top-nav { display: flex; gap: 4px; margin-left: 8px; }
.top-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
}
.top-nav a.active { color: var(--accent); background: var(--accent-soft); }
.top-nav a:hover:not(.active) { background: var(--grey-soft); color: var(--text); }

.header-spacer { flex: 1; }

.heartbeat {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.heartbeat .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.heartbeat.stale .pip { background: var(--yellow); }

main { max-width: 1180px; margin: 0 auto; padding: 24px; }

.page-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.page-title h1 { font-size: 20px; margin: 0; }
.page-title .sub { color: var(--text-muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 16px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-bottom: 20px; }
.stat-tile { padding: 4px 20px; border-left: 1px solid var(--border); }
.stat-tile:first-child { border-left: none; padding-left: 0; }
.stat-label { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat-value .unit { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.stat-delta { font-size: 12px; margin-left: 6px; font-weight: 600; }
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }
.stat-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.grid-table { width: 100%; border-collapse: collapse; }
.grid-table th { text-align: left; font-size: 12px; color: var(--text-muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.grid-table td { padding: 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.grid-table tr:last-child td { border-bottom: none; }
.q-cell { max-width: 340px; font-size: 13px; }
.q-cell a { color: var(--text); font-weight: 500; }
.q-cell a:hover { color: var(--accent); }

.cell {
  width: 100%;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
}
.cell.green { background: var(--green); }
.cell.yellow { background: var(--yellow); color: #422006; }
.cell.grey { background: var(--grey); }
.cell.red { background: var(--red); }
.cell.hatched {
  background: repeating-linear-gradient(45deg, var(--grey-soft), var(--grey-soft) 4px, #e5e7eb 4px, #e5e7eb 8px);
  color: var(--text-muted);
}
.cell.nodata { background: var(--grey-soft); color: var(--text-muted); border: 1px dashed var(--border); }
.cell a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: inherit; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

.chart-wrap { position: relative; height: 260px; }

/* Overview "Visibility over time" hero card — scoped so it never touches the
   generic .stat-row/.stat-tile styling relied on by sources.html/report.html. */
.trend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.trend-title { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.trend-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.trend-card .stat-row { margin-bottom: 22px; }
.trend-card .stat-value { font-size: 28px; }
.trend-card .stat-label { display: flex; align-items: center; gap: 7px; }

.stat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.stat-dot--muted { background: var(--grey); opacity: 0.55; }

.trend-card .stat-delta.flat { color: var(--text-muted); }
.trend-card .stat-delta.up::before { content: "▲ "; font-size: 9px; }
.trend-card .stat-delta.down::before { content: "▼ "; font-size: 9px; }

.trend-chart-wrap { height: 280px; }
.trend-badge {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--grey-soft);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.trend-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.trend-empty .trend-sub { margin-top: 4px; }

/* "What the AI actually said" — real captured excerpts, day by day */
.answer-strip { display: flex; flex-direction: column; }
.answer-row {
  display: grid;
  grid-template-columns: 90px 140px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
}
.answer-row:last-child { border-bottom: none; }
.answer-row:hover { background: var(--grey-soft); }
.answer-row-date { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.answer-row-engine { justify-self: start; white-space: nowrap; }
.answer-row-text {
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.answer-row-gap { font-style: normal; color: var(--text-muted); }
.answer-row-link { font-size: 12px; font-weight: 600; color: var(--accent); opacity: 0; transition: opacity 0.15s; white-space: nowrap; }
.answer-row:hover .answer-row-link { opacity: 1; }

/* "Share of voice by competitor" overview card — brand vs. each named
   competitor, ranked by mention share. Scoped so it never touches the
   generic .stat-row/.stat-tile/.card rules other pages rely on. */
.sov-list { display: flex; flex-direction: column; gap: 8px; }
.sov-row {
  display: grid;
  grid-template-columns: 170px 1fr 60px 90px;
  align-items: center;
  gap: 14px;
  padding: 7px 10px;
  border-radius: 8px;
}
.sov-row--brand { background: var(--accent-soft); }
.sov-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sov-brand-tag { background: var(--accent); color: #fff; font-weight: 700; flex: none; }
.sov-bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--grey-soft);
  overflow: hidden;
}
.sov-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: var(--grey);
}
.sov-bar-fill--brand { background: var(--accent); }
.sov-pct { font-size: 14px; font-weight: 700; text-align: right; white-space: nowrap; }
.sov-pct .unit { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.sov-count { font-size: 11px; color: var(--text-muted); text-align: right; white-space: nowrap; }
.sov-headline { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.sov-headline strong { color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.brand { background: var(--accent-soft); color: var(--accent); }
.badge.own { background: var(--green-soft); color: var(--green); }
.badge.resolved { background: var(--green-soft); color: var(--green); }
.badge.unresolved { background: var(--grey-soft); color: var(--text-muted); }

.engine-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.engine-tabs a {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 16px 10px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.engine-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.engine-tabs .status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-top: 5px; flex: none; }
/* Same green/yellow/grey/red/hatched vocabulary as the Page-1 overview grid
   cells, so a glance at the tab strip already says "mentioned & cited" /
   "mentioned, not cited" / etc. before a single tab is clicked. */
.status-dot--green { background: var(--green); }
.status-dot--yellow { background: var(--yellow); }
.status-dot--grey { background: var(--grey); }
.status-dot--red { background: var(--red); }
.status-dot--hatched, .status-dot--nodata { background: var(--grey-soft); border: 1.5px dashed var(--text-muted); }
.engine-tab-text { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.engine-tab-name { line-height: 1.3; }
.engine-tab-sub { font-size: 10.5px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.tab-link.active .engine-tab-sub { color: var(--accent); opacity: 0.8; }

.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 12px; }
.card > .section-label:not(:first-child) { margin-top: 20px; }

.answer-text { white-space: normal; line-height: 1.7; font-size: 14px; }
.answer-text p { margin: 0 0 14px; }
.answer-text p:last-child { margin-bottom: 0; }
mark.mark-brand { background: #bfdbfe; color: #1e3a8a; border-radius: 3px; padding: 0 2px; font-weight: 600; }
/* Competitor mentions carry no color at all — weight only. Round-4 palette
   pass: color on this page is now reserved for exactly two things, own-brand
   emphasis (kept, above) and the citation/evidence system (below), so a
   glance doesn't have to reconcile a 3rd, unrelated hue with the other two. */
mark.mark-competitor { font-weight: 700; background: none; color: inherit; }

/* Structural markup _structure_answer_html() reconstructs from a raw
   innerText capture: real section headers (detected, not authored), a real
   bulleted list for consecutive "Label: ..." lead-ins, and inline
   citation-chip markers (bare digits / publisher names an engine's DOM
   stranded on their own line) restyled as a designed footnote system
   instead of stray characters.

   Palette logic for this page: headers carry hierarchy through weight and
   a divider, not a color, so they never compete with anything. Every
   citation/evidence element — the inline chips here, the "N Sources" note,
   the Citations table's "resolved"/"own domain" badges below, and the diff
   view's additions — shares the one green "evidence" hue, so the whole
   citation story (in the prose, in the table, in the diff) visibly belongs
   to the same system. Brand <mark> keeps its own blue (a different axis of
   information — WHO is mentioned, not WHERE it's sourced from — so a
   distinct color there is intentional, not a stray extra hue). */
.answer-text .answer-heading {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text); margin: 20px 0 10px; padding-top: 14px; border-top: 1px solid var(--border);
}
.answer-text .answer-heading:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.answer-text .answer-sources-note { margin: -6px 0 14px; }

.answer-list { margin: 0 0 14px; padding-left: 22px; list-style: none; }
.answer-list li {
  position: relative; padding-left: 4px; margin-bottom: 10px;
}
.answer-list li:last-child { margin-bottom: 0; }
.answer-list li::before {
  content: ""; position: absolute; left: -18px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--grey);
}
.answer-li-label { font-weight: 700; color: var(--text); }

/* Inline citation-chip marker — a single bracketed run of bold colored
   TEXT, deliberately not a padded/background pill. A pill shape (raised
   via vertical-align:super, with its own background box) reads as visually
   detached from the word before it even at 0px literal gap, because a
   colored box is a different visual object from the text around it, not
   because of any actual whitespace. Plain colored text glued to the
   baseline can't create that illusion — there's no box to look separate. */
.answer-text .cite-chip {
  font-weight: 700; color: var(--green); white-space: nowrap;
}
.answer-text .answer-sources-note .cite-chip {
  display: inline-block; font-weight: 600; font-size: 11px;
  padding: 2px 9px; border-radius: 999px; background: var(--green-soft);
}

.diff-legend { display: flex; gap: 14px; font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.diff-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.diff-legend .add::before { background: var(--green-soft); border: 1px solid var(--green); }
.diff-legend .del::before { background: var(--red-soft); border: 1px solid var(--red); }

/* "Diff vs previous run" body — its own container (not the plain
   .answer-text used for the real answer) so a dense run of word-level
   changes reads as a soft evidence panel, not a git diff pasted into a
   card. */
.diff-body {
  font-size: 13.5px; line-height: 1.85; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px;
}
.diff-body ins, .diff-body del {
  border-radius: 4px; padding: 1px 4px; margin: 0 1px;
  text-decoration: none; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.diff-body ins { background: var(--green-soft); color: #14532d; }
.diff-body del { background: var(--red-soft); color: #7f1d1d; text-decoration: line-through; opacity: 0.85; }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { text-align: left; font-size: 12px; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
table.data-table td { padding: 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
table.data-table tr:hover td { background: var(--grey-soft); }
table.data-table tr.cited-own td { background: var(--green-soft); }
table.data-table tr.cited-own:hover td { background: var(--green-soft); filter: brightness(0.97); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 32px; margin-bottom: 8px; }

/* Question-detail prev/next stepper, next to the h1 in .page-title. */
.q-stepper { display: flex; align-items: center; gap: 10px; flex: none; }
.q-stepper-btn {
  font-size: 12px; font-weight: 600; color: var(--text);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  white-space: nowrap;
}
.q-stepper-btn:hover { background: var(--grey-soft); }
.q-stepper-btn.is-disabled { opacity: 0.35; pointer-events: none; }
.q-stepper-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Per-engine mentions list — a small proportional bar so match counts read
   at a glance, echoing the share-of-voice bars elsewhere without touching
   the .sov-* rules those cards own. */
.mention-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 0; }
.mention-bar-track { position: relative; height: 6px; border-radius: 999px; background: var(--grey-soft); overflow: hidden; }
.mention-bar-fill { position: absolute; inset: 0 auto 0 0; height: 100%; min-width: 3px; border-radius: 999px; background: var(--grey); }
.mention-bar-fill--brand { background: var(--accent); }
.mention-count { font-size: 11px; color: var(--text-muted); white-space: nowrap; text-align: right; }

/* Day-by-day history strip (about.md §8 Page 2: "clicking a past day shows
   that day's diff"). One pill per observation on file for the engine. */
.history-strip { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.history-strip-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 10px; }
.history-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.history-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; font-variant-numeric: tabular-nums;
}
.history-pill:hover { background: var(--grey-soft); }
.history-pill.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.history-pill-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.history-pill.status-cell--green .history-pill-dot { background: var(--green); }
.history-pill.status-cell--yellow .history-pill-dot { background: var(--yellow); }
.history-pill.status-cell--grey .history-pill-dot { background: var(--grey); }
.history-pill.status-cell--red .history-pill-dot { background: var(--red); }
.history-pill.status-cell--hatched .history-pill-dot { background: var(--grey-soft); border: 1.5px dashed var(--text-muted); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); font-weight: 600; font-size: 13px; cursor: pointer;
  color: var(--text);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn:hover { filter: brightness(0.97); }

.screenshot-thumb { width: 100%; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }

.tag { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--grey-soft); color: var(--text-muted); }

/* Sources page (Page 3) — domain table. Scoped `src-*` classes so nothing
   here touches the shared .data-table/.badge/.tag rules other pages rely on.
   about.md §9: this is "often the most commercially interesting page", so it
   gets its own visual weight (avatar + proportional share bar + real
   cited-for prompts) rather than the plain four-column list it started as. */
.src-coverage-note { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }

.src-table td { vertical-align: middle; }

.src-domain-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.src-avatar {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--grey-soft); color: var(--text-muted);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.src-domain-text { min-width: 0; }
.src-domain-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.src-domain-sub {
  font-size: 11px; color: var(--text-muted); margin-top: 1px;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.src-share { display: flex; align-items: center; gap: 10px; }
.src-bar-track {
  position: relative; width: 90px; height: 8px; flex: none;
  border-radius: 999px; background: var(--grey-soft); overflow: hidden;
}
.src-bar-fill { position: absolute; inset: 0 auto 0 0; height: 100%; min-width: 3px; border-radius: 999px; background: var(--grey); }
.src-bar-fill--own { background: var(--green); }
.src-share-count { font-size: 13px; font-weight: 600; white-space: nowrap; }
.src-share-pct { font-size: 11px; font-weight: 500; color: var(--text-muted); }

.src-engines .tag + .tag { margin-left: 4px; }

.src-prompts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; max-width: 320px; }
.src-prompt-chip {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.src-prompt-chip:hover { filter: brightness(0.95); text-decoration: underline; }
.src-prompt-more { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Report page: full Q&A record, grouped by question then engine. (The
   overview-page "What the AI actually said" raw log that used to share this
   comment block was removed — superseded by the Questions section — and its
   .rawlog-* rules were removed with it. This .rawqa-* block is unrelated and
   still in active use.) */
.rawqa-date { margin-bottom: 30px; }
.rawqa-date-heading {
  font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums;
  margin: 0 0 14px 0; padding-bottom: 6px; border-bottom: 2px solid var(--text);
}
.rawqa-question { margin-bottom: 22px; }
.rawqa-question h4 { font-size: 13px; margin: 0 0 10px 0; color: var(--text-muted); font-weight: 700; }
.rawqa-entry { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.rawqa-entry-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.rawqa-entry-engine { font-size: 12.5px; font-weight: 700; }
.rawqa-entry-date { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rawqa-entry-status {
  margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap;
}
.rawqa-entry-status--green { background: var(--green-soft); color: var(--green); }
.rawqa-entry-status--yellow { background: var(--yellow-soft); color: var(--yellow); }
.rawqa-entry-status--grey { background: var(--grey-soft); color: var(--text-muted); }
.rawqa-entry-status--red { background: var(--red-soft); color: var(--red); }
.rawqa-entry-status--hatched { background: var(--grey-soft); color: var(--text-muted); }
.rawqa-entry-text { font-size: 12.5px; line-height: 1.6; white-space: normal; }
.rawqa-entry-text p { margin: 0 0 8px; }
.rawqa-entry-text p:last-child { margin-bottom: 0; }
.rawqa-entry-gap { font-size: 12.5px; color: var(--text-muted); font-style: italic; }
.rawqa-entry-citations { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }

/* "Questions" section (overview page) — every tracked prompt, accordion-
   expands inline to the real per-engine answer text for the CURRENT run
   only (deliberately no history here; that stays on question_detail() and
   the Runs page). Scoped under .qsec-* so this never touches .rawlog-*/
   .rawqa-*/.grid-table, which cover different, separate features on the
   same page. Reuses the generic .trend-head/.trend-title/.trend-sub/
   .trend-badge card-header rules and the generic .status-dot--*/.answer-text
   vocabulary already shared across the app, rather than redefining them. */
.qsec-list { display: flex; flex-direction: column; }
.qsec-row { border-bottom: 1px solid var(--border); }
.qsec-row:last-child { border-bottom: none; }
.qsec-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 6px;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.qsec-summary:hover { background: var(--grey-soft); }
.qsec-caret { color: var(--text-muted); font-size: 11px; flex: none; transition: transform 0.15s; }
.qsec-row--open .qsec-caret { transform: rotate(90deg); }
.qsec-question { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; }
.qsec-dots { display: flex; align-items: center; gap: 6px; flex: none; }
.qsec-dots .status-dot { width: 8px; height: 8px; }
.qsec-detail {
  margin: 0 6px 14px 28px;
  padding: 4px 0 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qsec-detail[hidden] { display: none; }
.qsec-engine {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--bg);
}
.qsec-engine-head {
  display: flex; align-items: center;
  gap: 8px; margin-bottom: 8px;
}
.qsec-engine-name { font-size: 12.5px; font-weight: 700; }
.qsec-fallback-tag {
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  white-space: nowrap; background: var(--yellow-soft); color: var(--yellow);
}
.qsec-fallback-note {
  font-size: 11.5px; color: var(--text-muted); font-style: italic;
  margin-bottom: 8px;
}
.qsec-status {
  font-size: 10.5px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap; margin-left: auto;
}
.qsec-status--green { background: var(--green-soft); color: var(--green); }
.qsec-status--yellow { background: var(--yellow-soft); color: var(--yellow); }
.qsec-status--grey { background: var(--grey-soft); color: var(--text-muted); }
.qsec-status--red { background: var(--red-soft); color: var(--red); }
.qsec-status--hatched { background: var(--grey-soft); color: var(--text-muted); }
.qsec-status--nodata { background: var(--grey-soft); color: var(--text-muted); }
.qsec-answer { font-size: 12.5px; max-height: 260px; overflow-y: auto; }
.qsec-gap { font-size: 12.5px; color: var(--text-muted); font-style: italic; }
.qsec-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-muted);
}
.qsec-meta a { color: var(--accent); font-weight: 600; white-space: nowrap; }

@media (max-width: 860px) {
  .qsec-detail { grid-template-columns: 1fr; }
}

@media print {
  .app-header, .no-print { display: none !important; }
  body { background: white; }
  main { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .page-break { page-break-before: always; }
  .rawqa-entry { page-break-inside: avoid; }
}
