/* ===== anim.css — 5 priority animations ===== */

/* common */
.anim-section { padding: 80px 0; }
.anim-stage {
  position: relative;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(15,30,60,0.06), 0 24px 64px rgba(15,30,60,0.08);
  padding: 32px;
  overflow: hidden;
  min-height: 480px;
}
.anim-stage.active .matrix-cell { animation-play-state: running; }

/* ===== Replay-pending cue =====
   再次进入视野时，setupAnim 把 stage 跳到「结束帧」并保持 1s，再 reset 到第一
   帧保持 1s，之后开播。这 2s 期间给 stage 加 .replay-pending，stage 边框做一
   次微弱呼吸（box-shadow inner ring），让用户感知"正在准备重播"。
*/
.anim-stage.replay-pending,
#hero-matrix.replay-pending .matrix-frame {
  animation: replayPendingPulse 2s ease-in-out forwards;
}
@keyframes replayPendingPulse {
  0%, 100% { box-shadow: 0 1px 3px rgba(15,30,60,0.06), 0 24px 64px rgba(15,30,60,0.08); }
  50%      { box-shadow: 0 1px 3px rgba(15,30,60,0.06), 0 24px 64px rgba(15,30,60,0.08), 0 0 0 1px rgba(30,64,175,0.20); }
}
@media (prefers-reduced-motion: reduce) {
  .anim-stage.replay-pending,
  #hero-matrix.replay-pending .matrix-frame { animation: none; }
}

.anim-caption {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.cap-step {
  /* 位置稳定核心: 字号/字重/checkmark 占位从初始态就锁死, 状态切换只换颜色和阴影,
     绝不导致 reflow（避免后续 pill 跟着前面 pill 状态变化抖动）。*/
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600; /* 与 .on/.done 一致, 避免字重切换造成的字宽变化 */
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--page-bg);
  border: 1px solid transparent;
  transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.cap-step::after {
  content: " ✓";
  margin-left: 5px;
  color: transparent; /* 默认透明, 但占用横向空间 */
  font-weight: 700;
  transition: color 0.4s ease;
}
.cap-step.on {
  color: var(--ink-strong);
  background: var(--ink-soft);
  border-color: rgba(30,64,175,0.30);
  box-shadow: 0 0 0 4px rgba(30,64,175,0.08);
  animation: capStepPulse 1.4s ease-in-out infinite;
}
.cap-step.done {
  color: var(--ink-strong);
  background: var(--ink-soft);
  border-color: rgba(30,64,175,0.30);
}
.cap-step.done::after {
  color: var(--ink-strong); /* 仅切换颜色, 占位不变 → 位置稳定 */
}
@keyframes capStepPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(30,64,175,0.08); }
  50%      { box-shadow: 0 0 0 6px rgba(30,64,175,0.15); }
}
@media (prefers-reduced-motion: reduce) {
  .cap-step.on { animation: none; }
}

/* ============ HERO 5-STATE MATRIX ============ */
.matrix-wrap { position: relative; max-width: 540px; justify-self: center; width: 100%; }
.matrix-frame {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,30,60,0.06), 0 24px 64px rgba(15,30,60,0.10);
}
.matrix-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--page-bg);
  border-bottom: 1px solid var(--panel-border);
}
.matrix-titlebar-left { display: flex; align-items: center; gap: 10px; }
.dots-3 { display: flex; gap: 5px; }
.dots-3 i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.dots-3 i:nth-child(1) { background: rgba(185,28,28,0.30); }
.dots-3 i:nth-child(2) { background: rgba(180,83,9,0.30); }
.dots-3 i:nth-child(3) { background: rgba(21,128,61,0.32); }
.matrix-title { font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted); letter-spacing: 0.05em; }
.matrix-version { font-family: var(--font-mono); font-size: 10px; color: var(--ink-strong); letter-spacing: 0.06em; }
.matrix-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}
.kpi {
  background: white;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.kpi-num { font-family: var(--font-title); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.kpi-hit .kpi-num { color: var(--hit); }
.kpi-ind .kpi-num { color: var(--indirect-hit); }
.kpi-rev .kpi-num { color: var(--review); }
.kpi-no  .kpi-num { color: var(--no-hit); }
.kpi-err .kpi-num { color: var(--source-error); }

.matrix-body { padding: 16px; }
.matrix-row-head {
  display: grid;
  grid-template-columns: 1.7fr repeat(7, 1fr);
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 8px;
}
.matrix-row-head > div {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
}
.matrix-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(7, 1fr);
  gap: 4px;
}
.matrix-row-name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-strong);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.matrix-cell {
  aspect-ratio: 1.2 / 1;
  border-radius: 4px;
  background: var(--panel-bg-alt);
  position: relative;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
  display: grid;
  place-items: center;
}
.matrix-cell.in { opacity: 1; transform: scale(1); }
.matrix-cell.s-no  { background: var(--no-hit-bg); border: 1px solid var(--no-hit-border); }
.matrix-cell.s-hit { background: var(--hit-bg); border: 1px solid var(--hit-border); }
.matrix-cell.s-rev { background: var(--review-bg); border: 1px solid var(--review-border); }
.matrix-cell.s-ind { background: var(--indirect-hit-bg); border: 1px solid var(--indirect-hit-border); }
.matrix-cell.s-err { background: var(--source-error-bg); border: 1px solid var(--source-error-border); }
.matrix-cell.s-no::after  { content: "✓"; color: var(--no-hit); font-size: 10px; font-weight: 600; }
.matrix-cell.s-hit::after { content: ""; width: 14px; height: 4px; background: var(--hit); border-radius: 2px; }
.matrix-cell.s-rev::after { content: "?"; color: var(--review); font-size: 10px; font-weight: 700; font-family: var(--font-mono); }
.matrix-cell.s-ind::after { content: "≥"; color: var(--indirect-hit); font-size: 10px; font-weight: 700; font-family: var(--font-mono); }
.matrix-cell.s-err::after { content: "!"; color: var(--source-error); font-size: 10px; font-weight: 700; font-family: var(--font-mono); }
/* stamp 是右下角徽标，恒为绝对定位脱离 grid 流；否则空 stamp 占一行把 ::after 标记挤到下半格（s-no/s-rev/s-err 居中靠底） */
.matrix-cell .stamp { position: absolute; }
.matrix-cell.s-hit .stamp,
.matrix-cell.s-ind .stamp {
  bottom: -3px; right: -3px; width: 14px; height: 8px;
  background: var(--no-hit-bg); border: 1px solid var(--no-hit); border-radius: 2px;
  opacity: 0; transition: opacity 0.4s ease 0.4s;
}
.matrix-cell.in .stamp { opacity: 1; }

.matrix-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--page-bg);
  border-top: 1px solid var(--panel-border);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.run-tick {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--no-hit);
  box-shadow: 0 0 0 0 rgba(21,128,61,0.5);
  animation: dotPulse 2.4s infinite;
}

/* ============ ANIM 1 · DOMESTIC MODE ============ */
#stage-domestic { min-height: 620px; padding-top: 80px; }
.dom-toggle {
  position: absolute;
  top: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  background: white; border: 1px solid var(--panel-border);
  padding: 8px 14px; border-radius: 999px;
  z-index: 4;
  box-shadow: 0 1px 3px rgba(15,30,60,0.06);
}
.dom-toggle-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-strong); }
.dom-toggle-switch {
  width: 36px; height: 20px;
  background: rgba(15,30,60,0.15);
  border-radius: 999px;
  position: relative;
  transition: background 0.3s ease;
}
.dom-toggle-switch i {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
}
.dom-toggle.on .dom-toggle-switch { background: var(--ink-strong); box-shadow: 0 0 0 4px rgba(30,64,175,0.10); }
.dom-toggle.on .dom-toggle-switch i { left: 18px; }

.dom-lane { padding: 16px 24px; }
.dom-lane-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.dom-lane-offshore { margin-bottom: 8px; }
.dom-sources {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 720px) { .dom-sources { grid-template-columns: repeat(3, 1fr); } }
.dom-source {
  background: var(--panel-bg-alt);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}
.dom-source.glow {
  background: var(--ink-soft);
  border-color: var(--ink-strong);
  box-shadow: 0 0 0 4px rgba(30,64,175,0.08);
}
.dom-source span { display: block; font-family: var(--font-title); font-size: 11px; font-weight: 600; color: var(--fg-strong); letter-spacing: 0.03em; }
.dom-source i { display: block; margin-top: 2px; font-style: normal; font-family: var(--font-mono); font-size: 9px; color: var(--fg-muted); letter-spacing: 0.04em; }

.dom-border {
  position: relative;
  margin: 12px 0;
  text-align: center;
  border-top: 1px dashed rgba(15,30,60,0.22);
}
.dom-border-gate {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  top: -16px;
  background: white;
  padding: 4px 14px 4px 6px;
  border: 1px solid rgba(15,30,60,0.10);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15,30,60,0.06);
  /* 提到 SVG beams (z-index:1) 之上，避免 dashed 推流线穿过 chip 视觉造成"透明"假象 */
  z-index: 5;
}
.dom-gate-shield { display: block; flex-shrink: 0; width: 22px; height: 24px; }
.dom-gate-arrow-out {
  transform-origin: 21px 22px;
  transform-box: fill-box;
  transition: opacity 0.2s ease;
  opacity: 0.65;
}
.dom-gate-arrow-out.flash { animation: gateOutFlash 0.6s ease-in-out 3; }
@keyframes gateOutFlash {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.18); }
}
.dom-border-caption {
  font-size: 9.5px;
  letter-spacing: 0.10em;
  color: var(--fg-strong);
  font-weight: 500;
  text-transform: uppercase;
  /* 文案变长时自然换行；chip 由 inline-flex 自适应文字数量 */
  text-align: left;
  line-height: 1.4;
}
.dom-border-gate { max-width: min(90%, 720px); }
@media (max-width: 720px) {
  .dom-border-gate { padding: 4px 10px 4px 6px; gap: 8px; }
  .dom-border-caption { font-size: 8.5px; letter-spacing: 0.06em; }
}
@media (prefers-reduced-motion: reduce) {
  .dom-gate-arrow-out.flash { animation: none; }
}

