/* =========================================================================
   Origin 数学管家 · 界面样式 v2（UI 重做，2026-11-10）
   方向：干净、现代、以文字为主；柔和的中性底色 + 一个靛蓝强调色；
   圆角卡片、充足留白。学生端一屏一个主行动，教师端分区导航。
   只用系统字体，离线可用；不引入任何外部资源。
   所有 class / id 与 JS、测试的约定保持不变。
   ========================================================================= */

:root {
  /* 颜色 */
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --ink: #171A21;
  --ink-2: #444B57;
  --ink-3: #737B88;
  --line: #E4E7EC;
  --line-strong: #D0D5DD;

  --accent: #4353D6;
  --accent-ink: #3442B8;
  --accent-soft: #EEF0FD;
  --accent-line: #C9CEF6;

  --ok: #17845A;
  --ok-soft: #E9F7F0;
  --bad: #C53B3B;
  --bad-soft: #FDEEEE;
  --hold: #A8650E;
  --hold-soft: #FDF4E4;

  /* 旧令牌名映射，JS 内联样式仍在用 */
  --paper: var(--bg);
  --rule: var(--line);
  --ink-soft: var(--ink-3);
  --grid: var(--line);

  /* 字体：中文无衬线优先，数字等宽对齐 */
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei",
          "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--sans);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --math: "Cambria Math", "Times New Roman", "STIX Two Math", var(--sans);

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* 字号 */
  --fs-hero: clamp(1.75rem, 5.2vw, 2.25rem);
  --fs-title: 1.375rem;
  --fs-section: 1.0625rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-fine: 0.8125rem;
  --fs-metric: 1.75rem;

  /* 形状 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --radius: var(--r-md);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 4px 16px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.05);

  --focus: 3px solid rgba(67, 83, 214, 0.45);
  --focus-offset: 2px;
  --touch: 44px;
}

/* ------------------------------------------------------------------ 基础 */

* { box-sizing: border-box; }

/* hidden 属性必须压过组件自己的 display */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}

h1, h2, h3 { font-weight: 700; letter-spacing: 0.01em; }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); }

.sheet {
  max-width: 42rem;
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) calc(var(--sp-7) + env(safe-area-inset-bottom));
}

.screen { animation: screen-in 180ms ease-out; }
.screen + .screen { margin-top: 0; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ 品牌条 */

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.brand__mark svg { display: block; }

.appbar__meta {
  font-size: var(--fs-fine);
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ 标题与文字 */

.kicker,
.label,
.task__kicker {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-fine);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.intro-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-hero);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.intro-lede {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--ink-2);
  text-wrap: pretty;
}

.screen-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-title);
  line-height: 1.45;
  font-weight: 700;
  text-wrap: pretty;
}

.screen-lede {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--ink-2);
}

.fineprint {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-fine);
  line-height: 1.65;
  color: var(--ink-3);
}

.fineprint .dot,
.record-line .dot { margin: 0 var(--sp-1); color: var(--line-strong); }

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.stack { margin: 0 0 var(--sp-5); }

/* ------------------------------------------------------------------ 卡片 */

.card,
.task,
.ask,
.result,
.report-block,
.study-card,
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

/* ------------------------------------------------------------------ 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  min-height: 48px;
  padding: 0 var(--sp-5);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: center;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease,
              box-shadow 140ms ease, transform 80ms ease;
}

.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 1px 2px rgba(67, 83, 214, 0.25), 0 4px 12px rgba(67, 83, 214, 0.18);
}
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--primary:active { background: var(--accent-ink); }

.btn--ghost { background: var(--surface); }

.btn--quiet,
.btn--next {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
  font-weight: 500;
}

.btn--sm {
  width: auto;
  min-height: 36px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-small);
  border-radius: var(--r-sm);
  letter-spacing: 0.02em;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.linkbtn {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0;
  background: none;
  border: 0;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.linkbtn:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* 焦点必须可见 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

.btn, .link, .tab, button { min-height: var(--touch); }

/* ------------------------------------------------------------------ 表单 */

.answer {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.answer__input,
.input,
.review-input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  appearance: none;
  -webkit-appearance: none;
}

