/* ══ ABSTRACT SCREEN STAGE ═══════════════════════════════════════════
 *
 * Self-contained companion to Javascript/abstract-screen.js — mirrors the
 * inline-injection pattern used by projects-split-screen.css/js: the stage
 * hides .left-panel / .right-panel and injects its own full-width panel
 * (#asvContainer) into .proj-body, so it never touches the Sources /
 * Summarisation markup or CSS.
 *
 * Two sub-views inside #asvContainer:
 *   .asv-table-card   — default: publications × screening questions grid
 *   .asv-review       — split reading pane (left) + screening form (right),
 *                        opened per-publication from the table
 * ══════════════════════════════════════════════════════════════════ */

.proj-body .left-panel.asv-hidden,
.proj-body .right-panel.asv-hidden {
  display: none !important;
}

.proj-body.proj-body--screen {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  overflow: visible;
}

.asv-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ── Table sub-view ──────────────────────────────────────────────── */
.asv-table-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover, rgba(43,24,23,0.16));
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.asv-filter-dropdown { position: relative; }

#asvFilterBtn.asv-filter-btn {
  width: auto;
  gap: 6px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
}
#asvFilterBtn.asv-filter-btn.active {
  background: var(--teal-soft); border-color: var(--teal); color: var(--teal);
}

.asv-filter-caret { font-size: 0.85rem; transition: transform 0.16s ease; }
#asvFilterBtn.open .asv-filter-caret { transform: rotate(180deg); }

/* Pending-review count, shown inline on the button next to its label. */
.asv-filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--bg-elevated); color: var(--ink-soft); font-size: 0.6rem; font-weight: 800;
  line-height: 1;
}
#asvFilterBtn.asv-filter-btn.active .asv-filter-badge {
  background: var(--teal); color: #fff;
}

.asv-filter-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  flex-direction: column;
  gap: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(43,24,23,0.14);
  padding: 6px;
  z-index: 40;
}
.asv-filter-menu.open { display: flex; }

.asv-filter-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 6px; border: none;
  background: none; color: var(--ink-soft); font-family: inherit;
  font-size: 0.76rem; font-weight: 600; cursor: pointer; text-align: left;
  transition: all 0.14s;
}
.asv-filter-item .bx { font-size: 0.9rem; color: var(--teal); flex-shrink: 0; }
.asv-filter-item span:not(.asv-filter-item-count) { flex: 1; }
.asv-filter-item:hover { background: var(--teal-soft); color: var(--teal); }
.asv-filter-item.active { background: var(--teal-soft); color: var(--teal); }
.asv-filter-item-count {
  font-size: 0.66rem; font-weight: 800; color: var(--ink-muted);
  min-width: 16px; text-align: right; flex-shrink: 0;
}
.asv-filter-item.active .asv-filter-item-count { color: var(--teal); }

/* View/Hide AI — topbar shortcut for revealing the AI suggestion behind a
   submitted screening form (see _asvToggleAiPanel() and the showAiNote
   gate in _asvQuestionHtml(), abstract-screen.js — this is the only
   control for it; no equivalent lives inline in the form itself). Same
   width-override trick as #asvFilterBtn.asv-filter-btn above: ID+class
   beats design-alignment.css's later, otherwise-winning .icon-btn-sm
   30px-square rule. */
#asvAiTopbarBtn.asv-ai-topbar-btn {
  width: auto;
  padding: 0 11px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
}
#asvAiTopbarBtn.asv-ai-topbar-btn.active {
  background: var(--bg-page);
}

.asv-topbar-search-wrap { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.asv-topbar-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--ink-muted); font-size: 0.8rem; pointer-events: none;
}
.asv-topbar-search-input {
  height: 30px; width: 190px; box-sizing: border-box;
  border-radius: 8px; border: 1px solid var(--border); background: none;
  padding: 0 10px 0 30px; font-family: inherit; font-size: 0.74rem; color: var(--ink);
  outline: none; transition: border-color 0.16s ease, width 0.2s ease, background 0.16s ease;
}
.asv-topbar-search-input::placeholder { color: var(--ink-muted); }
.asv-topbar-search-input:focus { border-color: var(--border-hover); width: 230px; background: var(--bg-elevated); }
.asv-topbar-search-input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(13,167,154,0.18); }

