/* ==========================================================================
   style.css —— 高中物理虚拟实验室 / Physics Virtual Lab
   设计基调：浅色、现代、专业，带一点"实验记录纸"的理性质感。

   本文件的选择器按"页面区块"组织，顺序与 DOM 渲染顺序一致：
     1. 设计令牌与基础重置
     2. 通用组件（按钮 / 标签 / 提示）
     3. 页头、导航、页脚
     4. 首页（英雄区 / 分类 / 实验卡片）
     5. 实验台（顶栏 / 三栏 / 参数 / 装置 / 数据 / 图表 / 公式 / 结论）
     6. 知识页 / 报告页 / 关于页
   ========================================================================== */

/* ---------------------------- 1. 设计令牌 ---------------------------- */
:root {
  /* 品牌色：蓝（理性/科技） + 青（辅助） */
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-2: #0ea5e9;

  /* 中性色 */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f5f7fb;
  --card: #ffffff;

  /* 语义色 */
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #dc2626;
  --purple: #7c3aed;

  /* 圆角与阴影 */
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --sh-2: 0 4px 12px rgba(15, 23, 42, .07), 0 1px 3px rgba(15, 23, 42, .05);
  --sh-3: 0 12px 32px rgba(37, 99, 235, .14);

  /* 字体 */
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  /* 布局 */
  --maxw: 1280px;
  --header-h: 66px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 顶部细网格纹理：实验室方格纸的抽象表达 */
  background-image:
    linear-gradient(rgba(37, 99, 235, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

h1, h2, h3, h4 {
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
}

p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color .16s ease;
}
a:hover { color: var(--brand-dark); }

img, svg, canvas { max-width: 100%; }

::selection { background: rgba(37, 99, 235, .16); }

/* 滚动条（WebKit） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------------------------- 2. 通用组件 ---------------------------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-m);
  background: var(--card);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease,
              border-color .16s ease, box-shadow .16s ease, transform .12s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .28);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: var(--sh-3);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--r-s);
}

.btn-lg {
  height: 52px;
  padding: 0 32px;
  font-size: 16px;
  border-radius: 12px;
}

.btn-disabled {
  background: var(--line-soft);
  color: var(--muted-2);
  cursor: not-allowed;
  border-color: transparent;
}
.btn-disabled:hover { background: var(--line-soft); color: var(--muted-2); }

/* 标签 */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

/* 提示 */
.empty-tip {
  padding: 22px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--r-m);
  background: #fafbfd;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  line-height: 1.7;
}
.empty-tip.big { padding: 42px 24px; font-size: 14.5px; }

.muted-text { color: var(--muted); font-size: 13.5px; }

/* 区块标题 */
.section {
  padding: 56px 0;
}
.section-head {
  margin-bottom: 26px;
}
.section-head h2 {
  font-size: 25px;
  letter-spacing: -.2px;
}
.section-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .4px;
}

