/* =====================================================================
   TIDE 深度报告 · 论文专属样式（源自《TIDE论文总结.html》<style> 343–494 行）
   通用组件（.report-header/.toc/section/table/.metrics-grid/.compare-box/
   .callout/.pros-cons/.flow/.bars/.board 壳/pipe/.formula/.term）由 css/report.css
   提供，本文件只保留动画板专属类：agnodes / stride / rs1 / rs2 / wq 五族
   + 三个板子占位尺寸（源 316–318 行，公共壳未含）。
   ===================================================================== */

/* ---------- 板子占位尺寸（TIDE 源 316–318 行） ---------- */
.report .stage.ag { min-height: 300px; }
.report .stage.rs1 { min-height: 470px; }
.report .stage.rs2 { min-height: 400px; }

/* ---------- AG 动画（TIDE 源 342–353） ---------- */
.report .agnodes { display: flex; gap: 26px; justify-content: center; min-width: 640px; }
.report .agnode { width: 110px; }
.report .agnode-h { text-align: center; font-size: 0.85rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.report .agstack { display: flex; flex-direction: column; gap: 6px; }
.report .agblock {
  height: 40px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem; font-weight: 700;
}
.report .agblock.pulse-send { animation: pulseSend 1.6s ease-in-out infinite; }
@keyframes pulseSend { 0%,100% { box-shadow: 0 0 0 0 rgba(26,82,118,0); } 50% { box-shadow: 0 0 0 4px rgba(26,82,118,.45); } }

/* ---------- strided copy 小图（TIDE 源 355–372） ---------- */
.report .stride {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin: 14px 0; background: var(--code-bg);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px;
}
.report .stride-half { flex: 1 1 220px; }
.report .stride-half b { display: block; font-size: 0.83rem; color: var(--primary); margin-bottom: 8px; }
.report .stride .arr { font-size: 0.82rem; color: var(--text-muted); flex: 0 0 auto; max-width: 220px; line-height: 1.6; }
.report .sg-row {
  height: 24px; border-radius: 4px; margin-bottom: 4px;
  display: flex; align-items: center; padding-left: 8px;
  color: #fff; font-size: 0.75rem; font-weight: 600;
}
.report .sg-row.hatch {
  background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 3px, #f8fafc 3px, #f8fafc 6px);
  color: #64748b;
}

/* ---------- RS Level 1（TIDE 源 374–422） ---------- */
.report .rs1gpu {
  position: absolute; left: 16px; width: 205px; height: 44px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  display: flex; align-items: center; padding: 0 8px;
  font-size: 0.8rem; font-weight: 600; color: var(--text);
}
.report .rs1gpu.owner { border: 2px solid var(--accent); background: #f2faf8; }
.report .rs1slice {
  flex: 1; height: 20px; margin-left: 6px;
  background: rgba(124,58,237,.12); border: 1px dashed #7c3aed; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #6d28d9; font-size: 0.68rem; font-weight: 600;
}
.report .rs1slice.inplace { animation: pulseSend 1.4s ease-in-out infinite; border-style: solid; }
.report .rs1badge {
  position: absolute; right: -74px; top: 9px; font-size: 0.66rem;
  background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.report .rs1panel { position: absolute; left: 268px; top: 16px; width: 400px; }
.report .rs1panel-t { font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.report .rs1stg { display: flex; gap: 8px; margin-top: 8px; }
.report .rs1chunk {
  width: 86px; height: 44px; border: 1px dashed var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.72rem; background: #f8fafc;
}
.report .rs1chunk.filled { background: #ede9fe; border: 1px solid #7c3aed; color: #5b21b6; font-weight: 600; }
.report .rs1chunk.reuse { animation: flashReuse .9s ease; }
@keyframes flashReuse { 0% { box-shadow: 0 0 0 4px rgba(211,84,0,.4); } 100% { box-shadow: 0 0 0 0 rgba(211,84,0,0); } }
.report .rs1chunk.consumed { opacity: .3; }
.report .rs1partial {
  margin-top: 10px; height: 46px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff; background: var(--accent); opacity: .12; font-weight: 600;
}
.report .rs1partial.on { opacity: 1; }
.report .rs1out {
  margin-top: 8px; height: 34px; border-radius: 8px; border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.78rem; background: #f8fafc;
}
.report .rs1out.on { border: 1px solid #3498db; color: #2471a3; font-weight: 600; }
.report .rs1rail {
  position: absolute; left: 268px; right: 16px; bottom: 14px; height: 30px;
  border-radius: 8px; background: #eaf2f8; border: 1px solid #aed6f1;
  display: flex; align-items: center; justify-content: center;
  color: #2471a3; font-size: 0.78rem; font-weight: 600;
}

/* ---------- RS Level 2（TIDE 源 424–468） ---------- */
.report .rs2lane {
  position: absolute; left: 8px; width: 165px; height: 32px;
  border-radius: 8px; background: #ede9fe; border: 1px solid #c4b5fd;
  display: flex; align-items: center; justify-content: center;
  color: #5b21b6; font-size: 0.78rem; font-weight: 600;
}
.report .rs2node {
  position: absolute; left: 200px; top: 10px; width: 590px;
  border: 1px solid var(--border); border-radius: 12px; background: #fbfdfc; padding: 10px 12px 10px;
}
.report .rs2node-t { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.report .rs2row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.report .rs2row-lbl { width: 52px; font-size: 0.8rem; font-weight: 700; color: var(--primary); }
.report .rs2cell {
  width: 118px; height: 48px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.76rem; color: var(--text-muted);
}
.report .rs2cell.own { background: #eafaf1; border-color: var(--accent); color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.report .rs2cell.remote { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; font-weight: 700; font-size: 0.85rem; }
.report .rs2cell.reducing { animation: colReduce 1.2s ease; }
@keyframes colReduce { 0% { box-shadow: 0 0 0 0 rgba(0,137,123,0); } 35% { box-shadow: 0 0 0 4px rgba(0,137,123,.45); } 100% { box-shadow: 0 0 0 0 rgba(0,137,123,0); } }
.report .rs2own {
  position: absolute; left: 8px; bottom: 12px; width: 165px;
  border: 1px dashed var(--border); border-radius: 10px; padding: 8px; background: #f8fafc;
}
.report .rs2own-t { font-size: 0.74rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.report .rs2ownb {
  height: 25px; margin-bottom: 5px; border-radius: 6px;
  background: #eafaf1; border: 1px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}
.report .rs2ownb:last-child { margin-bottom: 0; }
.report .rs2out {
  position: absolute; left: 200px; right: 12px; bottom: 12px; height: 44px;
  border: 1px solid var(--border); border-radius: 10px; background: #f0faf4;
  padding: 6px 10px; display: flex; align-items: center; gap: 6px;
}
.report .rs2out-t { font-size: 0.74rem; color: var(--text-muted); margin-right: 4px; white-space: nowrap; }
.report .rs2outseg { flex: 1; height: 24px; border-radius: 6px; background: #e2e8f0; border: 1px dashed #cbd5e1; }
.report .rs2outseg.done { background: var(--accent); border: none; }
.report .rs2node.gen2 .rs2cell { background: #fef9e7; border-color: #d4ac0d; }

/* ---------- 波量化交互图（TIDE 源 470–494） ---------- */
.report .wqwrap { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.report .tide-wqbtns { display: flex; flex-direction: column; gap: 8px; flex: 0 0 210px; }
.report .tide-wqbtns .btn { text-align: left; }
.report .wqpanel {
  flex: 1 1 500px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
}
.report .wqgrid { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 8px 0; }
.report .wqrow { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; max-width: 640px; }
.report .wqgroup { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.report .wqgroup-lbl { font-size: 0.72rem; color: var(--text-muted); }
.report .wqcell { width: 28px; height: 28px; border-radius: 5px; position: relative; }
.report .wqcell.gemm { background: var(--success); }
.report .wqcell.spare { background: #fff; border: 1px dashed #94a3b8; }
.report .wqcell.comm { background: #f39c12; }
.report .wqcell.spill { background: #e74c3c; }
.report .wqcell.idle { background: #e2e8f0; }
.report .wqcell .dots { position: absolute; inset: 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.report .wqcell .dots i { background: #f39c12; border-radius: 3px; display: block; }
.report .wqlbl { font-size: 0.78rem; color: var(--text-muted); text-align: center; margin-top: 4px; }
.report .wqdesc {
  font-size: 0.85rem; color: var(--text);
  background: #eaf2f8; border-radius: 8px; padding: 10px 14px; margin-top: 10px;
}