select,
select.input {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea, .review-input { min-height: 72px; resize: vertical; font-size: var(--fs-body); }

.answer__input::placeholder,
.input::placeholder,
textarea::placeholder { color: #A3A9B4; }

.answer__input:hover,
.input:hover,
textarea:hover,
select:hover { border-color: var(--ink-3); }

.answer__input:focus-visible,
.input:focus-visible,
.review-input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(67, 83, 214, 0.15);
}

.answer__input:disabled { color: var(--ink-3); background: var(--surface-2); }

.input--small { width: auto; min-width: 96px; }

@media (min-width: 560px) {
  .answer { grid-template-columns: 1fr auto; align-items: stretch; }
  .answer .btn { width: auto; min-width: 8.5rem; }
}

.inline {
  display: flex;
  gap: var(--sp-2);
  align-items: stretch;
}
.inline .answer__input { flex: 1 1 auto; min-width: 0; }
.inline .btn { width: auto; flex: none; }

/* ------------------------------------------------------------------ 提示条 */

.banner {
  position: sticky;
  top: var(--sp-3);
  z-index: 30;
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--hold);
  background: var(--hold-soft);
  border: 1px solid #F3DDB5;
  border-left: 4px solid var(--hold);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
}

/* ------------------------------------------------------------------ 学生首页 */

.home-hero { margin: var(--sp-2) 0 var(--sp-5); }

.home-hero__sub {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--ink-3);
}

.task {
  position: relative;
  margin: 0 0 var(--sp-4);
  padding: var(--sp-5);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.task::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #7C8BF0);
}

.task__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px 10px;
  margin-bottom: var(--sp-3);
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  letter-spacing: 0.04em;
}

.task__title {
  margin: 0;
  font-size: clamp(1.375rem, 4.6vw, 1.75rem);
  line-height: 1.35;
  font-weight: 800;
  color: var(--ink);
}

.task__meta {
  margin: var(--sp-2) 0 var(--sp-5);
  font-size: var(--fs-small);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.task__meta:empty { margin-bottom: var(--sp-4); }

.task__action { width: 100%; min-height: 52px; font-size: 1.0625rem; }

.task__alt { display: flex; margin-top: var(--sp-2); }

.task__why {
  margin-top: var(--sp-4);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
}

.task__why > summary {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--touch);
  list-style: none;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.task__why > summary::-webkit-details-marker { display: none; }
.task__why > summary::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 4px 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 140ms ease;
  opacity: 0.7;
}
.task__why[open] > summary::before { transform: rotate(45deg); }
.task__why > summary:hover { color: var(--accent); }

.task__why p {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--ink-2);
}

@media (min-width: 560px) {
  .task { padding: var(--sp-6); }
  .task__action { width: auto; min-width: 12rem; }
}

/* 三个数字 */
.record-line,
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-fine);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.stat__num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: var(--fs-fine);
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

/* 其它入口 */
.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-5);
}

.home-links .linkbtn {
  padding: 0 var(--sp-4);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.home-links .linkbtn:hover { color: var(--accent); border-color: var(--accent-line); text-decoration: none; }
.home-links #home-review-go { color: #fff; background: var(--accent); border-color: var(--accent); }
.home-links #home-review-go:hover { background: var(--accent-ink); color: #fff; }

/* 续学码 */
.resume {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.resume__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.resume__title { margin: 0; font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.resume__hint { margin: 2px 0 0; font-size: var(--fs-fine); color: var(--ink-3); }

#resume-entry {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0;
}
#resume-entry .answer__input { flex: 1 1 10rem; min-width: 0; font-family: var(--mono); letter-spacing: 0.08em; }
#resume-entry .btn { width: auto; }
#resume-redeem { flex: none; }
#resume-issue { flex: none; }

#resume-result {
  margin: var(--sp-3) 0 0;
  padding: var(--sp-2) var(--sp-3);
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: var(--r-sm);
}

.site-foot {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  text-align: center;
}

/* ------------------------------------------------------------------ 答题 */

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-2);
}

.status__idx { display: inline-flex; align-items: center; gap: var(--sp-2); }

