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

:root {
  --asci-bg: #f8f9fc;
  --asci-surface: #ffffff;
  --asci-surface2: #f1f3f8;
  --asci-log-bg: #fafbfe;
  --asci-border: rgba(0, 0, 0, 0.08);
  --asci-border2: rgba(0, 0, 0, 0.15);
  --asci-blue: #2563eb;
  --asci-blue-dim: rgba(37, 99, 235, 0.08);
  --asci-green: #059669;
  --asci-yellow: #d97706;
  --asci-red: #dc2626;
  --asci-text: #1e293b;
  --asci-text-dim: #64748b;
  --asci-text-muted: #94a3b8;
  --asci-radius: 12px;
  --asci-radius-sm: 6px;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--asci-bg);
  color: var(--asci-text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px
}

/* ---- SCREENS ---- */
.asci-screen {
  height: 100vh;
  display: flex;
  flex-direction: column
}

.hidden {
  display: none !important
}

/* ---- SCREEN 1 ---- */
.s1-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 32px
}

.s1-title {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2
}

.s1-title span {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.s1-sub {
  color: var(--asci-text-dim);
  text-align: center;
  font-size: 15px
}

/* ---- SCREEN 1: PIPELINE CONFIGURATOR ---- */
.s1-configurator {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 900px;
  align-items: flex-start
}

.s1-node-grid-wrap {
  flex: 1;
  min-width: 0;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px
}

.s1-node-grid-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px
}

.s1-node-category {
  margin-bottom: 12px
}

.s1-node-category-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px
}

.s1-node-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.s1-node-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--asci-border2);
  background: var(--asci-surface);
  color: var(--asci-text-dim);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none
}

.s1-node-chip:hover {
  border-color: var(--asci-blue);
  color: var(--asci-text)
}

.s1-node-chip.selected {
  background: var(--asci-blue-dim);
  border-color: var(--asci-blue);
  color: var(--asci-blue)
}

.s1-node-chip.disabled-node {
  opacity: .4;
  cursor: default;
  pointer-events: none
}

.s1-pipeline-wrap {
  width: 220px;
  flex-shrink: 0
}

.s1-pipeline-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px
}

.s1-pipeline-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 60px;
  margin-bottom: 12px
}

.s1-pipeline-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--asci-surface);
  border: 1px solid var(--asci-border2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--asci-text)
}

.s1-pipeline-item .pipe-icon {
  font-size: 14px;
  flex-shrink: 0
}

.s1-pipeline-item .pipe-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.s1-pipeline-item .pipe-arrow {
  display: flex;
  flex-direction: column;
  gap: 1px
}

.pipe-move-btn {
  background: none;
  border: none;
  color: var(--asci-text-muted);
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
  transition: color .15s, background .15s
}

.pipe-move-btn:hover {
  color: var(--asci-text);
  background: var(--asci-surface2)
}

.s1-pipeline-arrow {
  text-align: center;
  font-size: 11px;
  color: var(--asci-text-muted);
  padding: 1px 0
}

.s1-pipeline-empty {
  font-size: 12px;
  color: var(--asci-text-muted);
  padding: 12px;
  text-align: center;
  border: 1px dashed var(--asci-border2);
  border-radius: 8px
}

.s1-templates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px
}

.s1-template-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border2);
  color: var(--asci-text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, color .15s, background .15s
}

.s1-template-btn:hover,
.s1-template-btn.active {
  border-color: var(--asci-blue);
  color: var(--asci-blue);
  background: var(--asci-blue-dim)
}

.s1-template-badge {
  font-size: 10px;
  font-weight: 400;
  color: var(--asci-text-muted);
  margin-left: 4px
}

.s1-start-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: var(--asci-blue);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s
}

.s1-start-btn:hover {
  opacity: .88
}

.s1-start-btn:disabled {
  opacity: .4;
  cursor: default
}

/* ---- LEGACY CARD STYLES (保留兼容) ---- */
.s1-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 860px;
  width: 100%
}

.s1-card {
  flex: 1;
  min-width: 220px;
  max-width: 260px;
  background: var(--asci-surface);
  border: 1px solid var(--asci-border);
  border-radius: var(--asci-radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  position: relative;
  overflow: hidden
}

.s1-card:hover {
  border-color: var(--asci-border2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1)
}

.s1-card.disabled {
  opacity: .45;
  cursor: default;
  pointer-events: none
}

.s1-card-icon {
  font-size: 32px;
  margin-bottom: 12px
}

.s1-card-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px
}

.s1-card-desc {
  color: var(--asci-text-dim);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 14px
}

.s1-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

.s1-card-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.2)
}

.s1-card-risk {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 8px;
  display: inline-block
}

.risk-low {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25)
}

.risk-medium {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25)
}

.risk-high {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25)
}

.s1-card-coming {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--asci-text-muted);
  border: 1px solid rgba(148, 163, 184, 0.15)
}

.s1-card-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 8px;
  border-radius: var(--asci-radius-sm);
  background: var(--asci-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: opacity .15s
}

.s1-card-btn:hover {
  opacity: .88
}

/* ---- TOPBAR (Screen 2) ---- */
.asci-topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--asci-surface);
  border-bottom: 1px solid var(--asci-border);
  flex-shrink: 0;
  gap: 12px
}

.asci-topbar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--asci-text)
}

.asci-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 99px
}

.asci-badge-running {
  background: rgba(37, 99, 235, 0.1);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.25)
}

.asci-badge-done {
  background: rgba(5, 150, 105, 0.1);
  color: var(--asci-green);
  border: 1px solid rgba(5, 150, 105, 0.25)
}