.asv-table-wrap { flex: 1; overflow: auto; min-height: 0; }
.asv-table-wrap::-webkit-scrollbar { width: 4px; height: 4px; }
.asv-table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.asv-table { width: 100%; border-collapse: collapse; }
.asv-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-page); text-align: left;
  padding: 16px; font-size: 0.74rem; font-weight: 700; color: var(--ink-soft);
  border-bottom: 1px solid rgba(43,24,23,0.10);
  border-right: 1px solid rgba(43,24,23,0.06); white-space: nowrap;
}
.asv-table thead th:first-child { padding-left: 18px; }
.asv-table thead th:last-child { padding-right: 18px; border-right: none; }
.asv-table thead th.asv-col-paper { min-width: 215px; width: 22%; }
.asv-table thead th.asv-col-assignee { min-width: 110px; }
.asv-table thead th.asv-col-confidence { min-width: 110px; }
.asv-table thead th.asv-col-q { min-width: 150px; }

.asv-table thead th.asv-col-paper { left: 0; z-index: 3; }
.asv-table td:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--bg-surface); padding-left: 18px;
}
.asv-table tbody tr:hover td:first-child { background: var(--bg-page); }

.asv-table tbody tr { border-bottom: 1px solid rgba(43,24,23,0.085); cursor: pointer; transition: background 0.12s; }
.asv-table tbody tr:last-child { border-bottom: none; }
.asv-table tbody tr:hover { background: var(--bg-page); }
.asv-table td {
  padding: 20px 16px; vertical-align: top;
  border-right: 1px solid rgba(43,24,23,0.06);
}
.asv-table td:last-child { padding-right: 18px; border-right: none; }

.asv-paper-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.asv-paper-title {
  font-size: 0.80rem; font-weight: 700; color: var(--ink); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.asv-paper-meta {
  font-size: 0.7rem; color: var(--ink-muted); font-weight: 500; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asv-paper-footer {
  display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap;
}
.asv-paper-uid {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 21px; height: 16px; border-radius: 4px; background: var(--bg-page);
  color: var(--ink-muted); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 0 5px; width: fit-content; flex-shrink: 0;
}
.asv-search-tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 16px; border-radius: 4px; background: var(--bg-page);
  color: var(--ink-muted); font-size: 0.62rem; font-weight: 700;
  padding: 0 6px; width: fit-content; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asv-search-tag-chip i { font-size: 0.72rem; flex-shrink: 0; }


.asv-assignee-cell { display: flex; align-items: flex-start; }
.asv-assignee-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px;
  padding: 0 10px 0 7px; border-radius: 20px;
  background: var(--bg-page); border: 1px solid var(--border);
  color: var(--ink); font-size: 0.72rem; font-weight: 600; width: fit-content; margin-right: 5px;
}
.asv-assignee-chip i { font-size: 0.98rem; color: var(--ink-muted); flex-shrink: 0; }
.asv-assignee-chip.fts-ai-row-label {
  background: var(--teal-soft); border-color: rgba(13,167,154,0.22); color: var(--teal);
}
.asv-assignee-chip.fts-ai-row-label i { color: var(--teal); }
.asv-assignee-chip .skel-bar--status { margin-left: 2px; }
.asv-assignee-chip .asv-ai-retry { margin-left: 2px; }

.asv-answer-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px;
  border-radius: 20px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.01em;
  background: var(--bg-page); color: var(--ink-muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.asv-answer-pill.asv-pending { color: var(--ink-muted); font-weight: 600; }

/* Small leading status dot, Elicit-table-style — only on pills that carry
   a resolved answer colour (data-pill-color). Pending "—" pills stay
   dot-less. Built as a ::before so callers don't need to touch markup;
   uses currentColor so it always matches the pill's text colour below. */
.asv-answer-pill[data-pill-color]::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.asv-pill-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }


.asv-answer-pill[data-pill-color="teal"]   { background: var(--teal-soft);   color: var(--teal);   border-color: rgba(13,167,154,0.22); }
.asv-answer-pill[data-pill-color="green"]  { background: var(--green-soft);  color: var(--green);  border-color: rgba(5,150,105,0.22); }
.asv-answer-pill[data-pill-color="blue"]   { background: var(--blue-soft);   color: var(--blue);   border-color: rgba(37,99,235,0.22); }
.asv-answer-pill[data-pill-color="purple"] { background: var(--purple-soft); color: var(--purple); border-color: rgba(124,58,237,0.22); }
.asv-answer-pill[data-pill-color="amber"]  { background: var(--amber-soft);  color: var(--amber);  border-color: rgba(217,119,6,0.22); }
.asv-answer-pill[data-pill-color="red"]    { background: var(--red-soft);    color: var(--red);    border-color: rgba(220,38,38,0.22); }
.asv-answer-pill[data-pill-color="grey"]   { background: var(--bg-page);     color: var(--ink-soft); border-color: var(--border); }

.asv-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 56px 28px; text-align: center;
}
.asv-empty .bx { font-size: 2.1rem; color: var(--ink-muted); opacity: 0.22; }
.asv-empty h3 { font-size: 0.86rem; font-weight: 700; color: var(--ink-soft); }
.asv-empty p { font-size: 0.75rem; color: var(--ink-muted); line-height: 1.6; max-width: 280px; }