.dom-lane-onshore { padding-top: 20px; }
.dom-server {
  background: var(--review-bg);
  border: 1px solid var(--ink-strong);
  border-radius: 12px;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
}
.dom-server-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(30,64,175,0.06);
  border-bottom: 1px solid var(--ink-strong);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: 0.04em;
}
.dom-server-icon {
  display: inline-flex;
  align-items: center;
  color: var(--ink-strong);
  flex-shrink: 0;
}
.dom-server-name { white-space: nowrap; }
.dom-server-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: 0.10em;
  font-weight: 500;
  text-transform: uppercase;
  color: #15803d;
  background: rgba(21,128,61,0.10);
  border: 1px solid rgba(21,128,61,0.22);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.dom-server-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #15803d;
  box-shadow: 0 0 0 2px rgba(21,128,61,0.18);
  animation: serverStatusBlink 1.6s ease-in-out infinite;
}
@keyframes serverStatusBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
.dom-server-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--fg-strong);
  font-weight: 500;
  background: white;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .dom-server-status { display: none; }
  .dom-server-tag { font-size: 9px; padding: 2px 7px; }
}
@media (max-width: 480px) {
  /* 纯装饰 mock 标签（127.0.0.1 桥接说明），≤480 仍越界，小屏直接隐去 */
  .dom-server-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dom-server-status-dot { animation: none; }
}
.dom-server-body {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}
.dom-counter { display: flex; flex-direction: column; gap: 8px; }
.dom-counter > div { display: flex; align-items: baseline; gap: 8px; }
.dom-counter .c-label { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; color: var(--fg-muted); letter-spacing: 0.08em; }
.dom-counter .c-num { font-family: var(--font-title); font-weight: 600; font-size: 22px; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.dom-counter .c-unit { font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted); }
.dom-counter .c-time { font-family: var(--font-mono); font-size: 11px; color: var(--fg-strong); letter-spacing: 0.03em; }

.dom-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.dom-mini {
  aspect-ratio: 1.5/1;
  border-radius: 3px;
  background: rgba(15,30,60,0.06);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dom-mini-label {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  font-weight: 600;
  text-transform: uppercase;
  pointer-events: none;
  transition: color 0.3s ease;
}
.dom-mini.lit .dom-mini-label { color: rgba(255,255,255,0.92); }
.dom-mini.lit[data-state="no"]  { background: var(--no-hit); }
.dom-mini.lit[data-state="ind"] { background: var(--indirect-hit); }
.dom-mini.lit[data-state="hit"] { background: var(--hit); }

.dom-laptop {
  position: absolute;
  bottom: 24px; left: 24px;
  width: 200px;
  z-index: 3;
}
.dom-laptop-screen {
  background: var(--fg-strong);
  border-radius: 6px 6px 2px 2px;
  padding: 12px;
  height: 110px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #15803d;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.dom-laptop-prompt { color: #94a3b8; font-size: 9px; letter-spacing: 0.06em; margin-bottom: 4px; }
.dom-laptop-input { color: #60a5fa; min-height: 40px; line-height: 1.4; word-break: break-all; }
.dom-laptop-result { color: #f97316; margin-top: 6px; opacity: 0; transition: opacity 0.4s ease; line-height: 1.4; }
.dom-laptop-result.show { opacity: 1; }
.dom-laptop-base {
  height: 6px;
  background: linear-gradient(180deg, #1e293b, #475569);
  border-radius: 0 0 8px 8px;
  margin: 0 -8px;
}
@media (max-width: 720px) {
  .dom-laptop { position: relative; bottom: auto; left: auto; margin: 24px auto 0; }
}

.dom-beams {
  position: absolute; inset: 0;
  pointer-events: none;
  width: 100%; height: 100%;
  z-index: 1;
}
.dom-beam-line {
  stroke-dasharray: 4 4;
  stroke-dashoffset: 0;
  animation: beamFlow 1.4s linear infinite;
}
@keyframes beamFlow {
  to { stroke-dashoffset: -16; }
}
/* laser stroke 由 JS 注入 dasharray + dashoffset 实现 draw-on（不在 CSS 设默认）。
   原 laserFlow 推流动画与 draw-on 冲突，已移除——绘制完成后线段保持实线，箭头落定。 */

/* "用户发送检索词" 沿 laser 路径斜向渲染。
   paint-order: stroke 让白描边垫在底部，确保多背景可读。
   字号在 viewBox 单位下取 13，配合 preserveAspectRatio="none" 实际渲染约 13-14 CSS px。
   入场延后到 laser draw-on 过半时（550ms）才开始渐入，让用户先看到箭头展开，再看到文案落上。 */
.dom-laser-label {
  fill: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  paint-order: stroke;
  stroke: white;
  stroke-width: 4;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  animation: laserLabelReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.55s forwards;
}
@keyframes laserLabelReveal {
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .dom-laser-label { animation: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .dom-beam-line, .dom-beam-laser { animation: none; }
}

/* ============ ANIM 2 · OWNERSHIP + 50% ============ */
#stage-own { min-height: 720px; }
/* 树状图列加宽：左侧文本块 0.75fr / 右侧树 2fr，让节点 chip 行有足够横向空间不换行 */
.own-grid { display: grid; grid-template-columns: 0.75fr 2fr; gap: 28px; }
/* grid 子项默认 min-width:auto 会吸收不了 .own-node 的显式 min-width:580，
   单列布局（≤880）下整轨被撑到 ~728px → 全页横滚；归零让轨道随容器收缩 */
.own-grid > * { min-width: 0; }
@media (max-width: 880px) {
  .own-grid { grid-template-columns: 1fr; }
}

.own-text-block {
  background: var(--fg-strong);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.own-text-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.own-parse-btn {
  background: var(--ink-grad);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.own-parse-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,64,175,0.32); }
.own-parse-btn.done { background: var(--no-hit); }
.own-text-body {
  padding: 16px;
  position: relative;
  min-height: 180px;
  /* pre 长行（white-space:pre 保层级缩进）块内横滚，全宽度生效：
     881-1080 双列窄轨下也能滚动读取，不被 overflow:hidden 静默裁切 */
  overflow-x: auto;
}
.own-text-line {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #e2e8f0;
  line-height: 1.7;
  letter-spacing: 0.02em;
  /* 保留行首空格缩进，让多级股东的层级 visible */
  white-space: pre;
  min-height: 1.7em;
}
.own-text-blur { color: #64748b; filter: blur(2px); transition: filter 0.6s ease; }
.own-text-blur.clear { filter: blur(0); color: #cbd5e1; }
.own-text-comment { color: #475569; font-size: 10.5px; }
.own-text-meta { color: #64748b; font-size: 10.5px; }
.own-text-noise { color: #475569; font-style: italic; }
.own-scan {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(180deg, transparent, rgba(59,130,246,0.6), transparent);
  pointer-events: none;
  opacity: 0;
}
.own-scan.run {
  animation: ownScan 2s ease-in-out forwards;
}
@keyframes ownScan {
  0% { top: -30px; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.own-tree {
  position: relative;
  padding: 12px;
}
.own-derive-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* 0 → SVG 落到普通流之下，节点的 z-index:2 自然压住，避免连接线穿模卡片 */
  z-index: 0;
  overflow: visible;
}
/* hierarchy 灰线一旦 own-tree 节点出现就显示（用 .in 状态触发），不必等 derive-on；
   派生红色 overlay 只在 derive-on 时显示 */
#own-hierarchy-path { opacity: 0; transition: opacity 0.5s ease; }
.own-tree.has-tree #own-hierarchy-path { opacity: 1; }
#own-derive-path, #own-derive-flow { opacity: 0; transition: opacity 0.4s ease; }
.own-tree.derive-on #own-derive-path,
.own-tree.derive-on #own-derive-flow { opacity: 1; }
/* "彗星" 视觉：60 unit 长的可见段沿每条 elbow subpath 移动；用 solid 实色而非
   水平线性渐变——原渐变 (objectBoundingBox 模式) 在垂直段上 bbox.width=0 退化，
   导致垂直 segment 整段 transparent，是"只看到第一段"的真正成因 */
.own-tree.derive-on #own-derive-flow {
  stroke: var(--indirect-hit);
  stroke-opacity: 0.85;
  stroke-dasharray: 60 280;
  animation: deriveFlow 1.6s linear infinite;
}
@keyframes deriveFlow {
  from { stroke-dashoffset: 340; }
  to { stroke-dashoffset: 0; }
}
.own-node { z-index: 2; }
.own-node {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15,30,60,0.04);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  /* 节点宽度：让 5 chip 单行展开。chip 行实测 ~520px（含 3 个累积%）→ 加 padding+meta 行约 580px */
  min-width: 580px;
}
/* ≤880 节点瘦身——必须放在基础规则之后（同特异性后声明生效）：
   inline-flex 收缩适配不吃 min-width:0，改块级 flex 让节点宽度 = 树容器宽
   （层级 margin 缩进仍生效），chip 行由既有 flex-wrap 吸收 */
@media (max-width: 880px) {
  .own-node { min-width: 0; display: flex; }
}
.own-node.in { opacity: 1; transform: translateY(0); }
.own-node.critical {
  /* "direct sanctioned" 节点：用 hit 红强调（A、X），与 sublist-chip[data-variant="direct"] 同色系 */
  border-color: var(--hit-border);
  box-shadow: 0 0 0 3px rgba(185,28,28,0.08);
  background: var(--hit-bg);
}
.own-target {
  background: linear-gradient(135deg, rgba(30,64,175,0.06), rgba(99,130,190,0.04));
  border-color: var(--ink-strong);
}
/* 节点头部一行：名称 + 持股 + meta + （target 的 deemed badge） */
.own-node-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.own-node-label { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--fg-strong); }
.own-node-meta { font-family: var(--font-mono); font-size: 9px; color: var(--fg-muted); letter-spacing: 0.06em; margin-left: auto; }
.own-node-meta-person { color: var(--ink-strong); }
.own-node-pct { font-family: var(--font-mono); font-weight: 600; font-size: 12px; color: var(--ink-strong); }

/* sublist 徽章行 — 5 chip 横排，对齐产品 OwnershipScreeningMatrix 的节点卡视觉范式 */
.own-node-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sublist-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.55;
  border-radius: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: default;
}
.sublist-chip-abbr { font-weight: 700; letter-spacing: 0.3px; font-family: var(--font-mono); }
.sublist-chip-pct {
  margin-left: 2px;
  padding: 0 7px;
  font-size: 10px;
  line-height: 1.55;
  border-radius: 8px;
  background: rgba(194,65,12,0.10);
  color: var(--indirect-hit);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-family: var(--font-mono);
}
/* direct 红实心 — 对应 product 的 .sublist-chip[data-variant="direct"][data-status="HIT"] */
.sublist-chip[data-variant="direct"][data-status="HIT"] {
  background: var(--hit-bg);
  color: var(--hit);
  border-color: var(--hit-border);
}
/* indirect 橙虚线 + ↑ — 对应 product 同类样式 */
.sublist-chip[data-variant="indirect"] {
  background: transparent;
  color: var(--indirect-hit);
  border: 1px dashed var(--indirect-hit-border);
}
.sublist-chip[data-variant="indirect"]::before {
  content: "↑";
  display: inline-block;
  margin-right: 2px;
  font-weight: 700;
  opacity: 0.9;
}
/* sub-threshold 灰虚线 + 累积% 灰底 */
.sublist-chip[data-variant="sub-threshold"] {
  background: transparent;
  color: #94a3b8;
  border: 1px dashed rgba(15,30,60,0.18);
}
.sublist-chip[data-variant="sub-threshold"] .sublist-chip-abbr { color: #94a3b8; }
.sublist-chip[data-variant="sub-threshold"] .sublist-chip-pct {
  background: rgba(15,30,60,0.05);
  color: #94a3b8;
}
/* unmatched 中性占位 */
.sublist-chip[data-variant="unmatched"] {
  background: #fafafa;
  color: #cbd5e1;
  border: 1px solid rgba(15,30,60,0.06);
}
.sublist-chip[data-variant="unmatched"] .sublist-chip-abbr { color: #cbd5e1; }
.own-deemed-badge {
  background: var(--indirect-hit-bg);
  color: var(--indirect-hit);
  border: 1px solid var(--indirect-hit-border);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.own-deemed-badge.show { opacity: 1; transform: scale(1); }

/* 不同 depth 用 padding-left 阶梯缩进；视觉骨干由 SVG own-hierarchy-path 灰线承担，
   不再用容器 ::before 画"文件树骨干竖线"（避免与 SVG 红色派生线视觉重复） */
.own-shareholders {
  position: relative;
  display: flex;
  flex-direction: column;
}
.own-shareholders[data-depth="1"] { padding-left: 36px; }
.own-shareholders[data-depth="2"] { padding-left: 80px; }
.own-shareholders[data-depth="3"] { padding-left: 124px; }
@media (max-width: 480px) {
  /* 小屏阶梯减半：320 下 depth=3 节点可用宽从 66px 救回 ~141px，层级关系仍可读
     （SVG hierarchy 连线由 JS 按节点 rect 动态绘制，随缩进自适应） */
  .own-shareholders[data-depth="1"] { padding-left: 14px; }
  .own-shareholders[data-depth="2"] { padding-left: 32px; }
  .own-shareholders[data-depth="3"] { padding-left: 50px; }
}
.own-shareholder { align-self: flex-start; }
.own-person { background: rgba(30,64,175,0.04); }
/* SDN 红框强化：覆盖默认 critical 样式，让"被制裁节点"红色更明确 */
.own-node.sdn {
  border-color: var(--hit);
  background: var(--hit-bg);
  box-shadow: 0 0 0 3px rgba(185,28,28,0.10);
}
.own-node-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid currentColor;
}
.own-node-tag-sdn { color: var(--hit); background: white; }
.own-text-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--hit);
  background: rgba(185,28,28,0.16);
  border-radius: 3px;
  font-weight: 700;
}
.own-person-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--hit);
  background: var(--hit-bg);
  border: 1px solid var(--hit-border);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}

.juris-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 32px;
}
@media (max-width: 720px) { .juris-row { grid-template-columns: repeat(2, 1fr); } }
.juris-card {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
}
.juris-card.hit { background: var(--no-hit-bg); border-color: var(--no-hit); }
.juris-card.miss { background: var(--page-bg); border-color: var(--panel-border); opacity: 0.6; }
.juris-flag { font-size: 18px; }
.juris-name { font-family: var(--font-title); font-weight: 600; font-size: 13px; color: var(--fg-strong); margin-top: 4px; }
.juris-rule { font-size: 10px; color: var(--fg-muted); margin-top: 2px; }
.juris-result { margin-top: 8px; height: 18px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; opacity: 0; transition: opacity 0.4s ease; }
.juris-card.hit .juris-result { opacity: 1; color: var(--no-hit); }
.juris-card.miss .juris-result { opacity: 1; color: var(--fg-muted); }

.juris-caption { color: var(--fg-muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; margin-top: 16px; text-align: center; }

/* ============ ANIM 3 · NAME → LATIN ============ */
#stage-name { min-height: 630px; }
.name-input-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel-bg-alt);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 13px 18px;
  margin-bottom: 18px;
}
.name-input-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); flex-shrink: 0; }
.name-input-text {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: 0.02em;
}

.name-tokens {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 18px;
  min-height: 60px;
}
.name-tok {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-strong);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.35s ease;
}
.name-tok.in { opacity: 1; transform: translateY(0); }
.name-tok .tok-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 400;
  transition: color 0.4s ease;
}
/* 两阶段：.in 是统一入场态（白底+灰 tag），.resolved 是分类后视觉差异化态 */
.name-tok.resolved {
  transition: border-color 0.45s ease, background 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease, opacity 0.45s ease;
}
.name-tok-region.resolved { border-color: var(--review); background: var(--review-bg); }
.name-tok-region.resolved .tok-tag { color: var(--review); }
.name-tok-core.resolved {
  border-color: var(--indirect-hit);
  background: var(--indirect-hit-bg);
  box-shadow: 0 0 0 4px rgba(194,65,12,0.10);
  transform: translateY(0) scale(1.05);
}
.name-tok-core.resolved .tok-tag { color: var(--indirect-hit); }
.name-tok-industry.resolved { border-color: var(--review); background: var(--review-bg); }
.name-tok-industry.resolved .tok-tag { color: var(--review); }
.name-tok-suffix.resolved {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-color: var(--fg-muted);
}

