/* ============================================================
   模拟自测
   ============================================================ */
.exam-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(560px 220px at 12% 0%, rgba(139, 124, 255, .10), transparent 72%),
    rgba(255, 255, 255, .018);
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 18px;
}
.exam-hero__spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.exam-hero__spec .spec {
  border-left: 2px solid rgba(139, 124, 255, .5);
  padding-left: 12px;
}
.exam-hero__spec b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: #fff;
  letter-spacing: -.02em;
}
.exam-hero__spec span { font-size: 12px; color: var(--dim); }

.exam-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .exam-grid { grid-template-columns: 1fr; }
}
.exam-side .panel + .panel { margin-top: 14px; }

/* 知识点条 */
.topic-list { display: grid; gap: 9px; }
.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 84px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.topic-row.is-weak .topic-name { color: #FFB07A; }
.topic-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.topic-bar > i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.topic-pct {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  text-align: right;
}

/* 历史成绩 */
.his-list { display: grid; gap: 6px; }
.his-row {
  display: grid;
  grid-template-columns: 1fr auto 52px;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  color: var(--dim);
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.his-row:last-child { border-bottom: none; }
.his-row b { font-family: var(--mono); font-size: 13px; }
.his-row b.good { color: var(--accent-2); }
.his-row b.bad { color: #FF9A9A; }
.his-pct { text-align: right; font-family: var(--mono); }

/* 答题页 */
.exam-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .022);
  flex-wrap: wrap;
}
.exam-timer {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.exam-timer.is-warn { color: #FFB07A; }
.exam-progress { font-size: 12.5px; color: var(--dim); font-family: var(--mono); }

.exam-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 820px) {
  .exam-body { grid-template-columns: 1fr; }
  .exam-nav { order: -1; }
  .grid-nav { grid-template-columns: repeat(10, 1fr); }
}
.q-opt.is-picked {
  border-color: rgba(139, 124, 255, .55);
  background: rgba(139, 124, 255, .12);
}
.q-opt.is-picked .q-opt__key {
  border-color: rgba(139, 124, 255, .6);
  color: var(--accent);
}

.grid-nav {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
.g-num {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .02);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.g-num:hover { border-color: var(--line-2); color: var(--text); }
.g-num.is-done { border-color: rgba(90, 209, 199, .45); color: var(--accent-2); background: rgba(90, 209, 199, .08); }
.g-num.is-cur { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.exam-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.exam-actions .btn { flex: 1; justify-content: center; }

/* ============================================================
   操作题
   ============================================================ */
.op-card { padding: clamp(18px, 3vw, 26px); }
.op-title { font-size: 1.125rem; letter-spacing: -.01em; margin: 4px 0 14px; }
.op-label {
  margin: 20px 0 8px;
  font-size: 12.5px;
  color: var(--dim);
  font-family: var(--mono);
}
.op-code {
  display: block;
  width: 100%;
  min-height: 220px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0E0E13;
  color: #D8D8E2;
  font-family: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  tab-size: 4;
}
.op-code:focus { outline: none; border-color: rgba(139, 124, 255, .55); }

.op-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.op-ref {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .022);
}
.op-ref__head {
  margin: 10px 0 8px;
  font-size: 12px;
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: .04em;
}
.op-ref__head:first-child { margin-top: 0; }
.op-points { margin: 0 0 6px; padding-left: 20px; }
.op-points li { font-size: 13px; line-height: 1.8; color: var(--muted); }
.op-ref__code {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #0E0E13;
  border: 1px solid var(--line);
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: #D8D8E2;
}
.op-ref__code code { font-family: "SFMono-Regular", Menlo, Consolas, monospace; white-space: pre; }

.op-grade {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.op-grade__label { font-size: 12.5px; color: var(--dim); font-family: var(--mono); }
.op-grade .chip.is-on {
  color: var(--accent-2);
  border-color: rgba(90, 209, 199, .5);
  background: rgba(90, 209, 199, .12);
}

.op-num {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
  color: var(--dim);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.op-num.is-done { color: var(--accent-2); border-color: rgba(90, 209, 199, .4); }
.op-num.is-cur { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.result__parts {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--dim);
  font-family: var(--mono);
}
.result__parts b { color: var(--text); font-size: 15px; }

.op-details { margin-top: 10px; }
.op-details summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--accent);
  font-family: var(--mono);
}
.op-details .op-ref__code { margin-top: 8px; }