/* ---- EXECUTION LAYOUT ---- */
.asci-execution {
  flex: 1;
  display: grid;
  grid-template-columns: 200px 1fr 240px;
  grid-template-rows: 1fr auto;
  overflow: hidden
}

/* ---- LEFT: TREE ---- */
.asci-tree {
  overflow-y: auto;
  border-right: 1px solid var(--asci-border);
  padding: 12px 8px;
  background: var(--asci-surface)
}

.tree-step {
  border-radius: 8px;
  margin-bottom: 4px;
  overflow: hidden
}

.tree-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer
}

.tree-step.active .tree-step-header {
  background: var(--asci-blue-dim)
}

.tree-step-icon {
  font-size: 14px;
  flex-shrink: 0
}

.tree-step-name {
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.tree-step-risk {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 99px;
  flex-shrink: 0
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0
}

.status-dot.pending {
  background: #cbd5e1
}

.status-dot.running {
  background: var(--asci-blue);
  animation: pulse-dot 1s infinite
}

.status-dot.done {
  background: var(--asci-green)
}

.tree-subs {
  padding: 4px 10px 8px 32px
}

.tree-sub {
  font-size: 11px;
  color: var(--asci-text-dim);
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px
}

.tree-sub::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--asci-text-muted);
  flex-shrink: 0
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: .5;
    transform: scale(1.5)
  }
}

/* ---- CENTER: LOG ---- */
.asci-log-wrap {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--asci-log-bg)
}

.log-header {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--asci-border);
  flex-shrink: 0
}

.asci-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 12px;
  line-height: 1.7
}

.log-line {
  animation: log-in .2s ease forwards;
  white-space: pre-wrap;
  word-break: break-all
}

.log-ts {
  color: var(--asci-text-muted);
  margin-right: 6px
}

.log-lvl {
  font-weight: 700;
  margin-right: 8px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 11px
}

.log-lvl-info {
  color: var(--asci-blue);
  background: rgba(37, 99, 235, 0.08)
}

.log-lvl-warn {
  color: var(--asci-yellow);
  background: rgba(217, 119, 6, 0.1)
}

.log-lvl-error {
  color: var(--asci-red);
  background: rgba(220, 38, 38, 0.08)
}

@keyframes log-in {
  from {
    opacity: 0;
    transform: translateY(3px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ---- RIGHT: PANEL ---- */
.asci-panel {
  overflow-y: auto;
  border-left: 1px solid var(--asci-border);
  padding: 16px;
  background: var(--asci-surface);
  display: flex;
  flex-direction: column;
  gap: 20px
}

.panel-section {}

.panel-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px
}

.confidence-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px
}

.confidence-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--asci-blue) calc(var(--pct, 0) * 1%), #e2e8f0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0
}

.confidence-ring::after {
  content: '';
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--asci-surface)
}

.conf-num {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 800;
  color: var(--asci-blue)
}

.conf-trend {
  font-size: 11px;
  color: var(--asci-text-dim);
  line-height: 1.4
}

.progress-bar-wrap {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--asci-blue), #7c3aed);
  border-radius: 99px;
  transition: width .4s ease
}

.progress-text {
  font-size: 11px;
  color: var(--asci-text-dim)
}

.step-card {
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border);
  border-radius: 8px;
  padding: 12px
}

.step-card-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px
}

.step-card-risk {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 8px
}

.step-card-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}

.step-card-tool {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.2)
}

.step-card-empty {
  color: var(--asci-text-muted);
  font-size: 12px
}

/* ---- CONTROLS ---- */
.asci-controls {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--asci-border);
  background: var(--asci-surface);
  flex-shrink: 0
}

.asci-btn-next {
  padding: 9px 22px;
  border-radius: 8px;
  background: var(--asci-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: opacity .15s, background .15s
}

.asci-btn-next:hover:not(:disabled) {
  opacity: .88
}

.asci-btn-next:disabled {
  opacity: .4;
  cursor: default
}

.asci-btn-next.checkpoint-mode {
  background: linear-gradient(135deg, #059669, #047857)
}

.ctrl-progress {
  font-size: 12px;
  color: var(--asci-text-dim)
}

/* ---- SCREEN 3 ---- */
.s3-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 28px
}

.s3-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px
}

.s3-title-main {
  font-size: 20px;
  font-weight: 800
}

.s3-badge-done {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--asci-green);
  border: 1px solid rgba(5, 150, 105, 0.25)
}

.s3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px
}

.s3-full {
  grid-column: 1/-1
}

.s3-card {
  background: var(--asci-surface);
  border: 1px solid var(--asci-border);
  border-radius: var(--asci-radius);
  padding: 20px
}

.s3-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 12px
}

.s3-abstract {
  font-size: 13px;
  color: var(--asci-text);
  line-height: 1.8
}

.s3-findings {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.s3-finding {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--asci-text);
  line-height: 1.6
}

.s3-finding-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid rgba(37, 99, 235, 0.2)
}

.s3-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px
}

.s3-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--asci-border)
}

.s3-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--asci-text)
}

.s3-table tr:last-child td {
  border-bottom: none
}

.s3-score {
  font-weight: 700;
  color: var(--asci-blue)
}

.s3-table-footer {
  margin-top: 8px;
  font-size: 11px;
  color: var(--asci-text-dim);
  font-style: italic
}

.cred-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.cred-bar-item {}

.cred-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px
}

.cred-bar-name {
  font-size: 12px;
  font-weight: 600
}

.cred-bar-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--asci-blue)
}

.cred-bar-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px
}

