:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-deep: #e9e1d3;
  --surface: #fffdf7;
  --ink: #18343a;
  --ink-soft: #486066;
  --teal: #147f82;
  --teal-pale: #d8eeea;
  --red: #c95738;
  --yellow: #e8bb43;
  --line: #cfc6b7;
  --shadow: 0 18px 50px rgb(24 52 58 / 10%);
  --display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --body: "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 4%, rgb(20 127 130 / 10%), transparent 24rem),
    linear-gradient(90deg, rgb(24 52 58 / 4%) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 42px 42px, auto;
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.65;
}

button,
a,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-frame {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  margin: 12px 0 34px;
  padding: 10px 14px 10px 12px;
  border: 1px solid rgb(24 52 58 / 14%);
  background: rgb(255 253 247 / 88%);
  box-shadow: 0 10px 30px rgb(24 52 58 / 8%);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--display);
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.18;
}

.brand small {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  display: inline-grid;
  min-width: 56px;
  min-height: 44px;
  padding: 0 14px;
  place-items: center;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-nav a:hover {
  background: var(--teal-pale);
  transform: translateY(-1px);
}

.primary-nav a[aria-current="page"] {
  background: var(--ink);
  color: white;
}

.view {
  min-height: 65vh;
  animation: reveal 360ms ease both;
}

.view[hidden] {
  display: none;
}

.hero {
  display: block;
}

.hero__copy {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 6vw, 78px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero__copy::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 310px;
  height: 310px;
  border: 52px solid var(--teal-pale);
  border-radius: 50%;
  content: "";
  opacity: 0.6;
}

.eyebrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-grid;
  min-width: 31px;
  height: 25px;
  padding: 0 7px;
  place-items: center;
  background: var(--teal);
  color: white;
}

.eyebrow--light {
  color: #bce6df;
}

.eyebrow--light span {
  background: var(--yellow);
  color: var(--ink);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.2;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0;
  font-size: clamp(24px, 5.2vw, 72px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-title__line {
  display: block;
  white-space: nowrap;
}

.hero h1 em {
  color: var(--red);
  font-style: normal;
}

.hero__lead {
  position: relative;
  z-index: 1;
  max-width: 690px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 2vw, 20px);
}

.hero__actions,
.record-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-grid;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  place-items: center;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgb(24 52 58 / 16%);
}

.button--primary {
  background: var(--teal);
  color: white;
}

.button--ink {
  background: var(--ink);
  color: white;
}

.button--danger {
  margin-top: 22px;
  background: var(--red);
  color: white;
}

.button--outline {
  border-color: var(--ink);
  background: transparent;
}

.button--outline input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.simulator-note {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 26px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--yellow);
  color: var(--ink-soft);
  font-size: 13px;
}

.official-facts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 4vw, 44px);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.official-facts h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 40px);
}

.fact-summary {
  margin: 14px 0 0;
  color: #dce9e9;
  font-size: 14px;
}

.official-facts > p:last-child {
  margin: 24px 0 0;
  color: #bdd0d2;
  font-size: 13px;
}

.cert-facts-strip {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.8fr);
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.cert-facts-strip__intro {
  padding: 24px 30px;
  border-right: 1px solid rgb(255 255 255 / 18%);
}

.cert-facts-strip__intro h2 {
  margin: 0;
  font-size: clamp(26px, 2.5vw, 38px);
}

.cert-facts-strip__intro > p:last-child {
  margin: 10px 0 0;
  color: #bdd0d2;
  font-size: 13px;
}

.cert-facts-strip .fact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.cert-facts-strip .fact-grid div {
  display: grid;
  min-height: 100%;
  align-content: center;
}

.fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 28px 0 0;
  background: rgb(255 255 255 / 16%);
}

.fact-grid div {
  min-height: 105px;
  padding: 18px;
  background: var(--ink);
}

.fact-grid dt {
  color: #a9c3c5;
  font-size: 12px;
}

.fact-grid dd {
  margin: 4px 0 0;
  color: #fff;
  font-family: var(--display);
  font-size: 30px;
}