/* ---------------------------- 3. 页头 / 页脚 ---------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--maxw);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand svg { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b {
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .2px;
}
.brand-text i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  letter-spacing: .6px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-s);
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  transition: background .16s ease, color .16s ease;
}
.nav-link:hover { background: var(--line-soft); color: var(--brand); }
.nav-link.active { color: var(--brand); background: var(--brand-soft); }

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4.5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--ink-2);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 页脚 */
.site-footer {
  margin-top: 40px;
  padding: 46px 0 0;
  background: #0f172a;
  color: #cbd5e1;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 34px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 34px;
}
.footer-col b {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 15px;
}
.footer-col p { font-size: 13.5px; line-height: 1.9; color: #94a3b8; }
.footer-col a { color: #cbd5e1; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #64748b;
  font-size: 12.5px;
  text-align: center;
}

/* ---------------------------- 4. 首页 ---------------------------- */

/* 英雄区 */
.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 66px;
  background:
    radial-gradient(1100px 460px at 12% -10%, rgba(37, 99, 235, .16), transparent 60%),
    radial-gradient(900px 420px at 92% 8%, rgba(14, 165, 233, .18), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 44px;
  align-items: center;
}
.hero h1 {
  margin: 14px 0 16px;
  font-size: 44px;
  line-height: 1.22;
  letter-spacing: -.8px;
  background: linear-gradient(100deg, #0f172a 12%, var(--brand) 58%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 30em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stats div b {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}
.hero-stats div span {
  color: var(--muted);
  font-size: 13px;
}

/* 英雄区右侧：装饰性示意图（纯 CSS/SVG，无外部素材） */
.hero-art {
  position: relative;
  min-height: 300px;
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, #ffffff 0%, #f2f6fc 100%);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  overflow: hidden;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .07) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero-art svg { position: relative; display: block; width: 100%; height: 300px; }

/* 分类卡片 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.cat-card {
  position: relative;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  border-color: rgba(37, 99, 235, .35);
}
.cat-card.is-off {
  background: #fafbfd;
  color: var(--muted-2);
  box-shadow: none;
}
.cat-card.is-off:hover { transform: none; border-color: var(--line); }
.cat-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--brand-soft);
  font-size: 22px;
}
.cat-card.is-off .cat-icon { background: var(--line-soft); filter: grayscale(1); }
.cat-name {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
}
.cat-card.is-off .cat-name { color: var(--muted); }
.cat-desc {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 2.6em;
}
.cat-state {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(22, 163, 74, .1);
  color: var(--ok);
  font-size: 11.5px;
  font-weight: 700;
}
.cat-state.soon {
  background: var(--line-soft);
  color: var(--muted-2);
}

/* 实验卡片 */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 20px;
}
.exp-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.exp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
  border-color: rgba(37, 99, 235, .38);
}
.exp-card.is-disabled {
  background: #fafbfd;
  box-shadow: none;
}
.exp-card.is-disabled:hover { transform: none; border-color: var(--line); }

.exp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.exp-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11.5px;
  font-weight: 700;
}
.exp-badge.soon { background: var(--line-soft); color: var(--muted-2); }
.exp-level { color: var(--warn); font-size: 12px; letter-spacing: 1px; }

.exp-name { font-size: 18px; letter-spacing: -.2px; }
.exp-brief {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
  flex: 1;
}
.exp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.exp-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.exp-meta { color: var(--muted-2); font-size: 12.5px; }

/* 首页"三步走" */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.step-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
}
.step-card .idx {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 13.5px; }

/* ---------------------------- 5. 实验台 ---------------------------- */

.lab-root {
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px 24px 40px;
}

.lab-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  background: var(--card);
}
.btn-back:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-back .arw { font-size: 15px; line-height: 1; }

.lab-title { display: flex; flex-direction: column; line-height: 1.25; }
.lab-title h1 { font-size: 21px; letter-spacing: -.2px; }
.lab-sub { color: var(--muted-2); font-size: 12.5px; font-weight: 600; letter-spacing: .3px; }
/* 顶栏右侧动作区。
 * 发布修复（2026-10）：三个按钮（查看报告 / 打印报告 / 教学模式）在 390px 视口
 * 曾经把页面撑出横向滚动条（实测 right=401 > clientW=390）。加 flex-wrap + min-width:0
 * 即可自然折行，不改引擎 DOM。 */
.lab-topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

/* 教师快捷入口条（app.js 注入，发布版新增）：
 * 把「返回实验中心 / 自由实验 / 课堂模式 / 教学模式 / 实验报告」五个入口收在一处，
 * 教师不必在页面里找按钮。不适用项显示灰字「不适用」而不是消失。 */