.status__time {
  padding: 2px 10px;
  font-family: var(--mono);
  font-size: var(--fs-fine);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.rail {
  height: 6px;
  margin: var(--sp-3) 0 var(--sp-5);
  background: #E7E9F0;
  border-radius: var(--r-pill);
  overflow: hidden;
}

.rail__fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #7C8BF0);
  border-radius: inherit;
  transition: width 260ms ease;
}

.ask { padding: var(--sp-5); }

.ask__tag {
  display: inline-block;
  margin: 0 0 var(--sp-3);
  padding: 2px 10px;
  font-size: var(--fs-fine);
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
}
.ask__tag:empty { display: none; }

.ask__stem {
  margin: 0 0 var(--sp-5);
  font-size: clamp(1.25rem, 4.8vw, 1.625rem);
  line-height: 1.7;
  font-weight: 700;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

#screen-retest .ask__stem {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

@media (min-width: 560px) {
  .ask { padding: var(--sp-6); }
}

/* ------------------------------------------------------------------ 判定 */

.verdict {
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.verdict--ok { background: var(--ok-soft); border-color: #BFE6D2; }
.verdict--bad { background: var(--bad-soft); border-color: #F5C9C9; }
.verdict--hold { background: var(--hold-soft); border-color: #F1DBB2; }

.verdict__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-2);
  font-size: 1.25rem;
  font-weight: 800;
}

.verdict--ok .verdict__title { color: var(--ok); }
.verdict--bad .verdict__title { color: var(--bad); }
.verdict--hold .verdict__title { color: var(--hold); }

.verdict--ok .verdict__title::before,
.verdict--bad .verdict__title::before,
.verdict--hold .verdict__title::before {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 0.875rem;
  color: #fff;
  border-radius: 50%;
}
.verdict--ok .verdict__title::before { content: "✓"; background: var(--ok); }
.verdict--bad .verdict__title::before { content: "✕"; background: var(--bad); }
.verdict--hold .verdict__title::before { content: "!"; background: var(--hold); }

.verdict__message,
.verdict__hint {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--ink);
}

.verdict__message:empty,
.verdict__hint:empty,
.verdict__answer:empty { display: none; }

.verdict__answer {
  display: inline-block;
  margin: 0 0 var(--sp-2);
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: var(--fs-body);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--r-sm);
}
.verdict__answer::before { content: none; }

.verdict .actions { margin-top: var(--sp-4); }

/* ------------------------------------------------------------------ 动作区 */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.actions > .btn { flex: 1 1 12rem; }
.actions > .linkbtn { flex: 1 1 100%; justify-content: center; }

.actions--stack { flex-direction: column; align-items: stretch; margin: var(--sp-5) 0; }
.actions--stack > .btn,
.actions--stack > .linkbtn { flex: none; }

/* ------------------------------------------------------------------ 诊断 / 讲解 / 复测 */

#screen-diagnosis,
#screen-teaching,
#screen-graph,
#screen-retest,
#screen-review,
#screen-report,
#screen-study { padding-top: var(--sp-2); }

.probe {
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-section);
  line-height: 1.7;
  background: var(--accent-soft);
  border-radius: var(--r-md);
}

#dx-probe { padding: var(--sp-5); }
#dx-teach { margin-top: var(--sp-2); }
#dx-why { margin: var(--sp-4) 0; }
#dx-back { margin-top: var(--sp-2); }

.meter {
  height: 6px;
  margin: var(--sp-3) 0 var(--sp-2);
  background: #E7E9F0;
  border-radius: var(--r-pill);
  overflow: hidden;
}
.meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width 200ms ease;
}

.teach-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); margin-top: var(--sp-3); }
.teach-main { min-width: 0; }

.teach-context {
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.teach-context .label { margin: var(--sp-3) 0 var(--sp-1); }
.teach-context .label:first-child { margin-top: 0; }
.teach-context__stem { margin: 0; font-size: var(--fs-section); font-weight: 600; line-height: 1.7; }
.teach-context__answer { margin: 0; color: var(--bad); font-weight: 600; }
.teach-context__diagnosis { margin: 0; font-size: var(--fs-small); color: var(--ink-2); }

.teach-source {
  display: inline-block;
  margin: 0 0 var(--sp-3);
  padding: 2px 10px;
  font-size: var(--fs-fine);
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.teach-source:empty { display: none; }

.teach-step {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-fine);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
}
.teach-step:empty { display: none; }

.blocks { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }

.block {
  margin: 0;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-body);
  line-height: 1.8;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}

