/* 考核 · 设计系统 */
:root {
  --paper: #F4F3EF;
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --surface-3: #EFEDE7;
  --ink: #141413;
  --ink-2: #55534E;
  --ink-3: #8A8780;
  --line: #E3E0D9;
  --line-2: #CFCBC2;
  --accent: #E23A24;
  --accent-soft: #FBE9E5;
  --ok: #1F9D5B;
  --ok-soft: #E7F5ED;
  --warn: #B7791F;
  --warn-soft: #FBF2E2;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-1: 0 1px 2px rgba(20,20,19,.04), 0 10px 30px -18px rgba(20,20,19,.25);
  --shadow-2: 0 24px 60px -24px rgba(20,20,19,.35);
  --ease-out: cubic-bezier(.22,.9,.24,1);
  --ease-pop: cubic-bezier(.34,1.56,.64,1);
  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 280ms;
  --dur-4: 420ms;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 62px;
  --aside-bg: #141413;
  --aside-ink: #F4F3EF;
}
html[data-theme="dark"] {
  --paper: #101011;
  --surface: #19191A;
  --surface-2: #1F1F21;
  --surface-3: #2A2A2C;
  --ink: #F2F1EC;
  --ink-2: #B6B3AB;
  --ink-3: #817E76;
  --line: #2B2B2D;
  --line-2: #3B3B3E;
  --accent: #FF4A33;
  --accent-soft: #3A1B16;
  --ok: #35C97C;
  --ok-soft: #12301F;
  --warn: #E0A94A;
  --warn-soft: #33260F;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 14px 30px -18px rgba(0,0,0,.8);
  --shadow-2: 0 30px 70px -24px rgba(0,0,0,.9);
  --aside-bg: #19191A;
  --aside-ink: #F2F1EC;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1,h2,h3,h4,p { margin: 0; }
ul,ol { margin: 0; padding: 0; list-style: none; }

.app { min-height: 100dvh; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 760px; margin: 0 auto; padding: 18px 20px calc(28px + var(--safe-b)); }
.page--wide { max-width: 1180px; }
.view-enter { animation: viewIn var(--dur-3) var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 顶栏 / 底栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: .02em; }
.brand svg { width: 22px; height: 22px; }
.brand-title { font-size: 17px; }
.topbar-space { flex: 1; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  flex: none;
}
.avatar--accent { background: var(--accent); color: #fff; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: stretch;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 11px; letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-2) var(--ease-out);
  position: relative;
}
.tab svg { width: 23px; height: 23px; }
.tab.is-on { color: var(--ink); }
.tab.is-on::after {
  content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.tab:active { transform: scale(.94); }
.has-tabbar .page { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }

/* ---------- 桌面外壳 ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.sidebar .brand { padding: 2px 10px 20px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px;
  color: var(--ink-2); font-size: 14px;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.side-link svg { width: 19px; height: 19px; opacity: .85; }
.side-link:hover { background: var(--surface-3); color: var(--ink); }
.side-link.is-on { background: var(--ink); color: var(--paper); }
.side-link.is-on svg { opacity: 1; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 0; }
.side-foot .who { min-width: 0; }
.side-foot .who b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { display: block; font-size: 11px; color: var(--ink-3); }
.shell-main { min-width: 0; }
.shell .topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; position: static; }
.shell .page { max-width: 1080px; padding-top: 6px; }

/* ---------- 标题 / 文本 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 20px; }
.page-title { font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: -.01em; }
.page-title--lg { font-size: 34px; }
.sub { color: var(--ink-2); font-size: 13.5px; }
.muted { color: var(--ink-3); }
.mono { font-variant-numeric: tabular-nums; }
.section-title { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; margin: 26px 0 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  font-size: 15px; font-weight: 550; letter-spacing: .01em;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), opacity var(--dur-2);
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--line-2); }
.btn:active { transform: scale(.975); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); opacity: .92; }
.btn--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--accent:hover { border-color: var(--accent); opacity: .92; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn--danger { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.btn--sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-2); transition: background var(--dur-2), color var(--dur-2), transform var(--dur-1);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card--pad { padding: 18px; }
.card--flat { box-shadow: none; }
.card--link { display: block; transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2); }
.card--link:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card--link:active { transform: scale(.99); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 7px;
  background: var(--surface-3); color: var(--ink-2);
  font-size: 12px; letter-spacing: .01em;
}
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot--ok { background: var(--ok); }
.dot--accent { background: var(--accent); }
.dot--live { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em; }
.input, .textarea, .select {
  width: 100%; min-height: 44px; padding: 10px 13px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 11px;
  font-size: 15px; line-height: 1.45;
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
  appearance: none;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-grid { display: grid; gap: 14px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); transition: background var(--dur-3) var(--ease-out); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform var(--dur-3) var(--ease-pop); }
.switch.is-on { background: var(--ink); }
.switch.is-on::after { transform: translateX(18px); }
.checkbox { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: all var(--dur-2) var(--ease-out); flex: none; }
.checkbox svg { width: 13px; height: 13px; opacity: 0; transform: scale(.6); transition: all var(--dur-2) var(--ease-pop); }
.checkbox.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.checkbox.is-on svg { opacity: 1; transform: none; }

/* ---------- Toast / 空状态 / 骨架 ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 40px); }
.toast {
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px;
  background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow-2);
  animation: toastIn var(--dur-3) var(--ease-pop) both;
  display: flex; align-items: center; gap: 8px;
}
.toast--error { background: var(--accent); color: #fff; }
.toast--ok { background: var(--ok); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

.empty { padding: 56px 20px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty svg { width: 46px; height: 46px; opacity: .35; }
.empty p { font-size: 14px; }

.sk { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.2s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 底部弹层 ---------- */
.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(12,12,11,.42); opacity: 0; transition: opacity var(--dur-3) var(--ease-out); }
.backdrop.is-on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 0 calc(10px + var(--safe-b));
  max-height: 88dvh; display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--dur-3) var(--ease-out);
  will-change: transform;
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.35);
}
.sheet.is-on { transform: none; }
.sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 4px auto 8px; touch-action: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 20px 10px; }
.sheet-title { font-size: 17px; font-weight: 620; }
.sheet-body { padding: 4px 20px 16px; overflow: auto; -webkit-overflow-scrolling: touch; }
.sheet-actions { display: flex; gap: 10px; padding: 12px 20px 8px; }
.sheet-actions .btn { flex: 1; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -46%) scale(.96); width: min(520px, calc(100vw - 48px)); border-radius: 20px; opacity: 0; transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2); }
  .sheet.is-on { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grab { display: none; }
}