.cred-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--asci-blue), #7c3aed)
}

.cred-bar-note {
  font-size: 11px;
  color: var(--asci-text-dim);
  line-height: 1.4
}

.cred-summary {
  margin-top: 14px;
  padding: 12px;
  background: var(--asci-surface2);
  border-radius: 8px;
  border: 1px solid var(--asci-border);
  font-size: 12px;
  color: var(--asci-text-dim);
  line-height: 1.6
}

.cred-summary strong {
  color: var(--asci-text)
}

.s3-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  padding-bottom: 20px
}

.s3-btn-accept {
  padding: 10px 24px;
  border-radius: 8px;
  background: var(--asci-green);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: opacity .15s
}

.s3-btn-accept:hover {
  opacity: .88
}

.s3-btn-restart {
  padding: 10px 24px;
  border-radius: 8px;
  background: transparent;
  color: var(--asci-text-dim);
  border: 1px solid var(--asci-border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s, color .15s
}

.s3-btn-restart:hover {
  border-color: var(--asci-border2);
  color: var(--asci-text)
}

/* ---- TOAST ---- */
.asci-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--asci-surface);
  border: 1px solid var(--asci-green);
  color: var(--asci-green);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  animation: toast-in .25s ease
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
  }
}

/* ---- TOPIC INPUT ---- */
.s1-topic-wrap {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.s1-topic-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em
}

.s1-topic-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--asci-surface);
  border: 1px solid var(--asci-border2);
  color: var(--asci-text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s
}

.s1-topic-input:focus {
  border-color: var(--asci-blue)
}

.s1-topic-hint {
  font-size: 11px;
  color: var(--asci-text-muted)
}

/* ---- PAPER MODAL ---- */
.paper-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in .15s ease
}

@keyframes fade-in {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.paper-modal {
  background: var(--asci-surface);
  border: 1px solid var(--asci-border2);
  border-radius: var(--asci-radius);
  padding: 24px;
  max-width: 520px;
  width: 90%;
  position: relative;
  animation: modal-in .15s ease;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15)
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(-8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.paper-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--asci-text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1
}

.paper-modal-close:hover {
  color: var(--asci-text)
}

.paper-modal-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  padding-right: 24px;
  line-height: 1.4
}

.paper-modal-meta {
  font-size: 11px;
  color: var(--asci-text-muted);
  margin-bottom: 14px
}

.paper-modal-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 14px
}

.paper-modal-abstract {
  font-size: 12px;
  color: var(--asci-text-dim);
  line-height: 1.8;
  border-top: 1px solid var(--asci-border);
  padding-top: 12px
}

.paper-modal-abstract strong {
  color: var(--asci-text)
}

.paper-modal-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--asci-border)
}

.paper-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--asci-blue);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 6px;
  transition: background .15s, border-color .15s
}

.paper-modal-link:hover {
  background: var(--asci-blue-dim);
  border-color: var(--asci-blue)
}

.s3-export-btn {
  margin-left: 8px;
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 6px;
  background: transparent;
  color: var(--asci-blue);
  cursor: pointer;
  transition: background .15s
}

.s3-export-btn:hover {
  background: var(--asci-blue-dim)
}

.cp-paper {
  cursor: pointer;
  transition: background .15s, border-color .15s
}

.cp-paper:hover {
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.25)
}

.cp-paper-hint {
  float: right;
  font-size: 10px;
  color: var(--asci-blue);
  opacity: .7
}

.s3-paper-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dashed rgba(37, 99, 235, 0.4);
  transition: border-color .15s, color .15s
}

.s3-paper-link:hover {
  color: var(--asci-blue);
  border-color: var(--asci-blue)
}

/* ---- 降级策略 ---- */
.log-degrade-banner {
  margin: 6px 0;
  padding: 8px 14px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 6px;
  color: var(--asci-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em
}

.degrade-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--asci-border)
}

.degrade-icon {
  font-size: 22px;
  margin-bottom: 6px
}

.degrade-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--asci-red);
  margin-bottom: 4px
}

.degrade-desc {
  font-size: 11px;
  color: var(--asci-text-muted);
  line-height: 1.5
}

.degrade-reason {
  padding: 12px 16px;
  border-bottom: 1px solid var(--asci-border)
}

.degrade-reason-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px
}

.degrade-reason-text {
  font-size: 11px;
  color: var(--asci-text-dim);
  line-height: 1.6
}

.degrade-options {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.degrade-btn {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--asci-border2);
  background: var(--asci-surface);
  cursor: pointer;
  transition: background .15s, border-color .15s
}

.degrade-btn:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: var(--asci-blue-dim)
}

.degrade-btn-b:hover {
  border-color: rgba(124, 58, 237, 0.4)
}

.degrade-btn-c:hover {
  border-color: rgba(217, 119, 6, 0.4)
}

.degrade-btn-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--asci-text);
  margin-bottom: 2px
}

.degrade-btn-desc {
  font-size: 10px;
  color: var(--asci-text-muted)
}

.draft-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--asci-border)
}

.draft-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--asci-text);
  margin-bottom: 4px
}

.draft-desc {
  font-size: 11px;
  color: var(--asci-text-muted);
  line-height: 1.5
}

.draft-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0;
  padding: 10px 12px;
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border2);
  border-radius: 6px;
  color: var(--asci-text);
  font-size: 11px;
  line-height: 1.7;
  font-family: inherit;
  resize: vertical;
  min-height: 160px;
  max-height: 260px
}

.draft-submit-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 9px;
  background: var(--asci-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s
}

.draft-submit-btn:hover {
  opacity: .85
}

