/* =============================================================================
   产品（#product）：智能安全运营（核心）/ 数据安全网关 / Agent 治理 / BAS 渗透测试
   - 编号标签页 + 进度条自动轮播；悬停暂停，滚出视口暂停
   - 每个面板右侧是一段会「跑」的产品切片，时间线全部写在 CSS 的 --t 上
   - 动画只在 .ag--anim 下生效；无 JS / prefers-reduced-motion 时直接是终态
   ============================================================================= */

.ag {
  --ag-ink: #0c1929;
  --ag-sub: #334155;
  --ag-muted: #64748b;
  --ag-faint: #94a3b8;
  --ag-line: #e3eaf6;
  --ag-blue: #003fec;
  --ag-blue-soft: #e8efff;
  --ag-blue-line: #c9d9ff;
  --ag-ok: #047857;
  --ag-ok-soft: #e7f8ef;
  --ag-bad: #c62828;
  --ag-bad-soft: #fff0f0;
  --ag-warn: #a15c07;
  --ag-mono: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  --ag-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  padding: clamp(3.5rem, 8vh, 6rem) 0 clamp(3rem, 7vh, 5rem);
  scroll-margin-top: var(--nav-h, 72px);
  color: var(--ag-ink);
  background:
    radial-gradient(50% 45% at 85% 80%, rgba(0, 63, 236, 0.07), transparent 70%),
    radial-gradient(40% 35% at 8% 10%, rgba(0, 63, 236, 0.05), transparent 70%),
    #fff;
  overflow: hidden;
}

.ag-wrap {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
}

/* ---------- 标题 ---------- */
.ag-head { max-width: 52rem; margin: 0 0 clamp(1.5rem, 3.5vh, 2.25rem); }
.ag-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.32rem 1rem;
  border-radius: 999px;
  background: var(--ag-blue-soft);
  color: var(--ag-blue);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.ag-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ag-blue); }
.ag-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 2.7vw, 2.35rem);
  font-weight: 750;
  line-height: 1.25;
  color: var(--ag-ink);
}
.ag-title-em { display: block; color: var(--ag-blue); }
.ag-desc { max-width: 46rem; margin: 0.75rem 0 0; font-size: clamp(0.9rem, 1.1vw, 1rem); line-height: 1.7; color: var(--ag-muted); }

