:root {
  --bg: #ffffff;
  --panel: #f7f7f8;
  --panel-2: #efeff1;
  --border: #d9d9de;
  --text: #1a1a1a;
  --text-dim: #6b6b73;
  --accent: #1a1a1a;
  --accent-soft: rgba(26, 26, 26, 0.06);
  --green: #2f2f2f;
  --amber: #6b6b73;
  --red: #b00020;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-size: 14px;
}

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

body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.app {
  display: grid;
  grid-template-columns: 320px 1fr 300px;
  height: 100vh;
}

/* ── 左栏 ── */
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: #1a1a1a;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px; color: #fff;
}
.brand-title { font-weight: 600; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--text-dim); letter-spacing: 0.3px; }

.health {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--text-dim);
  padding: 8px 12px; background: var(--panel-2);
  border-radius: 8px; border: 1px solid var(--border);
}
.health-line { display: flex; align-items: center; gap: 8px; }
/* 分库降级：整体可用但有库不通，用琥珀色边框 + 说明行，不用报错红 */
.health.degraded { border-color: #d08700; }
.health-hint { font-size: 11px; line-height: 1.5; color: var(--text-dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.dot.ok { background: #1a1a1a; }
.dot.warn { background: #d08700; }
.dot.bad { background: #b00020; }

.ask { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }

select {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}
select:focus { outline: none; border-color: var(--accent); }

input, textarea {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  transition: border-color 0.15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.mode { display: flex; flex-direction: column; gap: 6px; }
.mode-toggle { display: flex; gap: 6px; }
.mode-btn {
  flex: 1; padding: 7px 0; font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 7px; cursor: pointer;
  transition: all 0.15s;
}
.mode-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.submit {
  padding: 11px; font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; cursor: pointer; transition: opacity 0.15s;
}
.submit:hover { opacity: 0.9; }
.submit:disabled { opacity: 0.5; cursor: not-allowed; }

.hint { font-size: 11px; color: var(--text-dim); line-height: 1.5; }

.examples { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.example {
  text-align: left; padding: 8px 10px; font-size: 12px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 7px; cursor: pointer;
  transition: all 0.15s;
}
.example:hover { border-color: var(--accent); color: var(--text); }

/* ── 中栏 ── */
.main { display: flex; flex-direction: column; overflow: hidden; }
.main-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.main-head h1 { font-size: 16px; font-weight: 600; }

.status-pill {
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  background: var(--accent-soft); color: var(--text);
}
.status-pill.done { background: #1a1a1a; color: #fff; }
.status-pill.failed { background: rgba(176,0,32,0.1); color: var(--red); }
.status-pill.review { background: var(--panel-2); color: var(--text-dim); }

.result { flex: 1; overflow-y: auto; padding: 24px; }

.empty {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  color: var(--text-dim); text-align: center;
}
.empty-icon { font-size: 42px; opacity: 0.4; }

/* 卡片通用 */
.block { margin-bottom: 22px; }
.block-title {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.block-title .count {
  font-size: 11px; background: var(--panel-2); padding: 2px 8px;
  border-radius: 10px; color: var(--text-dim);
}

.report-summary {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; line-height: 1.7;
}
.report-summary h2 { font-size: 16px; margin-bottom: 10px; }
.report-summary .findings { margin: 10px 0 0 0; padding-left: 18px; }
.report-summary .findings li { margin: 4px 0; }

.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); font-weight: 500;
}
.tag.high { background: #1a1a1a; color: #fff; }
.card-title { font-weight: 600; font-size: 14px; }
.card-body { color: var(--text-dim); font-size: 13px; line-height: 1.6; }

.evidence { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.evidence-item {
  font-size: 12px; color: var(--text-dim); line-height: 1.6;
  padding: 6px 10px; background: var(--panel-2);
  border-radius: 6px; margin-top: 6px;
}
.evidence-item .rid { color: var(--accent); font-family: monospace; font-size: 11px; }
/* 长原话展开：默认收起预览，完整原文一键可达（内联按钮，不撑破列表节奏） */
.ev-item-text { white-space: pre-wrap; }
.ev-expand {
  margin-left: 6px; padding: 0 2px; font-size: 11px; font-weight: 500;
  color: var(--accent); background: none; border: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.ev-expand:hover { opacity: 0.75; }

/* 洞察卡计数徽标（P0-6）：卡头部“支撑人数 / 原话数”概览指标 */
.card-metrics {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
.card-metric {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--border);
}
.card-metric-label { font-size: 11px; color: var(--text-dim); }
.card-metric-num { font-size: 13px; font-weight: 700; color: var(--accent); line-height: 1.3; }

/* 洞察卡内联展开证据（P0-4） */
.insight-card.expanded { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); }
.card-evidence-toggle {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accent); cursor: pointer;
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px 12px; font-weight: 500;
}
.card-evidence-toggle:hover { border-color: var(--accent); }
.card-evidence-caret { font-size: 10px; }
.card-evidence-list { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.card-evidence-empty {
  margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px;
  font-size: 12px; color: var(--text-dim);
}
.ev-quote {
  background: var(--panel-2); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 8px 12px; margin-top: 8px;
}
.ev-quote-text { font-size: 13px; color: var(--text); line-height: 1.6; }
.ev-quote-src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ev-src-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--text-dim);
}
.ev-src-tag.rid { color: var(--accent); font-family: monospace; }

/* 证据图片缩略图 */
.ev-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ev-img {
  display: block; width: 84px; height: 84px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--border); background: var(--panel-2);
  padding: 0; cursor: pointer;
}
.ev-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.15s; }
.ev-img:hover img { transform: scale(1.06); }

/* 图片灯箱 */
.lb-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.78);
  display: flex; align-items: center; justify-content: center; padding: 32px;
}
.lb-box {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); max-width: 92vw; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow);
}
.lb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.lb-title { font-size: 13px; color: var(--text-dim); overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; }
.lb-actions { display: flex; gap: 8px; flex-shrink: 0; }
.lb-btn {
  font-size: 13px; padding: 6px 14px; border-radius: 7px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  text-decoration: none; line-height: 1.2;
}
.lb-btn:hover { border-color: var(--accent); }
.lb-close { font-size: 18px; padding: 2px 12px; }
.lb-img-wrap {
  flex: 1; overflow: auto; display: flex; align-items: center;
  justify-content: center; background: #000; min-height: 0;
}
.lb-img-wrap img { max-width: 100%; max-height: 76vh; object-fit: contain; display: block; }
.lb-desc {
  padding: 12px 16px; font-size: 13px; color: var(--text-dim); line-height: 1.6;
  max-height: 18vh; overflow-y: auto; border-top: 1px solid var(--border);
}

/* 统计表 */
.stat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stat-table th, .stat-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.stat-table th { color: var(--text-dim); font-weight: 500; font-size: 12px; }
.bar {
  height: 6px; background: var(--accent); border-radius: 3px;
  display: inline-block; vertical-align: middle; margin-left: 8px;
}
/* 小分母比例提示：原始分数 + 「样本少」徽标与百分比并列 */
.low-sample-hint {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 6px;
  font-size: 12px; color: var(--text-dim); white-space: nowrap;
}

/* 下钻问题 */
.drill { display: flex; flex-direction: column; gap: 8px; }
.drill-item {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; transition: all 0.15s;
}
.drill-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.drill-type {
  font-size: 10px; padding: 2px 7px; border-radius: 5px;
  background: var(--panel-2); color: var(--text-dim); white-space: nowrap;
}
.drill-q { font-size: 13px; flex: 1; }
.drill-loading { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.caliber-note {
  font-size: 12px; color: var(--text-dim); line-height: 1.6;
  padding: 8px 12px; margin-bottom: 14px;
  background: var(--panel-2); border: 1px dashed var(--border); border-radius: 8px;
}
/* 金额口径风险提示（方案②，quick 轨）：显著加粗、暖色底，防误当客单价定价。 */
.numeric-risk-note {
  font-size: 12.5px; line-height: 1.7; color: var(--amber, #b8860b);
  padding: 8px 12px; margin: 6px 0 4px;
  background: rgba(230, 162, 60, 0.12);
  border: 1px solid var(--amber, #e6a23c); border-radius: 8px;
}
.numeric-risk-note strong { color: inherit; }

/* ── 右栏 timeline ── */
.trace-panel {
  background: var(--panel); border-left: 1px solid var(--border);
  padding: 18px; overflow-y: auto;
}
.trace-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.trace-sub { font-size: 11px; color: var(--text-dim); font-weight: 400; }

.timeline { list-style: none; position: relative; padding-left: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px;
  width: 2px; background: var(--border);
}
.timeline-empty { color: var(--text-dim); font-size: 12px; padding-left: 0; }
.timeline-empty::before { display: none; }

.tl-item { position: relative; padding: 0 0 16px 0; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--text-dim);
}
.tl-item.real::before { border-color: #1a1a1a; background: #1a1a1a; }
.tl-item.stub::before { border-color: #9a9aa2; background: #fff; }
.tl-item.fail::before { border-color: #b00020; background: #b00020; }
.tl-item.running::before { border-color: var(--accent); background: var(--accent); }
.tl-name { font-size: 13px; font-weight: 500; }
.tl-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.tl-mode { font-family: monospace; }

.spinner {
  width: 14px; height: 14px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  display: inline-block; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.err-box {
  background: rgba(176,0,32,0.06); border: 1px solid var(--red);
  color: var(--red); padding: 12px 14px; border-radius: 8px; font-size: 13px;
}

/* ── 对话式工作台扩展 ── */
.collapse-section {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid rgba(217, 217, 222, 0.7);
  padding-top: 10px;
}
.collapse-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0; border: none; background: transparent; color: var(--text-dim);
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-align: left;
}
.collapse-head:hover { color: var(--text); }
.collapse-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.collapse-arrow { font-size: 15px; line-height: 1; transition: transform 0.15s; }
.collapse-section:not(.open) .collapse-arrow { transform: rotate(-90deg); }
.collapse-body { display: flex; flex-direction: column; gap: 10px; }
.project-manager { display: flex; flex-direction: column; gap: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-head.compact { margin-top: 2px; }
.section-meta { font-size: 11px; color: var(--text-dim); font-weight: 400; }
.project-actions { display: flex; gap: 8px; }
.mini-btn {
  flex: 1; padding: 7px 8px; font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 7px; cursor: pointer;
}
.mini-btn:hover { border-color: var(--accent); }
.mini-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.selected-summary {
  font-size: 11px; color: var(--text-dim); line-height: 1.5;
  padding: 7px 9px; background: #fff; border: 1px dashed var(--border); border-radius: 8px;
  max-height: 52px; overflow-y: auto;
}
.project-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 300px; overflow-y: auto; padding-right: 2px;
}
.project-card {
  width: 100%; text-align: left; padding: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all 0.15s;
}
.project-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.project-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.project-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35; }
.project-domain {
  flex-shrink: 0; font-size: 10px; padding: 2px 6px;
  border-radius: 999px; background: var(--panel-2); color: var(--text-dim);
}
.project-domain.ok { background: #1a1a1a; color: #fff; }
.project-domain.muted { opacity: 0.65; }
.project-replica-badge {
  display: inline-block; margin-left: 6px; font-size: 9px; font-weight: 600;
  padding: 1px 5px; border-radius: 999px; vertical-align: middle;
  background: #b45309; color: #fff;
}
.project-desc { margin-top: 6px; font-size: 11px; color: var(--text-dim); line-height: 1.45; }
.project-meta { margin-top: 6px; font-size: 10px; color: var(--text-dim); font-family: monospace; }

.history { display: flex; flex-direction: column; gap: 6px; }
.hist-item {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel-2); cursor: pointer; transition: all 0.15s;
}
.hist-item:hover { border-color: var(--accent); }
.hist-item.active { border-color: var(--accent); background: var(--accent-soft); }
.hist-q {
  font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.scope-pill {
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border);
}

/* 对话流 */
.flow { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg.ai { justify-content: flex-start; }
.msg .bubble {
  max-width: 88%; padding: 14px 16px; border-radius: 14px;
  line-height: 1.6; font-size: 14px;
}
.msg.user .bubble {
  background: var(--accent); color: #fff; border-bottom-right-radius: 4px;
}
.msg.ai .bubble {
  background: var(--panel); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; width: 88%;
}
.progress { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13px; }

/* 底部输入条 */
.composer { border-top: 1px solid var(--border); padding: 14px 24px; display: flex; flex-direction: column; gap: 10px; }
.composer .mode-toggle { max-width: 320px; }
.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer-row textarea {
  flex: 1; min-height: 44px; max-height: 160px; line-height: 1.5;
}
.submit.send { width: auto; padding: 11px 22px; white-space: nowrap; align-self: stretch; }

.msg.ai .bubble .block:last-child { margin-bottom: 0; }

/* ── 中栏结果工作台 Tabs ── */
.result-workbench { display: flex; flex-direction: column; }
.result-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px; padding-bottom: 10px;
}
.result-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; font-family: inherit;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 8px; cursor: pointer;
  transition: all 0.15s;
}
.result-tab:hover { border-color: var(--accent); color: var(--text); }
.result-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600;
}
.result-tab-count {
  font-size: 11px; line-height: 1; padding: 2px 6px; border-radius: 10px;
  background: var(--panel); color: var(--text-dim);
}
.result-tab.active .result-tab-count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.result-tabpanel { min-height: 40px; }
.result-tabpanel .block:last-child { margin-bottom: 0; }
.result-empty {
  font-size: 13px; color: var(--text-dim); line-height: 1.7;
  padding: 16px 18px; text-align: center;
  background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius);
}
.report-sections { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.result-evidence-hint { margin-top: 8px; font-size: 12px; color: var(--text-dim); }

/* ── 报告视图 P0-3：概览横幅 / 徽标 / 方法口径 / 导出 ── */
.report-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.report-export-btn {
  font-size: 12px; padding: 6px 14px; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; transition: all 0.15s; white-space: nowrap;
}
.report-export-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.report-export { display: flex; gap: 8px; flex-wrap: wrap; }
.report-export-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── 完整报告（PDF · 第一层）── */
.full-report { display: flex; flex-direction: column; gap: 12px; }
.full-report-desc {
  font-size: 13px; color: var(--text-dim); line-height: 1.75; margin-bottom: 12px;
}
.full-report-modes {
  display: inline-flex; gap: 2px; padding: 2px; margin-bottom: 12px;
  background: var(--bg-soft, rgba(127, 127, 127, 0.1)); border-radius: 8px;
}
.full-report-mode {
  padding: 6px 14px; font-size: 13px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-dim); cursor: pointer;
}
.full-report-mode:hover:not(:disabled) { color: var(--text); }
.full-report-mode:disabled { opacity: 0.5; cursor: not-allowed; }
.full-report-mode.is-active {
  background: var(--panel, #fff); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.full-report-opt {
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
  font-size: 12px; color: var(--text-dim); cursor: pointer;
}
.full-report-title {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-soft, rgba(76, 125, 240, 0.08));
  border-left: 3px solid #4c7df0;
  font-size: 14px; font-weight: 600; line-height: 1.6;
}
.full-report-fw {
  display: block; margin-top: 4px;
  font-size: 12px; font-weight: 400; color: var(--text-dim);
}
.full-report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.full-report-hint {
  margin-top: 8px; font-size: 12px; color: var(--text-dim); line-height: 1.6;
}
.full-report-meta {
  margin-top: 10px; font-size: 12px; color: var(--text-dim); line-height: 1.7;
}
.full-report-error {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  font-size: 12px; line-height: 1.7;
  background: rgba(220, 80, 80, 0.08);
  border: 1px solid rgba(220, 80, 80, 0.35); color: var(--text);
}
.full-report-frame {
  width: 100%; height: 720px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff;
}

.report-overview {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.report-metric {
  flex: 1; min-width: 96px; display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.report-metric-num { font-size: 20px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.report-metric-label { font-size: 11px; color: var(--text-dim); }

.report-summary .findings li { display: flex; align-items: baseline; gap: 8px; }
.kf-text { flex: 1; }
.kf-badge {
  flex-shrink: 0; font-size: 10px; padding: 1px 8px; border-radius: 999px;
  font-weight: 500; white-space: nowrap; line-height: 1.6;
}
.kf-badge.has { background: var(--accent); color: #fff; }
.kf-badge.none { background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); }

.report-method { margin-top: 18px; }
.report-method-body {
  font-size: 12px; color: var(--text-dim); line-height: 1.7;
  padding: 12px 14px; background: var(--panel-2);
  border: 1px dashed var(--border); border-radius: var(--radius);
}

/* 证据台账（P0-5）：搜索 + 分页列表 + 翻页 */
.ev-ledger-refs-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-dim);
  background: rgba(64, 128, 255, 0.08);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 10px; margin-bottom: 10px;
}
.ev-ledger-search { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.ev-ledger-input {
  flex: 1; padding: 7px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); color: var(--text);
}
.ev-ledger-input:focus { outline: none; border-color: var(--accent); }
.ev-ledger-list { display: flex; flex-direction: column; gap: 10px; }
.ev-ledger-list.is-loading { opacity: 0.55; }
.ev-ledger-item {
  background: var(--panel-2); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 10px 14px; margin: 0;
}
.ev-ledger-quote { font-size: 13px; color: var(--text); line-height: 1.65; white-space: pre-wrap; }
.ev-ledger-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ev-src-tag.carrier { color: var(--accent); background: var(--accent-soft); }
.ev-ledger-loading, .ev-ledger-empty, .ev-ledger-error {
  padding: 24px 12px; text-align: center; font-size: 13px; color: var(--text-dim);
}
.ev-ledger-error { color: #c0392b; }
.ev-ledger-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border);
}
.ev-ledger-pageinfo { font-size: 12px; color: var(--text-dim); }

/* 证据台账多维筛选（P1）：受访者/项目 */
.ev-ledger-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px;
}
.ev-ledger-filter { display: flex; flex-direction: column; gap: 4px; }
.ev-ledger-filter-label { font-size: 11px; color: var(--text-dim); }
.ev-ledger-filter-input {
  padding: 6px 9px; font-size: 12px; font-family: inherit; width: 150px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); color: var(--text);
}
.ev-ledger-filter-input:focus { outline: none; border-color: var(--accent); }

/* ── 右栏容器 + 样本口径面板（文档 5.8） ── */
.right-panel {
  background: var(--panel); border-left: 1px solid var(--border);
  overflow-y: auto; display: flex; flex-direction: column;
}
.right-panel .trace-panel { border-left: none; background: transparent; }
.observation-panel {
  padding: 18px; border-top: 1px solid var(--border);
}
.obs-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600; margin-bottom: 14px;
}
.obs-sub { font-size: 11px; color: var(--text-dim); font-weight: 400; }
.obs-section { margin-top: 12px; }
.obs-section-title { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.obs-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--text-dim); margin-top: 5px;
}
.obs-row strong { color: var(--text); font-weight: 500; text-align: right; word-break: break-all; }
.obs-hit-list, .obs-gap-list { display: flex; flex-direction: column; gap: 6px; }
.obs-hit, .obs-gap {
  padding: 8px 10px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.obs-hit-main { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; }
.obs-hit-main em, .obs-gap em { font-style: normal; color: var(--text-dim); font-weight: 400; }
.obs-hit-meta { margin-top: 4px; font-size: 11px; color: var(--text-dim); }
.obs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.obs-kpis div {
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  padding: 8px 6px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.obs-kpis strong { font-size: 14px; }
.obs-kpis span { font-size: 10px; color: var(--text-dim); }
.obs-gap { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.obs-empty { font-size: 12px; color: var(--text-dim); padding: 6px 0; }
/* 「0% 命中 + 有证据」的解释块。用提示色而非报错色：这不是故障，
   只是指标名容易被误读，需要一句说明把注意力引到真正的判据上。 */
.obs-literal-hint {
  margin: 8px 0; padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid #d08700; background: rgba(208, 135, 0, 0.08);
  display: flex; flex-direction: column; gap: 4px;
}
.obs-literal-hint strong { font-size: 12px; color: #8a5700; }
.obs-literal-hint span { font-size: 11px; color: var(--text-dim); line-height: 1.55; }
.obs-answer-status {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel-2); font-size: 12px;
}
.obs-answer-status strong { color: var(--text); }
.obs-answer-status span { color: var(--text-dim); }
.obs-answer-status.warn { border-color: #d08700; background: rgba(208, 135, 0, 0.08); }
.obs-answer-status.ok { border-color: var(--border); }
.obs-answer-hits { margin-top: 8px; }
.obs-retrieval-status {
  display: flex; flex-direction: column; gap: 3px; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  font-size: 11px; color: var(--text-dim); margin-bottom: 8px;
}
.obs-retrieval-status strong { font-size: 12px; color: var(--text); }
.obs-retrieval-status.fallback { border-color: #d08700; background: rgba(208, 135, 0, 0.08); }
.obs-source { color: var(--text); }
.obs-fallback { color: #8a5700; font-weight: 600; }
.obs-tech-detail {
  margin: 8px 0; padding: 7px 9px; border: 1px dashed var(--border);
  border-radius: 8px; font-size: 11px; color: var(--text-dim); overflow-wrap: anywhere;
}
.obs-tech-detail summary { cursor: pointer; color: var(--text-dim); }
.obs-tech-detail div { margin-top: 6px; line-height: 1.5; }
.caliber-panel {
  padding: 18px; border-top: 1px solid var(--border);
}
.caliber-head { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.caliber-grid { display: flex; flex-direction: column; gap: 8px; }
.caliber-metric {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.caliber-num { font-size: 18px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.caliber-label { font-size: 11px; color: var(--text-dim); text-align: right; }
.caliber-meta { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.caliber-meta-row {
  display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim);
}

/* ── 主题码本视图（文档 5.4）：左树右详情 ── */
.codebook-body { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 16px; }
.cb-tree {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); padding: 8px; max-height: 460px; overflow-y: auto;
}
.cb-cat { margin-bottom: 4px; }
.cb-cat-head {
  width: 100%; display: flex; align-items: center; gap: 6px; text-align: left;
  padding: 6px 8px; background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text); border-radius: 7px;
}
.cb-cat-head:hover { background: var(--accent-soft); }
.cb-caret { font-size: 10px; color: var(--text-dim); width: 12px; }
.cb-cat-label { flex: 1; }
.cb-cat-count {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: var(--panel-2); color: var(--text-dim);
}
.cb-children { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px 18px; }
.cb-node {
  display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 6px 8px; background: transparent; border: 1px solid transparent;
  cursor: pointer; font-family: inherit; font-size: 12px; color: var(--text); border-radius: 7px;
}
.cb-node:hover { background: var(--accent-soft); }
.cb-node.active { background: var(--accent-soft); border-color: var(--accent); }
.cb-node-kind {
  flex-shrink: 0; font-size: 10px; padding: 1px 6px; border-radius: 5px;
  background: var(--panel-2); color: var(--text-dim);
}
.cb-node-kind.theme { background: var(--accent); color: #fff; }
.cb-node-label { flex: 1; line-height: 1.4; }

.cb-detail {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); padding: 16px; min-height: 120px;
}
.cb-detail-empty, .cb-evidence-empty {
  color: var(--text-dim); font-size: 13px; padding: 8px 0; line-height: 1.7;
}
.cb-detail-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.cb-detail-metrics { display: flex; gap: 8px; margin-bottom: 12px; }
.cb-metric {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 10px;
  border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--border);
}
.cb-metric-label { font-size: 11px; color: var(--text-dim); }
.cb-metric-num { font-size: 13px; font-weight: 700; color: var(--accent); }
.cb-detail-summary { font-size: 13px; color: var(--text); line-height: 1.7; margin-bottom: 12px; }
.cb-detail-summary.muted { color: var(--text-dim); }
.cb-detail-section-title {
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  margin: 12px 0 8px; display: flex; align-items: center; gap: 8px;
}
.cb-evidence-list { display: flex; flex-direction: column; gap: 8px; }
.cb-related-card {
  font-size: 13px; padding: 8px 12px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Case 受访者视图（文档 5.6） ── */
.case-list { display: flex; flex-direction: column; gap: 8px; }
.case-list.is-loading { opacity: 0.55; }
.case-row {
  width: 100%; text-align: left; padding: 12px 14px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.15s; font-family: inherit;
}
.case-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.case-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.case-row-user { font-size: 13px; font-weight: 600; color: var(--text); }
.case-row-nums { font-size: 12px; color: var(--text-dim); }
.case-row-codes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.case-loading, .case-empty, .case-error {
  padding: 24px 12px; text-align: center; font-size: 13px; color: var(--text-dim);
}
.case-error { color: #c0392b; }
.case-loading { display: flex; align-items: center; justify-content: center; gap: 8px; }
.case-back { display: inline-flex; width: auto; flex: none; margin-bottom: 12px; }
.case-detail-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.case-attrs, .case-codes, .case-cards { display: flex; flex-wrap: wrap; gap: 6px; }
.case-cards { flex-direction: column; }

/* ── 质量审计面板（文档要求） ── */
.quality-panel { display: flex; flex-direction: column; }
.qa-summary { display: flex; gap: 8px; margin-bottom: 14px; }
.qa-summary-item {
  font-size: 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
}
.qa-summary-item.pass { border-color: var(--accent); color: var(--accent); }
.qa-summary-item.fail { border-color: var(--red); color: var(--red); }
.qa-list { display: flex; flex-direction: column; gap: 8px; }
.qa-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--border); border-radius: var(--radius);
}
.qa-item.pass { border-left-color: var(--accent); }
.qa-item.warn { border-left-color: var(--amber); }
.qa-item.fail { border-left-color: var(--red); }
.qa-badge {
  flex-shrink: 0; font-size: 11px; padding: 2px 9px; border-radius: 6px; font-weight: 600;
  background: var(--panel-2); color: var(--text-dim);
}
.qa-badge.pass { background: var(--accent); color: #fff; }
.qa-badge.warn { background: var(--amber); color: #fff; }
.qa-badge.fail { background: var(--red); color: #fff; }
.qa-item-main { flex: 1; }
.qa-item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.qa-item-note { font-size: 12px; color: var(--text-dim); line-height: 1.6; margin-top: 4px; }

/* ── 结构化报告版式（result_report_sections.js）─────────────────────── */
.report-struct { display: flex; flex-direction: column; gap: 20px; }
.rs-section-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 10px; letter-spacing: 0.2px;
}
.rs-overview {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 14px;
}
.rs-overview-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.rs-overview-lead { font-size: 14px; line-height: 1.8; color: var(--text); margin: 0; }
.rs-overview-caliber {
  margin-top: 8px; font-size: 12px; color: var(--text-dim);
}
/* 执行摘要的证据基础行（report_design/08 §3.3）：措辞是"综合以下主题的证据"，
   表达证据基础而非逐句归因，所以排在摘要之后、样本口径之前。 */
.rs-overview-refs {
  margin-top: 8px; display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; font-size: 12px;
}
.rs-overview-refs-note { color: var(--text-dim); }
/* 关键发现每条可带「推测」标签与证据回链按钮，需与文本基线对齐。 */
.rs-findings-list li { line-height: 1.9; }
.rs-table-wrap { overflow-x: auto; }
.rs-caliber-note {
  font-size: 12px; line-height: 1.7; color: var(--text-dim);
  background: var(--bg-soft, rgba(127, 127, 127, 0.06));
  border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 10px; margin-bottom: 8px;
}
.rs-caliber-tag {
  display: inline-block; font-weight: 700; color: var(--accent);
  margin-right: 6px; padding: 0 6px; border-radius: 4px;
  background: rgba(64, 128, 255, 0.1); font-size: 11px;
}
/* 金额口径风险提示（方案②，深度报告版块）：显著加粗、暖色底。 */
.rs-numeric-risk {
  font-size: 13px; line-height: 1.75; color: var(--amber, #b8860b);
  background: rgba(230, 162, 60, 0.12);
  border: 1px solid var(--amber, #e6a23c); border-radius: 6px;
  padding: 9px 12px; margin-bottom: 10px;
}
.rs-numeric-risk strong { color: inherit; }
.rs-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.rs-table th, .rs-table td {
  padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.rs-table thead th {
  background: var(--panel-2); font-weight: 600; color: var(--text-dim);
  font-size: 12px; white-space: nowrap;
}
.rs-table tbody tr:last-child td { border-bottom: none; }
.rs-table td.ta-right, .rs-table th.ta-right { text-align: right; white-space: nowrap; }
.rs-bar {
  display: inline-block; height: 6px; margin-left: 6px; border-radius: 3px;
  background: var(--accent); opacity: 0.35; vertical-align: middle;
}
.rs-evlink {
  border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  font-size: 11px; color: var(--text-dim); padding: 2px 8px; border-radius: 6px;
}
.rs-evlink:hover { border-color: var(--accent); color: var(--text); }
.rs-detail { display: flex; flex-direction: column; gap: 12px; }
.rs-detail-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  background: var(--panel);
}
.rs-detail-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.rs-detail-heading { font-size: 14px; font-weight: 600; color: var(--text); }
.rs-detail-body {
  margin-top: 6px; font-size: 13px; line-height: 1.8; color: var(--text);
}
.rs-findings-list { margin: 0; padding-left: 20px; }
.rs-findings-list li { font-size: 14px; line-height: 1.9; color: var(--text); }
/* P0-1 决策层：可执行建议 */
.rs-reco-list { margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px; }
.rs-reco-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  background: var(--panel); font-size: 14px; line-height: 1.8; color: var(--text);
}
.rs-reco-kind {
  display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px;
  padding: 0 6px; margin-right: 8px; color: #fff; background: var(--accent);
  vertical-align: middle;
}
.rs-reco-statement { font-weight: 600; }
.rs-reco-because {
  margin-top: 4px; font-size: 12px; line-height: 1.7; color: var(--text-dim);
}
.rs-methodology {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px;
  background: var(--panel-2);
}
.rs-methodology summary { cursor: pointer; margin-bottom: 0; }
.rs-methodology[open] summary { margin-bottom: 8px; }
.rs-methodology-list { margin: 0; padding-left: 20px; }
.rs-methodology-list li {
  font-size: 12px; line-height: 1.8; color: var(--text-dim);
}
.rs-stories-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.rs-story-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  background: var(--panel);
}
.rs-story-head { font-size: 13px; line-height: 1.6; margin-bottom: 6px; }
.rs-story-code { font-weight: 700; color: var(--text); }
.rs-story-name { font-weight: 600; }
.rs-story-age { color: var(--text-dim); margin-left: 2px; }
.rs-story-dash { color: var(--text-dim); }
.rs-story-quote {
  margin: 6px 0 0; padding: 6px 0 6px 12px; border-left: 3px solid var(--border);
  font-size: 13px; line-height: 1.8; color: var(--text); font-style: normal;
}

/* ── P1 新增呈现组件（result_report_sections.js）───────────────────── */
/* 通用标签：近似 / 数据支撑 / 推测 / 明示 */
.rs-approx-tag, .rs-stat-tag, .rs-inferred-tag, .rs-approx-mini {
  display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px;
  padding: 0 6px; margin-left: 6px; vertical-align: middle;
}
.rs-approx-tag { color: var(--accent); background: var(--accent-soft); }
.rs-stat-tag { color: #fff; background: var(--accent); }
.rs-inferred-tag { color: #fff; background: var(--amber); }
.rs-approx-mini {
  font-size: 10px; color: var(--text-dim); background: var(--panel-2);
  font-weight: 600;
}
/* 机会矩阵四象限 */
.rs-oppo { display: flex; flex-direction: column; gap: 10px; }
.rs-oppo-approx {
  font-size: 12px; line-height: 1.7; color: var(--text-dim);
  background: var(--bg-soft, rgba(127, 127, 127, 0.06));
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px;
}
.rs-oppo-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.rs-oppo-cell {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  background: var(--panel); min-height: 80px;
}
.rs-oppo-high_need_low_satisfaction { border-color: var(--accent); }
.rs-oppo-cell-title {
  font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px;
}
.rs-oppo-item {
  border-top: 1px solid var(--border); padding: 6px 0;
}
.rs-oppo-item:first-of-type { border-top: none; }
.rs-oppo-item-head { display: flex; align-items: center; }
.rs-oppo-item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.rs-oppo-item-metrics { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.rs-oppo-item-sum { font-size: 12px; line-height: 1.7; color: var(--text); margin-top: 4px; }
/* fun_fact 反差卡 */
.rs-funfact { display: flex; flex-direction: column; gap: 10px; }
.rs-funfact-note {
  font-size: 12px; line-height: 1.7; color: var(--text-dim);
  background: var(--bg-soft, rgba(127, 127, 127, 0.06));
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px;
}
.rs-funfact-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;
}
.rs-funfact-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  background: var(--panel);
}
.rs-funfact-fact { font-size: 13px; font-weight: 600; line-height: 1.7; color: var(--text); }
.rs-funfact-basis { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.rs-funfact-why { font-size: 12px; line-height: 1.7; color: var(--text); margin-top: 4px; }
/* 场景动线时间线 */
.rs-sceneflow { display: flex; flex-direction: column; gap: 12px; }
.rs-scene-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  background: var(--panel);
}
.rs-scene-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.rs-scene-name { font-size: 14px; font-weight: 700; color: var(--text); }
.rs-scene-meta { font-size: 12px; color: var(--text-dim); }
.rs-scene-timeline { display: flex; gap: 10px; flex-wrap: wrap; }
.rs-scene-stage {
  flex: 1; min-width: 160px; border-left: 3px solid var(--border);
  padding: 4px 0 4px 10px;
}
.rs-scene-stage-label { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.rs-scene-need { font-size: 13px; line-height: 1.7; color: var(--text); margin-top: 4px; }
.rs-scene-quote {
  margin: 6px 0 0; padding: 4px 0 4px 10px; border-left: 2px solid var(--border);
  font-size: 12px; line-height: 1.7; color: var(--text); font-style: normal;
}
/* 证据卡 */
.rs-evcards { display: flex; flex-direction: column; gap: 10px; }
.rs-evcards-criteria, .rs-evcards-fieldsnote {
  font-size: 12px; line-height: 1.7; color: var(--text-dim);
  background: var(--bg-soft, rgba(127, 127, 127, 0.06));
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px;
}
.rs-evcards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}
.rs-evcard {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  background: var(--panel);
}
.rs-evcard-meta { font-size: 11px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 8px; }
.rs-evcard-user { font-weight: 700; color: var(--text); }
.rs-evcard-quote {
  margin: 8px 0 0; padding: 4px 0 4px 10px; border-left: 2px solid var(--border);
  font-size: 13px; line-height: 1.8; color: var(--text); font-style: normal;
}
.rs-evcard-match { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
/* 张力对比 */
.rs-contrast { display: flex; flex-direction: column; gap: 10px; }
/* 中间列用 minmax 夹住：LLM 有时把整段话写进 tension，若留 auto 会把两侧 1fr
   挤成一字宽导致文字竖排。两侧同时给 min-width:0 防溢出。 */
.rs-contrast-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(48px, 22%) minmax(0, 1fr);
  gap: 10px; align-items: center;
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  background: var(--panel);
}
.rs-contrast-side { min-width: 0; overflow-wrap: anywhere; }
.rs-contrast-label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.rs-contrast-desc { font-size: 12px; line-height: 1.7; color: var(--text); }
.rs-contrast-tension {
  font-size: 11px; color: var(--text-dim); text-align: center; padding: 0 8px;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  min-width: 0; overflow-wrap: anywhere; line-height: 1.5;
}
@media (max-width: 720px) {
  .rs-contrast-pair { grid-template-columns: minmax(0, 1fr); }
  .rs-contrast-tension {
    border-left: none; border-right: none; padding: 6px 0;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  }
}