/* ── "Select or create a form" gate (FormsModule.gateHtml) ──────────────
   Shared between Abstract Screen and Full Text Screen — shown instead of
   the table/review sub-views whenever a project has no form assigned for
   that stage. Built on top of .asv-empty's centred layout. */
.asv-form-gate p { max-width: 360px; }
.asv-form-gate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.asv-gate-select {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill, 30px);
  padding: 7px 14px;
  min-width: 220px;
  max-width: 320px;
  cursor: pointer;
}
.asv-gate-select:focus { outline: none; border-color: var(--border-teal); }
.asv-form-gate-or {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 2px 0;
}

/* ── Review sub-view ─────────────────────────────────────────────── */
.asv-review { flex: 1; min-height: 0; display: flex; gap: 14px; }

.asv-review-left {
  flex: 1; min-width: 0; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-card); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.asv-review-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 15px; border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 10px;
}
.asv-back-btn {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: none;
  color: var(--ink-soft); font-family: inherit; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; padding: 5px 8px 5px 4px; border-radius: 7px; transition: all 0.14s;
}
.asv-back-btn:hover { background: var(--bg-page); color: var(--ink); }
.asv-back-btn i { font-size: 0.95rem; }

.asv-paginator { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.asv-paginator-label { font-size: 0.7rem; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }

.asv-review-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.asv-review-body::-webkit-scrollbar { width: 3px; }
.asv-review-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.asv-review-title {
  font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.4;
  letter-spacing: -0.02em; margin-bottom: 9px; overflow-wrap: anywhere;
}
.asv-review-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: 0.68rem; color: var(--ink-muted); font-weight: 500; margin-bottom: 16px;
}
.asv-review-meta .pub-doi-chip { order: 0; }

/* Abstract shown as plain text, deliberately not wrapped in the shared
   .abstract-box card (background+border) used elsewhere in the pub-detail
   panel — this stage reads closer to a document than a data card. */
.asv-abstract-section { padding-top: 2px; }