.degrade-demo-btn {
  font-size: 11px;
  padding: 5px 12px;
  border: 1px dashed rgba(217, 119, 6, 0.5);
  border-radius: 6px;
  background: transparent;
  color: rgba(217, 119, 6, 0.8);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap
}

.degrade-demo-btn:hover {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.8)
}

.human-edited-badge {
  display: inline-block;
  margin-left: 10px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
  font-weight: 600;
  vertical-align: middle
}

/* ---- STEP RESULT CARD ---- */
.step-result-card {
  margin: 14px 0 4px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.03);
  overflow: hidden;
  font-family: system-ui, sans-serif
}

.src-header {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-blue);
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.src-body {
  padding: 12px 14px
}

.src-hint {
  font-size: 11px;
  color: var(--asci-text-muted);
  margin-top: 10px;
  font-style: italic
}

/* ---- KEYWORD TAGS ---- */
.kw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px
}

.kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
  cursor: default
}

.kw-tag-mesh {
  font-size: 10px;
  color: var(--asci-text-muted);
  margin-left: 2px
}

.kw-tag-del {
  background: none;
  border: none;
  color: var(--asci-text-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 0 0 2px;
  transition: color .15s
}

.kw-tag-del:hover {
  color: var(--asci-red)
}

.kw-add-row {
  display: flex;
  gap: 6px;
  margin-top: 8px
}

.kw-add-input {
  flex: 1;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border2);
  color: var(--asci-text);
  font-size: 12px;
  outline: none
}

.kw-add-input:focus {
  border-color: var(--asci-blue)
}

.kw-add-btn {
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--asci-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600
}

/* ---- SEARCH RESULT BARS ---- */
.search-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px
}

.search-bar-item {
  display: flex;
  align-items: center;
  gap: 8px
}

.search-bar-label {
  font-size: 11px;
  color: var(--asci-text-dim);
  width: 120px;
  flex-shrink: 0
}

.search-bar-track {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden
}

.search-bar-fill {
  height: 100%;
  border-radius: 99px
}

.search-bar-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--asci-text);
  width: 32px;
  text-align: right;
  flex-shrink: 0
}

.search-query-box {
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--asci-text-dim);
  font-family: 'Courier New', monospace;
  word-break: break-all;
  margin-bottom: 10px
}

.year-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px
}

.year-range-label {
  font-size: 11px;
  color: var(--asci-text-dim);
  flex-shrink: 0
}

.year-input {
  width: 60px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border2);
  color: var(--asci-text);
  font-size: 12px;
  text-align: center;
  outline: none
}

.year-input:focus {
  border-color: var(--asci-blue)
}

.re-search-btn {
  padding: 4px 12px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--asci-blue);
  color: var(--asci-blue);
  font-size: 11px;
  cursor: pointer;
  transition: background .15s
}

.re-search-btn:hover {
  background: var(--asci-blue-dim)
}

/* ---- SCREENING / BORDERLINE PAPERS ---- */
.threshold-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px
}

.threshold-label {
  font-size: 11px;
  color: var(--asci-text-dim);
  flex-shrink: 0
}

.threshold-slider {
  flex: 1;
  accent-color: var(--asci-blue)
}

.threshold-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--asci-blue);
  width: 36px;
  text-align: right;
  flex-shrink: 0
}

.included-count {
  font-size: 11px;
  color: var(--asci-green);
  margin-bottom: 10px
}

.borderline-list {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.bl-paper {
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  overflow: hidden
}

.bl-paper-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  background: var(--asci-surface2)
}

.bl-paper-top:hover {
  background: rgba(37, 99, 235, 0.05)
}

.bl-paper-title {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--asci-text)
}

.bl-paper-score {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
  flex-shrink: 0
}

.bl-paper-expand {
  font-size: 11px;
  color: var(--asci-text-muted)
}

.bl-paper-detail {
  padding: 0 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease, padding .25s
}

.bl-paper-detail.open {
  max-height: 200px;
  padding: 8px 10px
}

.bl-paper-abstract {
  font-size: 11px;
  color: var(--asci-text-dim);
  line-height: 1.7;
  margin-bottom: 8px
}

.bl-decision-row {
  display: flex;
  gap: 6px
}

.bl-btn {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: background .15s, color .15s
}

.bl-btn-include {
  color: var(--asci-green);
  border-color: rgba(5, 150, 105, 0.4);
  background: rgba(5, 150, 105, 0.06)
}

.bl-btn-include:hover,
.bl-btn-include.active {
  background: rgba(5, 150, 105, 0.15)
}

.bl-btn-maybe {
  color: var(--asci-yellow);
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(217, 119, 6, 0.06)
}

.bl-btn-maybe:hover,
.bl-btn-maybe.active {
  background: rgba(217, 119, 6, 0.15)
}

.bl-btn-exclude {
  color: var(--asci-red);
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.06)
}

.bl-btn-exclude:hover,
.bl-btn-exclude.active {
  background: rgba(220, 38, 38, 0.15)
}

.bl-paper.decided-include {
  border-color: rgba(5, 150, 105, 0.35)
}

.bl-paper.decided-maybe {
  border-color: rgba(217, 119, 6, 0.35)
}

.bl-paper.decided-exclude {
  border-color: rgba(220, 38, 38, 0.35);
  opacity: .6
}

.batch-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 10px
}

.batch-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--asci-border);
  background: var(--asci-surface2);
  color: var(--asci-text-dim);
  transition: background .15s, border-color .15s
}

.batch-btn:hover {
  background: var(--asci-blue-dim);
  border-color: var(--asci-blue);
  color: var(--asci-text)
}