.name-chips-wrap { text-align: center; margin-bottom: 16px; }
.name-chips-arrow { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); letter-spacing: 0.06em; margin-bottom: 10px; }
.name-chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  min-height: 40px;
  white-space: nowrap;
}
.name-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 5px 14px 5px 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.45s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
.name-chip.in { opacity: 1; transform: translateY(0); }
.chip-gen {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  border-radius: 3px;
  color: white;
  text-transform: uppercase;
}
/* 5 类 distinct pill 色板，避开 HIT 红 / REVIEW 蓝 / CLEAR 绿 / 命中橙 */
.chip-gen-AI     { background: #7c3aed; } /* violet */
.chip-gen-PINYIN { background: var(--ink-strong); } /* navy */
.chip-gen-TRANS  { background: #b45309; } /* amber */
.chip-gen-KB     { background: #0891b2; } /* cyan */
.chip-gen-USER   { background: #64748b; } /* slate */
/* 老 alias 保留，避免其它地方失效（暂未使用） */
.chip-gen-LLM    { background: #7c3aed; }
.chip-gen-RULE   { background: var(--ink-strong); }
.chip-text { font-size: 12px; color: var(--fg-strong); font-weight: 500; }
.chip-pri { font-size: 10px; color: var(--fg-muted); letter-spacing: 0.04em; }

.name-pipeline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
@media (max-width: 720px) { .name-pipeline { grid-template-columns: repeat(4, 1fr); } }
.name-pipe {
  background: var(--panel-bg-alt);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-strong);
}
.name-pipe i.dot-state {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(15,30,60,0.15);
  transition: all 0.3s ease;
}
.name-pipe.querying i.dot-state {
  background: var(--warn);
  animation: dotPulse 0.6s infinite;
}
.name-pipe.no i.dot-state { background: var(--no-hit); }
.name-pipe.hit { background: var(--hit-bg); border-color: var(--hit); }
.name-pipe.hit i.dot-state {
  background: var(--hit);
  box-shadow: 0 0 0 4px rgba(185,28,28,0.18);
  animation: hitPulse 1.2s infinite;
}
@keyframes hitPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(185,28,28,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(185,28,28,0); }
}

/* ---- chip state variants ---- */
.name-chip.matched {
  border: 1.5px solid var(--hit);
  background: var(--hit-bg);
  box-shadow: 0 0 0 4px rgba(185,28,28,0.10);
}
.name-chip.matched .chip-text { color: var(--hit); font-weight: 600; }
.name-chip.muted {
  opacity: 0.45;
  background: var(--panel-bg-alt);
}
.name-chip.muted .chip-text { color: var(--fg-muted); }

/* ---- decision block (Top-3 vertical, 2-row compact) + chip→pipe link ---- */
.name-decision-block {
  position: relative;
  margin-top: 8px;
}
.name-decision-head {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.name-link-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.name-decisions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.name-dec-card {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.name-dec-card.show { opacity: 1; transform: translateY(0); }
.name-dec-card-hit    { border-color: var(--hit);    background: var(--hit-bg); }
.name-dec-card-review { border-color: var(--review); background: var(--review-bg); }
.name-dec-card-clear  { border-color: var(--no-hit); background: var(--no-hit-bg); }

.name-dec-row1 {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.name-dec-rank {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: rgba(15,30,60,0.05);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.name-dec-row1 .chip-gen {
  flex-shrink: 0;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
}
.name-dec-mn {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.name-dec-card-hit    .name-dec-mn { color: var(--hit); }
.name-dec-card-review .name-dec-mn { color: var(--review); }
.name-dec-mn.name-dec-empty {
  color: var(--fg-muted);
  font-style: italic;
  font-weight: 400;
}

.name-dec-row2 { display: flex; align-items: center; gap: 12px; padding-left: 2px; }
.name-score-bar {
  position: relative;
  flex: 1;
  height: 8px;
  background: rgba(15,30,60,0.08);
  border-radius: 4px;
}
.name-score-bar-empty { background: rgba(15,30,60,0.04); }
.name-score-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
}
.name-dec-card-hit    .name-score-fill { background: var(--hit); }
.name-dec-card-review .name-score-fill { background: var(--review); }
.name-score-threshold {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: rgba(15,30,60,0.55);
  border-radius: 1px;
}
.name-score-thr-label {
  position: absolute;
  top: 12px;
  font-size: 9px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform: translateX(-50%);
}
.name-score-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-strong);
  font-weight: 600;
  min-width: 64px;
  text-align: right;
  flex-shrink: 0;
}
.name-dec-card-clear .name-score-val { color: var(--fg-muted); }

/* 决策卡里 badge 用 filled 形态以便和浅色卡片背景区分 */
.name-dec-card .badge {
  color: white;
  border: 1px solid transparent;
  padding: 3px 10px;
  font-weight: 600;
}
.name-dec-card .badge-hit    { background: var(--hit);    }
.name-dec-card .badge-review { background: var(--review); }
.name-dec-card .badge-clear  { background: var(--no-hit); }

/* link path draw-on */
.name-link-path {
  fill: none;
  stroke: var(--hit);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 600);
  stroke-dashoffset: var(--len, 600);
  transition: stroke-dashoffset 0.7s ease;
}
/* 插入到加 .drawn 之间禁 transition：getTotalLength() 会强制重算，
   若 transition 生效，会把 CSS 兜底值 600（--len 未设时的 var 回落）登记为起点，
   先播一段「600→len 幻影尾段」再播「len→0」——同一元素播两遍（2026-07-28 Opus 复核 + 采样实锤）。
   无 .drawn 时一切变化瞬时提交；.drawn 落下的同一帧 transition 生效，恰好播一次 len→0。 */
.name-link-path:not(.drawn) { transition: none; }
/* marker-end 由 JS 在 draw-on 完成（transitionend）后挂——SVG marker 无视 dashoffset，
   插入即挂会让箭头先于线段出现在决策卡上（同 laser 模式，anim.js buildDomesticLaserPath）。 */
.name-link-path.drawn { stroke-dashoffset: 0; }

/* ============ ANIM 5 · EVIDENCE ============ */
#stage-evid { min-height: 680px; }
.ev-browsers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (max-width: 720px) { .ev-browsers { grid-template-columns: repeat(2, 1fr); } }
.ev-browser {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  height: 168px;
}
.ev-browser-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--page-bg); border-bottom: 1px solid var(--panel-border); }
.ev-dots { display: flex; gap: 3px; }
.ev-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(15,30,60,0.20); }
.ev-url { font-size: 10px; color: var(--fg-muted); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-browser-body { padding: 8px 10px; position: relative; height: calc(100% - 28px); display: flex; flex-direction: column; gap: 5px; }
.ev-search-row { display: flex; gap: 5px; font-size: 11px; color: var(--fg-strong); }
.ev-search-row > span:first-child { color: var(--fg-muted); }
.ev-search-text { font-weight: 600; }
.ev-audit-banner {
  background: var(--ink-soft);
  color: var(--ink-strong);
  border-left: 2px solid var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 8.5px;
  padding: 4px 6px;
  letter-spacing: 0.04em;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(-4px) scale(0.92);
  transition: opacity 0.32s ease, transform 0.32s ease, box-shadow 0.3s ease;
}
.ev-audit-banner b { font-weight: 600; }
.ev-browser.banner-injected .ev-audit-banner { opacity: 1; transform: translateY(0) scale(1); }
.ev-browser.banner-flash .ev-audit-banner {
  box-shadow: 0 0 0 2px rgba(30,64,175,0.32), 0 0 12px rgba(30,64,175,0.40);
}
.ev-results { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
.ev-result-line {
  height: 9px;
  background: rgba(15,30,60,0.08);
  border-radius: 2px;
  width: 100%;
}
.ev-result-line.ev-result-hl {
  background: rgba(180,83,9,0.20);
  width: 80%;
  opacity: 0;
  transition: opacity 0.3s ease 0.4s;
}
.ev-browser.queried .ev-result-hl { opacity: 1; }
.ev-shutter {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
}
.ev-browser.shutter .ev-shutter {
  animation: shutterFlash 0.5s ease;
}
@keyframes shutterFlash {
  0% { opacity: 0; }
  30% { opacity: 0.95; }
  100% { opacity: 0; }
}
/* CNRL 本地库卡：通栏整行，与 6 个境外浏览器卡区分——证据是匹配快照不是页面截图 */
.ev-browser-local { grid-column: 1 / -1; height: 132px; }
.ev-db-icon { display: inline-flex; align-items: center; color: var(--ink-strong); }
.ev-browser-local .ev-result-line { width: 62%; }

/* ============ FEATURE 04 · DigiCert signed card · cursor · dossier modal ============ */

/* outer stage needs overflow:hidden so the modal absolute positioning is clipped */
#stage-evid { overflow: hidden; }

.ev-browser { transition: border-color 0.3s, box-shadow 0.3s; }
.ev-browser.queried { border-color: var(--panel-border-hover); }
.ev-browser.target {
  box-shadow: 0 0 0 2px var(--ink-strong);
  animation: evCellPulse 1.2s ease-in-out infinite;
}
@keyframes evCellPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--ink-strong); }
  50% { box-shadow: 0 0 0 5px rgba(30,64,175,0.32); }
}