.dashboard-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 22px 0 72px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.dashboard-strip article {
  position: relative;
  min-height: 150px;
  padding: 24px 30px;
}

.dashboard-strip article + article {
  border-left: 1px solid var(--line);
}

.dashboard-strip p,
.dashboard-strip strong,
.dashboard-strip small {
  display: block;
  margin: 0;
}

.dashboard-strip p {
  color: var(--ink-soft);
  font-size: 13px;
}

.dashboard-strip strong {
  margin-top: 2px;
  font-family: var(--display);
  font-size: 46px;
}

.dashboard-strip small {
  color: var(--ink-soft);
}

.dashboard-strip .text-link {
  margin-top: 6px;
}

.metric-index {
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--red);
  font-family: var(--display);
  font-weight: 800;
}

.focus-panel,
.official-section {
  margin: 0 0 76px;
}

.section-heading,
.view-heading,
.exam-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.section-heading h2,
.view-heading h1,
.exam-header h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
}

.view-heading h1 {
  white-space: nowrap;
}

.section-heading > p,
.view-heading > p,
.exam-header > div > p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--ink-soft);
}

.text-link {
  min-height: 44px;
  padding: 10px 0;
  color: var(--teal);
  font-weight: 800;
  text-underline-offset: 4px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 12px;
}

.focus-card--wide {
  grid-column: span 2;
}

.focus-card {
  min-height: 220px;
  padding: 26px;
  border-top: 5px solid var(--teal);
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(24 52 58 / 8%);
}

.focus-card--hot {
  border-top-color: var(--red);
}

