/* ==========================================================================
   CFO 战略判断陪练 · 界面样式
   浅色主题：主色为蓝、天蓝、青绿渐变，辅以琥珀、翠绿、珊瑚橙
   ========================================================================== */

@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3f9;
  --glass: rgba(255, 255, 255, .74);
  --glass-strong: rgba(255, 255, 255, .88);
  --ink: #0b1b33;
  --ink-2: #43536b;
  --ink-3: #6a798f;
  --ink-4: #9aa7b8;
  --line: #e3e9f2;
  --line-2: #d2dbe7;

  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --blue-3: #1e40af;
  --blue-soft: #eaf1ff;
  --sky: #0ea5e9;
  --sky-2: #0369a1;
  --sky-soft: #e6f6fe;
  --teal: #14b8a6;
  --teal-2: #0f766e;
  --teal-soft: #e3f7f3;
  --emerald: #10b981;
  --emerald-2: #047857;
  --emerald-soft: #e7f8f0;
  --amber: #f59e0b;
  --amber-2: #b45309;
  --amber-soft: #fff4de;
  --coral: #f97316;
  --coral-2: #c2410c;
  --coral-soft: #fff0e5;
  --red: #ef4444;
  --red-2: #c81e1e;
  --red-soft: #fdecec;
  --cyan: #06b6d4;
  --cyan-2: #0e7490;
  --cyan-soft: #e4f7fb;

  --grad-brand: linear-gradient(135deg, #1d4ed8 0%, #2563eb 28%, #0ea5e9 66%, #14b8a6 100%);
  --grad-brand-soft: linear-gradient(135deg, #eaf1ff, #e6f6fe 55%, #e3f7f3);
  --grad-text: linear-gradient(100deg, #1d4ed8, #0ea5e9 55%, #0d9488);
  --grad-amber: linear-gradient(135deg, #f59e0b, #f97316);
  --grad-emerald: linear-gradient(135deg, #059669, #14b8a6);
  --grad-cyan: linear-gradient(135deg, #0e7490, #06b6d4);

  --r-xl: 28px;
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 12px;
  --sh-1: 0 1px 2px rgba(15, 32, 64, .05);
  --sh-2: 0 1px 2px rgba(15, 32, 64, .04), 0 12px 30px -16px rgba(15, 40, 90, .22);
  --sh-3: 0 2px 6px rgba(15, 32, 64, .05), 0 26px 60px -24px rgba(15, 40, 90, .34);
  --sh-brand: 0 10px 24px -10px rgba(37, 99, 235, .55);
  --focus: 0 0 0 4px rgba(37, 99, 235, .16);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Segoe UI", Roboto, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --top: 64px;
}

/* ---------------------------------------------------------------- 基础 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 20px); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 15px/1.7 var(--sans); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 560px at 6% -10%, rgba(59, 130, 246, .15), transparent 62%),
    radial-gradient(780px 520px at 98% 0%, rgba(20, 184, 166, .13), transparent 60%),
    radial-gradient(680px 520px at 90% 100%, rgba(251, 191, 36, .09), transparent 62%),
    radial-gradient(720px 520px at 0% 100%, rgba(14, 165, 233, .10), transparent 62%);
}
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--display); line-height: 1.35; font-weight: 700; letter-spacing: -.005em; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
h5 { font-size: 13px; color: var(--ink-3); font-weight: 700; letter-spacing: .04em; }
p { margin: 0; }
a { color: var(--blue-2); text-decoration: none; }
a:hover { color: var(--blue); }
ol, ul { margin: 0; padding: 0; }
small { font-size: .84em; }
b, strong { font-weight: 700; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); }
code { font-size: .86em; padding: .1em .42em; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); }
q { quotes: "“" "”"; }
::selection { background: rgba(14, 165, 233, .22); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.flip { transform: scaleX(-1); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.fine { font-size: 12.5px; line-height: 1.65; color: var(--ink-3); }
.lead { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow .i { color: var(--sky); }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between, .row.between { justify-content: space-between; }
.gap { gap: 14px; }
.gap-sm { gap: 8px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-2.inner { gap: 28px; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 动效 */

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes shimmer-bg { to { background-position: 200% 0; } }
@keyframes grow-w { from { width: 0; } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes blink-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes dots { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes draw { from { stroke-dasharray: 26; stroke-dashoffset: 26; } to { stroke-dasharray: 26; stroke-dashoffset: 0; } }
@keyframes shake-x { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes fresh-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
  35% { box-shadow: 0 0 0 6px rgba(14, 165, 233, .22); }
}
@keyframes ready-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .45), var(--sh-brand); }
  70% { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0), var(--sh-brand); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), var(--sh-brand); }
}
@keyframes step-pulse {
  0%, 100% { box-shadow: inset 0 0 0 2.5px var(--blue), 0 0 0 4px rgba(37, 99, 235, .14); }
  50% { box-shadow: inset 0 0 0 2.5px var(--blue), 0 0 0 9px rgba(37, 99, 235, .05); }
}
@keyframes step-pulse-w {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .28); }
  50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, .08); }
}
@keyframes float-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6%, 8%, 0) scale(1.08); } }
@keyframes float-b { from { transform: translate3d(0, 0, 0) scale(1.05); } to { transform: translate3d(-8%, 6%, 0) scale(.95); } }
@keyframes float-c { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-10%, -8%, 0); } }
@keyframes float-d { from { transform: translate3d(0, 0, 0) scale(.95); } to { transform: translate3d(9%, -6%, 0) scale(1.06); } }
@keyframes shine { 0% { left: -60%; } 36%, 100% { left: 130%; } }
@keyframes text-flow { to { background-position: 200% center; } }
@keyframes border-spin { to { --angle: 360deg; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes orb { 0%, 100% { box-shadow: 0 0 0 5px rgba(245, 158, 11, .16); } 50% { box-shadow: 0 0 0 11px rgba(245, 158, 11, .05); } }
@keyframes attn { 0%, 100% { transform: none; } 10% { transform: rotate(-9deg); } 20% { transform: rotate(7deg); } 30% { transform: rotate(-4deg); } 40% { transform: none; } }
@keyframes badge-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes cell-pop { 40% { transform: translateY(-3px) scale(1.07); } 100% { transform: none; } }
@keyframes stamp {
  0% { transform: scale(2.3) rotate(-30deg); opacity: 0; filter: blur(8px); }
  55% { transform: scale(.92) rotate(-10deg); opacity: 1; filter: blur(0); }
  70% { transform: scale(1.04) rotate(-12deg); }
  85% { transform: scale(.99) rotate(-11deg); }
  100% { transform: scale(1) rotate(-11deg); opacity: 1; }
}
@keyframes ink { from { transform: scale(.72); opacity: .6; } to { transform: scale(1.9); opacity: 0; } }
@keyframes lock-out { 0%, 40% { opacity: 1; transform: none; } 55% { transform: rotate(-14deg); } 72% { opacity: 0; transform: translateY(-6px) scale(.8); } 100% { opacity: 0; } }
@keyframes unlock-in { 0%, 55% { opacity: 0; transform: scale(.5); } 80% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: none; } }
@keyframes unlock-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }
@keyframes from-ai {
  0% { background: #eef8ff; box-shadow: inset 0 0 0 2px var(--sky), 0 0 0 6px rgba(14, 165, 233, .16); }
  100% { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

.rise { animation: rise .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.draw { animation: draw .7s var(--ease) .3s both; }
.spin {
  display: inline-block; width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .75s linear infinite; vertical-align: -2px;
}
.skeleton { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.skeleton i {
  display: block; height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, #edf2f8 0%, #f8fafd 40%, #edf2f8 80%); background-size: 800px 100%; animation: shimmer 1.4s linear infinite;
}
.skeleton i:last-child { width: 62%; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .2s var(--ease) both vt-out; }
::view-transition-new(root) { animation: .38s var(--ease-out) both vt-in; }
.topbar { view-transition-name: topbar; }
.t-side { view-transition-name: teacher-side; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  --btn-bg: var(--grad-brand);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--btn-bg); background-size: 150% 150%; background-position: 0% 50%;
  color: #fff; font-size: 14.5px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), var(--sh-brand);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-position .6s var(--ease), color .2s;
}
.btn:hover { color: #fff; transform: translateY(-1px); background-position: 100% 50%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 16px 30px -12px rgba(37, 99, 235, .6); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .i { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.btn:hover .i:last-child:not(:first-child) { transform: translateX(3px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-secondary {
  --btn-bg: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-1);
}
.btn-secondary:hover { color: var(--blue-2); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .45), 0 10px 22px -14px rgba(37, 99, 235, .55); }
.btn-secondary .i { color: var(--blue); }
.btn-ghost { --btn-bg: transparent; color: var(--blue-2); box-shadow: none; }
.btn-ghost:hover { color: var(--blue-2); background: var(--blue-soft); box-shadow: none; }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; gap: 6px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-lg { height: 50px; padding: 0 24px; border-radius: 14px; font-size: 16px; }
.btn-lg .i { width: 19px; height: 19px; }
.btn-block { width: 100%; }
.btn-shine::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 42%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-18deg);
  animation: shine 4s var(--ease) 1.4s infinite;
}
.btn-icon {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex: none;
  border: 0; border-radius: 11px; background: transparent; color: var(--ink-3); cursor: pointer; transition: background .2s, color .2s;
}
.btn-icon:hover { background: var(--surface-3); color: var(--ink); }
.btn-icon .i { width: 18px; height: 18px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--blue-2); font-size: 13.5px; font-weight: 650; cursor: pointer; transition: background .2s;
}
.link-btn:hover { background: var(--blue-soft); }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 650; }
.link .i { transition: transform .2s var(--ease); }
.link:hover .i { transform: translateX(3px); }
[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] { opacity: .85; }
.btn[aria-busy="true"] > .i { display: none; }
.btn[aria-busy="true"]::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}

/* ---------------------------------------------------------------- 色调与标签 */

