:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #66727f;
  --line: #d7dee6;
  --paper: #ffffff;
  --wash: #f4f7f9;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --amber: #a15c07;
  --red: #b42318;
  --green: #087443;
  --blue: #2457a6;
  --shadow: 0 10px 30px rgba(19, 32, 44, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  padding-bottom: 96px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(244, 247, 249, 0) 320px),
    var(--wash);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
}

button,
select,
input,
textarea {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(215, 222, 230, 0.9);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: clamp(24px, 3vw, 38px);
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 19px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 10px;
  min-width: min(430px, 100%);
}

.status-strip > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.status-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.status-strip strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 22px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 40px) 48px;
}

.sidebar {
  position: sticky;
  top: 124px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.panel,
.question-card,
.hero-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.panel h2 {
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
}

.progress-shell {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ed;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #2f8f46);
  transition: width 0.2s ease;
}

.result-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #eef8f4;
  border: 1px solid #b9ded2;
}

.result-score {
  display: block;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.result-pass {
  color: var(--green);
  font-weight: 700;
}

.result-miss {
  color: var(--red);
  font-weight: 700;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.nav-grid a {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
}

.nav-grid a.answered {
  border-color: #8bc5ba;
  background: #edf9f6;
}

.nav-grid a.correct {
  border-color: #7ac39d;
  background: #eaf8f1;
  color: var(--green);
}

.nav-grid a.wrong {
  border-color: #eda5a0;
  background: #fff1f0;
  color: var(--red);
}

.content {
  min-width: 0;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 116px;
  padding: 22px;
}

.hero-panel h2 {
  max-width: 760px;
  font-size: clamp(22px, 3vw, 32px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-stats span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  margin: 0;
  padding: 12px clamp(14px, 3vw, 40px);
  border-top: 1px solid rgba(215, 222, 230, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -10px 30px rgba(19, 32, 44, 0.10);
  backdrop-filter: blur(14px);
}

.primary-btn,
.ghost-btn {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

.primary-btn {
  width: min(420px, 100%);
  color: #fff;
  background: var(--accent);
}

.primary-btn:hover {
  background: var(--accent-dark);
}

.primary-btn.incomplete {
  color: #f8fafc;
  background: #8a949f;
}

.primary-btn.incomplete:hover {
  background: #747f8a;
}

.ghost-btn {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.questions {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.question-card {
  overflow: hidden;
  scroll-margin-top: 132px;
}

.question-card.hidden-by-filter {
  display: none;
}

.question-main {
  padding: 18px;
}

.question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.question-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.question-no {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.question-points {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.difficulty-easy {
  border-color: #b9ded2;
  color: var(--green);
  background: #eef8f4;
}

.difficulty-medium {
  border-color: #f0c27b;
  color: var(--amber);
  background: #fff7e8;
}

.stem {
  margin: 0 0 14px;
  white-space: pre-wrap;
  font-size: 17px;
}

.question-image {
  display: block;
  max-width: min(100%, 900px);
  max-height: 560px;
  object-fit: contain;
  margin: 10px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.question-image.wide {
  max-width: 100%;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.option:hover {
  border-color: #93c5bd;
}

.option input {
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
  accent-color: var(--accent);
}

.option.correct-option {
  border-color: #71bd94;
  background: #ecf8f1;
}

.option.wrong-option {
  border-color: #e38f89;
  background: #fff1f0;
}

.option-key {
  font-weight: 800;
}

.blank-list {
  display: grid;
  gap: 12px;
}

.blank-row {
  display: grid;
  grid-template-columns: minmax(170px, 260px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.blank-row input {
  min-height: 42px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blank-row input.correct-input {
  border-color: #71bd94;
  background: #ecf8f1;
}

.blank-row input.wrong-input {
  border-color: #e38f89;
  background: #fff1f0;
}

.review {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  padding: 16px 18px 18px;
}

.review h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.review-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-item strong {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.analysis {
  margin: 0;
}

.blank-answer-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 4px solid var(--amber);
  background: #fff7e8;
  border-radius: 0 8px 8px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .status-strip {
    grid-template-columns: repeat(3, 1fr);
    min-width: 0;
  }

  .status-strip strong {
    font-size: 18px;
  }

  .options,
  .review-grid,
  .blank-row {
    grid-template-columns: 1fr;
  }

  .nav-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .stem {
    font-size: 16px;
  }

  .question-main {
    padding: 15px;
  }
}