.block--headline { font-size: 1.125rem; font-weight: 700; }
.block--why { background: var(--hold-soft); border-color: #F1DBB2; }
.block--check { background: var(--accent-soft); border-color: var(--accent-line); font-weight: 600; }
.block--encourage { color: var(--ok); background: var(--ok-soft); border-color: #BFE6D2; }
.block--hint { color: var(--ink-2); background: var(--surface-2); box-shadow: none; }
.block--example { font-family: var(--sans); background: var(--surface-2); border-left: 4px solid var(--accent); }

.block--step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--sp-3);
  align-items: start;
}

.block__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  font-size: var(--fs-fine);
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.block-more { justify-self: start; width: auto; }

.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 var(--sp-4);
  padding: 4px;
  overflow-x: auto;
  background: #ECEEF2;
  border-radius: var(--r-md);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 1 0 auto;
  padding: 0 var(--sp-4);
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.tab:hover { color: var(--ink); }
.tab--on,
.tab[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.followup {
  margin: var(--sp-5) 0 var(--sp-2);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.followup .label { display: block; color: var(--ink-2); }
.followup textarea { margin: var(--sp-2) 0; }
.followup .btn { width: auto; }
.followup__log { margin-top: var(--sp-3); display: grid; gap: var(--sp-2); }
.followup__item {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-small);
  line-height: 1.7;
  background: var(--surface-2);
  border-radius: var(--r-md);
}

@media (min-width: 768px) {
  .teach-context { position: sticky; top: var(--sp-4); align-self: start; }
}

/* 图像 */
.graph {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.graph svg { display: block; width: 100%; height: auto; }

.slider {
  display: grid;
  grid-template-columns: 1.5rem 1fr 3rem;
  gap: var(--sp-3);
  align-items: center;
  margin-bottom: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-small);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.slider label { font-family: var(--math); font-style: italic; font-weight: 700; color: var(--ink-2); }
.slider input[type="range"] { width: 100%; min-height: 32px; accent-color: var(--accent); }
.slider output { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ 列表 */

.bullets { margin: 0; padding: 0; list-style: none; }

.bullets li {
  position: relative;
  margin: 0 0 var(--sp-2);
  padding-left: var(--sp-4);
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--ink-2);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.75em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.bullets li:has(.review-item),
.bullets li:has(.review-row),
.bullets li.review-row,
.bullets li.roster__row { padding-left: 0; }
.bullets li:has(.review-item)::before,
.bullets li:has(.review-row)::before,
.bullets li.review-row::before,
.bullets li.roster__row::before { content: none; }

.review-item {
  display: block;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.review-item:hover { border-color: var(--accent-line); box-shadow: var(--shadow-1); }

/* ------------------------------------------------------------------ 报告 */

.result { padding: var(--sp-5); margin: var(--sp-3) 0 0; }

.result__line {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  margin: 0 0 var(--sp-2);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.result__line:last-child { margin-bottom: 0; }
.result__line--todo { color: var(--hold); }

.result__mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  font-size: var(--fs-small);
  font-weight: 800;
  color: #fff;
  border-radius: 50%;
}
.result__mark--ok { background: var(--ok); }
.result__mark--hold { background: var(--hold); }

.result__next {
  margin: var(--sp-4) 0 0;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-small);
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--r-md);
}
.result__next:empty { display: none; }

.tally { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-4) 0; }

.tally__cell {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: var(--fs-small);
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.tally__cell--ok { color: var(--ok); background: var(--ok-soft); border-color: #BFE6D2; }
.tally__cell--bad { color: var(--bad); background: var(--bad-soft); border-color: #F5C9C9; }
.tally__cell--hold { color: var(--hold); background: var(--hold-soft); border-color: #F1DBB2; }

.tally-line {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-section);
  line-height: 1.6;
  font-weight: 700;
  color: var(--ink);
}

.report-block {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-5);
}

.report-block__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-section);
  font-weight: 700;
  color: var(--ink);
}

h3.report-block__title { margin-top: var(--sp-4); font-size: var(--fs-body); }

.report-block__list { margin: 0; padding: 0; list-style: none; }

.report-block__list li,
.report-block__list > p {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  margin: 0;
  padding: var(--sp-2) 0;
  font-size: var(--fs-small);
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
}
.report-block__list li:last-child,
.report-block__list > p:last-child { border-bottom: 0; }
.report-block__list small { flex: none; color: var(--ink-3); font-size: var(--fs-fine); text-align: right; }

.report-note { margin: var(--sp-3) 0 0; font-size: var(--fs-fine); color: var(--ink-3); }

#report-details { margin-top: var(--sp-5); }
#report-details .report-block { box-shadow: none; padding: var(--sp-4); }

.attempt-list { margin: var(--sp-2) 0 var(--sp-4); }
.attempt { border-top: 1px solid var(--line); }
.attempt:last-child { border-bottom: 1px solid var(--line); }
.attempt summary {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  min-height: var(--touch);
  padding: var(--sp-2) 0;
  list-style: none;
  font-size: var(--fs-small);
  cursor: pointer;
}
.attempt summary::-webkit-details-marker { display: none; }
.attempt summary:hover { color: var(--accent); }
.attempt__mark { flex: none; font-weight: 800; }
.attempt__mark--ok { color: var(--ok); }
.attempt__mark--bad { color: var(--bad); }
.attempt__mark--none { color: var(--ink-3); }
.attempt__body { padding: 0 0 var(--sp-3) var(--sp-6); }
.attempt__body .bullet { margin: 0 0 var(--sp-1); font-size: var(--fs-fine); color: var(--ink-2); }
.attempt__verdict { color: var(--ink); }

/* ------------------------------------------------------------------ 学习中心 */

.study-back { margin-bottom: var(--sp-3); }
.study-body { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }

.study-hint { font-size: var(--fs-fine); color: var(--ink-3); line-height: 1.65; margin: 0; }
.study-error { color: var(--bad); font-size: var(--fs-small); }
.study-warn { color: var(--hold); font-weight: 600; }
.study-action { font-weight: 700; }

.study-card { display: grid; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); }
.study-card__title { margin: 0; font-size: var(--fs-body); font-weight: 700; color: var(--ink); }