/* ---------- 标签页 ---------- */
.ag-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 1.25rem;
  margin-bottom: clamp(1.5rem, 3vh, 2.25rem);
}
.ag-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0.25rem 0.9rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ag-tab:focus-visible { outline: 2px solid var(--ag-blue); outline-offset: 4px; border-radius: 4px; }
.ag-tab-n { flex: none; padding-top: 0.15rem; font: 700 0.72rem var(--ag-mono); letter-spacing: 0.1em; color: var(--ag-faint); transition: color 0.25s; }
.ag-tab-tx { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ag-tab-t { font-size: 1.02rem; font-weight: 700; color: var(--ag-muted); transition: color 0.25s; }
.ag-tab-t { display: inline-flex; align-items: center; gap: 0.45rem; }
.ag-tab-core { padding: 0.06rem 0.45rem; border-radius: 999px; background: var(--ag-blue); font-size: 0.62rem; font-style: normal; font-weight: 700; letter-spacing: 0.04em; color: #fff; }
.ag-tab-s { font-size: 0.8rem; color: var(--ag-faint); transition: color 0.25s; }
.ag-tab:hover .ag-tab-t { color: var(--ag-ink); }
.ag-tab[aria-selected="true"] .ag-tab-n { color: var(--ag-blue); }
.ag-tab[aria-selected="true"] .ag-tab-t { color: var(--ag-ink); }
.ag-tab[aria-selected="true"] .ag-tab-s { color: var(--ag-muted); }

.ag-tab-bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; border-radius: 2px; background: var(--ag-line); }
.ag-tab-bar i { position: absolute; inset: 0; background: var(--ag-blue); transform: scaleX(0); transform-origin: left center; }
.ag-tab[aria-selected="true"] .ag-tab-bar i { transform: none; }
.ag--anim .ag-tab[aria-selected="true"] .ag-tab-bar i { animation: ag-fill var(--ag-dur, 10s) linear both; }
.ag--anim.is-held .ag-tab[aria-selected="true"] .ag-tab-bar i,
.ag--anim.is-offscreen .ag-tab[aria-selected="true"] .ag-tab-bar i { animation-play-state: paused; }
/* 用户手动点过 → 不再自动轮播，进度条直接满格 */
.ag--anim.is-manual .ag-tab[aria-selected="true"] .ag-tab-bar i { animation: none; transform: none; }

/* ---------- 面板 ---------- */
.ag-pane {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3.5rem);
}
.ag-pane[hidden] { display: none; }
.ag-copy-t { margin: 0; font-size: clamp(1.25rem, 1.9vw, 1.6rem); font-weight: 750; line-height: 1.35; color: var(--ag-ink); }
.ag-points { display: flex; flex-direction: column; gap: 0.85rem; margin: 1.35rem 0 0; padding: 0; list-style: none; }
.ag-points li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 1.85rem;
}
.ag-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.6 2.6L12 5.4' fill='none' stroke='%23003fec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat,
    var(--ag-blue-soft);
  box-shadow: inset 0 0 0 1px var(--ag-blue-line);
}
.ag-points b { font-size: 0.92rem; font-weight: 700; color: var(--ag-ink); }
.ag-points span { font-size: 0.84rem; line-height: 1.6; color: var(--ag-muted); }
.ag-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.6rem; }
.ag-cta.btn { min-height: 0; height: 42px; padding: 0 1.5rem; border-radius: 999px; }
.ag-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ag-blue);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}
.ag-demo svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.ag-demo:hover svg { transform: translateX(3px); }
.ag-demo:focus-visible { outline: 2px solid var(--ag-blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- 产品窗口 ---------- */
.ag-viz { position: relative; min-width: 0; }
.ag-viz::before {
  content: "";
  position: absolute;
  inset: 10% -4% -8% 6%;
  border-radius: 50%;
  background: radial-gradient(55% 55% at 50% 50%, rgba(0, 63, 236, 0.12), rgba(0, 63, 236, 0) 72%);
  pointer-events: none;
}
.ag-win {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 63, 236, 0.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 57, 109, 0.04), 0 12px 28px rgba(11, 57, 109, 0.07), 0 40px 80px -24px rgba(0, 63, 236, 0.22);
}
.ag-win-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--ag-line);
  background: #fafcff;
  font-size: 0.78rem;
}
.ag-win-bar b { font-weight: 650; color: var(--ag-ink); }
.ag-dots { display: inline-flex; gap: 6px; }
.ag-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(15, 23, 42, 0.13); }
.ag-win-tag { padding: 0.08rem 0.5rem; border: 1px solid var(--ag-line); border-radius: 999px; font-size: 0.66rem; color: var(--ag-muted); }
.ag-live { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font: 700 0.6rem/1 var(--ag-mono); letter-spacing: 0.1em; color: #059669; }
.ag-live i { width: 6px; height: 6px; border-radius: 50%; background: #059669; animation: ag-pulse 1.6s ease-in-out infinite; }

.ag-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--ag-line);
  font-size: 0.74rem;
  color: var(--ag-muted);
}
.ag-stats > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ag-stats b { font: 800 0.95rem var(--ag-mono); color: var(--ag-blue); }
.ag-stats svg { width: 13px; height: 13px; fill: none; stroke: var(--ag-ok); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* =============================================================================
   01 数据安全网关：企业内网 | 网关 | 第三方大模型
   ============================================================================= */
.dlp { padding: 0.95rem 1.1rem 1rem; }
.dlp-zones, .dlp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); }
.dlp-zones { margin-bottom: 0.55rem; }
.dlp-zone { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ag-muted); }
.dlp-zone:last-child { justify-content: flex-end; }
.dlp-zone svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dlp-zone--gw { justify-content: center; color: var(--ag-blue); }
.dlp-grid { position: relative; row-gap: 0.75rem; }
/* 网关这一列就是企业边界：一道竖向的虚线 */
.dlp-grid::before {
  content: "";
  position: absolute;
  top: -0.3rem;
  bottom: -0.3rem;
  left: 50%;
  width: 84px;
  margin-left: -42px;
  border-left: 1px dashed var(--ag-blue-line);
  border-right: 1px dashed var(--ag-blue-line);
  background: repeating-linear-gradient(180deg, rgba(0, 63, 236, 0.035) 0 6px, transparent 6px 12px);
  pointer-events: none;
}
.dlp-card {
  min-width: 0;
  padding: 0.6rem 0.75rem 0.7rem;
  border: 1px solid var(--ag-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(12, 25, 41, 0.05), 0 6px 16px rgba(12, 25, 41, 0.05);
}
.dlp-card--out, .dlp-card--reply { background: #f8faff; border-color: #dbe5fb; }
.dlp-card--back { border-color: #b7e4cb; background: linear-gradient(180deg, #f3fcf7, #fff); }
.dlp-k { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.35rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ag-muted); }
.dlp-k em { overflow: hidden; font: 500 0.6rem var(--ag-mono); font-style: normal; color: var(--ag-faint); white-space: nowrap; text-overflow: ellipsis; }
.dlp-text { margin: 0; font-size: 0.8rem; line-height: 1.75; color: var(--ag-ink); overflow-wrap: anywhere; }
.dlp-m { padding: 0 0.15rem; border-radius: 3px; background: rgba(220, 38, 38, 0.1); box-shadow: inset 0 -1.5px 0 rgba(220, 38, 38, 0.55); color: #b91c1c; font-weight: 600; }
.dlp-t { padding: 0.05rem 0.32rem; border: 1px solid var(--ag-blue-line); border-radius: 4px; background: var(--ag-blue-soft); font: 700 0.7rem var(--ag-mono); color: var(--ag-blue); white-space: nowrap; }
.dlp-r { padding: 0 0.15rem; border-radius: 3px; background: rgba(5, 150, 105, 0.12); color: var(--ag-ok); font-weight: 650; }

.dlp-gw { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; }
.dlp-pipe { position: relative; display: block; width: 100%; height: 2px; background: var(--ag-blue-line); }
.dlp-pipe::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  border: 4px solid transparent;
  border-left: 6px solid var(--ag-blue-line);
  border-right: 0;
}
.dlp-gw--back .dlp-pipe::after { right: auto; left: -1px; border-left: 0; border-right: 6px solid #9fdcbd; }
.dlp-gw--back .dlp-pipe { background: #b7e4cb; }
.dlp-pk { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ag-blue); box-shadow: 0 0 0 4px rgba(0, 63, 236, 0.15); opacity: 0; }
.dlp-gw--back .dlp-pk { left: auto; right: 0; background: #059669; box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15); }
.dlp-gw-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--ag-blue);
  box-shadow: 0 6px 14px rgba(0, 63, 236, 0.25);
  font-size: 0.64rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.dlp-gw-chip svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dlp-gw-chip--ok { background: #059669; box-shadow: 0 6px 14px rgba(5, 150, 105, 0.25); }

/* =============================================================================
   01 智能安全运营：告警漏斗 → 事件与证据 → 待确认的处置
   ============================================================================= */
.sop { padding: 0.95rem 1.1rem 1rem; }
.sop-funnel { display: grid; grid-template-columns: minmax(0, 1fr) 1.4rem minmax(0, 1fr) 1.4rem minmax(0, 1fr); align-items: center; margin-bottom: 0.8rem; }
.sop-stage { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.55rem 0.4rem; border: 1px solid var(--ag-line); border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(12, 25, 41, 0.05); }
.sop-stage b { font: 800 1.15rem var(--ag-mono); color: var(--ag-ink); }
.sop-stage span { font-size: 0.66rem; color: var(--ag-muted); }
.sop-stage--hot { border-color: #f5b5b5; background: var(--ag-bad-soft); }
.sop-stage--hot b { color: var(--ag-bad); }
.sop-arrow { justify-self: center; width: 8px; height: 8px; border-top: 1.5px solid var(--ag-faint); border-right: 1.5px solid var(--ag-faint); transform: rotate(45deg); }

.sop-inc { overflow: hidden; border: 1px solid var(--ag-line); border-radius: 12px; }
.sop-inc-hd { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--ag-line); background: #f9fbff; }
.sop-inc-hd b { overflow: hidden; font-size: 0.8rem; font-weight: 750; color: var(--ag-ink); white-space: nowrap; text-overflow: ellipsis; }
.sop-inc-hd code { margin-left: auto; font: 600 0.62rem var(--ag-mono); color: var(--ag-muted); }
.sop-sev { flex: none; padding: 0.08rem 0.45rem; border-radius: 5px; background: #fee2e2; font-size: 0.64rem; font-weight: 750; color: #b91c1c; }
.sop-ev { display: flex; flex-direction: column; margin: 0; padding: 0.35rem 0.75rem 0.45rem; list-style: none; }
.sop-ev li { display: flex; align-items: baseline; gap: 0.55rem; padding: 0.3rem 0; font-size: 0.72rem; line-height: 1.5; color: var(--ag-sub); }
.sop-ev li + li { border-top: 1px dashed var(--ag-line); }
.sop-src { flex: none; padding: 0.02rem 0.4rem; border-radius: 5px; background: var(--ag-blue-soft); font-size: 0.62rem; font-weight: 700; color: var(--ag-blue); }

.sop-act { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid #f3d18a; border-radius: 12px; background: #fffaf0; }
.sop-act-t { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; font-size: 0.74rem; color: var(--ag-ink); }
.sop-act-t b { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ag-warn); }
.sop-act-btn { flex: none; margin-left: auto; padding: 0.3rem 0.8rem; border-radius: 999px; background: #f59e0b; font-size: 0.7rem; font-weight: 700; color: #fff; }

/* =============================================================================
   02 Agent 治理：登记 → 逐次判定 → 越权告警
   ============================================================================= */
.gov { padding: 0.95rem 1.1rem 1.05rem; }
.gov-agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; margin-bottom: 0.8rem; }
.gov-agent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ag-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(12, 25, 41, 0.05);
}
.gov-av { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 0.72rem; font-weight: 800; color: #fff; }
.gov-av--a { background: linear-gradient(135deg, #0c1929, #334155); }
.gov-av--b { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.gov-av--c { background: linear-gradient(135deg, #003fec, #4f7bff); }
.gov-ag-t { display: flex; flex-direction: column; min-width: 0; }
.gov-ag-t b { font-size: 0.76rem; font-weight: 700; color: var(--ag-ink); }
.gov-ag-t em { overflow: hidden; font-size: 0.62rem; font-style: normal; color: var(--ag-muted); white-space: nowrap; text-overflow: ellipsis; }
.gov-agent--bad { border-color: #f5b5b5; background: var(--ag-bad-soft); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08); }

.gov-log { overflow: hidden; border: 1px solid var(--ag-line); border-radius: 11px; }
.gov-row {
  display: grid;
  grid-template-columns: 4.4rem 6.6rem minmax(0, 1fr) 4.6rem;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.7rem;
  border-top: 1px solid var(--ag-line);
  font-size: 0.7rem;
  color: var(--ag-sub);
}
.gov-row > span:first-child { font-family: var(--ag-mono); font-size: 0.64rem; color: var(--ag-faint); }
.gov-row > span:nth-child(2) { overflow: hidden; font-weight: 650; color: var(--ag-ink); white-space: nowrap; text-overflow: ellipsis; }
.gov-row code { overflow: hidden; font: 600 0.68rem var(--ag-mono); color: var(--ag-ink); white-space: nowrap; text-overflow: ellipsis; }
.gov-row code i { font-style: normal; font-weight: 400; color: var(--ag-muted); }
.gov-row--hd { border-top: 0; background: #f6f8fc; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ag-faint); }
.gov-row--hd > span { font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; color: inherit !important; }
.gov-ok, .gov-bad { justify-self: end; padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.62rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.gov-ok { background: var(--ag-ok-soft); color: var(--ag-ok); }
.gov-bad { background: #fee2e2; color: #b91c1c; box-shadow: inset 0 0 0 1px #f5b5b5; }
.gov-row--bad { background: var(--ag-bad-soft); box-shadow: inset 3px 0 0 #dc2626; }
.gov-row--bad code { color: #b91c1c; }

.gov-alert {
  margin-top: 0.8rem;
  padding: 0.7rem 0.85rem 0.75rem;
  border: 1px solid #f6c4c4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff6f6, #fff);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.08);
}
.gov-alert-hd { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.gov-alert-hd b { font-size: 0.82rem; font-weight: 750; color: #991b1b; }
.gov-alert-ic { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #fee2e2; }
.gov-alert-ic svg { width: 13px; height: 13px; fill: none; stroke: #dc2626; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gov-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.28rem 0.8rem; margin: 0; font-size: 0.74rem; line-height: 1.5; }
.gov-kv dt { color: var(--ag-muted); }
.gov-kv dd { margin: 0; color: var(--ag-ink); }
.gov-kv dd:last-of-type { font-weight: 650; color: var(--ag-ok); }

/* =============================================================================
   03 BAS：授权范围 → 步骤 → 验证证明
   ============================================================================= */
.bas { padding: 0.95rem 1.1rem 1.05rem; }
.bas-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.85rem; }
.bas-scope-k { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 0.2rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ag-ok); }
.bas-scope-k::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: #10b981; }
.bas-scope code { padding: 0.1rem 0.45rem; border: 1px solid #b7e4cb; border-radius: 5px; background: var(--ag-ok-soft); font: 600 0.66rem var(--ag-mono); color: var(--ag-ok); }
.bas-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0.9rem; align-items: start; }

.bas-steps { position: relative; display: flex; flex-direction: column; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.bas-steps::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 2px; background: var(--ag-line); }
.bas-step { position: relative; display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.38rem 0; }
.bas-step > i {
  position: relative;
  z-index: 1;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
  background-color: var(--ag-blue);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--ag-blue-line);
}
.bas-step > span { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.bas-step b { font-size: 0.78rem; font-weight: 700; color: var(--ag-ink); }
.bas-step em { font-size: 0.7rem; font-style: normal; line-height: 1.45; color: var(--ag-muted); }
.bas-step--ask > i { background-color: #f59e0b; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #f3d18a; }
.bas-step--hit > i { background-color: #dc2626; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #f5b5b5; }
.bas-step--hit em { font-weight: 650; color: #b91c1c; }
.bas-swap { display: inline-grid; justify-items: start; }
.bas-swap > span { grid-area: 1 / 1; }
.bas-ask { opacity: 0; padding: 0 0.45rem; border-radius: 5px; background: #fff4dc; color: var(--ag-warn); font-weight: 650; }
.bas-ans { color: var(--ag-ok); font-weight: 650; }

.bas-pf {
  min-width: 0;
  padding: 0.65rem 0.75rem 0.7rem;
  border: 1px solid #f6c4c4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff7f7, #fff);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.07);
}
.bas-pf-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.55rem; }
.bas-pf-hd b { font-size: 0.8rem; font-weight: 750; color: var(--ag-ink); }
.bas-pf-hd code { margin-left: auto; font: 600 0.62rem var(--ag-mono); color: var(--ag-muted); }
.bas-pf-sev { padding: 0.08rem 0.45rem; border-radius: 5px; background: #fee2e2; font-size: 0.64rem; font-weight: 750; color: #b91c1c; }
.bas-req, .bas-res {
  margin: 0;
  padding: 0.5rem 0.6rem;
  overflow: hidden;
  border-radius: 8px;
  background: #0f1a2e;
  font: 500 0.64rem/1.6 var(--ag-mono);
  color: #c7d2e6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bas-res { margin-top: 0.35rem; background: #13213a; }
.bas-req mark { padding: 0 0.15rem; border-radius: 3px; background: rgba(250, 204, 21, 0.25); color: #fde68a; }
.bas-m { font-weight: 700; color: #7dd3fc; }
.bas-200 { font-weight: 700; color: #86efac; }
.bas-pf-obs { display: flex; align-items: center; gap: 0.35rem; margin: 0.55rem 0 0; font-size: 0.7rem; font-weight: 650; color: var(--ag-ok); }
.bas-pf-obs svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* =============================================================================
   时间线：.is-play 时按 --t 依次入场（fill: both，结束后停在终态）
   ============================================================================= */
.ag--anim .ag-pane .sop-stage,
.ag--anim .ag-pane .sop-inc,
.ag--anim .ag-pane .sop-ev li,
.ag--anim .ag-pane .sop-act,
.ag--anim .ag-pane .dlp-card,
.ag--anim .ag-pane .dlp-gw-chip,
.ag--anim .ag-pane .ag-stats,
.ag--anim .ag-pane .gov-agent,
.ag--anim .ag-pane .gov-row:not(.gov-row--hd),
.ag--anim .ag-pane .gov-alert,
.ag--anim .ag-pane .bas-scope,
.ag--anim .ag-pane .bas-step,
.ag--anim .ag-pane .bas-pf { opacity: 0; }

.ag-pane.is-play .sop-stage,
.ag-pane.is-play .sop-inc,
.ag-pane.is-play .sop-ev li,
.ag-pane.is-play .sop-act,
.ag-pane.is-play .dlp-card,
.ag-pane.is-play .ag-stats,
.ag-pane.is-play .gov-agent,
.ag-pane.is-play .gov-row:not(.gov-row--hd),
.ag-pane.is-play .gov-alert,
.ag-pane.is-play .bas-scope,
.ag-pane.is-play .bas-step,
.ag-pane.is-play .bas-pf { animation: ag-rise 0.5s var(--ag-ease) var(--t, 0s) both; }
.ag-pane.is-play .dlp-gw-chip { animation: ag-pop 0.45s var(--ag-ease) var(--t, 0s) both; }

/* 01：告警逐级收敛 → 事件 → 证据逐条补齐 → 处置建议等人确认 */
.sop-stage:nth-child(1) { --t: 0.2s; }
.sop-stage:nth-child(3) { --t: 0.9s; }
.sop-stage:nth-child(5) { --t: 1.6s; }
.sop-inc { --t: 2.3s; }
.sop-ev li { --t: calc(2.9s + var(--i) * 0.7s); }
.sop-act { --t: 5.2s; }
.sop .ag-stats { --t: 6s; }
.ag-pane.is-play .sop-act-btn { animation: ag-wait 1.6s ease-in-out 5.8s 2 both; }

/* 02：原文 → 标出敏感字段 → 出域 → 占位符 → 模型回复 → 回程 → 还原 */
.dlp-card--src { --t: 0.2s; }
.dlp-gw--out .dlp-gw-chip { --t: 2.1s; }
.dlp-card--out { --t: 2.7s; }
.dlp-card--reply { --t: 4.2s; }
.dlp-gw--back .dlp-gw-chip { --t: 5.1s; }
.dlp-card--back { --t: 5.7s; }
.dlp .ag-stats { --t: 6.6s; }
.ag-pane.is-play .dlp-m { animation: ag-mark 0.5s ease calc(0.9s + var(--i) * 0.28s) both; }
.ag-pane.is-play .dlp-card--out .dlp-t { animation: ag-pop 0.4s var(--ag-ease) calc(3s + var(--i, 0) * 0.15s) both; }
.ag-pane.is-play .dlp-card--back .dlp-r { animation: ag-mark-ok 0.5s ease 6.1s both; }
.ag-pane.is-play .dlp-gw--out .dlp-pk { animation: ag-pk 0.7s ease-in-out 2s both; }
.ag-pane.is-play .dlp-gw--back .dlp-pk { animation: ag-pk-back 0.7s ease-in-out 5s both; }

/* 03：登记的 Agent → 调用逐条进来 → 越权那条标红 → 告警 */
.gov-agent:nth-child(1) { --t: 0.15s; }
.gov-agent:nth-child(2) { --t: 0.3s; }
.gov-agent:nth-child(3) { --t: 0.45s; }
.gov-row:not(.gov-row--hd) { --t: calc(1s + var(--i) * 0.85s); }
.gov-alert { --t: 4.7s; }
.ag-pane.is-play .gov-row--bad { animation: ag-rise 0.5s var(--ag-ease) var(--t) both, ag-shake 0.5s ease calc(var(--t) + 0.45s) both; }
.ag--anim .ag-pane .gov-agent--bad { border-color: var(--ag-line); background: #fff; box-shadow: 0 1px 2px rgba(12, 25, 41, 0.05); }
.ag-pane.is-play .gov-agent--bad { animation: ag-rise 0.5s var(--ag-ease) var(--t) both, ag-flag 0.4s ease 4.1s both; }

/* 04：范围 → 侦察 → 打点 → 登录页停下来问 → 拿到账号继续 → 越权 → 结论 → 证明 */
.bas-scope { --t: 0.15s; }
.bas-step:nth-child(1) { --t: 0.7s; }
.bas-step:nth-child(2) { --t: 1.6s; }
.bas-step:nth-child(3) { --t: 2.5s; }
.bas-step:nth-child(4) { --t: 4.5s; }
.bas-step:nth-child(5) { --t: 5.6s; }
.bas-pf { --t: 6.2s; }
.ag--anim .ag-pane .bas-ask { opacity: 1; }
.ag--anim .ag-pane .bas-ans { opacity: 0; }
.ag-pane.is-play .bas-ask { animation: ag-fade-out 0.3s ease 3.9s forwards; }
.ag-pane.is-play .bas-ans { animation: ag-fade-in 0.35s ease 3.9s forwards; }
.ag-pane.is-play .bas-step--ask > i { animation: ag-ask 1.4s ease-in-out 2.6s 1 both; }

@keyframes ag-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ag-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ag-pop { 0% { opacity: 0; transform: scale(0.85); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes ag-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ag-mark {
  from { background: transparent; box-shadow: inset 0 -1.5px 0 transparent; color: inherit; }
  to { background: rgba(220, 38, 38, 0.1); box-shadow: inset 0 -1.5px 0 rgba(220, 38, 38, 0.55); color: #b91c1c; }
}
@keyframes ag-mark-ok { from { background: transparent; color: inherit; } to { background: rgba(5, 150, 105, 0.12); color: #047857; } }
@keyframes ag-pk { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes ag-pk-back { 0% { right: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { right: calc(100% - 8px); opacity: 0; } }
@keyframes ag-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@keyframes ag-flag { to { border-color: #f5b5b5; background: #fff0f0; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08); } }
@keyframes ag-fade-out { to { opacity: 0; } }
@keyframes ag-fade-in { to { opacity: 1; } }
@keyframes ag-wait { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } 50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.25); } }
@keyframes ag-ask { 0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 4px #f3d18a; } 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 8px rgba(245, 158, 11, 0.25); } }

.ag.is-offscreen .ag-pane *,
.ag.is-offscreen .ag-live i { animation-play-state: paused !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .ag-tab-s { display: none; }
}
@media (max-width: 1020px) {
  .ag-pane { grid-template-columns: minmax(0, 1fr); }
  .ag-copy { max-width: 40rem; }
}
@media (max-width: 720px) {
  .ag-tabs { display: flex; gap: 1rem; margin-left: calc(-1 * clamp(1.1rem, 4vw, 2rem)); margin-right: calc(-1 * clamp(1.1rem, 4vw, 2rem)); padding: 0 clamp(1.1rem, 4vw, 2rem); overflow-x: auto; scrollbar-width: none; }
  .ag-tabs::-webkit-scrollbar { display: none; }
  .ag-tab { flex: 0 0 auto; min-width: 11.5rem; }
  .ag-tab-s { display: none; }
  .bas-body { grid-template-columns: minmax(0, 1fr); }
  .gov-agents { grid-template-columns: minmax(0, 1fr); }
  .gov-row { grid-template-columns: 4.6rem minmax(0, 1fr) 3.4rem; }
  .gov-row > span:first-child { display: none; }
}
@media (max-width: 600px) {
  /* 手机上网关列改成上下流：原文 → 脱敏 → 发出 → 回复 → 还原 → 收到 */
  .dlp-zones { display: none; }
  .dlp-grid { grid-template-columns: minmax(0, 1fr); row-gap: 0.4rem; }
  .dlp-grid::before { display: none; }
  .dlp-card--src { order: 1; }
  .dlp-gw--out { order: 2; }
  .dlp-card--out { order: 3; }
  .dlp-card--reply { order: 4; }
  .dlp-gw--back { order: 5; }
  .dlp-card--back { order: 6; }
  .dlp-gw { flex-direction: row; height: 1.6rem; }
  .dlp-pipe { width: 2px; height: 100%; }
  .dlp-pipe::after, .dlp-pk { display: none; }
  .ag-win-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ag-live i { animation: none; }
}
