:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --paper: #ffffff;
  --ink: #171a1d;
  --muted: #5d6670;
  --line: #d9ded8;
  --green: #1f7a4d;
  --green-soft: #e3f1e9;
  --red: #b3261e;
  --red-soft: #fde8e6;
  --yellow: #f4c430;
  --yellow-soft: #fff6d7;
  --blue: #2766b1;
  --blue-soft: #e7f0fb;
  --asphalt: #2b2f33;
  --shadow: 0 18px 50px rgba(21, 30, 22, 0.10);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(31, 122, 77, 0.10), transparent 360px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #135d38;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  border-bottom: 1px solid rgba(23, 26, 29, 0.08);
  background: rgba(247, 248, 244, 0.88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.page,
.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--green), var(--yellow), var(--red), var(--green));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a,
.button,
button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  min-height: 38px;
  padding: 9px 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.nav-links a:hover,
.button:hover,
button:hover {
  border-color: var(--green);
  color: var(--green);
}

.button.primary,
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.button.primary:hover,
button.primary:hover {
  background: #17683f;
  color: white;
}

.button.ghost {
  background: transparent;
}

.page {
  padding: 42px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 32px;
}

.hero h1,
.study-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p,
.study-hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 680px;
}

.hero-actions,
.study-actions,
.quiz-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.status-panel,
.source-panel,
.result-panel,
.question,
.callout,
.day-card,
.study-card,
.visual-strip,
.quiz-shell,
.roadmap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 22px;
  display: grid;
  align-content: space-between;
  gap: 20px;
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfcf9;
}

.stat strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.road-line {
  height: 10px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, var(--yellow) 28px 48px),
    var(--asphalt);
}

.roadmap {
  padding: 18px;
  margin: 24px 0;
}

.roadmap h2,
.section-title,
.study-card h2,
.source-panel h2,
.quiz-shell h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.15;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.day-card {
  padding: 18px;
  box-shadow: none;
  display: grid;
  gap: 14px;
  min-height: 250px;
}

.day-card h3 {
  margin: 0;
  font-size: 20px;
}

.day-card p {
  margin: 0;
  color: var(--muted);
}

.day-tag {
  width: fit-content;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 4px 10px;
  font-weight: 800;
  font-size: 13px;
}

.day-links {
  display: flex;
  gap: 8px;
  align-self: end;
  flex-wrap: wrap;
}