.lab-teacher-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand, #2563eb);
  border-radius: var(--r-m, 10px);
  background: var(--card);
  font-size: 13px;
}
.lab-teacher-bar .ltb-label {
  color: var(--muted-2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .3px;
  margin-right: 2px;
}
.lab-teacher-bar .ltb-item {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-s, 8px);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.lab-teacher-bar .ltb-item:hover { border-color: var(--brand, #2563eb); color: var(--brand, #2563eb); }
.lab-teacher-bar .ltb-item.is-on {
  border-color: var(--brand, #2563eb);
  background: var(--brand-soft, #eff6ff);
  color: var(--brand, #2563eb);
}
.lab-teacher-bar .ltb-na {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r-s, 8px);
  color: var(--muted-2);
  font-size: 12.5px;
  white-space: nowrap;
  cursor: default;
}
.lab-teacher-bar .ltb-note {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 12px;
}

/* 三栏栅格 */
.lab-grid {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

/* 面板通用 */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.panel + .panel,
.lab-grid + .panel,
.lab-root > .panel { margin-top: 18px; }
.lab-root > .panel { margin-top: 18px; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 18px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 100%);
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head h2::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.panel-note {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 12px;
}
.panel-body { padding: 16px 18px; }

/* 左栏：参数 */
.lab-left { position: sticky; top: calc(var(--header-h) + 18px); }
.param-body { max-height: none; }

.param-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.param-item:first-child { padding-top: 0; }
.param-item:last-child { border-bottom: 0; padding-bottom: 0; }

.param-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.param-label { color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.param-value { display: flex; align-items: baseline; gap: 3px; }
.param-value b {
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.param-value i { font-style: normal; color: var(--muted-2); font-size: 11.5px; }

.param-range,
.param-select { width: 100%; }

.param-range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-soft), #dbeafe);
  outline: none;
  cursor: pointer;
}
.param-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 1px 4px rgba(37, 99, 235, .4);
  cursor: pointer;
  transition: transform .12s ease;
}
.param-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.param-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  cursor: pointer;
}

.param-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.param-select:focus { outline: 2px solid rgba(37, 99, 235, .35); outline-offset: 1px; }

.param-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.param-desc {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* 实验步骤 */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: st;
}
.steps li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.steps li:last-child { border-bottom: 0; }
.step-no {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11.5px;
  font-weight: 700;
}

/* 中栏：实验装置 */
.stage-wrap {
  padding: 0;
  background: #fbfcfe;
}
#stageCanvas {
  display: block;
  width: 100%;
  height: 430px;
  border-radius: 0;
}

.stage-status {
  margin-left: auto;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.stage-status.running { background: rgba(37, 99, 235, .12); color: var(--brand-dark); }
.stage-status.done { background: rgba(22, 163, 74, .13); color: var(--ok); }

.stage-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}
.speed-ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.speed-ctl select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.progress {
  flex: 1 1 120px;
  min-width: 90px;
  height: 6px;
  border-radius: 3px;
  background: var(--line-soft);
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .08s linear;
}
.clock {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stage-hint {
  padding: 10px 18px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  background: #fcfdff;
}

/* 右栏：实时数据 */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.metric-card {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
}
.metric-label {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 3px;
}
.metric-value b {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.metric-value i { font-style: normal; color: var(--muted-2); font-size: 11px; }

.predict-list { font-size: 13px; }
.predict-list .pl-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.predict-list .pl-row:last-child { border-bottom: 0; }
.predict-list .pl-k { color: var(--muted); font-size: 12.5px; }
.predict-list .pl-v {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.predict-list .pl-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--r-s);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  line-height: 1.65;
}

/* 标签页（数据表 / 图表共用） */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s ease;
}
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.active {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}
.tab em {
  font-style: normal;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.tab.active em { background: rgba(255, 255, 255, .26); color: #fff; }

.series-ops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ops-hint { color: var(--muted-2); font-size: 12.5px; }

/* 数据表 */
.table-scroll {
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.data-table thead th:first-child { text-align: center; }
.data-table thead th i {
  font-style: normal;
  color: var(--muted-2);
  font-weight: 600;
  font-size: 11px;
}
.data-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data-table tbody td:first-child { text-align: center; color: var(--muted-2); }
.data-table tbody tr:nth-child(even) { background: #fcfdff; }
.data-table tbody tr:hover { background: var(--brand-soft); }

/* 图表 */
.chart-box { min-height: 80px; }
.chart-canvas { width: 100%; }
.chart-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

/* 原理与公式 */
.principle-body { font-size: 14px; line-height: 1.85; }
.principle-text { color: var(--ink-2); }
.principle-text p { margin-bottom: .7em; }
.principle-text strong { color: var(--ink); }

.formula-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.formula-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
}
.formula-expr {
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.6;
  word-break: break-word;
}
.formula-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 结论 */
.conclusion-body {
  font-size: 14px;
  line-height: 1.85;
}
.conclusion-body h4 {
  margin: 0 0 10px;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.conclusion-body h4::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--ok);
}
.conclusion-body ul { margin: 0 0 14px; padding-left: 20px; }
.conclusion-body li { margin-bottom: 5px; }
.conclusion-body table {
  width: 100%;
  margin: 10px 0 14px;
  border-collapse: collapse;
  font-size: 13px;
}
.conclusion-body table th,
.conclusion-body table td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
}
.conclusion-body table th { background: #f7f9fc; font-weight: 700; }
.conclusion-body table td { font-variant-numeric: tabular-nums; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.result-cell {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-s);
  background: #fcfdff;
}
.result-cell .rc-k { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.result-cell .rc-v {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.result-cell.ok { border-left-color: var(--ok); }
.result-cell.warn { border-left-color: var(--warn); }
.result-cell .rc-v small { font-size: 12px; font-weight: 600; color: var(--muted); }

.callout {
  padding: 12px 15px;
  border-radius: var(--r-s);
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  color: var(--brand-dark);
  font-size: 13px;
  line-height: 1.75;
  margin: 12px 0;
}
.callout.ok { background: rgba(22, 163, 74, .08); border-left-color: var(--ok); color: #15803d; }
.callout.warn { background: rgba(245, 158, 11, .1); border-left-color: var(--warn); color: #b45309; }

/* 浮动提示 */
.lab-flash {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  transform: translate(-50%, 16px);
  padding: 11px 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .93);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.lab-flash.show { opacity: 1; transform: translate(-50%, 0); }
.lab-flash.ok { background: rgba(22, 163, 74, .95); }
.lab-flash.warn { background: rgba(245, 158, 11, .95); }

/* ---------------------------- 6. 知识页 / 报告页 / 关于页 ---------------------------- */

/* 搜索框 */
.k-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin-bottom: 22px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--sh-1);
}
.k-search input {
  flex: 1;
  height: 46px;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
}
.k-search input::placeholder { color: var(--muted-2); }

.k-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.k-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
  transition: box-shadow .18s ease, transform .18s ease;
}
.k-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.k-card h3 { font-size: 16.5px; margin-bottom: 10px; }
.k-card p { color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.k-card .k-formula {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: var(--r-s);
  background: #f7f9fc;
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}
.k-card .k-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 12.5px;
}

/* 页面通用头部 */
.page-head {
  padding: 42px 0 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 30px; letter-spacing: -.4px; }
.page-head p { margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 62em; }

/* 报告页 */
.report-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.report-card {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
}
.report-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.report-head h3 { font-size: 17.5px; }
.report-date { color: var(--muted-2); font-size: 12.5px; }
.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.report-meta span {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.report-body {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  line-height: 1.8;
}
.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* 关于页 */
.prose {
  max-width: 78em;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--sh-1);
  font-size: 14.5px;
  line-height: 1.9;
}
.prose h2 { margin: 26px 0 12px; font-size: 19px; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--line-soft);
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 13px;
}
.prose table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  font-size: 13.5px;
}
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--line); }
.prose th { background: #f7f9fc; }

/* 过滤标签（实验中心） */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

/* 无障碍：隐藏但可被读屏 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   7. 结论区 / 理论预测区（V1.1 补齐）
   说明：这 6 个类名由 4 个实验的 conclusion() 与 predict() 直接输出，
        此前 style.css 中并未定义，导致结论退化为无底色裸文本。
        现在按站点既有设计令牌统一补齐。
   ========================================================================== */

/* 结论卡片网格：宽屏两列，窄屏单列 */
.concl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.concl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-m);
  padding: 14px 16px 15px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.concl-card h4 {
  margin: 0 0 8px;
  padding-left: 9px;
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: 0.2px;
}

.concl-card h4::before {
  content: '';
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand-2);
}

.concl-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.concl-card p b { color: var(--ink); }

/* 结论被"守卫"拦截时：改为警示样式，明确表示不能下结论 */
.concl-card.is-blocked {
  border-left-color: var(--warn);
  background: #fffbeb;
  border-color: #fde68a;
}

.concl-card.is-blocked h4 { color: #b45309; }
.concl-card.is-blocked h4::before { background: var(--warn); }

/* 理论预测区的键值对列表 */
.kv {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kv > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line-soft);
}

.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }

.kv dt {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.kv dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 公式注释（跟在数值后的小字） */
.fml {
  display: inline-block;
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-2);
  font-family: "Cambria Math", "Segoe UI", sans-serif;
}

/* 提示行 */
.tip-line {
  margin: 9px 0 0;
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.6;
  border-radius: var(--r-s);
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-left: 3px solid var(--brand-2);
}

.tip-line.warn {
  background: #fffbeb;
  color: #92400e;
  border-left-color: var(--warn);
}

/* 底部总结条 */
.concl-summary {
  margin: 16px 0 0;
  padding: 13px 16px;
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-s);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.concl-summary b { color: var(--brand-dark); }

/* 总结条：本轮数据因控制变量被破坏而不成立时的警示样式 */
.concl-summary.is-warn {
  background: #fffbeb;
  border-left-color: var(--warn);
  color: #92400e;
}

.concl-summary.is-warn b { color: #92400e; }

/* 结论卡内的多段文本：段间留白（控制变量警示卡有 4 段） */
.concl-card p + p { margin-top: 8px; }

/* 结论卡的补充说明行（如"数据已保留"） */
.concl-card p.concl-keep {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ==========================================================================
   8. 教学任务模式（V1.5）
   说明：面板挂在 #labRoot 最上方，可折叠；反馈卡四态（绿 / 黄 / 红 / 蓝），
        评价卡的三个状态（通过 / 未通过 / 未检验）复用同一套令牌。
        教学面板与结论区**样式与结构都分开**——评价不写入结论区。
   ========================================================================== */

.task-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--r-m);
  margin: 16px 0 0;
  overflow: hidden;
}