/* ---------- 工具 ---------- */
.hide { display: none !important; }
.only-mobile { display: none; }
@media (max-width: 719px) { .only-desktop { display: none !important; } .only-mobile { display: initial; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 登录 ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.08fr .92fr; }
.auth-aside {
  position: relative; overflow: hidden;
  background: var(--aside-bg); color: var(--aside-ink);
  padding: 34px 40px 38px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside .brand { color: var(--aside-ink); opacity: .9; }
.auth-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 1; min-height: 320px; }
.auth-marks { display: grid; grid-template-columns: repeat(2, 92px); gap: 20px; transform: rotate(-8deg); }
.mark {
  width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--aside-ink) 42%, transparent);
  display: grid; place-items: center;
  font-size: 30px; font-weight: 600; color: color-mix(in srgb, var(--aside-ink) 82%, transparent);
  opacity: 0; transform: scale(.72) translateY(10px);
  animation: markIn .62s var(--ease-pop) forwards;
}
.mark--fill { background: var(--aside-ink); color: var(--aside-bg); border-color: var(--aside-ink); }
.mark--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.mark svg { width: 40px; height: 40px; }
.mark:nth-child(1) { animation-delay: .05s; }
.mark:nth-child(2) { animation-delay: .13s; }
.mark:nth-child(3) { animation-delay: .21s; }
.mark:nth-child(4) { animation-delay: .29s; }
@keyframes markIn { to { opacity: 1; transform: none; } }
.auth-line { position: absolute; left: 0; right: 0; height: 1px; background: color-mix(in srgb, var(--aside-ink) 12%, transparent); }
.auth-caption { display: flex; align-items: center; gap: 12px; color: color-mix(in srgb, var(--aside-ink) 62%, transparent); font-size: 12px; letter-spacing: .1em; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 40px max(28px, 8vw); background: var(--paper); }
.auth-form { width: 100%; max-width: 360px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.auth-form .page-title { margin-bottom: 6px; }
.auth-switch { display: flex; gap: 6px; background: var(--surface-3); padding: 4px; border-radius: 12px; margin-bottom: 6px; }
.auth-switch button { flex: 1; height: 36px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); transition: all var(--dur-2) var(--ease-out); }
.auth-switch button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 550; }
.auth-brandline { display: none; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-panel { min-height: 100dvh; justify-content: flex-start; padding-top: max(64px, 16vh); }
  .auth-brandline { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
}

/* ---------- 学员首页 ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0 22px; }
.hello-date { font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }
.hello-name { font-size: 30px; font-weight: 650; line-height: 1.15; letter-spacing: -.01em; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 12px; box-shadow: var(--shadow-1); }
.kpi b { display: block; font-size: 26px; font-weight: 640; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.hero-card { position: relative; overflow: hidden; padding: 20px; display: flex; align-items: center; gap: 18px; }
.hero-card .grow { min-width: 0; }
.hero-title { font-size: 21px; font-weight: 620; line-height: 1.25; margin: 8px 0 4px; }
.ring { width: 62px; height: 62px; flex: none; position: relative; }
.ring svg { transform: rotate(-90deg); width: 62px; height: 62px; }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset var(--dur-4) var(--ease-out); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 620; font-variant-numeric: tabular-nums; }
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.task-row .when { font-size: 12px; color: var(--ink-3); }
.task-row .t { font-size: 15px; font-weight: 550; }
.task-row .meta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.card-row { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; }

/* ---------- 课件列表 / 阅读器 ---------- */
.deck-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.deck-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.deck-card .kicker { font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; }
.deck-card .t { font-size: 19px; font-weight: 620; line-height: 1.3; }
.deck-card .bar { height: 3px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.deck-card .bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width var(--dur-4) var(--ease-out); }
@media (min-width: 720px) { .deck-grid { grid-template-columns: repeat(2, 1fr); } }

.reader { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column; }
.reader-progress { position: sticky; top: 0; height: 3px; background: var(--surface-3); z-index: 2; }
.reader-progress i { display: block; height: 100%; background: var(--accent); transition: width var(--dur-3) var(--ease-out); }
.reader-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.reader-top .label { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-left: auto; }
.reader-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; align-items: flex-start; justify-content: center; padding: 8px 20px 20px; }
@media (min-width: 720px) { .reader-body { align-items: center; } }
.reader-card { width: 100%; max-width: 640px; margin: 0 auto; padding: 30px 6px 20px; }
.reader-kicker { font-size: 12px; color: var(--accent); letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.reader-title { font-size: clamp(26px, 5vw, 36px); line-height: 1.22; font-weight: 650; letter-spacing: -.015em; margin: 10px 0 26px; }
.reader-points { display: flex; flex-direction: column; gap: 16px; }
.reader-point { display: flex; gap: 13px; font-size: 17px; line-height: 1.72; color: var(--ink); }
.reader-point::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 12px; flex: none; }
.reader-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.reader-foot .count { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 60px; text-align: center; }
.reader-foot .btn { flex: 1; }
.reader-slide-anim { animation: slideIn var(--dur-3) var(--ease-out) both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.reader-slide-anim.is-back { animation-name: slideBack; }
@keyframes slideBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.reader-done { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 0; }
.done-ring { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.done-ring svg { width: 34px; height: 34px; }

/* ---------- 考试列表 / 开始页 ---------- */
.exam-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.exam-card .t { font-size: 19px; font-weight: 620; line-height: 1.3; }
.exam-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--ink-3); font-size: 12.5px; }
.exam-meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-meta svg { width: 14px; height: 14px; opacity: .7; }
.start-screen { max-width: 560px; margin: 0 auto; padding: 18px 0 30px; }
.start-title { font-size: clamp(28px, 5vw, 40px); line-height: 1.18; font-weight: 660; letter-spacing: -.02em; margin: 12px 0 26px; }
.meta-panel { border-top: 1px solid var(--line); }
.meta-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.meta-line .k { color: var(--ink-2); font-size: 14px; display: flex; align-items: center; gap: 9px; }
.meta-line .k svg { width: 17px; height: 17px; color: var(--ink-3); }
.meta-line .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.start-actions { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.start-note { text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* ---------- 答题 ---------- */
.exam-shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
.exam-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.exam-topline { display: flex; align-items: center; gap: 12px; padding: 12px 16px 8px; }
.exam-progress { height: 3px; background: var(--surface-3); }
.exam-progress i { display: block; height: 100%; background: var(--ink); transition: width var(--dur-3) var(--ease-out); }
.qcount { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.qcount b { color: var(--ink); font-size: 17px; font-weight: 640; }
.timer { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer svg { width: 16px; height: 16px; opacity: .6; }
.timer.is-warn { color: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.exam-body { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 20px calc(96px + var(--safe-b)); }
.qbox { animation: viewIn var(--dur-3) var(--ease-out) both; }
.qhead { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.qnum { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.qtype { font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }
.qpoints { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stem { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.55; font-weight: 560; letter-spacing: -.005em; margin-bottom: 22px; white-space: pre-wrap; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: flex-start; gap: 14px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; transition: border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.opt:hover { border-color: var(--line-2); }
.opt:active { transform: scale(.99); }
.opt-mark { width: 27px; height: 27px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-3); flex: none; margin-top: 1px; transition: all var(--dur-2) var(--ease-pop); position: relative; overflow: hidden; }
.opt-mark::before { content: ""; position: absolute; inset: 0; background: var(--ink); border-radius: 50%; transform: scale(0); transition: transform var(--dur-3) var(--ease-pop); }
.opt-mark span { position: relative; z-index: 1; transition: color var(--dur-2); }
.opt-mark svg { position: relative; z-index: 1; width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: all var(--dur-2) var(--ease-pop); color: var(--paper); }
.opt-text { font-size: 16px; line-height: 1.6; flex: 1; padding-top: 1px; }
.opt.is-on { border-color: var(--ink); background: var(--surface-2); }
.opt.is-on .opt-mark { border-color: var(--ink); color: var(--paper); }
.opt.is-on .opt-mark::before { transform: scale(1); }
.opt.is-on .opt-mark span { color: var(--paper); }
.opt.is-on .opt-mark--check svg { opacity: 1; transform: none; }
.opt.is-on .opt-mark--check span { display: none; }
.judge-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.judge-opt { padding: 26px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 15px; }
.judge-opt svg { width: 30px; height: 30px; color: var(--ink-3); transition: color var(--dur-2); }
.judge-opt.is-on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.judge-opt.is-on svg { color: var(--paper); }
.fill-wrap .input { height: 54px; font-size: 17px; }
.fill-hint { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.exam-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + var(--safe-b)); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.exam-bottom .btn { flex: 1; }
.exam-bottom .btn--primary { flex: 1.3; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 9px; }
.sheet-cell { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--ink-2); transition: all var(--dur-2) var(--ease-out); }
.sheet-cell.is-done { background: var(--ink); color: var(--paper); }
.sheet-cell.is-cur { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.sheet-cell.is-done.is-cur { color: var(--paper); box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.leave-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); }

/* ---------- 成绩 ---------- */
.score-hero { position: relative; text-align: center; max-width: 640px; margin: 0 auto; padding: 36px 10px 30px; border-bottom: 1px solid var(--line); }
.score-num { font-size: clamp(64px, 13vw, 96px); line-height: 1; font-weight: 660; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.score-num small { font-size: .28em; color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.score-sub { color: var(--ink-2); margin-top: 12px; font-size: 14px; }
.stamp { position: absolute; right: 8px; top: 12px; width: 92px; height: 92px; border: 2.5px solid var(--accent); border-radius: 50%; color: var(--accent); display: grid; place-items: center; font-size: 15px; font-weight: 700; letter-spacing: .18em; transform: rotate(-14deg) scale(1.6); opacity: 0; animation: stampIn .55s var(--ease-pop) .12s forwards; mix-blend-mode: multiply; }
html[data-theme="dark"] .stamp { mix-blend-mode: normal; }
@keyframes stampIn { 60% { opacity: 1; transform: rotate(-14deg) scale(.94); } to { opacity: 1; transform: rotate(-14deg) scale(1); } }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat-cell { background: var(--surface); padding: 14px; text-align: center; }
.stat-cell b { display: block; font-size: 20px; font-weight: 620; font-variant-numeric: tabular-nums; }
.stat-cell span { font-size: 11.5px; color: var(--ink-3); }
.review-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.review-item { padding: 16px 18px; }
.review-head { display: flex; align-items: flex-start; gap: 10px; }
.review-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.review-mark svg { width: 12px; height: 12px; }
.review-mark.is-ok { background: var(--ok-soft); color: var(--ok); }
.review-mark.is-bad { background: var(--accent-soft); color: var(--accent); }
.review-stem { font-size: 15px; line-height: 1.55; flex: 1; }
.review-answer { margin-top: 10px; padding-left: 32px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.review-answer b { color: var(--ink); font-weight: 560; }
.review-answer .ok { color: var(--ok); }
.review-answer .bad { color: var(--accent); }
.review-analysis { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-left: 2px solid var(--line-2); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ---------- 教师 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi-grid--6 { grid-template-columns: repeat(3, 1fr); }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-1); }
.kpi-card b { display: block; font-size: 28px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-card span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 5px; }
@media (min-width: 900px) { .kpi-grid--6 { grid-template-columns: repeat(6, 1fr); } }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 11.5px; letter-spacing: .05em; padding: 0 12px 10px; white-space: nowrap; }
.data-table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table .num { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.member-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.member-chip .avatar { width: 24px; height: 24px; font-size: 11px; }
.code-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 9px; background: var(--surface-3); font-variant-numeric: tabular-nums; letter-spacing: .12em; font-weight: 600; font-size: 14px; }

/* 编辑器 */
.editor-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 960px) { .editor-grid { grid-template-columns: 300px 1fr; align-items: start; } }
.slide-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
@media (min-width: 960px) { .slide-list { flex-direction: column; overflow: visible; } }
.slide-item { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; min-width: 150px; transition: all var(--dur-2) var(--ease-out); }
.slide-item .n { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; width: 16px; }
.slide-item .t { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.slide-item.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.slide-editor { display: flex; flex-direction: column; gap: 14px; }
.q-editor { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.q-editor-head { display: flex; align-items: center; gap: 8px; }
.q-editor-head .idx { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.q-editor .opt-row { display: flex; align-items: center; gap: 8px; }
.q-editor .opt-row .pick { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; font-size: 11px; color: var(--ink-3); }
.q-editor .opt-row .pick.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.drag-handle { color: var(--ink-3); cursor: grab; }
.import-drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 26px 18px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: border-color var(--dur-2), background var(--dur-2); }
.import-drop.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.bookmarklet { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 13px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; cursor: grab; box-shadow: var(--shadow-2); user-select: none; }
.bookmarklet:active { cursor: grabbing; transform: scale(.98); }
.bookmarklet svg { width: 17px; height: 17px; }
.harvest-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.harvest-step { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.harvest-step b { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 11px; color: var(--ink-2); font-weight: 600; flex: none; }
.article-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); transition: background var(--dur-2); }
.article-row:last-child { border-bottom: 0; }
.article-row:hover { background: var(--surface-2); }
.article-row .t { font-size: 14px; font-weight: 550; }
.article-row .m { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.action-bar { position: sticky; bottom: 12px; margin-top: 16px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); z-index: 5; }
.action-bar .grow { font-size: 13px; color: var(--ink-2); }

/* 监考 */
.live-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--dur-2); }
.live-row:last-child { border-bottom: 0; }
.live-row:hover { background: var(--surface-2); }
.live-row .nm { font-size: 14px; font-weight: 550; }
.live-row .sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.live-row .right { margin-left: auto; text-align: right; }
.live-row .right b { font-size: 17px; font-variant-numeric: tabular-nums; }
.live-row .right span { display: block; font-size: 11.5px; color: var(--ink-3); }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 5px; top: 26px; bottom: -10px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); margin-top: 7px; flex: none; z-index: 1; }
.tl-dot.is-leave { background: var(--accent); }
.tl-dot.is-return { background: var(--ok); }
.tl-body { font-size: 13px; }
.tl-body .tm { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.stat-bars { display: flex; flex-direction: column; gap: 10px; }
.stat-bar { display: grid; grid-template-columns: 1fr 46px; gap: 10px; align-items: center; font-size: 12.5px; }
.stat-bar .bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.stat-bar .bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

/* 设置 */
.settings-block { max-width: 560px; }
.settings-block + .settings-block { margin-top: 28px; }
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface-3); border-radius: 11px; padding: 4px; }
.theme-seg button { height: 34px; border-radius: 8px; font-size: 13px; color: var(--ink-2); }
.theme-seg button.is-on { background: var(--surface); color: var(--ink); font-weight: 550; box-shadow: var(--shadow-1); }

@media (max-width: 719px) {
  .page { padding: 14px 16px calc(28px + var(--safe-b)); }
  .page-title { font-size: 24px; }
  .hello-name { font-size: 26px; }
  .kpis { gap: 8px; }
  .kpi { padding: 12px; }
  .kpi b { font-size: 22px; }
  .hero-card { padding: 18px; }
  .hero-title { font-size: 19px; }
  .review-answer { padding-left: 0; }
  .stamp { width: 76px; height: 76px; font-size: 13px; right: 4px; }
  .form-grid--2 { grid-template-columns: 1fr; }
}

/* 低端机 / 减少动效 */
html.lite .topbar, html.lite .tabbar, html.lite .exam-top, html.lite .exam-bottom { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
html.lite .view-enter, html.lite .qbox, html.lite .reader-slide-anim { animation: none; }
html.lite .sheet { transition-duration: 160ms; }
html.lite .dot--live { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
  .view-enter, .qbox { animation: none; }
}

.app--immersive .topbar, .app--immersive .tabbar { display: none; }
.immersive-host { min-height: 100dvh; }
.mark-tip { color: var(--ink-3); }
@media (max-width: 899px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .shell .topbar { display: flex; position: sticky; background: var(--paper); }
  .shell .page { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }
}

.topbar--mobile { display: none; }
@media (max-width: 899px) {
  .topbar--mobile { display: flex; }
  .tabbar--teacher { display: flex; }
}
@media (min-width: 900px) {
  .tabbar--teacher { display: none; }
}
@media (min-width: 720px) {
  .tabbar--student {
    left: 50%; right: auto; transform: translateX(-50%);
    bottom: 18px; width: min(560px, 92vw);
    border: 1px solid var(--line); border-radius: 20px;
    box-shadow: var(--shadow-2);
    height: 58px;
  }
  .has-tabbar .page { padding-bottom: calc(var(--tab-h) + 84px); }
  .tabbar--student .tab { font-size: 10.5px; }
}

@media (max-width: 719px) { .data-table { min-width: 560px; } }

.reader-image { margin-top: 24px; width: 100%; max-height: 46vh; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