.visual-strip {
  margin-top: 24px;
  padding: 18px;
  box-shadow: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.visual-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 140px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  background: #fbfcf9;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.visual-tile img {
  height: 78px;
  width: auto;
  object-fit: contain;
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.study-hero {
  margin-bottom: 22px;
}

.study-card,
.source-panel,
.quiz-shell {
  padding: 22px;
}

.study-stack {
  display: grid;
  gap: 16px;
}

.study-card ul,
.study-card ol,
.source-panel ul,
.result-panel ul {
  padding-left: 22px;
  margin: 10px 0 0;
}

.study-card li + li,
.source-panel li + li,
.result-panel li + li {
  margin-top: 8px;
}

.memory-table,
.review-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.memory-table th,
.memory-table td,
.review-table th,
.review-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.memory-table th,
.review-table th {
  background: #f1f4ef;
  font-size: 13px;
  color: var(--muted);
}

.memory-table tr:last-child td,
.review-table tr:last-child td {
  border-bottom: 0;
}

.source-panel {
  position: sticky;
  top: 90px;
  box-shadow: none;
}

.source-panel p {
  color: var(--muted);
  margin-top: 0;
}

.source-panel a {
  overflow-wrap: anywhere;
}

.callout {
  padding: 16px;
  box-shadow: none;
}

.callout.warn {
  background: var(--yellow-soft);
  border-color: #ead274;
}

.callout.danger {
  background: var(--red-soft);
  border-color: #f1b1aa;
}

.callout.good {
  background: var(--green-soft);
  border-color: #acd5bd;
}

.quiz-shell {
  max-width: 900px;
  margin: 0 auto;
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.question-list {
  display: grid;
  gap: 14px;
}

.question {
  padding: 18px;
  box-shadow: none;
}

.question legend {
  font-weight: 850;
  margin-bottom: 12px;
  font-size: 17px;
}

.option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 8px;
  background: #fbfcf9;
  cursor: pointer;
}

.option input {
  margin-top: 4px;
}

.option.correct {
  border-color: var(--green);
  background: var(--green-soft);
}

.option.wrong {
  border-color: var(--red);
  background: var(--red-soft);
}

.explanation {
  display: none;
  margin-top: 12px;
  color: var(--muted);
  border-left: 4px solid var(--green);
  padding-left: 12px;
}

.question.revealed .explanation {
  display: block;
}

.result-panel {
  display: none;
  padding: 18px;
  box-shadow: none;
  margin: 18px 0;
}

.result-panel.show {
  display: block;
}

.result-score {
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
  margin: 0 0 8px;
}

.result-panel.pass {
  background: var(--green-soft);
  border-color: #acd5bd;
}

.result-panel.fail {
  background: var(--red-soft);
  border-color: #f1b1aa;
}

.site-footer {
  border-top: 1px solid rgba(23, 26, 29, 0.08);
  padding: 24px 0;
  color: var(--muted);
}

.footer-inner {
  font-size: 14px;
}

.small {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 940px) {
  .hero,
  .study-layout {
    grid-template-columns: 1fr;
  }

  .source-panel {
    position: static;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    padding: 12px 0;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1 1 auto;
    text-align: center;
  }

  .page {
    padding-top: 28px;
  }

  .hero h1,
  .study-hero h1 {
    font-size: 40px;
  }

  .day-grid,
  .visual-strip,
  .status-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .site-footer,
  .study-actions,
  .quiz-actions,
  .day-links {
    display: none;
  }

  body {
    background: #fff;
  }

  .page,
  .header-inner,
  .footer-inner {
    width: 100%;
  }

  .study-card,
  .source-panel,
  .question {
    box-shadow: none;
    break-inside: avoid;
  }
}

.cram-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.cram-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.cram-group .memory-table td:first-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.callout.warn ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 18px;
  margin: 10px 0 0;
  padding-left: 20px;
}

.lesson h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lesson-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.lesson p {
  margin: 0 0 14px;
}

.lesson ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.lesson li {
  margin-bottom: 6px;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.35;
}

.flow span {
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}

.flow em {
  color: var(--muted);
  font-style: normal;
}

blockquote.official {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  line-height: 1.5;
}

.rule {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.rule-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rule-tag {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--asphalt);
  color: var(--yellow);
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
}

.rule-head h3 {
  margin: 0;
  font-size: 17px;
}

.rule-trap {
  margin: 0;
  padding: 10px 14px;
  background: var(--yellow-soft);
  border-radius: 6px;
  font-size: 14px;
}

.rule-trap > strong:first-child,
.lesson-exam > strong:first-child {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--asphalt);
  color: #fff;
  font-size: 12px;
  vertical-align: 1px;
}

.lesson-exam {
  margin: 0;
  padding: 12px 16px;
  background: var(--green-soft);
  border-radius: 6px;
  font-size: 14px;
}

