/* ============================================================
   FIRST DESK · 投行实习学院 — 视觉样式
   暖白背景 / 深海军蓝 / 荧光黄绿强调 / 细边框 / 宽留白
   ============================================================ */

:root {
  --bg: #f7f4ee;
  --bg-soft: #fdfbf7;
  --panel: #ffffff;
  --navy: #12263f;
  --navy-2: #1c3552;
  --navy-deep: #0d1c30;
  --ink: #12263f;
  --ink-2: #40536b;
  --ink-3: #7286a0;
  --line: #e3ddd1;
  --line-soft: #ece7dc;
  --accent: #d8f34a;
  --accent-soft: #f0f9c8;
  --accent-ink: #2c3a06;
  --ok: #1d7a4f;
  --ok-soft: #e4f4ea;
  --warn: #a35a12;
  --warn-soft: #fbeedd;
  --danger: #b23b3b;
  --danger-soft: #fbe7e4;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 38, 63, 0.05), 0 10px 28px rgba(18, 38, 63, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: 0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 99;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- 布局骨架 ---------------- */
.shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #e9eef5;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--navy-deep);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 15px; letter-spacing: 0.08em; }
.brand-text span { font-size: 12px; color: #9fb2c8; letter-spacing: 0.12em; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: #b9c8da;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-item.active {
  background: var(--accent);
  color: var(--navy-deep);
  font-weight: 600;
}
.nav-icon { display: grid; place-items: center; }

.sidebar-foot { margin-top: auto; padding: 18px 8px 0; }
.season-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(216, 243, 74, 0.35);
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.season-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.sidebar-note { margin-top: 14px; font-size: 11.5px; color: #7d92ab; line-height: 1.7; }

.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0.05em; min-width: 0; }
.season-label { color: var(--ink-2); font-weight: 600; }
.progress-label { color: var(--ink-3); }
.sep { color: var(--line); }
.topbar-right { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.storage-chip {
  font-size: 12px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.storage-chip.warn { border-color: #e5c48c; background: var(--warn-soft); color: var(--warn); }
.topbar-link {
  font-size: 13px; text-decoration: none; font-weight: 600;
  color: var(--ink); border-bottom: 1px solid var(--accent);
  padding-bottom: 1px; white-space: nowrap;
}

.main {
  flex: 1 1 auto;
  padding: 34px 32px 48px;
  max-width: 1240px;
  width: 100%;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 20px 32px 30px;
  color: var(--ink-3);
  font-size: 12px;
  max-width: 1240px;
}

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.card.soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: 0.16em;
  color: var(--ink-3); text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px;
}

.section-title { font-size: 19px; margin-bottom: 6px; }
.section-desc { color: var(--ink-2); font-size: 13.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  padding: 11px 20px;
  border-radius: 11px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #cdEC3f; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.tag {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag-accent { background: var(--accent-soft); border-color: #dcefa0; color: var(--accent-ink); }
.tag-fact { background: var(--ok-soft); border-color: #bfe3cd; color: var(--ok); }
.tag-assume { background: var(--warn-soft); border-color: #ecd3ac; color: var(--warn); }
.tag-rule { background: #e8eef7; border-color: #c9d8ea; color: var(--navy); }
.tag-plan { background: #efeaf6; border-color: #d8cbea; color: #5a3e86; }
.tag-data { background: var(--bg-soft); border-color: var(--line); color: var(--ink-2); }

.case-banner {
  display: flex; align-items: center; gap: 10px;
  border: 1px dashed #c9d86a;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
}
.case-banner svg { flex: 0 0 auto; }

.notice {
  margin: 18px 32px 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid #ecd3ac;
  background: var(--warn-soft);
  color: var(--warn);
  display: flex; align-items: center; gap: 10px;
}
.notice.info { border-color: #c9d8ea; background: #eaf0f8; color: var(--navy); }

/* ---------------- 英雄区 ---------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}
.hero-main {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 78%);
  color: #eef3f9;
  border-radius: var(--radius);
  padding: 38px 38px 34px;
  position: relative;
  overflow: hidden;
}
.hero-main::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1.5px solid rgba(216, 243, 74, 0.28);
}
.hero-main .eyebrow { color: var(--accent); }
.hero-main .eyebrow::before { background: var(--accent); }
.hero-title {
  font-size: 34px;
  line-height: 1.28;
  margin: 16px 0 12px;
  letter-spacing: 0.01em;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { color: #b7c6d8; font-size: 14.5px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-actions .btn-ghost {
  background: transparent; color: #e6edf5; border-color: rgba(230, 237, 245, 0.35);
}
.hero-actions .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-meta {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(230, 237, 245, 0.16);
  display: flex; flex-wrap: wrap; gap: 20px;
  color: #93a7bf; font-size: 12.5px;
}
.hero-meta strong { display: block; color: #e8eef5; font-size: 15px; font-weight: 700; }

.brief-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.brief-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brief-title { font-size: 15px; }
.brief-list { display: flex; flex-direction: column; gap: 10px; }
.brief-row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-soft); }
.brief-row:last-child { border-bottom: none; padding-bottom: 0; }
.brief-row dt { font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-3); }
.brief-row dd { margin: 0; font-size: 13.5px; color: var(--ink); font-weight: 600; }

/* ---------------- 统计条 ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stat-label { font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; }
.stat-value { font-size: 30px; font-weight: 750; line-height: 1.25; margin-top: 6px; letter-spacing: -0.01em; }
.stat-value small { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.stat-sub { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.stat.accent { background: var(--accent-soft); border-color: #dcefa0; }

.path-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
}
.path-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.path-bar {
  display: flex; gap: 6px;
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.path-step {
  flex: 1 1 0;
  min-width: 74px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--bg-soft);
  text-decoration: none;
}
.path-step .num {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}
.path-step.done { background: var(--accent-soft); border-color: #d3e88c; color: var(--accent-ink); font-weight: 600; }
.path-step.current { border-color: var(--navy); color: var(--navy); font-weight: 700; }

/* ---------------- 岗位卡 ---------------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.role-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
}
.role-card-head { display: flex; align-items: flex-start; gap: 13px; }
.role-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--navy);
  color: var(--accent);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.role-name { font-size: 16px; }
.role-en { font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; }
.role-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-left: auto; }
.role-desc { font-size: 13px; color: var(--ink-2); }
.role-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.role-fact { min-width: 0; }
.role-fact dt { font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }
.role-fact dd { margin: 2px 0 0; font-size: 12.8px; color: var(--ink); line-height: 1.65; }
.role-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: auto; padding-top: 4px; }
.role-status { font-size: 12px; color: var(--ink-3); }
.role-status b { color: var(--ink); font-size: 13px; }

/* ---------------- 协作地图 ---------------- */
.map-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.map-note .card { font-size: 13px; color: var(--ink-2); }
.map-note h3 { font-size: 14px; margin-bottom: 8px; color: var(--ink); }

.switch-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 4px;
  gap: 4px;
}
.switch button {
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.switch button.on { background: var(--navy); color: #fff; }
.switch-desc { font-size: 12.5px; color: var(--ink-3); }

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  min-width: 0;
}
.map-card-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 18px 20px;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  color: var(--ink);
}
.map-card-btn:hover { background: var(--bg-soft); }
.map-card.open .map-card-btn { border-bottom: 1px solid var(--line-soft); }
.map-card-btn .grow { flex: 1 1 auto; min-width: 0; }
.map-card-btn .chev { transition: transform 0.18s ease; color: var(--ink-3); flex: 0 0 auto; }
.map-card.open .chev { transform: rotate(180deg); }
.map-body { padding: 4px 20px 20px; display: none; }
.map-card.open .map-body { display: block; }
.map-rows { display: flex; flex-direction: column; gap: 12px; }
.map-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; font-size: 13px; }
.map-row dt { color: var(--ink-3); font-size: 12px; letter-spacing: 0.06em; padding-top: 1px; }
.map-row dd { margin: 0; color: var(--ink-2); }
.map-terms { display: flex; flex-wrap: wrap; gap: 7px; }
.workflow-box {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 13px 15px;
  font-size: 12.8px;
  color: var(--ink-2);
}
.workflow-box strong { color: var(--ink); }
.workflow-label {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

/* ---------------- 任务列表 ---------------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; }
.field select,
.field input,
.field textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 180px;
}
.filter-count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); padding-bottom: 10px; }

.task-list { display: flex; flex-direction: column; gap: 14px; }
.task-row {
  display: flex; align-items: center; gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  flex-wrap: wrap;
}
.task-row-main { flex: 1 1 320px; min-width: 0; }
.task-row-title { font-size: 15px; font-weight: 700; }
.task-row-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.task-row-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.task-row-side { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.score-pill {
  font-size: 12px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
  background: var(--bg-soft);
}
.score-pill.ok { background: var(--ok-soft); border-color: #bfe3cd; color: var(--ok); }

/* ---------------- 任务详情 ---------------- */
.task-head {
  display: flex; align-items: flex-start; gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.task-head-main { flex: 1 1 320px; min-width: 0; }
.task-title { font-size: 24px; line-height: 1.35; margin: 8px 0 8px; }
.task-goal { color: var(--ink-2); font-size: 13.5px; }
.task-nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.task-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.side-card h3 { font-size: 13px; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 10px; }
.rules-list { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.rules-list li { display: flex; gap: 8px; }
.rules-list li::before { content: "·"; color: var(--accent-ink); font-weight: 700; }

.block { margin-bottom: 20px; }
.block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.block-head h2 { font-size: 17px; }
.block-note { font-size: 12px; color: var(--ink-3); }

.lesson-points { display: flex; flex-direction: column; gap: 10px; counter-reset: lesson; }
.lesson-points li {
  display: flex; gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.lesson-points li .idx {
  counter-increment: lesson;
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--accent);
  font-size: 12px;
  display: grid; place-items: center;
}
.lesson-points li .idx::before { content: counter(lesson); }

.term-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.term-card { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 13px 15px; background: #fff; }
.term-card dt { font-size: 13px; font-weight: 700; color: var(--ink); }
.term-card dd { margin: 5px 0 0; font-size: 12.6px; color: var(--ink-2); line-height: 1.7; }

.material-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.material-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 82px;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.2px;
  align-items: center;
}
.material-row:last-child { border-bottom: none; }
.material-row .m-label { color: var(--ink-3); font-size: 12.2px; }
.material-row .m-value { color: var(--ink); font-weight: 600; min-width: 0; }
.material-row .m-kind { text-align: right; }

/* 题目 */
.question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.question-card.correct { border-color: #bfe3cd; }
.question-card.wrong { border-color: #ecc8c2; }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.q-no {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center;
}
.q-type { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.06em; }
.q-score { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.q-prompt { font-size: 14.2px; font-weight: 600; line-height: 1.8; margin-bottom: 12px; }
fieldset.q-options { border: none; margin: 0; padding: 0; }
fieldset.q-options legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.q-option {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 8px;
  font-size: 13.4px;
  cursor: pointer;
  background: var(--bg-soft);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.q-option:hover { border-color: var(--ink-3); }
.q-option input { margin: 3px 0 0; accent-color: var(--navy); flex: 0 0 auto; }
.q-option.checked { border-color: var(--navy); background: #fff; }
.q-option.answer { border-color: var(--ok); background: var(--ok-soft); }
.q-option.chosen-wrong { border-color: var(--danger); background: var(--danger-soft); }
.q-option .opt-key { font-weight: 700; color: var(--ink-3); flex: 0 0 auto; }

.q-feedback {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 12.9px;
  line-height: 1.8;
}
.q-feedback.ok { background: var(--ok-soft); border: 1px solid #bfe3cd; color: #175c3c; }
.q-feedback.no { background: var(--danger-soft); border: 1px solid #ecc8c2; color: #8c2f2f; }
.q-feedback b { display: block; margin-bottom: 3px; }

/* 交付物 */
.deliverable-prompt {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.4px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.deliverable-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
textarea.deliverable {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}
textarea.deliverable:focus { border-color: var(--navy); }
.deliverable-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-3);
}
.hint-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 12.4px; color: var(--ink-2); }
.hint-list li { display: flex; gap: 8px; }
.hint-list li::before { content: "提示"; flex: 0 0 auto; font-size: 10.5px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; margin-top: 3px; }

.submit-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 20px 0 8px; }
.draft-tip { font-size: 12px; color: var(--ink-3); }

/* 反馈区 */
.feedback {
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px 24px;
  margin: 22px 0;
  scroll-margin-top: 100px;
}
.feedback.hidden { display: none; }
.feedback-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #eef3f9;
  margin-bottom: 16px;
}
.feedback-banner .big { font-size: 28px; font-weight: 750; color: var(--accent); line-height: 1; }
.feedback-banner .cap { font-size: 12px; color: #a8bad0; }
.feedback-banner .verdict {
  margin-left: auto;
  font-size: 12.5px; font-weight: 700;
  border-radius: 999px; padding: 6px 14px;
}
.verdict.pass { background: var(--accent); color: var(--accent-ink); }
.verdict.fail { background: rgba(255, 255, 255, 0.14); color: #ffe2dd; border: 1px solid rgba(255, 226, 221, 0.4); }
.feedback h3 { font-size: 15px; margin: 18px 0 10px; }
.text-rubric {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.rubric-cell {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg-soft);
}
.rubric-cell .rv { font-size: 19px; font-weight: 750; }
.rubric-cell .rl { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.05em; }
.rubric-cell .rn { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; }
.rule-messages { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.rule-msg {
  font-size: 12.7px;
  border-radius: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
  color: var(--ink-2);
}
.rule-msg.good { border-color: #bfe3cd; background: var(--ok-soft); color: #175c3c; }
.rule-msg.warn { border-color: #ecd3ac; background: var(--warn-soft); color: var(--warn); }
.reference-box {
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 13px 16px;
  font-size: 12.9px;
  color: var(--ink-2);
  line-height: 1.85;
}
.reference-box .ref-label { font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); display: block; margin-bottom: 5px; }
.history-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.history-row b { color: var(--ink); }
.history-row .when { margin-left: auto; color: var(--ink-3); }

/* ---------------- 学习档案 ---------------- */
.profile-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.profile-summary { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 14px; }
.summary-item .sv { font-size: 26px; font-weight: 750; line-height: 1.2; }
.summary-item .sl { font-size: 12px; color: var(--ink-3); }
.export-card { display: flex; flex-direction: column; gap: 12px; }
.export-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.record-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.record-head, .record-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.4fr) 110px 110px 110px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 20px;
  align-items: center;
  font-size: 13px;
}
.record-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  color: var(--ink-3);
}
.record-row { border-bottom: 1px solid var(--line-soft); }
.record-row:last-child { border-bottom: none; }
.record-row .r-no { color: var(--ink-3); font-size: 12px; }
.record-row .r-name { font-weight: 650; min-width: 0; }
.record-row .r-name a { text-decoration: none; border-bottom: 1px solid var(--line); }
.record-row .r-name a:hover { border-color: var(--navy); }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 650;
  border-radius: 999px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-2);
  white-space: nowrap;
}
.status-chip.done { background: var(--accent-soft); border-color: #d3e88c; color: var(--accent-ink); }
.status-chip.doing { background: #e8eef7; border-color: #c9d8ea; color: var(--navy); }
.status-chip .s-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.complete-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 1px solid #d3e88c;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.complete-banner .cb-title { font-size: 16px; font-weight: 750; color: var(--accent-ink); }
.complete-banner .cb-note { font-size: 12px; color: var(--accent-ink); opacity: 0.85; }

.danger-zone {
  border: 1px solid #ecc8c2;
  background: var(--danger-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.danger-zone .dz-text { flex: 1 1 300px; min-width: 0; }
.danger-zone h3 { font-size: 14px; color: var(--danger); }
.danger-zone p { font-size: 12.5px; color: #8c2f2f; margin-top: 4px; }

/* ---------------- 弹窗 ---------------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(13, 28, 48, 0.55);
  display: grid; place-items: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 26px 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(13, 28, 48, 0.3);
}
.modal-title { font-size: 18px; }
.modal-desc { font-size: 13.2px; color: var(--ink-2); margin-top: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ---------------- 空状态 / 杂项 ---------------- */
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  background: var(--bg-soft);
}
.stack-14 { display: flex; flex-direction: column; gap: 14px; }
.row-gap { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mt-20 { margin-top: 20px; }
.mt-12 { margin-top: 12px; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }

/* ---------------- 知识课堂 / 错题复习 ---------------- */
.learn-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--navy);
  color: #e9eef5;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.learn-head .eyebrow { color: var(--accent); }
.learn-head .eyebrow::before { background: var(--accent); }
.learn-head .section-title { color: #fff; line-height: 1.45; overflow-wrap: break-word; }
.learn-head .section-desc { color: #b9c8da; max-width: 640px; margin-top: 8px; }
.learn-head-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 1 auto;
}
.learn-head-stats .score-pill {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #e9eef5;
}
.learn-head-stats .score-pill.ok {
  background: rgba(216, 243, 74, 0.14);
  border-color: rgba(216, 243, 74, 0.4);
  color: var(--accent);
}
.learn-head-stats .btn-ghost {
  background: transparent;
  color: #e9eef5;
  border-color: rgba(255, 255, 255, 0.28);
}
.learn-head-stats .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.unit-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 17px;
  min-width: 0;
}
.unit-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.unit-no {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
}
.unit-title {
  font-size: 14px;
  line-height: 1.6;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.unit-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.unit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.lesson-intro {
  color: var(--ink-2);
  font-size: 13.8px;
  line-height: 1.9;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  overflow-wrap: break-word;
}

.review-list { display: flex; flex-direction: column; gap: 14px; }
.review-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}
.review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.review-top .block-note { flex: 1 1 220px; min-width: 0; }
.review-prompt {
  font-size: 14.5px;
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: break-word;
}
.review-meta {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  overflow-wrap: break-word;
}
.review-meta a { color: var(--navy); font-weight: 600; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; }
  .task-layout { grid-template-columns: 1fr; }
  .task-side { position: static; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-head { grid-template-columns: 1fr; }
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .role-grid, .map-grid, .map-note, .term-grid { grid-template-columns: 1fr; }
  .record-head { display: none; }
  .record-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    padding: 16px 18px;
  }
  .record-row .r-no { display: none; }
  .record-row .r-name { grid-column: 1 / -1; }
  .text-rubric { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { flex-direction: column; align-items: stretch; }
  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    overflow: hidden;
  }
  .brand { padding: 0; flex: 0 0 auto; align-self: flex-start; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .brand-mark svg { width: 18px; height: 18px; }
  .brand-text span { display: none; }
  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
  .nav-item {
    justify-content: center;
    padding: 7px 6px;
    font-size: 12.5px;
    white-space: normal;
    text-align: center;
    overflow: hidden;
  }
  .nav-icon { display: none; }
  .sidebar-foot { display: none; }
  .topbar {
    position: static;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar-right { width: 100%; justify-content: space-between; }
  .main { padding: 22px 16px 36px; }
  .footer { padding: 18px 16px 26px; }
  .notice { margin: 12px 16px 0; }
  .hero-main { padding: 26px 22px 24px; }
  .hero-title { font-size: 25px; }
  .hero-meta { gap: 14px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px 16px; }
  .stat-value { font-size: 23px; }
  .role-facts { grid-template-columns: 1fr; }
  .task-title { font-size: 20px; }
  .material-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 16px;
  }
  .material-row .m-kind { text-align: left; }
  .map-row { grid-template-columns: 1fr; gap: 3px; }
  .filter-count { margin-left: 0; padding-bottom: 0; }
  .field select, .field input { min-width: 0; width: 100%; }
  .field { width: 100%; }
  .task-row { padding: 16px; }
  .task-row-side { width: 100%; justify-content: space-between; }
  .feedback { padding: 18px 16px; }
  .feedback-banner .big { font-size: 23px; }
  .record-row { grid-template-columns: 1fr; }
  .modal { padding: 22px 18px; }
  .path-step { min-width: 66px; }
  .unit-grid { grid-template-columns: 1fr; }
  .learn-head { padding: 18px 18px; }
  .learn-head-stats { width: 100%; }
  .review-card { padding: 15px 16px; }
}

@media (max-width: 390px) {
  body { font-size: 14px; }
  .hero-title { font-size: 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 20px; }
  .btn { width: 100%; }
  .hero-actions .btn, .submit-row .btn, .export-actions .btn, .task-nav .btn { width: auto; }
  .topbar-left { font-size: 12px; }
  .storage-chip { font-size: 11px; padding: 4px 10px; }
}