.focus-card > span {
  color: var(--red);
  font-size: clamp(30px, 2.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
}

.focus-card h3 {
  margin: 30px 0 12px;
  font-size: 26px;
}

.focus-card p {
  margin: 0;
  color: var(--ink-soft);
}

.official-layout {
  display: grid;
  grid-template-columns: minmax(380px, 42fr) minmax(0, 58fr);
  gap: 22px;
  align-items: stretch;
}

.official-links {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.official-links a {
  display: grid;
  min-height: 0;
  align-content: center;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.official-links a:hover {
  border-color: var(--teal);
  transform: translateX(4px);
}

.official-links span {
  color: var(--red);
  font-size: clamp(30px, 2.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.official-links strong {
  margin-top: 14px;
  font-family: var(--display);
  font-size: 22px;
}

.official-links small {
  margin-top: 6px;
  color: var(--teal);
}

.official-poster {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.poster-window {
  display: block;
  flex: 1 1 auto;
  max-height: 560px;
  overflow: auto;
  border: 10px solid var(--surface);
  background: #e9faf9;
  scrollbar-color: var(--teal) var(--surface);
}

.poster-window img {
  display: block;
  width: 100%;
  height: auto;
}

.official-poster figcaption {
  padding: 16px 4px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.official-poster figcaption strong {
  display: block;
  color: var(--ink);
}

.storage-warning,
.callout {
  padding: 18px 20px;
  border-left: 5px solid var(--teal);
  background: var(--teal-pale);
}

.storage-warning {
  margin: 0 0 18px;
}

.storage-warning > div + div {
  margin-top: 10px;
}

.storage-warning .text-link {
  margin-left: 12px;
}

.callout--warning {
  border-color: var(--red);
  background: #f5dfd7;
}

.callout p {
  margin-bottom: 0;
}

.view-heading {
  align-items: start;
  flex-direction: column;
  max-width: 880px;
  margin: 34px 0 38px;
}

.learning-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
}

.chapter-rail {
  border: 1px solid var(--line);
  background: var(--surface);
}

.chapter-rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-rail li + li {
  border-top: 1px solid var(--line);
}

.chapter-rail button {
  width: 100%;
  min-height: 48px;
  padding: 9px 16px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.chapter-rail button:hover {
  background: var(--teal-pale);
}

.content-placeholder,
.question-placeholder,
.result-shell,
.breakdown-shell,
.empty-state {
  position: relative;
  min-height: 300px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  background: var(--surface);
}

.content-placeholder h2,
.question-placeholder h2,
.empty-state h2 {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 44px);
}

.placeholder-number {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--paper-deep);
  font-family: var(--display);
  font-size: clamp(70px, 13vw, 170px);
  font-weight: 800;
  line-height: 1;
}

.exam-header {
  align-items: center;
  margin-top: 34px;
}

.timer-panel {
  min-width: 210px;
  padding: 18px 24px;
  background: var(--ink);
  color: white;
}

.timer-panel span,
.timer-panel strong {
  display: block;
}

.timer-panel span {
  color: #acc8ca;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.timer-panel strong {
  font-family: var(--display);
  font-size: 38px;
  letter-spacing: 0.04em;
}

.exam-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin: 22px 0;
}

.exam-progress progress {
  width: 100%;
  height: 12px;
  accent-color: var(--teal);
}

.result-shell,
.breakdown-shell {
  min-height: 190px;
  margin-bottom: 18px;
}

.empty-state {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state > span {
  color: var(--teal);
  font-family: var(--display);
  font-size: 62px;
}

.empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  margin-top: 80px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer a {
  min-height: 44px;
  padding: 10px 0;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .cert-facts-strip,
  .official-layout {
    grid-template-columns: 1fr;
  }

  .cert-facts-strip__intro {
    border-right: 0;
    border-bottom: 1px solid rgb(255 255 255 / 18%);
  }

  .cert-facts-strip .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .official-facts {
    min-height: auto;
  }

  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-card--wide {
    grid-column: span 2;
  }

  .learning-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 76px;
  }

  .site-frame {
    width: min(100% - 20px, 1240px);
  }

  .site-header {
    position: static;
    margin-bottom: 18px;
  }

  .primary-nav {
    position: fixed;
    z-index: 50;
    right: 8px;
    bottom: 8px;
    left: 8px;
    justify-content: space-around;
    padding: 5px;
    border: 1px solid rgb(24 52 58 / 18%);
    background: rgb(255 253 247 / 96%);
    box-shadow: 0 12px 40px rgb(24 52 58 / 22%);
    backdrop-filter: blur(14px);
  }

  .primary-nav a {
    min-width: 54px;
    padding: 0 7px;
    font-size: 13px;
  }

  .brand small {
    display: none;
  }

  .hero__copy,
  .official-facts {
    padding: 28px 22px;
  }

  .hero h1 {
    font-size: clamp(21px, 6vw, 40px);
  }

  .view-heading h1 {
    font-size: clamp(20px, 6vw, 32px);
  }

  .dashboard-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-strip article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .dashboard-strip article {
    min-height: 128px;
  }

  .section-heading,
  .exam-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .learning-shell {
    grid-template-columns: 1fr;
  }

  .chapter-rail {
    overflow-x: auto;
  }

  .chapter-rail ol {
    display: flex;
    width: max-content;
  }

  .chapter-rail li + li {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .chapter-rail button {
    min-width: 140px;
  }

  .timer-panel {
    width: 100%;
  }

  .exam-controls {
    width: 100%;
  }

  .exam-progress {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .focus-card--wide {
    grid-column: auto;
  }

  .cert-facts-strip .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand {
    min-width: 0;
  }

  .brand > span:last-child {
    min-width: 0;
  }

  .brand strong {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .official-links a {
    min-height: 180px;
  }
}

@media (max-width: 380px) {
  .site-frame {
    width: calc(100% - 16px);
  }

  .brand strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .hero__actions,
  .record-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .official-facts .fact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dynamic learning and examination components */
.chapter-rail button {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chapter-rail button span,
.chapter-rail button small {
  display: block;
  text-align: left;
}

.chapter-rail button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-rail button small {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 11px;
}

.chapter-rail button.is-active {
  background: var(--ink);
  color: white;
}

.chapter-rail button.is-active small {
  color: #b9d0d2;
}

.lesson-content {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lesson-content > h2 {
  max-width: none;
  margin: 12px 0;
  font-size: clamp(30px, 4.6vw, 58px);
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.lesson-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lesson-kicker span {
  display: inline-grid;
  min-width: 54px;
  height: 54px;
  place-items: center;
  background: var(--red);
  color: white;
  font-family: var(--display);
  font-size: 22px;
}

.lesson-kicker strong,
.lesson-kicker small {
  padding: 5px 9px;
  border: 1px solid var(--line);
  font-size: 12px;
}

.lesson-summary {
  max-width: 800px;
  color: var(--ink-soft);
  font-size: 18px;
}

.lesson-meta-grid,
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.lesson-meta-grid section,
.lesson-block,
.knowledge-card,
.practice-result {
  padding: 22px;
  border: 1px solid var(--line);
  background: #fff;
}

.lesson-meta-grid h3,
.lesson-block h3 {
  margin-top: 0;
}

.lesson-block--warning {
  border-left: 5px solid var(--yellow);
  background: #fff8df;
}

.knowledge-card {
  position: relative;
  border-top: 5px solid var(--teal);
}

.knowledge-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.card-conclusion {
  font-weight: 700;
}

.knowledge-card dl div {
  padding: 11px 0;
  border-top: 1px dashed var(--line);
}

.knowledge-card dt {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-card dd {
  margin: 4px 0 0;
}

.knowledge-card details {
  margin: 12px 0;
  padding: 12px;
  background: var(--teal-pale);
}

.knowledge-card summary {
  cursor: pointer;
  font-weight: 800;
}

.source-line {
  color: var(--ink-soft);
  font-size: 12px;
}

.lesson-actions,
.exam-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0;
}

.chapter-practice {
  margin-top: 30px;
}

.question-card {
  min-width: 0;
  margin: 0 0 18px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  background: var(--surface);
}

.question-card legend {
  padding: 0 12px;
  color: var(--teal);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.question-card legend span {
  display: inline-grid;
  width: 40px;
  height: 40px;
  margin-right: 10px;
  place-items: center;
  background: var(--teal);
  color: white;
  font-size: 18px;
}

.question-card h3 {
  margin: 4px 0 20px;
  font-family: var(--body);
  font-size: clamp(28px, 2.6vw, 34px);
  line-height: 1.4;
}

.exam-controls {
  display: grid;
  gap: 10px;
}

.exam-controls .button {
  width: 100%;
}

.option-list {
  display: grid;
  gap: 9px;
}

.option-row {
  display: block;
  cursor: pointer;
}

.option-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-row span {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: white;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.option-row span b {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  font-family: var(--display);
}

.option-row:hover span {
  transform: translateX(2px);
  border-color: var(--teal);
}

.option-row input:checked + span {
  border-color: var(--teal);
  background: var(--teal-pale);
  box-shadow: inset 4px 0 var(--teal);
}

.option-row input:focus-visible + span {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.exam-intro {
  max-width: 950px;
  margin: 40px auto;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.exam-intro h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
}

.exam-intro__lead {
  color: var(--ink-soft);
  font-size: 19px;
}

.exam-rule-grid,
.record-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0;
}

.exam-rule-grid article,
.record-overview article {
  padding: 22px;
  border: 1px solid var(--line);
  background: white;
}

.exam-rule-grid strong,
.record-overview strong {
  display: block;
  font-family: var(--display);
  font-size: 42px;
}

.exam-rule-grid span,
.record-overview span {
  color: var(--ink-soft);
  font-size: 12px;
}

.button--large {
  min-height: 58px;
  padding-inline: 28px;
}

.exam-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.question-nav {
  position: sticky;
  top: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.question-nav h2 {
  margin-top: 0;
}

.question-nav > div,
.question-nav__group > div {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.question-nav__group + .question-nav__group {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.question-nav__group h3 {
  margin: 0 0 9px;
  color: var(--red);
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.35;
}

.question-nav button {
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-size: 11px;
}

.question-nav button.is-answered {
  border-color: var(--teal);
  background: var(--teal-pale);
}

.question-nav button.is-current {
  background: var(--ink);
  color: white;
}

.exam-actions {
  justify-content: flex-end;
}

.exam-actions [disabled] {
  cursor: not-allowed;
  opacity: 0.4;
}

.result-shell {
  display: grid;
  grid-template-columns: minmax(230px, 0.65fr) 1.35fr;
  gap: 20px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  background: var(--ink);
  color: white;
}

.result-shell.is-pass {
  box-shadow: inset 7px 0 var(--yellow);
}

.result-shell.is-fail {
  box-shadow: inset 7px 0 var(--red);
}

.result-shell > div > span,
.result-shell > div > strong,
.result-shell > div > small {
  display: block;
}

.result-shell > div > strong {
  font-family: var(--display);
  font-size: clamp(76px, 12vw, 128px);
  line-height: 0.95;
}

.result-shell dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.result-shell dl div {
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 22%);
}

.result-shell dd {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 27px;
}

.result-provenance {
  margin-top: 18px;
}

.result-provenance a {
  margin-left: 6px;
}

.chapter-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.chapter-breakdown article {
  display: grid;
  padding: 15px;
  border: 1px solid var(--line);
  background: white;
}

.chapter-breakdown strong {
  font-family: var(--display);
  font-size: 28px;
}

.chapter-breakdown progress {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--teal);
}

.review-list {
  margin-top: 50px;
}

.review-card {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: white;
}

.review-card.is-correct {
  border-left: 5px solid var(--teal);
}

.review-card.is-wrong {
  border-left: 5px solid var(--red);
}

.review-card summary {
  display: grid;
  grid-template-columns: 38px 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
}

.review-card summary span {
  display: grid;
  height: 34px;
  place-items: center;
  background: var(--paper-deep);
}

.review-card > div {
  padding: 0 20px 20px 68px;
}

.wrong-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}

.wrong-filter label {
  display: grid;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.wrong-filter select {
  min-height: 38px;
  padding: 6px 28px 6px 9px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.wrong-filter span,
.wrong-card__meta span,
.wrong-card__meta strong,
.wrong-card__meta small {
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: white;
  font-size: 12px;
}

.wrong-card {
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-left: 6px solid var(--red);
  background: var(--surface);
}

.wrong-card.is-mastered {
  border-left-color: var(--teal);
  opacity: 0.82;
}

.wrong-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.wrong-card__backlinks {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: white;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.wrong-card__backlinks p {
  margin: 0;
}

.wrong-card__backlinks p + p {
  margin-top: 4px;
}

.wrong-card__backlinks b {
  color: var(--ink);
  font-weight: 600;
}

.wrong-card h2 {
  max-width: 900px;
}

.wrong-card .button {
  margin-top: 16px;
}

.attempt-list {
  display: grid;
  gap: 8px;
}

.attempt-list button {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  min-height: 66px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.attempt-list button:hover {
  border-color: var(--teal);
}

.attempt-list strong {
  font-family: var(--display);
  font-size: 24px;
}

@media (max-width: 920px) {
  .exam-layout {
    grid-template-columns: 1fr;
  }

  .question-nav {
    position: static;
  }

  .question-nav > div,
  .question-nav__group > div {
    grid-template-columns: repeat(10, 1fr);
  }

  .chapter-breakdown {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 980px) {
  .lesson-content > h2 {
    font-size: clamp(24px, 4.2vw, 44px);
  }
}

@media (max-width: 720px) {
  .lesson-content > h2 {
    font-size: clamp(19px, 5.2vw, 32px);
  }

  .lesson-meta-grid,
  .knowledge-grid,
  .result-shell {
    grid-template-columns: 1fr;
  }

  .exam-rule-grid,
  .record-overview,
  .chapter-breakdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .question-nav > div,
  .question-nav__group > div {
    grid-template-columns: repeat(8, 1fr);
  }

  .review-card summary {
    grid-template-columns: 34px 48px 1fr;
    font-size: 14px;
  }

  .review-card > div {
    padding-left: 18px;
  }

  .attempt-list button {
    grid-template-columns: 1fr auto;
  }

  .attempt-list button small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .exam-rule-grid,
  .record-overview,
  .chapter-breakdown {
    grid-template-columns: 1fr;
  }

  .question-nav > div,
  .question-nav__group > div {
    grid-template-columns: repeat(6, 1fr);
  }
}
