/* =========================================================
   Backend Guide · 学术极简幻灯片（1120 × 700 固定画布，等比缩放）
   ========================================================= */
:root {
  --purple: #6a005f;
  --blue: #0b3d91;
  --red: #b91c1c;
  --green: #15803d;
  --amber: #b45309;
  --teal: #0f766e;
  --ink: #111;
  --ink-2: #333;
  --dim: #777;
  --line: #cfcfcf;
  --line-2: #ddd;
  --code-bg: #f2f2f2;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Lato", sans-serif;
  --kai: "STKaiti", "KaiTi", "Songti SC", "Georgia", serif;
  --mono: "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #fff; }
body { font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.blue { color: var(--blue); }
.purple { color: var(--purple); }
.red { color: var(--red); }
.green { color: var(--green); }

/* ---------------- 舞台与幻灯片 ---------------- */
.stage {
  position: absolute; left: 50%; top: 50%;
  width: 1120px; height: 700px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background: #fff;
  border: 1.5px solid #dcdcdc;
  border-radius: 6px;
  overflow: hidden;
}
.slide {
  position: absolute; inset: 0;
  padding: 34px 52px 26px;
  font-size: 26px; line-height: 1.45;
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, visibility 0s linear .18s;
  overflow: hidden;
}
.slide.active { opacity: 1; visibility: visible; transition: opacity .18s ease, visibility 0s; }
.slide.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

h1 { margin: 0; font-size: 56px; font-weight: 400; color: #222; letter-spacing: .01em; }
h2 {
  margin: 0 0 20px; padding-bottom: 8px;
  font-size: 40px; font-weight: 500; color: #222; line-height: 1.25;
  border-bottom: 2px solid var(--purple);
}
p { margin: 0; }
b { font-weight: 600; }
code {
  font-family: var(--mono); font-size: .86em;
  background: var(--code-bg); padding: 0 .3em; border-radius: 3px;
}

/* 封面 / 结束页 */
.cover-title { font-size: 64px; letter-spacing: .08em; }
.cover-sub { margin-top: 22px; font-family: var(--kai); font-size: 32px; color: var(--blue); }
.cover-meta { margin-top: 56px; font-size: 22px; color: #444; }
.cover-status { position: absolute; left: 0; right: 0; bottom: 30px; font-size: 15px; color: var(--dim); }
.cover-status .ok { color: var(--green); }
.cover-status .bad { color: var(--red); }
.qa { font-size: 72px; letter-spacing: .06em; }

/* ---------------- 文本元素 ---------------- */
.list { margin: 0; padding-left: 1.1em; }
.list > li { margin: 10px 0; }
.list.tight > li { margin: 6px 0; font-size: 24px; }
.list ul, .sub-list { list-style-type: square; }
.sub-list { margin-top: 18px; padding-left: 1.2em; }
.sub-list > li { font-size: 24px; color: var(--ink-2); margin: 8px 0; }
.olist { padding-left: 1.3em; }
.olist > li { font-size: 23px; margin: 12px 0; line-height: 1.5; }
.olist .aside { color: var(--dim); font-family: var(--kai); }

blockquote {
  margin: 16px 0; padding: 14px 20px;
  background: #f6fbfb; border-left: 4px solid var(--purple);
  font-size: 25px; color: #222; font-family: var(--kai);
}
.final-quote { margin-top: 28px; line-height: 1.6; }
.final-quote b { font-family: var(--sans); }

.takeaway { margin-top: 22px; font-size: 26px; font-weight: 600; }
.note { font-size: 23px; margin-top: 8px; color: var(--ink-2); }
.lead-p { font-size: 25px; line-height: 1.55; }
.mid-title { margin-top: 22px; font-size: 25px; font-weight: 600; color: var(--purple); }
.hint { font-size: 14px; color: var(--dim); margin-top: 8px; }
.hint b { color: var(--purple); font-weight: 600; }

/* 目录 */
.toc { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li {
  counter-increment: toc;
  display: flex; align-items: baseline; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid #e6e6e6;
}
.toc li::before { content: counter(toc) "."; font-family: var(--mono); color: var(--purple); width: 34px; flex-shrink: 0; font-size: 26px; }
.toc li span { flex: 1; font-size: 28px; }
.toc li small { display: block; font-size: 20px; color: #555; margin-top: 2px; }
.toc li em { font-style: normal; font-family: var(--mono); font-size: 20px; color: var(--dim); }

/* ---------------- 代码盒 ---------------- */
.code {
  margin: 0 0 18px;
  background: var(--code-bg); border: 1px solid #e4e4e4; border-radius: 6px;
  padding: 16px 20px;
  font-family: var(--mono); font-size: 21px; line-height: 1.45; color: #111;
  white-space: pre; overflow: hidden;
}
.code-lg { font-size: 24px; padding: 20px 26px; }
.code-md { font-size: 17px; }
.code-sm { font-size: 14.5px; padding: 12px 14px; margin: 0; }
.code .k { color: #166534; font-weight: 600; }
.code .s { color: #991b1b; }
.code .n { color: var(--blue); }
.code .c { color: #5f7178; font-style: italic; }
.code .hl { background: #fde8e8; }
.code .ok { background: #e3f4e8; }
.code-json { font-size: 13px; line-height: 1.5; padding: 10px 14px; white-space: pre-wrap; word-break: break-all; }
.jk { color: var(--blue); }
.js { color: #991b1b; }
.jn { color: #166534; }
.jb { color: var(--purple); font-weight: 600; }

/* ---------------- 演示控件（纸面控制台） ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 12px;
  background: #fff; border: 1px solid #bdbdbd; border-radius: 3px;
  font-size: 15px; color: #111; cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: #333; }
.btn:active:not(:disabled) { background: #f2f2f2; }
.btn:disabled { color: #aaa; border-color: #ddd; background: #fafafa; cursor: not-allowed; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #082f70; }
.btn.primary:disabled { background: #8ea3c6; border-color: #8ea3c6; color: #fff; }
.btn.busy { cursor: progress; }
.btn.busy::after { content: " …"; }
.btn-mini { height: 26px; padding: 0 8px; font-size: 13px; border-style: dashed; border-color: var(--red); color: var(--red); }
.btn-mini:hover:not(:disabled) { border-color: var(--red); background: #fdf3f3; }

.legend { font-size: 13px; color: #555; display: inline-flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: -6px; }

/* 表格（jyy 斑马纹） */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.tbl th { background: #ececec; font-weight: 600; }
.tbl tbody tr:nth-child(even) { background: #f2fafa; }
.tbl-lg { font-size: 22px; }
.tbl-md { font-size: 21px; margin-top: 26px; }
.tbl-md td, .tbl-md th { padding: 11px 14px; }
.tbl-map { font-size: 20px; margin-top: 8px; }
.tbl-map td, .tbl-map th { padding: 14px 14px; line-height: 1.45; }
.tbl-map .ref { color: var(--purple); font-style: normal; font-size: .9em; }

/* ---------------- Slide 6 生命周期 ---------------- */
.life-nodes { display: flex; align-items: stretch; gap: 7px; margin-top: 2px; }
.lnode {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 7px 6px; background: #fff; border: 1px solid var(--line); border-radius: 3px;
  cursor: pointer; line-height: 1.25;
}
.lnode b { font-size: 17px; font-weight: 600; }
.lnode small { font-size: 13.5px; color: var(--dim); margin-top: 1px; }
.lnode.done { border-color: #9aa9c2; }
.lnode.done b { color: var(--blue); }
.lnode.on { border: 2px solid var(--purple); background: #f6fbfb; padding: 6px 5px; }
.lnode.on b { color: var(--purple); }
.larr { align-self: center; color: #999; font-size: 20px; }
.life-ctrl { display: flex; align-items: center; gap: 8px; margin: 11px 0 12px; }
.life-ctrl .dim { margin-left: 6px; font-size: 14px; }
.life-tip { margin-left: auto; font-size: 13.5px; color: #666; }

.life-stage {
  display: grid; grid-template-columns: 45% 1fr; gap: 24px;
  height: 416px; min-height: 0; align-items: stretch;
}

/* 左侧：精致逼真的迷你「教务选课系统」前端 UI */
.mock-browser {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
  transition: opacity .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.mock-browser.is-waiting { opacity: 0.72; }
.mock-browser.is-active { border-color: #2563eb; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12); }
.mock-browser.is-success { border-color: #16a34a; box-shadow: 0 8px 24px rgba(22, 163, 74, 0.13); }

.mb-chrome {
  display: flex; align-items: center; gap: 8px; padding: 7px 11px;
  background: #eef2f6; border-bottom: 1px solid #dbe2ea; flex-shrink: 0;
}
.mb-dots { display: inline-flex; gap: 4px; }
.mb-dots i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; display: block; }
.mb-dots i:nth-child(1) { background: #f87171; }
.mb-dots i:nth-child(2) { background: #fbbf24; }
.mb-dots i:nth-child(3) { background: #4ade80; }
.mb-url {
  flex: 1; background: #fff; border: 1px solid #d5dde7; border-radius: 4px;
  padding: 2px 8px; font-family: var(--mono); font-size: 11.5px; color: #475569;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mb-user { font-size: 11.5px; color: #334155; font-weight: 600; white-space: nowrap; }

.mb-app {
  flex: 1; min-height: 0; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 9px;
}
.mb-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mb-title { font-size: 16px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.mb-sub { font-size: 11.5px; color: #64748b; margin-top: 2px; }
.mb-credits {
  font-size: 12px; color: #1e40af; background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 4px; padding: 4px 8px; white-space: nowrap; transition: all .25s ease;
}
.mb-credits b { font-family: var(--mono); font-size: 13.5px; }
.mb-credits.bumped { background: #ecfdf5; border-color: #86efac; color: #166534; }

.mb-toast {
  font-size: 12.5px; font-weight: 600; color: #166534;
  background: #ecfdf5; border: 1px solid #86efac; border-radius: 5px;
  padding: 0 10px; max-height: 0; opacity: 0; overflow: hidden; margin: -4px 0;
  transition: all .28s ease;
}
.mb-toast.show { padding: 6px 10px; max-height: 40px; opacity: 1; margin: 0; }

.mb-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 7px;
  padding: 11px 12px; transition: all .25s ease;
}
.mb-card.is-focus { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); }
.mb-card.is-focus.enrolled { border-color: #86efac; background: #f8fffb; }
.mb-card.is-muted { opacity: 0.56; padding: 9px 12px; }
.mb-card-head { display: flex; align-items: center; gap: 6px; }
.mb-code {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: #1d4ed8;
  background: #eff6ff; padding: 1px 6px; border-radius: 3px;
}
.mb-cname { font-size: 15px; font-weight: 700; color: #0f172a; }
.mb-credit-tag { margin-left: auto; font-size: 11.5px; color: #64748b; }
.mb-card-meta { font-size: 12px; color: #64748b; margin-top: 3px; }
.mb-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 9px; }
.mb-cap { flex: 1; min-width: 0; }
.mb-cap-text { font-size: 12px; color: #475569; margin-bottom: 4px; }
.mb-cap-text b { font-family: var(--mono); color: #0f172a; font-size: 13px; }
.mb-cap-text b.changed { color: #15803d; }
.mb-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.mb-bar span { display: block; height: 100%; background: #2563eb; border-radius: 3px; transition: width .35s ease, background .25s ease; }
.mb-bar span.ok { background: #16a34a; }

.mb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 82px; height: 32px; padding: 0 13px;
  background: #2563eb; color: #fff; border: 0; border-radius: 5px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  transition: background .2s ease, transform .12s ease, box-shadow .2s ease;
}
.mb-btn:hover:not(:disabled) { background: #1d4ed8; }
.mb-btn.is-ready { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22); }
.mb-btn.is-loading { background: #64748b; cursor: wait; }
.mb-btn.is-done { background: #16a34a; }
.mb-btn.is-ghost { background: #f1f5f9; color: #64748b; cursor: default; height: 28px; min-width: 64px; font-size: 12.5px; }

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

.mb-netbar {
  margin-top: auto; padding: 6px 9px; border-radius: 4px;
  background: #eef2f6; border: 1px solid #dbe2ea;
  font-family: var(--mono); font-size: 11.5px; color: #475569;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mb-netbar.sending { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.mb-netbar.ok { background: #ecfdf5; border-color: #86efac; color: #166534; }

/* 右侧：角色解读 + 后端/网络透视 */
.life-right { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.life-role { flex-shrink: 0; }
.life-role .who { font-size: 14px; color: var(--dim); font-family: var(--mono); }
.life-role h3 { margin: 2px 0 6px; font-size: 24px; font-weight: 500; color: var(--purple); }
.life-role ul { margin: 0; padding-left: 1.15em; list-style-type: square; }
.life-role li { font-size: 18px; margin: 4px 0; color: var(--ink-2); line-height: 1.4; }
.life-role .key { margin: 8px 0 0; font-size: 18px; font-weight: 600; color: #111; }

.life-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.life-panel .code { flex: 1; min-height: 0; margin: 0; font-size: 14.5px; line-height: 1.42; padding: 11px 14px; }
.life-checks {
  flex: 1; background: #f2f2f2; border: 1px solid #e4e4e4; border-radius: 6px;
  padding: 12px 16px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 14.5px;
}
.lc-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e2e2e2; padding: 7px 11px; border-radius: 4px; }
.lc-ok { color: var(--green); font-weight: 700; flex-shrink: 0; }
.lc-code { color: #111; flex: 1; }
.lc-note { color: var(--dim); font-size: 13px; }
.life-db-box {
  flex: 1; background: #f2f2f2; border: 1px solid #e4e4e4; border-radius: 6px;
  padding: 12px 15px; display: flex; flex-direction: column; gap: 9px;
}
.life-db-box pre { margin: 0; font-family: var(--mono); font-size: 14px; line-height: 1.4; color: #111; }
.life-db-tbl { width: 100%; border-collapse: collapse; background: #fff; font-family: var(--mono); font-size: 13.5px; border: 1px solid #dcdcdc; }
.life-db-tbl th { background: #e9e9e9; padding: 5px 10px; text-align: left; font-weight: 600; color: #333; }
.life-db-tbl td { padding: 6px 10px; border-top: 1px solid #e5e5e5; }
.life-db-tbl .old { text-decoration: line-through; color: #999; margin-right: 6px; }
.life-db-tbl .new { color: var(--green); font-weight: 700; }
.life-db-commit { font-family: var(--mono); font-size: 13px; color: var(--green); font-weight: 600; }

/* ---------------- Slide 8 Live Demo 1 ---------------- */
.demo1 { display: grid; grid-template-columns: 52% 1fr; gap: 22px; height: 548px; }
.d1-left, .d1-right { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.field { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: #444; margin-right: auto; }
.field input {
  width: 150px; height: 32px; padding: 0 8px;
  border: 1px solid #bdbdbd; border-radius: 3px; font-size: 15px; outline: none; background: #fff;
}
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.tbl-courses { font-size: 16px; table-layout: fixed; }
.tbl-courses th { padding: 7px 10px; font-size: 14px; }
.tbl-courses td { padding: 9px 10px; vertical-align: middle; }
.tbl-courses .cname { font-weight: 600; }
.tbl-courses .ccode { font-family: var(--mono); color: var(--blue); font-weight: 600; margin-right: 6px; }
.tbl-courses .csub { font-size: 12.5px; color: var(--dim); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-courses .cenr { font-size: 12px; color: var(--blue); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-courses .seats { font-family: var(--mono); font-size: 16px; }
.tbl-courses .seat-count { font-weight: 700; color: var(--green); }
.tbl-courses tr.low .seat-count { color: var(--amber); }
.tbl-courses tr.full .seat-count { color: var(--red); }
.tbl-courses .ops { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tbl-courses .btn-enroll { height: 28px; font-size: 14px; padding: 0 10px; }
.tbl-courses tr.flash-ok td { animation: flashOk 1s ease; }
.tbl-courses tr.flash-bad td { animation: flashBad 1.2s ease; }
@keyframes flashOk { from { background: #dcf3e3; } to { background: transparent; } }
@keyframes flashBad { from { background: #fbdcdc; } to { background: transparent; } }

.verdict {
  margin-top: 12px; height: 128px; overflow: hidden;
  border: 1px solid var(--line); padding: 10px 14px; font-size: 15px; line-height: 1.5;
  display: flex; flex-direction: column; justify-content: center;
}
.verdict.ok { border-color: var(--green); border-left-width: 4px; background: #f3faf5; }
.verdict.bad { border-color: var(--red); border-left-width: 4px; background: #fdf3f3; }
.verdict.warn { border-color: var(--amber); border-left-width: 4px; background: #fdf8ef; }
.verdict .v-title { font-size: 18px; font-weight: 600; }
.verdict.ok .v-title { color: var(--green); }
.verdict.bad .v-title { color: var(--red); }
.verdict.warn .v-title { color: var(--amber); }
.verdict .v-msg { color: #333; font-size: 14px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.verdict .v-cmp { font-family: var(--mono); font-size: 14px; margin-top: 4px; }
.verdict .v-cmp b { font-size: 16px; }
.verdict .v-moral { font-size: 13.5px; color: #555; margin-top: 2px; font-family: var(--kai); font-size: 15px; }
.verdict.shake { animation: shake .4s ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 10px; flex-shrink: 0; }
.tabs button {
  border: 0; background: none; padding: 4px 0 7px; margin-bottom: -1px;
  font-size: 16px; color: #666; border-bottom: 2px solid transparent; cursor: pointer;
}
.tabs button:hover { color: #111; }
.tabs button.on { color: var(--purple); border-bottom-color: var(--purple); font-weight: 600; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.resp-line { font-size: 14.5px; margin-bottom: 8px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; flex-shrink: 0; }
.resp-line .m { font-weight: 700; }
.resp-line .st { font-weight: 700; }
.resp-line .st2 { color: var(--green); }
.resp-line .st4 { color: var(--red); }
.resp-line .st429 { color: var(--amber); }
.resp-line .st5, .resp-line .st0 { color: var(--red); }
.resp-line .hdr { font-size: 12.5px; color: var(--dim); width: 100%; }
.pane .code-json { flex: 1; min-height: 0; margin: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #c8c8c8 transparent; }
.pane .code-json::-webkit-scrollbar { width: 6px; }
.pane .code-json::-webkit-scrollbar-thumb { background: #c8c8c8; border-radius: 3px; }
.curl-item { margin-bottom: 12px; }
.curl-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; margin-bottom: 4px; }
.curl-head .btn { height: 24px; font-size: 13px; padding: 0 8px; }
.curl-item .code { font-size: 12.5px; padding: 8px 12px; margin: 0; white-space: pre-wrap; word-break: break-all; }
.code .sp { color: #888; user-select: none; }
.tbl-kv { font-size: 15.5px; }
.tbl-kv td { padding: 9px 12px; }
.tbl-kv td:first-child { color: #555; width: 42%; }
.tbl-kv td:last-child { font-family: var(--mono); word-break: break-all; }
.pane-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; }

/* ---------------- 通用控制行 ---------------- */
.ctrl { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: nowrap; }
.radios { display: inline-flex; border: 1px solid #bdbdbd; border-radius: 3px; overflow: hidden; margin-right: 6px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 32px; font-size: 15px; cursor: pointer; }
.radios label + label { border-left: 1px solid #bdbdbd; }
.radios input { margin: 0; accent-color: var(--purple); }
.radios label:has(input:checked) { background: #f6fbfb; color: var(--purple); font-weight: 600; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; cursor: pointer; white-space: nowrap; }
.chk input { margin: 0; width: 16px; height: 16px; accent-color: var(--blue); }

/* ---------------- Slide 12 Live Demo 2 ---------------- */
.race { display: grid; grid-template-columns: 36% 1fr; gap: 24px; }
.race-l { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stock { border: 1px solid var(--line); text-align: center; padding: 8px 10px 10px; }
.stock-label { font-size: 14px; color: #555; }
.stock-num { font-size: 72px; line-height: 1.05; font-weight: 700; color: #222; font-variant-numeric: tabular-nums; }
.stock-tag { font-size: 16px; font-weight: 600; color: var(--dim); }
.stock.over { border-color: var(--red); border-width: 2px; padding: 7px 9px 9px; }
.stock.over .stock-num, .stock.over .stock-tag { color: var(--red); }
.stock.zero { border-color: var(--green); border-width: 2px; padding: 7px 9px 9px; }
.stock.zero .stock-num, .stock.zero .stock-tag { color: var(--green); }
.stock.running .stock-num { color: #888; }
.race-stats { font-size: 16px; color: #444; }
.race-stats b { font-size: 20px; color: #111; }
.race-concl { font-size: 15px; line-height: 1.55; color: #333; }
.race-concl b.r { color: var(--red); }
.race-concl b.g { color: var(--green); }
.race-r { min-width: 0; }
.cells-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #444; margin-bottom: 6px; }
.cells { display: grid; grid-template-columns: repeat(25, 1fr); gap: 3px; margin-bottom: 12px; }
.cells span {
  display: block; height: 26px; border: 1px solid #d5d5d5; background: #fff;
  font-family: var(--mono); font-size: 10px; color: #999; text-align: center; line-height: 24px;
}
.cells span.pending { background: #eef1f6; }
.cells span.win { background: var(--green); border-color: var(--green); color: #fff; }
.cells span.over { background: var(--red); border-color: var(--red); color: #fff; }
.cells span.rej { background: #d9d9d9; border-color: #c4c4c4; color: #666; }
.cells span.err { background: #fff; border-color: var(--amber); color: var(--amber); }
.legend .g { background: var(--green); } .legend .r { background: var(--red); } .legend .x { background: #d9d9d9; }
.tbl-compact { font-size: 14.5px; }
.tbl-compact th { padding: 6px 10px; font-size: 13.5px; }
.tbl-compact td { padding: 6px 10px; font-family: var(--mono); white-space: nowrap; }
.tbl-compact td:nth-child(2) { font-family: var(--sans); }
.tbl-compact .read1 { color: var(--blue); font-weight: 700; }
.tbl-compact .neg { color: var(--red); font-weight: 700; }
.tbl-compact .zero { color: var(--green); font-weight: 700; }
.tbl-compact .res-ok { color: var(--green); font-family: var(--sans); }
.tbl-compact .res-over { color: var(--red); font-weight: 700; font-family: var(--sans); }
.tbl-compact .res-rej { color: #888; font-family: var(--sans); }
.tbl-compact .more td { color: var(--dim); font-family: var(--sans); font-size: 13px; }

/* ---------------- Slide 14 Live Demo 3 ---------------- */
.presets { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #ddd; }
.preset { border: 0; background: none; padding: 2px 0; font-size: 15px; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b8c4da; }
.preset:hover { text-decoration-color: var(--blue); }
.preset.on { color: var(--purple); font-weight: 600; text-decoration-color: var(--purple); }
.btn-right { margin-left: auto; }
.single { font-size: 13.5px; color: #333; margin-left: 4px; white-space: nowrap; }
.single .hit { color: var(--green); font-weight: 700; }
.single .miss { color: var(--blue); font-weight: 700; }
.single .err { color: var(--red); font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-bottom: 10px; }
.metric { padding: 6px 14px 7px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric span { display: block; font-size: 13px; color: #555; }
.metric b { font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric.good b { color: var(--green); }
.metric.warn b { color: var(--amber); }
.metric.bad b { color: var(--red); }
.wf-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #444; margin-bottom: 6px; }
.wf-head .dim { margin-left: 8px; font-size: 12.5px; }
.s-hit { background: var(--green); } .s-fill { background: #0e9488; } .s-db { background: #2e5cb8; } .s-rl { background: #d97706; } .s-down { background: var(--red); }
.waterfall {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(15, 15px);
  grid-auto-flow: column; column-gap: 28px; row-gap: 3px; height: 267px;
}
.wf-empty { grid-column: 1 / -1; grid-row: 1 / -1; display: flex; align-items: center; justify-content: center; border: 1px dashed #ddd; font-size: 15px; }
.wf-row { display: grid; grid-template-columns: 22px 1fr 82px; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; height: 15px; }
.wf-seq { color: #999; text-align: right; }
.wf-track { display: block; height: 11px; background: #f0f0f0; position: relative; }
.wf-bar { display: block; height: 100%; min-width: 3px; transform-origin: left center; animation: grow .45s ease-out both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.wf-ms { color: #333; white-space: nowrap; overflow: hidden; }
.wf-ms em { font-style: normal; margin-left: 4px; font-weight: 700; font-size: 10.5px; }
.k-hit em { color: var(--green); } .k-fill em { color: #0e9488; } .k-db em { color: #2e5cb8; } .k-rl em { color: #d97706; } .k-down em { color: var(--red); }
.perf-hist { margin-top: 10px; font-size: 13px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perf-hist .sep { color: #bbb; margin: 0 8px; }
.perf-hist .e5 { color: var(--red); } .perf-hist .e4 { color: #d97706; }

/* ---------------- Slide 15 共识 ---------------- */
.tri { font-size: 24px; color: var(--ink-2); }
.question { margin-top: 12px; font-size: 25px; font-family: var(--kai); color: var(--blue); }
.raft { display: grid; grid-template-columns: 1fr 150px 2fr; align-items: center; margin-top: 20px; }
.rgroup { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 10px; border: 1px dashed transparent; }
.raft[data-state="cut"] .rgroup { border-color: var(--green); }
.rnode { border: 1px solid var(--line); padding: 10px 14px; height: 156px; background: #fff; font-size: 16px; line-height: 1.45; }
.rnode .rn-name { font-size: 20px; font-weight: 600; }
.rnode .rn-role { color: var(--dim); font-size: 15px; }
.rnode .rn-log { font-family: var(--mono); font-size: 16px; margin-top: 4px; }
.rnode .rn-vote { margin-top: 6px; font-size: 14.5px; font-weight: 600; padding-left: 8px; border-left: 3px solid transparent; }
.rnode.leader { border: 2px solid var(--blue); padding: 9px 13px; }
.rnode.leader .rn-role { color: var(--blue); font-weight: 600; }
.rnode.blocked { border: 2px solid var(--red); padding: 9px 13px; }
.rnode.blocked .rn-vote { color: var(--red); border-left-color: var(--red); }
.rnode.major .rn-vote { color: var(--green); border-left-color: var(--green); }
.rnode.synced .rn-vote { color: var(--green); border-left-color: var(--green); }
.rnode.bump .rn-log { animation: bump .5s ease; }
@keyframes bump { 40% { color: var(--green); } }
.rwire { position: relative; height: 40px; display: flex; align-items: center; justify-content: center; }
.rwire-line { position: absolute; left: 6px; right: 6px; top: 50%; border-top: 2px solid #444; }
.rwire-label { position: relative; background: #fff; padding: 0 8px; font-size: 15px; color: #444; }
.raft[data-state="cut"] .rwire-line { border-top: 2px dashed var(--red); }
.raft[data-state="cut"] .rwire-label { color: var(--red); font-weight: 600; }
.raft-ctrl { display: flex; align-items: center; gap: 16px; margin-top: 14px; font-size: 17px; color: #333; }

/* ---------------- Slide 17 ---------------- */
.flowline { display: flex; align-items: stretch; gap: 12px; }
.flowline > div { flex: 1; border: 1px solid var(--line); padding: 10px 14px; }
.flowline b { display: block; font-size: 22px; font-weight: 600; color: var(--purple); }
.flowline small { font-size: 17px; color: #555; }
.flowline > span { align-self: center; font-size: 24px; color: #999; }

/* Slide 20 */
.stages > li { font-size: 23px; margin: 14px 0; line-height: 1.55; }
.stages b { color: var(--purple); }

/* ---------------- 控件 / 进度 / 总览 ---------------- */
.controls {
  position: fixed; right: 14px; bottom: 10px; z-index: 20;
  display: flex; align-items: center; gap: 2px;
  font-size: 14px; color: #888;
}
.controls button {
  border: 0; background: none; color: #888; cursor: pointer;
  height: 28px; min-width: 28px; padding: 0 6px; font-size: 20px; line-height: 1;
}
.controls button:hover { color: var(--purple); }
.controls button:disabled { color: #ddd; cursor: default; }
.controls .page { font-size: 13px; min-width: 64px; }
.controls .txt { font-size: 13px; border: 1px solid #ddd; height: 24px; margin-left: 6px; border-radius: 2px; }
.controls .txt:hover { border-color: var(--purple); }
.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 3px; z-index: 20; }
.progress i { display: block; height: 100%; width: 0; background: var(--purple); transition: width .18s ease; }

.overview { position: fixed; inset: 0; z-index: 30; background: #fafafa; overflow-y: auto; padding: 22px 28px 40px; }
.ov-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; margin: 0 auto 16px; max-width: 1280px; }
.ov-head span:first-child { font-weight: 600; border-bottom: 2px solid var(--purple); padding-bottom: 4px; }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 20px 18px; max-width: 1280px; margin: 0 auto; }
.thumb { cursor: pointer; outline: none; }
.thumb-frame {
  position: relative; width: 224px; height: 140px; overflow: hidden;
  background: #fff; border: 1.5px solid #dcdcdc; border-radius: 4px;
}
.thumb-frame .slide {
  position: absolute; left: 0; top: 0; right: auto; bottom: auto; width: 1120px; height: 700px;
  transform: scale(.2); transform-origin: 0 0;
  opacity: 1; visibility: visible; transition: none; pointer-events: none;
}
.thumb:hover .thumb-frame, .thumb:focus-visible .thumb-frame { border-color: #999; }
.thumb.current .thumb-frame { border: 2px solid var(--purple); }
.thumb-cap { display: block; margin-top: 6px; font-size: 13px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 224px; }
.thumb-cap b { font-family: var(--mono); color: var(--purple); margin-right: 6px; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 40;
  transform: translateX(-50%); opacity: 0; pointer-events: none;
  background: #fff; border: 1px solid #bbb; border-left: 3px solid var(--purple);
  padding: 8px 14px; font-size: 14px; color: #222; transition: opacity .18s;
}
.toast.show { opacity: 1; }
.toast.error { border-left-color: var(--red); color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .slide, .slide.active, .progress i { transition: none; }
  .wf-bar, .verdict.shake, .tbl-courses tr td { animation: none !important; }
}