.study-task,
.study-kp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.study-task > :first-child,
.study-kp > :first-child { min-width: 0; }
.study-task__name,
.study-kp__name { margin: 0; font-weight: 700; }
.study-task__reason { margin: 2px 0 0; font-size: var(--fs-fine); color: var(--ink-3); }
.study-task__actions { display: flex; flex: none; align-items: center; gap: var(--sp-2); }
.study-task__actions .btn,
.study-kp .btn,
.study-question .btn { width: auto; min-height: 44px; padding: 0 var(--sp-4); font-size: var(--fs-small); }

.study-controls { display: grid; gap: var(--sp-2); }
.study-controls .btn { width: 100%; }
.study-list { display: grid; gap: var(--sp-2); }

.study-question {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.study-question__stem { margin: 0 0 var(--sp-2); line-height: 1.65; }
.study-question__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.study-kp__formula {
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--mono);
  background: var(--accent-soft);
  border-radius: var(--r-sm);
}
.study-kp__def { line-height: 1.75; }
.study-kp__example { font-size: var(--fs-small); line-height: 1.75; }
.study-kp-stat { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.study-error-row { font-size: var(--fs-small); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: var(--fs-fine);
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  border-radius: var(--r-pill);
}
.pill--info { color: var(--accent-ink); background: var(--accent-soft); }
.pill--warn { color: var(--hold); background: var(--hold-soft); }
.pill--muted { color: var(--ink-2); background: #EEF0F3; }

/* ------------------------------------------------------------------ 状态组件 */

.state {
  display: flex;
  gap: var(--sp-2);
  align-items: baseline;
  margin: var(--sp-2) 0;
  padding: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}
.state::before { flex: none; font-weight: 700; }
.state--loading::before { content: "⋯"; }
.state--empty { color: var(--ink-3); }
.state--empty::before { content: "○"; }
.state--offline,
.state--notdue { color: var(--hold); background: var(--hold-soft); border: 1px solid #F1DBB2; }
.state--offline::before { content: "!"; }
.state--notdue::before { content: "⏳"; }
.state--ai { border-style: solid; border-left: 4px solid var(--hold); }
.state--ai::before { content: "AI"; font-size: var(--fs-fine); }
.state--limited,
.state--error { color: var(--bad); background: var(--bad-soft); border: 1px solid #F5C9C9; }
.state--limited::before { content: "!"; }
.state--error::before { content: "×"; }

/* 掌握状态：不只靠颜色 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px 10px;
  font-size: var(--fs-fine);
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.badge--verified { color: var(--ok); background: var(--ok-soft); border-color: #BFE6D2; }
.badge--temporary { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
.badge--learning { color: var(--ink-2); }
.badge--unrated { color: var(--ink-3); border-style: dashed; }
.badge::before { font-weight: 800; }
.badge--verified::before { content: "✓"; }
.badge--temporary::before { content: "◐"; }
.badge--learning::before { content: "·"; }
.badge--unrated::before { content: "?"; }

/* 旧首页三问组件（保留，避免旧标记失样式） */
.today { margin: var(--sp-5) 0 var(--sp-4); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.today__title { margin: 0 0 var(--sp-3); font-size: var(--fs-small); color: var(--ink-3); }
.today__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.today__cell { min-width: 0; }
.today__label { margin: var(--sp-1) 0 0; font-size: var(--fs-fine); color: var(--ink-3); }
.today__why { margin: var(--sp-3) 0 0; padding-top: var(--sp-2); font-size: var(--fs-small); color: var(--ink-3); border-top: 1px solid var(--line); }
.metric { margin: 0; font-size: var(--fs-metric); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric span { margin-left: var(--sp-1); font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); }
.home-count { margin: 0 0 var(--sp-3); }
.intro-facts { margin: 0 0 var(--sp-5); padding: 0; }

/* =========================================================================
   教师端
   ========================================================================= */

.page-teacher .sheet { max-width: 72rem; padding-top: 0; }

/* 登录 */
#screen-login { min-height: calc(100dvh - 48px); display: grid; place-items: center; padding: var(--sp-6) 0; }

.login-card {
  width: 100%;
  max-width: 26rem;
  padding: var(--sp-6) var(--sp-5);
  box-shadow: var(--shadow-2);
}
.login-card .brand { margin-bottom: var(--sp-5); }
.login-card .intro-title { font-size: 1.75rem; }
.login-card .intro-lede { font-size: var(--fs-small); margin-bottom: var(--sp-5); }
.login-card .answer { grid-template-columns: 1fr; }
.login-card .answer .btn { width: 100%; }
.login-card .fineprint { margin: var(--sp-4) 0 0; }

/* 顶栏 + 分区导航 */
.desk-top {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 calc(-1 * var(--sp-4)) var(--sp-5);
  padding: var(--sp-3) var(--sp-4) 0;
  background: rgba(245, 246, 248, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.desk-top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 44px;
}

.desk-top__title { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.desk-top__title .status__idx { font-size: var(--fs-body); font-weight: 800; color: var(--ink); }
.desk-top__title .status__time { background: transparent; border: 0; padding: 0; color: var(--ink-3); }
.desk-top__title .status__time:empty { display: none; }
.desk-top #logout { width: auto; }

.desk-nav {
  display: flex;
  gap: var(--sp-1);
  margin: var(--sp-2) calc(-1 * var(--sp-4)) 0;
  padding: 0 var(--sp-4);
  overflow-x: auto;
  scrollbar-width: none;
}
.desk-nav::-webkit-scrollbar { display: none; }

.desk-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 44px;
  padding: 0 var(--sp-3);
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-3);
  background: none;
  border: 0;
  cursor: pointer;
}
.desk-tab::after {
  content: "";
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.desk-tab:hover { color: var(--ink); }
.desk-tab[aria-selected="true"] { color: var(--accent-ink); }
.desk-tab[aria-selected="true"]::after { background: var(--accent); }

.tab-count {
  min-width: 20px;
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  color: var(--ink-2);
  background: #E6E8EE;
  border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.tab-count:empty { display: none; }
.desk-tab[aria-selected="true"] .tab-count { color: #fff; background: var(--accent); }

.desk-panel { animation: screen-in 160ms ease-out; }

.panel-head { margin: 0 0 var(--sp-4); }
.panel-head__title { margin: 0; font-size: var(--fs-title); font-weight: 800; }
.panel-head__lede { margin: var(--sp-1) 0 0; font-size: var(--fs-small); color: var(--ink-3); }

/* 教师端区块 */
.page-teacher .report-block { padding: var(--sp-5); }
.page-teacher .report-block__title { justify-content: space-between; }

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-3);
}
.block-head .report-block__title { margin: 0; }
.block-head .btn { flex: none; }

.page-teacher .tally-line {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-2);
}

.page-teacher .actions > .btn { flex: 0 0 auto; width: auto; }

.page-teacher p.bullet {
  margin: 0;
  padding: var(--sp-2) 0;
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.page-teacher p.bullet:last-child { border-bottom: 0; }

/* 需要处理的事 */
.attention {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.attention:empty { display: none; }
.attention .state { margin: 0; border: 0; border-radius: 0; }

.attention__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "who act" "why act";
  column-gap: var(--sp-4);
  row-gap: 2px;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--line);
}
.attention__row:first-child { border-top: 0; }
.attention__row:hover { background: var(--surface-2); }

.attention__who { grid-area: who; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.attention__why { grid-area: why; font-size: var(--fs-fine); line-height: 1.6; color: var(--ink-3); }
.attention__act,
.page-teacher .btn.attention__act {
  grid-area: act;
  width: auto;
  min-height: 40px;
  padding: 0 var(--sp-4);
  font-size: var(--fs-small);
  border-radius: var(--r-sm);
}
.attention__row--review .attention__who::after {
  content: "待确认";
  margin-left: var(--sp-2);
  padding: 1px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hold);
  background: var(--hold-soft);
  border-radius: var(--r-pill);
  vertical-align: 2px;
}

/* 学生名单 */
.roster-tools { display: flex; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.roster-tools .answer__input { flex: 1 1 auto; min-width: 0; min-height: 40px; font-size: var(--fs-small); }

#student-list {
  max-height: 26rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

#student-list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: 0;
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--line);
}
#student-list > li:first-child { border-top: 0; }
#student-list > li::before { content: none; }
#student-list > li:hover { background: var(--surface-2); }
#student-list > li > span { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
#student-list > li > .btn { flex: none; width: auto; min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-small); border-radius: var(--r-sm); }
.roster__name { font-weight: 700; color: var(--ink); margin-right: var(--sp-2); }
.roster__meta { font-size: var(--fs-fine); color: var(--ink-3); }

/* 学情 */
#student-detail-body > .report-block__title {
  margin: var(--sp-5) 0 var(--sp-1);
  font-size: var(--fs-body);
}
#student-detail-body > .actions { margin-top: 0; }
#student-detail-body .task__why { margin-top: var(--sp-5); }
#student-resume-result {
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--mono);
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--r-md);
}

