:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef5f3;
  --ink: #172126;
  --muted: #637178;
  --line: #d8e1df;
  --teal: #0f766e;
  --teal-dark: #0b5753;
  --teal-soft: #dff3ef;
  --amber: #c27a17;
  --red: #c33a2c;
  --green: #14804a;
  --shadow: 0 14px 40px rgba(23, 33, 38, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  position: sticky;
  top: 10px;
  z-index: 5;
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.topbar > *,
.brand {
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 21px;
  line-height: 1.25;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.mode-tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.tab {
  min-width: 78px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 700;
}

.tab.is-active {
  background: var(--teal);
  color: #fff;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 20px;
  line-height: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.stat {
  min-width: 0;
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 27px;
  line-height: 1;
}

.workspace {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: start;
}

.is-exam-mode .workspace {
  grid-template-columns: minmax(0, 1fr) 330px;
  margin-top: 14px;
}

.is-exam-mode .question-panel {
  min-height: 620px;
}

.workspace > * {
  min-width: 0;
}

.filters,
.question-panel,
.review-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 38, 0.05);
}

.filters {
  position: sticky;
  top: 118px;
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h2,
.review-panel h2 {
  font-size: 17px;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

legend,
.search-label {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #2d3a40;
  font-size: 14px;
  line-height: 1.45;
}

input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

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

.custom-size-label {
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.number-input {
  width: 96px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
}

.number-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.search-label {
  display: block;
  margin-top: 20px;
}

.search-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.filter-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.text-button {
  border-radius: 8px;
  font-weight: 800;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  padding: 11px 16px;
}

.primary-button.large,
.secondary-button.large {
  min-height: 48px;
  padding: 13px 22px;
  font-size: 16px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--teal-dark);
  padding: 10px 15px;
}

.secondary-button.small {
  padding: 8px 12px;
  font-size: 13px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 4px 0;
  font-size: 14px;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.home-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  min-width: 0;
}

.home-hero,
.home-entry,
.home-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 38, 0.05);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
  min-height: 360px;
  padding: 42px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0) 46%),
    #fff;
}

.home-hero > *,
.home-entry,
.home-info {
  min-width: 0;
}

.home-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 18px;
  max-width: 100%;
}

