/* 动态示意图（Q86）：首屏五步循环、手机示例、数据隔离和权限。减少动态时全部静止（见 blocks.css）。
   Animated diagrams: hero cycle, phone sample, isolation and scopes. */

/* 首屏五步循环：一圈 6 秒，依次点亮，旁边的小点沿线往下走 / hero cycle, 6 s per round */
.flow-card {
  margin: 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--txy-surface);
  border: 1px solid var(--txy-border);
  box-shadow: 0 24px 48px -24px rgb(0 0 0 / 0.25);
}
.flow-card-title {
  margin: 0 0 16px;
  font-weight: 600;
  color: var(--txy-text-secondary);
  font-size: 14px;
}
.cycle {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 26px;
  display: grid;
  gap: 14px;
}
.cycle::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--txy-brand) 0 6px, transparent 6px 12px);
  background-size: 2px 24px;
  opacity: 0.55;
  animation: cycle-flow 1.2s linear infinite;
}
.cycle::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 27px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--txy-brand);
  box-shadow: 0 0 0 4px var(--txy-brand-soft);
  animation: cycle-dot 6s ease-in-out infinite;
}
.cycle li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px 8px 8px;
  border-radius: 12px;
  animation: cycle-row 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 1.2s);
}
.cycle-icon {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--txy-brand-soft);
  color: var(--txy-brand-soft-text);
  animation: cycle-icon 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 1.2s);
}
.cycle-text b {
  display: block;
  font-size: 16px;
}
.cycle-text small {
  display: block;
  font-size: 13px;
  color: var(--txy-text-secondary);
}
@keyframes cycle-flow {
  to {
    background-position: 0 24px;
  }
}
@keyframes cycle-dot {
  /* 每格 78px（一行 64 + 间距 14），每步停 1.2 秒，和点亮同步 / 78 px per row, synced with the glow */
  0%,
  16% {
    transform: translateY(0);
  }
  20%,
  36% {
    transform: translateY(78px);
  }
  40%,
  56% {
    transform: translateY(156px);
  }
  60%,
  76% {
    transform: translateY(234px);
  }
  80%,
  96% {
    transform: translateY(312px);
  }
  100% {
    transform: translateY(0);
  }
}
@keyframes cycle-row {
  0%,
  22% {
    background: var(--txy-surface-muted);
  }
  30%,
  100% {
    background: transparent;
  }
}
@keyframes cycle-icon {
  0%,
  22% {
    background: var(--txy-brand);
    color: var(--txy-on-brand);
    transform: scale(1.06);
  }
  30%,
  100% {
    background: var(--txy-brand-soft);
    color: var(--txy-brand-soft-text);
    transform: none;
  }
}

/* 手机示例 / phone sample */
.phone {
  margin: 0 auto;
  width: 280px;
  padding: 10px;
  border-radius: 40px;
  /* 机身固定深色，深浅主题下都像手机；只是装饰 / fixed dark bezel, decorative only */
  background: #121614;
  outline: 1px solid var(--txy-border-strong);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.45);
}
.phone-screen {
  border-radius: 30px;
  padding: 22px 18px 24px;
  background: var(--txy-bg);
  color: var(--txy-text);
  min-height: 480px;
}
.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mock-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--txy-warning-soft);
  color: var(--txy-warning);
  font-weight: 600;
}
.phone-month {
  margin: 4px 0 16px;
  font-size: 12px;
  color: var(--txy-text-secondary);
}
.phone-net {
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--txy-brand);
  color: var(--txy-on-brand);
  font-size: 28px;
  font-weight: 700;
}
.phone-net small {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.phone-rows p {
  display: flex;
  justify-content: space-between;
  margin: 10px 2px 0;
  font-size: 13px;
}
.phone-sub {
  margin: 18px 0 8px;
  font-size: 12px;
  color: var(--txy-text-secondary);
}
.phone-order {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--txy-surface);
  border: 1px solid var(--txy-border);
  font-size: 13px;
}
.phone-order small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--txy-text-secondary);
}
.bar,
.scope-bar {
  display: block;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--txy-surface-muted);
  overflow: hidden;
}
.bar i,
.scope-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--txy-brand);
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}
.phone.is-visible .bar i,
.sec-diagram.is-visible .scope-bar i,
html:not(.js) .bar i,
html:not(.js) .scope-bar i {
  width: var(--w);
}