.rule-trap strong:not(:first-child),
.lesson-exam strong:not(:first-child) {
  background: rgba(43, 47, 51, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* --- Day 2 lesson visuals --- */
.decode {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.decode > div {
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.decode-n {
  display: inline-block;
  min-width: 52px;
  margin-right: 10px;
  padding: 2px 9px;
  border-radius: 4px;
  background: var(--asphalt);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.cat-card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
}

.cat-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.cat-card p {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.4;
}

.cat-reg { border-left: 5px solid var(--asphalt); }
.cat-warn { border-left: 5px solid var(--yellow); }
.cat-temp { border-left: 5px solid #e07b1f; }
.cat-info { border-left: 5px solid var(--green); }

.ring-demo {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.ring-demo > div {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.ring {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 5px solid var(--green);
  background: #fff;
}

.ring.red {
  border-color: var(--red);
  background:
    linear-gradient(45deg, transparent 44%, var(--red) 44%, var(--red) 56%, transparent 56%),
    #fff;
}

.sign-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 0 0 14px;
}

.sign-row figure {
  margin: 0;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.sign-row img {
  max-width: 120px;
  height: auto;
}

.sign-row figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: left;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.steps > div {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.steps > div > span {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.highlight {
  padding: 12px 16px;
  background: var(--yellow-soft);
  border-radius: 6px;
  border-left: 3px solid var(--yellow);
}

/* --- sign gallery --- */
.gallery-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.chip.active {
  background: var(--asphalt);
  border-color: var(--asphalt);
  color: #fff;
}

.chip-n {
  margin-left: 7px;
  opacity: 0.6;
  font-size: 12px;
}

.gallery-search {
  flex: 1;
  min-width: 200px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
}

.sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.sign-item {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sign-item img {
  align-self: center;
  max-width: 100%;
  max-height: 92px;
  width: auto;
  height: auto;
}

.sign-item figcaption {
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.sign-zh {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.45;
}

.sign-en {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.sign-item.cat-regulatory { border-top: 3px solid var(--asphalt); }
.sign-item.cat-warning { border-top: 3px solid var(--yellow); }
.sign-item.cat-temporary { border-top: 3px solid #e07b1f; }
.sign-item.cat-info { border-top: 3px solid var(--green); }

.hidden-bar {
  align-items: center;
  margin-top: -4px;
}

.ghost-chip {
  background: var(--bg);
  color: var(--muted);
}

.ghost-chip.active {
  background: var(--asphalt);
  border-color: var(--asphalt);
  color: #fff;
}

.sign-item {
  position: relative;
}

.sign-hide {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  line-height: 1.5;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.sign-item:hover .sign-hide,
.sign-hide:focus-visible {
  opacity: 1;
}

.sign-hide:hover {
  border-color: var(--red);
  color: var(--red);
}

.sign-item.is-hidden {
  opacity: 0.62;
}

.sign-item.is-hidden .sign-hide {
  opacity: 1;
  border-color: var(--green);
  color: var(--green);
}

@media (hover: none) {
  .sign-hide { opacity: 1; }
}

.question-image {
  margin: 10px 0 14px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.question-image img {
  max-width: 200px;
  max-height: 150px;
  width: auto;
  height: auto;
}

/* --- sign drill --- */
.drill-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.stat-tile {
  flex: 1;
  min-width: 96px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-tile strong {
  display: block;
  font-size: 21px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-tile span {
  font-size: 12px;
  color: var(--muted);
}

.stat-tile.done {
  background: var(--green-soft);
  border-color: var(--green);
}

.streak-dots {
  flex-basis: 100%;
  display: flex;
  gap: 6px;
}

.dot {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
}

.dot.on {
  background: var(--green);
}

.drill-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.drill-start p {
  flex-basis: 100%;
  margin: 0;
}

.drill-toggle {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.drill-progress {
  margin-bottom: 18px;
}

.drill-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 8px;
}

.drill-bar span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 0.2s ease;
}

.drill-sign {
  display: grid;
  place-items: center;
  padding: 26px;
  margin-bottom: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.drill-sign img {
  max-width: 240px;
  max-height: 180px;
  width: auto;
  height: auto;
}

.drill-options {
  display: grid;
  gap: 9px;
}

.drill-option {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.drill-option:hover:not(:disabled) {
  border-color: var(--asphalt);
}

.drill-option:disabled {
  cursor: default;
}

.drill-option.correct {
  background: var(--green-soft);
  border-color: var(--green);
}

.drill-option.wrong {
  background: var(--red-soft);
  border-color: var(--red);
}

.drill-option.voided {
  background: var(--yellow-soft);
  border-color: var(--yellow);
}

.drill-feedback {
  margin: 16px 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
}

.drill-feedback p {
  margin: 0 0 4px;
}

.drill-feedback p:last-child {
  margin: 0;
}

.drill-feedback strong {
  display: inline-block;
  margin-right: 10px;
  padding: 1px 9px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  vertical-align: 1px;
}

.drill-feedback.good {
  background: var(--green-soft);
}

.drill-feedback.good strong {
  background: var(--green);
}

.drill-feedback.bad {
  background: var(--red-soft);
}

.drill-feedback.bad strong {
  background: var(--red);
}

.drill-feedback.caution {
  background: var(--yellow-soft);
}

.drill-feedback.caution strong {
  background: #725700;
}

.official-explanation {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--paper);
}

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

.explanation-head h2 {
  margin: 0;
  font-size: 17px;
}

.explanation-status {
  flex: none;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.explanation-status.outdated,
.explanation-status.ambiguous {
  background: var(--yellow-soft);
  color: #725700;
}

.explanation-status.outside {
  background: var(--bg);
  color: var(--muted);
}

.official-explanation p {
  margin: 0 0 9px;
  line-height: 1.6;
}

.official-explanation a {
  font-weight: 700;
}

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

.drill-prompt {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.wrong-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.wrong-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.wrong-item img {
  flex: none;
  max-width: 88px;
  max-height: 66px;
  width: auto;
  height: auto;
}

.wrong-q {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.diagram-wrap {
  margin: 0 0 16px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.diagram-wrap svg {
  display: block;
  width: 100%;
  min-width: 420px;
  height: auto;
}

.sample-head { display: flex; gap: 14px; margin-bottom: 14px; }
.sample-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--asphalt); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.sample-q { margin: 0 0 4px; font-size: 16px; font-weight: 600; line-height: 1.45; }
.sample-zh { margin: 0; font-size: 14px; color: var(--muted); }
.sample-options { margin: 0; padding-left: 26px; display: grid; gap: 8px; }
.sample-options li {
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); cursor: pointer; line-height: 1.45;
}
.sample-options li:hover { border-color: var(--asphalt); }
.sample-options li span { display: block; font-size: 14.5px; }
.sample-options li em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 2px; }
.sample-options li.correct { background: var(--green-soft); border-color: var(--green); }
.sample-options li.wrong { background: var(--red-soft); border-color: var(--red); }
.sample-answer { display: none; margin-top: 14px; padding: 14px 16px; background: var(--bg); border-radius: var(--radius); }
.sample.revealed .sample-answer { display: block; }
.sample-answer p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.sample-answer p:last-child { margin: 0; }
.sample-answer strong {
  display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 4px;
  background: var(--green); color: #fff; font-size: 12px; vertical-align: 1px;
}
.sample-note { color: var(--ink); }

.bank-hero {
  max-width: 900px;
  margin-inline: auto;
}

.bank-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.bank-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.bank-summary strong,
.bank-summary span {
  display: block;
}

.bank-summary strong {
  font-size: 26px;
  line-height: 1;
}

.bank-summary span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.bank-workbench {
  max-width: 900px;
  margin-inline: auto;
}

.bank-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.bank-tabs button.active {
  border-color: var(--asphalt);
  background: var(--asphalt);
  color: #fff;
}

.bank-start {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bank-start p {
  flex-basis: 100%;
  margin-top: 0;
}

.bank-unsure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.bank-image img {
  max-width: min(100%, 420px);
  max-height: 260px;
}

.bank-history {
  margin: 14px 0 0;
}

@media (max-width: 640px) {
  .bank-page .header-inner {
    min-height: 64px;
    padding-block: 8px;
    flex-direction: row;
    align-items: center;
  }

  .bank-page .nav-links {
    display: none;
  }

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

.day-tag.topic { background: var(--blue-soft); color: var(--blue); }
