/* ============================================================================
   作业巩固 · 全局样式
   设计原则：少边框、多留白、层级靠字重和灰度区分，不靠装饰。
   类名与 JS 生成的结构一一对应，改样式不影响逻辑。
   ========================================================================== */

:root {
  --bg: #f4f6fa;
  --surface: #fff;
  --surface-2: #f8f9fc;

  --ink: #1a1f2b;
  --ink-2: #5a6474;
  --ink-3: #8b95a6;

  --line: #e4e8f0;
  --line-2: #eef1f6;

  --brand: #4a63e7;
  --brand-ink: #3a50c9;
  --brand-2: #7a5af0;
  --brand-soft: rgba(74, 99, 231, .09);

  --ok: #12a05f;
  --warn: #c97a05;
  --bad: #d93a28;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 28, 44, .04), 0 8px 24px rgba(20, 28, 44, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }

/* ---------------------------------------------------------------- 顶栏 */
/* 两端共用同一套结构：logo + 标题 + 状态位 + 右侧导航。
   之前学生端是「标题 + guest 徽标 + 历史 + 管理端」，
   管理端是「标题 + LLM 徽标 + 学生端 + 管理端」，
   位置、层数、间距都不一样，看起来像两个站。现在统一。 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 24px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
/* 状态位：紧跟在标题后面，两端尺寸一致，只换内容 */
.topbar .status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-2);
  font-size: 12px; font-weight: 500; white-space: nowrap; flex: none;
}
.topbar .status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3); flex: none;
}
.topbar .status.on { background: #eaf7f0; color: #0d7a49; }
.topbar .status.on::before { background: var(--ok); }
.topbar .status.off { background: #fff4e6; color: #95590a; }
.topbar .status.off::before { background: var(--warn); }
/* 可点的状态位（学生端改名字）给一点反馈，但长相与普通状态位一致 */
.topbar .status.clickable { cursor: pointer; }
.topbar .status.clickable:hover { background: #e6eaf4; color: var(--ink); }

.topbar .spacer { flex: 1; }

/* 端切换：两个端是一个整体控件，用分段(segmented)样式表达"二选一"。
   页内功能（如学生端的「历史」）不放进来，否则会读成"三选一"。 */
.topbar .nav.switch {
  display: flex; align-items: center; gap: 2px; flex: none;
  padding: 3px; border-radius: 10px;
  background: var(--line-2);
  border: 1px solid var(--line);
}
.topbar .nav.switch a {
  padding: 5px 14px; border-radius: 7px;
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
}
.topbar .nav.switch a:hover { background: #e8ecf5; color: var(--ink); }
.topbar .nav.switch a.active {
  background: var(--surface); color: var(--brand); font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 28, 44, .08);
}

/* 页内操作条：放在内容区顶部，与顶栏的端切换分层。
   「历史」这类页内功能放这里，不会和"选哪个端"混在一起。 */
.page-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin-bottom: 12px;
}
.page-action {
  padding: 6px 12px; border-radius: 8px;
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface);
  transition: background .15s, border-color .15s, color .15s;
}
.page-action:hover { background: var(--surface-2); border-color: #cfd7e6; color: var(--ink); }

/* 兼容旧的 .nav 写法（其它地方若还用到） */
.topbar .nav { display: flex; align-items: center; gap: 4px; flex: none; }
.topbar .nav a {
  padding: 6px 12px; border-radius: 8px; white-space: nowrap;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.topbar .nav a:hover { background: var(--line-2); color: var(--ink); }
.topbar .nav a.active { color: var(--brand); background: var(--brand-soft); }

.wrap { max-width: 940px; margin: 0 auto; padding: 28px 20px 96px; }

/* ---------------------------------------------------------------- 步骤条 */
.steps { display: flex; align-items: center; margin: 0 0 20px; }
.step {
  display: flex; align-items: center; gap: 9px; flex: 1 1 auto;
  font-size: 14px; color: var(--ink-3); font-weight: 500; white-space: nowrap;
}
.step:last-child { flex: 0 0 auto; }
.step::after {
  content: ''; flex: 1 1 auto; height: 2px; min-width: 14px;
  margin: 0 12px; border-radius: 2px; background: var(--line);
}
.step:last-child::after { display: none; }
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: #eaeef5; color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
  transition: background .15s, color .15s, box-shadow .15s;
}
.step.active { color: var(--brand); font-weight: 600; }
.step.active .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.step.done { color: var(--ink-2); }
.step.done .dot { background: var(--ok); color: #fff; }

/* ---------------------------------------------------------------- 层级体系 */
/*
 * 三层，各司其职，不重叠：
 *
 *   L0 页面背景   --bg (#f4f6fa)      整页铺底
 *   L1 区块 .card  --surface 白底 + 8px 圆角 + 极淡阴影
 *                   → 用来「分组内容」，是页面上的大块区域
 *   L2 行    .row  -- 在 card 内部，无底色无边框，靠分隔线区分
 *                   → 用来「列出一组同类东西」
 *   控件     input/select/button 自带边框
 *
 * 关键：L1 用「白底 + 大圆角 + 阴影」而不是「白底 + 细边框」。
 * 细边框会和内部控件/选项的细边框撞成一片，看起来处处是框；
 * 改用阴影后，区块靠「浮起」表达，内部控件靠「描边」表达，
 * 两种语言不打架，嵌套也不再是"边框套边框"。
 */
.card {
  background: var(--surface);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20, 28, 44, .05), 0 4px 14px rgba(20, 28, 44, .045);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.card > h2, .card h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.card .sub { color: var(--ink-3); font-size: 13px; margin: 5px 0 16px; }
.card .sub:last-child { margin-bottom: 0; }

/* 无标题的裸区块：用来包表单主体，省掉多余留白 */
.card.tight { padding: 18px 20px; }

/* 区块之间的分隔：在 card 内部分组时用，比再画一个框轻得多 */
.card-sep { height: 1px; background: var(--line-2); margin: 18px 0; }

/* 强调区块（总评、发布表单）：白底更大更亮，加一点内阴影区分层级 */
.card.hero {
  padding: 30px 32px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(20, 28, 44, .05), 0 10px 30px rgba(20, 28, 44, .07);
}

/* card 内的列表容器：只负责纵向排布，不画任何东西 */
.list { display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- 表单 */
.field { margin-bottom: 16px; }
.field > label {
  display: block; margin-bottom: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.field > label .req { color: var(--bad); margin-left: 2px; }

input[type=text], input[type=password], textarea, select {
  width: 100%; padding: 11px 14px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea { resize: vertical; min-height: 116px; line-height: 1.7; }
select { cursor: pointer; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--brand); color: #fff;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--brand-ink); color: #fff; filter: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); border-color: #cfd7e6; color: var(--ink); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.sm.danger, .btn.sm.ghost.danger { color: var(--bad); border-color: #f0cfca; }
.btn.sm.ghost.danger:hover { background: #fdf3f1; border-color: #e8b5ae; color: var(--bad); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

/* 表单底部动作条：不加卡片，省一层容器 */
.actions-bar {
  display: flex; justify-content: flex-end; gap: 10px;
  flex-wrap: wrap; margin-top: 4px;
}

/* ---------------------------------------------------------------- 作业列表 */
/* 作业行：card 内部的一行。没有底色、没有边框、没有圆角——
   它不是一个"小卡片"，它是列表里的一条。悬停时右侧浮现「选它」的强调。 */
.assign {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .15s;
}
.assign:last-child { border-bottom: 0; padding-bottom: 4px; }
.assign:first-child { padding-top: 4px; }
/* 悬停只给极淡底 + 轻微内缩，不再整块变白卡片 */
.assign:hover { background: rgba(74, 99, 231, .035); }
.assign .t { font-weight: 600; font-size: 15px; }
.assign .p {
  font-size: 13px; color: var(--ink-2); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.assign .meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.tag {
  display: inline-block; font-size: 12px; line-height: 1.6;
  padding: 1px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2);
}
.badge {
  display: inline-block; font-size: 12px; line-height: 1.6;
  padding: 1px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
}
.badge.math { background: var(--brand-soft); color: var(--brand-ink); }
.badge.report { background: rgba(122, 90, 240, .1); color: #6244d8; }

/* ---------------------------------------------------------------- 选项 / 题干 */
/* 选项：可点的实体，保留细边框（点击边界要清楚），
   但不再叠在卡片里——外层的卡片已经改成无框了 */
.opt {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt:last-child { margin-bottom: 0; }
.opt:hover { border-color: #c3cdf0; }
.opt.sel { border-color: var(--brand); background: #f7f9ff; }
.opt .k { font-weight: 700; color: var(--brand); min-width: 16px; flex: none; }

.qstem { font-size: 16px; font-weight: 600; line-height: 1.7; margin-bottom: 16px; }
.qmeta { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }

/* 标题行下方的可选块：有内容时才占间距，空着不留白 */
#warnings:not(:empty) { margin-top: 14px; }
#myFilesCard:not(.hidden) { margin-top: 16px; }

/* ---------------------------------------------------------------- 反馈 */
.feedback {
  padding: 12px 16px; border-radius: 12px;
  margin-top: 14px; font-size: 14px; line-height: 1.7;
}
.feedback.ok { background: #eaf9f1; color: #0b6b3e; }
.feedback.bad { background: #fdeeec; color: #a8271a; }
.feedback.partial { background: #fff6e8; color: #8f5604; }

.notice {
  font-size: 13px; color: var(--warn);
  background: #fff8ec; border: 1px solid #ffe3b8;
  padding: 10px 14px; border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------- 总评 */
.score-ring { display: flex; align-items: center; gap: 24px; }
.ring {
  --v: 0;
  width: 118px; height: 118px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--brand) calc(var(--v) * 1%), var(--line) 0);
  display: grid; place-items: center;
}
.ring > div {
  width: 92px; height: 92px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; align-content: center; text-align: center;
}
.ring .num { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.ring .lbl { font-size: 12px; color: var(--ink-3); }
.grade { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.grade.proficient { color: var(--ok); }
.grade.basic { color: var(--brand); }
.grade.todo { color: var(--warn); }
.comment { font-size: 15px; color: var(--ink-2); }

/* ---------------------------------------------------------------- 视频 */
.video { display: flex; flex-direction: column; gap: 4px; }
.video .vt { font-weight: 600; }
.video .vd { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* ---------------------------------------------------------------- 公式块 */
.katex-preview {
  margin-top: 10px; padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 14px; line-height: 1.8;
}
.katex-preview:empty { display: none; }

/* ---------------------------------------------------------------- 时间线 */
.timeline { border-left: 2px solid var(--line); margin-left: 4px; padding-left: 18px; }
.timeline .item { position: relative; padding-bottom: 14px; }
.timeline .item:last-child { padding-bottom: 0; }
.timeline .item::before {
  content: ''; position: absolute; left: -25px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px var(--bg);
}
.timeline .item .h { font-weight: 600; }
.timeline .item .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ---------------------------------------------------------------- 弹层 */
.modal {
  position: fixed; inset: 0; z-index: 60; padding: 20px;
  background: rgba(18, 23, 33, .45);
  backdrop-filter: blur(2px);
  display: none; place-items: center;
}
.modal.open { display: grid; }
.modal .box {
  background: var(--surface); border-radius: var(--radius);
  max-width: 680px; width: 100%; max-height: 84vh;
  overflow: auto; padding: 24px;
  box-shadow: 0 24px 60px rgba(15, 22, 38, .28);
}
.modal .box h3 { margin: 0 0 14px; font-size: 17px; }

/* 预览弹层：比普通弹窗大得多，图片/PDF 才看得清 */
.preview-box {
  max-width: min(1100px, 94vw); width: 94vw; max-height: 92vh;
  padding: 14px 18px 18px;
  display: flex; flex-direction: column;
}
.preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.preview-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-body { overflow: auto; padding-top: 14px; flex: 1; }
.preview-text {
  white-space: pre-wrap; word-break: break-word;
  font-size: 13px; line-height: 1.75; margin: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.docx-preview { font-size: 14px; line-height: 1.85; word-break: break-word; }
.docx-preview img { max-width: 100%; height: auto; }
.docx-preview table { border-collapse: collapse; max-width: 100%; }
.docx-preview td, .docx-preview th { border: 1px solid var(--line); padding: 5px 9px; }
.docx-preview p { margin: 0 0 8px; }

/* ---------------------------------------------------------------- 附件 */
.attach-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; min-height: 26px;
}
.attach-head .attach-count { font-size: 13px; color: var(--ink-3); }
.attach-list { display: flex; flex-direction: column; gap: 6px; }
/* 附件行：列表里的一行，不要框。信息本身够清楚，框只会让它显得像独立卡片 */
.attach-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  font-size: 13px;
}
.attach-row:last-child { border-bottom: 0; }
.attach-icon { display: none; } /* 图标已去掉，保留规则以免旧缓存页面错位 */
/* 文件名 + 次要信息两行；名字过长省略，不把按钮挤走 */
.attach-main { flex: 1 1 auto; min-width: 0; }
.attach-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.attach-sub { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 12px; color: var(--ink-3); }
.attach-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.attach-tag {
  font-size: 11px; line-height: 1.7; padding: 0 7px; border-radius: 6px;
  background: #eef1f7; color: var(--ink-2); flex: none;
}
.attach-tag.warn { background: #fff4e0; color: #96620f; }

/* 添加附件：隐藏原生 input，用 label 当按钮 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.attach-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; margin-bottom: 8px; }
.attach-bar .hint { font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 管理端 */
/* 已发布作业：card 内部的行，点开才看附件与分析。
   行本身不画框——它已经在 card 里了，再画框就是套娃。 */
.asg-item {
  margin: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
}
.asg-item:last-child { border-bottom: 0; }

.asg-sum {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; cursor: pointer; list-style: none;
  transition: background .15s;
}
.asg-sum::-webkit-details-marker { display: none; }
.asg-sum:hover { background: rgba(74, 99, 231, .035); }
/* 左侧展开指示：收起是 ▸，展开是 ▾ */
.asg-sum::before {
  content: '▸'; flex: none;
  color: var(--ink-3); font-size: 11px; line-height: 1;
  transition: transform .15s;
}
.asg-item[open] .asg-sum::before { transform: rotate(90deg); }

.asg-sum-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.asg-item .t { font-weight: 600; font-size: 15px; }
/* 摘要行的标签压缩间距，别把标题挤掉 */
.asg-sum .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.asg-sum-act { flex: none; }
/* 删除按钮在 summary 里，避免点它时顺带展开 */
.asg-sum-act .btn { pointer-events: auto; }

.asg-body {
  padding: 4px 16px 16px 40px;      /* 左侧缩进对齐标题，视觉上有层次 */
  border-top: 1px solid var(--line-2);
}
.asg-body > *:first-child { margin-top: 14px; }
.asg-content {
  font-size: 13px; color: var(--ink-2); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
}

/* AI 分析：展开后的次要信息，靠浅底与缩进区分，
   不再画第二个边框（它已经在展开区里，再框一层就是三层套娃） */
.analysis-box {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 0;
  border-left: 2px solid var(--line);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px; line-height: 1.9;
  margin-top: 4px;
}
.analysis-box .an-row { display: flex; gap: 10px; align-items: baseline; }
.analysis-box .an-row + .an-row { margin-top: 4px; }
.analysis-box .an-k { color: var(--ink-3); flex: none; min-width: 64px; }
.analysis-box .an-v { flex: 1; }
.analysis-cap { font-size: 12px; color: var(--ink-3); margin: 12px 0 8px; }

/* 运行状态：紧凑一行行 */
.stat-list { font-size: 13px; color: var(--ink-2); line-height: 2; }
.stat-list b { font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------- 通用 */
.hidden { display: none !important; }
.muted { color: var(--ink-3); font-size: 13px; }
.loading { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; }
.spinner {
  width: 15px; height: 15px; flex: none;
  border: 2px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* minmax(0,1fr)：不加这个，长内容会把列撑成不等宽 */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 16px; }

/* 管理端：表单定宽，作业列表拿剩余宽度（等宽会把附件名挤断） */
.wrap-admin { max-width: 1120px; }
.wrap-admin .grid2 { grid-template-columns: 380px minmax(0, 1fr); }

/* ---------------------------------------------------------------- 管理端布局 */
/* 概览：一张 card 里横排四个数字。数字之间用竖线分隔，
   不再像以前那样四个数字各套一个小 card（那会让页面被切成碎块）。 */
.overview-card { padding: 20px 24px; }
.overview {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.overview .ov { padding: 0 22px; border-left: 1px solid var(--line); }
.overview .ov:first-child { padding-left: 0; border-left: 0; }
.overview .ov-k { font-size: 12px; color: var(--ink-3); }
.overview .ov-v {
  font-size: 25px; font-weight: 700; line-height: 1.25; margin-top: 3px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.overview .ov-s { font-size: 12px; color: var(--ink-3); }

/* card 头部：标题 + 操作同一行，下方用细线分隔列表内容 */
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 6px;
}
.card-head-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-head-l h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .2px; }

/* 发布页：表单页不需要列表那么宽，收窄一点更好填 */
.wrap-form { max-width: 680px; }
.wrap-form .card.hero { padding: 32px 34px; }
.wrap-form .actions-bar { margin-top: 26px; }

/* 发布弹层：比普通弹窗宽，字段还是单列好填 */
.box-form { max-width: 720px; }
.box-form h3 { margin-bottom: 4px; }

/* 表单分组：把「基本信息 / 题目内容 / 附件」分开，长表单不再糊成一列 */
.form-group + .form-group { margin-top: 22px; }
.form-group-t {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .04em; margin-bottom: 10px;
}
.form-group .field + .field { margin-top: 12px; }
/* 同一行放两个短字段，省掉一段垂直空间 */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.field-row .field + .field { margin-top: 0; }

/* 明细面板：默认收起，本身就是一张 card，靠 summary 行展开 */
.detail-panel { padding: 0; overflow: hidden; }
.detail-panel > summary {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 24px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 15px;
}
.detail-panel > summary::-webkit-details-marker { display: none; }
.detail-panel > summary:hover { background: var(--surface-2); }
.detail-panel > summary::after {
  content: '展开'; margin-left: auto;
  font-size: 12px; font-weight: 400; color: var(--ink-3);
}
.detail-panel[open] > summary::after { content: '收起'; }
.detail-panel[open] > summary { border-bottom: 1px solid var(--line-2); }
.detail-panel .detail-body { padding: 18px 24px 20px; }
.detail-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  padding: 14px 0 2px;
}
.detail-t { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; }

@media (max-width: 900px) {
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview .ov:nth-child(3) { padding-left: 0; border-left: 0; }
  .overview .ov:nth-child(-n+2) { padding-bottom: 14px; }
  .detail-body { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 520px) {
  .overview { grid-template-columns: 1fr; }
  .overview .ov { padding: 10px 0; border-left: 0; border-top: 1px solid var(--line-2); }
  .overview .ov:first-child { border-top: 0; padding-top: 0; }
  .field-row { grid-template-columns: 1fr; }
  .field-row .field + .field { margin-top: 12px; }
  .card-head { flex-direction: column; align-items: stretch; }
  .card-head .btn { width: 100%; }
}

@media (max-width: 760px) {
  .grid2, .wrap-admin .grid2 { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar h1 { font-size: 15px; }
  .topbar .logo { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
  .topbar .nav a { padding: 6px 8px; font-size: 13px; }
  .wrap { padding: 18px 14px 72px; }
  .card { padding: 18px; }
  .score-ring { gap: 18px; }

  /* 步骤条：窄屏收紧间距 */
  .step { flex: none; font-size: 12px; gap: 5px; }
  .step .dot { width: 22px; height: 22px; font-size: 12px; }
  .step::after { margin: 0 5px; min-width: 8px; }
  .step:not(:last-child)::after { display: block; }
}
@media (max-width: 420px) {
  .topbar h1 { display: none; }
}