.tone-ok { --tone: #047857; --tone-fill: #10b981; --tone-soft: #e7f8f0; --tone-line: rgba(16, 185, 129, .24); }
.tone-warn { --tone: #b45309; --tone-fill: #f59e0b; --tone-soft: #fff4de; --tone-line: rgba(245, 158, 11, .3); }
.tone-err { --tone: #c81e1e; --tone-fill: #ef4444; --tone-soft: #fdecec; --tone-line: rgba(239, 68, 68, .26); }
.tone-info { --tone: #1d4ed8; --tone-fill: #3b82f6; --tone-soft: #eaf1ff; --tone-line: rgba(37, 99, 235, .2); }
.tone-muted { --tone: #5b6b82; --tone-fill: #a8b4c4; --tone-soft: #eef2f7; --tone-line: rgba(148, 163, 184, .3); }
.tone-brass { --tone: #c2410c; --tone-fill: #f97316; --tone-soft: #fff0e5; --tone-line: rgba(249, 115, 22, .26); }
.tone-seal { --tone: #0e7490; --tone-fill: #06b6d4; --tone-soft: #e4f7fb; --tone-line: rgba(6, 182, 212, .26); }
.tone-line { --tone: var(--ink-2); --tone-fill: var(--line-2); --tone-soft: rgba(255, 255, 255, .8); --tone-line: var(--line-2); }
.tone-kind { --tone: #1d4ed8; --tone-fill: #2563eb; --tone-soft: linear-gradient(135deg, #eaf1ff, #e3f7f3); --tone-line: rgba(37, 99, 235, .2); }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; vertical-align: middle;
  font-size: 12px; font-weight: 650; line-height: 1; letter-spacing: .01em; white-space: nowrap;
  color: var(--tone, var(--ink-2)); background: var(--tone-soft, var(--surface-3)); box-shadow: inset 0 0 0 1px var(--tone-line, transparent);
}
.pill .i { width: 13px; height: 13px; }
.pill .spin { width: 11px; height: 11px; border-width: 1.6px; }
.flag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; color: var(--tone); background: var(--tone-soft);
}
.verdict {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px 0 8px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--tone); background: var(--tone-soft); box-shadow: inset 0 0 0 1px var(--tone-line);
}
.verdict .i { width: 15px; height: 15px; }
.verdict .spin { width: 12px; height: 12px; }

.lv {
  display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 10px; border-radius: 8px; white-space: nowrap;
  font-size: 12.5px; font-weight: 700; color: var(--lv-ink); background: var(--lv-soft); box-shadow: inset 0 0 0 1px var(--lv-line, transparent);
}
.lv.sm { height: 21px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; }
.lv0 { --lv-ink: #5b6b82; --lv-soft: #eef2f7; --lv-fill: #c3cedb; }
.lv1 { --lv-ink: #b45309; --lv-soft: #fff4de; --lv-fill: #f59e0b; }
.lv2 { --lv-ink: #0f766e; --lv-soft: #e3f7f3; --lv-fill: #14b8a6; }
.lv3 { --lv-ink: #fff; --lv-soft: linear-gradient(135deg, #1d4ed8, #0ea5e9); --lv-fill: #2563eb; }
.lvna { --lv-ink: #5b6b82; --lv-soft: #fff; --lv-line: #cfd8e4; --lv-fill: #e2e8f0; }
.lvwait { --lv-ink: #c2410c; --lv-soft: #fff0e5; --lv-line: rgba(249, 115, 22, .3); --lv-fill: #fdba74; }
.lvnone { --lv-ink: var(--ink-4); --lv-soft: var(--surface-3); --lv-fill: #e2e8f0; }

.ref {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; margin: 0 1px; border-radius: 6px; vertical-align: 1px;
  font: 700 11.5px/1 var(--mono); color: var(--blue-2); background: var(--blue-soft); cursor: pointer; transition: background .2s, color .2s;
}
.ref:hover { color: #fff; background: var(--blue); }
.ref[data-ref^="U"] { color: var(--amber-2); background: var(--amber-soft); }
.ref[data-ref^="U"]:hover { color: #fff; background: var(--amber); }
.ref.ref-missing { background: transparent; box-shadow: inset 0 0 0 1px currentColor; opacity: .6; cursor: help; }
.code {
  display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 8px; white-space: nowrap;
  font: 700 12.5px var(--mono); color: var(--blue-2); background: var(--blue-soft); transition: background .2s, color .2s;
}
a.code:hover { color: #fff; background: var(--blue); }

/* ---------------------------------------------------------------- 表单控件 */

:where(input:not([type="radio"], [type="checkbox"], [type="file"], [type="hidden"], [type="range"]), textarea, select) {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px;
  background: #fff; color: var(--ink); font-size: 15px; line-height: 1.6; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
:where(textarea) { min-height: 0; line-height: 1.8; resize: vertical; }
:where(input, textarea, select):focus { border-color: var(--blue); box-shadow: var(--focus); }
:where(input, textarea)::placeholder { color: var(--ink-4); }
:where(input, textarea, select):disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
input[type="number"] { font-variant-numeric: tabular-nums; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 8px; }
.field-label { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field-label small { font-weight: 500; color: var(--ink-3); }
.field > small.muted { font-size: 12.5px; }
.field-error {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 8px; font-size: 13px; font-weight: 600; line-height: 1.6; color: var(--red-2);
}
.field-error::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: currentColor; }
.field-error.resolved { display: none; }

.select-wrap { position: relative; display: inline-block; min-width: 0; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; font-weight: 600; }
.select-wrap > .i { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%) rotate(90deg); color: var(--ink-3); pointer-events: none; }
.select-wrap.sm select { min-height: 34px; height: 34px; padding: 4px 30px 4px 10px; border-radius: 10px; font-size: 13px; }
.select-wrap.sm > .i { right: 9px; width: 14px; height: 14px; }

.seg {
  display: inline-flex; gap: 4px; padding: 4px; max-width: 100%; border-radius: 14px;
  background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line);
}
.seg-wrap { flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink-2); text-align: center; transition: background .2s, color .2s, box-shadow .2s;
}
.seg label:hover span { color: var(--ink); background: rgba(255, 255, 255, .7); }
.seg input:checked + span { color: var(--blue-2); background: #fff; box-shadow: 0 1px 2px rgba(15, 32, 64, .08), 0 6px 16px -8px rgba(37, 99, 235, .45); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.seg-sm span { min-height: 30px; padding: 4px 10px; font-size: 13px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.track { position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-2); transition: background .25s; }
.track i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(15, 32, 64, .25); transition: transform .35s var(--spring); }
.switch input:checked + .track { background: var(--grad-emerald); }
.switch input:checked + .track i { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------------------------------------------------------------- 卡片与提示 */

.card {
  position: relative; padding: 22px 24px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid rgba(210, 219, 231, .65); box-shadow: var(--sh-2);
}
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 16px; }
.card-head > div { min-width: 0; }
.card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 750; }
.card-head h3 > .i { color: var(--blue); }
.card-head .muted { display: inline-flex; align-items: center; gap: 5px; }
.card-head .tabs-nav { margin-left: auto; }

.alert {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px;
  color: var(--tone, var(--blue-2)); background: var(--tone-soft, var(--blue-soft)); box-shadow: inset 0 0 0 1px var(--tone-line, transparent);
  font-size: 14px; font-weight: 550;
}
.alert > .i { width: 20px; height: 20px; }
.alert > span { flex: 1; min-width: 0; color: var(--ink); }
.alert .btn { flex: none; }
[data-shake] { animation: shake-x .5s var(--ease) .15s both; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px; text-align: center; color: var(--ink-3); }
.empty-icon {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px;
  color: var(--blue); background: var(--grad-brand-soft); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}
.empty-icon .i { width: 26px; height: 26px; }
.empty p { max-width: 440px; font-size: 14.5px; }
.empty.slim { padding: 26px 12px; }

.error-summary { padding: 16px 18px; border-radius: 18px; background: #fff6f6; box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, .32); outline: none; }
.error-summary header { display: flex; align-items: center; gap: 10px; color: var(--red-2); }
.error-summary header > .i { width: 20px; height: 20px; }
.error-summary header b { flex: 1; font-size: 15px; }
.error-summary ol { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding-left: 50px; font-size: 14px; color: var(--ink); }
.error-summary li::marker { color: var(--red); font-weight: 700; }
.error-summary a { color: var(--red-2); text-decoration: underline; text-decoration-color: rgba(200, 30, 30, .35); text-underline-offset: 3px; }
.error-summary .fine { margin-top: 8px; padding-left: 30px; }
.error-summary.shake { animation: shake-x .5s var(--ease); }

/* ---------------------------------------------------------------- 顶栏与页面框架 */

.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  background: rgba(255, 255, 255, .66); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(210, 219, 231, .6); transition: background .3s, box-shadow .3s;
}
.topbar.scrolled { background: rgba(255, 255, 255, .86); box-shadow: 0 10px 30px -20px rgba(15, 40, 90, .35); }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 100%; max-width: 1480px; margin: 0 auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 8px 16px -8px rgba(37, 99, 235, .6); transition: transform .45s var(--spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 15px; font-weight: 750; }
.brand-text small { font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.topnav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.topnav a {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 11px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: color .2s, background .2s;
}
.topnav a:hover { color: var(--ink); background: rgba(15, 32, 64, .045); }
.topnav a.on { color: var(--blue-2); background: var(--blue-soft); }
.topnav a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad-brand); }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top-help {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s;
}
.top-help:hover, .top-help.on { color: var(--blue-2); background: var(--blue-soft); }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 4px; border-radius: 14px; }
.who-text { display: flex; flex-direction: column; line-height: 1.25; }
.who-text b { font: 750 14px var(--mono); }
.who-text small { font-size: 11.5px; color: var(--ink-3); }
.avatar {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  font: 800 14px var(--display); color: #fff; background: var(--grad-brand); box-shadow: 0 0 0 2px #fff, 0 8px 14px -8px rgba(37, 99, 235, .8);
}

.page { max-width: 1200px; margin: 0 auto; padding: 30px 24px 120px; }
.page-wide { max-width: 1480px; }
.page > * + * { margin-top: 22px; }
.sandbox-bar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; padding: 8px 20px;
  font-size: 13.5px; font-weight: 550; color: var(--teal-2);
  background: linear-gradient(90deg, rgba(14, 165, 233, .1), rgba(20, 184, 166, .14)); border-bottom: 1px solid rgba(20, 184, 166, .2);
}
.sandbox-bar > span { display: inline-flex; align-items: center; gap: 7px; }
.sandbox-bar .link-btn { color: var(--teal-2); }
.sandbox-bar .link-btn:hover { background: rgba(20, 184, 166, .12); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.page-head > div:first-child { min-width: 0; max-width: 820px; }
.page-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.page-head .lead { margin-top: 6px; font-size: 15px; }
.page-head .back-link { margin-bottom: 4px; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin-left: -8px; padding: 4px 10px 4px 8px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-3); transition: color .2s, background .2s;
}
.back-link:hover { color: var(--blue-2); background: var(--blue-soft); }
.back-link .i { transition: transform .25s var(--ease); }
.back-link:hover .flip { transform: scaleX(-1) translateX(3px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.sec-head h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 750; }
.sec-head h2::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad-brand); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 750; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad-brand); }

/* ---------------------------------------------------------------- 提示条、对话框 */

.toasts {
  position: fixed; top: calc(var(--top) + 14px); right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  --tone-fill: #3b82f6;
  position: relative; overflow: hidden; pointer-events: auto; cursor: pointer;
  padding: 13px 16px 15px 40px; border-radius: 14px; font-size: 14px; font-weight: 550; line-height: 1.6; color: var(--ink);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--sh-3), inset 0 0 0 1px rgba(210, 219, 231, .8); animation: toast-in .45s var(--spring) both;
}
.toast::before {
  content: ""; position: absolute; left: 16px; top: 20px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--tone-fill); box-shadow: 0 0 0 4px var(--tone-soft, #eaf1ff);
}
.toast::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tone-fill);
  transform-origin: left; animation: toast-bar var(--life, 4.6s) linear both; opacity: .8;
}
.toast.hold::after { animation-play-state: paused; }
.toast.out { animation: toast-out .3s var(--ease) both; }

.modal { width: 100%; max-width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.modal::backdrop { background: rgba(15, 28, 52, .36); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s both; }
.modal[open] .modal-box { animation: pop-in .42s var(--spring) both; }
.modal-box {
  position: relative; margin: 0; padding: 28px 28px 22px; border-radius: 24px; background: #fff;
  box-shadow: 0 30px 80px -24px rgba(15, 40, 90, .45), inset 0 0 0 1px rgba(210, 219, 231, .7);
}
.modal-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 15px;
  color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand);
}
.modal-icon .i { width: 22px; height: 22px; }
.modal[data-tone="warn"] .modal-icon { background: var(--grad-amber); box-shadow: 0 10px 24px -10px rgba(245, 158, 11, .65); }
.modal[data-tone="warn"] .modal-title { color: var(--amber-2); }
.modal-title { margin-bottom: 8px; font-size: 19px; font-weight: 800; }
.modal-body { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.modal-body ul { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 40vh; margin-top: 12px; overflow-y: auto; }
.modal-body li { position: relative; padding: 8px 12px 8px 30px; border-radius: 10px; font-size: 13.5px; color: var(--ink); background: var(--amber-soft); }
.modal-body li::before { content: ""; position: absolute; left: 13px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------------------------------------------------------------- 登录 */

.page-auth { background: #eef3fb; }
.page-auth::before { display: none; }
.auth {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center;
  gap: clamp(32px, 5vw, 88px); min-height: 100vh; min-height: 100dvh;
  padding: clamp(28px, 5vw, 72px) clamp(20px, 6vw, 96px);
}
.aurora { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.aurora .a1 { width: 54vmax; height: 54vmax; left: -16vmax; top: -20vmax; background: radial-gradient(circle at 40% 40%, rgba(59, 130, 246, .55), rgba(59, 130, 246, 0) 66%); animation: float-a 22s ease-in-out infinite alternate; }
.aurora .a2 { width: 46vmax; height: 46vmax; right: -14vmax; top: -12vmax; background: radial-gradient(circle at 55% 45%, rgba(45, 212, 191, .5), rgba(45, 212, 191, 0) 66%); animation: float-b 26s ease-in-out infinite alternate; }
.aurora .a3 { width: 40vmax; height: 40vmax; right: 6vmax; bottom: -24vmax; background: radial-gradient(circle, rgba(251, 191, 36, .38), rgba(251, 191, 36, 0) 64%); animation: float-c 30s ease-in-out infinite alternate; }
.aurora .a4 { width: 38vmax; height: 38vmax; left: 16vmax; bottom: -20vmax; background: radial-gradient(circle, rgba(56, 189, 248, .42), rgba(56, 189, 248, 0) 64%); animation: float-d 24s ease-in-out infinite alternate; }
.auth-canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.auth-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  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: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 18%, transparent 76%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 18%, transparent 76%);
}

.auth-intro { justify-self: end; width: 100%; max-width: 620px; }
.auth-brand {
  display: inline-flex; align-items: center; gap: 12px; padding: 7px 18px 7px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 10px 26px -16px rgba(15, 40, 90, .35);
}
.auth-brand img { width: 42px; height: 42px; border-radius: 13px; }
.auth-brand span { display: flex; flex-direction: column; line-height: 1.3; }
.auth-brand b { font-size: 14.5px; }
.auth-brand small { font-size: 12px; color: var(--ink-3); }
.auth-title { margin-top: 28px; font-size: clamp(38px, 5.2vw, 66px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; }
.auth-title em {
  font-style: normal; background: linear-gradient(100deg, #1d4ed8, #0ea5e9 35%, #14b8a6 60%, #1d4ed8 100%); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: text-flow 9s linear infinite;
}
.auth-lead { max-width: 540px; margin-top: 20px; font-size: 16.5px; line-height: 1.9; color: var(--ink-2); }
.auth-steps { list-style: none; display: grid; gap: 12px; max-width: 540px; margin-top: 30px; }
.auth-steps li {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), 0 12px 30px -22px rgba(15, 40, 90, .4);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .4s;
}
.auth-steps li:hover { transform: translateX(8px); background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px #fff, 0 18px 36px -22px rgba(15, 40, 90, .45); }
.auth-steps .s1 { --c: linear-gradient(135deg, #2563eb, #38bdf8); --c-shadow: rgba(37, 99, 235, .7); }
.auth-steps .s2 { --c: linear-gradient(135deg, #f59e0b, #f97316); --c-shadow: rgba(245, 158, 11, .7); }
.auth-steps .s3 { --c: linear-gradient(135deg, #059669, #2dd4bf); --c-shadow: rgba(16, 185, 129, .7); }
.as-no {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 15px;
  font: 800 15px var(--display); color: #fff; background: var(--c); box-shadow: 0 12px 22px -10px var(--c-shadow);
}
.auth-steps li > div { display: flex; flex-direction: column; min-width: 0; }
.auth-steps li b { font-size: 15.5px; }
.auth-steps li > div > span { font-size: 13.5px; color: var(--ink-2); }
.auth-fine { display: flex; align-items: flex-start; gap: 8px; max-width: 540px; margin-top: 22px; font-size: 13px; color: var(--ink-3); }
.auth-fine .i { margin-top: 3px; color: var(--teal); }

.auth-side { justify-self: start; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 460px; }
.auth-card {
  position: relative; isolation: isolate; overflow: hidden; width: 100%; padding: 34px 34px 26px; border-radius: 30px;
  background: rgba(255, 255, 255, .76); backdrop-filter: blur(26px) saturate(160%); -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 44px 90px -40px rgba(15, 40, 90, .5), 0 0 0 1px rgba(255, 255, 255, .7);
}
.auth-card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--angle), rgba(37, 99, 235, 0) 0deg, rgba(37, 99, 235, .75) 70deg, rgba(14, 165, 233, .85) 130deg, rgba(20, 184, 166, .75) 190deg, rgba(245, 158, 11, .55) 250deg, rgba(37, 99, 235, 0) 320deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: border-spin 7s linear infinite;
}
.auth-card-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(14, 165, 233, .16), transparent 46%);
}
.auth-card:hover .auth-card-glow { opacity: 1; }
.auth-card-head h2 { margin-top: 14px; font-size: 27px; font-weight: 800; letter-spacing: -.015em; }
.auth-card-head p { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.auth-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--blue-2); background: var(--grad-brand-soft); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .16);
}
.auth-badge .i { color: var(--sky); }
.auth-card .alert { margin-top: 18px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.float-field { position: relative; display: block; }
.float-field > .i { position: absolute; left: 17px; top: 50%; z-index: 1; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; transition: color .2s; }
.float-field input {
  height: 60px; padding: 24px 16px 6px 50px; border-radius: 16px; background: rgba(255, 255, 255, .92);
  font: 700 17px var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.float-field > span {
  position: absolute; left: 51px; top: 50%; transform: translateY(-50%); transform-origin: left center; pointer-events: none;
  font-size: 15px; color: var(--ink-3); transition: top .22s var(--ease), transform .22s var(--ease), color .22s;
}
.float-field input:focus + span, .float-field input:not(:placeholder-shown) + span { top: 17px; transform: translateY(-50%) scale(.8); color: var(--blue); font-weight: 650; }
.float-field:focus-within > .i { color: var(--blue); }
.pin-field { display: flex; flex-direction: column; gap: 8px; }
.pin-label { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.pin-label small { font-weight: 500; color: var(--ink-4); }
.pin { position: relative; }
.pin input { height: 60px; border-radius: 16px; font: 700 20px var(--mono); letter-spacing: .5em; }
.pin-cells { display: none; }
.js .pin input {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; min-height: 0; padding: 0;
  border: 0; box-shadow: none; opacity: 0; font-size: 16px; cursor: text;
}
.js .pin-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pin-cells i {
  position: relative; height: 60px; border-radius: 16px; background: rgba(255, 255, 255, .92);
  box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .25s, transform .25s var(--ease), background .25s;
}
.pin-cells i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: var(--grad-brand); transform: scale(0); transition: transform .3s var(--spring);
}
.pin-cells i.filled { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, .4); }
.pin-cells i.filled::after { transform: scale(1); }
.pin-cells i.pop { animation: cell-pop .35s var(--ease); }
.pin:focus-within .pin-cells i.cur { background: #fff; box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px rgba(37, 99, 235, .14); transform: translateY(-2px); }
.pin:focus-within .pin-cells i.cur:not(.filled)::before {
  content: ""; position: absolute; left: 50%; top: 18px; bottom: 18px; width: 2px; margin-left: -1px; border-radius: 2px;
  background: var(--blue); animation: blink 1s steps(1) infinite;
}
.pin.full .pin-cells i { box-shadow: inset 0 0 0 1.5px rgba(16, 185, 129, .5); }
.pin.full .pin-cells i::after { background: var(--grad-emerald); }
.auth-form .btn { margin-top: 4px; }
.auth-demo {
  display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border-radius: 18px; color: var(--ink);
  background: linear-gradient(135deg, rgba(20, 184, 166, .1), rgba(14, 165, 233, .1)); box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .24);
  transition: transform .3s var(--ease), box-shadow .3s, background .3s;
}
.auth-demo:hover { color: var(--ink); transform: translateY(-2px); background: linear-gradient(135deg, rgba(20, 184, 166, .16), rgba(14, 165, 233, .14)); box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .4), 0 14px 28px -18px rgba(13, 148, 136, .6); }
.ad-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: var(--grad-emerald); box-shadow: 0 10px 18px -10px rgba(5, 150, 105, .8); }
.ad-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.ad-text b { font-size: 15px; }
.ad-text small { font-size: 12.5px; color: var(--ink-3); }
.ad-go { color: var(--teal-2); transition: transform .25s var(--ease); }
.auth-demo:hover .ad-go { transform: translateX(4px); }
.auth-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.auth-note .i { margin-top: 2px; }
.auth-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-3); }
.auth-links a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 650; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9); }
.auth-links a:hover { background: #fff; }

/* ---------------------------------------------------------------- 评委体验路径、使用说明 */

.hero-band { position: relative; padding: 24px 0 6px; text-align: center; }
.hero-band > .eyebrow {
  height: 32px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--blue-2); -webkit-background-clip: border-box; background-clip: border-box;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18), 0 8px 20px -14px rgba(37, 99, 235, .6);
}
.hero-band h1 { margin-top: 18px; font-size: clamp(30px, 4vw, 46px); line-height: 1.2; }
.hero-band h1 em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-band > .lead { max-width: 780px; margin: 14px auto 0; }

.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.demo-path { padding: 26px; overflow: hidden; }
.demo-path::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); }
.p-student { --c: linear-gradient(90deg, #1d4ed8, #0ea5e9); --c-solid: #2563eb; --c-soft: #eef4ff; }
.p-teacher { --c: linear-gradient(90deg, #0d9488, #10b981); --c-solid: #0d9488; --c-soft: #ecf9f6; }
.dp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.dp-no { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 16px; font: 800 21px var(--display); color: #fff; background: var(--c); box-shadow: 0 12px 24px -12px var(--c-solid); }
.dp-head h2 { font-size: 19px; font-weight: 800; }
.dp-head small { font-size: 13px; color: var(--ink-3); }
.timeline { list-style: none; counter-reset: tl; display: flex; flex-direction: column; }
.timeline li { counter-increment: tl; position: relative; padding: 0 0 18px 46px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.timeline li::before {
  content: counter(tl); position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font: 750 13px var(--display); color: var(--c-solid); background: #fff; box-shadow: inset 0 0 0 2px var(--c-solid), 0 0 0 4px var(--c-soft);
}
.timeline li::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 2px; width: 2px; border-radius: 2px; background: linear-gradient(var(--c-solid), transparent); opacity: .3; }
.timeline li:last-child { padding-bottom: 4px; }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; margin-bottom: 2px; font-size: 15px; color: var(--ink); }
.demo-login { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--c-soft); }
.demo-login .field { flex: 1; }
.bounds-card .card-head h3 .i { color: var(--teal); }
.bounds { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bounds li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.bounds li .i { margin-top: 3px; }
.bounds .yes { background: var(--emerald-soft); }
.bounds .yes .i { color: var(--emerald); }
.bounds .no { background: var(--red-soft); }
.bounds .no .i { color: var(--red); }
.bounds-card > .fine { margin-top: 14px; }

.guide-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; margin-top: 28px; text-align: left; }
.guide-switch > .tab-panel { flex-basis: 100%; margin-top: 10px; }
.tabs-nav.big { padding: 5px; border-radius: 16px; background: #fff; box-shadow: var(--sh-2), inset 0 0 0 1px var(--line); }
.tabs-nav.big button { height: 44px; padding: 0 22px; border-radius: 12px; font-size: 15px; }
.tabs-nav.big button.on { color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); }
.flow-map { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 10px; }
.fm-step {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 14px; overflow: hidden;
  border-radius: 18px; background: #fff; box-shadow: var(--sh-2);
}
.fm-step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.fm-step span { font: 800 13px var(--display); background: var(--c); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .06em; }
.fm-step b { font-size: 16px; }
.fm-step small { font-size: 12.5px; color: var(--ink-3); }
.fm-step.s1 { --c: linear-gradient(90deg, #1d4ed8, #0ea5e9); }
.fm-step.s2 { --c: linear-gradient(90deg, #f59e0b, #f97316); }
.fm-step.s3 { --c: linear-gradient(90deg, #059669, #14b8a6); }
.fm-step.s4 { --c: linear-gradient(90deg, #0284c7, #06b6d4); }
.fm-arrow { align-self: center; width: 20px; height: 20px; color: var(--ink-4); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.guide-card {
  position: relative; overflow: hidden; padding: 22px; border-radius: 22px; background: #fff; box-shadow: var(--sh-2);
  border: 1px solid rgba(210, 219, 231, .6); transition: transform .35s var(--ease), box-shadow .35s;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.guide-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--g-grad); }
.g-blue { --g-grad: linear-gradient(135deg, #2563eb, #38bdf8); --g-ink: #1d4ed8; --g-soft: #eaf1ff; }
.g-cobalt { --g-grad: linear-gradient(135deg, #1e3a8a, #3b82f6); --g-ink: #1e40af; --g-soft: #e8eefc; }
.g-amber { --g-grad: linear-gradient(135deg, #f59e0b, #f97316); --g-ink: #b45309; --g-soft: #fff4de; }
.g-teal { --g-grad: linear-gradient(135deg, #0d9488, #2dd4bf); --g-ink: #0f766e; --g-soft: #e3f7f3; }
.g-sky { --g-grad: linear-gradient(135deg, #0284c7, #22d3ee); --g-ink: #0369a1; --g-soft: #e6f6fe; }
.g-green { --g-grad: linear-gradient(135deg, #059669, #34d399); --g-ink: #047857; --g-soft: #e7f8f0; }
.gc-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: var(--g-grad); box-shadow: 0 12px 22px -12px var(--g-ink); }
.gc-icon .i { width: 22px; height: 22px; }
.guide-card h3 { margin: 14px 0 12px; font-size: 17px; font-weight: 800; }
.guide-card ol { list-style: none; counter-reset: gc; display: flex; flex-direction: column; gap: 9px; }
.guide-card li { counter-increment: gc; position: relative; padding-left: 30px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.guide-card li::before {
  content: counter(gc); position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 7px; text-align: center;
  font: 750 11.5px/20px var(--display); color: var(--g-ink); background: var(--g-soft);
}
.guide-card li b { color: var(--ink); }
.guide-notes {
  margin-top: 18px; padding: 20px 22px; border-radius: 22px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .06), rgba(20, 184, 166, .08)); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}
.guide-notes h3 { font-size: 16px; font-weight: 800; }
.guide-notes ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin-top: 12px; }
.guide-notes li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); }
.guide-notes li .i { margin-top: 4px; color: var(--blue); }

.error-page { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 580px; margin: 7vh auto 0; text-align: center; }
.error-code span {
  display: block; font: 800 clamp(92px, 16vw, 148px)/1 var(--display); letter-spacing: -.05em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 18px 30px rgba(37, 99, 235, .22));
}
.error-page h1 { font-size: 26px; }
.error-msg { padding: 12px 16px; border-radius: 14px; background: #fff; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); color: var(--ink-2); }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* ---------------------------------------------------------------- 学生：我的练习 */

.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.home-head h1 { margin-top: 4px; font-size: 32px; }
.home-head .lead { max-width: 660px; margin-top: 6px; }
.home-meter {
  display: flex; align-items: center; gap: 14px; flex: none; padding: 12px 20px 12px 12px; border-radius: 22px;
  background: var(--glass-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--sh-2), inset 0 0 0 1px #fff;
}
.home-meter > span { font-size: 13px; line-height: 1.5; color: var(--ink-3); }

.ring { position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 4.5; }
.ring-fg {
  fill: none; stroke: url(#g-brand); stroke-width: 4.5; stroke-linecap: round;
  stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.2s var(--ease-out);
}
.ring.in .ring-fg, .ring[data-ring] .ring-fg, html:not(.js) .ring-fg { stroke-dashoffset: calc(100 - var(--p, 0)); }
.ring > b { position: relative; display: flex; align-items: baseline; font: 800 14px var(--display); font-variant-numeric: tabular-nums; }
.ring > b small { font-size: 11px; color: var(--ink-3); font-weight: 650; }
.ring-lg { width: 78px; height: 78px; }
.ring-lg > b { font-size: 22px; }
.ring-lg .ring-bg, .ring-lg .ring-fg { stroke-width: 4; }
.ring-sm { width: 36px; height: 36px; }
.ring-sm .ring-bg, .ring-sm .ring-fg { stroke-width: 5; }

.task-hero {
  --hero: linear-gradient(135deg, #1e40af 0%, #2563eb 36%, #0ea5e9 100%);
  --hero-ink: #1d4ed8; --hero-shadow: rgba(29, 78, 216, .6);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 28px;
  padding: 32px 34px; border-radius: var(--r-xl); color: #fff; background: var(--hero);
  box-shadow: 0 34px 64px -34px var(--hero-shadow), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.task-hero.stage-update { --hero: linear-gradient(135deg, #b45309 0%, #d97706 36%, #f59e0b 100%); --hero-ink: #b45309; --hero-shadow: rgba(217, 119, 6, .6); }
.task-hero.kind-transfer, .task-hero.kind-pretest, .task-hero.kind-posttest { --hero: linear-gradient(135deg, #065f46 0%, #059669 38%, #14b8a6 100%); --hero-ink: #047857; --hero-shadow: rgba(5, 150, 105, .6); }
.task-hero.is-done { --hero: linear-gradient(135deg, #0f766e 0%, #0d9488 40%, #0ea5e9 100%); --hero-ink: #0f766e; --hero-shadow: rgba(13, 148, 136, .55); grid-template-columns: minmax(0, 1fr); }
.task-hero.is-empty { --hero: linear-gradient(135deg, #ffffff, #f1f6fd); --hero-shadow: rgba(15, 40, 90, .2); color: var(--ink); grid-template-columns: minmax(0, 1fr); box-shadow: var(--sh-2), inset 0 0 0 1px var(--line); }
.task-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 22px);
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 90%); mask-image: linear-gradient(100deg, transparent 30%, #000 90%);
}
.th-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.th-bg i { position: absolute; border-radius: 50%; }
.th-bg i:first-child { width: 440px; height: 440px; right: -130px; top: -200px; background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 66%); animation: float-a 16s ease-in-out infinite alternate; }
.th-bg i:last-child {
  width: 280px; height: 280px; left: 36%; bottom: -190px; border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 0 0 0 44px rgba(255, 255, 255, .05), 0 0 0 88px rgba(255, 255, 255, .035); animation: float-b 20s ease-in-out infinite alternate;
}
.task-hero.is-empty .th-bg i:first-child { background: radial-gradient(circle, rgba(37, 99, 235, .12), transparent 66%); }
.task-hero.is-empty .th-bg i:last-child { border-color: rgba(37, 99, 235, .12); box-shadow: 0 0 0 44px rgba(37, 99, 235, .03), 0 0 0 88px rgba(37, 99, 235, .02); }
.th-main { min-width: 0; }
.th-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); backdrop-filter: blur(6px);
}
.task-hero.is-empty .th-eyebrow { color: var(--blue-2); background: var(--blue-soft); box-shadow: none; }
.task-hero h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 16px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; line-height: 1.28; letter-spacing: -.015em; }
.th-id { padding: 3px 11px; border-radius: 10px; font: 800 .74em var(--mono); background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.th-text { max-width: 580px; margin-top: 10px; font-size: 15.5px; line-height: 1.8; color: rgba(255, 255, 255, .9); }
.task-hero.is-empty .th-text { color: var(--ink-2); }
.th-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 22px; }
.task-hero .btn { --btn-bg: #fff; color: var(--hero-ink); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .38); }
.task-hero .btn:hover { color: var(--hero-ink); box-shadow: 0 22px 36px -14px rgba(0, 0, 0, .42); }
.task-hero .btn-shine::after { background: linear-gradient(100deg, transparent, rgba(37, 99, 235, .14), transparent); }
.th-kind { font-size: 13px; color: rgba(255, 255, 255, .82); }
.th-steps {
  padding: 22px 18px 16px; border-radius: 22px; background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

.stepper { list-style: none; display: flex; align-items: flex-start; }
.step { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.step::before {
  content: ""; position: absolute; top: 15px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 3px; border-radius: 3px; background: var(--line);
}
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: var(--grad-brand); }
.step-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font: 750 13px var(--display); color: var(--ink-3); background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); transition: color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease), opacity .3s var(--ease);
  animation: pop-in .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 90ms + .2s);
}
.step-dot .i { width: 16px; height: 16px; }
.step.done .step-dot { color: #fff; background: var(--grad-brand); box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .7); }
.step.current .step-dot { color: var(--blue-2); background: #fff; animation: pop-in .5s var(--spring) both, step-pulse 2.4s var(--ease) 1s infinite; animation-delay: calc(var(--i, 0) * 90ms + .2s), 1s; }
.step-text { display: flex; flex-direction: column; line-height: 1.35; }
.step-text b { font-size: 13px; font-weight: 650; color: var(--ink-3); }
.step.done .step-text b, .step.current .step-text b { color: var(--ink); }
.step-text small { font: 600 11px var(--mono); letter-spacing: .02em; color: var(--ink-4); }
.task-hero .step::before { background: rgba(255, 255, 255, .24); }
.task-hero .step.done::before, .task-hero .step.current::before { background: rgba(255, 255, 255, .92); }
.task-hero .step-dot { color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .36); }
.task-hero .step.done .step-dot { color: var(--hero-ink); background: #fff; box-shadow: none; }
.task-hero .step.current .step-dot { color: var(--hero-ink); background: #fff; animation: pop-in .5s var(--spring) both, step-pulse-w 2.4s var(--ease) 1s infinite; animation-delay: calc(var(--i, 0) * 90ms + .2s), 1s; }
.task-hero .step-text b { color: rgba(255, 255, 255, .72); }
.task-hero .step.done .step-text b, .task-hero .step.current .step-text b { color: #fff; }
.task-hero .step-text small { color: rgba(255, 255, 255, .6); }

.notice-strip {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 20px;
  background: linear-gradient(120deg, rgba(37, 99, 235, .08), rgba(20, 184, 166, .1)); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14);
}
.ns-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); }
.ns-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ns-text b { font-size: 15px; }
.ns-text span { font-size: 13px; color: var(--ink-2); }

.u-PRE { --u1: #0284c7; --u2: #22d3ee; --u-soft: #e6f6fe; --u-ink: #0369a1; }
.u-L1 { --u1: #1d4ed8; --u2: #3b82f6; --u-soft: #eaf1ff; --u-ink: #1d4ed8; }
.u-L2 { --u1: #0d9488; --u2: #34d399; --u-soft: #e3f7f3; --u-ink: #0f766e; }
.u-L3 { --u1: #d97706; --u2: #fbbf24; --u-soft: #fff4de; --u-ink: #b45309; }
.u-L4 { --u1: #ea580c; --u2: #fb923c; --u-soft: #fff0e5; --u-ink: #c2410c; }
.u-L5 { --u1: #0891b2; --u2: #2dd4bf; --u-soft: #e4f7fb; --u-ink: #0e7490; }
.u-POST { --u1: #1e3a8a; --u2: #0ea5e9; --u-soft: #e8eefc; --u-ink: #1e40af; }
.uc-badge {
  display: inline-flex; align-items: center; flex: none; height: 28px; padding: 0 12px; border-radius: 9px; white-space: nowrap;
  font-size: 13.5px; font-weight: 750; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, var(--u1, #1d4ed8), var(--u2, #0ea5e9)); box-shadow: 0 8px 16px -10px var(--u1, #1d4ed8);
}
.uc-badge.sm { height: 24px; padding: 0 9px; margin-right: 8px; border-radius: 8px; font-size: 12px; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.unit-card {
  position: relative; overflow: hidden; padding: 20px 18px 12px; border-radius: var(--r-lg); background: #fff;
  border: 1px solid rgba(210, 219, 231, .6); box-shadow: var(--sh-2); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.unit-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--u1, #1d4ed8), var(--u2, #0ea5e9)); }
.unit-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.uc-head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.uc-weeks { font-size: 12.5px; color: var(--ink-3); }
.uc-head .pill { margin-left: auto; }
.uc-bar { height: 6px; margin: 14px 2px 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.uc-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--u1, #1d4ed8), var(--u2, #0ea5e9)); animation: grow-w 1.3s var(--ease-out) .35s both; }
.uc-items { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.uc-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--ink); transition: background .2s, transform .25s var(--ease); }
a.uc-row:hover { color: var(--ink); background: var(--u-soft, var(--blue-soft)); transform: translateX(3px); }
.uc-id {
  display: inline-grid; place-items: center; flex: none; min-width: 48px; height: 30px; padding: 0 8px; border-radius: 9px;
  font: 700 12.5px var(--mono); color: var(--ink-2); background: var(--surface-3);
}
.st-initial .uc-id { color: var(--blue-2); background: var(--blue-soft); }
.st-update .uc-id { color: var(--amber-2); background: var(--amber-soft); }
.st-answer .uc-id { color: var(--teal-2); background: var(--teal-soft); }
.st-done .uc-id { color: #fff; background: var(--grad-emerald); }
.uc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.uc-title b { overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.uc-title small { font-size: 12px; color: var(--ink-3); }
.uc-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-3); white-space: nowrap; }
.st-initial .uc-state { color: var(--blue-2); }
.st-update .uc-state { color: var(--amber-2); }
.st-answer .uc-state { color: var(--teal-2); }
.st-done .uc-state { color: var(--emerald-2); }
.st-initial .uc-state::before, .st-update .uc-state::before, .st-answer .uc-state::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink-dot 1.6s infinite;
}
.uc-go { color: var(--ink-4); transition: transform .25s var(--ease), color .2s; }
a.uc-row:hover .uc-go { color: var(--u-ink, var(--blue-2)); transform: translateX(3px); }
.uc-row.is-locked { opacity: .62; }
.uc-lock { color: var(--ink-4); }
.unit-closed {
  display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px; border-radius: 18px;
  border: 1.5px dashed var(--line-2); background: rgba(255, 255, 255, .55); color: var(--ink-2);
}
.ucl-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; color: var(--ink-3); background: var(--surface-3); }
.unit-closed p { display: flex; flex-direction: column; font-size: 13.5px; }
.unit-closed b { font-size: 14.5px; color: var(--ink); }
.recent-list { list-style: none; padding: 6px 10px; }
.recent-list li { display: flex; align-items: center; gap: 14px; padding: 12px 6px; }
.recent-list li + li { border-top: 1px dashed var(--line); }
.seal-dot { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: var(--cyan-2); background: var(--cyan-soft); }
.recent-list .rl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent-list .rl-main b { font-size: 14.5px; }
.recent-list .rl-main small { font-size: 12.5px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 学生：题目页 */

.case-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 520px); align-items: end; gap: 18px 32px; }
.case-heading { min-width: 0; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.case-heading h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: clamp(24px, 2.4vw, 32px); }
.ch-id { padding: 3px 10px; border-radius: 10px; font: 800 .7em var(--mono); color: var(--blue-2); background: var(--blue-soft); }
.case-steps {
  padding: 16px 16px 12px; border-radius: 22px; background: var(--glass-strong);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--sh-2), inset 0 0 0 1px #fff;
}
.now-bar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 22px;
  background: linear-gradient(120deg, var(--nb-soft, #eaf1ff), rgba(255, 255, 255, .92) 72%);
  box-shadow: inset 0 0 0 1px var(--nb-line, rgba(37, 99, 235, .18)), var(--sh-1);
}
.nb-icon {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 16px; color: #fff;
  background: var(--nb-grad, var(--grad-brand)); box-shadow: 0 12px 22px -10px var(--nb-shadow, rgba(37, 99, 235, .7));
}
.nb-icon .i { width: 22px; height: 22px; }
.nb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nb-text b { font-size: 17px; font-weight: 800; color: var(--nb-ink, var(--blue-2)); }
.nb-text span { font-size: 14px; color: var(--ink-2); }
.nb-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 44%; }
.nb-meta span {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: rgba(255, 255, 255, .88); box-shadow: inset 0 0 0 1px var(--line);
}
.nb-meta .i { width: 14px; height: 14px; color: var(--nb-ink, var(--blue)); }
/* 题目页右下角有常驻陪练形象，页宽随窗口收放，尽量不压住作答区 */
.page-case .page { max-width: clamp(1200px, calc(100vw - 268px), 1320px); }
.page-case.stage-update { --nb-soft: #fff4de; --nb-line: rgba(245, 158, 11, .32); --nb-grad: var(--grad-amber); --nb-shadow: rgba(245, 158, 11, .7); --nb-ink: #b45309; }
.page-case.stage-answer { --nb-soft: #e7f8f0; --nb-line: rgba(16, 185, 129, .28); --nb-grad: var(--grad-emerald); --nb-shadow: rgba(16, 185, 129, .7); --nb-ink: #047857; }
.page-case.stage-done { --nb-soft: #e3f7f3; --nb-line: rgba(20, 184, 166, .28); --nb-grad: linear-gradient(135deg, #0d9488, #0ea5e9); --nb-shadow: rgba(13, 148, 136, .7); --nb-ink: #0f766e; }

.mtabs { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 24px; }
.materials {
  position: sticky; top: calc(var(--top) + 16px); max-height: calc(100vh - var(--top) - 32px); max-height: calc(100dvh - var(--top) - 32px);
  overflow-y: auto; overscroll-behavior: contain; border-radius: 24px; background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--sh-2), inset 0 0 0 1px #fff;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.mat-inner { padding: 0 22px 22px; }
.mat-inner > * + * { margin-top: 24px; }
.mat-toc {
  position: sticky; top: 0; z-index: 3; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -22px; padding: 14px 22px 12px; background: linear-gradient(rgba(255, 255, 255, .97) 76%, rgba(255, 255, 255, 0));
}
.mat-toc::-webkit-scrollbar { display: none; }
.mat-toc a {
  display: inline-flex; align-items: center; flex: none; height: 32px; padding: 0 13px; border-radius: 10px;
  font-size: 13px; font-weight: 650; color: var(--ink-3); background: var(--surface-3); transition: background .2s, color .2s, box-shadow .2s;
}
.mat-toc a:hover { color: var(--ink); background: #e5ecf5; }
.mat-toc a.on { color: #fff; background: var(--grad-brand); box-shadow: 0 6px 14px -8px rgba(37, 99, 235, .8); }
.mat-toc a.toc-new { color: var(--amber-2); background: var(--amber-soft); }
.mat-toc a.toc-new::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; animation: blink-dot 1.6s infinite; }
.mat-toc a.toc-new.on { color: #fff; background: var(--grad-amber); box-shadow: 0 6px 14px -8px rgba(245, 158, 11, .8); }
.mat-sec { scroll-margin-top: 70px; }
.mat-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mat-h h3 { font-size: 16.5px; font-weight: 800; }
.mat-h .pill, .mat-h > .muted { margin-left: auto; }
.mh-no { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; font: 800 13px var(--display); color: var(--blue-2); background: var(--blue-soft); }
.update-pack .mh-no { color: #fff; background: var(--grad-amber); }
.update-pack { padding: 16px; margin-top: 4px; border-radius: 20px; background: linear-gradient(160deg, #fff7e8, rgba(255, 255, 255, .6)); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .3); }
.update-pack[data-fresh] { animation: fresh-glow 2.2s var(--ease) .8s 2; }
.update-pack .fact { animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 100ms + .2s); }
.update-pack .fact + .fact { margin-top: 8px; }
.scenario { font-size: 15px; line-height: 1.95; white-space: pre-line; }
details.rules { border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
details.rules > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; cursor: pointer; list-style: none; }
details.rules > summary::-webkit-details-marker { display: none; }
details.rules > summary:hover { background: rgba(255, 255, 255, .7); }
details.rules > summary h3 { flex: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; font-size: 16px; font-weight: 800; }
details.rules > summary h3 small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
details.rules > summary > .i { color: var(--ink-3); transition: transform .3s var(--ease); }
details.rules[open] > summary > .i { transform: rotate(90deg); }
.rule-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px 40px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.rule-list li::marker { color: var(--blue); font-weight: 700; }
.facts { display: flex; flex-direction: column; gap: 8px; }
.fact {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 70px;
  transition: box-shadow .25s, background .25s, transform .3s var(--ease);
}
.fact p { font-size: 14.5px; line-height: 1.8; }
.fact-id {
  display: inline-grid; place-items: center; flex: none; min-width: 34px; height: 26px; margin-top: 1px; padding: 0 7px; border-radius: 8px;
  font: 800 12.5px var(--mono); color: var(--blue-2); background: var(--blue-soft);
}
.fact.update { background: #fff; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .32); }
.fact.update .fact-id { color: #fff; background: var(--grad-amber); }
.fact.hl { background: #f3f8ff; box-shadow: inset 0 0 0 2px var(--blue), 0 10px 22px -12px rgba(37, 99, 235, .55); transform: translateX(4px); }
.fact.update.hl { background: #fffaf0; box-shadow: inset 0 0 0 2px var(--amber), 0 10px 22px -12px rgba(245, 158, 11, .55); }
.fact.flash, .mat-sec.flash { animation: fresh-glow 1.2s var(--ease) 2; }
.update-task { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--amber-2); background: rgba(255, 244, 222, .9); }
.update-task .i { margin-top: 3px; }
.options { display: grid; gap: 8px; }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.option p { font-size: 14.5px; line-height: 1.8; }
.opt-id {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px;
  font: 800 14px var(--display); color: #fff; background: var(--grad-brand); box-shadow: 0 6px 12px -6px rgba(37, 99, 235, .7);
}
.option:nth-child(2) .opt-id { background: linear-gradient(135deg, #0d9488, #34d399); box-shadow: 0 6px 12px -6px rgba(13, 148, 136, .7); }
.option:nth-child(3) .opt-id { background: var(--grad-amber); box-shadow: 0 6px 12px -6px rgba(245, 158, 11, .7); }
.option:nth-child(4) .opt-id { background: linear-gradient(135deg, #0284c7, #22d3ee); box-shadow: 0 6px 12px -6px rgba(2, 132, 199, .7); }
.mat-sec > .fine { margin-top: 10px; }
.constraints { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.constraints li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 13px; font-size: 14px; font-weight: 550; background: var(--coral-soft); box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .18); }
.constraints .i { margin-top: 3px; color: var(--coral); }
.task-list { list-style: none; counter-reset: task; display: flex; flex-direction: column; gap: 8px; }
.task-list li { counter-increment: task; position: relative; display: flex; flex-direction: column; padding: 11px 14px 11px 48px; border-radius: 13px; background: var(--surface-2); }
.task-list li::before {
  content: counter(task); position: absolute; left: 14px; top: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  font: 800 12px var(--display); color: var(--blue-2); background: #fff; box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .25);
}
.task-list b { font-size: 14.5px; }
.task-list span { font-size: 13.5px; color: var(--ink-2); }
.locked-pack {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1.5px dashed rgba(245, 158, 11, .45);
  background: repeating-linear-gradient(135deg, rgba(255, 244, 222, .7) 0 10px, rgba(255, 255, 255, .7) 10px 20px);
}
.lock-orb { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: var(--grad-amber); animation: orb 3s ease-in-out infinite; }
.locked-pack b { font-size: 15px; }
.locked-pack p { font-size: 13.5px; color: var(--ink-2); }
.mat-foot { padding-top: 12px; border-top: 1px dashed var(--line); }

.work { min-width: 0; }
.work > * + * { margin-top: 18px; }
.answer-form > * + * { margin-top: 16px; }
.form-intro { padding: 2px 4px; }
.form-intro h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.form-intro p { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.form-block {
  position: relative; padding: 22px 24px; border-radius: var(--r-lg); background: #fff; scroll-margin-top: calc(var(--top) + 24px);
  border: 1px solid rgba(210, 219, 231, .6); box-shadow: var(--sh-2); transition: box-shadow .3s var(--ease), border-color .3s;
}
.form-block:focus-within { border-color: rgba(37, 99, 235, .35); box-shadow: 0 0 0 4px rgba(37, 99, 235, .07), var(--sh-2); }
.form-block.has-error { border-color: rgba(239, 68, 68, .5); box-shadow: 0 0 0 4px rgba(239, 68, 68, .07), var(--sh-2); }
.form-block.flash, .q-item.flash, .reveal-when.flash, .field.flash { animation: fresh-glow 1.2s var(--ease) 2; }
input.flash, textarea.flash { animation: fresh-glow 1.2s var(--ease) 1; }
.blk-head { display: flex; align-items: center; gap: 12px; }
.blk-head h3 { font-size: 17px; font-weight: 800; }
.blk-no {
  position: relative; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 11px;
  font: 800 14px var(--display); color: var(--blue-2); background: var(--blue-soft); transition: background .3s, color .3s, box-shadow .3s;
}
.blk-no em { font-style: normal; transition: opacity .2s, transform .35s var(--spring); }
.blk-no .i { position: absolute; width: 17px; height: 17px; opacity: 0; transform: scale(.3); transition: opacity .2s, transform .4s var(--spring); }
.form-block.complete .blk-no { color: #fff; background: var(--grad-emerald); box-shadow: 0 8px 16px -8px rgba(16, 185, 129, .8); }
.form-block.complete .blk-no em { opacity: 0; transform: scale(.3); }
.form-block.complete .blk-no .i { opacity: 1; transform: none; }
.hint { margin: 8px 0 14px 44px; font-size: 13.5px; line-height: 1.7; color: var(--ink-3); }
.hint b { color: var(--ink); }
.form-block textarea { background: var(--surface-2); border-color: var(--line); }
.form-block textarea:focus { background: #fff; border-color: var(--blue); }
.form-block > .field-label { margin: 2px 0 8px; }
.field-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; margin-top: 6px; }
.refs-live { display: flex; flex-wrap: wrap; gap: 4px; }
.count { margin-left: auto; font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.count.ok { color: var(--emerald-2); }
.count.short { color: var(--amber-2); }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.decisions { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
/* 三张决定卡并排时栏宽较窄：图标一行，说明文字占满卡片宽度 */
.decisions .choice-card { flex-wrap: wrap; gap: 10px 12px; }
.decisions .choice-check { order: 1; margin-left: auto; }
.decisions .choice-text { order: 2; flex-basis: 100%; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card {
  display: flex; align-items: flex-start; gap: 12px; height: 100%; padding: 14px; border-radius: 16px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .25s, box-shadow .25s, transform .25s var(--ease);
}
.choice.extra .choice-card { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); background-image: repeating-linear-gradient(135deg, rgba(238, 243, 249, .8) 0 8px, transparent 8px 16px); }
.choice:hover .choice-card { background-color: #fff; box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, .35), 0 10px 20px -14px rgba(37, 99, 235, .45); transform: translateY(-1px); }
.choice input:checked + .choice-card { background: linear-gradient(135deg, #f1f6ff, #eefaf8); box-shadow: inset 0 0 0 2px var(--blue), 0 14px 26px -16px rgba(37, 99, 235, .6); }
.choice input:focus-visible + .choice-card { outline: 2px solid var(--blue); outline-offset: 2px; }
.choice-id {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px;
  font: 800 14px var(--display); color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); transition: color .25s, background .25s, box-shadow .25s, transform .25s, opacity .25s;
}
.choice-id .i { width: 16px; height: 16px; }
.choice input:checked + .choice-card .choice-id { color: #fff; background: var(--grad-brand); box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .7); }
.choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.55; }
.choice-text b { font-size: 14.5px; font-weight: 700; }
.choice-text small { margin-top: 3px; font-size: 12.5px; line-height: 1.65; color: var(--ink-3); }
.choice-check { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: #fff; background: var(--blue); opacity: 0; transform: scale(.3); transition: opacity .2s, transform .4s var(--spring); }
.choice input:checked + .choice-card .choice-check { opacity: 1; transform: none; }
.reveal-when { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ease), opacity .3s, margin .45s var(--ease); }
.reveal-when.shown, html:not(.js) .reveal-when { grid-template-rows: 1fr; opacity: 1; margin-bottom: 14px; }
.declare .reveal-when.shown { margin: 10px 0 0; }
.rw-inner { display: flex; flex-direction: column; gap: 6px; min-height: 0; margin: -4px; padding: 4px; overflow: hidden; }
.q-item {
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; scroll-margin-top: calc(var(--top) + 24px);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.q-item + .q-item { margin-top: 10px; }
.q-item.has-error { background: #fff8f8; box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, .45); }
.q-item textarea { background: #fff; }
.q-head { display: flex; align-items: flex-start; gap: 10px; }
.q-head p { flex: 1; font-size: 14.5px; font-weight: 550; line-height: 1.75; }
.qid {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 8px;
  font: 800 12.5px var(--mono); color: #fff; background: linear-gradient(135deg, #0284c7, #0ea5e9);
}
.qid small { font: 650 10.5px var(--sans); opacity: .9; }
.calc-input { font-family: var(--mono); font-size: 13.5px; }
.declare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.field-wide { grid-column: 1 / -1; }
.minutes { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.minutes input { flex: none; width: 120px; }
.timer { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--ink-3); background: var(--surface-3); }
.timer b { color: var(--blue-2); font-variant-numeric: tabular-nums; }
.note-brass { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; line-height: 1.65; color: var(--coral-2); background: var(--coral-soft); }
.note-brass .i { margin-top: 3px; }
.submit-bar {
  position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px;
  padding: 12px 12px 12px 16px; border-radius: 22px; background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 22px 50px -22px rgba(15, 40, 90, .42), inset 0 0 0 1px rgba(210, 219, 231, .85);
}
.sb-progress { display: flex; align-items: center; gap: 10px; }
.sb-count { display: flex; align-items: baseline; gap: 2px; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sb-count b { font: 800 19px var(--display); color: var(--ink); }
.sb-count small { margin-left: 6px; font-size: 12.5px; }
.autosave { flex: 1; min-width: 150px; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.autosave::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); transition: background .3s, box-shadow .3s; }
.autosave.saving::before { background: var(--amber); animation: blink-dot .9s infinite; }
.autosave.saved::before { background: var(--emerald); box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.autosave.offline { color: var(--red-2); }
.autosave.offline::before { background: var(--red); box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.demo-fill { display: flex; flex-wrap: wrap; gap: 6px; }
.submit-bar [data-submit] { margin-left: auto; }
.answer-form.is-ready [data-submit] { animation: ready-pulse 1.8s var(--ease) 3; }

.update-notice {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px;
  background: linear-gradient(120deg, #fff4de, #fff 82%); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .34), var(--sh-1);
}
.un-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: var(--grad-amber); box-shadow: 0 12px 22px -10px rgba(245, 158, 11, .75); }
.update-notice > div { flex: 1; min-width: 0; }
.update-notice b { font-size: 15.5px; color: var(--amber-2); }
.update-notice p { margin-top: 2px; font-size: 13.5px; color: var(--ink-2); }
.follow-card { position: relative; overflow: hidden; padding: 22px 24px 18px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-2); }
.follow-card::before {
  content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, #f59e0b, #f97316 38%, #0ea5e9 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.fc-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--amber-2); background: var(--amber-soft); }
.follow-q { position: relative; margin-top: 14px; padding-left: 18px; font-size: 17px; font-weight: 650; line-height: 1.75; }
.follow-q::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: var(--grad-amber); }
.fc-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fc-foot .fine { flex: 1; min-width: 200px; }

.next-card {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r-lg);
  color: #fff; background: linear-gradient(135deg, #065f46, #059669 40%, #14b8a6); box-shadow: 0 26px 46px -26px rgba(5, 150, 105, .8);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.next-card::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1; pointer-events: none; transform: skewX(-18deg);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); animation: shine 4.5s var(--ease) 2s infinite;
}
.next-card:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 32px 54px -26px rgba(5, 150, 105, .9); }
.unlock-icon { position: relative; display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 18px; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36); }
.unlock-icon .i { position: absolute; width: 24px; height: 24px; }
.ic-lock { opacity: 0; }
.next-card[data-fresh] .ic-lock { animation: lock-out 1.7s var(--ease) .6s both; }
.next-card[data-fresh] .ic-unlock { animation: unlock-in 1.7s var(--ease) .6s both; }
.next-card[data-fresh] .unlock-icon { animation: unlock-ring 1.2s var(--ease) 1.6s both; }
.nc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nc-text small { font-size: 12.5px; letter-spacing: .03em; color: rgba(255, 255, 255, .82); }
.nc-text b { font-size: 18px; font-weight: 800; }
.nc-go { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 42px; padding: 0 16px; border-radius: 13px; font-size: 14px; font-weight: 700; color: #047857; background: #fff; transition: gap .25s var(--ease); }
.next-card:hover .nc-go { gap: 10px; }
.done-card { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 20px 22px; border-radius: var(--r-lg); background: linear-gradient(120deg, #e7f8f0, #fff 76%); box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .28), var(--sh-1); }
.done-mark { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: var(--grad-emerald); box-shadow: 0 0 0 7px rgba(16, 185, 129, .14), 0 12px 24px -10px rgba(16, 185, 129, .75); }
.done-mark .i { width: 26px; height: 26px; }
.done-card > div { flex: 1; min-width: 220px; }
.done-card b { font-size: 16.5px; }
.done-card p { font-size: 13.5px; color: var(--ink-2); }
.work-title { display: flex; align-items: center; gap: 10px; padding-top: 6px; font-size: 19px; font-weight: 800; }
.work-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad-brand); }
.restart { display: flex; justify-content: center; }

.sealed { position: relative; overflow: hidden; border-radius: var(--r-lg); background: #fff; border: 1px solid rgba(210, 219, 231, .6); box-shadow: var(--sh-2); scroll-margin-top: calc(var(--top) + 20px); }
.sealed.flash { animation: fresh-glow 1.2s var(--ease) 2; }
.sealed-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; transition: background .2s; }
.sealed-head:hover { background: var(--surface-2); }
.seal-mini { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: var(--grad-cyan); box-shadow: 0 8px 16px -8px rgba(6, 182, 212, .8); }
.seal-mini::after { content: ""; position: absolute; inset: -4px; border-radius: 16px; border: 1.5px dashed rgba(6, 182, 212, .45); }
.sealed-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sealed-title h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 16px; font-weight: 800; }
.sealed-title code { font-size: 11px; }
.sealed-toggle {
  display: inline-flex; align-items: center; gap: 4px; flex: none; height: 32px; padding: 0 8px 0 12px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2); background: var(--surface-3); transition: background .2s, color .2s;
}
.sealed-head:hover .sealed-toggle { color: var(--blue-2); background: var(--blue-soft); }
.sealed-toggle .chev { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.st-open { display: none; }
.sealed.is-open .st-open { display: inline; }
.sealed.is-open .st-closed { display: none; }
.sealed.is-open .sealed-toggle .chev { transform: rotate(90deg); }
.sealed > .checks, .sealed > .checks-held, .sealed > .review-card { margin: 0 18px 16px; }
.sealed-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.sealed.is-open .sealed-body { grid-template-rows: 1fr; }
.sealed-inner { min-height: 0; overflow: hidden; padding: 0 18px; }
.sealed-inner > * + * { margin-top: 14px; }
.sealed-inner > :last-child { margin-bottom: 18px; }
.sealed-sub { display: flex; align-items: center; gap: 10px; padding-top: 4px; font-size: 12.5px; font-weight: 750; letter-spacing: .06em; color: var(--ink-3); }
.sealed-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.checks-held {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; font-size: 13.5px; color: var(--ink-2);
  background: repeating-linear-gradient(135deg, #f7f9fc 0 10px, #fff 10px 20px); box-shadow: inset 0 0 0 1px var(--line);
}
.checks-held > .i { margin-top: 3px; color: var(--amber); }
.checks-held b { display: block; font-size: 14.5px; color: var(--ink); }

.checks { padding: 16px 18px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.checks.just-done { animation: fresh-glow 1.6s var(--ease) 1; }
.checks-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.checks-head h4 { flex: 1; font-size: 15.5px; font-weight: 800; }
.ck-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #0284c7, #0ea5e9); }
.ck-icon .i { width: 17px; height: 17px; }
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check {
  position: relative; overflow: hidden; padding: 14px 16px 14px 20px; border-radius: 14px; background: #fff;
  box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.check::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone-fill, var(--line-2)); }
.check.needs-review { box-shadow: var(--sh-1), inset 0 0 0 1.5px rgba(249, 115, 22, .4); }
.check > header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.check-q { margin-top: 8px; font-size: 14px; font-weight: 550; line-height: 1.7; }
.check-answer, .formula { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: var(--surface-2); }
.formula { background: linear-gradient(120deg, #eef6ff, #effaf8); }
.k { padding-top: 1px; font-size: 12px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.calc { font-family: var(--mono); font-size: 13px; color: var(--ink-2); word-break: break-word; }
.check-fb { margin-top: 10px; font-size: 14px; line-height: 1.75; }
.teacher-note { padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); }
.teacher-note b { display: block; margin-bottom: 2px; font-size: 12px; color: var(--blue-2); }
.basis { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.check-trace { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.check-trace > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px; font-size: 12px; color: var(--ink-2); background: var(--surface-3); }
.check-trace b { color: var(--ink); }
.check-trace .key-answer { color: var(--emerald-2); background: var(--emerald-soft); }
.confirm-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.confirm-form .seg { flex-wrap: wrap; }
.confirm-form .seg span { white-space: nowrap; }
.input-sm { flex: 1; min-width: 160px; width: auto; min-height: 34px; height: 34px; padding: 4px 10px; border-radius: 10px; font-size: 13px; }
.issues { margin-top: 14px; }
.issues h5 { margin-bottom: 8px; }
.issue {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.issue + .issue { margin-top: 6px; }
.issue > div { flex: 1; min-width: 0; }
.issue q { display: block; margin-bottom: 2px; color: var(--ink-3); }
.issue .basis { display: inline-flex; margin: 0 0 0 6px; }
.check-retry { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--amber-soft); }
.check-retry p { flex: 1; min-width: 200px; }
.checks > .fine, .checks > .muted { margin-top: 12px; }

.review-card { position: relative; padding: 18px 20px; border-radius: 18px; background: linear-gradient(135deg, #f3f7ff, #effbf8); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14); }
.review-card > header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; }
.review-card > header h4 { font-size: 15.5px; font-weight: 800; }
.review-card > header .muted { margin-left: auto; }
.rc-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: var(--grad-brand); }
.rc-icon .i { width: 16px; height: 16px; }
.review-dims { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.review-dims li {
  display: grid; grid-template-columns: 96px 88px minmax(0, 1fr); align-items: start; gap: 4px 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .85); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.rd-dim { padding-top: 2px; font-size: 13.5px; font-weight: 700; }
.review-dims li > :nth-child(2) { justify-self: start; }
.review-dims q, .review-dims p { grid-column: 3; }
.review-dims q { display: block; padding-left: 10px; border-left: 3px solid rgba(37, 99, 235, .3); font-size: 13.5px; }
.review-dims p { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.review-next, .review-q { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .85); }
.review-next b, .review-q b { font-size: 13px; color: var(--blue-2); }
.review-next ol { margin-top: 4px; padding-left: 20px; font-size: 14px; }
.review-q p { margin-top: 2px; font-size: 14px; }
.review-card > .fine { margin-top: 10px; }

.draft-body { display: flex; flex-direction: column; gap: 14px; }
.draft-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, #eef4ff, #effaf8); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14); }
.dc-label { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--blue-2); background: #fff; }
.draft-choice b { font-size: 15px; }
.dc-path { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.dc-path .i { width: 15px; height: 15px; color: var(--blue); }
.dc-note { flex-basis: 100%; font-size: 13.5px; color: var(--ink-2); }
.draft-field h4 { margin-bottom: 4px; font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--ink-3); }
.draft-field p { font-size: 14.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.draft-q { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.draft-q + .draft-q { border-top: 1px dashed var(--line); }
.draft-q > div { flex: 1; min-width: 0; }
.draft-q .calc { margin-top: 4px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 0; }
.meta-grid div { padding: 9px 12px; border-radius: 10px; background: var(--surface-2); }
.meta-grid dt { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); }
.meta-grid dd { margin: 2px 0 0; font-size: 13px; word-break: break-all; }

.survey { padding: 0; overflow: hidden; scroll-margin-top: calc(var(--top) + 20px); }
.survey.flash { animation: fresh-glow 1.2s var(--ease) 2; }
.survey > summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; transition: background .2s; }
.survey > summary::-webkit-details-marker { display: none; }
.survey > summary:hover { background: var(--surface-2); }
.sv-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #0d9488, #34d399); }
.sv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sv-title b { font-size: 15.5px; }
.sv-title small { font-size: 12.5px; color: var(--ink-3); }
.survey .chev { color: var(--ink-3); transition: transform .3s var(--ease); }
.survey[open] .chev { transform: rotate(90deg); }
.survey > form { padding: 4px 20px 20px; }
.sv-item { margin: 0; padding: 0; border: 0; min-width: 0; }
.sv-item legend { margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 650; }
.scale { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.scale small { font-size: 12px; color: var(--ink-3); }
.scale label { position: relative; }
.scale input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.scale span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-weight: 750; color: var(--ink-2); background: var(--surface-3); cursor: pointer; transition: color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease), opacity .25s var(--ease); }
.scale label:hover span { background: #e3eaf4; }
.scale input:checked + span { color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); transform: translateY(-2px); }
.scale input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------------------------------------------------------------- 陪练 */

.chat-scrim { display: none; }
.chat {
  --ap-w: 440px;
  position: fixed; z-index: 45; right: 20px; top: calc(var(--top) + 14px); bottom: 20px; width: min(var(--ap-w), calc(100vw - 40px));
  display: flex; flex-direction: column; overflow: hidden; outline: none; border-radius: 26px; background: #fff;
  box-shadow: 0 44px 96px -32px rgba(15, 40, 90, .55), inset 0 0 0 1px rgba(210, 219, 231, .85);
  transform: translateX(calc(100% + 40px)); visibility: hidden; transition: transform .55s var(--ease-out), visibility 0s linear .55s;
}
.chat-open .chat { transform: none; visibility: visible; transition: transform .55s var(--ease-out), visibility 0s; }
.chat-mode { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--blue-2); background: var(--blue-soft); }
.chat.mode-coach .chat-mode { color: var(--amber-2); background: var(--amber-soft); }
.chat.mode-review .chat-mode { color: var(--emerald-2); background: var(--emerald-soft); }
.chat.mode-locked .chat-mode { color: var(--ink-2); background: var(--surface-3); }
.chat-notice { display: flex; align-items: flex-start; gap: 8px; margin: 12px 14px 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.6; color: var(--blue-3); background: var(--blue-soft); }
.chat-notice .i { margin-top: 2px; }
.chat.mode-coach .chat-notice { color: var(--amber-2); background: var(--amber-soft); }
.chat.mode-review .chat-notice { color: var(--emerald-2); background: var(--emerald-soft); }
.chat.mode-locked .chat-notice { color: var(--coral-2); background: var(--coral-soft); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.msg { display: flex; flex-direction: column; max-width: 88%; animation: msg-in .35s var(--ease-out) both; }
.msg p { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.75; word-break: break-word; }
.msg time { margin-top: 4px; padding: 0 4px; font-size: 11px; color: var(--ink-4); }
.msg-me { align-self: flex-end; align-items: flex-end; }
.msg-me p { color: #fff; background: var(--grad-brand); border-bottom-right-radius: 6px; box-shadow: 0 10px 20px -12px rgba(37, 99, 235, .75); }
.msg-me .ref { color: #fff; background: rgba(255, 255, 255, .22); }
.msg-me.unsent p { opacity: .6; }
.msg-me.unsent time::after { content: " · 未送达"; color: var(--red-2); }
.msg-bot { align-self: flex-start; }
.msg-bot p { color: var(--ink); background: #fff; border-bottom-left-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.msg-bot.refused p { background: var(--coral-soft); box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .24); }
.msg-bot.error p { color: var(--red-2); background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .24); }
.msg-follow { align-self: stretch; max-width: none; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, #fff4de, #fff); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .3); }
.msg-follow p { margin-top: 6px; padding: 0; font-weight: 600; }
.msg-tag { align-self: flex-start; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--grad-amber); }
.msg p.typing { display: inline-flex; align-items: center; gap: 4px; min-height: 42px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); animation: dots 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.caret::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--blue); animation: blink 1s steps(1) infinite; }
.slow-note { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.chat-empty { margin-top: auto; padding: 4px; }
.chat-empty > p { margin-bottom: 8px; font-size: 12.5px; color: var(--ink-3); }
.chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.chips button { padding: 8px 12px; border: 0; border-radius: 12px; text-align: left; font-size: 13px; color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease), opacity .25s var(--ease); }
.chips button:hover { color: var(--blue-2); background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .4); transform: translateX(3px); }
.chat-input { display: flex; align-items: flex-end; gap: 8px; margin: 0 14px; padding: 7px 7px 7px 14px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s; }
.chat-input:focus-within { box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 0 4px rgba(37, 99, 235, .1); }
.chat-input.flash { animation: shake-x .45s var(--ease); }
.chat-input textarea { flex: 1; min-height: 40px; max-height: 140px; padding: 8px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; resize: none; font-size: 14px; line-height: 1.6; }
.chat-input textarea:focus { box-shadow: none; }
.btn-send { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 13px; color: #fff; background: var(--grad-brand); cursor: pointer; box-shadow: 0 8px 16px -8px rgba(37, 99, 235, .7); transition: transform .25s var(--spring), opacity .2s; }
.btn-send:hover { transform: scale(1.06) rotate(-8deg); }
.btn-send:disabled { opacity: .45; cursor: default; transform: none; }
.btn-send .i { width: 18px; height: 18px; }
.chat.busy .btn-send .i { animation: blink-dot .8s infinite; }
.chat-foot { padding: 8px 14px 14px; font-size: 11.5px; text-align: center; color: var(--ink-4); }

/* ---------------------------------------------------------------- 封存动画 */

.seal-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; cursor: pointer; background: rgba(243, 246, 251, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .3s both; }
.seal-overlay.out { opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
.seal-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.seal-stage::before { content: ""; position: absolute; top: 0; left: 50%; width: 220px; height: 220px; margin-left: -110px; border-radius: 50%; border: 3px solid var(--sky); opacity: 0; animation: ink 1s var(--ease) .6s both; }
.seal { width: 220px; height: 220px; overflow: visible; filter: drop-shadow(0 24px 40px rgba(37, 99, 235, .32)); animation: stamp .95s var(--spring) .1s both; }
.seal-o { fill: none; stroke: url(#g-brand); stroke-width: 5; }
.seal-i { fill: none; stroke: url(#g-brand); stroke-width: 1.4; stroke-dasharray: 2 4; }
.seal-core { fill: url(#g-brand); }
.seal-ring-text { fill: #1d4ed8; font: 700 13px var(--sans); letter-spacing: 3px; }
.seal-label { fill: #fff; font: 800 24px var(--display); letter-spacing: 2px; }
.seal-date { fill: rgba(255, 255, 255, .86); font: 600 11px var(--mono); letter-spacing: 1px; }
.seal-caption { display: flex; flex-direction: column; gap: 2px; animation: rise .5s var(--ease-out) .9s both; }
.seal-caption b { font-size: 21px; font-weight: 800; }
.seal-caption span { font: 12.5px var(--mono); color: var(--ink-3); }
.seal-next { padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--teal-2); background: #fff; box-shadow: var(--sh-2); animation: rise .5s var(--ease-out) 1.15s both; }

/* ---------------------------------------------------------------- 学习记录 */

.record-case {
  padding: 22px 24px; border-radius: 24px; background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--sh-2), inset 0 0 0 1px #fff;
}
.rc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rc-id { display: grid; place-items: center; flex: none; min-width: 62px; height: 46px; padding: 0 12px; border-radius: 15px; font: 800 15px var(--mono); color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); }
.rc-title { flex: 1; min-width: 0; }
.rc-title h2 { font-size: 18px; font-weight: 800; }
.rc-attempt + .rc-attempt { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.rc-attempt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px; }
.rc-attempt-head b { font-size: 14.5px; }
.rc-drafts { display: flex; flex-direction: column; gap: 10px; }

/* ---------------------------------------------------------------- 教师工作台框架 */

.t-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.t-side {
  position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; gap: 18px; height: 100vh; height: 100dvh; padding: 20px 16px 16px; overflow-y: auto;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid rgba(210, 219, 231, .7); scrollbar-width: thin;
}
.t-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px; color: var(--ink); }
.t-brand:hover { color: var(--ink); }
.t-brand img { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 8px 16px -8px rgba(37, 99, 235, .6); transition: transform .45s var(--spring); }
.t-brand:hover img { transform: rotate(-8deg) scale(1.06); }
.t-brand span { display: flex; flex-direction: column; line-height: 1.3; }
.t-brand b { font-size: 15px; font-weight: 800; }
.t-brand small { font-size: 12px; color: var(--ink-3); }
.t-class { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, rgba(37, 99, 235, .07), rgba(20, 184, 166, .08)); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .1); }
.t-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); }
.t-class .select-wrap { display: block; }
.t-class select { min-height: 40px; height: 40px; padding-top: 6px; padding-bottom: 6px; }
.t-nav { display: flex; flex-direction: column; gap: 4px; }
.t-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; color: var(--ink-2); transition: background .25s, box-shadow .25s, transform .25s var(--ease); }
.t-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .92); transform: translateX(2px); }
.n-overview { --n-ink: #1d4ed8; --n-soft: #eaf1ff; --n-grad: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.n-review { --n-ink: #b45309; --n-soft: #fff4de; --n-grad: linear-gradient(135deg, #d97706, #f59e0b); }
.n-data { --n-ink: #0f766e; --n-soft: #e3f7f3; --n-grad: linear-gradient(135deg, #0d9488, #2dd4bf); }
.n-manage { --n-ink: #0369a1; --n-soft: #e6f6fe; --n-grad: linear-gradient(135deg, #0284c7, #38bdf8); }
.n-ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: var(--n-ink); background: var(--n-soft); transition: background .3s, color .3s, box-shadow .3s; }
.n-ico .i { width: 19px; height: 19px; }
.n-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.n-text b { font-size: 14.5px; font-weight: 750; color: var(--ink); }
.n-text small { overflow: hidden; font-size: 11.5px; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
.t-nav a.on { background: #fff; box-shadow: var(--sh-2), inset 0 0 0 1px rgba(210, 219, 231, .7); }
.t-nav a.on .n-ico { color: #fff; background: var(--n-grad); box-shadow: 0 8px 16px -8px var(--n-ink); }
.t-nav a.on::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--n-grad); }
.t-nav .badge {
  display: grid; place-items: center; flex: none; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #fff; background: var(--grad-amber); box-shadow: 0 6px 12px -6px rgba(245, 158, 11, .8);
  animation: badge-pop .5s var(--spring) .4s both;
}
.t-side-foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.t-help { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s, background .2s, box-shadow .2s, transform .2s, opacity .2s; }
.t-help:hover { color: var(--blue-2); background: #fff; box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .35); }
.t-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); }
.t-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.t-user-text b { font: 750 14px var(--mono); }
.t-user-text small { font-size: 11.5px; color: var(--ink-3); }
.t-version { font-size: 11.5px; text-align: center; color: var(--ink-4); }

/* 模型额度：充足为青绿，低于提醒线为琥珀，用完为珊瑚橙 */
.t-balance {
  --b: var(--ink-3); --b-soft: #f3f6fa; --b-line: rgba(210, 219, 231, .85);
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-radius: 16px;
  background: linear-gradient(140deg, var(--b-soft), rgba(255, 255, 255, .9) 85%); box-shadow: inset 0 0 0 1px var(--b-line);
  transition: background .3s, box-shadow .3s;
}
.t-balance[data-level="ok"] { --b: var(--teal-2); --b-soft: var(--teal-soft); --b-line: rgba(20, 184, 166, .28); }
.t-balance[data-level="low"] { --b: var(--amber-2); --b-soft: var(--amber-soft); --b-line: rgba(245, 158, 11, .55); }
.t-balance[data-level="empty"] { --b: var(--coral-2); --b-soft: var(--coral-soft); --b-line: rgba(249, 115, 22, .6); }
.tb-head { display: flex; align-items: center; gap: 7px; }
.tb-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--b); box-shadow: 0 0 0 4px var(--b-soft); }
.t-balance[data-level="loading"] .tb-dot, .t-balance[data-level="low"] .tb-dot, .t-balance[data-level="empty"] .tb-dot { animation: blink-dot 1.4s ease-in-out infinite; }
.tb-label { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); }
.tb-refresh { width: 28px; height: 28px; margin: -4px -4px -4px 0; }
.tb-refresh .i { width: 15px; height: 15px; }
.tb-refresh.is-busy .i { animation: spin .9s linear infinite; }
.tb-amount { margin: 2px 0 0; font: 800 22px/1.2 var(--mono); letter-spacing: -.01em; color: var(--b); }
.tb-note { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }
.tb-topup { justify-content: center; margin-top: 8px; color: #fff; background: var(--grad-amber); box-shadow: 0 8px 16px -10px rgba(245, 158, 11, .9); }
.t-balance[data-level="empty"] .tb-topup { background: linear-gradient(135deg, #ea580c, #f97316); }
.tb-topup[hidden], .balance-alert[hidden] { display: none; }
.balance-alert {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; border-radius: 16px; font-size: 14px; font-weight: 600; line-height: 1.55;
  color: var(--amber-2); background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .4); animation: rise .45s var(--ease) both;
}
.balance-alert > .i { flex: none; width: 20px; height: 20px; }
.balance-alert span { flex: 1; min-width: 220px; }
.balance-alert .btn { color: #fff; background: var(--grad-amber); }
.balance-alert.is-empty { color: var(--coral-2); background: var(--coral-soft); box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .45); }
.balance-alert.is-empty .btn { background: linear-gradient(135deg, #ea580c, #f97316); }
.t-main { width: 100%; max-width: 1420px; min-width: 0; padding: 28px clamp(20px, 3vw, 44px) 80px; }
.t-main > * + * { margin-top: 22px; }
.readonly-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  color: var(--tone, #1d4ed8); background: var(--tone-soft, #eaf1ff); box-shadow: inset 0 0 0 1px var(--tone-line, rgba(37, 99, 235, .18));
}
.subnav { display: flex; gap: 4px; width: fit-content; max-width: 100%; padding: 5px; overflow-x: auto; scrollbar-width: none; border-radius: 16px; background: rgba(255, 255, 255, .62); box-shadow: inset 0 0 0 1px var(--line); }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: color .2s, background .2s, box-shadow .2s, transform .2s, opacity .2s; }
.subnav a:hover { color: var(--ink); background: rgba(255, 255, 255, .92); }
.subnav a.on { color: var(--blue-2); background: #fff; box-shadow: var(--sh-2); }
.subnav a.on .i { color: var(--blue); }

.unit-tabs { display: flex; gap: 8px; padding: 4px 2px 8px; overflow-x: auto; scrollbar-width: thin; }
.unit-tabs a {
  position: relative; display: flex; flex-direction: column; flex: none; min-width: 132px; padding: 10px 16px 10px 30px; border-radius: 16px; color: var(--ink);
  background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px var(--line); transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.unit-tabs a:hover { color: var(--ink); transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .3), var(--sh-2); }
.unit-tabs b { font-size: 14px; font-weight: 750; }
.unit-tabs small { font: 600 11.5px var(--mono); color: var(--ink-3); }
.ut-dot { position: absolute; left: 13px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.ut-dot.open { background: var(--emerald); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.unit-tabs a.on { color: #fff; background: linear-gradient(135deg, var(--u1, #1d4ed8), var(--u2, #0ea5e9)); box-shadow: 0 14px 26px -14px var(--u1, #1d4ed8); }
.unit-tabs a.on small { color: rgba(255, 255, 255, .82); }
.unit-tabs a.on .ut-dot { background: rgba(255, 255, 255, .5); box-shadow: none; }
.unit-tabs a.on .ut-dot.open { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }

/* ---------------------------------------------------------------- 班级概览 */

.onboard { position: relative; overflow: hidden; padding: 22px 24px; border-radius: 24px; background: linear-gradient(135deg, #fff, #f2f7ff 60%, #effaf7); box-shadow: var(--sh-2); }
.onboard::before {
  content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none; background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; opacity: .55;
}
.onboard > header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ob-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); }
.ob-icon .i { width: 22px; height: 22px; }
.onboard h3 { font-size: 18px; font-weight: 800; }
.onboard header p { font-size: 13.5px; color: var(--ink-3); }
.ob-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ob-steps li { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px 12px; padding: 14px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ob-steps li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ob-steps li b { font-size: 14.5px; }
.ob-steps li small { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.ob-steps li .btn { margin-left: 44px; }
.ob-no { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; font: 800 13px var(--display); color: var(--blue-2); background: var(--blue-soft); }
.ob-no .i { width: 16px; height: 16px; }
.ob-steps li.done { background: linear-gradient(135deg, #f1fbf6, #fff); box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .25); }
.ob-steps li.done .ob-no { color: #fff; background: var(--grad-emerald); }

.todo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.t-amber { --t-ink: #b45309; --t-soft: #fff4de; --t-grad: linear-gradient(135deg, #f59e0b, #f97316); --t-shadow: rgba(245, 158, 11, .7); }
.t-blue { --t-ink: #1d4ed8; --t-soft: #eaf1ff; --t-grad: linear-gradient(135deg, #1d4ed8, #0ea5e9); --t-shadow: rgba(37, 99, 235, .7); }
.t-teal { --t-ink: #0f766e; --t-soft: #e3f7f3; --t-grad: linear-gradient(135deg, #0d9488, #34d399); --t-shadow: rgba(13, 148, 136, .7); }
.todo-card {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--r-lg);
  color: var(--ink); background: #fff; border: 1px solid rgba(210, 219, 231, .6); box-shadow: var(--sh-2); transition: transform .3s var(--ease), box-shadow .3s;
}
.todo-card::after { content: ""; position: absolute; right: -40px; top: -40px; z-index: -1; width: 140px; height: 140px; border-radius: 50%; background: var(--t-soft); opacity: .8; transition: transform .5s var(--ease); }
.todo-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--sh-3); }
.todo-card:hover::after { transform: scale(1.25); }
.tc-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: var(--t-grad); box-shadow: 0 12px 22px -12px var(--t-shadow); }
.tc-icon .i { width: 24px; height: 24px; }
.tc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.tc-body small { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.tc-body b { font: 800 34px/1.15 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tc-body em { font-size: 12.5px; font-style: normal; color: var(--ink-3); }
.tc-go { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 50%; color: var(--t-ink); background: var(--t-soft); transition: transform .3s var(--ease); }
.todo-card:hover .tc-go { transform: translateX(3px); }
.todo-card.attn { border-color: rgba(245, 158, 11, .5); box-shadow: 0 0 0 4px rgba(245, 158, 11, .12), var(--sh-2); }
.todo-card.attn .tc-icon { animation: attn 2.4s var(--ease) 1s infinite; }

.flow { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px 18px; }
.flow li { display: flex; flex-direction: column; gap: 8px; }
.fl-top { display: flex; align-items: baseline; gap: 6px; }
.fl-top b { font: 800 26px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.fl-top small { font-size: 12.5px; font-weight: 650; color: var(--ink-3); }
.fl-bar { height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.fl-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--grad-brand); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms + .1s); }
.reveal.in .fl-bar i, html:not(.js) .fl-bar i { transform: none; }
.fl-label { font-size: 13px; font-weight: 650; color: var(--ink-2); }

.table-wrap { overflow-x: auto; border-radius: 14px; }
.table-wrap.tall { max-height: 560px; overflow-y: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  position: sticky; top: 0; z-index: 1; padding: 10px 14px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.table th:first-child { border-top-left-radius: 12px; }
.table th:last-child { border-top-right-radius: 12px; }
.table td { padding: 12px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f5f9ff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.right { text-align: right; }
.table td .pill + .pill { margin-left: 4px; }
tr.row-link { cursor: pointer; }
tr.row-link:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.state.st-initial { color: var(--blue-2); }
.state.st-initial::before { background: var(--blue); }
.state.st-update { color: var(--amber-2); }
.state.st-update::before { background: var(--amber); }
.state.st-answer { color: var(--teal-2); }
.state.st-answer::before { background: var(--teal); }
.state.st-done { color: var(--emerald-2); }
.state.st-done::before { background: var(--emerald); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.flags { display: flex; flex-wrap: wrap; gap: 4px; }
td.flags { display: table-cell; }
td.flags .flag { margin: 1px 2px 1px 0; }

.tabs-nav { display: inline-flex; gap: 4px; max-width: 100%; padding: 4px; overflow-x: auto; scrollbar-width: none; border-radius: 14px; background: var(--surface-3); }
.tabs-nav::-webkit-scrollbar { display: none; }
.tabs-nav button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 10px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); background: transparent; white-space: nowrap; cursor: pointer; transition: color .2s, background .2s, box-shadow .2s, transform .2s, opacity .2s; }
.tabs-nav button:hover { color: var(--ink); }
.tabs-nav button.on { color: var(--blue-2); background: #fff; box-shadow: 0 1px 2px rgba(15, 32, 64, .08), 0 6px 14px -8px rgba(37, 99, 235, .4); }
.tab-panel { animation: panel-in .4s var(--ease-out) both; }

.stat-rows { display: flex; flex-direction: column; gap: 14px; }
.stat-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.stat-row b { text-align: right; font: 800 17px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-row b small { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stack-bar { height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.stack-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--tone-fill); animation: grow-w 1.1s var(--ease-out) .2s both; }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-stats > div { position: relative; padding: 16px; border-radius: 18px; background: var(--ms-soft); }
.mini-stats b { display: block; font: 800 30px/1.1 var(--display); color: var(--ms-ink); font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ms-blue { --ms-ink: #1d4ed8; --ms-soft: linear-gradient(135deg, #eaf1ff, #f6f9ff); }
.ms-amber { --ms-ink: #b45309; --ms-soft: linear-gradient(135deg, #fff4de, #fffaf1); }
.ms-red { --ms-ink: #c81e1e; --ms-soft: linear-gradient(135deg, #fdecec, #fff7f7); }
.ms-teal { --ms-ink: #0f766e; --ms-soft: linear-gradient(135deg, #e3f7f3, #f4fcfa); }
.mini-stats .attn { box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, .4); }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.hist-block { padding: 16px; border-radius: 18px; background: var(--surface-2); }
.hist-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.hist-title b { font-size: 14.5px; }
.hist { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 18px; }
.hist-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.hist-bar {
  position: relative; width: 100%; max-width: 44px; height: var(--h); max-height: calc(100% - 22px); min-height: 3px; border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, #38bdf8, #2563eb); transform-origin: bottom; animation: grow-y 1s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + .1s);
}
.hist-bar em { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); font-size: 12px; font-style: normal; font-weight: 750; color: var(--ink-2); }
.hist-col small { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.verdict-rows { display: flex; flex-direction: column; gap: 12px; }
.vrow { display: grid; grid-template-columns: 90px minmax(0, 1fr) 60px; align-items: center; gap: 12px; }
.vkey { font: 700 13px var(--mono); color: var(--ink-2); }
.stacked { display: flex; gap: 2px; height: 14px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.stacked i { display: block; width: var(--w); height: 100%; background: var(--tone-fill, var(--lv-fill)); animation: grow-w 1s var(--ease-out) .15s both; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend > span:not(.lv) { display: inline-flex; align-items: center; gap: 6px; }
.legend > span:not(.lv)::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--tone-fill); }
.hbars { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.hbars li > b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar { display: block; height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #0ea5e9, #14b8a6); animation: grow-w 1.1s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + .1s); }
.bar.big { height: 14px; margin: 10px 0 6px; }
.issue-top { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.issue-top li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: var(--surface-2); }
.issue-top li > span:nth-child(2) { flex: 1; min-width: 0; }
.issue-top b { font-size: 13px; color: var(--red-2); white-space: nowrap; }
.panel-sub { margin-bottom: 12px; }

/* ---------------------------------------------------------------- 评阅队列、学生详情 */

.queue-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.qs-item { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: var(--sh-2); transition: transform .25s var(--ease), box-shadow .25s; }
.qs-item:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--sh-3); }
.qs-no { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; font: 800 16px var(--display); color: #fff; background: var(--t-grad); box-shadow: 0 8px 16px -8px var(--t-shadow); }
.qs-item > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.qs-item b { font-size: 15px; }
.qs-item small { font-size: 12.5px; color: var(--ink-3); }
.qs-arrow { color: var(--ink-4); }
.queue-block { scroll-margin-top: 20px; }
.queue-block > * + * { margin-top: 14px; }
.section-title .count { display: inline-grid; place-items: center; min-width: 28px; height: 24px; margin-left: 0; padding: 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: var(--blue-2); background: var(--blue-soft); }
.qc-who { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.qc-who b { font-size: 15px; }
.queue-card .checks, .compare-col .checks { padding: 14px; }

.code-title { font-family: var(--mono); letter-spacing: 0; }
.unit-progress { display: flex; flex-wrap: wrap; gap: 6px; }
.up-item { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--ink-3); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.up-item::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.up-item.started { color: var(--blue-2); }
.up-item.started::before { background: var(--blue); }
.up-item.done { color: var(--emerald-2); background: var(--emerald-soft); box-shadow: none; }
.up-item.done::before { background: var(--emerald); }
.attempt-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); transition: color .2s, background .2s, box-shadow .2s, transform .2s, opacity .2s; }
.chip:hover { color: var(--blue-2); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .4); }
.chip.on { color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); }
.changes-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.ch-block { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.ch-block h5 { margin-bottom: 10px; }
.path { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.path-node { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; line-height: 1.35; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.path-node small { font-size: 11px; font-weight: 650; color: var(--ink-3); }
.path-node b { font-size: 14px; }
.path-node em { font-size: 11.5px; font-style: normal; color: var(--ink-3); }
.path-node.changed { background: var(--amber-soft); box-shadow: inset 0 0 0 1.5px rgba(245, 158, 11, .45); }
.path-arrow { color: var(--ink-4); }
.tokens { display: flex; flex-wrap: wrap; gap: 6px; }
.num-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font: 700 12px var(--mono); color: var(--emerald-2); background: var(--emerald-soft); }
.outcomes { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.outcomes li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.dims-compare { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.dc-row { display: grid; grid-template-columns: 140px repeat(3, minmax(0, 1fr)); align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
.dc-row.dc-head { padding-top: 0; padding-bottom: 0; font-size: 12px; font-weight: 700; color: var(--ink-3); background: transparent; animation: none; }
.dc-dim { font-size: 13.5px; font-weight: 700; }
.dc-cell { display: inline-flex; align-items: center; gap: 6px; }
.trend { width: 16px; height: 16px; color: var(--ink-4); }
.trend.up { color: var(--emerald); }
.trend.down { color: var(--red); }
.dims-compare > .fine { margin-top: 6px; }
.compare { display: grid; align-items: start; gap: 18px; }
.compare.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compare.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compare-col { overflow: hidden; padding: 20px; }
.compare-col::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c-grad); }
.compare-col.c1 { --c-grad: linear-gradient(90deg, #1d4ed8, #0ea5e9); }
.compare-col.c2 { --c-grad: var(--grad-amber); }
.compare-col.c3 { --c-grad: var(--grad-emerald); }
.compare-col > * + * { margin-top: 14px; }
.col-head h3 { display: flex; align-items: center; gap: 10px; font-size: 16.5px; font-weight: 800; }
.col-no { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; font: 800 13px var(--display); color: #fff; background: var(--c-grad); }
.col-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.col-review { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.col-review-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.col-review-head b { margin-right: 4px; font-size: 14px; }
.lv-list { list-style: none; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.lv-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.meta-fold { border-radius: 14px; background: var(--surface-2); }
.meta-fold > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; font-weight: 650; color: var(--ink-2); cursor: pointer; list-style: none; }
.meta-fold > summary::-webkit-details-marker { display: none; }
.meta-fold > summary::before { content: ""; width: 7px; height: 7px; margin: 0 2px 2px 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .25s var(--ease); }
.meta-fold[open] > summary::before { transform: rotate(45deg); }
.meta-fold .meta-grid { padding: 0 12px 12px; }
.meta-fold .meta-grid div { background: #fff; }
.chat-fold { border-radius: 16px; background: var(--surface-2); }
.chat-fold + .chat-fold { margin-top: 10px; }
.chat-fold > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.chat-fold > summary::-webkit-details-marker { display: none; }
.chat-fold > summary .muted { margin-left: auto; }
.chat-fold .chev { color: var(--ink-3); transition: transform .3s var(--ease); }
.chat-fold[open] .chev { transform: rotate(90deg); }
.log { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0 14px 14px; }
.log li { align-self: flex-start; max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.log li p { white-space: pre-wrap; word-break: break-word; }
.log li.log-student { align-self: flex-end; background: var(--blue-soft); box-shadow: none; }
.log li.refused { background: var(--coral-soft); box-shadow: none; }
.log li.follow { align-self: stretch; max-width: none; background: var(--amber-soft); box-shadow: none; }
.log-meta { display: block; margin-bottom: 2px; font-size: 11.5px; color: var(--ink-3); }
.declared { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.declared li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: var(--surface-2); }
.reopen { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.reopen h5 { margin-bottom: 4px; }
.reopen .row { margin-top: 10px; }
.traj-wrap { overflow-x: auto; }
.traj { min-width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 13px; }
.traj th { padding: 6px 8px; font-weight: 650; text-align: left; color: var(--ink-2); white-space: nowrap; }
.traj thead th { text-align: center; }
.traj thead a { display: flex; flex-direction: column; align-items: center; font: 700 12.5px var(--mono); color: var(--ink); }
.traj thead a:hover { color: var(--blue-2); }
.traj thead a small { font: 500 11px var(--sans); color: var(--ink-3); }
.traj thead th.nonfirst a { opacity: .6; }
.traj td { padding: 0; text-align: center; }
.traj-cell { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 78px; height: 32px; padding: 0 8px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--lv-ink); background: var(--lv-soft); }
.traj-cell i { width: 7px; height: 7px; border-radius: 50%; background: var(--lv-fill); }
.traj-cell.lv3 i { background: #fff; }
.traj-cell.empty { display: block; gap: 0; padding: 0; background: transparent; border: 1.5px dashed var(--line-2); }

/* ---------------------------------------------------------------- 量规评阅 */

.review-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.review-source { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); margin: -4px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.review-form-wrap { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.source-card .card-head .muted .i { color: var(--sky); }
.fold-card { padding: 0; }
.fold-card > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 16px 20px; cursor: pointer; list-style: none; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary b { font-size: 15px; }
.fold-card > summary .muted { flex: 1; min-width: 200px; }
.fold-card .chev { color: var(--ink-3); transition: transform .3s var(--ease); }
.fold-card[open] .chev { transform: rotate(90deg); }
.fold-card > :not(summary) { margin: 0 20px 20px; }
.rubric-form { display: flex; flex-direction: column; gap: 14px; }
.rubric-form.drafting .dim-block { opacity: .55; pointer-events: none; }
.rubric-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; }
.rubric-head h3 { font-size: 18px; font-weight: 800; }
.rubric-head .btn .i { color: var(--sky); }
.ai-review {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin: 14px 0 4px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(120deg, #eaf1ff, #eefaf6 70%, #fff); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .2);
}
.air-text { flex: 1 1 240px; min-width: 0; }
.air-text b { font-size: 15.5px; font-weight: 800; }
.air-text small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.air-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-tag { display: inline-flex; align-items: center; height: 22px; margin-left: 10px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--blue-2); background: var(--blue-soft); }
.ai-tag.is-edited { color: var(--emerald-2); background: var(--emerald-soft); }
.ai-tag[hidden] { display: none; }
.draft-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--sky-2); background: var(--sky-soft); }
.ai-busy { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--blue-2); background: linear-gradient(90deg, #eaf1ff, #e3f7f3, #eaf1ff); background-size: 200% 100%; animation: shimmer-bg 2s linear infinite; }
.dim-block { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 16px 18px; border: 0; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s, background .3s; }
.dim-block:focus-within { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, .4), 0 12px 26px -18px rgba(37, 99, 235, .55); }
.dim-block.from-ai { animation: from-ai 1.8s var(--ease) both; }
.dim-block legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; padding: 0; font-size: 15.5px; font-weight: 800; }
.dim-no { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; font: 800 13px var(--display); color: #fff; background: var(--grad-brand); }
.dim-no .i { width: 16px; height: 16px; }
.dim-block.tail { background: linear-gradient(135deg, #f5f9ff, #f2fbf8); }
.dim-block.tail .dim-no { background: var(--grad-emerald); }
.levels { flex-wrap: wrap; }
.levels .lvl-lv0 input:checked + span { color: #fff; background: #64748b; }
.levels .lvl-lv1 input:checked + span { color: #fff; background: var(--grad-amber); }
.levels .lvl-lv2 input:checked + span { color: #fff; background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.levels .lvl-lv3 input:checked + span { color: #fff; background: var(--grad-brand); }
.levels .lvl-lvna input:checked + span { color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.levels .lvl-lvwait input:checked + span { color: var(--coral-2); background: var(--coral-soft); box-shadow: inset 0 0 0 1.5px rgba(249, 115, 22, .35); }
.anchor-hint { padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.7; color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: opacity .16s; }
.anchor-hint:empty { display: none; }
input[data-quote].ok { border-color: var(--emerald); }
input[data-quote].bad { border-color: var(--red); background: #fff8f8; }
[data-quote-state] { font-weight: 650; }
[data-quote-state].ok { color: var(--emerald-2); }
[data-quote-state].bad { color: var(--red-2); }
.rubric-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.versions { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.versions li { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.versions li.latest { background: linear-gradient(135deg, #f1f6ff, #effaf7); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18); }
.v-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.v-head b { font-size: 14px; }
.v-levels { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.v-levels span { display: inline-flex; align-items: center; gap: 4px; }
.history form { margin-top: 12px; }
.quote-pop {
  position: absolute; z-index: 70; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; max-width: min(560px, calc(100vw - 24px));
  padding: 6px 6px 6px 12px; border-radius: 14px; color: #fff; background: rgba(12, 26, 50, .94); box-shadow: 0 18px 40px -12px rgba(12, 26, 50, .55);
  animation: pop-in .25s var(--spring) both;
}
.quote-pop .small { margin-right: 4px; color: rgba(255, 255, 255, .7); }
.quote-pop button { height: 30px; padding: 0 10px; border: 0; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer; transition: background .2s; }
.quote-pop button:hover { background: var(--blue); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; width: min(640px, 100vw); background: #fff;
  box-shadow: -30px 0 80px -30px rgba(15, 40, 90, .45); transform: translateX(105%); visibility: hidden; transition: transform .5s var(--ease-out), visibility 0s linear .5s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .5s var(--ease-out), visibility 0s; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 17px; font-weight: 800; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 26px 40px; }
.drawer-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(15, 28, 52, .3); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s linear .35s; }
.drawer-open .drawer-scrim { opacity: 1; visibility: visible; transition: opacity .35s, visibility 0s; }
body.drawer-open { overflow: hidden; }
.prose { font-size: 14.5px; line-height: 1.85; }
.prose h1 { margin: 8px 0 14px; font-size: 24px; }
.prose h2 { margin: 28px 0 10px; padding-bottom: 6px; font-size: 19px; border-bottom: 1px solid var(--line); }
.prose h3 { margin: 22px 0 8px; font-size: 16px; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose table { display: block; width: 100%; margin: 12px 0 20px; overflow-x: auto; border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.65; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.prose th, .prose td { padding: 9px 12px; text-align: left; vertical-align: top; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; white-space: nowrap; background: var(--surface-2); }
.prose tr > :last-child { border-right: 0; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose blockquote { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--sky); border-radius: 0 12px 12px 0; background: var(--sky-soft); }
.prose hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.rubric-doc { padding: 28px 34px; }

/* ---------------------------------------------------------------- 教学数据 */

.effect-card { overflow: hidden; }
.effect-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--u1, #1d4ed8), var(--u2, #0ea5e9)); }
.effect-card .card-head h3 { gap: 2px; }
.effect-summary { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.es-item { flex: 1; min-width: 130px; display: flex; flex-direction: column; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.es-item b { font: 800 28px/1.15 var(--display); font-variant-numeric: tabular-nums; }
.es-item span { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.es-item.accent { background: linear-gradient(135deg, var(--u1, #059669), var(--u2, #14b8a6)); box-shadow: 0 14px 26px -16px var(--u1, #059669); }
.es-item.accent b, .es-item.accent span { color: #fff; }
.es-arrow { flex: none; align-self: center; color: var(--ink-4); }
.w-bar { min-width: 180px; }
.fold { margin-top: 16px; border-radius: 14px; background: var(--surface-2); }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-size: 14px; font-weight: 650; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold .chev { color: var(--ink-3); transition: transform .3s var(--ease); }
.fold[open] .chev { transform: rotate(90deg); }
.fold > :not(summary) { margin: 0 12px 12px; }
.fold .table-wrap { background: #fff; }
.dims-dist { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.dd-block { padding: 16px; border-radius: 16px; background: var(--surface-2); }
.dd-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dd-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.dd-row + .dd-row { margin-top: 8px; }
.survey-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.sv-q { margin-bottom: 12px; font-size: 15px; font-weight: 750; }
.scale-avg { display: flex; align-items: baseline; gap: 6px; }
.scale-avg b { font: 800 36px/1.1 var(--display); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quotes { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.quotes li { position: relative; padding: 10px 12px 10px 32px; border-radius: 12px; font-size: 13.5px; background: var(--surface-2); }
.quotes li::before { content: "“"; position: absolute; left: 11px; top: 2px; font: 800 24px var(--display); color: var(--sky); }
.export-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.export-card { display: flex; flex-direction: column; gap: 8px; transition: transform .3s var(--ease), box-shadow .3s; }
.export-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.ex-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 6px; border-radius: 16px; color: #fff; background: var(--ex-grad); box-shadow: 0 12px 22px -12px var(--ex-shadow); }
.ex-icon .i { width: 24px; height: 24px; }
.ex-records { --ex-grad: linear-gradient(135deg, #1d4ed8, #3b82f6); --ex-shadow: rgba(37, 99, 235, .7); }
.ex-effect { --ex-grad: linear-gradient(135deg, #0d9488, #34d399); --ex-shadow: rgba(13, 148, 136, .7); }
.ex-chats { --ex-grad: linear-gradient(135deg, #0284c7, #38bdf8); --ex-shadow: rgba(2, 132, 199, .7); }
.ex-surveys { --ex-grad: linear-gradient(135deg, #d97706, #fbbf24); --ex-shadow: rgba(217, 119, 6, .7); }
.export-card h3 { font-size: 17px; font-weight: 800; }
.ex-count { display: flex; align-items: baseline; gap: 6px; margin-top: auto; padding-top: 8px; }
.ex-count b { font: 800 30px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ---------------------------------------------------------------- 管理 */

.release-list { display: flex; flex-direction: column; gap: 12px; }
.release-card { display: flex; align-items: center; gap: 20px; overflow: hidden; padding: 18px 20px 18px 24px; transition: box-shadow .3s; }
.release-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--u1, #1d4ed8), var(--u2, #0ea5e9)); opacity: .3; transition: opacity .3s; }
.release-card.is-open { background: linear-gradient(115deg, #fff 55%, var(--u-soft, #eaf1ff)); }
.release-card.is-open::before { opacity: 1; }
.release-card .rl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rl-title { display: flex; align-items: center; gap: 12px; }
.rl-title h3 { font: 800 16px var(--mono); }
.rl-cases { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.rl-cases li { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 12px; background: var(--surface-2); }
.rl-cases a { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; font: 700 12.5px var(--mono); color: var(--u-ink, var(--blue-2)); background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.rl-cases a:hover { background: var(--u-soft, var(--blue-soft)); }
.rl-cases a .i { width: 14px; height: 14px; }
.rl-cases small { font-size: 12px; color: var(--ink-3); }
.rl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.rl-side small { font-size: 12px; }
.accounts-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); align-items: start; gap: 20px; }
.create-card { position: sticky; top: 20px; }
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.slip { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1.5px dashed var(--line-2); animation: rise .4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 25ms); }
.slip-class { font-size: 11.5px; color: var(--ink-3); }
.slip b { font: 800 18px var(--mono); color: var(--blue-2); }
.slip-pin { font-size: 13px; color: var(--ink-2); }
.slip-pin code { font-size: 15px; font-weight: 800; letter-spacing: .12em; color: var(--amber-2); background: var(--amber-soft); }
.slip-note { margin-top: 4px; font-size: 11px; color: var(--ink-4); }
.big-code { padding: 2px 8px; font-size: 17px; font-weight: 800; letter-spacing: .12em; }
.bank-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; overflow: hidden; padding: 18px 18px 16px; border-radius: 20px; background: #fff; border: 1px solid rgba(210, 219, 231, .6); box-shadow: var(--sh-2); }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--k-grad); }
.kpi span { font-size: 12.5px; font-weight: 650; color: var(--ink-3); }
.kpi b { font: 800 26px/1.3 var(--display); font-variant-numeric: tabular-nums; }
.kpi b.mono { font-family: var(--mono); font-size: 18px; line-height: 1.8; }
.kpi small { font-size: 12px; color: var(--ink-3); }
.k-blue { --k-grad: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.k-teal { --k-grad: linear-gradient(90deg, #0d9488, #34d399); }
.k-amber { --k-grad: linear-gradient(90deg, #d97706, #fbbf24); }
.k-sky { --k-grad: linear-gradient(90deg, #0284c7, #22d3ee); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 20px; border-radius: 18px; text-align: center; cursor: pointer; border: 2px dashed var(--line-2); background: var(--surface-2); transition: border-color .25s, background .25s, transform .25s var(--ease), box-shadow .25s; }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #f3f8ff; }
.dropzone.drag { transform: scale(1.01); box-shadow: 0 0 0 6px rgba(37, 99, 235, .1); }
.dropzone.has-file { border-style: solid; border-color: var(--emerald); background: #f1fbf6; }
.dz-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); transition: transform .35s var(--spring); }
.dz-icon .i { width: 26px; height: 26px; }
.dropzone:hover .dz-icon { transform: translateY(-4px); }
.dropzone.has-file .dz-icon { background: var(--grad-emerald); }
.dropzone b { font-size: 15px; }
.dropzone small { max-width: 440px; }
.follow-section > * + * { margin-top: 14px; }
.follow-section .sec-head .muted { flex-basis: 100%; }
.follow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.follow-form { display: flex; flex-direction: column; gap: 10px; }
.follow-form .card-head { margin-bottom: 4px; }
.follow-form .card-head h3 { gap: 8px; font-size: 15.5px; }
.follow-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 10px; }
.fk { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; margin-top: 7px; padding: 4px 8px; border-radius: 8px; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--blue-2); background: var(--blue-soft); }
.preview-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.preview-student .mat-inner { padding: 0; }
.preview-student .mat-toc { position: static; margin: 0; padding: 0; background: none; flex-wrap: wrap; }
.preview-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.preview-side .fact + .fact { margin-top: 8px; }
.key-q { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.key-q + .key-q { margin-top: 10px; }
.key-q dl { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 6px 12px; margin: 10px 0 0; font-size: 13.5px; }
.key-q dt { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.key-q dd { margin: 0; }
.notes { display: flex; flex-direction: column; gap: 6px; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
.follow-dl { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 13.5px; }
.follow-dl dt { font-weight: 700; color: var(--blue-2); }
.follow-dl dd { margin: 0; }
.log-table td { vertical-align: top; }
.log-detail span { display: inline-flex; gap: 4px; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 7px; font-size: 12px; background: var(--surface-2); }
.log-detail em { font-style: normal; color: var(--ink-3); }
.log-filter select { min-width: 180px; }

/* ---------------------------------------------------------------- 陪练形象 */

@keyframes talk-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-2px) scale(1.04); } }
@keyframes glow-breathe { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes say-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

/* 取景：--span 为头顶以下显示的模型高度（模型像素），--pad 为头顶留白；静态图与动画按同一比例对齐 */
.tutor-stage { --span: 1250; --pad: .05; position: relative; isolation: isolate; overflow: hidden; container-type: size; }
.tutor-still {
  --s: min(calc(100cqh * (1 - var(--pad)) / var(--span)), calc(100cqw / 1000));
  position: absolute; left: 50%; top: calc(100cqh * var(--pad) - var(--s) * 52); z-index: 1; width: calc(var(--s) * 975); max-width: none; height: auto;
  transform: translateX(-50%); pointer-events: none; transition: opacity .6s var(--ease);
}
.tutor-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; transition: opacity .6s var(--ease); }
.tutor-stage.is-live .tutor-canvas { opacity: 1; }
.tutor-stage.is-live .tutor-still { opacity: 0; transition: opacity .2s linear .5s; }
.tutor-glow {
  position: absolute; left: 8%; right: 8%; top: 12%; height: 70%; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); opacity: .55;
}
.tutor-stage[data-act="think"] .tutor-glow, .tutor-stage[data-act="talk"] .tutor-glow { animation: glow-breathe 2.2s var(--ease) infinite; }
.tutor-face { display: block; border-radius: 50%; background: linear-gradient(160deg, #eaf1ff, #e3f7f3); }
.is-talking img, img.is-talking { animation: talk-bob .5s var(--ease) infinite; }

/* ---------------------------------------------------------------- 智能体陪练面板 */

@keyframes float-ring { 0%, 100% { box-shadow: 0 22px 44px -20px rgba(15, 40, 90, .5), 0 0 0 0 rgba(14, 165, 233, .0); } 50% { box-shadow: 0 22px 44px -20px rgba(15, 40, 90, .5), 0 0 0 6px rgba(14, 165, 233, .16); } }

/* 右下角常驻形象：点人物打开面板 */
.tutor-float {
  --st: linear-gradient(170deg, #dfeafe 0%, #e8f6fe 55%, #dcf5f0 100%);
  position: fixed; right: 22px; bottom: 20px; z-index: 30; width: 124px; height: 168px; border-radius: 26px; background: var(--st);
  box-shadow: 0 22px 44px -20px rgba(15, 40, 90, .5), inset 0 0 0 1px rgba(255, 255, 255, .9);
  transition: transform .4s var(--spring), opacity .3s, bottom .35s var(--ease); animation: pop-in .6s var(--spring) .5s backwards;
}
.tutor-float.mode-coach { --st: linear-gradient(170deg, #ffeccb 0%, #fff6e6 55%, #e3f3fd 100%); }
.tutor-float.mode-review { --st: linear-gradient(170deg, #d8f4e7 0%, #e3f7f3 55%, #e6f6fe 100%); }
.tutor-float.mode-locked { --st: linear-gradient(170deg, #e6ebf3 0%, #f3f6fa 100%); }
.tutor-float:hover { transform: translateY(-4px); }
.tutor-float.is-talking { animation: float-ring 1.2s var(--ease) infinite; }
.tutor-float .tutor-stage { --span: 1020; --pad: .05; position: absolute; inset: 0; border-radius: inherit; }
.tf-hit { position: absolute; inset: 0; z-index: 5; width: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.tf-hit:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 3px; }
.tf-name {
  position: absolute; left: 50%; bottom: -12px; z-index: 6; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px;
  border-radius: 999px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-size: 13px; font-weight: 800; color: var(--ink); background: #fff; box-shadow: 0 10px 22px -12px rgba(15, 40, 90, .55), inset 0 0 0 1px var(--line);
}
.tf-name small { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.tf-name .agent-dot { width: 8px; height: 8px; box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.bar-on .tutor-float { bottom: calc(var(--bar-h, 64px) + 44px); }
.chat-open .tutor-float { opacity: 0; transform: scale(.7) translateY(20px); pointer-events: none; }

/* 面板收起时，人物说的话以气泡显示在人物左侧 */
.agent-pop {
  position: fixed; right: 160px; bottom: 74px; z-index: 31; max-width: min(320px, calc(100vw - 190px)); padding: 11px 15px;
  border-radius: 18px 18px 4px 18px; font-size: 13.5px; line-height: 1.7; color: var(--ink); background: #fff;
  box-shadow: 0 20px 44px -18px rgba(15, 40, 90, .5), inset 0 0 0 1px rgba(210, 219, 231, .8);
  opacity: 0; transform: translateX(8px) scale(.96); transform-origin: 100% 100%; transition: opacity .3s var(--ease), transform .4s var(--spring), bottom .35s var(--ease);
}
.agent-pop.show { opacity: 1; transform: none; }
.bar-on .agent-pop { bottom: calc(var(--bar-h, 64px) + 98px); }
.chat-open .agent-pop, .agent-docked .agent-pop { display: none; }

/* 面板头部：形象 + 状态 + 当前说的话 */
.ap-head { position: relative; flex: none; background: var(--st); }
.agent-panel { --st: linear-gradient(160deg, #dfeafe 0%, #eef7ff 50%, #e3f7f1 100%); }
.agent-panel.mode-coach { --st: linear-gradient(160deg, #ffefd2 0%, #fff7ea 50%, #e8f4fd 100%); }
.agent-panel.mode-review { --st: linear-gradient(160deg, #dcf5ea 0%, #ecf9f5 50%, #e8f5fe 100%); }
.agent-panel.mode-locked { --st: linear-gradient(160deg, #e8edf4 0%, #f5f7fa 100%); }
.ap-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .4) 0 1px, transparent 1px 18px);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); mask-image: linear-gradient(90deg, #000, transparent 60%);
}
.ap-stage { position: relative; display: grid; grid-template-columns: 158px minmax(0, 1fr); height: 208px; }
.tutor-panel { --span: 1060; --pad: .05; height: 100%; cursor: pointer; }
.ap-side { display: flex; flex-direction: column; min-width: 0; padding: 14px 14px 12px 4px; }
.ap-top { display: flex; align-items: center; gap: 8px; }
.ap-top .btn-icon { flex: none; width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, .75); }
.ap-voice .i { width: 18px; height: 18px; }
.ap-voice .v-on, .ap-voice[aria-pressed="true"] .v-off { display: none; }
.ap-voice[aria-pressed="true"] .v-on { display: block; }
.ap-voice[aria-pressed="true"] { color: #fff; background: var(--grad-brand); box-shadow: 0 8px 16px -8px rgba(37, 99, 235, .7); }
.agent-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(16, 185, 129, .16); transition: background .3s, box-shadow .3s; }
.agent-dot.busy { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); animation: blink-dot .9s infinite; }
.mode-locked .agent-dot { background: var(--ink-4); box-shadow: 0 0 0 4px rgba(148, 163, 184, .18); }
.agent-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.agent-name b { font-size: 16px; font-weight: 800; }
.agent-name small { overflow: hidden; font-size: 12px; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
.agent-say {
  position: relative; flex: 1; min-height: 0; margin-top: 10px; padding: 10px 13px; overflow-y: auto; scrollbar-width: none;
  border-radius: 6px 16px 16px 16px; font-size: 13.5px; line-height: 1.7; color: var(--ink); background: #fff;
  box-shadow: 0 14px 30px -20px rgba(15, 40, 90, .5), inset 0 0 0 1px rgba(210, 219, 231, .7); animation: say-in .45s var(--spring) both;
}
.agent-say:empty { visibility: hidden; }
.ap-tabs { position: relative; display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .7); }
.ap-tabs button {
  position: relative; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 46px; padding: 0 8px;
  border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-3); transition: color .2s;
}
.ap-tabs button .i { width: 17px; height: 17px; }
.ap-tabs button::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad-brand); transform: scaleX(0); transition: transform .3s var(--ease-out); }
.ap-tabs button:hover { color: var(--ink); }
.ap-tabs button.on { color: var(--ink); }
.ap-tabs button.on::after { transform: none; }
.ap-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font: 700 11.5px/20px var(--mono); text-align: center; color: var(--blue-2); background: var(--blue-soft); }
.ap-count.flash { animation: badge-pop .45s var(--spring); }
.ap-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ap-pane[hidden] { display: none; }
.ap-desk { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 16px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ap-precheck { flex: none; margin: 16px 16px 0; }

/* 工作台内容 */
.agent-sec { padding: 18px 18px 0; }
.agent-sec h4 { margin-bottom: 8px; font-size: 12px; font-weight: 750; letter-spacing: .02em; color: var(--ink-3); }
.agent-scope { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.agent-scope li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; }
.agent-scope .i { flex: none; width: 14px; height: 14px; margin-top: 3px; }
.agent-scope li.on .i { color: var(--teal-2); }
.agent-scope li.off { color: var(--ink-4); }
.agent-scope small { display: block; font-size: 11.5px; color: var(--ink-3); }
.agent-note { margin-top: 8px; font-size: 11.5px; line-height: 1.6; color: var(--ink-3); }
.agent-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.agent-stats span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; font-size: 12px; color: var(--ink-3); background: var(--surface-2); }
.agent-stats b { font: 800 21px/1.1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.agent-stats b.flash { animation: badge-pop .45s var(--spring); color: var(--blue-2); }
.agent-trace { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.agent-trace:empty::before { content: "尚无记录"; font-size: 12.5px; color: var(--ink-4); }
.agent-trace li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: start; gap: 8px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.agent-trace .i { width: 14px; height: 14px; margin-top: 3px; color: var(--ink-4); }
.agent-trace li.tone-agent .i { color: var(--blue); }
.agent-trace li.tone-ok .i { color: var(--emerald); }
.agent-trace li.fresh { animation: msg-in .4s var(--ease-out) both; }
.agent-trace time { font: 11px var(--mono); color: var(--ink-4); }
.agent-memory { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.agent-memory li { padding: 9px 11px; border-radius: 12px; background: var(--amber-soft); }
.agent-memory b { font-size: 13px; color: var(--amber-2); }
.agent-memory small { margin-left: 6px; font-size: 11.5px; color: var(--ink-3); }
.agent-memory p { margin-top: 3px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.agent-foot { padding: 18px 18px 0; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.l2d-credit { font-size: 10.5px; line-height: 1.55; color: var(--ink-4); }
.ap-desk .l2d-credit { padding: 8px 18px 0; }

/* 超宽屏：面板常驻在作答区右侧，页面整体左移 */
@media (min-width: 1680px) {
  .agent-docked .page, .agent-docked .topbar-inner { max-width: calc(1320px + 480px); padding-right: calc(24px + 480px); }
  .agent-docked .chat {
    right: max(20px, calc((100vw - 1800px) / 2 + 20px)); top: calc(var(--top) + 16px); bottom: 16px;
    transform: none; visibility: visible; box-shadow: var(--sh-2), inset 0 0 0 1px rgba(210, 219, 231, .85); transition: none;
  }
  .agent-docked .ap-close, .agent-docked .chat-scrim, .agent-docked .tutor-float { display: none; }
}

/* 有动画形象的页面不使用背景模糊，减少与动画同时重绘造成的闪烁 */
.has-agent .topbar, .page-home .topbar { background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: none; backdrop-filter: none; }
.has-agent .topbar.scrolled, .page-home .topbar.scrolled { background: rgba(255, 255, 255, .97); }
.has-agent .submit-bar { background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: none; backdrop-filter: none; }
.has-agent .materials, .has-agent .case-steps { background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: none; backdrop-filter: none; }
.page-home .home-meter, .page-home .th-eyebrow, .page-home .th-steps { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------------------------------------------------------------- 写作提示 */

.hint-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 30px; margin-left: auto; padding: 0 12px; border: 0; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--blue-2); background: var(--blue-soft); cursor: pointer;
  transition: color .2s, background .25s, box-shadow .25s, transform .25s var(--spring);
}
.hint-btn .i { width: 14px; height: 14px; }
.hint-btn:hover { color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); transform: translateY(-1px); }
.hint-btn.is-rule { color: var(--ink-2); background: var(--surface-3); }
.hint-btn.is-rule:hover { color: var(--ink); background: #e3eaf4; box-shadow: none; }
.hint-btn[aria-busy="true"] { pointer-events: none; color: var(--blue-2); background: linear-gradient(90deg, var(--blue-soft), #d8e6ff, var(--blue-soft)); background-size: 200% 100%; animation: shimmer-bg 1.2s linear infinite; }
.hint-btn[aria-busy="true"] .i { animation: spin 1.1s linear infinite; }

.hint-card {
  margin-top: 14px; padding: 14px 16px 12px; border-radius: 16px; background: linear-gradient(135deg, #f3f7ff, #f0fbf8);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14); animation: pop-in .4s var(--spring) both;
}
.hint-card.src-rule { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.hint-card.is-error { background: var(--coral-soft); box-shadow: none; }
.hc-head { display: flex; align-items: center; gap: 10px; }
.hc-face { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.hint-card.is-running .hc-face { animation: talk-bob .9s var(--ease) infinite; }
.hc-head b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 750; }
.hc-close { width: 28px; height: 28px; }
.hc-close .i { width: 15px; height: 15px; }
.hc-trace { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.hc-trace li { display: inline-flex; align-items: center; gap: 6px; animation: fade .3s both; }
.hc-trace li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.hc-trace li.run::before { background: var(--amber); animation: blink-dot .9s infinite; }
.hc-trace li.done::before { background: var(--emerald); }
.hc-scope { margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.hc-checks { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.hc-checks li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.hc-checks .i { flex: none; width: 15px; height: 15px; margin-top: 3px; }
.hc-checks .tone-ok .i { color: var(--emerald); }
.hc-checks .tone-warn .i { color: var(--amber); }
.hc-checks .tone-miss .i { color: var(--red); }
.hc-points { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.hc-points:empty { display: none; }
.hc-points p { position: relative; padding-left: 14px; font-size: 14px; line-height: 1.75; color: var(--ink); }
.hc-points p::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--grad-brand); }
.hc-q { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.75; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.hc-q b { margin-right: 8px; color: var(--amber-2); }
.hc-foot { margin-top: 10px; font-size: 11.5px; line-height: 1.6; color: var(--ink-4); }

/* ---------------------------------------------------------------- 提交前预检 */

.modal.precheck { max-width: min(560px, calc(100vw - 32px)); }
.pc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pc-head .tutor-face { flex: none; width: 52px; height: 52px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(14, 165, 233, .3); }
.pc-head .modal-title { margin-bottom: 2px; }
.pc-summary { font-size: 13.5px; color: var(--ink-2); }
.pc-list { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 46vh; margin: 0 -4px; padding: 2px 4px; overflow-y: auto; }
.pc-list li { animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.pc-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; font: inherit; text-align: left;
  color: inherit; background: var(--surface-2); cursor: pointer; transition: background .2s;
}
.pc-item:hover { background: var(--surface-3); }
.pc-mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 8px; color: #fff; background: var(--grad-emerald); }
.pc-mark .i { width: 14px; height: 14px; }
.st-warn .pc-mark { background: var(--grad-amber); }
.st-miss .pc-mark { background: linear-gradient(135deg, #ef4444, #f97316); }
.st-miss .pc-item { background: var(--red-soft); }
.pc-text { min-width: 0; }
.pc-text b { display: block; font-size: 14px; }
.pc-text small { display: block; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.pc-note { margin-top: 12px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.pc-note:empty { display: none; }
.precheck[data-tone="warn"] .pc-note { padding: 10px 12px; border-radius: 12px; color: var(--amber-2); background: var(--amber-soft); }
.precheck .fine { margin-top: 8px; }
.sb-check { flex: none; }

/* ---------------------------------------------------------------- 反方追问 */

.follow-card.is-counter::before { background: linear-gradient(135deg, #2563eb, #0ea5e9 45%, #14b8a6 100%); }
.follow-card.is-counter .fc-tag { color: var(--blue-2); background: var(--blue-soft); }
.follow-card.is-counter .follow-q::before { background: var(--grad-brand); }
.fc-quote { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--sky); }
.fc-quote span { display: block; margin-bottom: 2px; font-size: 12px; color: var(--ink-3); }
.fc-quote p { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.fc-basis { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.fc-pending { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; color: var(--blue-2); background: var(--blue-soft); }
.follow-card.flash { animation: fresh-glow 1.2s var(--ease) 2; }

/* ---------------------------------------------------------------- 首页陪练 */

.task-hero, .task-hero.is-done, .task-hero.is-empty { grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); }
.th-tutor {
  position: relative; align-self: stretch; display: grid; grid-template-columns: minmax(0, 1fr) 200px; align-items: start;
  min-height: 300px; margin: -32px -34px -32px 0;
}
.th-say {
  position: relative; z-index: 3; grid-column: 1; grid-row: 1; margin: 48px -14px 0 0; padding: 12px 14px; border-radius: 18px 18px 4px 18px;
  font-size: 13.5px; line-height: 1.75; color: var(--ink); background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(210, 219, 231, .6); animation: say-in .5s var(--spring) .5s both;
}
.th-say:empty { display: none; }
.tutor-hero { --span: 1700; --pad: .08; grid-column: 2; grid-row: 1; align-self: stretch; min-height: 300px; cursor: pointer; }
.task-hero .tutor-glow { background: radial-gradient(closest-side, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)); }
.task-hero.is-empty .tutor-glow { background: radial-gradient(closest-side, rgba(14, 165, 233, .18), rgba(14, 165, 233, 0)); }
.th-face { display: none; }

.memory-strip { padding: 16px 18px; border-radius: 20px; background: linear-gradient(120deg, #eaf1ff, #fff 70%); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .16), var(--sh-1); }
.memory-strip header { display: flex; align-items: center; gap: 12px; }
.ms-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); }
.memory-strip header b { display: block; font-size: 15px; }
.memory-strip header div span { font-size: 13px; color: var(--ink-3); }
.ms-icon .i { width: 20px; height: 20px; }
.memory-strip ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.memory-strip li { padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.memory-strip li b { font-size: 14px; color: var(--amber-2); }
.memory-strip li small { margin-left: 6px; font-size: 12px; color: var(--ink-3); }
.memory-strip li p { margin-top: 4px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.page-credit { margin-top: 32px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ---------------------------------------------------------------- 教师端：智能体帮助记录 */

.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: var(--blue); }
.agent-memo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); }
.agent-memo b { margin-right: 4px; color: var(--amber-2); }
.agent-memo .fine { flex-basis: 100%; }
.agent-log { padding: 0 0 12px; }
.log li.log-agent { align-self: stretch; max-width: none; background: linear-gradient(135deg, #f3f7ff, #f0fbf8); box-shadow: inset 3px 0 0 var(--sky); }
.log li.log-agent.kind-counter { box-shadow: inset 3px 0 0 var(--amber); }
.log li.log-agent.kind-precheck { box-shadow: inset 3px 0 0 var(--teal); }
.log li.log-agent p + p { margin-top: 2px; }

/* ---------------------------------------------------------------- 教师端智能体：批量起草、学情分析、成长诊断 */

.ai-card { overflow: hidden; background: linear-gradient(180deg, #f4f8ff 0, #fff 120px); border-color: rgba(37, 99, 235, .16); }
.ai-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad-brand); }
.ai-head { align-items: flex-start; }
.ai-title { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 420px; }
.ai-title small { display: block; max-width: 720px; margin-top: 3px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.ai-badge {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: var(--grad-brand);
  box-shadow: 0 10px 20px -10px rgba(37, 99, 235, .8);
}
.ai-badge .i { width: 20px; height: 20px; }
.ai-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ai-actions form { display: contents; }
.ai-go .i { width: 16px; height: 16px; }
.ai-empty { padding: 14px 16px; border-radius: 14px; font-size: 13.5px; color: var(--ink-3); background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px var(--line); }
.is-running .ai-empty, .is-running .ai-report { opacity: .45; }

.job-progress { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.job-progress[hidden] { display: none; }
.jp-track { position: relative; height: 6px; overflow: hidden; border-radius: 6px; background: var(--blue-soft); }
.jp-track i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); min-width: 6%; border-radius: inherit; background: var(--grad-brand); transition: width .6s var(--ease-out); }
.jp-track i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: jp-sweep 1.4s linear infinite; }
@keyframes jp-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.jp-text { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--blue-2); }
.jp-text .spin { width: 12px; height: 12px; border-width: 1.6px; }

.ai-bar {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(120deg, #eef4ff, #fff 70%); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18), var(--sh-1);
}
.ai-bar-text { flex: 1; min-width: 0; }
.ai-bar-text b { font-size: 15px; }
.ai-bar-text small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.ai-bar .job-progress { margin: 10px 0 0; }
.ai-bar form { flex: none; }

.ai-report { display: flex; flex-direction: column; gap: 14px; transition: opacity .3s; }
.ar-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--ink-3); }
.ar-own { margin-left: auto; color: var(--ink-4); }
.ar-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--amber-2); background: var(--amber-soft); }
.ar-note .i { flex: none; margin-top: 3px; }
.ar-summary { padding: 14px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.8; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ar-fold > summary {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 14px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 700; color: var(--blue-2); background: var(--blue-soft); transition: background .2s;
}
.ar-fold > summary::-webkit-details-marker { display: none; }
.ar-fold > summary:hover { background: #dfe9ff; }
.ar-fold > summary small { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ar-fold > summary .chev { transition: transform .3s var(--ease); }
.ar-fold[open] > summary { margin-bottom: 14px; }
.ar-fold[open] > summary .chev { transform: rotate(90deg); }
.ar-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ar-block { min-width: 0; padding: 16px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ar-block h4 { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 14px; font-weight: 800; }
.ar-block h4 .i { width: 16px; height: 16px; color: var(--blue); }
.ar-block h4 small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ar-sub { margin-top: 18px; }
.ar-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ar-list > li { padding-left: 12px; border-left: 3px solid rgba(245, 158, 11, .45); }
.ar-list.is-good > li { border-left-color: rgba(16, 185, 129, .45); }
.ar-list.is-growth > li { border-left-color: rgba(37, 99, 235, .35); }
.ar-list header { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.ar-list header b { font-size: 14px; }
.ar-list p { margin-top: 4px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.ar-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 6px 0 0; padding: 7px 10px; border-radius: 10px; font-size: 13px; line-height: 1.65; background: var(--surface-2); }
.ar-quote q { color: var(--ink); }
.ar-quote q::before { content: "“"; } .ar-quote q::after { content: "”"; }
.ar-quote cite { font-size: 12px; font-style: normal; color: var(--ink-3); }
.ar-quote cite a { color: var(--blue-2); }
.ar-quote.is-empty { background: none; border: 1px dashed var(--line-2); }
.ar-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.ar-pair .ar-quote { margin-top: 6px; }
.ar-arrow { width: 16px; height: 16px; color: var(--ink-4); }
.ar-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ar-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.ar-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font: 800 13px var(--mono); color: #fff; background: var(--grad-brand); }
.ar-steps header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ar-steps header b { font-size: 14px; }
.ar-steps p { margin-top: 3px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.ar-ask { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px !important; padding: 7px 10px; border-radius: 10px; font-weight: 600; color: var(--blue-3) !important; background: var(--blue-soft); }
.ar-ask .i { flex: none; width: 14px; height: 14px; margin-top: 4px; }
.ar-plain { padding-left: 18px; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.ar-help { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); background: linear-gradient(120deg, #eef4ff, #f0fbf8); }
.ar-help .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--blue); }
.ar-help b { display: block; color: var(--ink); }

/* 评阅页：提交前的智能体帮助 */
.help-card { border-color: rgba(37, 99, 235, .2); background: linear-gradient(180deg, #f4f8ff, #fff 90px); }
.help-card .card-head { margin-bottom: 12px; }
.hc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hc-stats span { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; font-size: 12px; color: var(--ink-3); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.hc-stats b { font: 800 19px/1.2 var(--display); color: var(--ink); }
.hc-stats small { font-size: 11px; color: var(--blue-2); }
.hc-items { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.hc-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.hc-items b { font-size: 13.5px; }
.hc-items p { flex-basis: 100%; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.hc-items time { margin-right: 6px; font: 11px var(--mono); color: var(--ink-4); }
.help-tag { margin-left: 8px; vertical-align: 1px; font-size: 11px; }
.draft-field h4 .help-tag, .draft-choice .help-tag { font-weight: 700; }

.page-report .ai-card { background: #fff; }

@media (max-width: 900px) {
  .ar-cols { grid-template-columns: minmax(0, 1fr); }
  .ai-bar { flex-wrap: wrap; }
  .ai-bar form { flex-basis: 100%; }
  .ai-bar form .btn { width: 100%; }
  .ar-own { margin-left: 0; }
}
@media (max-width: 560px) {
  .ar-pair { grid-template-columns: minmax(0, 1fr); }
  .ar-arrow { justify-self: center; transform: rotate(90deg); }
}

/* ---------------------------------------------------------------- 未启用脚本时的展开状态 */

html:not(.js) .sealed-body { grid-template-rows: 1fr; }
html:not(.js) .tutor-float, html:not(.js) .chat-scrim, html:not(.js) .ap-close, html:not(.js) .ap-tabs { display: none; }
html:not(.js) .chat { position: static; width: auto; height: auto; margin: 22px auto 0; max-width: 1200px; transform: none; visibility: visible; }
html:not(.js) .ap-pane[hidden] { display: flex; }
html:not(.js) .chat-log { max-height: 420px; }
html:not(.js) [data-tabs] [data-tab-panel][hidden] { display: block !important; }
html:not(.js) [data-tabs] .tabs-nav { display: none; }

/* ---------------------------------------------------------------- 响应式：宽屏以下 */

@media (max-width: 1280px) {
  .t-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .n-text small { display: none; }
  .t-nav a { padding: 9px 10px; }
  .changes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .changes-grid > :first-child { grid-column: 1 / -1; }
  .bank-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare.cols-3 { grid-template-columns: repeat(3, minmax(300px, 1fr)); margin: -6px; padding: 6px 6px 12px; overflow-x: auto; scroll-snap-type: x proximity; }
  .compare.cols-3 > * { scroll-snap-align: start; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo-card { gap: 14px; padding: 18px; }
  .tc-icon { width: 46px; height: 46px; }
  .tc-body b { font-size: 30px; }
}

@media (max-width: 1100px) {
  .case-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .nb-meta { max-width: none; }
  .mtabs {
    position: sticky; top: calc(var(--top) + 8px); z-index: 20; display: flex; gap: 4px; padding: 5px; border-radius: 16px;
    background: rgba(255, 255, 255, .88); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: var(--sh-2), inset 0 0 0 1px rgba(210, 219, 231, .8);
  }
  .mtabs button {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 0; border-radius: 12px;
    font-size: 14.5px; font-weight: 700; color: var(--ink-2); background: transparent; cursor: pointer; transition: color .2s, background .25s, box-shadow .25s;
  }
  .mtabs button.on { color: #fff; background: var(--grad-brand); box-shadow: var(--sh-brand); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .workspace > [data-pane] { display: none; }
  .workspace > [data-pane].on { display: block; animation: panel-in .35s var(--ease-out) both; }
  html:not(.js) .workspace > [data-pane] { display: block; }
  html:not(.js) .mtabs { display: none; }
  .materials { position: static; max-height: none; overflow: visible; }
  .mat-toc { top: calc(var(--top) + 66px); border-radius: 0; }
  .review-split, .preview-split { grid-template-columns: minmax(0, 1fr); }
  .review-source { position: static; max-height: none; margin: 0; padding: 0; overflow: visible; }
  .accounts-grid { grid-template-columns: minmax(0, 1fr); }
  .create-card { position: relative; top: auto; }
  .auth { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; }
  .auth-intro, .auth-side { justify-self: center; }
  .auth-intro { max-width: 640px; }
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 教师工作台：侧栏改为顶栏 */

@media (max-width: 960px) {
  .t-shell { display: block; }
  .t-side {
    position: sticky; top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px; height: auto; padding: 10px 14px 8px;
    overflow: visible; border-right: 0; border-bottom: 1px solid rgba(210, 219, 231, .7); background: rgba(255, 255, 255, .86);
  }
  .t-brand { order: 1; padding: 0; }
  .t-brand img { width: 32px; height: 32px; border-radius: 10px; }
  .t-brand small { display: none; }
  .t-class { order: 2; flex-direction: row; align-items: center; padding: 0; background: none; box-shadow: none; }
  .t-label { display: none; }
  .t-class select { width: 160px; height: 38px; min-height: 38px; }
  .t-side-foot { order: 3; flex-direction: row; align-items: center; gap: 6px; margin-top: 0; margin-left: auto; }
  .t-help { width: 38px; height: 38px; justify-content: center; padding: 0; font-size: 0; }
  .t-help .i { width: 18px; height: 18px; }
  .t-user { padding: 0; gap: 6px; background: none; box-shadow: none; }
  .t-user-text, .t-version { display: none; }
  .t-balance { flex-direction: row; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; }
  .tb-label, .tb-note, .tb-topup, .tb-refresh { display: none; }
  .tb-amount { margin: 0; font-size: 14px; }
  .t-nav { order: 4; flex: 1 0 100%; flex-direction: row; gap: 6px; margin: 0 -14px; padding: 2px 14px 4px; overflow-x: auto; scrollbar-width: none; }
  .t-nav::-webkit-scrollbar { display: none; }
  .t-nav a { flex: none; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 14px; }
  .t-nav a:hover { transform: none; }
  .t-nav a.on::before { display: none; }
  .n-ico { width: 30px; height: 30px; border-radius: 10px; }
  .n-ico .i { width: 16px; height: 16px; }
  .n-text b { font-size: 14px; }
  .n-text small { display: none; }
  .t-main { padding: 20px 18px 80px; }
  .review-source { top: auto; }
}

@media (max-width: 900px) {
  .task-hero, .task-hero.is-done, .task-hero.is-empty { grid-template-columns: minmax(0, 1fr); }
  .th-tutor { grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 0; margin: 0; }
  .tutor-hero { display: none; }
  .th-face { display: block; grid-column: 1; grid-row: 1; width: 52px; height: 52px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .7); }
  .th-say { grid-column: 2; margin: 0; border-radius: 4px 18px 18px 18px; animation-delay: .2s; }
  .chat-scrim {
    position: fixed; inset: 0; z-index: 44; display: block; background: rgba(15, 28, 52, .32);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s linear .35s;
  }
  .chat-open .chat-scrim { opacity: 1; visibility: visible; transition: opacity .35s, visibility 0s; }
  .todo-row, .ob-steps, .export-grid, .follow-grid, .grid-2, .grid-2.inner { grid-template-columns: minmax(0, 1fr); }
  .ob-steps li .btn { margin-left: 44px; }
  .flow-map { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fm-arrow { justify-self: center; transform: rotate(90deg); }
  .queue-steps { flex-direction: column; align-items: stretch; }
  .qs-arrow { align-self: center; transform: rotate(90deg); }
}

/* ---------------------------------------------------------------- 手机 */

@media (max-width: 720px) {
  :root { --top: 58px; }
  body { font-size: 14.5px; }
  h1 { font-size: 24px; }
  .topbar-inner { gap: 10px; padding: 0 14px; }
  .brand img { width: 30px; height: 30px; }
  .brand-text small { display: none; }
  .brand-text b { font-size: 14px; }
  .topnav { gap: 2px; }
  .topnav a { height: 34px; padding: 0 10px; font-size: 14px; }
  .topnav a .i { display: none; }
  .topnav a.on::after { left: 10px; right: 10px; bottom: -12px; }
  .top-right { gap: 4px; }
  .top-help { width: 34px; justify-content: center; padding: 0; }
  .top-help span, .who-text { display: none; }
  .avatar { width: 32px; height: 32px; font-size: 13px; }
  .sandbox-bar { padding: 8px 14px; font-size: 12.5px; }
  .t-brand span { display: none; }
  .t-side { gap: 8px 10px; }

  .page { padding: 18px 14px 120px; }
  .page > * + * { margin-top: 16px; }
  .page-head { align-items: flex-start; }
  .card { padding: 18px 16px; border-radius: 18px; }
  .card-head { margin-bottom: 12px; }
  .hint { margin-left: 0; }
  .toasts { top: calc(var(--top) + 8px); left: 12px; right: 12px; width: auto; }

  .home-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .home-head h1 { font-size: 26px; }
  .home-meter { align-self: flex-start; }
  .task-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 20px; border-radius: 24px; }
  .th-steps { padding: 14px 12px 10px; }
  .step-text small { display: none; }
  .unit-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .notice-strip, .update-notice, .next-card { flex-wrap: wrap; }
  .update-notice { align-items: flex-start; }
  .update-notice > div { flex-basis: calc(100% - 60px); }
  .update-notice > .btn { margin-left: 60px; }

  .case-heading h1 { font-size: 23px; }
  .case-steps { padding: 12px 10px 8px; border-radius: 18px; }
  .now-bar { flex-wrap: wrap; gap: 12px; padding: 14px 16px; border-radius: 18px; }
  .nb-icon { width: 42px; height: 42px; border-radius: 14px; }
  .nb-meta { flex-basis: 100%; justify-content: flex-start; }
  .mat-inner { padding: 0 16px 16px; }
  .mat-toc { margin: 0 -16px; padding: 12px 16px 10px; }
  .form-block { padding: 18px 16px; }
  .choices, .decisions, .declare-grid { grid-template-columns: minmax(0, 1fr); }
  .decisions .choice-card { flex-wrap: nowrap; }
  .decisions .choice-check, .decisions .choice-text { order: 0; margin-left: 0; flex-basis: auto; }
  .submit-bar { bottom: 10px; gap: 8px 10px; padding: 10px; border-radius: 20px; }
  .submit-bar .sb-progress { order: 1; }
  .submit-bar .autosave { order: 2; flex: 1; min-width: 0; }
  .submit-bar .demo-fill { order: 3; flex-basis: 100%; }
  .submit-bar .demo-fill .btn { flex: 1; }
  .submit-bar [data-submit] { order: 4; flex: 1 1 100%; margin-left: 0; }
  .sealed-head { flex-wrap: wrap; gap: 10px; padding: 14px; }
  .sealed > .checks, .sealed > .checks-held, .sealed > .review-card { margin: 0 12px 12px; }
  .sealed-inner { padding: 0 12px; }
  .review-dims li { grid-template-columns: auto minmax(0, 1fr); }
  .review-dims q, .review-dims p { grid-column: 1 / -1; }

  .tutor-float { right: 12px; bottom: 18px; width: 88px; height: 118px; border-radius: 22px; }
  .tf-name { bottom: -10px; height: 24px; padding: 0 9px 0 8px; font-size: 12px; }
  .tf-name small { display: none; }
  .bar-on .tutor-float { bottom: calc(var(--bar-h, 110px) + 30px); }
  .agent-pop { right: 112px; bottom: 44px; max-width: calc(100vw - 128px); font-size: 13px; }
  .bar-on .agent-pop { bottom: calc(var(--bar-h, 110px) + 56px); }
  .blk-head { flex-wrap: wrap; }
  .hint-btn { height: 28px; padding: 0 10px; }
  .submit-bar .sb-check { order: 4; flex: 0 0 auto; }
  .submit-bar [data-submit] { order: 5; flex: 1 1 0; }
  .chat {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; height: 88vh; height: 88dvh; border-radius: 26px 26px 0 0;
    transform: translateY(105%);
  }
  .ap-stage { grid-template-columns: 116px minmax(0, 1fr); height: 156px; }
  .ap-stage::after { content: ""; position: absolute; left: 50%; top: 7px; z-index: 3; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(15, 40, 90, .18); }
  .ap-side { padding-top: 18px; }
  .agent-say { font-size: 13px; }
  body.chat-open { overflow: hidden; }

  .stat-row { grid-template-columns: 96px minmax(0, 1fr) 56px; gap: 10px; }
  .hbars li { grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) 34px; gap: 10px; }
  .vrow { grid-template-columns: 70px minmax(0, 1fr) 48px; gap: 10px; }
  .dc-row { grid-template-columns: 88px repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; }
  .changes-grid { grid-template-columns: minmax(0, 1fr); }
  .compare.cols-3, .compare.cols-2 { margin: -6px -14px; padding: 6px 14px 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .compare.cols-3 { grid-template-columns: repeat(3, 86vw); }
  .compare.cols-2 { grid-template-columns: repeat(2, 86vw); }
  .compare > * { scroll-snap-align: center; }
  .todo-card { padding: 16px; }
  .tc-body b { font-size: 28px; }
  .mini-stats b { font-size: 26px; }
  .release-card { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 16px 16px 20px; }
  .rl-side { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .follow-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fk { justify-self: start; margin-top: 0; }
  .bank-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 22px; }
  .survey-grid, .dims-dist { grid-template-columns: minmax(0, 1fr); }
  .effect-summary .es-arrow { display: none; }
  .rubric-doc { padding: 20px 16px; }
  .drawer-body { padding: 16px 18px 32px; }

  .demo-login { flex-direction: column; align-items: stretch; }
  .bounds, .guide-notes ul { grid-template-columns: minmax(0, 1fr); }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-band h1 { font-size: 28px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .auth { gap: 28px; padding: 28px 16px 36px; }
  .auth-title { margin-top: 20px; font-size: 34px; }
  .auth-lead { margin-top: 12px; font-size: 14.5px; line-height: 1.8; }
  .auth-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
  .auth-steps li { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 16px; }
  .auth-steps li:hover { transform: none; }
  .auth-steps li > div > span { display: none; }
  .auth-steps li b { font-size: 14px; }
  .as-no { width: 36px; height: 36px; border-radius: 12px; font-size: 13px; }
  .auth-card { padding: 26px 20px 20px; border-radius: 24px; }
  .auth-card-head h2 { font-size: 23px; }
  .js .pin-cells { gap: 6px; }
  .pin-cells i { height: 52px; border-radius: 14px; }
  .error-code span { font-size: 96px; }
}

@media (max-width: 440px) {
  .brand-text { display: none; }
  .task-hero h2 { font-size: 22px; }
  .sb-count small { display: none; }
  .auth-lead { display: none; }
  .auth-title { font-size: 30px; }
  .th-actions .btn { width: 100%; }
  .th-kind { width: 100%; }
  .t-class select { width: 132px; }
}

/* ---------------------------------------------------------------- 打印 */

@media print {
  @page { margin: 14mm 12mm; }
  html, body { background: #fff; }
  body { font-size: 12.5px; }
  body::before, .topbar, .t-side, .chat, .chat-scrim, .tutor-float, .agent-pop, .hint-btn, .hint-card, .sb-check, .th-tutor, .toasts, .sandbox-bar, .readonly-bar, .submit-bar,
  .ph-actions, .subnav, .mtabs, .seal-overlay, .drawer, .drawer-scrim, .quote-pop, .restart, .back-link, .ai-actions, .job-progress { display: none !important; }
  .ai-card::before { display: none; }
  .ar-cols { grid-template-columns: minmax(0, 1fr); }
  .ar-block, .ar-list > li, .ar-steps li { break-inside: avoid; }
  .t-shell { display: block; }
  .t-main, .page { max-width: none; padding: 0; }
  .card, .todo-card, .kpi, .sealed, .materials, .review-card, .checks, .export-card, .release-card {
    box-shadow: none !important; border: 1px solid #d2dbe7; break-inside: avoid; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .materials { position: static; max-height: none; overflow: visible; }
  .mat-toc { display: none; }
  .workspace { display: block; }
  .workspace > [data-pane] { display: block !important; }
  .workspace > * + * { margin-top: 16px; }
  .sealed-body { grid-template-rows: 1fr; }
  .review-split, .preview-split { display: block; }
  .review-source { position: static; max-height: none; overflow: visible; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  a { color: inherit; }
  body.printing-slips .t-main > *:not(.slips-card) { display: none !important; }
  body.printing-slips .slips-card { padding: 0; border: 0; }
  body.printing-slips .slips-card .card-head .row { display: none; }
  body.printing-slips .slips { grid-template-columns: repeat(3, 1fr); gap: 0; }
  body.printing-slips .slip { border-radius: 0; break-inside: avoid; animation: none; }
}

/* ---------------------------------------------------------------- 减少动效 */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .seal-overlay { display: none; }
  .aurora i { animation: none !important; }
  .auth-card::before { animation: none !important; }
  .tutor-canvas { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
