.result-panel {
  border-top: 1px solid var(--border, #e2e8f0);
  padding-top: 8px;
  margin-top: 8px;
}

.result-panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cmp-ui-gap-sm, 6px);
  margin-bottom: 8px;
  flex-wrap: nowrap;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted, #64748b);
}

.result-panel__bar > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-panel__bar button {
  padding: 5px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
}

.result-panel__bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.result-panel__export:disabled,
.result-panel__rerun:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.result-panel .tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.result-panel .tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted, #64748b);
  cursor: pointer;
}

.result-panel .tab.is-active {
  background: #e2e8f0;
}

.result-panel .tab[data-kind='divergence'].is-active {
  color: #ea580c;
  background: #ffedd5;
}

.result-panel .tab[data-kind='agreement'].is-active {
  color: #059669;
  background: #d1fae5;
}

.result-panel .tab[data-kind='audit'].is-active {
  color: #7c3aed;
  background: #ede9fe;
}

.result-panel .claim-list {
  list-style: none;
  margin: 0;
  padding: 0;
  /* 纵向滚动由外层 .turn-card__body 统一承担 */
}

.result-panel .claim-card {
  position: relative;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  overflow: hidden;
}

.result-panel .claim-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 8px 0 0 8px;
}

.result-panel .claim-card[data-kind='divergence']::before {
  background: #ea580c;
}

.result-panel .claim-card[data-kind='agreement']::before {
  background: #059669;
}

.result-panel .claim-card[data-kind='agreement'][data-consensus-tier='strong']::before {
  background: #065f46;
}

.result-panel .claim-card[data-kind='agreement'][data-consensus-tier='high']::before {
  background: #059669;
}

.result-panel .claim-card[data-kind='agreement'][data-consensus-tier='mid']::before {
  background: #0d9488;
}

.result-panel .claim-card[data-kind='agreement'][data-consensus-tier='weak']::before {
  background: #64748b;
}

.result-panel .claim-card[data-kind='agreement'][data-consensus-tier='below']::before {
  background: #94a3b8;
}

.result-panel .claim-card[data-kind='audit']::before {
  background: #7c3aed;
}

.result-panel .claim-card__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 10px 10px 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.result-panel .claim-card__head-main {
  flex: 1;
  min-width: 0;
}

.result-panel .claim-card__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.45;
}

.result-panel .claim-card__title-text {
  display: block;
  word-break: break-word;
}

.result-panel .claim-card__summary {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text, #0f172a);
  line-height: 1.5;
  word-break: break-word;
}

/* 模型名加粗；颜色与上方分类 Tab 激活态一致（关键分歧=橙、共同结论=绿、需核查=紫） */
.result-panel .claim-card__model-name {
  font-weight: 700;
  color: inherit;
}

.result-panel .claim-card[data-kind='divergence'] .claim-card__model-name {
  color: #ea580c;
}

.result-panel .claim-card[data-kind='agreement'] .claim-card__model-name {
  color: #059669;
}

.result-panel .claim-card[data-kind='audit'] .claim-card__model-name {
  color: #7c3aed;
}

/* 弱化观点整段为灰，模型名不再单独套分类色 */
.result-panel .claim-card .viewpoint-chip--muted .viewpoint-chip__text .claim-card__model-name {
  color: inherit;
}

.result-panel .claim-card__chevron {
  font-size: 13px;
  color: var(--muted, #64748b);
  transition: transform 0.2s;
}

.result-panel .claim-card.is-expanded .claim-card__chevron {
  transform: rotate(180deg);
}

.result-panel .claim-card__expand {
  display: none;
  padding: 0 10px 10px 14px;
  border-top: 1px dashed var(--border, #e2e8f0);
  background: #fafbfc;
}

.result-panel .claim-card.is-expanded .claim-card__expand {
  display: block;
}

.result-panel .claim-card__viewpoints {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
}

.result-panel .viewpoint-chip {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  width: 100%;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.result-panel .viewpoint-chip--muted {
  opacity: 0.78;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.result-panel .viewpoint-chip--muted .viewpoint-chip__who,
.result-panel .viewpoint-chip--muted .viewpoint-chip__text {
  color: #94a3b8;
}

.result-panel .viewpoint-chip.is-active.viewpoint-chip--muted {
  opacity: 1;
}

.result-panel .viewpoint-chip.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.result-panel .viewpoint-chip__who {
  flex-shrink: 0;
  min-width: 58px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
}

.result-panel .viewpoint-chip__text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text, #0f172a);
  word-break: break-word;
}

.result-panel .claim-list__empty {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted, #64748b);
}

.result-panel__skeleton {
  padding: 16px 8px;
}

.result-panel__skeleton-line {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: rp-shimmer 1.2s infinite;
  margin-bottom: 8px;
}

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

/* 比对阶段：伪进度 + 斜纹波浪（与填充宽度解耦，running 时持续蠕动） */
.cmp-compare-prog {
  padding: 8px 4px 4px;
}

.cmp-compare-prog__label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.35;
}

.cmp-compare-prog__sec {
  font-weight: 500;
  color: var(--muted, #64748b);
}

.cmp-compare-prog__track {
  height: 8px;
  border-radius: 6px;
  background: #e2e8f0;
  overflow: hidden;
}

.cmp-compare-prog__fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  transition: width 0.2s ease-out;
  background-color: #818cf8;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0) 6px,
    rgba(255, 255, 255, 0.22) 6px,
    rgba(255, 255, 255, 0.22) 12px
  );
  background-size: 24px 24px;
  animation: cmp-prog-stripes 0.9s linear infinite;
}

.cmp-compare-prog__fill--complete {
  animation: cmp-prog-stripes 0.9s linear infinite;
  background-color: #6366f1;
}

@keyframes cmp-prog-stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 24px 0;
  }
}

.result-panel__stream-banner {
  font-size: 14px;
  line-height: 1.5;
  color: #0f172a;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.result-panel__rerun--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 导出图片：生成完成后的复制/下载选择弹框 */
.cmp-export-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.cmp-export-modal.hidden {
  display: none;
}

.cmp-export-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.cmp-export-modal__panel {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 6vh auto;
  background: #fff;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.12);
}

.cmp-export-modal__title {
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
}

.cmp-export-modal__hint {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.cmp-export-modal__preview-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  max-height: 220px;
  overflow: auto;
}

.cmp-export-modal__preview {
  display: block;
  width: 100%;
  height: auto;
}

.cmp-export-modal__actions {
  display: flex;
  gap: 8px;
}

.cmp-export-modal__btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  color: #0f172a;
}

.cmp-export-modal__btn:hover {
  background: #f8fafc;
}

.cmp-export-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cmp-export-modal__btn--primary {
  border-color: #6366f1;
  background: #6366f1;
  color: #fff;
}

.cmp-export-modal__btn--primary:hover {
  background: #4f46e5;
}

.cmp-export-modal__close {
  align-self: center;
  padding: 4px 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
}

.cmp-export-modal__close:hover {
  color: #0f172a;
}