/* ---- THRESHOLD EXPLANATION ---- */
.threshold-explain-toggle {
  font-size: 11px;
  color: var(--asci-blue);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 6px;
  user-select: none
}

.threshold-explain-box {
  margin: 6px 0 10px;
  padding: 8px 12px;
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--asci-text-dim);
  line-height: 1.6
}

/* ---- FULLTEXT BOUNDARY NOTICE ---- */
.fulltext-boundary-notice {
  margin-bottom: 10px;
  padding: 10px 14px;
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 8px;
  font-size: 11px;
  color: var(--asci-text-dim);
  line-height: 1.6
}

.fulltext-boundary-notice strong {
  color: var(--asci-yellow)
}

/* ---- DATA SOURCE SELECTOR ---- */
.datasource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px
}

.datasource-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--asci-border);
  border-radius: 8px;
  background: var(--asci-surface2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none
}

.datasource-item:hover {
  border-color: var(--asci-blue);
  background: var(--asci-blue-dim)
}

.datasource-item.selected {
  border-color: var(--asci-blue);
  background: var(--asci-blue-dim)
}

.datasource-checkbox {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid var(--asci-text-muted);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s
}

.datasource-item.selected .datasource-checkbox {
  border-color: var(--asci-blue);
  background: var(--asci-blue)
}

.datasource-check-mark {
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1
}

.datasource-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--asci-text)
}

.datasource-note {
  font-size: 10px;
  color: var(--asci-text-muted);
  margin-top: 1px
}

.datasource-recommend-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--asci-green);
  border: 1px solid rgba(5, 150, 105, 0.2);
  margin-left: 4px
}

/* ---- NONLINEAR ACTION BUTTONS ---- */
.nonlinear-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap
}

.nonlinear-btn {
  font-size: 11px;
  padding: 5px 12px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 6px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  cursor: pointer;
  font-weight: 600;
  transition: background .15s, border-color .15s
}

.nonlinear-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--asci-blue)
}

/* ---- CONTRADICTION CARD ---- */
.contradiction-card {
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.03);
  overflow: hidden;
  margin-bottom: 10px
}

.contradiction-header {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-red);
  border-bottom: 1px solid rgba(220, 38, 38, 0.15)
}

.contradiction-metric {
  font-size: 12px;
  color: var(--asci-text-dim);
  padding: 8px 12px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.08)
}

.contradiction-papers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0
}

.contra-paper {
  padding: 10px 12px;
  border-right: 1px solid rgba(220, 38, 38, 0.1)
}

.contra-paper:last-child {
  border-right: none
}

.contra-paper-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text);
  margin-bottom: 3px
}

.contra-paper-meta {
  font-size: 10px;
  color: var(--asci-text-muted);
  margin-bottom: 6px
}

.contra-paper-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--asci-red);
  margin-bottom: 3px
}

.contra-paper-method {
  font-size: 10px;
  color: var(--asci-text-dim);
  line-height: 1.4
}

.contradiction-options {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.contra-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--asci-border);
  background: var(--asci-surface2);
  cursor: pointer;
  transition: border-color .15s, background .15s
}

.contra-opt:hover {
  border-color: var(--asci-border2);
  background: rgba(37, 99, 235, 0.04)
}

.contra-opt.selected {
  border-color: var(--asci-blue);
  background: var(--asci-blue-dim)
}

.contra-opt-radio {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--asci-text-muted);
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color .15s, background .15s
}

.contra-opt.selected .contra-opt-radio {
  border-color: var(--asci-blue);
  background: var(--asci-blue)
}

.contra-opt-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--asci-text)
}

.contra-opt-reason {
  font-size: 11px;
  color: var(--asci-text-muted);
  margin-top: 1px
}

/* ---- OUTLINE EDITOR ---- */
.outline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px
}

.outline-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--asci-border);
  background: var(--asci-surface2)
}

.outline-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-top: 1px
}

.outline-content {
  flex: 1;
  min-width: 0
}

.outline-title-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--asci-text);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  padding: 0;
  margin-bottom: 3px
}

.outline-title-input:focus {
  border-bottom: 1px solid var(--asci-blue)
}

.outline-points {
  font-size: 11px;
  color: var(--asci-text-muted);
  line-height: 1.5
}

/* ---- BACK BUTTON ---- */
.asci-btn-back {
  padding: 9px 16px;
  border-radius: 8px;
  background: transparent;
  color: var(--asci-text-muted);
  border: 1px solid var(--asci-border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s, color .15s
}

.asci-btn-back:hover:not(:disabled) {
  border-color: var(--asci-border2);
  color: var(--asci-text)
}

.asci-btn-back:disabled {
  opacity: .3;
  cursor: default
}

/* ---- CONFIRM MODAL ---- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center
}

.confirm-modal {
  background: var(--asci-surface);
  border: 1px solid var(--asci-border2);
  border-radius: var(--asci-radius);
  padding: 24px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15)
}

.confirm-modal-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--asci-yellow)
}

.confirm-modal-body {
  font-size: 13px;
  color: var(--asci-text-dim);
  line-height: 1.6;
  margin-bottom: 20px
}

.confirm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end
}

.confirm-btn-cancel {
  padding: 7px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--asci-border);
  color: var(--asci-text-dim);
  cursor: pointer;
  font-size: 13px
}

.confirm-btn-ok {
  padding: 7px 16px;
  border-radius: 6px;
  background: var(--asci-yellow);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700
}

/* ---- RIGHT PANEL: HITL STATUS ---- */
.hitl-status {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 6px
}

.hitl-status-wait {
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.2);
  color: var(--asci-yellow)
}