/* DigiCert RFC 3161 signed metadata card · 视觉重量与 6 浏览器网格匹配 */
.ev-tsa-final {
  display: flex; align-items: center; justify-content: center; gap: 36px;
  padding: 28px 32px; background: var(--panel-bg-alt); border-radius: 12px;
  border: 1px solid var(--panel-border); opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(8px);
  max-width: 820px; margin: 0 auto;
}
.ev-tsa-final.show { opacity: 1; transform: translateY(0); }
.ev-tsa-final-circle {
  width: 144px; height: 144px; border-radius: 50%;
  background: var(--no-hit-bg); border: 4px solid var(--no-hit);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); color: var(--no-hit); font-weight: 600;
  flex-shrink: 0; position: relative;
}
.ev-tsa-final-circle::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid var(--no-hit); opacity: 0;
  animation: evRingPulse 1.8s ease-out infinite;
}
.ev-tsa-final.show .ev-tsa-final-circle::before { opacity: 1; }
@keyframes evRingPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.34); opacity: 0; }
}
.ev-tsa-final-circle .top { font-size: 11px; letter-spacing: 0.14em; }
.ev-tsa-final-circle .mid { font-size: 19px; line-height: 1; margin: 5px 0; }
.ev-tsa-final-circle .bot { font-size: 12px; letter-spacing: 0.08em; }
.ev-tsa-final-meta {
  display: flex; flex-direction: column; gap: 10px; flex: 1; max-width: 480px;
  font-family: var(--font-body); font-size: 13px; color: var(--fg-strong);
}
.ev-tsa-final-meta .row { display: flex; gap: 12px; align-items: center; }
.ev-tsa-final-meta .label {
  color: var(--fg-muted); width: 115px; flex-shrink: 0;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ev-tsa-final-meta .val { color: var(--fg-strong); }
.ev-tsa-final-meta .val.mono { font-family: var(--font-mono); font-size: 12px; }
.ev-tsa-final-actions { gap: 8px !important; padding-top: 6px; }
.ev-tsa-final-actions .label { display: none; }
.ev-tsa-final-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: white; border: 1px solid var(--no-hit-border);
  color: var(--no-hit); font-family: var(--font-mono); font-size: 11.5px;
  font-weight: 600; letter-spacing: 0.04em; cursor: pointer; text-decoration: none;
}
.ev-tsa-final-chip-icon { font-size: 12px; line-height: 1; }

/* fake cursor + click ring (positioned within #stage-evid which is position:relative) */
.ev-cursor {
  position: absolute; width: 18px; height: 22px; pointer-events: none;
  z-index: 50; opacity: 0; transition: opacity 0.3s;
}
.ev-cursor.show { opacity: 1; }
.ev-cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.ev-click-ring {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--ink-strong); transform: translate(-50%,-50%) scale(0);
  pointer-events: none; z-index: 49; opacity: 0;
}
.ev-click-ring.fire { animation: evClickBurst 0.95s ease-out forwards; }
@keyframes evClickBurst {
  0% { transform: translate(-50%,-50%) scale(0.4); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2.6); opacity: 0; }
}

/* Dossier modal overlay + frame (covers entire stage when open) */
.ev-dossier-overlay {
  position: absolute; inset: 0; background: rgba(15,30,60,0.32);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none; z-index: 20;
  border-radius: 12px;
}
.ev-dossier-overlay.show { opacity: 1; }
.ev-dossier-modal {
  /* 固定高度 + 垂直居中，不再 inset:16px 随 stage 拉伸——CNRL 通栏卡把 stage
     从 680(min-height 下限) 撑到 780，modal 若跟随会多出 ~132px 底部留白。
     648 = 680 - 2×16，即加卡前的原始几何；max-height 兜底小 stage。
     translate 属性居中与 open 动画的 transform 叠加不冲突。 */
  position: absolute; left: 16px; right: 16px; top: 50%; bottom: auto;
  translate: 0 -50%;
  height: 648px; max-height: calc(100% - 32px);
  background: white; border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15,30,60,0.18);
  border: 1px solid var(--panel-border);
  opacity: 0; transform: translateY(20px) scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none; z-index: 30;
  display: grid; grid-template-rows: auto 1fr;
  overflow: hidden;
}
.ev-dossier-modal.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.ev-dossier-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--panel-border);
  background: var(--panel-bg-alt); gap: 16px;
}
.ev-dossier-head-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-dossier-eyebrow {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-strong); font-weight: 600;
}
.ev-dossier-title {
  font-family: var(--font-title); font-weight: 600; font-size: 17px;
  color: var(--fg-strong);
}
.ev-dossier-title .div { color: var(--fg-muted); }
.ev-dossier-title .src { color: var(--ink-strong); }
.ev-dossier-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ev-dossier-skel-btn {
  font-family: var(--font-mono); font-size: 10px;
  padding: 5px 12px; border-radius: 6px;
  background: white; border: 1px solid var(--panel-border);
  color: var(--fg-strong); letter-spacing: 0.04em;
}
.ev-dossier-skel-btn-close { background: var(--fg-strong); color: white; border-color: var(--fg-strong); }
.ev-dossier-nav-idx {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-muted);
  letter-spacing: 0.06em; padding: 0 4px;
}

.ev-dossier-body {
  display: grid; grid-template-columns: 270px 1fr;
  min-height: 0;
}
@media (max-width: 820px) { .ev-dossier-body { grid-template-columns: 1fr; } }

/* ≤640 弹窗头部两行化：head-actions（翻页+关闭 ≈240px, flex-shrink:0）会把
   head-left 挤到 ~74px → eyebrow/公司名逐字竖排。wrap 后 head-left 独占行 1 恢复全宽，
   actions 落行 2；壳保持 stage 相对定位（top:50% + max-height:100%-32px），不用 dvh。 */
@media (max-width: 640px) {
  .ev-dossier-head { flex-wrap: wrap; row-gap: 10px; }
  .ev-dossier-head-left { flex: 1 1 100%; }
  /* 单列 body 里 wsp 骨架面板改限高内滚，避免挤占右侧证据区 */
  .ev-wsp-skel { max-height: 200px; border-right: none; border-bottom: 1px solid var(--panel-border); }
}
@media (max-width: 480px) {
  /* 纯装饰 skeleton（WorksheetSidePanel 骨架条），极小屏隐去保证据正文 */
  .ev-wsp-skel { display: none; }
}

