/* ============================================================
   优界 M0 AI 工作台 — 设计 token
   ============================================================ */

@property --a {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;

  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef2ff;

  --ok: #16a34a;
  --ok-soft: #f0fdf4;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --ai-gradient: linear-gradient(120deg, #6366f1, #8b5cf6 45%, #06b6d4);

  --side-bg: #101014;
  --console-bg: #0c0d12;

  --font-sans: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 12px -4px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px -8px rgba(79, 70, 229, .16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.6;
}

button { font: inherit; color: inherit; }

h1, h2, h3, p { margin-top: 0; }
h2 { font-size: 22px; font-weight: 600; margin-bottom: 0; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }

::selection { background: var(--brand-soft); }

button:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .28);
}

/* ============================================================
   布局骨架
   ============================================================ */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: var(--side-bg);
  color: #f4f4f5;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.brand { display: flex; gap: 12px; align-items: center; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--ai-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
}

.brand strong { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; }
.brand span { display: block; margin-top: 3px; color: #9d9da6; font-size: 12px; }

.stage-nav { display: grid; gap: 6px; }

.stage {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  color: #e7e7ea;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

.stage:hover { background: rgba(255, 255, 255, .07); }
.stage.active { background: rgba(99, 102, 241, .16); border-color: rgba(99, 102, 241, .35); }

.stage-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
}

.stage.active .stage-no { background: var(--brand); color: #fff; }

.stage-text { min-width: 0; }
.stage-text strong { display: block; font-weight: 600; font-size: 13.5px; }
.stage-text small { display: block; margin-top: 2px; color: #8e8e98; font-size: 11.5px; line-height: 1.35; }

.stage.locked { opacity: .45; cursor: not-allowed; }
.stage.locked .stage-no { color: #6b6b75; }
.stage.locked::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 10px;
  height: 9px;
  transform: translateY(-32%);
  border: 1.5px solid #6b6b75;
  border-radius: 2px;
  background: var(--side-bg);
}
.stage.locked::before {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 7px;
  transform: translateY(-90%);
  border: 1.5px solid #6b6b75;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.stage.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.stage-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: #6ee7b7;
  white-space: nowrap;
}
.stage-badge.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop {
  0% { transform: scale(.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.side-engine {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: rgba(99, 102, 241, .1);
  border: 1px solid rgba(99, 102, 241, .25);
}
.side-engine .ai-spark { color: #a5b4fc; }
.side-engine strong { display: block; font-size: 12.5px; font-weight: 600; }
.side-engine small { display: block; margin-top: 3px; color: #9d9da6; font-size: 11px; line-height: 1.5; }

.side-footer {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .06);
}
.side-footer span { display: block; font-size: 11px; color: #8e8e98; }
.side-footer strong { display: block; font-weight: 600; font-size: 13px; margin-top: 2px; }

.main {
  min-width: 0;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 40px 64px;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
}

.proj-chip { display: flex; align-items: center; gap: 10px; }
.proj-chip .mono {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.proj-chip em { font-style: normal; font-size: 15px; font-weight: 600; }

.actions { display: flex; gap: 10px; align-items: center; }

/* ============================================================
   按钮
   ============================================================ */

.primary-btn, .secondary-btn, .icon-btn {
  min-height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}

.primary-btn {
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 2px rgba(16, 24, 40, .2);
}
.primary-btn:hover { background: var(--brand-hover); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: .7; cursor: default; transform: none; }

.primary-btn.ai-btn { background: var(--ai-gradient); }
.primary-btn.ai-btn:hover { filter: brightness(1.08); }

.ai-spark { font-style: normal; }

.spin {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner .7s linear infinite;
  vertical-align: -1px;
}
@keyframes spinner { to { transform: rotate(360deg); } }

.secondary-btn {
  padding: 0 14px;
  background: var(--surface);
  font-weight: 500;
}
.secondary-btn:hover { background: #f4f4f5; border-color: var(--line-strong); }
.secondary-btn:active { transform: translateY(1px); }
.secondary-btn:disabled { opacity: .6; cursor: default; }

.icon-btn {
  width: 40px;
  background: var(--surface);
  font-size: 17px;
  position: relative;
  overflow: hidden;
}
.icon-btn:hover { background: #f4f4f5; border-color: var(--line-strong); }

.icon-btn.arming::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(79, 70, 229, .22);
  transform-origin: left;
  animation: arming .8s linear forwards;
}
@keyframes arming { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.link-btn {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-weight: 600;
  transition: color .15s ease;
}
.link-btn:hover { color: var(--brand-hover); text-decoration: underline; }

/* ============================================================
   通用组件
   ============================================================ */

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}
.eyebrow.light { color: #a5b4fc; }

.section { display: none; }
.section.active { display: block; }

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section-sub { margin: 8px 0 0; color: var(--muted); max-width: 640px; }

.pill, .score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.muted { background: #f4f4f5; color: var(--muted); }
.pill.good { background: var(--ok-soft); color: var(--ok); }
.pill.warn, .score.danger { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.ai { background: rgba(99, 102, 241, .18); color: #a5b4fc; }
.score.danger { background: var(--danger-soft); color: var(--danger); }

.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.panel, .doc-card, .risk-card, .task-card, .decision-card, .metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}

.panel { padding: 20px; }
.panel.plain { background: transparent; border-color: transparent; box-shadow: none; }
.panel.span2 { grid-column: span 2; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.workbench { display: grid; gap: 16px; }
.two-col { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.col-stack { display: grid; gap: 16px; align-content: start; }

.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f8fa;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.mini-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.cite-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.cite-chip:hover { background: #e0e7ff; border-color: var(--brand); }
.cite-chip svg { flex: none; }

/* 涌现动画 */
.reveal-in { animation: riseIn .5s ease both; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash { animation: flashBg 2s ease; }
@keyframes flashBg {
  0%, 60% { box-shadow: 0 0 0 3px rgba(79, 70, 229, .35); }
  100% { box-shadow: var(--shadow-xs); }
}

/* ============================================================
   00 总览
   ============================================================ */

.demo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.demo-hero h2 {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.hero-sub {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
}

.hero-cta { display: flex; gap: 18px; align-items: center; margin-top: 20px; }

.biz-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-radius: var(--r-md);
  background: var(--side-bg);
  color: #f4f4f5;
}
.biz-kicker { color: #a5b4fc; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.biz-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.biz-row:last-child { border-bottom: 0; padding-bottom: 0; }
.biz-row span { color: #9d9da6; font-size: 12.5px; }
.biz-row strong {
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-align: right;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.stats-band > div {
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  transition: opacity .3s ease;
}
.stats-band > div:last-child { border-right: 0; }
.stats-band > div.empty { opacity: .45; }
.stats-band strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stats-band span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
/* 运行中的微光占位 (代替死板的 —) */
.stat-shimmer {
  display: inline-block;
  width: 52px;
  height: 18px;
  margin: 4px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(99, 102, 241, .10) 25%, rgba(99, 102, 241, .24) 50%, rgba(99, 102, 241, .10) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
body.lite .stat-shimmer { animation: none; }
/* 揭示瞬间 pop (finishRun 时按 60ms 级联) */
.stats-band strong.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }

/* ---------- AI 处理控制台 (全页唯一暗块) ---------- */

.processing-console {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid rgba(99, 102, 241, .25);
  border-radius: var(--r-lg);
  background: var(--console-bg);
  color: #e4e4e7;
}

/* 收尾: 玉色光带扫过控制台 (一次性) */
.processing-console.flourish { overflow: hidden; }
.processing-console.flourish::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 45%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(52, 211, 153, .20), transparent);
  animation: jadeWash 1s ease-out 1 forwards;
}
@keyframes jadeWash { to { transform: translateX(340%); } }
body.lite .processing-console.flourish::before { display: none; }

/* 完成徽章脉冲一次 */
.pill.pulse-once {
  animation: badgePulse .9s cubic-bezier(.3, 1.4, .4, 1) 1;
}
@keyframes badgePulse {
  0% { transform: scale(.55); opacity: 0; box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
  55% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); box-shadow: 0 0 0 14px rgba(52, 211, 153, 0); }
}

.processing-console.running {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--console-bg), var(--console-bg)) padding-box,
    conic-gradient(from var(--a), #6366f1, #06b6d4, #1e1b4b, #6366f1) border-box;
  animation: spinBorder 3.2s linear infinite;
  box-shadow: var(--shadow-lg);
}
@keyframes spinBorder { to { --a: 360deg; } }

.processing-console.complete { border-color: rgba(34, 197, 94, .4); }

.processing-console h2 { color: #fff; font-size: 19px; }

.console-main, .console-side { min-width: 0; }
.console-main { display: flex; flex-direction: column; }
.console-side { display: flex; flex-direction: column; }

.scan-box {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-md);
  background:
    radial-gradient(at 80% 10%, rgba(99, 102, 241, .12), transparent 50%),
    repeating-linear-gradient(0deg, transparent 0, transparent 23px, rgba(255, 255, 255, .04) 24px);
}

.doc-stack {
  display: grid;
  gap: 7px;
}
.scan-doc {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
  color: #b9b9c2;
  font-size: 12px;
  font-family: var(--font-mono);
  overflow: hidden;
  transition: border-color .3s ease, color .3s ease, opacity .3s ease, background .3s ease;
}
.scan-doc-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scan-doc-state { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.scan-doc.pending { opacity: .38; }
.scan-doc.scanning {
  border-color: rgba(129, 140, 248, .75);
  background: rgba(99, 102, 241, .14);
  color: #e0e7ff;
  box-shadow: 0 0 16px -3px rgba(99, 102, 241, .55);
}
/* 扫光束: 只扫当前正在识别的文件芯片 */
.scan-doc.scanning::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(165, 180, 252, .30) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: chipSweep .85s linear infinite;
  pointer-events: none;
}
@keyframes chipSweep { to { transform: translateX(100%); } }
.scan-badge {
  font-style: normal;
  font-size: 10px;
  line-height: 1.6;
  color: #c7d2fe;
  padding: 0 7px;
  border: 1px solid rgba(165, 180, 252, .5);
  border-radius: 999px;
  white-space: nowrap;
}
.scan-doc.done {
  border-color: rgba(52, 211, 153, .45);
  background: rgba(52, 211, 153, .07);
  color: #d1fae5;
}
.scan-check {
  font-style: normal;
  color: #34d399;
  font-weight: 700;
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1);
}
.scan-count {
  font-style: normal;
  font-size: 10px;
  line-height: 1.6;
  color: #6ee7b7;
  padding: 0 7px;
  border: 1px solid rgba(52, 211, 153, .35);
  border-radius: 999px;
  background: rgba(52, 211, 153, .1);
  white-space: nowrap;
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1);
}
body.lite .scan-doc.scanning::after,
body.lite .scan-check,
body.lite .scan-count { animation: none; }

/* 当前识别卡: 固定在文档堆下方独占一行, 不再悬浮遮挡文件芯片 */
.extract-card {
  margin-top: auto;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(99, 102, 241, .14);
  border: 1px solid rgba(99, 102, 241, .35);
}
.extract-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.extract-tags:not(:empty) { margin-top: 10px; }
.extract-tag {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #c7d2fe;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, .45);
  background: rgba(99, 102, 241, .18);
  white-space: nowrap;
}
.extract-tag.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.fact-fly {
  position: absolute;
  z-index: 3;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #e0e7ff;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, .6);
  background: rgba(99, 102, 241, .4);
  box-shadow: 0 4px 14px rgba(99, 102, 241, .4);
  pointer-events: none;
  white-space: nowrap;
  transition: transform .5s cubic-bezier(.3, .7, .3, 1), opacity .5s ease;
}
.extract-card small {
  display: block;
  color: #a5b4fc;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .08em;
}
.extract-card strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.55;
  min-height: 40px;
}

.typing::after {
  content: "▍";
  color: #818cf8;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.progress-track {
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.progress-track span {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ai-gradient);
  transition: width .6s cubic-bezier(.2, .8, .3, 1);
}
/* 玉色光晕进度头 */
.progress-track.has-progress span::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 16px;
  border-radius: inherit;
  background: radial-gradient(circle at right center, rgba(110, 231, 183, .95), rgba(52, 211, 153, .35) 60%, transparent 78%);
  box-shadow: 0 0 12px 3px rgba(52, 211, 153, .55);
}
.progress-pct {
  flex: none;
  min-width: 44px;
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 600;
  color: #6ee7b7;
}

.console-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  min-height: 38px;
}
.ctrl-hint { color: #6b6b75; font-size: 12px; }

.continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(99, 102, 241, .5);
  border-radius: var(--r-sm);
  background: rgba(99, 102, 241, .15);
  color: #c7d2fe;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, background .15s ease;
}
.continue-btn i { font-style: normal; }
.continue-btn.waiting {
  opacity: 1;
  pointer-events: auto;
  animation: glowPulse 1.6s ease-in-out infinite;
}
.continue-btn:hover { background: rgba(99, 102, 241, .3); }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, .4); }
  50% { box-shadow: 0 0 0 7px rgba(99, 102, 241, 0); }
}

.process-steps { display: grid; gap: 6px; }
.process-steps > div {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .03);
  transition: border-color .25s ease, background .25s ease;
}
.process-steps > div > span {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 2px solid #3f3f46;
  border-radius: 99px;
  background: transparent;
  transition: all .25s ease;
}
.process-steps > div.active {
  border-color: rgba(99, 102, 241, .5);
  background: rgba(99, 102, 241, .1);
}
.process-steps > div.active > span {
  border-color: #818cf8;
  background: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .2);
}
.process-steps > div.done > span { border-color: #34d399; background: #34d399; }
.process-steps strong { display: block; font-weight: 600; font-size: 13px; color: #e4e4e7; }
.process-steps small { display: block; margin-top: 2px; color: #6b6b75; font-size: 11.5px; line-height: 1.4; }

/* 记分牌: 步骤完成后的一行玉色指标 */
.step-metric {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: #34d399;
}
.step-metric.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }

.log-window {
  flex: 1 1 0;
  min-height: 220px;
  margin-top: 12px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .07);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
}
.log-window p { margin: 0 0 4px; animation: riseIn .25s ease both; }
.log-time { color: #4ade80; }
.log-kind { color: #818cf8; font-weight: 600; }
.log-kind.warn { color: #f87171; }
.log-text { color: #d4d4d8; }
.log-window p:has(.log-kind.warn) .log-text { color: #fca5a5; }

/* ---------- hero 下方面板 ---------- */

.project-card p { color: var(--muted); }

.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.facts span {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12.5px;
  font-weight: 500;
}

.line-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  counter-reset: station;
}
.line-map div {
  position: relative;
  padding: 10px 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fafafa;
  text-align: center;
  counter-increment: station;
}
.line-map div::before {
  content: counter(station);
  display: block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  margin: 0 auto 6px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.line-map strong { display: block; font-weight: 600; font-size: 12.5px; }
.line-map span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }

.flow-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  margin: 0;
  list-style: none;
  counter-reset: flow;
}
.flow-list li {
  position: relative;
  padding: 12px 14px 12px 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  counter-increment: flow;
}
.flow-list li::before {
  content: counter(flow);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 99px;
  background: #f4f4f5;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.flow-list li.gate-step { border-color: rgba(79, 70, 229, .45); background: var(--brand-soft); }
.flow-list li.gate-step::before { background: var(--brand); color: #fff; }
.flow-list strong { font-weight: 600; }
.flow-list span { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }

.flow-note {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
}
.flow-note p { margin: 0; font-size: 12.5px; font-weight: 500; }

.closure-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  display: none;
}
body[data-state="after"] .closure-panel.revealed { display: block; animation: riseIn .6s ease both; }

.closure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.closure-grid > div {
  position: relative;
  padding: 16px;
  border-radius: var(--r-sm);
  background: #fafafa;
  border: 1px solid var(--line);
}
.closure-grid > div:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -14px;
  z-index: 1;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  transform: translateY(-50%);
  font-size: 12px;
}
.closure-grid span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; }
.closure-grid strong { display: block; margin-top: 6px; font-size: 16px; font-weight: 600; }
.closure-grid p { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }

/* ============================================================
   01 资料入口
   ============================================================ */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.doc-card {
  min-height: 150px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.doc-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.doc-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.doc-card h3 { margin: 4px 0 0; font-size: 14px; word-break: break-all; }
.doc-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.doc-card .doc-wait { color: #a1a1aa; font-style: normal; }
.doc-card.unparsed { background: #fcfcfd; border-style: dashed; }

.doc-card footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  font-size: 12px;
}
.doc-card footer span { display: block; color: #a1a1aa; font-size: 11px; }
.doc-card footer strong { font-weight: 500; color: var(--ink); font-size: 12px; }
.doc-links { display: flex; gap: 6px; flex: none; }

/* ============================================================
   1.1 背景调查
   ============================================================ */

.dense-list, .check-list, .pack-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.dense-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}
.dense-list li:last-child { border-bottom: 0; }
.dense-list span { color: var(--muted); font-size: 12.5px; flex: none; }
.dense-list strong { font-weight: 500; font-size: 13px; text-align: right; }
.bg-val { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.two-col-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
}

.check-list { gap: 8px; }
.check-list li {
  position: relative;
  padding: 9px 12px 9px 30px;
  background: var(--warn-soft);
  border-radius: 7px;
  font-size: 12.5px;
}
.check-list li::before {
  content: "!";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border-radius: 99px;
  background: var(--warn);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.question-stack { display: grid; gap: 8px; }
.q-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.55;
  transition: border-color .15s ease, background .15s ease;
}
.q-item:hover { border-color: var(--brand); }
.q-item.checked { border-color: rgba(79, 70, 229, .4); background: var(--brand-soft); }
.q-check {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: var(--surface);
  transition: background .15s ease, border-color .15s ease;
}
.q-item.checked .q-check { background: var(--brand); border-color: var(--brand); }

/* ============================================================
   02 需求抽取
   ============================================================ */

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.seg {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  transition: background .15s ease;
}
.seg:hover { background: #f4f4f5; }
.seg:last-child { border-right: 0; }
.seg.active { background: var(--brand); color: #fff; }

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

table { width: 100%; border-collapse: collapse; min-width: 900px; }

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  white-space: nowrap;
  background: #fcfcfd;
}
td { line-height: 1.55; font-size: 13px; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fafafa; }
tbody tr:last-child td { border-bottom: 0; }
td strong { font-weight: 500; }

.src-plain { color: var(--muted); font-size: 12px; white-space: nowrap; }
#reqRows td:last-child { white-space: nowrap; }
.form-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: #f4f4f5;
  color: var(--muted);
  font-size: 11.5px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.wait { background: var(--warn-soft); color: var(--warn); }

/* ============================================================
   03 风险匹配
   ============================================================ */

.risk-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.risk-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 4px solid var(--line);
  transition: border-color .2s ease, background .3s ease;
}
.risk-card.high { border-left-color: var(--danger); }
.risk-card.medium { border-left-color: var(--warn); }
.risk-card.low { border-left-color: #94a3b8; }
.risk-card.closed { border-left-color: var(--ok); background: var(--ok-soft); }
.risk-card.closed .risk-action { text-decoration: line-through; opacity: .6; }

.risk-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.risk-id-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gate-tag {
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
}
.risk-card h3 { margin: 0; font-size: 16px; }
.risk-match { margin: 0; color: var(--muted); font-size: 13px; }
.risk-action { margin: 0; font-size: 13px; color: var(--ink); }
.risk-action strong {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 5px;
  background: #f4f4f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.risk-card footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.risk-card footer span { display: block; color: #a1a1aa; font-size: 11px; }
.risk-card footer strong { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* 甘特条 */
.gantt {
  position: relative;
  padding: 26px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fcfcfd;
  padding-left: 96px;
  padding-right: 12px;
}
.gantt-scale {
  position: absolute;
  top: 6px;
  left: 96px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  color: #a1a1aa;
  font-size: 12px;
  font-family: var(--font-mono);
}
.gantt-row { position: relative; height: 22px; margin-bottom: 6px; }
.g-label {
  position: absolute;
  left: -96px;
  width: 88px;
  top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  padding-right: 8px;
  white-space: nowrap;
}
.g-bar {
  position: absolute;
  top: 4px;
  height: 13px;
  border-radius: 4px;
  background: #c7d2fe;
}
.g-bar.teal { background: var(--brand); opacity: .75; }
.gantt-flag {
  position: absolute;
  top: 18px;
  bottom: 8px;
  border-left: 2px dashed var(--danger);
  padding-left: 6px;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.gantt-flag i { display: none; }
.gantt-gap {
  position: relative;
  display: block;
  height: 16px;
  margin-top: 4px;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, var(--danger-soft), var(--danger-soft) 6px, #fee2e2 6px, #fee2e2 12px);
  border: 1px solid #fecaca;
}
.gantt-gap span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
}

/* 推导卡 */
.derive {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  border: 1px solid #e0e7ff;
}
.derive span { color: var(--brand); font-size: 12px; font-weight: 600; }

/* 漏项金额表 */
.omission { min-width: 0; margin: 0; }
.omission td { padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.omission td:last-child { text-align: right; font-weight: 600; }
.omission .om-total td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 600; color: var(--danger); }
.om-note { margin: 0; padding: 8px 12px; border-radius: 7px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 500; }

/* 历史案例块 */
.case-block {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: #f4f4f5;
  border: 1px solid var(--line);
}
.case-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.case-id { font-size: 11.5px; color: var(--brand); font-weight: 600; }
.case-year {
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
}
.case-sim { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.case-sim strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.case-name { display: block; font-size: 13px; font-weight: 600; }
.case-block p { margin: 4px 0 6px; color: var(--muted); font-size: 12.5px; }
.case-block small { color: #a1a1aa; font-size: 11px; }

.low-fold { margin-top: 16px; }
.fold-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  transition: background .15s ease;
}
.fold-toggle:hover { background: #f4f4f5; }
.fold-toggle i { font-style: normal; transition: transform .2s ease; }
.fold-toggle i.open { transform: rotate(180deg); }
.fold-body { display: none; margin-top: 16px; }
.fold-body.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ============================================================
   04 ARSCI
   ============================================================ */

.matrix-wrap {
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  overflow: auto;
}

.arsci-matrix { min-width: 880px; }
.arsci-matrix .t-col { min-width: 360px; }
.arsci-matrix td.cell, .arsci-matrix th:not(.t-col) { text-align: center; }
.arsci-matrix td { font-size: 12.5px; }
.arsci-matrix .due-cell { white-space: nowrap; font-size: 11.5px; }
.arsci-matrix tr.row-done td { background: var(--ok-soft); }

.arsci-badge {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.arsci-badge.A { background: var(--brand); color: #fff; }
.arsci-badge.R { background: var(--brand-soft); color: var(--brand); border: 1px solid #c7d2fe; line-height: 20px; }
.arsci-badge.S { background: #f0fdfa; color: #0d9488; }
.arsci-badge.C { background: var(--warn-soft); color: var(--warn); }
.arsci-badge.I { background: #f4f4f5; color: var(--muted); }

.ai-fix-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, .12);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.matrix-note {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--brand-soft);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.lane {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #f4f4f5;
}
.lane h3 { margin-bottom: 12px; font-size: 13.5px; color: var(--muted); }

.task-card {
  margin-bottom: 10px;
  padding: 12px 14px;
  box-shadow: none;
  transition: border-color .2s ease, background .3s ease;
}
.task-card:last-child { margin-bottom: 0; }
.task-card.done { border-color: #bbf7d0; background: var(--ok-soft); }
.task-card h3 { margin: 4px 0 6px; font-size: 13px; line-height: 1.5; font-weight: 500; }
.task-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.arsci-line { margin: 0 0 8px; color: var(--muted); font-size: 11.5px; }
.arsci-line b {
  display: inline-block;
  width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 600;
}
.task-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.check-draw path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: drawCheck .5s ease forwards .1s; }
.check-draw circle { stroke-dasharray: 60; stroke-dashoffset: 60; animation: drawCheck .5s ease forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* ============================================================
   05 评审包
   ============================================================ */

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.decision-card {
  padding: 24px;
  border-left: 4px solid var(--ok);
  box-shadow: var(--shadow-lg);
}
.decision-card h3 { font-size: 24px; margin: 10px 0 12px; min-height: 32px; letter-spacing: -0.01em; }
.decision-card p { color: var(--muted); font-size: 13.5px; min-height: 88px; }
.decision-card small { color: #a1a1aa; font-size: 12px; }

.conf-row { display: flex; align-items: center; gap: 14px; margin: 14px 0 10px; }
.decision-meter {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: #f4f4f5;
  overflow: hidden;
}
.decision-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ai-gradient);
  transition: width 1.2s cubic-bezier(.2, .8, .3, 1);
}
.conf-value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 58px; text-align: right; }

.roi-card { border-color: rgba(79, 70, 229, .3); }
.roi-row {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.roi-row:last-child { border-bottom: 0; padding-bottom: 0; }
.roi-row strong {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--brand);
}
.roi-row span { color: var(--muted); font-size: 12.5px; }

.pack-list { gap: 8px; }
.pack-list li {
  position: relative;
  padding: 9px 12px 9px 32px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12.5px;
}
.pack-list li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 13px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}

.email-panel { margin-top: 0; }
.email-paper {
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fffefb;
  box-shadow: inset 0 1px 3px rgba(16, 24, 40, .04);
  font-size: 13.5px;
  line-height: 1.8;
  max-width: 760px;
}
.email-paper ol { padding-left: 22px; }
.email-paper li { margin-bottom: 8px; }
.email-sign { color: var(--muted); margin-bottom: 0; }

/* ============================================================
   证据抽屉
   ============================================================ */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 20, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 40;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

.evidence-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 94vw);
  background: var(--surface);
  box-shadow: -16px 0 48px rgba(16, 16, 20, .18);
  transform: translateX(102%);
  transition: transform .32s cubic-bezier(.25, .8, .3, 1);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.evidence-drawer.open { transform: translateX(0); }

.evidence-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.evidence-drawer header strong { display: block; font-size: 14px; word-break: break-all; }
.evidence-drawer header span { display: inline-block; margin-top: 4px; }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }

.ev-desc { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }

/* 邮件 / 文档 */
.ev-email-head {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: #fafafa;
  font-size: 12px;
}
.ev-email-head span { color: #a1a1aa; display: inline-block; min-width: 48px; }
.ev-email-head strong { font-weight: 500; }
.ev-email-body {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: #fffefb;
  font-size: 13.5px;
  line-height: 1.85;
}
.ev-email-body p { position: relative; padding-left: 30px; }
.pno {
  position: absolute;
  left: 0;
  top: 2px;
  color: #c4c4cc;
  font-size: 11px;
  font-family: var(--font-mono);
}

.ev-mark {
  background: #fef08a;
  border-radius: 3px;
  padding: 1px 2px;
}
.ev-mark.pulse-once { animation: markPulse 1.1s ease 1; }
@keyframes markPulse {
  0% { background: #fde047; box-shadow: 0 0 0 6px rgba(253, 224, 71, .55); }
  100% { background: #fef08a; box-shadow: 0 0 0 0 rgba(253, 224, 71, 0); }
}

/* 表格 */
.ev-sheet-tab {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #f0fdf4;
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
}
.ev-sheet table { min-width: 0; border: 1px solid var(--line); }
.ev-sheet th, .ev-sheet td { padding: 8px 10px; font-size: 12px; border: 1px solid var(--line); }
.ev-sheet .ev-hit-row td { background: #fefce8; }
.ev-sheet .ev-hit-row.pulse-once td { animation: markPulse 1.1s ease 1; }

/* 截图仿真 */
.mock-window {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f4f4f5;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 99px; background: #d4d4d8; }
.dots i:first-child { background: #fca5a5; }
.dots i:nth-child(2) { background: #fcd34d; }
.dots i:last-child { background: #86efac; }

.mock-body { display: grid; grid-template-columns: 96px 1fr; min-height: 220px; }
.mock-side { background: #1e293b; color: #94a3b8; font-size: 11.5px; padding: 10px 0; }
.mock-side div { padding: 7px 12px; }
.mock-side .on { background: #334155; color: #fff; border-left: 3px solid #38bdf8; }
.mock-main { position: relative; padding: 16px; }

.mock-table { min-width: 0; width: 100%; border: 1px solid var(--line); }
.mock-table th, .mock-table td { padding: 7px 10px; font-size: 12px; border: 1px solid var(--line); }
.ok-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--ok);
  margin-right: 5px;
}

.mock-ann span, .mock-empty span, .mock-mode span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  margin-right: 6px;
}
.mock-ann {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 122px;
  border: 2px dashed var(--danger);
  border-radius: 6px;
  padding: 4px;
  pointer-events: none;
}
.mock-empty {
  margin-top: 12px;
  padding: 14px;
  border: 2px dashed var(--danger);
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 12px;
  text-align: center;
}
.mock-mode {
  margin-top: 12px;
  padding: 8px 12px;
  border: 2px dashed var(--danger);
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.ann-active { animation: annPulse 1.2s ease 2; }
@keyframes annPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .25); }
}

.mock-cad { padding: 10px; background: #fcfcfd; }
.mock-cad svg { display: block; width: 100%; height: auto; }
.cad-ann.ann-active { animation: annPulse 1.2s ease 2; }

.ev-ann-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.ev-ann-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafafa;
  font-size: 12.5px;
}
.ev-ann-list li.ev-hit { border-color: var(--danger); background: var(--danger-soft); }
.ann-no {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
}

/* before 态原始文件视图: 隐藏 AI 标注 */
.ev-shot.raw .mock-ann,
.ev-shot.raw .mock-empty,
.ev-shot.raw .cad-ann,
.ev-shot.raw .mock-cad text[fill="#dc2626"] { display: none; }
.ev-shot.raw .mock-mode { border-color: var(--line); border-style: solid; }
.ev-shot.raw .mock-mode > span { display: none; }

/* 无富源文档的简版视图 */
.ev-lite { display: grid; gap: 12px; }
.ev-lite-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fafafa;
}
.ev-lite-card span { display: block; color: var(--brand); font-size: 11.5px; font-weight: 600; margin-bottom: 4px; }
.ev-lite-card p { margin: 0; font-size: 13px; }

/* ============================================================
   toast / 演示者备注
   ============================================================ */

.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  z-index: 60;
}
.toast {
  padding: 11px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
  max-width: 380px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.good { background: #14532d; }
.toast.warn { background: #7c2d12; }

.presenter-note {
  display: none;
  position: fixed;
  left: 300px;
  bottom: 16px;
  max-width: 520px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(16, 16, 20, .92);
  color: #fcd34d;
  font-size: 12.5px;
  line-height: 1.6;
  z-index: 55;
  pointer-events: none;
}
body.presenter .presenter-note { display: block; }

/* ============================================================
   before 态联动
   ============================================================ */

body[data-state="before"] .closure-panel { display: none; }

/* ============================================================
   降级与响应式
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1180px) {
  .stats-band { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-band > div:nth-child(4) { border-right: 0; }
  .stats-band > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .processing-console { grid-template-columns: 1fr; }
  .risk-board, .fold-body.open { grid-template-columns: 1fr; }
  .review-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .stage-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-engine { margin-top: 0; }
  .main { padding: 20px; }
  .demo-hero, .two-col, .three-col, .doc-grid, .closure-grid, .kanban { grid-template-columns: 1fr; }
  .panel.span2 { grid-column: auto; }
  .two-col-list { grid-template-columns: 1fr; }
  .closure-grid > div::after { display: none !important; }
  .demo-hero h2 { font-size: 24px; }
  .presenter-note { left: 16px; }
}

@media (max-width: 680px) {
  .topbar, .section-title { flex-direction: column; align-items: stretch; }
  .actions { width: 100%; }
  .primary-btn, .secondary-btn { flex: 1; }
  .stats-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-band > div { border-bottom: 1px solid var(--line); }
  .line-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-nav { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
}
