:root {
  --navy: #14213d;
  --navy2: #1d2f56;
  --ink: #1c2333;
  --sub: #5b6478;
  --line: #e5e9f2;
  --bg: #f4f6fb;
  --card: #ffffff;
  --accent: #2f6bff;
  --teacher: #ff7a66;
  --student: #22b8a6;
  --silence: #9aa3b5;
  --gold: #f5b942;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px;
}
header {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy2) 70%, #27407a 100%);
  color: #fff; padding: 14px 28px; display: flex; align-items: center; gap: 18px;
  box-shadow: 0 2px 12px rgba(20, 33, 61, .25); position: sticky; top: 0; z-index: 50;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #ff8a3d);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; font-weight: 700;
}
.logo h1 { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.logo small { display: block; font-size: 11px; opacity: .75; font-weight: 400; letter-spacing: 2px; }
.header-meta { margin-left: auto; text-align: right; font-size: 12px; opacity: .85; line-height: 1.5; }
nav { display: flex; gap: 6px; background: rgba(255,255,255,.08); padding: 4px; border-radius: 10px; }
nav button {
  border: 0; background: transparent; color: #fff; opacity: .8;
  padding: 7px 18px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
nav button.active { background: #fff; color: var(--navy); opacity: 1; font-weight: 600; }
main { max-width: 1180px; margin: 0 auto; padding: 22px 24px 60px; }
section.view { display: none; }
section.view.active { display: block; }

/* 三幕 */
.stepper { display: flex; align-items: center; gap: 0; margin: 8px 0 18px; }
.stepper .step {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: 999px; font-size: 13px; color: var(--sub); background: #fff;
  border: 1px solid var(--line); white-space: nowrap;
}
.stepper .step.on { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.stepper .arrow { color: #c3cad9; padding: 0 6px; }
.act-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.btn {
  border: 0; background: var(--accent); color: #fff; font-size: 15px;
  padding: 11px 26px; border-radius: 10px; cursor: pointer; font-weight: 600;
  box-shadow: 0 4px 14px rgba(47,107,255,.3);
}
.btn.ghost { background: #fff; color: var(--sub); border: 1px solid var(--line); box-shadow: none; }
.btn:disabled { opacity: .4; cursor: default; }
.act-panel { display: none; }
.act-panel.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.act-title { font-size: 13px; color: var(--sub); margin-bottom: 12px; letter-spacing: 1px; }

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: 0 1px 4px rgba(20,33,61,.05);
}
.card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .tag { font-size: 10px; background: #eef3ff; color: var(--accent); padding: 2px 8px; border-radius: 99px; font-weight: 500; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi .num { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.kpi .lbl { font-size: 12px; color: var(--sub); margin-top: 2px; }
.kpi.t .num { color: var(--teacher); } .kpi.s .num { color: var(--student); }
.kpi.q .num { color: var(--accent); } .kpi.g .num { color: var(--gold); }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; color: var(--sub); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f0f3f9; vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover { background: #f7f9ff; }
.thumb { width: 74px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #dde; }
.bar { height: 8px; background: #edf0f7; border-radius: 99px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--student); }
.pill { font-size: 11px; padding: 2px 9px; border-radius: 99px; background: #eef3ff; color: #4460c0; }
.pill.warn { background: #fff3e8; color: #c96a2b; }
.pill.good { background: #e8f8f4; color: #178a7c; }

/* 时间轴 & 图 */
.tl { position: relative; }
svg text { font-family: inherit; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--sub); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* 转写流 */
.tstream { max-height: 300px; overflow-y: auto; font-size: 13px; }
.trow { display: flex; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed #edf0f7; }
.trow .t { color: var(--sub); font-variant-numeric: tabular-nums; min-width: 52px; }
.chip { font-size: 10.5px; padding: 1px 8px; border-radius: 99px; height: fit-content; white-space: nowrap; }
.chip.teacher { background: #ffeae6; color: #c74e3b; }
.chip.students { background: #e3f7f3; color: #128274; }
.chip.mixed { background: #fff6e3; color: #a97a1c; }
.chip.silence { background: #eef0f4; color: #77808f; }
.chip.unclear { background: #eef0f4; color: #77808f; }

/* 布局 */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.mt { margin-top: 14px; }

/* 洞察 */
.insight-list { list-style: none; }
.insight-list li { padding: 8px 0 8px 26px; position: relative; font-size: 14px; line-height: 1.55; border-bottom: 1px dashed #eef1f7; }
.insight-list li:before { content: "◆"; position: absolute; left: 4px; color: var(--accent); font-size: 11px; top: 11px; }
.sug-list li:before { content: "✦"; color: var(--gold); }

/* 视频同步区 */
.player-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
video { width: 100%; border-radius: 10px; background: #000; }
.sync-panel { height: 420px; overflow-y: auto; }

/* 上传 */
.dropzone {
  border: 2px dashed #c8d2e6; border-radius: var(--radius); padding: 44px;
  text-align: center; color: var(--sub); background: #fff; cursor: pointer;
  transition: .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #f5f8ff; }
.progress-wrap { height: 10px; background: #edf0f7; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.progress-wrap i { display: block; height: 100%; background: var(--accent); transition: width .4s; }

/* 阶段二 */
.demo-note {
  background: #fffaf0; border: 1px solid #f2ddb0; color: #8a6d1f;
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin-top: 10px; line-height: 1.6;
}
footer { text-align: center; color: #a0a8bb; font-size: 12px; padding: 26px 0 34px; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(3,1fr); } .grid2, .grid3, .player-wrap { grid-template-columns: 1fr; } }