/* LEFT: WorksheetSidePanel skeleton */
.ev-wsp-skel {
  border-right: 1px solid var(--panel-border);
  background: var(--panel-bg-alt);
  padding: 14px;
  overflow: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.ev-wsp-skel-section { display: flex; flex-direction: column; gap: 6px; }
.ev-wsp-skel-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--fg-muted);
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
}
.ev-wsp-skel-card {
  background: white; border: 1px solid var(--panel-border);
  border-radius: 6px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.ev-wsp-skel-card-ts { border-color: var(--no-hit-border); }
.ev-wsp-skel-bar {
  height: 8px; background: rgba(15,30,60,0.10); border-radius: 2px;
}
.ev-wsp-skel-bar.sub { height: 6px; opacity: 0.7; }
/* 复核判定的"下拉选择" + "理由 textarea" skeleton —— 表单容器里要有可见的内填 skeleton 条 */
.ev-wsp-skel-select {
  display: flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 10px;
  background: white; border: 1px solid var(--panel-border); border-radius: 6px;
}
.ev-wsp-skel-select-bar {
  flex: 1; height: 8px; border-radius: 2px;
  background: rgba(15,30,60,0.10);
}
.ev-wsp-skel-select-arrow {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); flex-shrink: 0;
}
.ev-wsp-skel-textarea {
  background: white; border: 1px solid var(--panel-border); border-radius: 6px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 7px;
  min-height: 64px;
}
.ev-wsp-skel-line {
  display: block; height: 7px; border-radius: 2px;
  background: rgba(15,30,60,0.10);
}
.ev-wsp-skel-line.w-50 { width: 50%; }
.ev-wsp-skel-line.w-75 { width: 75%; }
.ev-wsp-skel-line.w-90 { width: 90%; }
.ev-wsp-skel-bar.w-50 { width: 50%; }
.ev-wsp-skel-bar.w-55 { width: 55%; }
.ev-wsp-skel-bar.w-58 { width: 58%; }
.ev-wsp-skel-bar.w-60 { width: 60%; }
.ev-wsp-skel-bar.w-65 { width: 65%; }
.ev-wsp-skel-bar.w-70 { width: 70%; }
.ev-wsp-skel-bar.w-80 { width: 80%; }
.ev-wsp-skel-bar.w-100 { width: 100%; }

