/* =====================================================================
   SigmaTrace 报告 · 动画板与补充样式
   基础组件（.board/.bhead/.stage/.step-desc/.legend/.controls/.btn/.flyer、
   表格、.compare-box、.bars、.callout、.pros-cons 等）由站点 css/report.css
   提供；本文件只定义 .sg-* 板内类与两处整行/主题补充。
   ===================================================================== */

/* 整行强调（report.css 只有 td.hl 单元格高亮） */
.report tr.hl td { background: #eafaf1; font-weight: 700; }
.report tr.hl td:not(.hl) { color: var(--text); }

/* 对比框主题（沿用 stock/tide 的红绿语义，重命名为 before/after） */
.report .compare-box .before { border-top: 4px solid var(--danger); }
.report .compare-box .before h4 { color: var(--danger); border-color: var(--danger); }
.report .compare-box .after { border-top: 4px solid var(--success); }
.report .compare-box .after h4 { color: var(--success); border-color: var(--success); }

/* ==================== 动画板：doorbell 劫持 + 中继管线 ==================== */
.report .sg-stage, .report .sg-stage * { box-sizing: border-box; }
.report .sg-stage { position: relative; min-height: 404px; min-width: 940px; }

.report .sg-box {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.74rem;
}
.report .sg-t {
  font-weight: 700; color: var(--primary); font-size: 0.78rem;
  margin-bottom: 8px; line-height: 1.4;
}
.report .sg-note { font-size: 0.63rem; color: var(--text-muted); margin-top: 7px; line-height: 1.5; }

/* GPU 内核面板 */
.report .sg-gpu { left: 8px; top: 12px; width: 212px; height: 172px; }
.report .sg-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.report .sg-slot {
  height: 20px; border-radius: 4px;
  border: 1px dashed #cbd5e1; background: #f8fafc;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: #94a3b8;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.report .sg-slot.filled {
  background: #eafaf1; border: 1px solid var(--success);
  color: var(--success); font-weight: 700;
}
.report .sg-slot.oncopy {
  background: #fef9e7; border: 1px solid #d4ac0d;
  color: #b7950b; font-weight: 700;
}
.report .sg-db {
  margin-top: 8px; height: 30px; border-radius: 6px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem; font-weight: 700; text-align: center;
}
.report .sg-db.live { animation: sgPulse 1s ease-in-out infinite; }
@keyframes sgPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 82, 118, 0); }
  50% { box-shadow: 0 0 0 5px rgba(26, 82, 118, 0.45); }
}

/* PCIe 箭头 */
.report .sg-pcie {
  position: absolute; left: 224px; top: 66px; width: 90px;
  font-size: 0.62rem; color: var(--text-muted);
  text-align: center; line-height: 1.6;
}

/* 置换假页 */
.report .sg-fake { left: 318px; top: 12px; width: 204px; height: 172px; border: 2px dashed var(--accent-light); background: #fbfdff; }
.report .sg-line {
  margin-top: 4px; height: 38px; border-radius: 6px;
  border: 1px solid var(--border); background: #eef2f6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.6rem; color: var(--text-muted); line-height: 1.4;
}
.report .sg-line.hot { background: #fdf4f3; border-color: var(--danger); animation: sgHit 0.7s ease; }
@keyframes sgHit {
  0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); }
  35% { box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); }
}
.report .sg-fake .sg-note b { color: var(--accent); }

/* 中继线程 */
.report .sg-rep { left: 556px; top: 12px; width: 210px; height: 172px; }
.report .sg-repstate {
  margin: 4px 0 6px; padding: 5px 8px; border-radius: 999px;
  text-align: center; font-size: 0.66rem; font-weight: 600;
  background: #e2e8f0; color: #64748b;
  transition: background 0.3s, color 0.3s;
}
.report .sg-repstate.awake {
  background: #f0faf4; border: 1px solid var(--success); color: var(--success);
  animation: sgPulse 1s ease-in-out infinite;
}
.report .sg-ts {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.66rem; color: var(--text);
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 8px; margin-bottom: 6px;
}

/* 真实 UAR / NIC */
.report .sg-uar { left: 800px; top: 12px; width: 132px; height: 172px; }
.report .sg-nic {
  height: 32px; border-radius: 6px;
  border: 1px solid var(--border); background: #eaf2f8;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; color: #2471a3;
  margin-bottom: 8px; text-align: center; line-height: 1.3;
}

/* 通用数值框 */
.report .sg-val {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.68rem; font-weight: 600; color: var(--primary);
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 5px 8px; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.report .sg-val.dim { color: var(--text-muted); font-weight: 400; }

/* 批解析器面板 */
.report .sg-parser { left: 8px; top: 204px; width: 924px; min-height: 158px; }
.report .sg-row { display: flex; gap: 16px; }
.report .sg-half { flex: 1; min-width: 0; }
.report .sg-batch {
  height: 20px; background: #eef2f6; border-radius: 4px;
  overflow: hidden; margin-top: 6px;
}
.report .sg-batch > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #d4ac0d, #f39c12);
  transition: width 0.5s ease;
}
.report .sg-batchlbl {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.64rem; color: var(--text-muted); margin-top: 5px;
}
.report .sg-parsed {
  margin-top: 6px; min-height: 40px; border-radius: 6px;
  background: #2c3e50; color: #7fd1b9;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.62rem; padding: 8px 10px;
  line-height: 1.7; white-space: pre-line;
}
.report .sg-parsed.dim { color: #5f7f74; }
.report .sg-out {
  margin-top: 8px; min-height: 30px; border: 1px dashed var(--border);
  border-radius: 6px; background: #f8fafc;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.64rem; color: var(--text-muted);
  padding: 4px 10px; line-height: 1.5; text-align: center;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.report .sg-out.on {
  border: 1px solid var(--accent); color: var(--accent);
  font-weight: 700; background: #f0faf4;
}