/* Trang Tính năng (/tinh-nang) - bố cục theo ui-template-v2/tinh-nang.html (khối <style> riêng của template) */

/* Thanh chọn nhanh 7 nhóm trong hero */
.tn-quicknav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.tn-quicknav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--radius-full);
  background: var(--bg-card); border: 1px solid var(--bg-card-border);
  font-size: .875rem; font-weight: 600; color: var(--text-heading);
  transition: all var(--transition-fast);
}
.tn-quicknav a:hover { border-color: var(--cz-blue-primary); color: var(--cz-blue-primary); background: var(--cz-blue-soft); }
.tn-quicknav a span { font-family: var(--font-mono); font-size: .75rem; color: var(--cz-blue-primary); }

/* Hàng tính năng: chữ một bên, ảnh một bên, đảo chiều ở hàng chẵn */
.feature-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 96px;
  scroll-margin-top: 96px;
}
.feature-group-row:last-child { margin-bottom: 0; }
.feature-group-row:nth-child(even) { direction: rtl; }
.feature-group-row:nth-child(even) > div { direction: ltr; }
.feature-group-row > div { min-width: 0; }
.feature-group-row .section-title { font-size: 2rem; }

.feature-list-detailed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 32px;
  padding: 0;
}
.feature-list-detailed li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.6;
}
.feature-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cz-blue-soft);
  color: var(--cz-blue-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: .8rem;
  font-weight: bold;
}
.tn-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* P1: sơ đồ mô hình */
.tn-diagram { overflow: hidden; border-radius: var(--radius-xl); border: 1px solid var(--bg-card-border); background: var(--bg-card); box-shadow: var(--shadow-lg); }
.tn-diagram-body { padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 0; }
.tn-node {
  border-radius: var(--radius-md); border: 1px solid var(--bg-card-border);
  background: var(--bg-surface); padding: 10px 14px; text-align: center; width: 100%;
}
.tn-node strong { display: block; font-size: .9375rem; color: var(--text-heading); }
.tn-node small { display: block; font-size: .8125rem; color: var(--text-muted); margin-top: 2px; }
.tn-node-company { max-width: 300px; border-color: var(--cz-blue-primary); background: var(--cz-blue-soft); }
.tn-node-company strong { color: var(--cz-blue-primary); }
.tn-node-agent { background: var(--bg-card); border-color: rgba(0, 210, 180, .35); }
.tn-node-agent strong { color: var(--text-heading); }
.tn-node-agent small { font-family: var(--font-mono); font-size: .75rem; }
.tn-link { width: 2px; height: 22px; background: var(--cz-blue-primary); opacity: .45; }
.tn-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; position: relative; padding-top: 22px; }
.tn-groups::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--cz-blue-primary); opacity: .45; }
.tn-group { display: flex; flex-direction: column; align-items: center; position: relative; min-width: 0; }
.tn-group::before { content: ''; position: absolute; top: -22px; left: 50%; width: 2px; height: 22px; background: var(--cz-blue-primary); opacity: .45; }
.tn-agents { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 12px; padding-left: 14px; border-left: 2px dashed rgba(0, 210, 180, .45); }
.tn-diagram-note { margin-top: 20px; font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); text-align: center; }

/* P1 chuyển động (js/v2/site.js gắn .is-armed, .is-in khi cuộn tới; giảm chuyển động thì giữ hình tĩnh).
   Vòng 8s: sơ đồ dựng dần Công ty -> đường nối -> nhóm -> đại lý -> ghi chú, chấm giá sỉ chạy từ Công ty xuống nhóm,
   đại lý sáng nhẹ khi nhận giá; cuối vòng mờ đi rồi dựng lại. */