.ev-wsp-skel-row {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center;
  padding: 5px 8px; background: white; border: 1px solid var(--panel-border);
  border-radius: 5px;
}
.ev-wsp-skel-fmt {
  font-family: var(--font-mono); font-size: 8px; font-weight: 700;
  letter-spacing: 0.06em; padding: 2px 0; border-radius: 3px;
  text-align: center; line-height: 1.3;
}
.ev-wsp-skel-fmt.png  { background: #fef3c7; color: #92400e; border: 1px solid rgba(146,64,14,0.18); }
.ev-wsp-skel-fmt.html { background: #dbeafe; color: #1e40af; border: 1px solid rgba(30,64,175,0.18); }
.ev-wsp-skel-fmt.json { background: #e0e7ff; color: #4338ca; border: 1px solid rgba(67,56,202,0.18); }
.ev-wsp-skel-fmt.pem  { background: #dcfce7; color: #166534; border: 1px solid rgba(22,101,52,0.18); }
.ev-wsp-skel-meta { font-family: var(--font-mono); font-size: 9px; color: var(--fg-muted); }
.ev-wsp-skel-ts-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ev-wsp-skel-ts-badge {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--no-hit); color: var(--no-hit);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; line-height: 1;
  flex-shrink: 0;
}
.ev-wsp-skel-chip-row { display: flex; gap: 6px; margin-top: 6px; }
.ev-wsp-skel-chip {
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--no-hit-bg); color: var(--no-hit);
  border: 1px solid var(--no-hit-border); font-weight: 600;
  letter-spacing: 0.04em;
}
.ev-wsp-skel-button {
  background: var(--ink-strong); color: white;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; padding: 8px; text-align: center; border-radius: 6px;
  margin-top: 4px;
}

/* RIGHT: neutral simulated screenshot — colored skeletons + minimal UI labels */
.ev-shot-pane {
  padding: 14px; background: var(--panel-bg-alt);
  overflow: auto;
}
.ev-shot-frame {
  background: white; border: 1px solid var(--panel-border);
  border-radius: 6px; overflow: hidden;
}
.ev-shot-audit-banner {
  background: var(--ink-soft); color: var(--ink-strong);
  font-size: 10px; padding: 5px 10px;
  border-left: 3px solid var(--ink-strong);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--panel-border);
}
.ev-shot-audit-banner b { font-weight: 600; }
.ev-shot-site-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: white;
  border-bottom: 1px solid #e6e9ee;
}
.ev-shot-logo {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  flex-shrink: 0;
}
.ev-shot-nav { display: flex; gap: 6px; flex-shrink: 0; }
.ev-shot-nav-pill {
  width: 36px; height: 8px; border-radius: 4px;
  background: rgba(15,30,60,0.10);
}
.ev-shot-crumb {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: #fafafa;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 10px;
}
.ev-shot-sep { color: #cbd5e1; font-size: 11px; }

/* generic skeleton bar */
.ev-shot-bar {
  display: inline-block; height: 8px;
  background: rgba(15,30,60,0.10); border-radius: 2px;
  vertical-align: middle;
}
.ev-shot-bar.sm { height: 6px; }
.ev-shot-bar.sub { height: 6px; opacity: 0.55; }
.ev-shot-bar.dark { background: rgba(15,30,60,0.32); height: 11px; border-radius: 3px; }
.ev-shot-bar.hit { background: rgba(185,28,28,0.55); }
.ev-shot-bar.active { background: rgba(30,64,175,0.45); }
.ev-shot-bar.w-40 { width: 40px; }
.ev-shot-bar.w-50 { width: 50px; }
.ev-shot-bar.w-55 { width: 130px; }
.ev-shot-bar.w-60 { width: 150px; }
.ev-shot-bar.w-70 { width: 180px; }
.ev-shot-bar.w-80 { width: 80px; }
.ev-shot-bar.w-90 { width: 240px; }
.ev-shot-bar.w-100 { width: 100px; }

.ev-shot-content { padding: 14px 16px 16px; }
.ev-shot-h1 {
  width: 200px; height: 18px; border-radius: 3px;
  background: rgba(15,30,60,0.18); margin-bottom: 6px;
}
.ev-shot-lead {
  width: 280px; height: 8px; border-radius: 2px;
  background: rgba(15,30,60,0.10); margin-bottom: 14px;
}
.ev-shot-search-bar {
  display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: stretch;
  border: 1px solid #c8cdd5; border-radius: 4px;
  overflow: hidden; margin-bottom: 10px;
  background: white;
}
.ev-shot-search-icon {
  display: flex; align-items: center; padding: 0 10px;
  color: #94a3b8; font-size: 14px; background: white;
  border-right: 1px solid #e6e9ee;
}
.ev-shot-search-input {
  display: flex; align-items: center; padding: 8px 10px; min-height: 30px;
}
.ev-shot-search-input::after {
  content: ""; flex: 1; height: 8px; border-radius: 2px;
  background: rgba(15,30,60,0.10);
}
.ev-shot-search-source {
  padding: 8px 12px; font-size: 11px; color: #94a3b8;
  background: #fafbfc; border-left: 1px solid #e6e9ee;
  display: flex; align-items: center;
}
.ev-shot-search-btn {
  padding: 8px 18px; background: #475569; color: white;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  display: flex; align-items: center;
}
.ev-shot-result-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0 10px;
  font-size: 11px; color: #64748b;
  border-bottom: 1px solid #e6e9ee;
}
.ev-shot-result-meta b { color: var(--fg-strong); }
.ev-shot-sort { color: #64748b; }
.ev-shot-results { list-style: none; padding: 0; margin: 0; }
.ev-shot-row { padding: 10px 0; border-bottom: 1px solid #f0f1f4; }
.ev-shot-row:last-child { border-bottom: none; }
.ev-shot-row-hit {
  background: linear-gradient(90deg, rgba(185,28,28,0.05), transparent 60%);
  margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  border-left: 3px solid var(--hit);
  border-bottom-color: rgba(185,28,28,0.12);
}
.ev-shot-row-name {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.ev-shot-row-flag {
  display: inline-block; font-family: var(--font-mono); font-size: 8.5px;
  background: var(--hit); color: white;
  padding: 2px 6px; border-radius: 3px; letter-spacing: 0.08em;
  font-weight: 700;
}
.ev-shot-row-tags {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.ev-shot-chip-tag {
  display: inline-block; width: 56px; height: 14px; border-radius: 3px;
}
.ev-shot-chip-tag.c1 { background: #fef3c7; border: 1px solid rgba(146,64,14,0.20); }
.ev-shot-chip-tag.c2 { background: #fee2e2; border: 1px solid rgba(153,27,27,0.20); }
.ev-shot-chip-tag.c3 { background: #e0e7ff; border: 1px solid rgba(55,48,163,0.20); }
.ev-shot-row-aliases { margin-top: 6px; }

/* =========================================================
   END-TO-END FLOW · TOKEN ANIMATION (flow-token-*)
   8 卡 4×2 grid + SVG 路径 + 单 token 沿路径循环 + 每卡产物微动画。
   token 经过哪张卡 → 该卡 .is-active → 微动画 animation-play-state 启动。
   ========================================================= */

.flow-token {
  position: relative;
  /* .flow grid 已经给 4×2，不需重复声明，但要给 SVG 一个相对参照系 */
}
/* 行 2 视觉反序 → token 顺时针走过 = 卡序 1→2→3→4→5→6→7→8。
   仅在 4 列 grid 下生效；窄屏退化时由媒体查询覆盖。 */
@media (min-width: 901px) {
  .flow-token-card[data-step="5"] { grid-row: 2; grid-column: 4; }
  .flow-token-card[data-step="6"] { grid-row: 2; grid-column: 3; }
  .flow-token-card[data-step="7"] { grid-row: 2; grid-column: 2; }
  .flow-token-card[data-step="8"] { grid-row: 2; grid-column: 1; }
}
.flow-token-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.flow-token-path path {
  fill: none;
  stroke: rgba(30, 64, 175, 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}
.flow-token-card {
  position: relative;
  z-index: 2;
  /* 加 token 经过时的高亮 */
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.flow-token-card.is-active {
  border-color: var(--ink-strong);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08), 0 4px 16px rgba(15, 30, 60, 0.06);
}

.flow-token-dot {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-strong);
  pointer-events: none;
  /* 由 JS RAF 推 transform: translate3d(...) */
  top: 0;
  left: 0;
  box-shadow:
    0 0 0 4px rgba(30, 64, 175, 0.18),
    0 0 12px rgba(30, 64, 175, 0.45);
}

/* -- micro-vis 公共 --------------------------------------- */
.flow-token-mv {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(15, 30, 60, 0.06);
  min-height: 38px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  /* 微动画在所有卡上一直循环；token 走过仅 .is-active 加边框/glow */
}
.ftk-meta {
  font-size: 9px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin-top: 6px;
  width: 100%;
}


/* -- 01 录入 · 文本闪光 ----------------------------------- */
.flow-token-mv-text { flex-direction: column; align-items: stretch; gap: 4px; }
.ftk-line {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ink-soft) 0%, transparent 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
  animation: ftk-line-shimmer 2.6s ease-in-out infinite;
}
.ftk-line:nth-child(1) { width: 92%; animation-delay: 0s; }
.ftk-line:nth-child(2) { width: 76%; animation-delay: 0.4s; }
.ftk-line:nth-child(3) { width: 88%; animation-delay: 0.8s; }
@keyframes ftk-line-shimmer {
  0%   { background-position: 100% 0; }
  60%  { background-position: -50% 0; }
  100% { background-position: -120% 0; }
}

/* -- 02 解析 · chip 弹出 ---------------------------------- */
.flow-token-mv-chips { gap: 4px; }
.ftk-chip {
  display: inline-block;
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--ink-soft);
  color: var(--ink-strong);
  border: 1px solid rgba(30, 64, 175, 0.12);
  opacity: 0;
  transform: translateY(4px);
  animation: ftk-chip-pop 3s ease infinite;
  letter-spacing: 0;
}
.ftk-chip:nth-child(1) { animation-delay: 0s; }
.ftk-chip:nth-child(2) { animation-delay: 0.5s; }
.ftk-chip:nth-child(3) { animation-delay: 1s; }
.ftk-chip:nth-child(4) { animation-delay: 1.5s; }
@keyframes ftk-chip-pop {
  0%, 80%, 100% { opacity: 0; transform: translateY(4px); }
  10%, 65% { opacity: 1; transform: translateY(0); }
}

/* -- 03 确认 · 复选行 ✓ ---------------------------------- */
.flow-token-mv-checks { flex-direction: column; align-items: stretch; gap: 5px; }
.ftk-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-muted);
  opacity: 0.55;
  animation: ftk-row-check 3.2s ease infinite;
}
.ftk-row:nth-child(1) { animation-delay: 0s; }
.ftk-row:nth-child(2) { animation-delay: 0.5s; }
.ftk-row:nth-child(3) { animation-delay: 1s; }
.ftk-row:nth-child(4) { animation-delay: 1.5s; }
.ftk-box {
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--panel-border);
  border-radius: 2px;
  position: relative;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.ftk-row-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes ftk-row-check {
  0%, 70%, 100% { opacity: 0.55; color: var(--fg-muted); }
  20%, 60% { opacity: 1; color: var(--fg-strong); }
}
/* checked 状态用 sibling-aware keyframe 给 box 上色 */
.flow-token-card.is-active .ftk-row {
  /* 让 box 在动画 mid-phase 染色 */
}
.ftk-row::after {
  /* 用 ::after 代替 box::after，因为我们想做 row 级别的动画 */
}
.ftk-box {
  animation: ftk-box-fill 3.2s ease infinite;
}
.flow-token-mv-checks .ftk-row:nth-child(1) .ftk-box { animation-delay: 0s; }
.flow-token-mv-checks .ftk-row:nth-child(2) .ftk-box { animation-delay: 0.5s; }
.flow-token-mv-checks .ftk-row:nth-child(3) .ftk-box { animation-delay: 1s; }
.flow-token-mv-checks .ftk-row:nth-child(4) .ftk-box { animation-delay: 1.5s; }
@keyframes ftk-box-fill {
  0%, 70%, 100% { background: transparent; border-color: var(--panel-border); }
  20%, 60% { background: var(--ink-strong); border-color: var(--ink-strong); }
}

/* -- 04 筛查 · 6 dot 多色 -------------------------------- */
.flow-token-mv-sources { gap: 6px; flex-wrap: wrap; }
.ftk-src {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  color: var(--fg-muted);
}
.ftk-src .ftk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--panel-border);
  display: block;
  animation: ftk-dot-light 3s ease infinite;
}
.ftk-src-clear .ftk-dot { animation-name: ftk-dot-light-clear; }
.ftk-src-review .ftk-dot { animation-name: ftk-dot-light-review; }
.ftk-src-error .ftk-dot { animation-name: ftk-dot-light-error; }
.ftk-src-name { letter-spacing: 0.04em; }
.ftk-src:nth-child(1) .ftk-dot { animation-delay: 0s; }
.ftk-src:nth-child(2) .ftk-dot { animation-delay: 0.18s; }
.ftk-src:nth-child(3) .ftk-dot { animation-delay: 0.36s; }
.ftk-src:nth-child(4) .ftk-dot { animation-delay: 0.54s; }
.ftk-src:nth-child(5) .ftk-dot { animation-delay: 0.72s; }
.ftk-src:nth-child(6) .ftk-dot { animation-delay: 0.9s; }
@keyframes ftk-dot-light-clear {
  0%, 30%, 100% { background: var(--panel-border); box-shadow: none; }
  40%, 90% { background: var(--no-hit); box-shadow: 0 0 6px rgba(21, 128, 61, 0.5); }
}
@keyframes ftk-dot-light-review {
  0%, 30%, 100% { background: var(--panel-border); box-shadow: none; }
  40%, 90% { background: var(--review); box-shadow: 0 0 6px rgba(3, 105, 161, 0.55); }
}
@keyframes ftk-dot-light-error {
  0%, 30%, 100% { background: var(--panel-border); box-shadow: none; }
  40%, 90% { background: var(--source-error); box-shadow: 0 0 6px rgba(124, 58, 237, 0.55); }
}
/* 04 · 800 ms 轮询节拍器（替代旧 ftk-meta，强化"轮询节奏"语义） */
.ftk-pulse {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
}
.ftk-pulse-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-soft);
  position: relative;
  overflow: hidden;
}
.ftk-pulse-bar::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent 0%, var(--ink-strong) 50%, transparent 100%);
  animation: ftk-pulse-sweep 0.8s linear infinite;
}
@keyframes ftk-pulse-sweep {
  from { left: -30%; }
  to   { left: 100%; }
}
.ftk-pulse-tick {
  font-size: 8.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* -- 05 取证 · mini 显示器 + 完整网页 + 咔嚓 + 截图飞向档案柜 -- */
.flow-token-mv-capture {
  position: relative;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 4px 0 0;
  min-height: 180px;
  overflow: visible;
}
/* 显示器外壳 — 收窄到 165，留出空间给档案柜 */
.ftk-monitor {
  position: relative;
  flex: 0 0 auto;
  width: 165px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 关键：visible 让飞行的网页能"穿出"屏幕进入档案柜 */
  overflow: visible;
}
/* iMac 风格屏幕：16:10 横向比例，下边带 chin（深色边） */
.ftk-monitor-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #1f2937;
  border: 2px solid #94a3b8;
  border-radius: 6px 6px 2px 2px;
  padding: 3px 3px 9px 3px;
  display: flex;
  flex-direction: column;
  /* visible：让 ftk-www 飞行时能溢出屏幕；ftk-flash 用 mask 限制在 screen 内 */
  overflow: visible;
  box-shadow: 0 1px 2px rgba(15,30,60,0.10), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.ftk-monitor-screen::after {
  /* 屏幕光泽 */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
  pointer-events: none;
}
/* iMac 风格脖颈 + 底盘：用 flex column 让 ::before/::after 真居中（避免子比父宽时 margin auto 不生效） */
.ftk-monitor-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  width: auto;
  height: auto;
  margin-top: 0;
  border-radius: 0;
}
.ftk-monitor-stand::before {
  /* 脖颈（细长上段连屏幕） */
  content: "";
  width: 22px;
  height: 7px;
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
  border-radius: 0 0 2px 2px;
}
.ftk-monitor-stand::after {
  /* 椭圆底盘（宽扁，深一点，让形状清晰） */
  content: "";
  width: 64px;
  height: 5px;
  background: radial-gradient(ellipse at center, #94a3b8 0%, #475569 100%);
  border-radius: 50%;
  box-shadow: 0 1px 1px rgba(15,30,60,0.18);
  margin-top: -1px;
}
/* mini 网页 (被截屏对象) */
.ftk-www {
  background: white;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  z-index: 6;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* transform-origin 中心 + linear timing：飞行段 keyframe 自带 ease，linear 让插值平滑无突变 */
  animation: ftk-www-snap-and-fly 4s linear infinite;
  transform-origin: 50% 50%;
}
.ftk-www-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  background: #f3f4f7;
  border-bottom: 1px solid var(--panel-border);
}
.ftk-www-dots {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.ftk-www-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.ftk-www-dots i:nth-child(1) { background: rgba(185,28,28,0.55); }
.ftk-www-dots i:nth-child(2) { background: rgba(180,83,9,0.55); }
.ftk-www-dots i:nth-child(3) { background: rgba(21,128,61,0.60); }
.ftk-www-url {
  font-size: 7px;
  color: var(--fg-muted);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ftk-www-body {
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-height: 0;
}
.ftk-www-row {
  height: 5px;
  border-radius: 2px;
  background: var(--ink-soft);
  width: 100%;
  /* 行依次淡入仿页面加载 */
  opacity: 0;
  animation: ftk-www-row-load 4s ease infinite;
}
.ftk-www-row-h {
  height: 8px;
  width: 60%;
  background: linear-gradient(90deg, var(--fg-strong) 0%, var(--fg-main) 100%);
}
.ftk-www-row-search {
  height: 12px;
  border: 1px solid var(--panel-border);
  background: #f8f9fb;
  border-radius: 3px;
  width: 80%;
}
.ftk-www-row-hit {
  background: linear-gradient(90deg, rgba(30,64,175,0.35) 0%, rgba(30,64,175,0.18) 100%);
  width: 90%;
}
.ftk-www-body .ftk-www-row:nth-child(1) { animation-delay: 0s; }
.ftk-www-body .ftk-www-row:nth-child(2) { animation-delay: 0.15s; }
.ftk-www-body .ftk-www-row:nth-child(3) { animation-delay: 0.30s; }
.ftk-www-body .ftk-www-row:nth-child(4) { animation-delay: 0.45s; }
.ftk-www-body .ftk-www-row:nth-child(5) { animation-delay: 0.60s; }
@keyframes ftk-www-row-load {
  0% { opacity: 0; transform: translateX(-3px); }
  /* 0-22% 加载阶段 */
  18%, 65% { opacity: 1; transform: translateX(0); }
  /* 65% 后跟随 ftk-www 飞走 → reset */
  80%, 100% { opacity: 0; transform: translateX(-3px); }
}
@keyframes ftk-www-snap-and-fly {
  0%, 18% { transform: translate(0, 0) scale(1); opacity: 1; }
  /* 22%: 咔嚓压扁 (v5 自然写法) */
  22% { transform: translate(0, 1px) scale(0.97); opacity: 1; }
  25%, 60% { transform: translate(0, 0) scale(1); opacity: 1; }
  /* 65-92% 飞向立柜 — 7 段密集 keyframe + linear timing，
     插值连续无突变；按抛物线减速曲线规划 (translate 等差递增减小)。
     新布局：dx≈128 dy≈2（vault 加宽并 stretch 后基本等高，少量 Y 漂移即可） */
  64% { transform: translate(0, 0) scale(1); opacity: 1; }
  68% { transform: translate(19px, 1px) scale(0.82); opacity: 1; }
  72% { transform: translate(43px, 3px) scale(0.65); opacity: 1; }
  76% { transform: translate(67px, 4px) scale(0.50); opacity: 1; }
  80% { transform: translate(87px, 5px) scale(0.38); opacity: 0.95; }
  84% { transform: translate(103px, 6px) scale(0.28); opacity: 0.80; }
  88% { transform: translate(115px, 8px) scale(0.20); opacity: 0.50; }
  92%, 100% { transform: translate(123px, 9px) scale(0.16); opacity: 0; }
}
/* 全屏白闪 — 限制在 screen 范围内 */
.ftk-flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  border-radius: 2px;
  animation: ftk-flash-burst 4s ease infinite;
}
@keyframes ftk-flash-burst {
  0%, 18%, 28%, 100% { opacity: 0; }
  20%, 22% { opacity: 0.9; }
}
/* 档案柜（独立立柜，与显示器并列在右侧）— 收回到 60px 宽并垂直居中 */
.ftk-vault {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 7px 6px 7px;
  background: linear-gradient(180deg, var(--ink-soft) 0%, #d4dceb 100%);
  border: 1.5px solid var(--ink-strong);
  border-radius: 4px;
  z-index: 4;
  align-self: center;
  box-shadow: 0 1px 2px rgba(30,64,175,0.15);
}
.ftk-vault-lip {
  /* 柜顶把手 */
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 4px;
  background: var(--ink-strong);
  border-radius: 2px 2px 0 0;
}
.ftk-vault-slot {
  display: block;
  height: 10px;
  background: white;
  border-radius: 2px;
  border: 1px solid rgba(30,64,175,0.20);
  animation: ftk-vault-tuck 4s ease infinite;
  position: relative;
}
.ftk-vault-slot::before {
  /* slot 抽屉拉手 */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 1px;
  background: rgba(30,64,175,0.30);
  border-radius: 1px;
}
.ftk-vault-slot:nth-child(2) { animation-delay: 0.05s; }
.ftk-vault-slot:nth-child(3) { animation-delay: 0.10s; }
.ftk-vault-slot:nth-child(4) { animation-delay: 0.15s; }
@keyframes ftk-vault-tuck {
  0%, 80%, 100% { background: white; transform: scaleX(1); }
  /* 截图飞入时 (~85%) 整柜短暂亮起 */
  85%, 92% { background: var(--ink-strong); transform: scaleX(1.08); }
}

/* -- 06 签注 · manifest + .tsr 文件印戳 ------------------ */
.flow-token-mv-sign { gap: 8px; align-items: center; }
.ftk-file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  background: var(--ink-soft);
  border: 1px solid rgba(30, 64, 175, 0.18);
  border-radius: 4px;
  font-size: 9.5px;
  color: var(--ink-strong);
  opacity: 0;
  transform: translateY(3px);
  animation: ftk-file-stamp 3.2s ease infinite;
}
.ftk-file:nth-child(1) { animation-delay: 0.1s; }
.ftk-file:nth-child(2) { animation-delay: 0.5s; }
.ftk-file-tag {
  display: inline-block;
  background: var(--ink-strong);
  color: white;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.ftk-file-name { letter-spacing: 0; }
@keyframes ftk-file-stamp {
  0%, 25%, 90%, 100% { opacity: 0; transform: translateY(3px); }
  35%, 80% { opacity: 1; transform: translateY(0); }
}
/* 06 · 4 节点签注 pipeline + 进度条 + state 切换 */
.flow-token-mv-sign {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.ftk-pipe {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 8px 4px 14px;
  width: 100%;
}
.ftk-pipe-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
  animation: ftk-pipe-node-light 4s ease infinite;
}
.ftk-pipe-node[data-node="1"] { animation-delay: 0.10s; }
.ftk-pipe-node[data-node="2"] { animation-delay: 0.55s; }
.ftk-pipe-node[data-node="3"] { animation-delay: 1.00s; }
.ftk-pipe-node[data-node="4"] { animation-delay: 1.45s; }
.ftk-pipe-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--panel-border);
  border: 1.5px solid var(--panel-border);
  transition: none;
}
.ftk-pipe-label {
  font-size: 7px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@keyframes ftk-pipe-node-light {
  0%, 9%, 100% { }
  10%, 50% {
    /* 与进度条同步：节点点亮中 */
  }
  /* 用 ::before 不合适，实际颜色由 keyframe target 自身 ）
     方案：每个 node 自带 keyframe 控制其 dot 颜色 */
}
/* dot 颜色由独立 keyframe 控制，方便阶段化 */
.ftk-pipe-node .ftk-pipe-dot {
  animation: ftk-pipe-dot-color 4s ease infinite;
}
.ftk-pipe-node[data-node="1"] .ftk-pipe-dot { animation-delay: 0.10s; }
.ftk-pipe-node[data-node="2"] .ftk-pipe-dot { animation-delay: 0.55s; }
.ftk-pipe-node[data-node="3"] .ftk-pipe-dot { animation-delay: 1.00s; }
.ftk-pipe-node[data-node="4"] .ftk-pipe-dot { animation-delay: 1.45s; }
@keyframes ftk-pipe-dot-color {
  0%, 8% {
    background: var(--panel-border);
    border-color: var(--panel-border);
    box-shadow: none;
  }
  /* 节点轮到自己时短暂蓝色 (signing) */
  10%, 14% {
    background: var(--ink-strong);
    border-color: var(--ink-strong);
    box-shadow: 0 0 6px rgba(30,64,175,0.5);
  }
  /* 进度滚到 50% 时 (相对自身 delay)，bar 变绿，节点都已签注 */
  17%, 75% {
    background: var(--no-hit);
    border-color: var(--no-hit);
    box-shadow: 0 0 4px rgba(21,128,61,0.4);
  }
  /* 重置阶段 */
  90%, 100% {
    background: var(--panel-border);
    border-color: var(--panel-border);
    box-shadow: none;
  }
}
/* 最终节点 ✓ 标记 */
.ftk-pipe-node-final .ftk-pipe-dot::after {
  content: "✓";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 7px;
  font-weight: 700;
  opacity: 0;
  animation: ftk-pipe-check 4s ease infinite;
}
.ftk-pipe-node-final .ftk-pipe-dot {
  width: 11px;
  height: 11px;
  position: relative;
}
@keyframes ftk-pipe-check {
  0%, 53%, 100% { opacity: 0; }
  56%, 88% { opacity: 1; }
}
/* 进度条轨道 + 填充 */
.ftk-pipe-rail {
  position: absolute;
  bottom: 6px;
  left: 12.5%;
  right: 12.5%;
  height: 3px;
  background: var(--panel-border);
  border-radius: 2px;
  z-index: 1;
  overflow: hidden;
}
.ftk-pipe-fill {
  height: 100%;
  width: 0;
  background: var(--warn);
  border-radius: 2px;
  animation: ftk-pipe-fill-grow 4s linear infinite;
}
@keyframes ftk-pipe-fill-grow {
  0%, 8% { width: 0; background: var(--warn); }
  /* 0-50%: 黄色填充到满 */
  50%, 53% { width: 100%; background: var(--warn); }
  /* 55%: 切换为绿色 (已签注) */
  56%, 88% { width: 100%; background: var(--no-hit); }
  /* reset */
  92%, 100% { width: 0; background: var(--warn); }
}
/* 状态文字：签注中 → ✓ 已签注 */
.ftk-sign-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 8.5px;
  letter-spacing: 0.04em;
}
.ftk-sign-state-label {
  font-weight: 700;
  font-size: 9px;
  position: relative;
  display: inline-block;
  min-width: 60px;
}
/* 双 span 用 opacity 切换 (CSS content keyframe 在多浏览器不可靠) */
.ftk-state-signing,
.ftk-state-signed {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
}
.ftk-state-signing {
  color: var(--warn);
  animation: ftk-state-signing-fade 4s ease infinite;
}
.ftk-state-signed {
  color: var(--no-hit);
  opacity: 0;
  animation: ftk-state-signed-fade 4s ease infinite;
}
@keyframes ftk-state-signing-fade {
  0%, 50% { opacity: 1; }
  53%, 88% { opacity: 0; }
  92%, 100% { opacity: 1; }
}
@keyframes ftk-state-signed-fade {
  0%, 50% { opacity: 0; }
  53%, 88% { opacity: 1; }
  92%, 100% { opacity: 0; }
}
.ftk-sign-state-meta {
  color: var(--fg-muted);
  font-family: var(--font-mono);
}
/* 黑底 openssl 命令 (保留风格) */
.ftk-sign-cmd {
  font-size: 8px;
  background: #0f172a;
  color: #d1d5db;
  padding: 4px 6px;
  border-radius: 3px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
}
.ftk-cmd-prompt { color: var(--no-hit); margin-right: 4px; font-weight: 700; }