.home-copy h2 {
  max-width: 720px;
  font-size: 42px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.home-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-summary {
  display: grid;
  gap: 10px;
  align-content: center;
}

.home-summary div {
  min-height: 94px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.home-summary span,
.home-entry p,
.home-info p,
.home-info li {
  color: var(--muted);
}

.home-summary span {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.home-summary strong {
  display: block;
  margin-top: 8px;
  color: var(--teal-dark);
  font-size: 30px;
  line-height: 1;
}

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

.home-entry,
.home-info {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 12px;
  min-width: 0;
  padding: 20px;
}

.home-entry h3,
.home-info h3 {
  margin: 0;
  font-size: 20px;
}

.home-entry p,
.home-info p,
.home-info li {
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: normal;
}

.home-info ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.source-link.compact {
  margin-top: 4px;
}

.contact-icons.compact {
  margin-top: 2px;
}

.question-panel {
  min-height: 700px;
  min-width: 0;
}

.loading-state,
.empty-state {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 24px;
  text-align: center;
}

.loading-state h2,
.empty-state h2 {
  margin-top: 18px;
  font-size: 22px;
}

.loading-state p,
.empty-state p {
  max-width: 420px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.loader {
  width: 54px;
  height: 54px;
  border: 5px solid var(--surface-2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.question-card {
  padding: 24px;
  min-width: 0;
}

.is-exam-mode .question-card {
  padding: 30px;
}

.exam-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
  border-radius: 8px 8px 0 0;
}

.is-exam-mode .exam-bar {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  border-bottom-color: #b9c8c5;
  background: #f3f7f6;
}

.exam-bar div {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.exam-bar span,
.mini-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.exam-bar strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.exam-start-panel {
  display: grid;
  justify-items: start;
  gap: 18px;
  min-height: 560px;
  padding: 38px;
  align-content: center;
}

.is-exam-mode .exam-start-panel {
  min-height: 560px;
  padding: 42px 48px;
  align-content: start;
}

.exam-start-panel h2 {
  font-size: 28px;
}

.exam-start-panel p {
  max-width: 660px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.exam-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 2px 0 4px;
}

.exam-rules div {
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.exam-rules dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.exam-rules dd {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.result-panel {
  padding: 24px;
}

.result-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f2fbf8, #ffffff);
}

.result-hero h2 {
  font-size: 23px;
}

.result-hero p {
  margin-top: 8px;
  color: var(--muted);
}

#resultScore {
  color: var(--teal-dark);
  font-size: 44px;
  line-height: 1;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.breakdown-card,
.topic-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.breakdown-card strong,
.topic-card strong {
  display: block;
  font-size: 15px;
}

.breakdown-card span,
.topic-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.meter {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.topic-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.topic-breakdown h3 {
  margin: 0;
  font-size: 17px;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.question-meta,
.question-footer,
.answer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.question-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.question-text {
  margin-top: 22px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.7;
}

.is-exam-mode .question-text {
  margin-top: 26px;
  font-size: 22px;
}

.options-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 14px;
  text-align: left;
}

.option-key {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--teal-dark);
  font-weight: 900;
}

.option-text {
  min-width: 0;
  font-size: 17px;
  line-height: 1.55;
}

.option:hover,
.option.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.is-exam-mode .option:hover {
  box-shadow: none;
}

.is-exam-mode .option.is-selected {
  background: #eef7f5;
}

.option.is-correct {
  border-color: var(--green);
  background: #f2fbf6;
}

.option.is-wrong {
  border-color: var(--red);
  background: #fff5f3;
}

.answer-panel {
  margin-top: 24px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.answer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.answer-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.answer-title strong {
  color: var(--teal-dark);
  font-size: 17px;
}

#correctAnswer {
  color: var(--muted);
  font-weight: 800;
}

#answerHint {
  margin-top: 9px;
  color: #34444a;
  line-height: 1.7;
}

.question-footer {
  margin-top: 26px;
}

.review-rail {
  display: grid;
  gap: 14px;
}

.review-panel {
  padding: 16px;
}

.is-exam-mode .review-rail > .review-panel {
  display: none;
}

.is-exam-mode .review-rail > #examControlPanel,
.is-exam-mode .review-rail > #questionPalettePanel {
  display: grid;
}

.exam-control-panel {
  display: grid;
  gap: 14px;
}

.exam-card {
  border-color: #b9c8c5;
  background: #fbfcfc;
}

.exam-card h2 {
  margin-top: 6px;
  font-size: 18px;
}

.exam-card .primary-button {
  width: 100%;
  margin-top: 14px;
}

.progress-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  margin: 18px auto;
}

.progress-ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 12;
}

#progressArc {
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-dasharray: 301.59;
  stroke-dashoffset: 301.59;
  transition: stroke-dashoffset 0.25s ease;
}

.progress-ring strong {
  font-size: 28px;
  line-height: 1;
}

.progress-ring span {
  margin-top: 36px;
  color: var(--muted);
  font-size: 13px;
  position: absolute;
}

.metric-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.metric-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.metric-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.review-list,
.source-links {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.contact-icons {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-icon:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
  transform: translateY(-1px);
}

.contact-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.contact-icon--x {
  background: #000;
  border-color: #000;
  color: #fff;
}

.contact-icon--x svg,
.contact-icon--facebook svg {
  fill: currentColor;
  stroke: none;
}

.contact-icon--facebook {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.contact-icon--facebook svg path:first-child {
  fill: #1877f2;
}

.contact-icon--facebook svg path:last-child {
  fill: #fff;
}

.stack-actions {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.file-button {
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
}

.form-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-status.is-success {
  color: var(--green);
}

.form-status.is-error {
  color: var(--red);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.question-palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.palette-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.palette-button.is-current {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
  color: var(--teal-dark);
}

.palette-button.is-answered {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.palette-button.is-marked {
  background: #fff8ec;
  border-color: #e0ad5d;
  color: var(--amber);
}

.palette-button.is-wrong {
  background: #fff5f3;
  border-color: #e8aaa2;
  color: var(--red);
}

.review-item,
.source-link {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  text-decoration: none;
}

.review-item {
  display: grid;
  gap: 4px;
}

.review-item strong {
  color: var(--teal-dark);
  font-size: 13px;
}

.review-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--teal-dark);
  font-weight: 800;
}

.source-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer {
  margin: 18px 0 4px;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .home-hero,
  .home-entry-grid,
  .home-info-grid {
    grid-template-columns: 1fr;
  }

  .home-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 10px;
  }

  .topbar {
    position: static;
    width: calc(100vw - 20px);
    grid-template-columns: 1fr auto;
  }

  .mode-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
  }

  #resetProgress {
    grid-column: 2;
    grid-row: 1;
  }

  .home-hero {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    min-height: 0;
    padding: 24px;
    overflow: hidden;
  }

  .home-panel {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .home-copy,
  .home-summary {
    width: 100%;
    max-width: calc(100vw - 68px);
  }

  .home-entry,
  .home-info {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .home-copy h2 {
    max-width: 100%;
    font-size: 28px;
    word-break: break-all;
  }

  .home-copy p {
    max-width: 100%;
    font-size: 15px;
    word-break: break-all;
  }

  .home-entry p,
  .home-info p,
  .home-info li {
    max-width: 100%;
    word-break: break-all;
    overflow-wrap: anywhere;
    line-break: anywhere;
  }

  .home-summary {
    grid-template-columns: 1fr;
  }

  .home-actions {
    width: 100%;
  }

  .home-actions .primary-button,
  .home-actions .secondary-button {
    width: 100%;
  }

  .workspace,
  .review-rail {
    grid-template-columns: 1fr;
  }

  .is-exam-mode .workspace {
    grid-template-columns: 1fr;
  }

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

  .stat {
    min-height: 74px;
    padding: 13px;
  }

  .filters {
    position: static;
    order: 2;
  }

  .question-panel {
    order: 1;
    min-height: 0;
  }

  .is-exam-mode .question-panel {
    min-height: 0;
  }

  .review-rail {
    order: 3;
  }

  .is-exam-mode .review-rail {
    order: 2;
  }

  .question-card {
    padding: 18px;
  }

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

  .exam-bar .primary-button {
    grid-column: 1 / -1;
  }

  .exam-start-panel {
    min-height: 420px;
    padding: 24px;
  }

  .is-exam-mode .exam-start-panel {
    min-height: 420px;
    padding: 22px;
  }

  .exam-start-panel h2 {
    font-size: 24px;
  }

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

  .result-hero,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .question-meta {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .question-meta > div:first-child {
    min-width: 0;
    max-width: 100%;
  }

  .source-chip {
    max-width: 100%;
    margin-top: 6px;
    margin-left: 0;
    white-space: normal;
  }

  .question-text {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .option {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .option-key {
    width: 33px;
    height: 33px;
  }

  .question-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
}