/* ── Screening form (right rail) ─────────────────────────────────── */
.asv-review-right {
  width: 400px; flex-shrink: 0; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-card); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.asv-form-header { padding: 13px 15px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.asv-form-header-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.asv-form-header h4 { font-size: 0.78rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.asv-form-header h4 .bx { font-size: 0.86rem; color: var(--teal); }

/* Assignment chip — shown whenever the stage is workspace-scoped (see
   wsScreenAssignmentCard, workspace.html): teal when it's the current
   user's own assignment, amber when it belongs to someone else or when
   the pub hasn't been assigned to anyone yet (locked either way). Text
   only — no icon, no separate rationale panel underneath; the "why" is
   just a hover away on the (disabled) Submit button's title. */
.asv-assign-chip {
     display: inline-flex; align-items: center; gap: 4px;
     height: 19px; padding: 0 8px; border-radius: 5px;
     border: none; background: var(--bg-page); color: var(--ink-muted);
     font-family: inherit; font-size: 0.63rem; font-weight: 700; 
     cursor: pointer; transition: all 0.14s; white-space: nowrap; margin-top: 8px; }

.asv-assign-chip.asv-assign-mine       { background: var(--teal-soft);  color: var(--teal); }
.asv-assign-chip.asv-assign-locked,
.asv-assign-chip.asv-assign-unassigned { background: var(--amber-soft); color: var(--amber); }
.asv-assign-chip strong { font-weight: 800; }

.asv-submit-btn {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 6px 12px; border-radius: 10px; border: 1px solid var(--bg-elevated);
  background: var(--bg-surface); color: var(--ink-muted); font-family: inherit; font-size: 0.72rem;
  font-weight: 600; cursor: pointer; transition: all 0.14s; white-space: nowrap;
}
.asv-submit-btn .bx { font-size: 0.85rem; }
/* Enabled + not-yet-submitted: darker ink + teal border so it visibly
   reads as clickable, distinct from the muted, already-submitted state. */
.asv-submit-btn:not(:disabled):not(.asv-submitted) {
  color: var(--ink);
  border-color: var(--border-teal);
}
.asv-submit-btn:hover:not(:disabled) { opacity: 0.88; }
.asv-submit-btn:not(:disabled):not(.asv-submitted):hover {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal);
  opacity: 1;
}
.asv-submit-btn:disabled { cursor: default; opacity: 0.5; }
.asv-submit-btn.asv-submitted { color: var(--ink); border-color: var(--border);}


.asv-form-body { flex: 1; overflow-y: auto; padding: 4px 15px 15px; }
.asv-form-body.asv-form-locked { opacity: 0.55; }
.asv-form-body::-webkit-scrollbar { width: 3px; }
.asv-form-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }


.asv-question { padding: 13px 0; border-bottom: 1px solid var(--border); }
.asv-question:last-child { border-bottom: none; }
.asv-question-label-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 9px; }
.asv-question-label { font-size: 0.76rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.asv-question-num {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: var(--fw-black, 800);
  color: var(--ink-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill, 30px);
  padding: 2px 7px;
  margin-right: 7px;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.asv-question-multi-hint {
  flex-shrink: 0; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--teal); background: var(--teal-soft); border-radius: 20px; padding: 2px 8px; white-space: nowrap;
}
.asv-question-required-hint {
  margin-top: 2px; font-size: 1rem; font-weight: 700;
  color: var(--red); 
}

.asv-answer-row { display: flex; flex-wrap: wrap; gap: 6px; }
.asv-answer-btn {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--ink-soft); font-family: inherit; font-size: 0.68rem; font-weight: 700; cursor: pointer;
  white-space: nowrap; text-align: center;
  transition: all 0.14s;
}
.asv-answer-btn:hover { border-color: var(--border-hover); color: var(--ink); }
.asv-answer-btn.asv-active[data-pill-color="teal"]   { background: var(--teal-soft);   color: var(--teal);   border-color: rgba(13,167,154,0.3); }
.asv-answer-btn.asv-active[data-pill-color="green"]  { background: var(--green-soft);  color: var(--green);  border-color: rgba(5,150,105,0.3); }
.asv-answer-btn.asv-active[data-pill-color="blue"]   { background: var(--blue-soft);   color: var(--blue);   border-color: rgba(37,99,235,0.3); }
.asv-answer-btn.asv-active[data-pill-color="purple"] { background: var(--purple-soft); color: var(--purple); border-color: rgba(124,58,237,0.3); }
.asv-answer-btn.asv-active[data-pill-color="amber"]  { background: var(--amber-soft);  color: var(--amber);  border-color: rgba(217,119,6,0.3); }
.asv-answer-btn.asv-active[data-pill-color="red"]    { background: var(--red-soft);    color: var(--red);    border-color: rgba(220,38,38,0.3); }
.asv-answer-btn.asv-active[data-pill-color="grey"]   { background: var(--bg-elevated); color: var(--ink);   border-color: var(--border-hover); }

