:root {
  --bg: #eef2f6;
  --paper: #ffffff;
  --ink: #1c2430;
  --muted: #5b6777;
  --line: #d7dee8;
  --navy: #163a5f;
  --navy-2: #1f4e7a;
  --gold: #b8860b;
  --ok: #1f7a4d;
  --bad: #b42318;
  --warn: #9a6700;
  --chip: #e8eef5;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
a { color: inherit; }
button, input, textarea, select { font-family: inherit; }

.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 16px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; flex: 0 0 auto; }
.brand small { font-weight: 400; opacity: 0.75; margin-left: 8px; }
.nav { display: flex; gap: 2px; }
.nav a, .nav button {
  background: transparent; border: 0; color: #d7e4f2; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: 14px;
}
.nav a.active, .nav a:hover, .nav button:hover { background: rgba(255,255,255,0.12); color: #fff; }

.wrap { width: min(1180px, calc(100% - 32px)); margin: 20px auto 40px; }
.hero {
  background: linear-gradient(135deg, #163a5f 0%, #1f4e7a 58%, #2a628f 100%);
  color: #fff; border-radius: 14px; padding: 28px 32px; margin-bottom: 20px;
}
.hero h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; }
.hero p { margin: 0; opacity: 0.9; line-height: 1.7; max-width: 860px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 999px; font-size: 12px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin: 0 0 12px; font-size: 18px; color: var(--navy); }
.card h3 { font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.7; }
.list { margin: 0; padding-left: 18px; line-height: 1.75; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 14px; }
.kv b { color: var(--navy); }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; background: #f7f9fc; }

.subject-card { display: flex; flex-direction: column; gap: 10px; }
.subject-card .title { font-size: 18px; font-weight: 700; color: var(--navy); }
.papers { display: grid; gap: 8px; }
.paper-entry { display: grid; gap: 3px; padding: 7px 8px; background: #f8fafc; border: 1px solid var(--line); border-left: 3px solid #a9b8c5; border-radius: 6px; }
.paper-entry.completed { background: #f1f8f3; border-left-color: var(--ok); }
.paper-entry.in-progress { background: #eef6fb; border-left-color: #347ca6; }
.paper-entry-head { display: flex; gap: 6px; align-items: center; min-width: 0; }
.paper-entry-head b { flex: 0 0 auto; color: var(--navy); font-size: 12px; }
.paper-state, .paper-stats { flex: 0 0 auto; padding: 2px 5px; color: #60717e; background: #e7edf2; border-radius: 9px; font-size: 9px; line-height: 1.2; }
.completed .paper-state { color: #276343; background: #d9ecdf; }
.in-progress .paper-state { color: #275f82; background: #d8ebf6; }
.paper-stats { color: #786131; background: #f1ead8; }
.paper-entry p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.paper-entry-actions { display: flex; flex: 0 0 auto; gap: 2px; margin-left: auto; }
.paper-action { padding: 2px 5px; color: #536b7c; border: 1px solid #a9b8c3; border-radius: 4px; font-size: 9px; line-height: 1.25; text-decoration: none; white-space: nowrap; }
.paper-action:hover { color: #fff; background: #496b84; border-color: #496b84; }
.paper-action.primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.paper-action.history-link { color: #7a5420; border-color: #b79558; }
.paper-action.paper-retry { color: #2f6b4a; border-color: #6c9d82; }
.btn {
  appearance: none; border: 1px solid var(--navy); background: var(--navy); color: #fff;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; text-decoration: none;
}
.btn.ghost { background: #fff; color: var(--navy); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.exam-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.side { position: sticky; top: 72px; }
.qgroups { display: grid; gap: 14px; }
.qgroup { padding-top: 12px; border-top: 1px solid var(--line); }
.qgroup:first-child { padding-top: 0; border-top: 0; }
.qgroup-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 7px; color: var(--navy); font-size: 12px; font-weight: 700;
}
.qgroup-title small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.qmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qmap button {
  height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 12px;
}
.qmap button.done { background: #e7f1ea; border-color: #b7d4c3; }
.qmap button.current { outline: 2px solid var(--navy); }
.qmap button.wrong { background: #fde8e6; border-color: #f0b8b4; }
.qmap button.ok { background: #e7f1ea; }
.qmap button.mark { box-shadow: inset 0 -3px 0 var(--gold); }

.exam-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); background: #fff3cd; border: 1px solid #efd38a; padding: 6px 10px; border-radius: 8px; }
.qbox { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.qtype { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; }
.stem { font-size: 16px; line-height: 1.8; margin: 10px 0 16px; white-space: pre-wrap; }
.options { display: grid; gap: 8px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff;
}
.opt:hover { border-color: #9bb4cc; }
.opt.selected { border-color: var(--navy); background: #eef4fb; }
.opt.correct { border-color: var(--ok); background: #eef8f2; }
.opt.incorrect { border-color: var(--bad); background: #fdf2f1; }
.opt input { margin-top: 4px; }
.subq { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 14px; }
.subq h4 { margin: 0 0 8px; font-size: 14px; }
textarea.answer {
  width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; resize: vertical; line-height: 1.6;
}
.actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.analysis { margin-top: 14px; background: #f7f9fc; border-left: 4px solid var(--navy); padding: 12px 14px; border-radius: 0 8px 8px 0; white-space: pre-wrap; line-height: 1.7; font-size: 14px; }
.scoreboard { font-size: 28px; font-weight: 800; color: var(--navy); }
.tag { display: inline-block; background: var(--chip); color: var(--navy); border-radius: 999px; padding: 2px 8px; font-size: 12px; margin-right: 6px; }
.footer-note { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 0 24px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }

.daily-promo {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 26px; color: #fff; border-radius: 12px;
  background: linear-gradient(120deg, #6d491b, #9a6b26); box-shadow: var(--shadow);
}
.daily-promo span { color: #f7dfae; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.daily-promo h2 { margin: 4px 0 6px; font-size: 21px; }
.daily-promo p { max-width: 760px; margin: 0; color: #fff8e8; line-height: 1.65; font-size: 14px; }
.daily-promo .btn { flex: 0 0 auto; text-decoration: none; border-color: #f2c96d; }

.history-promo {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 26px; color: #fff; border-radius: 12px;
  background: linear-gradient(120deg, #4b2d20, #754b36); box-shadow: var(--shadow);
}
.history-promo span, .history-hero > span { color: #f1cdb9; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.history-promo h2 { margin: 4px 0 6px; font-size: 21px; }
.history-promo p { max-width: 760px; margin: 0; color: #fff5ef; line-height: 1.65; font-size: 14px; }
.history-promo .btn { flex: 0 0 auto; background: #fff; color: #603d2d; border-color: #fff; text-decoration: none; }
.mof-promo { background: linear-gradient(120deg, #244b68, #3d708f); }
.mof-promo span { color: #d7eefb; }
.mof-promo p { color: #f0f9ff; }
.mof-promo .btn { color: #285672; }
.history-hero {
  margin-bottom: 20px; padding: 26px 30px; color: #fff; border-radius: 14px;
  background: linear-gradient(135deg, #44281d, #704a36 60%, #91664d);
}
.history-hero h1 { margin: 5px 0 8px; font-size: 27px; }
.history-hero p { max-width: 960px; margin: 0; color: #fff5ef; line-height: 1.75; font-size: 14px; }
.history-notice { margin-top: 13px; padding: 10px 12px; color: #ffe9dc; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; font-size: 13px; }
.history-year { margin-top: 20px; }
.history-year > h2 { margin: 0 0 10px; color: var(--navy); }
.history-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.history-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: #fff; border: 1px solid #dfd2ca; border-top: 4px solid #82543d; border-radius: 10px; box-shadow: var(--shadow); }
.history-card header { display: flex; justify-content: space-between; gap: 10px; color: #714731; font-size: 12px; }
.history-card h3 { margin: 0; color: var(--navy); font-size: 17px; }
.history-card p { flex: 1; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.history-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.history-meta span { padding: 3px 7px; color: #714731; background: #f5ebe5; border-radius: 999px; font-size: 11px; }
.history-meta strong { width: 100%; color: var(--ok); font-size: 12px; }
.history-source { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.history-card > .btn { align-self: flex-start; text-decoration: none; }
.mof-hero { background: linear-gradient(135deg, #183b56, #2f6686 60%, #4f83a0); }
.mof-hero > span { color: #d9effc; }
.mof-grid { margin-top: 18px; }
.mof-card { border-color: #c8d9e4; border-top-color: #367398; }
.mof-card header, .mof-card .history-source, .mof-card .history-meta span { color: #315f7b; }
.mof-card .history-meta span { background: #eaf3f8; }
.mof-card > .btn { color: #fff; background: #2f6c92; border-color: #2f6c92; }

.drill-hero { background: linear-gradient(135deg, #163f32, #2a6b52 58%, #3f8a6a); }
.drill-hero > span, .drill-hero > div > span { color: #d4f3e4; }
.drill-hero-with-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.drill-hero-with-action > div { min-width: 0; flex: 1; }
.drill-hero-with-action p { max-width: 760px; }
.drill-hero-record {
  flex: 0 0 auto; background: #fff; color: #1e4d3a; border-color: #fff;
  padding: 10px 16px; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.drill-hero-record:hover { background: #eef8f2; color: #163f32; }
.drill-grid { margin-top: 18px; }
.drill-card { border-color: #c9ddd4; border-top-color: #2f6b52; }
.drill-card header, .drill-card .history-source, .drill-card .history-meta span { color: #2a5d48; }
.drill-card .history-meta span { background: #e7f4ee; }
.drill-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.drill-card-actions .btn { text-decoration: none; white-space: nowrap; }
.drill-card .btn { color: #fff; background: #2f6b52; border-color: #2f6b52; }
.drill-card .btn.ghost { color: #2f6b52; background: #fff; }

.drill-mock-modal {
  display: none; position: fixed; inset: 0; z-index: 80; background: rgba(16, 36, 28, .35);
  align-items: center; justify-content: center; padding: 20px;
}
.drill-mock-modal.open { display: flex; }
.drill-mock-window {
  width: min(440px, 100%); padding: 22px 24px; background: #fff; border: 1px solid #c9ddd4;
  border-radius: 12px; box-shadow: var(--shadow);
}
.drill-mock-window h3 { margin: 0 0 8px; color: #1e4d3a; font-size: 18px; }
.drill-mock-window > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.drill-mock-fields { display: grid; gap: 10px; margin-bottom: 12px; }
.drill-mock-fields label {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; background: #f4faf7; border: 1px solid #d7e8de; border-radius: 8px; font-size: 14px;
}
.drill-mock-fields span:last-child { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.drill-mock-fields input {
  width: 72px; padding: 6px 8px; border: 1px solid #b7cfc2; border-radius: 6px; text-align: right;
}
.drill-mock-fields label.disabled { opacity: .55; cursor: not-allowed; background: #f2f3f4; }
.drill-mock-fields label.disabled input { background: #eee; color: #888; }
.drill-mock-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.drill-mock-actions .btn { background: #2f6b52; border-color: #2f6b52; }
.drill-mock-actions .btn.ghost { color: #2f6b52; background: #fff; }
.drill-promo { background: linear-gradient(120deg, #163f32, #2a6b52); }
.drill-promo span { color: #d4f3e4; }
.drill-promo p { color: #eef8f2; }
.drill-promo .btn { color: #1e4d3a; }

.daily-hero {
  display: grid; grid-template-columns: 1fr 230px; gap: 26px; align-items: center;
  padding: 26px 30px; margin-bottom: 18px; color: #fff; border-radius: 14px;
  background: linear-gradient(135deg, #5d3d18, #875f25 58%, #a57934);
}
.daily-hero > div:first-child > span { color: #f4d99e; font-size: 12px; font-weight: 700; }
.daily-hero h1 { margin: 5px 0 8px; font-size: 27px; }
.daily-hero p { max-width: 820px; margin: 0; color: #fff9ed; line-height: 1.7; font-size: 14px; }
.daily-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.daily-legend span {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px;
  color: #fff; background: rgba(255,255,255,.13); border-radius: 999px; font-size: 11px;
}
.daily-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #e89c31; }
.daily-legend span.completed::before { background: #54c477; }
.daily-legend span.in-progress::before { background: #62b8ef; }
.daily-progress {
  display: grid; grid-template-columns: auto 1fr; align-items: end; padding: 16px 18px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
}
.daily-progress strong { font-size: 43px; line-height: 1; color: #ffe6a9; }
.daily-progress span { padding-bottom: 4px; color: #fff4dc; }
.daily-progress small { grid-column: 1 / -1; margin-top: 9px; color: #f5e6c6; line-height: 1.5; }
.daily-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.daily-card {
  display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 9px;
  min-height: 240px; padding: 18px 20px; background: #fff; border: 1px solid var(--line);
  border-top: 4px solid #9a6b26; border-radius: 10px; box-shadow: var(--shadow);
}
.daily-card.not-started { background: #fff9ed; border-color: #e2bd7d; border-top-color: #d58a22; }
.daily-card.completed { background: #edf8f1; border-color: #91c7a4; border-top-color: #27935a; box-shadow: 0 2px 7px rgba(31,122,77,.13); }
.daily-card.in-progress { background: #edf6fd; border-color: #91bddb; border-top-color: #2c80b7; box-shadow: 0 2px 7px rgba(31,78,122,.12); }
.daily-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.daily-card header b { color: #7b531d; font-size: 15px; }
.daily-card.completed header b { color: var(--ok); }
.daily-card.in-progress header b { color: #1f6f9f; }
.daily-card header span { color: var(--muted); font-size: 12px; }
.daily-card h2 { margin: 0; color: var(--navy); font-size: 17px; line-height: 1.45; }
.daily-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.daily-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.daily-meta span { padding: 3px 7px; color: #66471f; background: #f8eedc; border-radius: 999px; font-size: 11px; }
.daily-meta strong { margin-left: auto; color: var(--ok); font-size: 12px; }
.daily-card.in-progress .daily-meta span { color: #235c80; background: #dceef9; }
.daily-card.in-progress .daily-meta strong { color: #1f6f9f; }
.daily-card.completed .daily-meta span { color: #2d6643; background: #dcefe3; }
.daily-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.daily-card-actions .btn { text-decoration: none; }
.daily-history-list {
  display: grid; gap: 12px; max-width: 980px; margin: 22px auto; padding: 0 18px;
}
.daily-history-item {
  display: grid; grid-template-columns: minmax(190px, 1fr) auto auto auto; gap: 18px; align-items: center;
  padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 9px; box-shadow: var(--shadow);
}
.daily-history-item > div { display: grid; gap: 3px; }
.daily-history-item > div b { color: var(--navy); }
.daily-history-item > div span, .daily-history-item > span { color: var(--muted); font-size: 12px; }
.daily-history-item > strong { color: var(--ok); font-size: 18px; }
.daily-history-item .btn { text-decoration: none; white-space: nowrap; }
.drill-mock-history-window {
  width: min(1080px, 100%); max-height: min(82vh, 740px); padding: 20px 22px;
  display: flex; flex-direction: column; overflow: hidden;
}
.mock-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.mock-history-head h3 { margin: 0; }
.mock-history-head .btn { background: #fff; }
.mock-history-filter {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
}
.mock-history-filter label { display: flex; align-items: center; gap: 8px; color: #2a5d48; font-size: 13px; }
.mock-history-filter select {
  padding: 6px 10px; border: 1px solid #c9ddd4; border-radius: 6px; background: #fff;
}
.mock-history-filter span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.mock-history-table-wrap { overflow: auto; min-height: 0; flex: 1; border: 1px solid #d7e8de; border-radius: 8px; }
.mock-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mock-history-table th, .mock-history-table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid #e4efe9; vertical-align: middle; white-space: nowrap;
}
.mock-history-table th { position: sticky; top: 0; color: #2a5d48; background: #f4faf7; font-weight: 700; }
.mock-history-table td:nth-child(3),
.mock-history-table td:nth-child(5) { white-space: normal; }
.mock-history-table td:nth-child(5) { min-width: 220px; }
.mock-qstats { display: grid; gap: 5px; }
.mock-qstats b { color: #1e4d3a; font-size: 13px; }
.mock-qtypes { display: flex; flex-wrap: wrap; gap: 4px; }
.mock-qtypes span {
  padding: 2px 7px; color: #2a5d48; background: #eef6f1; border-radius: 999px; font-size: 11px;
}
.mock-history-table .btn { padding: 6px 10px; background: #2f6b52; border-color: #2f6b52; }
.mock-history-empty-row td { color: var(--muted); text-align: center; white-space: normal; padding: 28px 16px; }

/* 无纸化考试仿真界面 */
body.exam-mode {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #dce6ef;
}
.exam-mode .app {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.exam-mode .topbar, .exam-mode .footer-note { display: none; }
.exam-mode .wrap,
.exam-mode #app,
.cbt-shell {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
.cbt-shell { display: flex; flex-direction: column; color: #172333; background: #e7edf3; }

.cbt-header {
  flex: 0 0 auto; min-height: 82px; display: grid; grid-template-columns: 330px 1fr 260px; align-items: stretch;
  color: #fff; background: #14527e; border-bottom: 4px solid #e5ad23;
}
.candidate { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #0f466e; font-size: 12px; }
.candidate-photo {
  width: 52px; height: 62px; display: grid; place-items: center; flex: 0 0 auto;
  color: #536273; background: #eef2f5; border: 1px solid #afbdc9; text-align: center; line-height: 1.35;
}
.candidate div:last-child { display: grid; gap: 3px; }
.candidate b { font-size: 14px; }
.candidate span { color: #d5e3ee; }
.cbt-title { display: grid; place-content: center; text-align: center; line-height: 1.45; }
.cbt-title span { font-size: 15px; letter-spacing: .08em; color: #dbeaf5; }
.cbt-title strong { font-size: 23px; font-weight: 600; }
.cbt-status {
  display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 3px 12px;
  padding: 9px 18px; background: #0f466e;
}
.cbt-status span { align-self: center; color: #d5e3ee; font-size: 12px; }
.cbt-status b { font-size: 22px; font-variant-numeric: tabular-nums; color: #fff3c4; }
.cbt-status button {
  grid-column: 1 / -1; height: 28px; border: 1px solid #f2d47f; color: #503600;
  background: #f3c64f; border-radius: 3px; cursor: pointer; font-weight: 700;
}

.cbt-body {
  min-height: 0; flex: 1 1 0; display: grid; grid-template-columns: 280px 22px minmax(0,1fr);
  overflow: hidden; background: #dfe7ef; transition: grid-template-columns .18s ease;
}
.cbt-body.sidebar-hidden { grid-template-columns: 0 22px minmax(0,1fr); }
.cbt-sidebar {
  min-width: 0; min-height: 0; max-height: 100%;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 12px 32px; background: #f7f9fb;
  border-right: 1px solid #aabac8;
}
.sidebar-hidden .cbt-sidebar { overflow: hidden; padding-left: 0; padding-right: 0; opacity: 0; }
.paper-name {
  position: sticky; top: 0; z-index: 2;
  padding: 0 4px 10px; color: #234b69; font-size: 13px; font-weight: 700; line-height: 1.5;
  background: #f7f9fb;
}
.question-legend {
  position: sticky; top: 34px; z-index: 2;
  display: flex; justify-content: space-between; padding: 7px 5px; margin-bottom: 10px;
  color: #687888; background: #e8eef3; font-size: 11px;
}
.cbt-sidebar .qgroups { gap: 10px; padding-bottom: 12px; }
.cbt-sidebar .qgroup { padding-top: 8px; }
.cbt-sidebar .qgroup-title {
  width: 100%; padding: 3px 2px 7px; border: 0; background: transparent; cursor: pointer; text-align: left;
}
.cbt-sidebar .qgroup-title:hover { color: #9a6700; }
.cbt-sidebar .qgroup.collapsed .qmap { display: none; }
.cbt-sidebar .qmap { grid-template-columns: repeat(5, minmax(34px, 1fr)); gap: 5px; }
.cbt-sidebar .qmap button {
  position: relative; height: 34px; padding: 0; border-radius: 2px; color: #344454; background: #fff;
  border-color: #b9c7d3; font-size: 12px;
}
.cbt-sidebar .qmap button:hover { border-color: #2d6e9d; background: #eef6fc; }
.cbt-sidebar .qmap button.current { color: #fff; background: #266a9b; outline: none; border-color: #174e77; }
.cbt-sidebar .qmap button.done:not(.current) { background: #dcefdc; border-color: #8fb48f; }
.cbt-sidebar .qmap button.wrong:not(.current) { background: #f8d9d5; border-color: #d58f87; }
.cbt-sidebar .qmap button sup { position: absolute; top: 0; right: 3px; color: #b42318; font-size: 11px; }
.cbt-sidebar .qmap button em { position: absolute; bottom: -1px; right: 2px; color: #9a6700; font-size: 11px; font-style: normal; font-weight: 700; }
.cbt-sidebar .qmap button.current sup, .cbt-sidebar .qmap button.current em { color: #ffe29a; }
.calculator-trigger {
  width: 100%; margin-top: 14px; padding: 8px; color: #fff; background: #3d759d;
  border: 1px solid #245b82; border-radius: 3px; cursor: pointer;
}
.cbt-sidebar .scoreboard { margin-top: 14px; text-align: center; font-size: 25px; }
.score-note { text-align: center; color: var(--muted); font-size: 12px; }
.sidebar-toggle {
  align-self: center; width: 22px; height: 68px; padding: 0; color: #fff; background: #3e7398;
  border: 0; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 22px; z-index: 2;
}

.cbt-question { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px 10px 8px; }
.question-heading {
  min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 8px 14px; color: #2d465b; background: #f4f7fa; border: 1px solid #bac8d3; border-bottom: 3px solid #d9a72c;
}
.question-heading div { display: grid; gap: 3px; }
.question-heading b { font-size: 15px; color: #174f77; }
.question-heading span { font-size: 12px; color: #677786; }
.question-workarea {
  min-height: 0; flex: 1; overflow: auto; padding: 18px 20px; background: #fff; border: 1px solid #bac8d3; border-top: 0;
}
.objective-paper { max-width: 1040px; margin: 0 auto; }
.objective-paper .stem { padding: 4px 0 16px; margin: 0; font-size: 16px; border-bottom: 1px solid #dfe6ec; }
.objective-paper .options { gap: 3px; padding-top: 10px; }
.objective-paper .opt {
  min-height: 42px; align-items: center; border: 1px solid transparent; border-radius: 2px; padding: 8px 10px;
}
.objective-paper .opt:hover { background: #edf6fc; border-color: #bad6e8; }
.objective-paper .opt.selected { background: #dceefa; border-color: #6da2c5; }
.objective-paper .opt input { width: 16px; height: 16px; margin: 1px 3px 0 0; accent-color: #276c9d; }

.peek-answer {
  flex: 0 0 auto; padding: 8px 14px 10px; background: #f4faf7;
  border: 1px solid #bac8d3; border-top: 0;
}
.peek-answer-btn {
  height: 32px; padding: 0 14px; border: 1px solid #2f6b52; color: #1e4d3a;
  background: #fff; border-radius: 3px; cursor: pointer; font-size: 13px;
}
.peek-answer-btn.open, .peek-answer-btn:hover { color: #fff; background: #2f6b52; }
.peek-answer-panel {
  margin-top: 8px; padding: 10px 12px; max-height: 220px; overflow: auto;
  background: #fff; border: 1px solid #c9ddd4; border-left: 4px solid #2f6b52; border-radius: 0 6px 6px 0;
}
.peek-hint { margin: 0 0 8px; color: #5b6777; font-size: 12px; }
.peek-sub + .peek-sub { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e4efe9; }
.peek-sub b { color: #1e4d3a; font-size: 12px; }
.peek-sub p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.65; font-size: 13px; }

.cbt-actions {
  min-height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #f4f7fa; border: 1px solid #bac8d3; border-top: 0;
}
.mark-control { display: flex; align-items: center; gap: 7px; color: #3e4f5f; cursor: pointer; font-size: 13px; }
.mark-control input { width: 16px; height: 16px; accent-color: #c28b00; }
.exam-btn {
  min-width: 84px; height: 34px; margin-left: 8px; border: 1px solid #32688e; color: #23516f;
  background: #fff; border-radius: 3px; cursor: pointer;
}
.exam-btn.primary { color: #fff; background: #276b9c; }
.exam-btn:disabled { opacity: .4; cursor: not-allowed; }

.subjective-workspace { height: 100%; min-height: 520px; display: grid; grid-template-rows: minmax(190px, 42%) minmax(260px, 58%); gap: 8px; }
.material-pane, .answer-pane { min-height: 0; display: flex; flex-direction: column; border: 1px solid #b8c6d2; }
.pane-toolbar {
  min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 9px; color: #294a62; background: #e8eef3; border-bottom: 1px solid #b8c6d2; font-size: 12px;
}
.pane-toolbar button { padding: 3px 8px; margin-left: 4px; border: 1px solid #9babb8; background: #fff; cursor: pointer; font-size: 12px; }
.pane-toolbar span { color: #6e7b86; }
.material-content { min-height: 0; flex: 1; overflow: auto; padding: 8px 15px; }
.material-content mark { background: #fff09a; }
.material-content .stem { margin: 0; font-size: 14px; }
.answer-tabs { display: flex; overflow-x: auto; background: #f2f5f7; border-bottom: 1px solid #b8c6d2; }
.answer-tab {
  min-width: 90px; padding: 7px 12px; border: 0; border-right: 1px solid #c7d1d9; background: transparent; cursor: pointer; font-size: 12px;
}
.answer-tab.active { color: #174f77; background: #fff; font-weight: 700; border-top: 2px solid #d5a01d; }
.answer-requirement { padding: 8px 12px; color: #233b4c; border-bottom: 1px dashed #cbd5dd; font-size: 13px; }
.answer-requirement b { color: #9a6700; margin-left: 6px; }
textarea.exam-answer { min-height: 0; flex: 1; border: 0; border-radius: 0; padding: 12px; outline: 0; font-family: var(--font); }
.submitted-answer { padding: 10px 12px; white-space: pre-wrap; line-height: 1.65; }
.answer-pane .analysis { margin: 0 12px 12px; overflow: auto; }
.review-answer-content { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 14px; background: #fbfcfd; }
.review-detail-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px 12px; padding: 8px 10px; color: #285c42; background: #edf8f1;
  border: 1px solid #bfdcc9; border-left: 4px solid #3d8b60; font-size: 12px;
}
.review-detail-notice span { color: #587066; font-size: 11px; }
.subjective-complete-analysis { margin: 10px 12px 14px; border: 1px solid #b9cfde; background: #fff; }
.subjective-complete-analysis > header { padding: 9px 11px; background: #e8f2f8; border-bottom: 1px solid #c8dae6; }
.subjective-complete-analysis > header span { color: #44728f; font-size: 11px; font-weight: 700; }
.subjective-complete-analysis > header h3 { margin: 3px 0 0; color: #244f69; font-size: 13px; line-height: 1.55; }
.subjective-complete-analysis > div { padding: 9px 11px; border-bottom: 1px solid #e0e7ec; }
.subjective-complete-analysis > div:last-child { border-bottom: 0; }
.subjective-complete-analysis b { color: #315c76; font-size: 12px; }
.subjective-complete-analysis p { margin: 5px 0 0; white-space: pre-wrap; line-height: 1.7; font-size: 12px; }
.subjective-complete-analysis ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.7; font-size: 12px; }
.subjective-complete-analysis li + li { margin-top: 4px; }
.subjective-rule { background: #f6faf7; }
.subjective-derivation { background: #fbfcfd; }
.subjective-writing { background: #fff9eb; }
.subjective-check { background: #f8f5fb; }
.subjective-whole-steps { background: #f4f8fb; }

.calculator-modal {
  display: none; position: fixed; inset: 0; z-index: 100; background: rgba(20,35,48,.18);
  align-items: center; justify-content: center;
}
.calculator-modal.open { display: flex; }
.calculator-window { width: 330px; padding: 8px; background: #e7ecf0; border: 1px solid #6d7f8c; }
.calculator-title { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; color: #203e54; }
.calculator-title button { width: 27px; height: 24px; border: 0; color: #fff; background: #b83b31; cursor: pointer; }
#calcDisplay { width: 100%; height: 48px; margin-bottom: 7px; padding: 5px 9px; text-align: right; border: 1px solid #8798a5; background: #fff; font-size: 22px; }
.calculator-keys { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }
.calculator-keys button { height: 38px; border: 1px solid #9aa9b5; background: #f9fbfc; cursor: pointer; font-size: 14px; }
.calculator-keys button:hover { background: #e3eef5; }
.calculator-keys .equals { color: #fff; background: #2c6f9e; border-color: #245b82; }

body.result-mode { overflow: auto; background: #edf1f5; }
.result-mode .wrap, .result-mode #app { height: auto; min-height: 100vh; overflow: visible; }
body.exam-mode.result-mode {
  height: auto;
  max-height: none;
  overflow: auto;
}
body.exam-mode.result-mode .app,
body.exam-mode.result-mode .wrap,
body.exam-mode.result-mode #app {
  height: auto;
  max-height: none;
  overflow: visible;
}
.result-shell { min-height: 100vh; padding-bottom: 40px; background: #edf1f5; }
.result-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px max(28px, calc((100% - 1180px) / 2)); color: #fff; background: #14527e;
  border-bottom: 4px solid #e5ad23;
}
.result-header span { color: #d4e4ef; font-size: 13px; }
.result-header h1 { margin: 4px 0; font-size: 25px; }
.result-header p { margin: 0; color: #dbe8f1; font-size: 13px; }
.result-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.result-header-actions button {
  padding: 8px 13px; color: #fff; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.65); border-radius: 3px; cursor: pointer;
}
.result-header-actions button:hover { color: #173d59; background: #fff; }
.result-summary {
  width: min(1120px, calc(100% - 40px)); display: grid; grid-template-columns: 180px 1fr; gap: 22px;
  margin: 22px auto 12px; padding: 22px 28px; background: #fff; border: 1px solid #cbd5dd;
}
.total-score {
  display: grid; grid-template-columns: auto auto; place-content: center; align-items: end;
  min-height: 140px; border-right: 1px solid #d7e0e7; text-align: center;
}
.total-score strong { font-size: 54px; line-height: 1; color: #b42318; }
.total-score.pass strong { color: #1f7a4d; }
.total-score span { margin-bottom: 5px; color: #74818b; }
.total-score b { grid-column: 1 / -1; margin-top: 10px; color: #485a67; font-size: 14px; }
.score-breakdown { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; align-self: center; }
.score-breakdown div { display: grid; place-items: center; min-height: 86px; background: #f4f7f9; border: 1px solid #dde5ea; }
.score-breakdown span { color: #5c6d79; font-size: 12px; }
.score-breakdown strong { color: #174f77; font-size: 29px; }
.score-breakdown small { color: #788690; }
.grading-note {
  grid-column: 2; margin: 0; padding: 8px 10px; color: #765900; background: #fff8dc;
  border-left: 3px solid #d5a01d; font-size: 12px; line-height: 1.6;
}
.training-analysis {
  width: min(1120px, calc(100% - 40px)); margin: 0 auto 14px;
  background: #fff; border: 1px solid #cbd5dd;
}
.training-analysis-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 20px; color: #fff; background: linear-gradient(110deg, #234f6e, #367798);
}
.training-analysis-head span { color: #d9e9f2; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.training-analysis-head h2 { margin: 3px 0 0; font-size: 19px; }
.training-analysis-head > strong { font-size: 34px; color: #fff1bd; }
.training-verdict {
  padding: 12px 18px; color: #29495e; background: #edf5f8;
  border-bottom: 1px solid #d4e1e7; font-size: 14px; font-weight: 600; line-height: 1.65;
}
.training-kpis { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; padding: 14px 16px 8px; }
.training-kpis div { display: grid; gap: 5px; padding: 10px; text-align: center; background: #f5f8fa; border: 1px solid #dde5ea; }
.training-kpis span { color: #63737e; font-size: 11px; }
.training-kpis b { color: #174f77; font-size: 21px; }
.training-subjects { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 6px 16px 14px; }
.training-subjects > b { color: #3e5667; margin-right: 4px; font-size: 12px; }
.training-subjects span { padding: 5px 9px; color: #445764; background: #eef2f5; border-radius: 999px; font-size: 12px; }
.training-subjects strong { color: #174f77; }
.training-topic-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; padding: 0 16px 16px; }
.training-topic-column { min-width: 0; border: 1px solid #d6dfe5; }
.training-topic-column h3 {
  display: flex; justify-content: space-between; margin: 0; padding: 9px 11px;
  color: #364f60; background: #f1f4f6; font-size: 13px;
}
.training-topic-column h3 span { color: #6b7b86; font-size: 11px; }
.training-topic-column.weak h3 { color: #8e2f27; background: #fcedeb; }
.training-topic-column.review h3 { color: #7c5900; background: #fff6d9; }
.training-topic-column.stable h3 { color: #23613e; background: #eaf6ee; }
.training-topic-column ul { display: grid; gap: 10px; margin: 0; padding: 11px; list-style: none; }
.training-topic-column li > div { display: flex; justify-content: space-between; gap: 9px; font-size: 11px; }
.training-topic-column li span { overflow: hidden; color: #425664; text-overflow: ellipsis; white-space: nowrap; }
.training-topic-column li b { color: #234f6e; }
.training-topic-column li i { display: block; height: 5px; margin-top: 5px; overflow: hidden; background: #e4eaee; border-radius: 999px; }
.training-topic-column li em { display: block; height: 100%; background: #b84a40; }
.training-topic-column.review li em { background: #d09a20; }
.training-topic-column.stable li em { background: #3b8a5c; }
.training-topic-column li small { display: block; margin-top: 3px; color: #7b8992; font-size: 10px; }
.training-topic-column > p { margin: 0; padding: 14px 11px; color: #71808a; font-size: 12px; line-height: 1.6; }
.training-diagnostics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 15px 16px 18px; border-top: 1px solid #dce3e8; }
.training-diagnostics section { padding: 12px 14px; background: #f7f9fa; border-left: 4px solid #527d9a; }
.training-diagnostics section:last-child { background: #f4f8f5; border-left-color: #4c8562; }
.training-diagnostics h3 { margin: 0 0 7px; color: #315369; font-size: 13px; }
.training-diagnostics ul, .training-diagnostics ol { margin: 0; padding-left: 19px; color: #445660; line-height: 1.7; font-size: 12px; }
.training-diagnostics li + li { margin-top: 5px; }
.result-section-nav {
  width: min(1120px, calc(100% - 40px)); display: flex; flex-wrap: wrap; gap: 6px;
  position: sticky; top: 0; z-index: 5; margin: 0 auto 12px; padding: 9px 12px;
  background: #f9fbfc; border: 1px solid #cbd5dd;
}
.result-section-nav a {
  padding: 6px 10px; color: #275a7d; background: #e8f0f6; border: 1px solid #c4d5e1;
  text-decoration: none; font-size: 12px;
}
.result-list { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.result-section { scroll-margin-top: 58px; }
.result-section > h2 {
  margin: 20px 0 8px; padding: 9px 13px; color: #fff; background: #3d6f92;
  font-size: 15px; font-weight: 600;
}
.result-question { margin-bottom: 12px; background: #fff; border: 1px solid #cbd5dd; border-left: 5px solid #b42318; }
.result-question.correct { border-left-color: #1f7a4d; }
.result-question.partial { border-left-color: #c58b00; }
.result-question.archived-answer-missing { border-left-color: #527a96; }
.result-question > header {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 13px;
  color: #3d5261; background: #f3f6f8; border-bottom: 1px solid #d8e0e6; font-size: 12px;
}
.result-question > header strong { color: #174f77; font-size: 14px; }
.result-stem { padding: 14px 16px 8px; line-height: 1.75; white-space: pre-wrap; }
.result-options { margin: 0 20px 12px 42px; padding-left: 18px; line-height: 1.8; color: #435460; }
.answer-compare { display: grid; grid-template-columns: 1fr 1fr; margin: 10px 14px; border: 1px solid #d6dfe5; }
.answer-compare > div { min-width: 0; padding: 10px 12px; }
.answer-compare > div + div { border-left: 1px solid #d6dfe5; background: #f3f8f4; }
.answer-compare b { color: #31566f; font-size: 12px; }
.answer-compare p { margin: 7px 0 0; white-space: pre-wrap; line-height: 1.7; font-size: 13px; }
.grading-reason { margin: 8px 13px 12px; padding: 8px 10px; color: #36566d; background: #eef5fa; border-left: 4px solid #4f82a5; font-size: 12px; line-height: 1.6; }
.grading-reason.conflict { color: #8a2f27; background: #fff1ef; border-left-color: #b42318; }
.result-subanswer { margin: 8px 14px; border: 1px solid #d6dfe5; }
.result-subanswer h4 {
  display: flex; justify-content: space-between; gap: 14px; margin: 0; padding: 8px 10px;
  color: #314e62; background: #eef3f6; font-size: 13px;
}
.result-subanswer h4 span { color: #9a6700; white-space: nowrap; }
.result-subanswer .answer-compare { margin: 0; border: 0; }
.result-analysis { margin: 10px 14px 14px; padding: 11px 13px; background: #f7f8fa; border-left: 3px solid #6389a5; }
.result-analysis b { color: #2c5571; font-size: 12px; }
.result-analysis p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.7; font-size: 13px; }
.detailed-analysis { margin: 12px 14px 16px; border: 1px solid #c7d5e0; background: #fbfcfd; }
.detailed-analysis > header { padding: 10px 13px; background: #eaf2f8; border-bottom: 1px solid #cbdbe6; }
.detailed-analysis > header span { color: #4b718b; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.detailed-analysis > header h3 { margin: 3px 0 0; color: #234f6d; font-size: 15px; }
.detailed-conclusion { padding: 11px 13px; background: #f7fafc; border-bottom: 1px solid #dce5eb; }
.detailed-conclusion > b, .detailed-options > b, .detailed-subs > b { color: #31566f; font-size: 12px; }
.detailed-conclusion p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.75; font-size: 13px; }
.current-rule-note { margin: 10px 13px; padding: 10px 12px; color: #684717; background: #fff7df; border: 1px solid #e5c875; border-left: 4px solid #c48b1d; }
.current-rule-note b { color: #855a12; font-size: 12px; }
.current-rule-note p { margin: 5px 0 0; white-space: pre-wrap; line-height: 1.7; font-size: 12px; }
.detailed-options { padding: 11px 13px 13px; }
.detailed-options > ol { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.detailed-options li { padding: 9px 11px; background: #fff; border: 1px solid #dbe3e9; border-left: 4px solid #9aaab5; }
.detailed-options li.answer-option { background: #f1f8f3; border-color: #bcd8c5; border-left-color: #35845a; }
.detailed-options li > strong { color: #304f63; font-size: 12px; }
.detailed-options li.answer-option > strong { color: #216441; }
.detailed-options li p { margin: 5px 0 0; color: #435661; line-height: 1.7; font-size: 13px; }
.detailed-subs { padding: 11px 13px 13px; }
.detailed-subs > section { margin-top: 9px; padding: 10px 12px; background: #fff; border: 1px solid #d8e1e7; border-left: 4px solid #547f9c; }
.detailed-subs h4 { margin: 0 0 7px; color: #2f5872; font-size: 13px; }
.detailed-subs p { margin: 5px 0; line-height: 1.7; font-size: 13px; }
.detailed-subs ol { margin: 7px 0; padding-left: 21px; line-height: 1.7; font-size: 13px; }
.detailed-subs li + li { margin-top: 4px; }
.detailed-subs .detail-check { color: #6a5432; background: #fff8e8; padding: 5px 7px; }
.detailed-analysis.compact { margin: 10px 0 12px; }
.result-knowledge { margin: 12px 14px 18px; border: 1px solid #bdd1c5; background: #fbfdfb; }
.result-knowledge > header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 13px; background: #edf6f0; border-bottom: 1px solid #c9dacf;
}
.result-knowledge > header span { color: #397050; font-size: 11px; font-weight: 700; }
.result-knowledge > header h3 { margin: 2px 0 0; color: #24563b; font-size: 15px; }
.result-knowledge > header a {
  flex: 0 0 auto; padding: 6px 9px; color: #275a7d; background: #fff;
  border: 1px solid #b8ccd8; text-decoration: none; font-size: 12px;
}
.knowledge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px; }
.knowledge-grid b { color: #31566f; font-size: 12px; }
.knowledge-grid ol, .knowledge-grid ul { margin: 7px 0 0; padding-left: 20px; line-height: 1.7; font-size: 13px; }
.knowledge-grid li + li { margin-top: 5px; }
.knowledge-rules, .knowledge-steps { padding: 11px 13px; border: 1px solid #d7e3dc; }
.knowledge-rules { background: #f6faf7; }
.knowledge-steps { background: #f3f8fb; border-color: #d2e0e9; }
.knowledge-steps b { color: #2c5f7f; }
.knowledge-memory, .knowledge-traps { padding: 9px 11px; }
.knowledge-memory { background: #eef5fa; border-left: 3px solid #4a7b9d; }
.knowledge-memory p { margin: 6px 0 0; color: #294b63; line-height: 1.65; font-size: 13px; }
.knowledge-traps { margin-top: 9px; background: #fff8e8; border-left: 3px solid #c68a24; }
.knowledge-traps ul { margin-top: 5px; }
.result-footer {
  width: min(1120px, calc(100% - 40px)); display: flex; align-items: center; justify-content: space-between;
  margin: 16px auto 0; color: #71808a; font-size: 12px;
}
.result-footer button { padding: 8px 12px; color: #85413a; background: #fff; border: 1px solid #c99b96; cursor: pointer; }

@media print {
  body.result-mode { background: #fff; }
  .result-header-actions, .result-section-nav, .result-footer { display: none; }
  .result-header { color: #111; background: #fff; border-bottom: 2px solid #111; }
  .result-header span, .result-header p { color: #444; }
  .result-summary, .training-analysis, .result-list { width: 100%; }
  .result-question { break-inside: auto; }
  .training-topic-column, .training-diagnostics section { break-inside: avoid; }
  .detailed-analysis, .result-knowledge, .knowledge-memory, .knowledge-traps { break-inside: avoid; }
}

@media (max-width: 900px) {
  .grid-3, .grid-2, .exam-layout { grid-template-columns: 1fr; }
  .daily-grid, .daily-hero, .history-grid { grid-template-columns: 1fr; }
  .daily-promo, .history-promo { align-items: flex-start; flex-direction: column; }
  .daily-history-item { grid-template-columns: 1fr 1fr; }
  .side { position: static; }
  .hero { padding: 20px; }
  .nav { display: none; }
  body.exam-mode { overflow: auto; }
  .exam-mode .wrap, .exam-mode #app { height: auto; min-height: 100vh; }
  .cbt-header { grid-template-columns: 1fr auto; }
  .candidate { display: none; }
  .cbt-title { justify-content: start; padding: 8px 14px; text-align: left; }
  .cbt-title span { display: none; }
  .cbt-title strong { font-size: 18px; }
  .cbt-status { min-width: 150px; }
  .cbt-body, .cbt-body.sidebar-hidden { min-height: calc(100vh - 82px); grid-template-columns: 1fr; }
  .cbt-sidebar, .sidebar-toggle { display: none; }
  .cbt-question { padding: 8px; }
  .question-heading { align-items: flex-start; }
  .subjective-workspace { min-height: 700px; }
  .result-header { align-items: flex-start; padding: 18px; }
  .result-summary { grid-template-columns: 1fr; padding: 16px; }
  .total-score { border-right: 0; border-bottom: 1px solid #d7e0e7; }
  .score-breakdown { grid-template-columns: 1fr; }
  .grading-note { grid-column: 1; }
  .training-kpis, .training-topic-grid, .training-diagnostics { grid-template-columns: 1fr; }
  .answer-compare { grid-template-columns: 1fr; }
  .answer-compare > div + div { border-left: 0; border-top: 1px solid #d6dfe5; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .result-knowledge > header { align-items: flex-start; }
}