.tn-diagram.is-armed .tn-node, .tn-diagram.is-armed .tn-diagram-note { animation: tnIn 8s var(--tn-d, 0s) infinite both paused; }
.tn-diagram.is-armed .tn-link { transform-origin: top; animation: tnGrowY 8s .35s infinite both paused; }
.tn-diagram.is-armed .tn-groups::before { animation: tnGrowX 8s .6s infinite both paused; }
.tn-diagram.is-armed .tn-group::before { transform-origin: top; animation: tnGrowY 8s .8s infinite both paused; }
.tn-diagram.is-armed .tn-agents { animation: tnDash 8s 1.3s infinite both paused; }
.tn-diagram.is-armed .tn-group:nth-child(1) > .tn-node { --tn-d: 1s; }
.tn-diagram.is-armed .tn-group:nth-child(2) > .tn-node { --tn-d: 1.15s; }
.tn-diagram.is-armed .tn-group:nth-child(1) .tn-node-agent:nth-child(1) { --tn-d: 1.5s; }
.tn-diagram.is-armed .tn-group:nth-child(1) .tn-node-agent:nth-child(2) { --tn-d: 1.75s; }
.tn-diagram.is-armed .tn-group:nth-child(2) .tn-node-agent:nth-child(1) { --tn-d: 1.6s; }
.tn-diagram.is-armed .tn-diagram-note { --tn-d: 2.2s; }
/* Chấm giá sỉ chạy trên đường nối, đại lý nhận giá thì sáng viền */
.tn-diagram.is-armed .tn-link, .tn-diagram.is-armed .tn-group { position: relative; }
.tn-diagram.is-armed .tn-link::after, .tn-diagram.is-armed .tn-group::after {
  content: ''; position: absolute; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: var(--cz-amber); box-shadow: 0 0 0 3px rgba(255, 176, 32, .25); opacity: 0;
}
.tn-diagram.is-armed .tn-link::after { top: 0; animation: tnDotA 8s infinite paused; }
.tn-diagram.is-armed .tn-group::after { top: -22px; animation: tnDotB 8s infinite paused; }
.tn-diagram.is-armed .tn-node-agent { animation-name: tnIn, tnGlow; animation-duration: 8s, 8s; animation-delay: var(--tn-d, 0s), 0s; animation-iteration-count: infinite, infinite; animation-fill-mode: both, none; animation-play-state: paused, paused; }
.tn-diagram.is-armed.is-in .tn-node, .tn-diagram.is-armed.is-in .tn-diagram-note, .tn-diagram.is-armed.is-in .tn-link,
.tn-diagram.is-armed.is-in .tn-groups::before, .tn-diagram.is-armed.is-in .tn-group::before, .tn-diagram.is-armed.is-in .tn-agents,
.tn-diagram.is-armed.is-in .tn-link::after, .tn-diagram.is-armed.is-in .tn-group::after { animation-play-state: running; }
@keyframes tnIn {
  0%, 2% { opacity: 0; transform: translateY(8px) scale(.96); }
  8%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}
@keyframes tnGrowY {
  0%, 2% { transform: scaleY(0); }
  7%, 88% { transform: scaleY(1); opacity: .45; }
  96%, 100% { transform: scaleY(1); opacity: 0; }
}
@keyframes tnGrowX {
  0%, 2% { transform: scaleX(0); }
  8%, 88% { transform: scaleX(1); opacity: .45; }
  96%, 100% { transform: scaleX(1); opacity: 0; }
}
@keyframes tnDash {
  0%, 2% { border-left-color: transparent; }
  10%, 88% { border-left-color: rgba(0, 210, 180, .45); }
  96%, 100% { border-left-color: transparent; }
}
/* 3 lượt giá sỉ mỗi vòng: đường Công ty (A) rồi nối tiếp xuống nhóm (B) */
@keyframes tnDotA {
  0%, 34% { top: 0; opacity: 0; }
  35% { top: 0; opacity: 1; }
  39% { top: calc(100% - 4px); opacity: 1; }
  40%, 54% { top: calc(100% - 4px); opacity: 0; }
  55% { top: 0; opacity: 1; }
  59% { top: calc(100% - 4px); opacity: 1; }
  60%, 74% { top: calc(100% - 4px); opacity: 0; }
  75% { top: 0; opacity: 1; }
  79% { top: calc(100% - 4px); opacity: 1; }
  80%, 100% { top: calc(100% - 4px); opacity: 0; }
}
@keyframes tnDotB {
  0%, 39% { top: -22px; opacity: 0; }
  40% { top: -22px; opacity: 1; }
  44% { top: -6px; opacity: 1; }
  45%, 59% { top: -6px; opacity: 0; }
  60% { top: -22px; opacity: 1; }
  64% { top: -6px; opacity: 1; }
  65%, 79% { top: -6px; opacity: 0; }
  80% { top: -22px; opacity: 1; }
  84% { top: -6px; opacity: 1; }
  85%, 100% { top: -6px; opacity: 0; }
}
@keyframes tnGlow {
  0%, 46%, 52%, 66%, 72%, 86%, 100% { box-shadow: none; }
  48%, 50%, 68%, 70% { box-shadow: 0 0 0 3px rgba(0, 210, 180, .22); border-color: rgba(0, 210, 180, .8); }
}

