:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e5eaf2;
  --line-2: #eef2f8;
  --primary: #1d4ed8;
  --primary-600: #2563eb;
  --primary-soft: #eef4ff;
  --teal: #0d9488;
  --navy: #0b1220;
  --ok: #16a34a;
  --ok-soft: #ecfdf3;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--primary); }
svg { display: block; }

/* ------------------------------ 侧栏 ------------------------------ */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px;
  background: linear-gradient(175deg, #0b1220 0%, #0e1a2e 55%, #0b1524 100%);
  color: #e2e8f0; padding: 22px 16px;
  display: flex; flex-direction: column; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 22px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  font-size: 20px; font-weight: 700; color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}
.brand__text h1 { font-size: 17px; letter-spacing: .6px; font-weight: 700; }
.brand__text p { font-size: 11.5px; color: #94a3b8; letter-spacing: .4px; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav__item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 10px;
  background: transparent; color: #b6c2d4; font-size: 13.5px; text-align: left;
  transition: background .18s, color .18s;
}
.nav__item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__item.is-active { background: linear-gradient(90deg, rgba(37, 99, 235, .28), rgba(13, 148, 136, .12)); color: #fff; box-shadow: inset 2px 0 0 #60a5fa; }

.sidebar__foot { margin-top: auto; padding: 14px 6px 2px; }
.side-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #cbd5e1; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1); padding: 5px 9px; border-radius: 999px;
}
.side-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
.side-note { font-size: 11px; color: #7d8ca3; margin-top: 10px; line-height: 1.7; }

/* ------------------------------ 顶栏与布局 ------------------------------ */
.main { margin-left: 248px; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 30px; background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar__crumb { font-size: 11.5px; color: var(--primary-600); letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600; }
.topbar__title h2 { font-size: 18px; font-weight: 650; letter-spacing: .2px; margin-top: 2px; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.badge { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: #f1f5f9; color: var(--muted); white-space: nowrap; }
.badge--soft { background: var(--primary-soft); color: var(--primary); border: 1px solid #dbe7ff; }

.btn {
  border: 1px solid transparent; border-radius: 9px; padding: 8px 15px;
  font-size: 13px; font-weight: 600; transition: all .18s; white-space: nowrap;
}
.btn--primary { background: var(--primary-600); color: #fff; box-shadow: 0 6px 14px rgba(37, 99, 235, .22); }
.btn--primary:hover { background: #1d4ed8; }
.btn--ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:hover { border-color: #c7d2e4; color: var(--ink); }
.btn--light { background: rgba(255, 255, 255, .92); color: var(--ink); }
.btn--sm { padding: 6px 11px; font-size: 12.5px; }

.content { max-width: 1380px; margin: 0 auto; padding: 26px 30px 56px; }
.view { animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ------------------------------ 通用卡片 ------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.card__head h3 { font-size: 15.5px; font-weight: 650; }
.card__head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.card__body { padding: 16px 22px 20px; }
.sub { font-size: 12px; color: var(--muted); line-height: 1.6; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.grow { flex: 1; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.tip {
  font-size: 12px; color: var(--muted); background: #f8fafc; border-left: 2px solid #cbd5e1;
  padding: 8px 10px; border-radius: 0 6px 6px 0; margin-top: 12px;
}
.notice {
  font-size: 12.5px; color: var(--muted); background: #fff; border: 1px dashed var(--line);
  border-radius: 12px; padding: 14px 18px; line-height: 1.8;
}

/* ------------------------------ 概览 ------------------------------ */
.hero {
  position: relative; overflow: hidden; margin-bottom: 20px;
  background: radial-gradient(1100px 320px at 8% -20%, #1e40af 0%, transparent 60%),
              linear-gradient(120deg, #0b1220 0%, #14265a 48%, #0b3d5c 100%);
  color: #fff; border-radius: 18px; padding: 36px 38px 32px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(45, 212, 191, .18), transparent 65%);
}
.hero__tag { display: inline-block; font-size: 11.5px; letter-spacing: 1.6px; color: #93c5fd; border: 1px solid rgba(147, 197, 253, .35); padding: 4px 10px; border-radius: 999px; }
.hero h1 { font-size: 31px; line-height: 1.35; margin: 16px 0 12px; font-weight: 700; letter-spacing: .5px; }
.hero p { font-size: 13.5px; color: #cbd5e1; max-width: 720px; line-height: 1.85; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.hero__tags span { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); }
.hero__actions { display: flex; gap: 10px; }
.hero__actions .btn--ghost { background: rgba(255, 255, 255, .1); color: #e2e8f0; border-color: rgba(255, 255, 255, .22); }

.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; box-shadow: var(--shadow); }
.kpi__k { font-size: 12px; color: var(--muted); }
.kpi__v { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi__n { font-size: 11px; color: #94a3b8; }

.task-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.home-task {
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 20px 18px; box-shadow: var(--shadow); transition: transform .18s, border-color .18s;
  display: flex; flex-direction: column; gap: 6px;
}
.home-task:hover { transform: translateY(-2px); border-color: #bcd0f0; }
.home-task__num { font-family: var(--mono); font-size: 12px; color: var(--primary-600); }
.home-task__label { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }
.home-task h3 { font-size: 16px; font-weight: 650; margin-top: 2px; }
.home-task p { font-size: 12.5px; color: var(--muted); line-height: 1.75; flex: 1; }
.home-task__go { font-size: 12px; color: var(--primary-600); font-weight: 600; }

.quality { display: flex; gap: 22px; align-items: center; }
.quality__donut { flex: 0 0 auto; }
.donut { position: relative; width: 132px; }
.donut svg { width: 132px; height: 132px; }
.donut__track { fill: none; stroke: #eef2f8; stroke-width: 10; }
.donut__val { fill: none; stroke-width: 10; stroke-linecap: round; }
.donut__text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut__text b { font-size: 19px; font-weight: 700; }
.donut__text span { font-size: 11px; color: var(--muted); }
.quality__list { flex: 1; }
.qrow { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.qrow span { color: var(--muted); }
.qrow b { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }

.issue-list { display: flex; flex-direction: column; gap: 12px; }
.issue__top { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
.issue__top b { font-weight: 600; font-size: 13.5px; }
.bar-row { display: flex; align-items: center; gap: 9px; }
.bar { flex: 1; height: 7px; border-radius: 999px; background: #eef2f8; overflow: hidden; display: inline-block; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.bar-row span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.bar-cell .bar { width: 66px; }

.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.case { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fbfdff; cursor: pointer; transition: border-color .18s, box-shadow .18s; }
.case:hover { border-color: #bcd0f0; box-shadow: var(--shadow); }
.case__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.case__head b { font-size: 15px; }
.case__stat { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; color: var(--muted); }
.case__stat b { color: var(--ink); font-variant-numeric: tabular-nums; }
.case__tags { margin: 8px 0 6px; }

/* ------------------------------ 标签 / 芯片 ------------------------------ */
.chip { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.chip--ok { background: var(--ok-soft); color: #15803d; }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--bad { background: var(--bad-soft); color: var(--bad); }
.chip--grey { background: #f1f5f9; color: #64748b; }
.tag { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 5px; background: #f1f5f9; color: #475569; margin: 1px 3px 1px 0; white-space: nowrap; }
.tag--line { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.tag--solid { background: var(--primary-soft); color: var(--primary); }
.pill { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); color: var(--ink-2); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.level { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 5px; background: #f1f5f9; color: #475569; }
.level--了解 { background: #f1f5f9; color: #475569; }
.level--理解 { background: #eef4ff; color: #1d4ed8; }
.level--掌握 { background: #e8f7f5; color: #0f766e; }
.level--运用 { background: #fff7ed; color: #b45309; }

/* ------------------------------ 导航与筛选 ------------------------------ */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { flex: 1; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; transition: all .18s; }
.tab b { display: block; font-size: 14px; font-weight: 650; }
.tab span { font-size: 11.5px; color: var(--muted); }
.tab:hover { border-color: #c7d7f0; }
.tab.is-active { background: var(--primary-soft); border-color: #bcd4f7; }
.tab.is-active b { color: var(--primary); }

.subnav { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.subnav__item { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.subnav__item.is-active { background: var(--primary-600); color: #fff; }

.control-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.select, .input {
  font-family: inherit; font-size: 13px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; outline: none;
}
.select:focus, .input:focus { border-color: #93b4ea; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.select--sm { padding: 6px 8px; font-size: 12.5px; }
.input { min-width: 220px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

/* ------------------------------ 主题介绍 ------------------------------ */
.topic-intro { display: grid; grid-template-columns: 1fr 300px; gap: 20px; border: 1px solid; border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.topic-intro h2 { font-size: 20px; margin: 2px 0 8px; }
.topic-intro__main p { font-size: 13px; color: var(--ink-2); line-height: 1.85; }
.topic-intro__side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center; }
.mini { background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.mini span { display: block; font-size: 11px; color: var(--muted); }
.mini b { font-size: 16px; font-weight: 650; }
.mini b.small { font-size: 12px; font-weight: 600; line-height: 1.5; }

.cmap-wrap { overflow-x: auto; padding: 6px 0 12px; }
.cmap { width: 100%; height: 150px; }
.cmap__edge { fill: none; stroke: #cbd5e1; stroke-width: 1.4; }
.cmap__id { font-family: var(--mono); font-size: 10px; font-weight: 600; }
.cmap__name { font-size: 11px; fill: #334155; }

/* ------------------------------ 表格 ------------------------------ */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.table th {
  position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #475569;
  font-weight: 600; font-size: 11.8px; text-align: left; padding: 9px 11px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 9px 11px; border-bottom: 1px solid var(--line-2); vertical-align: top; line-height: 1.6; }
.table tbody tr:hover { background: #fafcff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table--compact td { padding: 8px 10px; }
.table--tall { max-height: 480px; }
.table--heat td, .table--heat th { text-align: center; padding: 6px 5px; }
.table--heat td.mono, .table--heat td.num, .table--heat th:first-child { text-align: left; }
.heat { font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 600; }
.empty { text-align: center; color: #94a3b8; padding: 22px 0 !important; }

/* ------------------------------ 个体画像 ------------------------------ */
.profile-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.profile-head__main { display: flex; align-items: center; gap: 14px; }
.profile-head__id { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-family: var(--mono); font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.profile-head h2 { font-size: 18px; font-weight: 650; }
.profile-head__stats { display: flex; gap: 26px; }
.stat { display: flex; flex-direction: column; }
.stat span { font-size: 11.5px; color: var(--muted); }
.stat b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }

.narrative { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--primary-600); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; font-size: 13px; line-height: 1.85; }
.narrative b { display: block; font-size: 12px; color: var(--primary-600); letter-spacing: .6px; margin-bottom: 4px; }

.topic-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.topic-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: 12px; padding: 14px 16px; }
.topic-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.topic-card__head b { font-size: 13.5px; }
.topic-card__rate { font-size: 24px; font-weight: 700; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.topic-card__foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 7px; }

.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.insight { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.insight h4 { font-size: 12.5px; margin-bottom: 8px; letter-spacing: .5px; }
.insight--ok { border-top: 3px solid #34d399; }
.insight--bad { border-top: 3px solid #f87171; }
.insight--grey { border-top: 3px solid #cbd5e1; }
.insight__row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed var(--line-2); }
.insight__row b { font-variant-numeric: tabular-nums; }

.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.class-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.class-card__head { display: flex; justify-content: space-between; grid-column: 1 / -1; gap: 10px; }
.class-card__head b { font-size: 14px; }
.class-card__main { grid-row: span 2; }
.class-card .donut { width: 96px; }
.class-card .donut svg { width: 96px; height: 96px; }
.class-card .donut__text b { font-size: 15px; }
.class-card .donut__text span { font-size: 10px; }

.practice { display: flex; flex-direction: column; gap: 10px; }
.practice__row { display: grid; grid-template-columns: 88px 52px 1fr 48px; align-items: center; gap: 8px; }
.practice__row b { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------ 建议 ------------------------------ */
.rec-summary { display: flex; justify-content: space-between; gap: 22px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, #0b1220, #17284f); color: #fff; border-radius: 14px; padding: 20px 24px; margin-bottom: 18px; }
.rec-summary__main { max-width: 760px; }
.rec-summary h3 { font-size: 16px; margin-bottom: 6px; }
.rec-summary p { font-size: 12.8px; color: #cbd5e1; line-height: 1.85; }
.rec-summary__stats { display: flex; gap: 22px; }
.rec-summary__stats .stat span { color: #94a3b8; }
.rec-summary__stats .stat b { color: #fff; font-size: 18px; }

.phase { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow); }
.phase__head { display: flex; align-items: center; gap: 13px; padding: 15px 20px; background: #fbfcff; border-bottom: 1px solid var(--line-2); }
.phase__num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }
.phase__head h3 { font-size: 14.5px; }
.phase__head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.phase--grey { border-style: dashed; }
.phase--grey .phase__num { background: #f1f5f9; color: var(--muted); }
.task-list { padding: 6px 20px 16px; }
.task { border-bottom: 1px solid var(--line-2); padding: 13px 0; }
.task:last-child { border-bottom: 0; }
.task__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.task__idx { width: 21px; height: 21px; border-radius: 6px; background: #f1f5f9; color: #475569; font-size: 11.5px; display: grid; place-items: center; font-weight: 600; }
.task__title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.task__title b { font-size: 13.8px; }
.task__meta { font-size: 12px; color: var(--muted); margin: 5px 0 4px 30px; }
.task__reason { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; margin-left: 30px; background: #fbfdff; border-radius: 8px; padding: 8px 11px; }
.task__actions { display: flex; gap: 16px; margin: 7px 0 0 30px; }
.link { background: none; border: 0; padding: 0; color: var(--primary-600); font-size: 12.5px; font-weight: 600; }
.link:hover { text-decoration: underline; }
.link--danger { color: var(--bad); }

.notes { padding-left: 18px; font-size: 12.8px; line-height: 1.95; color: var(--ink-2); }
.notes li { margin-bottom: 4px; }

.adjust__form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.adjust__form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.adjust__form .input { min-width: 160px; }
.diff { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.diff h4 { font-size: 12.5px; margin-bottom: 8px; }
.diff__chips { display: flex; gap: 8px; margin-bottom: 10px; }
.diff__chips span { font-size: 11.5px; background: #f1f5f9; padding: 3px 9px; border-radius: 999px; color: #475569; }

/* ------------------------------ 核对 ------------------------------ */
.case-card .case-card__sel { min-width: 180px; }
.case-card .stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.case-card .stat b { font-size: 17px; }
.case-block { margin-top: 9px; }
.case-block p { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; margin-top: 2px; }

/* ------------------------------ 导入 ------------------------------ */
.dataset-status { display: flex; gap: 30px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
.import-report { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fbfdff; }
.import-report.is-ok { border-color: #bbf7d0; background: #f6fef9; }
.import-report.is-bad { border-color: #fecaca; background: #fff8f8; }
.import-report h4 { font-size: 13px; margin-bottom: 6px; }
.import-report p { font-size: 12.5px; color: var(--muted); }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.upload { border: 1px dashed #cbd5e1; border-radius: 12px; padding: 16px; background: #fbfdff; }
.upload h4 { font-size: 13.5px; margin-bottom: 4px; }
.upload__actions { display: flex; align-items: center; gap: 14px; margin: 12px 0 8px; }

/* ------------------------------ 方法 ------------------------------ */
.flow { display: flex; gap: 8px; flex-wrap: wrap; }
.flow__step { flex: 1; min-width: 140px; background: #fbfdff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; }
.flow__step span { font-family: var(--mono); font-size: 11px; color: var(--primary-600); }
.flow__step b { display: block; font-size: 12.5px; margin-top: 3px; font-weight: 600; }
.formula { font-size: 13px; line-height: 2; color: var(--ink-2); }
.formula p + p { margin-top: 8px; }
.formula b { color: var(--ink); }

/* ------------------------------ 弹窗 / 提示 ------------------------------ */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden], .toast[hidden] { display: none; }
.modal__mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.modal__panel { position: relative; background: #fff; border-radius: 16px; width: min(920px, 100%); max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(15, 23, 42, .3); animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 15px; }
.icon-btn { border: 0; background: none; font-size: 22px; color: var(--muted); line-height: 1; padding: 0 4px; }
.modal__body { padding: 18px 22px 24px; overflow: auto; }
.evidence-head { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.evidence-head .stat { background: #f8fafc; border-radius: 8px; padding: 8px 10px; }
.evidence-head .stat b { font-size: 16px; }
.material-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.material-title { font-size: 16px; margin-bottom: 8px; }
.material-stem { font-size: 13.5px; line-height: 1.9; background: #f8fafc; border-radius: 8px; padding: 12px 14px; }
.material-answer { font-size: 13px; margin: 12px 0 6px; color: #0f766e; }
.mini-table { margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: #0f172a; color: #fff; font-size: 12.5px; padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(15, 23, 42, .3); z-index: 60; }
.noscript { background: #fef2f2; color: #b91c1c; padding: 14px 18px; text-align: center; }

/* ------------------------------ 课程要求卡片 / 适用范围 ------------------------------ */
.req-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.req-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 9px; transition: border-color .15s, box-shadow .15s; }
.req-card:hover { border-color: #c7d7f5; box-shadow: 0 8px 24px rgba(37, 99, 235, .08); }
.req-card__top { display: flex; align-items: center; gap: 8px; }
.req-card__id { font-family: var(--mono); font-size: 12px; color: var(--primary); font-weight: 600; margin-right: auto; }
.req-card__mats { border: 0; background: var(--primary-soft); color: var(--primary); font-size: 11.5px; padding: 3px 9px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.req-card__mats:hover { background: #dbeafe; }
.req-card__text { font-size: 13.5px; line-height: 1.75; color: var(--ink); }
.req-card__kps { display: flex; flex-wrap: wrap; gap: 4px; }
.req-card__foot { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.req-card__note { font-size: 12px; color: var(--muted); line-height: 1.65; background: #f8fafc; border-radius: 8px; padding: 8px 10px; }

.scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scope-item { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.scope-item span { display: block; font-size: 11.5px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.scope-item p { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* ------------------------------ 学生中心 ------------------------------ */
.student-hero { display: grid; grid-template-columns: 1.6fr .9fr; gap: 18px; padding: 24px 26px; margin-bottom: 16px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #0f2a5c, #1d4ed8); }
.student-hero__tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 11px; letter-spacing: .06em; }
.student-hero h2 { margin: 10px 0 6px; font-size: 24px; }
.student-hero p { max-width: 560px; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .82); }
.student-hero__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.student-hero__chips button { border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 5px 10px; background: rgba(255, 255, 255, .1); color: #fff; font-family: inherit; font-size: 11.5px; cursor: pointer; }
.student-hero__chips button:hover { background: rgba(255, 255, 255, .2); }
.student-hero__side { display: flex; flex-direction: column; gap: 7px; padding: 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; background: rgba(255, 255, 255, .08); }
.student-hero__side label { font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.student-hero__side select { width: 100%; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 7px 9px; background: #fff; font-family: inherit; font-size: 12.5px; color: var(--ink); }
.time-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.time-chip { flex: 1; min-width: 68px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 8px; padding: 6px 8px; background: rgba(255, 255, 255, .08); color: #fff; font-family: inherit; font-size: 11.5px; cursor: pointer; }
.time-chip.is-active { border-color: #fff; background: #fff; color: var(--primary); font-weight: 600; }
.student-states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.student-state { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.student-state__k { font-size: 11.5px; color: var(--muted); }
.student-state b { display: block; margin: 4px 0 6px; font-size: 22px; }
.student-state p { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.student-state--weak { border-left: 3px solid #ef4444; }
.student-state--cons { border-left: 3px solid #f59e0b; }
.student-state--unsure { border-left: 3px solid #94a3b8; }
.study-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.study-progress__num { white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.study-progress__num b { font-size: 15px; color: var(--primary); }
.study-progress .bar { display: block; flex: 1; height: 8px; overflow: hidden; border-radius: 999px; background: #e8edf6; }
.study-progress .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #38bdf8); }
.study-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.study-card { display: flex; flex-direction: column; gap: 9px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.study-card:hover { border-color: #c7d7f5; box-shadow: 0 8px 24px rgba(37, 99, 235, .08); }
.study-card.is-done { border-color: #bbf7d0; background: #f8fbf9; }
.study-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.study-card__phase { padding: 3px 8px; border-radius: 999px; background: #eef4ff; color: var(--primary); font-size: 11px; }
.study-card__min { font-size: 11.5px; color: var(--muted); }
.study-card h4 { font-size: 14px; line-height: 1.5; }
.study-card__why { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.study-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.study-card__meta span { padding: 2px 7px; border-radius: 6px; background: #f4f7fc; font-size: 11px; color: var(--muted); }
.study-card__actions { display: flex; gap: 8px; margin-top: 2px; }
.study-card.is-done .study-card__actions .btn--primary { opacity: .72; }
.practice-hint { margin: 10px 0; font-size: 12.5px; color: var(--muted); }
.practice-answer { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.practice-answer[hidden] { display: none; }
.practice-check { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.practice-check[hidden] { display: none; }
.practice-check__q { margin-bottom: 8px; font-size: 12.5px; font-weight: 600; }
.practice-check__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn--ok { background: #16a34a; color: #fff; }
.btn--ok:hover { background: #15803d; }
.btn--bad { border: 1px solid #fecaca; background: #fff; color: #dc2626; }
.btn--bad:hover { background: #fef2f2; }
.student-note { margin-top: 14px; text-align: center; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

/* ------------------------------ 学伴问答 ------------------------------ */
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 62; display: flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 11px 17px; background: var(--primary); color: #fff; font-family: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 12px 30px rgba(37, 99, 235, .34); transition: transform .15s, box-shadow .15s; }
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(37, 99, 235, .4); }
.chat-fab svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-fab.is-open { opacity: .9; }
.chat { position: fixed; right: 24px; bottom: 82px; z-index: 63; width: 380px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 118px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .22); overflow: hidden; animation: pop .18s ease; }
.chat[hidden] { display: none; }
.chat__head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; background: linear-gradient(135deg, #0f2a5c, #1e4ed8); color: #fff; }
.chat__who { display: flex; align-items: center; gap: 9px; }
.chat__who b { font-size: 13.5px; }
.chat__who p { font-size: 11px; opacity: .82; margin-top: 2px; }
.chat__dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); flex: 0 0 auto; }
.chat__close { color: #fff; opacity: .8; }
.chat__close:hover { opacity: 1; }
.chat__body { flex: 1; overflow: auto; padding: 14px; background: #f5f8fd; display: flex; flex-direction: column; gap: 9px; }
.chat-msg { max-width: 92%; padding: 9px 11px; border-radius: 11px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.68; align-self: flex-start; }
.chat-msg--user { align-self: flex-end; background: var(--primary); border-color: transparent; color: #fff; }
.chat-msg p + p { margin-top: 6px; }
.chat-msg b { color: var(--primary); }
.chat-msg--user b { color: #fff; }
.chat-list { margin: 5px 0 0 15px; }
.chat-list li { list-style: disc; margin-top: 3px; }
.chat-foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.chat-action { display: inline-block; margin-top: 8px; border: 0; border-radius: 8px; padding: 5px 10px; background: #e8f0ff; color: var(--primary); font-family: inherit; font-size: 11.5px; cursor: pointer; }
.chat-action:hover { background: #dbe8ff; }
.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 13px 0; background: #fff; }
.chat__chips button { border: 1px solid #dbe4f3; border-radius: 999px; padding: 4px 9px; background: #f4f7fd; color: #25406b; font-family: inherit; font-size: 11.5px; cursor: pointer; }
.chat__chips button:hover { border-color: #b9cdf0; color: var(--primary); }
.chat__form { display: flex; gap: 8px; padding: 10px 13px 13px; background: #fff; }
.chat__form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; font-family: inherit; font-size: 12.5px; outline: none; }
.chat__form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.chat__send { border: 0; border-radius: 9px; padding: 0 14px; background: var(--primary); color: #fff; font-family: inherit; font-size: 12.5px; cursor: pointer; }
.chat__send:hover { background: #1d4ed8; }

/* ------------------------------ 响应式 / 打印 ------------------------------ */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .topic-intro { grid-template-columns: 1fr; }
  .topic-intro__side { grid-template-columns: repeat(4, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; flex-direction: row; align-items: center; padding: 12px 14px; gap: 10px; overflow-x: auto; }
  .brand { padding: 0 10px 0 0; flex: 0 0 auto; }
  .brand__text p { display: none; }
  .nav { flex-direction: row; overflow-x: auto; flex: 1; }
  .nav__item { white-space: nowrap; padding: 8px 10px; font-size: 12.5px; }
  .nav__item svg { display: none; }
  .sidebar__foot { display: none; }
  .main { margin-left: 0; }
  .topbar { position: static; padding: 14px 16px; flex-wrap: wrap; }
  .content { padding: 18px 16px 40px; }
  .hero { padding: 26px 22px; }
  .hero h1 { font-size: 24px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .task-grid, .case-grid, .topic-cards, .class-grid, .upload-grid { grid-template-columns: 1fr; }
  .tabs { flex-direction: column; }
  .quality { flex-direction: column; align-items: flex-start; }
  .rec-summary__stats { flex-wrap: wrap; gap: 16px; }
  .topic-intro__side { grid-template-columns: 1fr 1fr; }
  .evidence-head { grid-template-columns: repeat(2, 1fr); }
  .case-card .stat-row { grid-template-columns: repeat(2, 1fr); }
  .req-grid, .scope-grid { grid-template-columns: 1fr; }
  .student-hero { grid-template-columns: 1fr; padding: 20px; }
  .student-states, .study-grid { grid-template-columns: 1fr; }
  .chat { right: 12px; left: 12px; width: auto; bottom: 76px; height: 66vh; }
  .chat-fab { right: 16px; bottom: 16px; }
}
@media print {
  .sidebar, .topbar__actions, .nav, .toast, .modal, .control-bar, .link, .btn, .filters, .subnav, .chat, .chat-fab { display: none !important; }
  .main { margin: 0; }
  .topbar { position: static; border: 0; padding: 0 0 10px; }
  .content { padding: 0; }
  .card, .phase, .hero, .rec-summary { box-shadow: none; break-inside: avoid; }
  body { background: #fff; font-size: 12px; }
  .table-wrap { overflow: visible; }
  .table--tall { max-height: none; }
}