.hitl-status-done {
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.2);
  color: var(--asci-green)
}

.hitl-status-required {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--asci-red)
}

/* ---- RIGHT PANEL: DECISION HISTORY ---- */
.decision-history {
  margin-top: 10px
}

.decision-history-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--asci-text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px
}

.decision-history-item {
  font-size: 11px;
  color: var(--asci-text-dim);
  padding: 4px 0;
  border-top: 1px solid var(--asci-border);
  line-height: 1.5
}

.decision-history-item strong {
  color: var(--asci-text)
}

/* ---- SCREEN 3: HITL SUMMARY ---- */
.s3-hitl-card {
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.02);
  overflow: hidden
}

.s3-hitl-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
  font-size: 12px;
  line-height: 1.6
}

.s3-hitl-item:last-child {
  border-bottom: none
}

.s3-hitl-step {
  font-weight: 700;
  color: var(--asci-blue);
  margin-right: 6px
}

.s3-hitl-decision {
  color: var(--asci-text)
}

/* ---- LEFT: STEP TIMELINE ENHANCEMENTS ---- */
.tree-step.review .tree-step-header {
  background: rgba(217, 119, 6, 0.08);
  border-left: 2px solid var(--asci-yellow)
}

.tree-step-status {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  flex-shrink: 0;
  border: 1px solid
}

.tree-step-status.pending {
  color: var(--asci-text-muted);
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.08)
}

.tree-step-status.running {
  color: var(--asci-blue);
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.08)
}

.tree-step-status.review {
  color: var(--asci-yellow);
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(217, 119, 6, 0.08)
}

.tree-step-status.done {
  color: var(--asci-green);
  border-color: rgba(5, 150, 105, 0.3);
  background: rgba(5, 150, 105, 0.06)
}

.tree-step-summary {
  font-size: 10px;
  color: var(--asci-text-muted);
  padding: 2px 10px 6px 32px;
  line-height: 1.4
}

/* ---- CENTER: TWO-ZONE LAYOUT ---- */
.asci-center-wrap {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  background: var(--asci-log-bg)
}

.asci-main-content {
  flex: 1;
  overflow-y: auto;
  border-bottom: 1px solid var(--asci-border);
  padding: 14px 16px
}

.main-content-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  gap: 8px;
  color: var(--asci-text-muted)
}

.main-empty-icon {
  font-size: 28px
}

.main-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--asci-text-dim)
}

.main-empty-sub {
  font-size: 12px
}

/* ---- LOG SECTION ---- */
.asci-log-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0
}

.asci-log-section.collapsed .asci-log {
  display: none
}

.asci-log-section.collapsed {
  flex: 0 0 36px
}

.log-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 11px;
  border-bottom: 1px solid var(--asci-border);
  flex-shrink: 0;
  background: var(--asci-surface)
}

.log-section-title {
  font-weight: 700;
  color: var(--asci-text-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  flex: 1
}

.log-warn-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(217, 119, 6, 0.08);
  color: var(--asci-yellow);
  border: 1px solid rgba(217, 119, 6, 0.2)
}

.log-toggle-btn {
  background: none;
  border: none;
  color: var(--asci-text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s, background .15s
}

.log-toggle-btn:hover {
  color: var(--asci-text);
  background: rgba(0, 0, 0, 0.04)
}

/* ---- RIGHT: ARTIFACTS PANEL ---- */
.asci-artifacts {
  overflow-y: auto;
  border-left: 1px solid var(--asci-border);
  padding: 14px 14px;
  background: var(--asci-surface);
  display: flex;
  flex-direction: column;
  gap: 16px
}

/* ---- CONFIDENCE MINI CHART ---- */
.conf-mini-chart-wrap {
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 4px
}

.conf-mini-chart {
  width: 100%;
  height: 60px;
  display: block
}

.conf-mini-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  color: var(--asci-text-muted)
}

.conf-mini-label {
  text-align: center
}

/* ---- ARTIFACTS ITEMS ---- */
.artifacts-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}

.artifacts-tool-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--asci-blue-dim);
  color: var(--asci-blue);
  border: 1px solid rgba(37, 99, 235, 0.2)
}

.artifacts-decisions {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.artifacts-decision-item {
  font-size: 11px;
  color: var(--asci-text-dim);
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--asci-surface2);
  border: 1px solid var(--asci-border);
  line-height: 1.5
}

.artifacts-decision-item strong {
  color: var(--asci-text)
}

.artifacts-empty {
  font-size: 11px;
  color: var(--asci-text-muted)
}

/* ---- DEGRADE DEMO BTN (subtle) ---- */
.degrade-demo-btn-subtle {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--asci-border2);
  border-radius: 6px;
  background: transparent;
  color: var(--asci-text-muted);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap
}

.degrade-demo-btn-subtle:hover {
  background: var(--asci-surface2);
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--asci-text-dim)
}

.asci-btn-reconfig {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--asci-border2);
  border-radius: 6px;
  background: transparent;
  color: var(--asci-text-muted);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap
}
.asci-btn-reconfig:hover {
  background: var(--asci-surface2);
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--asci-text-dim)
}

/* ---- STEP 2: PAPER PREVIEW ---- */
.paper-preview-block {
  margin-top: 10px;
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  overflow: hidden
}

.paper-preview-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-dim);
  cursor: pointer;
  background: var(--asci-surface2);
  user-select: none
}

.paper-preview-toggle:hover {
  background: rgba(37, 99, 235, 0.05)
}

.paper-preview-toggle .toggle-arrow {
  transition: transform .2s
}