/* P2-P7: minh họa HTML/CSS trong khung cửa sổ như P1 (Views/V2/StaticPage/tinh-nang/_MinhHoa.cshtml) */
.tn-v-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.tn-v-body.is-tight { padding-top: 0; }
.tn-v-body .tn-diagram-note { margin-top: 4px; }
.tn-v-label { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.tn-v-rows { display: flex; flex-direction: column; gap: 8px; }
.tn-v-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-md); border: 1px solid var(--bg-card-border); background: var(--bg-surface); font-size: .875rem; color: var(--text-body); flex-wrap: wrap; }
.tn-v-row > span { flex: 1 1 auto; min-width: 0; }
.tn-v-row > b { font-family: var(--font-mono); font-size: .8125rem; color: var(--text-heading); }
.tn-v-row > i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 210, 180, .15); color: #00A88F; }
.tn-v-row > small { flex-basis: 100%; font-size: .75rem; color: #E5484D; }
.tn-v-row.is-blocked { border-color: rgba(229, 72, 77, .35); background: rgba(229, 72, 77, .06); }
.tn-v-row.is-blocked > b { color: #E5484D; font-family: var(--font-body); }
.tn-v-row.is-warn { border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .08); }
.tn-v-row.is-warn > b { color: #B45309; font-family: var(--font-body); }
.tn-v-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-v-chips span { padding: 4px 10px; border-radius: var(--radius-full); background: var(--cz-blue-soft); color: var(--cz-blue-primary); font-size: .75rem; font-weight: 600; }
.tn-v-chips.is-small span { padding: 2px 8px; font-size: .6875rem; }

/* P3: dòng thời gian đơn hàng */
.tn-v-timeline { list-style: none; margin: 0; padding: 0; counter-reset: tnv; }
.tn-v-timeline li { position: relative; padding: 0 0 16px 40px; counter-increment: tnv; }
.tn-v-timeline li:last-child { padding-bottom: 0; }
.tn-v-timeline li::before { content: counter(tnv); position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--cz-blue-primary); color: #fff; font-family: var(--font-mono); font-size: .75rem; font-weight: 700; }
.tn-v-timeline li:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--cz-blue-primary); opacity: .3; }
.tn-v-timeline b { display: block; font-size: .9375rem; color: var(--text-heading); }
.tn-v-timeline small { display: block; font-size: .8125rem; color: var(--text-muted); margin-top: 2px; }

/* P3 chuyển động: đơn hàng chạy qua từng bước (vòng 8s, mỗi bước cách 0,9s), xong cả 5 bước thì hiện ghi chú;
   bước chưa tới để xám. Dùng chung cơ chế .is-armed/.is-in với P1. */