/* Once the form has been submitted, a confirmed answer settles into this
   quiet neutral look instead of its decision colour (green/amber/red/etc.)
   — the colour is most useful while a reviewer is actively deciding;
   afterwards it's just noise on an already-finished screening. Overrides
   the per-colour rules above regardless of data-pill-color. */
.asv-answer-btn.asv-active.asv-active-submitted[data-pill-color] {
  background: var(--bg-page);
  color: var(--ink);
  border-color: var(--border);
}
.asv-answer-btn:disabled { cursor: default; }
.asv-answer-btn:disabled:hover { border-color: var(--border); color: var(--ink-soft); }

/* ── Screening decision (Include / Exclude) ──────────────────────────
   Set when an answer tagged with a decision in the form builder is
   selected — see _asvComputeDecision() in abstract-screen.js. Exclusion
   always takes precedence over inclusion if both are triggered. */
.asv-decision-chip {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  padding: 4px 10px; border-radius: 20px; font-size: 0.68rem; font-weight: 700;
  width: fit-content;
}
.asv-decision-chip.asv-decision-include { background: var(--green-soft); color: var(--green); }
.asv-decision-chip.asv-decision-exclude { background: var(--red-soft); color: var(--red); }
.asv-decision-chip .bx { font-size: 0.85rem; }

.asv-decision-pill {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700;
}
.asv-decision-pill.asv-decision-include { background: var(--green-soft); color: var(--green); }
.asv-decision-pill.asv-decision-exclude { background: var(--red-soft); color: var(--red); }

/* Pending-screening count badge in the stage dropdown row — same shape
   language as .psi-run-count (Summarisation), amber instead of teal so
   the two badges stay visually distinct at a glance. */
.psi-screen-count {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--amber-soft); color: var(--amber); font-size: 0.62rem; font-weight: 800;
  border: none; cursor: pointer; font-family: inherit;
}
.psi-screen-count:hover { background: var(--amber); color: #fff; }

@media (max-width: 900px) {
  .asv-review { flex-direction: column; }
  .asv-review-right { width: 100%; }
  .asv-topbar-search-input, .asv-topbar-search-input:focus { width: 130px; }
}


/* ── AI suggestion indicator on an answer button ──────────────────── */
.asv-answer-btn.asv-active.asv-ai-active {
  border-style: dashed;
}

/* ── AI note beneath a question (suggestion + explanation, or status) ─
   Sits directly under the answer row it belongs to, same left inset as
   the question's own content — reads as an annotation, not a separate
   card. */
.asv-ai-note {
  margin-top: 9px; padding: 8px 10px; border-radius: var(--r-card);
  background: var(--bg-surface); 
  font-size: 0.7rem; line-height: 1.5; color: var(--ink-soft);
}
.asv-ai-note-head { font-weight: 700; color: var(--ink-soft); }
.asv-ai-note-head strong { font-weight: 800; color: var(--ink); }
.asv-ai-explain { margin-top: 4px; color: var(--ink-muted); }

/* While a pass is running for this paper, the note shows the shared
   shimmer placeholder (skeleton.css) in place of any spinner/copy. */
.asv-ai-note-loading { padding: 10px; }
.asv-ai-note-loading .skel-bar { display: block; }

.asv-ai-note-error {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--red-soft); border-color: rgba(220,38,38,0.2);
  color: var(--red); font-weight: 500;
}
.asv-ai-retry {
  margin-left: auto; padding: 3px 10px; border-radius: 20px; border: 1px solid rgba(220,38,38,0.3);
  background: var(--bg-surface); color: var(--red); font-family: inherit; font-size: 0.66rem;
  font-weight: 700; cursor: pointer; transition: all 0.14s;
}
.asv-ai-retry:hover { background: var(--red); color: #fff; }

/* ── AI preview pill in the table (paper not yet submitted) ───────── */
.asv-answer-pill.asv-ai-pill { border-style: dashed; opacity: 0.85; }

/* Running state re-uses the shared shimmer bar (skeleton.css) sized to
   match the pill it's replacing — see _asvPillHtml(). */
.asv-table td .skel-bar.skel-bar--status { vertical-align: middle; }