.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, var(--brand-soft), var(--card));
  border-bottom: 1px solid var(--line-soft);
}

.task-head-text h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--ink);
}

.task-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  vertical-align: 2px;
}

.task-head-text p.task-goal {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.task-fold {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}
.task-fold:hover { color: var(--brand-dark); border-color: var(--brand); }

/* 阶段进度条 */
.task-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 0;
}

.task-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--card);
}
.task-step i {
  font-style: normal;
  width: 17px; height: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--line-soft);
  font-size: 11.5px;
  color: var(--muted);
}
.task-step.is-current {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.task-step.is-current i { background: var(--brand); color: #fff; }
.task-step.is-done { border-color: #a7f3d0; color: #047857; }
.task-step.is-done i { background: #a7f3d0; color: #047857; }

.task-body { padding: 12px 18px 16px; }

.task-stage h4 {
  margin: 12px 0 8px;
  font-size: 14.5px;
  color: var(--ink);
}

.task-prompt {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.75;
}

.task-options { display: flex; flex-direction: column; gap: 8px; }

.task-opt {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.6;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.task-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.task-opt.is-picked {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.task-guide {
  margin: 0 0 4px;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.85;
}

.task-note {
  margin-top: 14px;
  padding: 9px 12px;
  border-left: 3px solid var(--line);
  background: #f8fafc;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}
.task-note b { color: var(--ink-2); }

.task-empty { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------------------------- 反馈卡 ---------------------------- */
/* 四态：ok 绿 / warn 黄 / error 红 / info 蓝。未知 type 退化为 info。 */
.task-feedback { margin-bottom: 12px; }

.fb-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: var(--r-s);
  background: var(--card);
  padding: 12px 15px 13px;
}
.fb-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-mark {
  flex: 0 0 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--muted);
}
.fb-card p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.fb-card p + p { margin-top: 6px; }
.fb-card b { color: var(--ink); }
.fb-line b { color: inherit; }
.fb-why { color: var(--muted); }
.fb-fix { color: var(--muted); }
.fb-evi {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.fb-card.is-ok { border-left-color: var(--ok); background: #f0fdf4; }
.fb-card.is-ok .fb-mark { background: var(--ok); }
.fb-card.is-ok h4 { color: #15803d; }

.fb-card.is-warn { border-left-color: var(--warn); background: #fffbeb; }
.fb-card.is-warn .fb-mark { background: var(--warn); }
.fb-card.is-warn h4 { color: #b45309; }

.fb-card.is-error { border-left-color: var(--danger); background: #fef2f2; }
.fb-card.is-error .fb-mark { background: var(--danger); }
.fb-card.is-error h4 { color: #b91c1c; }
.fb-card.is-error .fb-line b { color: #b91c1c; }

.fb-card.is-info { border-left-color: var(--brand); background: var(--brand-soft); }
.fb-card.is-info .fb-mark { background: var(--brand); }
.fb-card.is-info h4 { color: var(--brand-dark); }

/* ---------------------------- 评价卡 ---------------------------- */
.eval-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-s);
  background: var(--card);
  padding: 12px 15px 13px;
}
.eval-card.is-excellent { border-left-color: var(--ok); background: #f0fdf4; }
.eval-card.is-blocked-level { border-left-color: var(--danger); background: #fef2f2; }
.eval-card h4 {
  margin: 0 0 4px;
  font-size: 14.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eval-count { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }

.eval-list { list-style: none; margin: 0; padding: 0; }
.eval-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed var(--line-soft);
  font-size: 13px;
}
.eval-list li:first-child { border-top: 0; }
.eval-mark {
  flex: 0 0 18px;
  font-weight: 700;
  text-align: center;
}
.eval-list li b { flex: 0 0 auto; color: var(--ink); }
.eval-detail { flex: 1; color: var(--muted); line-height: 1.65; }

.eval-list li.is-ok .eval-mark { color: var(--ok); }
.eval-list li.is-bad .eval-mark { color: var(--danger); }
.eval-list li.is-bad .eval-detail { color: #b91c1c; }
.eval-list li.is-na .eval-mark { color: var(--muted); }
/* V1.6：控制变量未通过 —— 实验设计问题（警示色，区别于"数据算错"的红） */
.eval-list li.is-warn .eval-mark { color: var(--warn); }
.eval-list li.is-warn .eval-detail { color: #92400e; }

.eval-verdict {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: var(--r-s);
  background: #f8fafc;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.75;
}

/* ------------------------------------------------------------------ *
 * 8.8 实验前预测（V1.7）
 * ------------------------------------------------------------------ */

.task-predict {
  border-left: 3px solid var(--brand-2, #0ea5e9);
}

.task-prompt.is-hint {
  color: var(--muted);
  font-size: 13px;
}

.task-note.is-warn {
  background: #fffbeb;
  border-left-color: var(--warn);
  color: #92400e;
}

.task-pred-result:empty { display: none; }
.task-pred-result { margin-top: 10px; }

/* 学习过程评价：与四勾清单分开，避免"预测错了"被读成"实验失败了" */
.eval-process {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line, #e2e8f0);
}

.eval-process h5 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.eval-process h5 .fb-mark {
  background: var(--brand-2, #0ea5e9);
}

/* ==========================================================================
 * 9. 实验报告（V1.8）
 *    屏幕样式在这里；A4 打印样式在 report/report-print.css
 * ========================================================================== */

.report-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, .55);
  overflow: auto;
  padding: 24px 16px;
  display: flex;
  justify-content: center;
}

.report-overlay[hidden] { display: none; }

.report-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  margin: 0 auto 14px;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--r-m, 12px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12);
  max-width: 900px;
}

.rpt-sheet {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 30px 24px;
  background: #fff;
  border-radius: var(--r-m, 12px);
  box-shadow: 0 10px 34px rgba(15, 23, 42, .18);
  color: var(--ink, #0f172a);
  font-size: 14px;
  line-height: 1.8;
}

.rpt-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--brand, #2563eb);
}

.rpt-head h1 { margin: 0; font-size: 24px; }
.rpt-sub { margin: 4px 0 0; color: var(--muted, #64748b); font-size: 13px; }
.rpt-head-meta { min-width: 220px; }

.rpt-status {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-left-width: 4px;
  border-radius: var(--r-s, 8px);
  background: #f8fafc;
}

.rpt-status.is-ready { border-left-color: var(--ok, #16a34a); }
.rpt-status.is-incomplete { border-left-color: #f59e0b; }
.rpt-status.is-invalid { border-left-color: var(--danger, #dc2626); }
.rpt-status-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.rpt-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2ff;
  color: var(--brand, #2563eb);
}

.rpt-status.is-invalid .rpt-badge { background: #fee2e2; color: #b91c1c; }
.rpt-status.is-incomplete .rpt-badge { background: #fef3c7; color: #92400e; }
.rpt-status.is-ready .rpt-badge { background: #dcfce7; color: #15803d; }

.rpt-sec { margin-top: 18px; }
.rpt-h2 { margin: 0 0 8px; font-size: 17px; color: var(--ink, #0f172a); }
.rpt-h3 { margin: 12px 0 6px; font-size: 14px; color: var(--ink-2, #334155); }
.rpt-p { margin: 6px 0; }
.rpt-note { margin: 6px 0; color: var(--muted, #64748b); font-size: 13px; }
.rpt-ul { margin: 6px 0; padding-left: 20px; }
.rpt-ul li { margin: 3px 0; }

.rpt-kv { margin: 8px 0; display: grid; gap: 4px; }
.rpt-kv > div { display: flex; gap: 10px; padding: 5px 10px; background: #f8fafc; border-radius: var(--r-s, 8px); }
.rpt-kv dt { flex: 0 0 150px; color: var(--muted, #64748b); font-size: 13px; }
.rpt-kv dd { margin: 0; font-weight: 600; }

.rpt-table-wrap { overflow-x: auto; margin: 8px 0; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rpt-table th, .rpt-table td { padding: 7px 10px; border: 1px solid var(--line, #e2e8f0); text-align: left; }
.rpt-table th { background: #f1f5f9; font-weight: 600; white-space: nowrap; }
.rpt-table tbody tr:nth-child(even) { background: #fbfcfe; }
.rpt-unit { color: var(--muted, #64748b); font-weight: 400; font-size: 12px; }

.rpt-figure { margin: 12px 0; }
.rpt-figure figcaption { font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.rpt-img { width: 100%; max-width: 640px; border: 1px solid var(--line, #e2e8f0); border-radius: var(--r-s, 8px); background: #fff; }

.rpt-alert { padding: 10px 12px; border: 1px solid #fecaca; border-left: 4px solid var(--danger, #dc2626); border-radius: var(--r-s, 8px); background: #fef2f2; }
.rpt-alert.is-blocked { margin-bottom: 10px; }
.rpt-na { padding: 10px 12px; border: 1px dashed var(--line, #e2e8f0); border-radius: var(--r-s, 8px); color: var(--muted, #64748b); }

.rpt-checks { list-style: none; margin: 6px 0; padding: 0; }
.rpt-checks li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--line, #e2e8f0); }
.rpt-mark { font-weight: 700; }
.rpt-detail { color: var(--muted, #64748b); font-size: 13px; }

.rpt-conclusion .concl-card { background: #f8fafc; }
.rpt-foot { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line, #e2e8f0); color: var(--muted, #64748b); }

/* 报告列表页：状态徽标 */
.report-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2ff;
  color: var(--brand, #2563eb);
}
.report-status.is-ready { background: #dcfce7; color: #15803d; }
.report-status.is-incomplete { background: #fef3c7; color: #92400e; }
.report-status.is-invalid { background: #fee2e2; color: #b91c1c; }

/* ==========================================================================
   8. 教师工作台（V1.9 第三阶段）：实验中心按「年级 → 章节」组织 + 三大入口
   ========================================================================== */

/* 教师三大入口 */
.teacher-entries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px auto 6px;
}
.teacher-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--r-l, 14px);
  text-decoration: none;
  color: var(--ink, #0f172a);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.teacher-entry:hover {
  transform: translateY(-2px);
  border-color: var(--brand, #2563eb);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
}
.te-ico { font-size: 22px; line-height: 1; }
.te-title { font-weight: 700; font-size: 16px; color: var(--brand, #2563eb); }
.te-desc { font-size: 13px; color: var(--muted, #64748b); line-height: 1.5; }

/* 教学模式引导横幅 */
.teach-mode-banner {
  margin: 6px auto 4px;
  padding: 12px 16px;
  background: var(--brand-soft, #eff6ff);
  border: 1px solid #bfdbfe;
  border-left: 3px solid var(--brand, #2563eb);
  border-radius: var(--r-m, 10px);
  color: var(--ink-2, #334155);
  font-size: 14px;
}

/* 年级 / 章节分组标题 */
.grade-head {
  grid-column: 1 / -1;
  margin: 18px 0 4px;
  font-size: 18px;
  color: var(--ink, #0f172a);
  border-bottom: 2px solid var(--brand, #2563eb);
  padding-bottom: 6px;
}
.chapter-head {
  grid-column: 1 / -1;
  margin: 14px 0 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted, #64748b);
}

@media (max-width: 768px) {
  .teacher-entries { grid-template-columns: 1fr; }
}

/* 课堂操作面板（app.js 注入，发布版新增）
 * 目的：教师不用在长页面上找按钮。把「运行 / 展示」两类高频操作集中一块。
 * 面板内每个按钮都代理实验台原有控件或做区块定位，不引入任何新的物理行为。 */
.teacher-class-panel {
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand, #2563eb);
  border-radius: var(--r-m, 10px);
  background: var(--card);
}
.tcp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tcp-head b { font-size: 13.5px; color: var(--ink, #0f172a); }
.tcp-close {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s, 8px);
  background: var(--card);
  color: var(--muted-2);
  font-size: 12.5px;
  cursor: pointer;
}
.tcp-close:hover { border-color: var(--brand, #2563eb); color: var(--brand, #2563eb); }
.tcp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tcp-col { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.tcp-cap {
  width: 100%;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
}
.tcp-btn {
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-s, 8px);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tcp-btn:hover { border-color: var(--brand, #2563eb); color: var(--brand, #2563eb); }
.tcp-note { margin: 10px 0 0; color: var(--muted-2); font-size: 11.5px; }

@media (max-width: 560px) {
  .tcp-grid { grid-template-columns: 1fr; }
  .lab-teacher-bar { gap: 6px; }
  .lab-teacher-bar .ltb-note { display: none; }
}

/* 筛选栏左侧的字段名（发布版：学科 / 年级 两级筛选） */
.filter-cap {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px 0 2px;
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3px;
}

/* 实验卡片上的「学科 · 年级 / 年级 · 章节」行 */
.exp-gc {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2px;
}