/* -- 07 处置 · 双态卡 (状态+涉及对象+处置建议+法源 prefix) -- */
.flow-token-mv-advice {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  border-top: none;
  padding-top: 4px;
}
.ftk-adv-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 3px;
  border-left: 3px solid transparent;
  opacity: 0;
  transform: translateY(4px);
  animation: ftk-adv-card-in 3.6s ease infinite;
}
.ftk-adv-card:nth-child(1) { animation-delay: 0s; }
.ftk-adv-card:nth-child(2) { animation-delay: 0.4s; }
@keyframes ftk-adv-card-in {
  0%, 6%, 100% { opacity: 0; transform: translateY(4px); }
  16%, 92% { opacity: 1; transform: translateY(0); }
}
.ftk-adv-hit {
  border-left-color: var(--hit);
  background: rgba(220, 38, 38, 0.04);
}
.ftk-adv-review {
  border-left-color: var(--review);
  background: rgba(3, 105, 161, 0.04);
}
/* head: 状态标签 + severity */
.ftk-adv-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1px;
}
.ftk-adv-status {
  font-family: var(--font-title);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  color: white;
}
.ftk-adv-hit .ftk-adv-status { background: var(--hit); }
.ftk-adv-review .ftk-adv-status { background: var(--review); }
.ftk-adv-sev {
  font-size: 8px;
  letter-spacing: 0.04em;
}
.ftk-adv-hit .ftk-adv-sev { color: var(--hit); }
.ftk-adv-review .ftk-adv-sev { color: var(--review); }