.tn-p3.is-armed .tn-v-timeline li:nth-child(1) { --tn-d: 0s; }
.tn-p3.is-armed .tn-v-timeline li:nth-child(2) { --tn-d: .9s; }
.tn-p3.is-armed .tn-v-timeline li:nth-child(3) { --tn-d: 1.8s; }
.tn-p3.is-armed .tn-v-timeline li:nth-child(4) { --tn-d: 2.7s; }
.tn-p3.is-armed .tn-v-timeline li:nth-child(5) { --tn-d: 3.6s; }
.tn-p3.is-armed .tn-v-timeline li > b, .tn-p3.is-armed .tn-v-timeline li > small { animation: tnStepText 8s var(--tn-d) infinite both paused; }
.tn-p3.is-armed .tn-v-timeline li::before { animation: tnStepDot 8s var(--tn-d) infinite both paused; }
.tn-p3.is-armed .tn-v-timeline li::after { transform-origin: top; animation: tnStepLine 8s calc(var(--tn-d) + .45s) infinite both paused; }
.tn-p3.is-armed .tn-diagram-note { --tn-d: 4.4s; }
.tn-p3.is-armed.is-in .tn-v-timeline li > b, .tn-p3.is-armed.is-in .tn-v-timeline li > small,
.tn-p3.is-armed.is-in .tn-v-timeline li::before, .tn-p3.is-armed.is-in .tn-v-timeline li::after { animation-play-state: running; }
@keyframes tnStepText {
  0%, 3% { opacity: .35; transform: translateX(-4px); }
  8%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: .35; transform: none; }
}
@keyframes tnStepDot {
  0%, 3% { background: #CBD5E1; transform: scale(.88); box-shadow: none; }
  6% { background: var(--cz-blue-primary); transform: scale(1.2); box-shadow: 0 0 0 6px rgba(0, 161, 255, .2); }
  10%, 88% { background: var(--cz-blue-primary); transform: none; box-shadow: none; }
  96%, 100% { background: #CBD5E1; transform: scale(.88); box-shadow: none; }
}
@keyframes tnStepLine {
  0%, 3% { transform: scaleY(0); }
  10%, 88% { transform: scaleY(1); }
  96%, 100% { transform: scaleY(0); }
}

/* P4: 4 ô */
.tn-v-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-v-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--bg-card-border); background: var(--bg-surface); min-width: 0; }
.tn-v-tile-title { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.tn-v-tile b { font-size: .9375rem; color: var(--text-heading); }
.tn-v-tile small { font-size: .75rem; color: var(--text-muted); }
.tn-v-code { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 8px; border-radius: var(--radius-sm); border: 1px dashed var(--cz-blue-primary); color: var(--cz-blue-primary); font-family: var(--font-mono); font-size: .8125rem; font-weight: 700; }
.tn-v-big { font-family: var(--font-mono); }
.tn-v-bar { display: block; height: 6px; border-radius: 6px; background: var(--bg-card-border); overflow: hidden; }
.tn-v-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--cz-blue-primary), #00D2B4); }

/* P5: website thu nhỏ */
.tn-v-site { margin: 20px 24px; border-radius: var(--radius-md); border: 1px solid var(--bg-card-border); overflow: hidden; background: var(--bg-surface); }
.tn-v-site-nav { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg-card); border-bottom: 1px solid var(--bg-card-border); }
.tn-v-site-logo { font-weight: 800; font-size: .875rem; color: #00A88F; }
.tn-v-site-menu { display: flex; gap: 6px; }
.tn-v-site-menu i { width: 28px; height: 6px; border-radius: 6px; background: var(--bg-card-border); }
.tn-v-site-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 14px; background: linear-gradient(135deg, rgba(0, 210, 180, .12), rgba(0, 161, 255, .08)); }
.tn-v-line { display: block; width: 55%; height: 7px; border-radius: 7px; background: var(--bg-card-border); }
.tn-v-line.is-wide { width: 80%; height: 10px; background: var(--text-muted); opacity: .35; }
.tn-v-site-btn { margin-top: 4px; padding: 4px 12px; border-radius: var(--radius-sm); background: #00A88F; color: #fff; font-size: .75rem; font-weight: 700; }
.tn-v-site-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 14px 14px; }
.tn-v-site-cards div { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--bg-card-border); }
.tn-v-site-cards b { font-size: .8125rem; color: var(--text-heading); }
.tn-v-site-cards .tn-v-line { width: 80%; height: 5px; }