.paper-preview-toggle.open .toggle-arrow {
  transform: rotate(180deg)
}

.paper-preview-list {
  display: none;
  flex-direction: column;
  gap: 0
}

.paper-preview-list.open {
  display: flex
}

.preview-paper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-top: 1px solid var(--asci-border);
  cursor: pointer;
  transition: background .15s
}

.preview-paper-item:hover {
  background: rgba(37, 99, 235, 0.04)
}

.preview-paper-year {
  font-size: 10px;
  color: var(--asci-text-muted);
  flex-shrink: 0;
  width: 32px
}

.preview-paper-title {
  font-size: 11px;
  color: var(--asci-text);
  flex: 1
}

.preview-paper-hint {
  font-size: 10px;
  color: var(--asci-blue);
  flex-shrink: 0
}

.export-row {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center
}

.export-btn {
  font-size: 11px;
  padding: 4px 12px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 6px;
  background: transparent;
  color: var(--asci-blue);
  cursor: pointer;
  transition: background .15s
}

.export-btn:hover {
  background: var(--asci-blue-dim)
}

/* ---- STEP 3: DECISION BADGE ---- */
.decision-count-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap
}

.dc-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 99px;
  font-weight: 600
}

.dc-include {
  background: rgba(5, 150, 105, 0.08);
  color: var(--asci-green);
  border: 1px solid rgba(5, 150, 105, 0.2)
}

.dc-hold {
  background: rgba(217, 119, 6, 0.08);
  color: var(--asci-yellow);
  border: 1px solid rgba(217, 119, 6, 0.2)
}

.dc-exclude {
  background: rgba(220, 38, 38, 0.08);
  color: var(--asci-red);
  border: 1px solid rgba(220, 38, 38, 0.2)
}

.threshold-preview {
  font-size: 11px;
  color: var(--asci-text-muted);
  font-style: italic;
  margin-left: 6px
}

/* ---- STEP 4: FINDINGS LIST ---- */
.findings-block {
  margin-top: 10px;
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  overflow: hidden
}

.findings-block-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-dim);
  cursor: pointer;
  background: var(--asci-surface2);
  user-select: none
}

.findings-block-toggle:hover {
  background: rgba(37, 99, 235, 0.04)
}

.findings-block-toggle .toggle-arrow {
  transition: transform .2s
}

.findings-block-toggle.open .toggle-arrow {
  transform: rotate(180deg)
}

.findings-list {
  display: none;
  flex-direction: column;
  gap: 0
}

.findings-list.open {
  display: flex
}

.finding-item {
  padding: 7px 12px;
  border-top: 1px solid var(--asci-border);
  font-size: 11px;
  line-height: 1.5
}

.finding-text {
  color: var(--asci-text)
}

.finding-source {
  font-size: 10px;
  color: var(--asci-text-muted);
  margin-top: 2px
}

/* ---- SIMPLE NODE RESULT (简单文字节点) ---- */
.simple-node-result {
  padding: 14px;
  color: var(--asci-text-dim);
  font-size: 13px;
  line-height: 1.7
}

.simple-node-result .node-result-icon {
  font-size: 24px;
  margin-bottom: 8px
}

.simple-node-result p {
  margin-bottom: 6px
}


/* ============================================================ */
/* ---- S1 NODE CARDS (任务 1：节点卡片) ---- */
/* ============================================================ */
.s1-node-card {
  border: 1.5px solid var(--asci-border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--asci-surface);
}
.s1-node-card:hover {
  border-color: var(--asci-blue);
}
.s1-node-card.selected {
  border-color: var(--asci-blue);
  background: var(--asci-blue-bg);
}
.s1-node-card.required {
  border-color: var(--asci-blue);
  opacity: 1;
  cursor: default;
}
.s1-node-card.demo-unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}
.s1-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.s1-card-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.s1-card-name {
  font-size: 12px;
  font-weight: 700;
  flex: 1;
  color: var(--asci-text);
}
.s1-card-lock {
  font-size: 11px;
  opacity: 0.7;
}
.s1-card-desc {
  font-size: 11px;
  color: var(--asci-text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}
.s1-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.s1-card-risk {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
}
.s1-card-risk.low {
  background: var(--asci-green-bg);
  color: var(--asci-green);
}
.s1-card-risk.medium {
  background: var(--asci-yellow-bg);
  color: var(--asci-yellow);
}
.s1-card-risk.high {
  background: var(--asci-red-bg);
  color: var(--asci-red);
}
/* 节点网格内子分组 */
.s1-group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 10px 0 4px;
  padding-left: 2px;
}
.s1-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 4px;
}

/* ============================================================ */
/* ---- TREE GROUPS (任务 4：时间线分组框) ---- */
/* ============================================================ */
.tree-group {
  margin-bottom: 8px;
}
.tree-group-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--asci-text-muted);
  padding: 3px 8px;
  border-left: 2px solid var(--asci-blue-light);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tree-group-header.done {
  border-left-color: var(--asci-green);
  color: var(--asci-green);
}
.tree-group-summary {
  font-size: 10px;
  color: var(--asci-text-muted);
  padding-left: 10px;
  margin-top: 2px;
  margin-bottom: 4px;
  line-height: 1.4;
}