/* row: prefix + 内容 */
.ftk-adv-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ftk-adv-row-block {
  align-items: flex-start;
}
.ftk-adv-prefix {
  font-size: 8px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  /* 仿"涉及对象："前缀的标签感 */
  white-space: nowrap;
}
.ftk-adv-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
/* 涉及对象：多个小 chip 状企业名 skeleton */
.ftk-adv-names {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.ftk-adv-name-skel {
  display: inline-block;
  height: 10px;
  border-radius: 2px;
  background: var(--ink-soft);
  border: 1px solid rgba(30,64,175,0.14);
  position: relative;
  overflow: hidden;
}
.ftk-adv-name-w1 { width: 32px; }
.ftk-adv-name-w2 { width: 26px; }
.ftk-adv-name-w3 { width: 38px; }
.ftk-adv-name-skel::after {
  /* 小 chip 也带 shimmer */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.65) 50%, transparent 100%);
  animation: ftk-adv-shimmer 2.6s ease-in-out infinite;
}
.ftk-adv-card .ftk-adv-name-skel:nth-of-type(1)::after { animation-delay: 0.0s; }
.ftk-adv-card .ftk-adv-name-skel:nth-of-type(2)::after { animation-delay: 0.25s; }
.ftk-adv-card .ftk-adv-name-skel:nth-of-type(3)::after { animation-delay: 0.50s; }

/* skeleton bar */
.ftk-adv-bar {
  display: block;
  height: 6px;
  border-radius: 2px;
  background: var(--ink-soft);
  position: relative;
  overflow: hidden;
}
.ftk-adv-bar::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.7) 50%, transparent 100%);
  animation: ftk-adv-shimmer 2.6s ease-in-out infinite;
}
.ftk-adv-bar-w90 { width: 100%; }
.ftk-adv-bar-w80 { width: 80%; }
.ftk-adv-bar-w70 { width: 70%; }
.ftk-adv-card .ftk-adv-bar:nth-of-type(1)::after { animation-delay: 0s; }
.ftk-adv-card .ftk-adv-bar:nth-of-type(2)::after { animation-delay: 0.3s; }
.ftk-adv-card .ftk-adv-bar:nth-of-type(3)::after { animation-delay: 0.6s; }
.ftk-adv-card .ftk-adv-bars .ftk-adv-bar:nth-of-type(1)::after { animation-delay: 0.4s; }
.ftk-adv-card .ftk-adv-bars .ftk-adv-bar:nth-of-type(2)::after { animation-delay: 0.7s; }
@keyframes ftk-adv-shimmer {
  0%   { transform: translateX(-120%); }
  60%  { transform: translateX(280%); }
  100% { transform: translateX(280%); }
}

/* -- 08 导出 · ZIP 开盖 + 5 文件瀑布坠落 + mini Excel ---- */
.flow-token-mv-export {
  gap: 8px;
  align-items: stretch;
  flex-wrap: nowrap;
}
.ftk-zip-stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
  width: 90px;
  position: relative;
}
/* 经典"堆叠文件"压缩包图标：3 层文件叠加 + 顶层 .zip 标签 */
.ftk-zip-box {
  position: relative;
  align-self: center;
  width: 44px;
  height: 38px;
}
/* 后层 / 中层 — 浅色叠层，offset 制造"多文件被压缩"感 */
.ftk-zip-stack {
  position: absolute;
  width: 38px;
  height: 32px;
  background: white;
  border: 1.5px solid var(--ink-strong);
  border-radius: 2px;
}
.ftk-zip-stack-back {
  top: 6px;
  left: 6px;
  background: #e8eef8;
  border-color: rgba(30,64,175,0.55);
}
.ftk-zip-stack-mid {
  top: 3px;
  left: 3px;
  background: #f3f6fc;
  border-color: rgba(30,64,175,0.75);
}
/* 顶层 — 主文件，含 .zip 标签 + 折角 */
.ftk-zip-front {
  position: relative;
  width: 38px;
  height: 32px;
  background: white;
  border: 1.5px solid var(--ink-strong);
  border-radius: 2px;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(30,64,175,0.20);
  z-index: 2;
}
/* 折角 (右上)：经典文件视觉 */
.ftk-zip-corner {
  position: absolute;
  top: 0; right: 0;
  width: 9px;
  height: 9px;
  background: var(--ink-strong);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.ftk-zip-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: 0.04em;
  z-index: 2;
}
/* （拉链结构已删，改为简洁压缩包图标） */
/* 5 文件 row 瀑布下落 */
.ftk-fall {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.ftk-fall-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 2px;
  font-size: 7.5px;
  color: var(--fg-strong);
  letter-spacing: 0.02em;
  /* 入场：从 ZIP 盖下喷出 (translateY -16 → 0) */
  opacity: 0;
  transform: translateY(-14px) scale(0.7);
  animation: ftk-fall-drop 4.8s cubic-bezier(0.4, 1.4, 0.4, 1) infinite;
}
.ftk-fall-row[data-fall="1"] { animation-delay: 0.20s; }
.ftk-fall-row[data-fall="2"] { animation-delay: 0.35s; }
.ftk-fall-row[data-fall="3"] { animation-delay: 0.50s; }
.ftk-fall-row[data-fall="4"] { animation-delay: 0.65s; }
.ftk-fall-row[data-fall="5"] { animation-delay: 0.80s; }
@keyframes ftk-fall-drop {
  0%, 4% { opacity: 0; transform: translateY(-14px) scale(0.7); }
  /* 8-12% 弹出（带 overshoot） */
  12% { opacity: 1; transform: translateY(2px) scale(1.02); }
  18% { opacity: 1; transform: translateY(0) scale(1); }
  /* hold 到 88% */
  88% { opacity: 1; transform: translateY(0) scale(1); }
  /* reset */
  95%, 100% { opacity: 0; transform: translateY(-14px) scale(0.7); }
}
.ftk-fall-tag {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  flex-shrink: 0;
}
.ftk-fall-tag.png   { background: var(--ink-strong); }
.ftk-fall-tag.json  { background: var(--source-error); }
.ftk-fall-tag.xlsx  { background: #107c41; }
.ftk-fall-tag.tsr   { background: var(--hit); }
.ftk-fall-tag.txt   { background: var(--fg-muted); }
.ftk-fall-name { flex: 1; }
.ftk-fall-count { color: var(--fg-muted); }

/* mini Excel — run_summary 报告封面 */
.ftk-xlsx {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.02em;
  overflow: hidden;
}
/* 顶部 file ribbon — Excel 标识 + 文件名 */
.ftk-xlsx-bar-top {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: linear-gradient(180deg, #f8f9fb 0%, #eef1f5 100%);
  border-bottom: 1px solid var(--panel-border);
}
.ftk-xlsx-icon {
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  background: #107c41;  /* Excel green */
  color: white;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 8px;
  border-radius: 1.5px;
  letter-spacing: 0;
  flex-shrink: 0;
}
.ftk-xlsx-fname {
  font-size: 6.5px;
  color: var(--fg-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 主体 grid：col header (A B C) + row header (1-6) + cells */
.ftk-xlsx-grid {
  display: grid;
  grid-template-columns: 11px 1fr 1fr 1fr;
  gap: 0;
  background: var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}
.ftk-xlsx-grid > * {
  background: white;
  padding: 1.5px 3px;
  border-right: 1px solid rgba(15,30,60,0.04);
  border-bottom: 1px solid rgba(15,30,60,0.04);
  min-height: 10px;
  display: flex;
  align-items: center;
}
.ftk-xlsx-corner {
  background: #f3f4f7;
}
.ftk-xlsx-col {
  background: #f3f4f7;
  color: var(--fg-muted);
  justify-content: center;
  font-weight: 600;
  font-size: 6.5px;
}
.ftk-xlsx-row-h {
  background: #f3f4f7;
  color: var(--fg-muted);
  justify-content: center;
  font-weight: 600;
  font-size: 6.5px;
}
/* cell 普通 */
.ftk-xlsx-cell {
  font-size: 7px;
  color: var(--fg-strong);
}
/* 标题行 — 仿 merged cell + 加粗 */
.ftk-xlsx-title {
  font-weight: 700;
  background: var(--panel-bg-alt);
  color: var(--fg-strong);
  font-family: var(--font-title);
  letter-spacing: 0;
  font-size: 7.5px;
}
/* 字段名列 — 偏弱 */
.ftk-xlsx-k {
  color: var(--fg-muted);
  font-weight: 600;
}
/* KPI 数字 cell — Excel 条件格式风格染色 */
.ftk-xlsx-v {
  font-weight: 700;
  font-size: 8.5px;
  justify-content: flex-start;
  font-variant-numeric: tabular-nums;
}
.ftk-xlsx-v-hit    { background: var(--hit-bg) !important; color: var(--hit); }
.ftk-xlsx-v-clear  { background: var(--no-hit-bg) !important; color: var(--no-hit); }
.ftk-xlsx-v-review { background: var(--review-bg) !important; color: var(--review); }
/* 底部 sheet tabs — Excel 视觉强标识 */
.ftk-xlsx-tabs {
  display: flex;
  gap: 1px;
  padding: 2px 3px;
  background: #f3f4f7;
  border-top: 1px solid rgba(15,30,60,0.04);
}
.ftk-xlsx-tab {
  font-size: 6px;
  padding: 1px 4px;
  border-radius: 2px 2px 0 0;
  color: var(--fg-muted);
  letter-spacing: 0;
  background: transparent;
}
.ftk-xlsx-tab.active {
  background: white;
  color: var(--ink-strong);
  font-weight: 700;
  border: 1px solid var(--panel-border);
  border-bottom: none;
}
/* KPI cell scan-in：从下到上一行行 reveal，模拟 Excel "公式计算"渲染 */
.flow-token-mv-export .ftk-xlsx-v-hit,
.flow-token-mv-export .ftk-xlsx-v-clear,
.flow-token-mv-export .ftk-xlsx-v-review {
  animation: ftk-xlsx-cell-in 3.6s ease infinite;
}
.flow-token-mv-export .ftk-xlsx-v-hit    { animation-delay: 0.20s; }
.flow-token-mv-export .ftk-xlsx-v-clear  { animation-delay: 0.40s; }
.flow-token-mv-export .ftk-xlsx-v-review { animation-delay: 0.60s; }
@keyframes ftk-xlsx-cell-in {
  0%, 14%, 100% { opacity: 0.3; transform: scale(0.92); }
  24%, 88%      { opacity: 1; transform: scale(1); }
}

/* -- responsive：在 .flow grid 切到 2 列 / 1 列时, 隐藏 SVG path 和 token，
       因为路径方案是基于 4×2 假设；窄屏退化为静态卡 + 微动画仍循环 */
@media (max-width: 900px) {
  .flow-token-path,
  .flow-token-dot { display: none; }
  .flow-token-card.is-active {
    /* 窄屏不靠 token 控高亮，保持卡都 active 让微动画不停 */
    border-color: var(--panel-border);
    box-shadow: none;
  }
  .flow-token-card .flow-token-mv * {
    animation-play-state: running;
  }
}