/* P6, P7: thẻ dịch vụ / ví */
.tn-v-vps { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--bg-card-border); background: var(--bg-surface); }
.tn-v-vps b { display: block; color: var(--text-heading); }
.tn-v-vps small { display: block; font-size: .8125rem; color: var(--text-muted); font-family: var(--font-mono); }
.tn-v-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); background: rgba(0, 210, 180, .15); color: #00A88F; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.tn-v-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tn-v-amount { font-family: var(--font-mono); font-weight: 700; color: var(--cz-blue-primary); white-space: nowrap; }
.tn-v-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tn-v-actions span { padding: 8px 4px; text-align: center; border-radius: var(--radius-sm); border: 1px solid var(--bg-card-border); background: var(--bg-card); font-size: .75rem; font-weight: 600; color: var(--text-heading); }
.tn-v-code-block { padding: 14px 16px; border-radius: var(--radius-md); background: #0B1220; font-family: var(--font-mono); font-size: .8125rem; line-height: 1.8; color: #CBD5E1; }
.tn-v-code-block .k { color: #38BDF8; font-weight: 700; margin-right: 6px; }
.tn-v-code-block .ok { color: #34D399; font-weight: 700; margin-right: 6px; }
.tn-v-code-block .c { color: #64748B; font-style: italic; }

/* Lời mời cuối trang */
.tn-cta { max-width: 800px; }
.tn-cta h2 { font-size: 2.25rem; color: var(--text-heading); margin-bottom: 32px; }
.tn-cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .feature-group-row, .feature-group-row:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 36px;
    margin-bottom: 64px;
  }
}

@media (max-width: 640px) {
  .tn-quicknav { margin-top: 20px; }
  .tn-page .section-title, .feature-group-row .section-title, .tn-cta h2 { font-size: 1.625rem; }
  .tn-page .btn { white-space: normal; text-align: center; }
  .tn-actions .btn, .tn-cta-actions .btn { width: 100%; }
  .tn-diagram-body { padding: 18px 14px; }
  .tn-groups { gap: 10px; }
  .tn-agents { padding-left: 8px; }
  .tn-node { padding: 8px 10px; }
  .tn-v-body { padding: 18px 14px; }
  .tn-v-site { margin: 16px 14px; }
  .tn-v-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-v-site-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-v-site-cards div:last-child { display: none; }
}

/* P2, P4-P7 chuyển động (cùng cơ chế .is-armed/.is-in với P1, P3; vòng 8s; --tn-d: trễ của từng phần tử).
   Phần tử dùng tnIn: hiện dần, giữ, cuối vòng mờ đi rồi lặp lại. */
@keyframes tnPop {
  0%, 3% { opacity: 0; transform: scale(.6); }
  6% { opacity: 1; transform: scale(1.12); }
  9%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}
@keyframes tnDrawX {
  0%, 3% { transform: scaleX(0); }
  10%, 88% { transform: scaleX(1); }
  96%, 100% { transform: scaleX(0); }
}
@keyframes tnType {
  0%, 2% { clip-path: inset(0 100% 0 0); }
  10%, 88% { clip-path: inset(0 0 0 0); }
  96%, 100% { clip-path: inset(0 100% 0 0); }
}
@keyframes tnShake {
  0%, 100% { translate: 0 0; }
  1.5% { translate: -6px 0; }
  3% { translate: 6px 0; }
  4.5% { translate: -4px 0; }
  6% { translate: 3px 0; }
  7.5% { translate: 0 0; }
}
@keyframes tnPress {
  0%, 100% { background: var(--bg-card); border-color: var(--bg-card-border); color: var(--text-heading); }
  2%, 7% { background: var(--cz-blue-primary); border-color: var(--cz-blue-primary); color: #FFFFFF; }
  10% { background: var(--bg-card); border-color: var(--bg-card-border); color: var(--text-heading); }
}
@keyframes tnRipple {
  0% { box-shadow: 0 0 0 0 rgba(0, 168, 143, .45); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(0, 168, 143, 0); }
}
@keyframes tnBump {
  0%, 100% { transform: none; color: var(--cz-blue-primary); }
  2% { transform: scale(1.14); color: #E5484D; }
  6% { transform: none; color: var(--cz-blue-primary); }
}
@keyframes tnBrand {
  0%, 30% { color: #00A88F; }
  36%, 62% { color: var(--cz-blue-primary); }
  68%, 94% { color: #D97706; }
  100% { color: #00A88F; }
}
@keyframes tnBrandBg {
  0%, 30% { background: #00A88F; }
  36%, 62% { background: var(--cz-blue-primary); }
  68%, 94% { background: #D97706; }
  100% { background: #00A88F; }
}

/* P2: giá sỉ hiện trước, giá lẻ sau, giá thấp hơn giá nhập bị chặn (rung lắc) */
.tn-p2.is-armed .tn-v-body > *, .tn-p2.is-armed .tn-v-row { animation: tnIn 8s var(--tn-d, 0s) infinite both paused; }
.tn-p2.is-armed .tn-v-body > .tn-v-rows { animation: none; }
.tn-p2.is-armed .tn-v-body > :nth-child(1) { --tn-d: 0s; }
.tn-p2.is-armed .tn-v-body > :nth-child(2) > :nth-child(1) { --tn-d: .25s; }
.tn-p2.is-armed .tn-v-body > :nth-child(2) > :nth-child(2) { --tn-d: .5s; }
.tn-p2.is-armed .tn-v-body > :nth-child(3) { --tn-d: .9s; }
.tn-p2.is-armed .tn-v-body > :nth-child(4) > :nth-child(1) { --tn-d: 1.15s; }
.tn-p2.is-armed .tn-v-body > :nth-child(4) > :nth-child(2) { --tn-d: 1.4s; }
.tn-p2.is-armed .tn-v-body > :nth-child(4) > :nth-child(3) { --tn-d: 1.75s; animation-name: tnIn, tnShake; animation-delay: 1.75s, 2.3s; }
.tn-p2.is-armed .tn-v-body > :nth-child(5) { --tn-d: 2.6s; }
.tn-p2.is-armed .tn-v-body > :nth-child(6) { --tn-d: 2.9s; }
.tn-p2.is-armed .tn-v-row > i { animation: tnPop 8s calc(var(--tn-d, 0s) + .35s) infinite both paused; }

/* P4: 4 ô hiện lần lượt, chip phạm vi voucher bật lên, thanh tích điểm chạy đầy */
.tn-p4.is-armed .tn-v-tile, .tn-p4.is-armed .tn-diagram-note { animation: tnIn 8s var(--tn-d, 0s) infinite both paused; }
.tn-p4.is-armed .tn-v-tile:nth-child(2) { --tn-d: .35s; }
.tn-p4.is-armed .tn-v-tile:nth-child(3) { --tn-d: .7s; }
.tn-p4.is-armed .tn-v-tile:nth-child(4) { --tn-d: 1.05s; }
.tn-p4.is-armed .tn-diagram-note { --tn-d: 1.6s; }
.tn-p4.is-armed .tn-v-chips span { animation: tnPop 8s var(--tn-d, .4s) infinite both paused; }
.tn-p4.is-armed .tn-v-chips span:nth-child(2) { --tn-d: .6s; }
.tn-p4.is-armed .tn-v-chips span:nth-child(3) { --tn-d: .8s; }
.tn-p4.is-armed .tn-v-bar span { transform-origin: left; animation: tnDrawX 8s .7s infinite both paused; animation-timing-function: ease-out; }
.tn-p4.is-armed .tn-v-tile:nth-child(3) b, .tn-p4.is-armed .tn-v-code { animation: tnPop 8s calc(var(--tn-d, 0s) + .3s) infinite both paused; }
.tn-p4.is-armed .tn-v-tile:nth-child(1) .tn-v-code { --tn-d: 0s; }
.tn-p4.is-armed .tn-v-tile:nth-child(3) b { --tn-d: .7s; }
.tn-p4.is-armed .tn-v-tile:nth-child(4) .tn-v-code { --tn-d: 1.05s; }

/* P5: tên miền gõ dần, website dựng từng khối, màu thương hiệu đổi lần lượt */
.tn-p5.is-armed .cz-shot-bar span { animation: tnType 8s 0s infinite both paused; animation-timing-function: steps(18, end); }
.tn-p5.is-armed .tn-v-site-logo { animation: tnIn 8s .4s infinite both paused, tnBrand 8s 0s infinite paused; }
.tn-p5.is-armed .tn-v-site-btn { animation: tnPop 8s 1.1s infinite both paused, tnBrandBg 8s 0s infinite paused; }
.tn-p5.is-armed .tn-v-site-menu i, .tn-p5.is-armed .tn-v-site-hero .tn-v-line { transform-origin: left; animation: tnDrawX 8s var(--tn-d, .5s) infinite both paused; }
.tn-p5.is-armed .tn-v-site-menu i:nth-child(2) { --tn-d: .6s; }
.tn-p5.is-armed .tn-v-site-menu i:nth-child(3) { --tn-d: .7s; }
.tn-p5.is-armed .tn-v-site-hero .tn-v-line { --tn-d: .8s; }
.tn-p5.is-armed .tn-v-site-hero .tn-v-line:not(.is-wide) { --tn-d: .95s; }
.tn-p5.is-armed .tn-v-site-cards > div, .tn-p5.is-armed .tn-v-chips span { animation: tnIn 8s var(--tn-d, 1.4s) infinite both paused; }
.tn-p5.is-armed .tn-v-site-cards > div:nth-child(2) { --tn-d: 1.55s; }
.tn-p5.is-armed .tn-v-site-cards > div:nth-child(3) { --tn-d: 1.7s; }
.tn-p5.is-armed .tn-v-chips span { --tn-d: 2s; }
.tn-p5.is-armed .tn-v-chips span:nth-child(2) { --tn-d: 2.15s; }
.tn-p5.is-armed .tn-v-chips span:nth-child(3) { --tn-d: 2.3s; }
.tn-p5.is-armed .tn-v-chips span:nth-child(4) { --tn-d: 2.45s; }

/* P6: VPS đang chạy (vòng lan nhẹ), khách lần lượt bấm từng thao tác, 2FA đã bật */
.tn-p6.is-armed .tn-v-vps, .tn-p6.is-armed .tn-v-actions, .tn-p6.is-armed .tn-v-row, .tn-p6.is-armed .tn-diagram-note { animation: tnIn 8s var(--tn-d, 0s) infinite both paused; }
.tn-p6.is-armed .tn-v-actions { --tn-d: .3s; }
.tn-p6.is-armed .tn-v-row:nth-child(1) { --tn-d: .6s; }
.tn-p6.is-armed .tn-v-row:nth-child(2) { --tn-d: .8s; }
.tn-p6.is-armed .tn-v-row:nth-child(3) { --tn-d: 1s; }
.tn-p6.is-armed .tn-diagram-note { --tn-d: 1.3s; }
.tn-p6.is-armed .tn-v-row > i { animation: tnPop 8s 1.35s infinite both paused; }
.tn-p6.is-armed .tn-v-status::before { animation: tnRipple 1.6s infinite paused; }
.tn-p6.is-armed .tn-v-actions span { animation: tnPress 8s var(--tn-d, 2s) infinite paused; }
.tn-p6.is-armed .tn-v-actions span:nth-child(2) { --tn-d: 2.7s; }
.tn-p6.is-armed .tn-v-actions span:nth-child(3) { --tn-d: 3.4s; }
.tn-p6.is-armed .tn-v-actions span:nth-child(4) { --tn-d: 4.1s; }

/* P7: dòng GỬI / NHẬN / WEBHOOK gõ dần, số dư ví nảy lên khi có NHẬN (ví trừ tiền) */
.tn-p7.is-armed .tn-v-vps, .tn-p7.is-armed .tn-v-code-block, .tn-p7.is-armed .tn-v-chips span { animation: tnIn 8s var(--tn-d, 0s) infinite both paused; }
.tn-p7.is-armed .tn-v-code-block { --tn-d: .2s; }
.tn-p7.is-armed .tn-v-code-block p { animation: tnType 8s var(--tn-d, .5s) infinite both paused; animation-timing-function: steps(24, end); }
.tn-p7.is-armed .tn-v-code-block p:nth-child(2) { --tn-d: 1.3s; }
.tn-p7.is-armed .tn-v-code-block p:nth-child(3) { --tn-d: 2.1s; }
.tn-p7.is-armed .tn-v-code-block p:nth-child(4) { --tn-d: 2.9s; }
.tn-p7.is-armed .tn-v-amount { display: inline-block; animation: tnBump 8s 1.9s infinite paused; }
.tn-p7.is-armed .tn-v-chips span { --tn-d: 3.3s; }
.tn-p7.is-armed .tn-v-chips span:nth-child(2) { --tn-d: 3.45s; }
.tn-p7.is-armed .tn-v-chips span:nth-child(3) { --tn-d: 3.6s; }

/* Cuộn tới mới chạy (đặt cuối, !important để thắng các khai báo animation có độ ưu tiên cao hơn ở trên) */
.tn-diagram.is-armed.is-in *, .tn-diagram.is-armed.is-in *::before, .tn-diagram.is-armed.is-in *::after { animation-play-state: running !important; }