/* ============================================================ */
/* ---- CHAT SECTION (任务 5：对话交互框) ---- */
/* ============================================================ */
.asci-chat-section {
  flex: 0 0 200px;
  border-top: 1px solid var(--asci-border);
  background: var(--asci-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.asci-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 4px;
  border-bottom: 1px solid var(--asci-border);
  flex-shrink: 0;
}
.asci-chat-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.asci-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.asci-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.asci-chat-msg-user {
  flex-direction: row-reverse;
}
.asci-chat-avatar {
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.6;
}
.asci-chat-bubble {
  font-size: 11px;
  line-height: 1.5;
  padding: 5px 8px;
  border-radius: 8px;
  max-width: 85%;
  background: var(--asci-bg);
  color: var(--asci-text);
  border: 1px solid var(--asci-border);
}
.asci-chat-msg-user .asci-chat-bubble {
  background: var(--asci-blue-bg);
  border-color: var(--asci-blue-light);
  color: var(--asci-blue);
}
.asci-chat-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid var(--asci-border);
  flex-shrink: 0;
}
.asci-chat-upload-btn {
  font-size: 14px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--asci-bg);
  border: 1px solid var(--asci-border);
  flex-shrink: 0;
  user-select: none;
}
.asci-chat-upload-btn:hover {
  border-color: var(--asci-blue);
}
.asci-chat-input {
  flex: 1;
  font-size: 11px;
  padding: 5px 8px;
  border: 1px solid var(--asci-border);
  border-radius: 5px;
  background: var(--asci-bg);
  color: var(--asci-text);
  outline: none;
}
.asci-chat-input:focus {
  border-color: var(--asci-blue);
}
.asci-chat-send-btn {
  font-size: 11px;
  padding: 5px 10px;
  background: var(--asci-blue);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.asci-chat-send-btn:hover {
  opacity: 0.85;
}

/* ============================================================ */
/* ---- NODE RETRY BUTTON (任务 6：重跑按钮) ---- */
/* ============================================================ */
.node-retry-btn {
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--asci-blue-light);
  border-radius: 10px;
  background: var(--asci-blue-bg);
  color: var(--asci-blue);
  cursor: pointer;
  transition: all 0.15s;
  margin-left: auto;
}
.node-retry-btn:hover {
  background: var(--asci-blue);
  color: #fff;
}

/* ---- RETRY MODAL ---- */
.retry-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.retry-modal {
  background: var(--asci-surface);
  border: 1px solid var(--asci-border);
  border-radius: 10px;
  padding: 20px 22px;
  width: 340px;
  max-width: 95vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.retry-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--asci-text);
  margin-bottom: 12px;
}
.retry-modal-body {
  font-size: 12px;
  color: var(--asci-text-dim);
  margin-bottom: 16px;
  line-height: 1.6;
}
.retry-modal-param {
  margin-bottom: 14px;
}
.retry-modal-param label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--asci-text-muted);
  margin-bottom: 6px;
}
.retry-modal-param select,
.retry-modal-param input[type="range"] {
  width: 100%;
}
.retry-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.retry-modal-cancel {
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  background: var(--asci-bg);
  color: var(--asci-text-muted);
  cursor: pointer;
}
.retry-modal-confirm {
  font-size: 12px;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: var(--asci-blue);
  color: #fff;
  cursor: pointer;
}
.retry-modal-confirm:hover {
  opacity: 0.85;
}

/* ============================================================ */
/* ---- PANEL SUBLABEL (任务 3：右侧面板辅助文字) ---- */
/* ============================================================ */
.panel-sublabel {
  font-size: 10px;
  color: var(--asci-text-muted);
  margin: -4px 0 6px;
}

/* ============================================================ */
/* ---- 引文追踪结果 (citation-chase) ---- */
/* ============================================================ */
.citation-result-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.citation-summary-header {
  color: var(--asci-text);
}
.citation-summary-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--asci-text-muted);
  line-height: 1.6;
}
.citation-new-papers-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--asci-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.citation-paper-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.citation-paper-card {
  background: var(--asci-surface);
  border: 1px solid var(--asci-border);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.citation-paper-title {
  flex: 1 1 200px;
  font-size: 12px;
  font-weight: 600;
  color: var(--asci-text);
}
.citation-paper-meta {
  font-size: 11px;
  color: var(--asci-text-muted);
  flex: 1 1 120px;
}
.citation-chase-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.citation-chase-tag.chase-backward {
  background: rgba(37,99,235,.12);
  color: var(--asci-blue);
}
.citation-chase-tag.chase-forward {
  background: rgba(5,150,105,.12);
  color: var(--asci-green);
}

/* ============================================================ */
/* ---- 摘要筛选：摘要按钮 ---- */
/* ============================================================ */
.included-paper-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inc-abstract-btn {
  flex-shrink: 0;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--asci-border);
  background: var(--asci-surface);
  color: var(--asci-text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  margin-left: auto;
}
.inc-abstract-btn:hover {
  background: var(--asci-blue);
  color: #fff;
  border-color: var(--asci-blue);
}

/* ============================================================ */
/* ---- 时间线重跑图标 ---- */
/* ============================================================ */
.tree-retry-icon {
  font-size: 11px;
  margin-left: 4px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity .15s, transform .15s;
  user-select: none;
  flex-shrink: 0;
}
.tree-retry-icon:hover {
  opacity: 1;
  transform: rotate(30deg);
}

/* ============================================================ */
/* ---- 重跑 Modal：影响范围块 ---- */
/* ============================================================ */
.retry-modal-impact {
  background: rgba(234,88,12,.08);
  border: 1px solid rgba(234,88,12,.25);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 10px;
}
.retry-modal-impact-title {
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 4px;
}
.retry-modal-impact-desc {
  font-size: 11px;
  color: var(--asci-text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.retry-modal-impact-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.impact-node-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(234,88,12,.15);
  color: #9a3412;
  font-weight: 600;
}