/* 待确认 / 候选题 */
.review-row {
  display: grid;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.review-row:last-child { margin-bottom: 0; }
.review-stem { margin: 0; font-size: var(--fs-body); font-weight: 600; line-height: 1.7; }
.review-row .fineprint { margin: 0; }
.review-row > .btn { justify-self: start; width: auto; }
.review-row .actions { margin-top: var(--sp-1); }
.review-row .actions > .btn { flex: 0 0 auto; width: auto; min-width: 6rem; }
.review-row .actions > .btn:first-child { color: #fff; background: var(--ok); border-color: var(--ok); }
.review-row .actions > .btn:first-child:hover { background: #126A49; }
.review-row .actions > .btn:last-child { color: var(--bad); border-color: #F0BDBD; }

/* 概览数字 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: var(--sp-2);
  margin: 0 0 var(--sp-4);
}
.stat-grid .stat { padding: var(--sp-3); background: var(--surface-2); }
.stat-grid .stat__num { font-size: 1.375rem; }
.stat-grid .btn.stat {
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  height: auto;
  text-align: left;
  letter-spacing: 0.01em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.stat-grid .btn.stat .stat__num { color: var(--accent-ink); }
.stat-grid .btn.stat .stat__label { color: var(--accent-ink); }

/* 教学有效性 */
.effect-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.2fr) auto 1fr 1fr;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  font-size: var(--fs-small);
  border-bottom: 1px solid var(--line);
}
.effect-row:last-child { border-bottom: 0; }
.effect-row__name { font-weight: 700; color: var(--ink); }
.effect-row__count { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.effect-row__cell { display: flex; flex-direction: column; gap: 0; color: var(--ink-2); }
.effect-row__cell b { font-size: var(--fs-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.effect-row__cell small { font-size: 0.75rem; color: var(--ink-3); }
.effect-row__cell--empty b { font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); }

/* 「数据」分区里的 details 只是容器，不再折叠 */
.desk-panel #more-data { margin: 0; padding: 0; border: 0; }
.desk-panel #more-data > summary { display: none; }

/* 两列：大屏把并列区块排开 */
.desk-grid { display: grid; gap: var(--sp-4); }
.desk-grid > .report-block { margin: 0; }
@media (min-width: 1024px) {
  .desk-grid--2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
}

@media (max-width: 640px) {
  .page-teacher .report-block { padding: var(--sp-4); }
  .attention__row { grid-template-columns: 1fr; grid-template-areas: "who" "why" "act"; }
  .attention__act, .page-teacher .btn.attention__act { justify-self: start; margin-top: var(--sp-2); }
  .effect-row { grid-template-columns: 1fr 1fr; }
  .effect-row__name { grid-column: 1 / -1; }
  .effect-row__count { grid-column: 1 / -1; }
  .block-head { flex-wrap: wrap; }
  .inline { flex-wrap: wrap; }
  .inline .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ 断点 */

@media (max-width: 359px) {
  .record-line, .stats, .today__grid { grid-template-columns: 1fr; }
  .stat { flex-direction: row; align-items: baseline; justify-content: space-between; }
}

@media (min-width: 768px) {
  .sheet { padding-top: var(--sp-6); }
  .teach-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.inline-note { margin: var(--sp-2) 0 0; }

/* 名单：别名一行、统计一行 */
.roster__name { display: block; margin: 0; }
.roster__meta { display: block; line-height: 1.5; }

/* 学生学情：只有学习记录也出现时才分两列 */
.desk-grid--auto { display: grid; gap: var(--sp-4); }
@media (min-width: 1024px) {
  .desk-grid--auto:has(#block-sessions:not([hidden])) {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
}
.panel-empty { margin: 0 0 var(--sp-4); }
#panel-students:has(#block-student-detail:not([hidden])) .panel-empty,
#panel-students:has(#block-sessions:not([hidden])) .panel-empty { display: none; }

/* 区块还在读时给一个诚实的加载提示，读到后自动消失 */
.panel-loading { margin: 0; }
.report-block:not([hidden]) ~ .panel-loading { display: none; }

/* 窄屏：学习中心五个页签挤在一行，教师端分区导航提示可以横滑 */
@media (max-width: 480px) {
  .tabs .tab { flex: 1 1 auto; padding: 0 var(--sp-2); }
  .desk-nav {
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
}

/* 有效性行在列表里也走网格（压过 .report-block__list li 的 flex） */
.report-block__list li.effect-row { display: grid; justify-content: stretch; align-items: center; }
.effect-row__cell { align-items: flex-start; text-align: left; }

/* 续学码「继续」是次级动作（首页只留一个主按钮），但用强调色描边区分 */
#resume-redeem { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-soft); }
#resume-redeem:hover { border-color: var(--accent); }

/* Internal trial consent */
#trial-consent { max-width: 34rem; width: calc(100% - 2rem); border: 1px solid #aab4c0; border-radius: 12px; padding: 1.5rem; color: #202a36; background: #fff; }
#trial-consent::backdrop { background: rgba(20, 30, 45, .65); }
#trial-consent label { display: block; margin: 1rem 0; }
#trial-consent-error { color: #a12b2b; }


/* 0.8.0 冲刺：首页唯一主行动 */
.home-hero__sub { margin-bottom: .25rem; }
.task__action {
  min-height: 88px;
  width: 100%;
  font-size: 20px;
  font-weight: 650;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(66, 99, 235, .18);
}
.task__action:active { transform: translateY(1px); }
#home-continue { margin-top: .5rem; }
.fineprint#home-scope-note { margin-top: .5rem; }
