
/* ===========================================================
   延伸学习资源 + 面试官可能会问（阶段自测）
   =========================================================== */

/* ---------------- 延伸学习资源 ---------------- */
.rs-box {
  margin: var(--s6) 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.rs-head {
  display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s4) var(--s5) var(--s3);
  border-bottom: 1px dashed var(--line);
}
.rs-head-t { font-size: var(--fs-h4); font-weight: 600; color: var(--fg); }
.rs-head-s { font-size: var(--fs-micro); color: var(--fg-3); }
.rs-list { display: flex; flex-direction: column; }
.rs-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: var(--s4);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--fg);
  transition: background 0.16s;
}
.rs-item:last-child { border-bottom: none; }
.rs-item:hover { background: var(--surface-2); }
.rs-kind {
  font-size: var(--fs-micro); font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.rs-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rs-title { font-size: var(--fs-sm); font-weight: 600; color: var(--fg); }
.rs-note { font-size: var(--fs-xs); color: var(--fg-3); }
.rs-go { color: var(--fg-3); display: inline-flex; transition: transform 0.16s, color 0.16s; }
.rs-item:hover .rs-go { color: var(--accent); transform: translateX(3px); }

/* ---------------- 面试官可能会问 ---------------- */
.iv-block {
  margin: var(--s6) 0 var(--s4);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  overflow: hidden;
}
.iv-head {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5);
}
.iv-head-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none;
  border-radius: var(--r);
  background: var(--accent); color: var(--btn-fg);
}
.iv-head-txt { display: flex; flex-direction: column; gap: 1px; }
.iv-head-txt b { font-size: var(--fs-h4); color: var(--fg); }
.iv-head-txt span { font-size: var(--fs-xs); color: var(--fg-2); }

.iv-list {
  display: flex; flex-direction: column; gap: var(--s4);
  padding: 0 var(--s5) var(--s5);
}
.iv-q {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: var(--s4);
}
.iv-q-title { display: flex; align-items: flex-start; gap: var(--s2); margin-bottom: var(--s3); }
.iv-q-no {
  flex: none;
  min-width: 22px; height: 22px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 700;
  border-radius: 6px;
  background: var(--surface-2); color: var(--fg-2);
}
.iv-q-tag {
  flex: none; margin-top: 1px;
  font-size: var(--fs-micro); font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent-line); border-radius: 5px;
  padding: 1px 6px;
}
.iv-q-text {
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.6;
  color: var(--fg); white-space: pre-wrap;
}

/* 选项 */
.iv-opts { display: flex; flex-direction: column; gap: var(--s2); }
.iv-opt {
  display: flex; align-items: flex-start; gap: var(--s3);
  width: 100%; text-align: left;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface);
  font-family: inherit; font-size: var(--fs-sm); line-height: 1.55;
  color: var(--fg-2); cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.iv-opt-key {
  flex: none;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 700;
  border: 1px solid var(--line-2); border-radius: 6px;
  color: var(--fg-2); background: var(--surface-2);
}
.iv-opt-text { padding-top: 1px; }
.iv-opt:hover:not(.correct):not(.wrong) { border-color: var(--accent-line); background: var(--accent-soft); }
.iv-opt.picked { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); }
.iv-opt.picked .iv-opt-key { background: var(--accent); color: var(--btn-fg); border-color: var(--accent); }

.iv-opt.correct {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 11%, transparent);
  color: var(--fg);
}
.iv-opt.correct .iv-opt-key { background: var(--ok); color: #fff; border-color: var(--ok); }
.iv-opt.wrong {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}
.iv-opt.wrong .iv-opt-key { background: #dc2626; color: #fff; border-color: #dc2626; }
html[data-theme="dark"] .iv-opt.wrong {
  border-color: #f87171; background: rgba(248, 113, 113, 0.13); color: #fca5a5;
}

/* 操作区 */
.iv-actions { display: flex; margin-top: var(--s3); }
.iv-actions .btn { height: 34px; font-size: var(--fs-xs); }

/* 判定结果 */
.iv-verdict {
  display: flex; align-items: center; gap: var(--s2);
  margin-top: var(--s3);
  font-size: var(--fs-sm); font-weight: 600;
}
.iv-verdict .iv-vd-icon { display: inline-flex; }
.iv-verdict.ok { color: var(--ok); }
.iv-verdict.no { color: #dc2626; }
html[data-theme="dark"] .iv-verdict.no { color: #f87171; }

/* 参考答案 / 解析 */
.iv-answer, .iv-explain {
  margin-top: var(--s3);
  border-radius: var(--r-sm);
  padding: var(--s3) var(--s4);
  font-size: var(--fs-sm); line-height: 1.7;
}
.iv-answer {
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.iv-explain {
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.iv-ans-label, .iv-exp-label {
  display: block; margin-bottom: 4px;
  font-size: var(--fs-xs); font-weight: 700;
  color: var(--accent); letter-spacing: 0.02em;
}
.iv-ans-body, .iv-exp-body { color: var(--fg-2); white-space: pre-wrap; }
.iv-ans-body { color: var(--fg); }

/* ---------------- 移动端 ---------------- */
@media (max-width: 640px) {
  .iv-head, .iv-list { padding-left: var(--s4); padding-right: var(--s4); }
  .iv-list { padding-bottom: var(--s4); gap: var(--s3); }
  .iv-q { padding: var(--s3); }
  .rs-head { padding: var(--s3) var(--s4); }
  .rs-item { padding: var(--s3) var(--s4); gap: var(--s3); }
  .rs-kind { font-size: 10.5px; }
}

/* ---------------- 阶段 ⇄ 题库 ----------------
   路线页每个阶段末尾一条；题库页从阶段跳过来时顶部一条。 */
.sb-strip {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  margin: var(--s4) 0 0;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  background: var(--surface);
}
.sb-k { font-size: var(--fs-xs); font-weight: 600; color: var(--fg); white-space: nowrap; }
.sb-k b { color: var(--accent); font-family: var(--mono); font-size: var(--fs-sm); }
.sb-d {
  flex: 1 1 60%; min-width: 0;
  font-size: var(--fs-micro); line-height: 1.6; color: var(--fg-3);
}
.sb-go {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--accent);
  text-decoration: none; white-space: nowrap;
}
.sb-go svg { width: 13px; height: 13px; transition: transform 0.16s; }
.sb-go:hover svg { transform: translateX(3px); }

.sb-banner {
  display: grid; gap: 2px;
  margin: 0 0 var(--s4); padding: var(--s4) var(--s5);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--accent-soft);
}
.sbb-k {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
}
.sbb-t { font-size: var(--fs-h4); font-weight: 600; color: var(--fg); }
.sbb-d { max-width: var(--readw); font-size: var(--fs-xs); line-height: 1.7; color: var(--fg-2); }
.sbb-go {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--accent); text-decoration: none;
}
.sbb-go svg { width: 13px; height: 13px; }

.sb-banner.out { border-left-color: var(--line-2); background: var(--bg-alt); }
.sb-banner.out .sbb-k { color: var(--fg-3); }

@media (max-width: 760px) {
  .sb-d { flex-basis: 100%; }
  .sb-banner { padding: var(--s3) var(--s4); }
}
