/* =====================================================================
   T-CCL 报告专属样式：D 级 SMEM 流水线动画板（.tc-* 板件）
   公共组件样式（nav/section/table/board/controls/btn/bars/flow 等）
   见 css/report.css；本文件只定义流水线动画板的自定义类，
   选择器统一以 .report 前缀收紧作用域。
   ===================================================================== */

/* ---------- 动画板舞台 ---------- */
.report .tc-stage { min-height: 420px; padding: 14px; overflow-x: auto; }
.report .tc-rowlbl {
  font-size: 0.73rem; color: var(--text-muted); font-weight: 600;
  margin: 12px 0 8px;
}
.report .tc-rowlbl:first-child { margin-top: 0; }

/* ---------- 顶部状态条 ---------- */
.report .tc-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 4px; }
.report .tc-status .tc-chip {
  font-size: 0.74rem; background: var(--code-bg);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 10px; color: var(--text);
}
.report .tc-status .tc-chip b {
  color: var(--primary); font-weight: 700;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}

/* ---------- 源分片 / owner 累加器 ---------- */
.report .tc-buffers { display: flex; flex-wrap: wrap; gap: 16px; }
.report .tc-panel { flex: 1 1 260px; min-width: 240px; }
.report .tc-panel .tc-panel-t {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 600; margin-bottom: 6px;
}
.report .tc-cells { display: flex; gap: 4px; flex-wrap: wrap; }
.report .tc-cell {
  width: 27px; height: 27px; border-radius: 5px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: var(--text-muted); background: var(--surface);
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}
.report .tc-cell.src { background: #fdf2e9; border-color: #f0c27f; color: #af601a; }
.report .tc-cell.src.gone { background: #f4f6f7; border-color: var(--border); color: #aeb6bf; }
.report .tc-cell.own { background: #eafaf1; border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* ---------- SMEM staging 环（D=8 槽） ---------- */
.report .tc-ring { display: flex; gap: 4px; }
.report .tc-slot {
  flex: 1 1 0; min-width: 54px; height: 46px;
  border: 1px dashed var(--border); border-radius: 6px; background: #f8fafc;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.68rem; color: #94a3b8;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}
.report .tc-slot .no { color: #94a3b8; font-size: 0.6rem; }
.report .tc-slot.loading { background: #eaf2f8; border: 1px solid #2980b9; color: #2471a3; font-weight: 700; }
.report .tc-slot.reducing { background: #f4ecf7; border: 1px solid #8e44ad; color: #6c3483; font-weight: 700; }
.report .tc-slot.pulse { animation: tcPulse 1.3s ease-in-out infinite; }
@keyframes tcPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 137, 123, 0); }
  50% { box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.4); }
}

/* ---------- 流水线时间轴（Gantt） ---------- */
.report .tc-gantt { position: relative; margin-top: 14px; min-width: 600px; }
.report .tc-ghead { display: flex; margin-left: 56px; height: 18px; }
.report .tc-gbeat {
  flex: 1 1 0; font-size: 0.6rem; color: #94a3b8; text-align: center;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}
.report .tc-ticks { display: flex; margin-left: 56px; height: 26px; }
.report .tc-tbeat { flex: 1 1 0; position: relative; }
.report .tc-tick {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 2px; bottom: 2px;
}
.report .tc-tick.load { background: #2980b9; }
.report .tc-tick.red { background: #8e44ad; bottom: 14px; }
.report .tc-grow { display: flex; align-items: center; margin-bottom: 5px; }
.report .tc-grow .lbl {
  flex: 0 0 56px; font-size: 0.62rem; color: var(--text-muted);
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}
.report .tc-gtrack {
  position: relative; flex: 1; height: 16px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, #f1f4f7, #f1f4f7 calc(5% - 1px), #e2e8f0 calc(5% - 1px), #e2e8f0 5%);
  border: 1px solid var(--border); overflow: hidden;
}
.report .tc-bar {
  position: absolute; top: 2px; bottom: 2px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; color: #fff;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}
.report .tc-bar.load { background: #2980b9; }
.report .tc-bar.red { background: #8e44ad; }
.report .tc-bar.load.past { background: #7fb3d5; }
.report .tc-bar.red.past { background: #af7ac5; }
.report .tc-marker {
  position: absolute; top: -44px; bottom: 0; width: 2px;
  background: var(--accent); opacity: 0.75; z-index: 5;
}
.report .tc-marker::before {
  content: ""; position: absolute; top: -4px; left: -4px;
  border: 6px solid transparent; border-top-color: var(--accent);
}

/* ---------- 板内注记 ---------- */
.report .tc-note {
  margin: 12px 0 0; padding: 8px 12px; border-radius: 6px;
  background: var(--highlight); border: 1px dashed var(--accent-light);
  font-size: 0.78rem; color: var(--text); line-height: 1.6;
}
.report .tc-note b { color: var(--primary); }
