:root {
  --canvas: #ecebe5;
  --paper: #fbfaf6;
  --paper-deep: #f5f3ec;
  --ink: #252a25;
  --muted: #686d66;
  --line: #d7d6ce;
  --line-strong: #b8bbb3;
  --accent: #315c4c;
  --accent-dark: #23463a;
  --accent-pale: #e7eee9;
  --danger: #963a33;
  --danger-pale: #f6e9e6;
  --success: #3f684f;
  --content: 820px;
  --admin-content: 1080px;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

html {
  color-scheme: light;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

button,
.button,
.button-secondary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 8px 18px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
  font-weight: 600;
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-pale);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(49, 92, 76, 0.28);
  outline-offset: 2px;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

input:hover {
  border-color: #8d948b;
}

input:focus {
  border-color: var(--accent);
}

input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.profile-fields {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 24px 0 10px;
}

.profile-fields legend {
  padding: 0;
  font-weight: 700;
}

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

.profile-grid label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.wecom-materials {
  border-top: 1px solid var(--line);
  margin: 28px auto 24px;
  padding-top: 24px;
}

.wecom-materials h2 {
  margin-bottom: 16px;
  font-size: 20px;
}

.wecom-materials img {
  display: block;
  width: min(220px, 100%);
  height: auto;
  margin: 0 auto;
}

.page {
  width: min(calc(100% - 40px), var(--content));
  margin: 44px auto;
}

.paper {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 48px 54px 54px;
  box-shadow: 0 8px 24px rgba(39, 45, 39, 0.07);
}

.paper::before {
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 4px;
  background: var(--accent);
  content: "";
}

.page-header {
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.3;
}

h1 {
  margin-bottom: 14px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

h2 {
  margin-bottom: 10px;
  font-size: 23px;
}

.intro,
.section-heading p,
.stat-card small,
.field-help {
  color: var(--muted);
}

.intro {
  max-width: 620px;
  margin-bottom: 0;
}

.notice {
  margin: 18px 0;
  border: 1px solid var(--line-strong);
  border-left-width: 4px;
  padding: 12px 15px;
  background: var(--paper-deep);
}

.notice-error {
  border-color: #d5a9a5;
  border-left-color: var(--danger);
  color: #712822;
  background: var(--danger-pale);
}

.notice-success {
  border-color: #acc1b2;
  border-left-color: var(--success);
  color: #2d523b;
  background: var(--accent-pale);
}

.identity-field {
  border-top: 1px solid var(--line);
  padding: 28px 0 34px;
}

.identity-field label,
.login-form label,
.upload-form label,
.filter-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.identity-field input {
  max-width: 360px;
}

.question-list {
  counter-reset: question;
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-block: 1px solid var(--line);
  padding: 12px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.question {
  min-width: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 30px 0 32px;
}

.question legend {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  padding: 0;
}

.question-number {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.question-text {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}

.question-invalid {
  border-left: 3px solid var(--danger);
  padding-left: 18px;
}

.options {
  display: grid;
  gap: 8px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid transparent;
  padding: 9px 10px;
  cursor: pointer;
}

.option:hover {
  border-color: var(--line);
  background: var(--paper-deep);
}

.option:has(input:checked) {
  border-color: #a7b9ad;
  background: var(--accent-pale);
}

.option-key {
  color: var(--muted);
  font-family: Georgia, serif;
  font-weight: 700;
}

.field-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.quiz-navigation {
  flex-wrap: wrap;
}

.quiz-navigation .button-secondary {
  margin-right: auto;
}

/* Exam surfaces keep the existing form semantics while making each decision easy to scan. */
body:not(.graduation-page) .paper::before {
  background: #e95d2f;
}

.quiz-form {
  --quiz-accent: #e95d2f;
  --quiz-accent-dark: #b94320;
  --quiz-soft: #fff0e9;
}

.graduation-page .quiz-form {
  --quiz-accent: #315c4c;
  --quiz-accent-dark: #23463a;
  --quiz-soft: #e7eee9;
}

.exam-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 0;
  padding: 6px 0 30px;
}

.exam-header-copy {
  min-width: 0;
}

.exam-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 13px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 11px;
  color: var(--quiz-accent, var(--accent));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.exam-header h1 {
  margin-bottom: 10px;
}

.entrance-theme h1 {
  color: #b94320;
}

.graduation-theme h1 {
  color: var(--accent-dark);
}

.exam-mark {
  display: grid;
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 18px;
  color: var(--quiz-accent, var(--accent));
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: rotate(3deg);
}

.quiz-progress {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  margin: 0 0 20px;
  border: 1px solid #e2e5df;
  border-radius: 8px;
  padding: 15px 17px 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(37, 42, 37, 0.05);
}

.progress-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.progress-label {
  color: var(--quiz-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-copy strong,
.progress-count {
  color: var(--ink);
  font-size: 14px;
}

.progress-count {
  color: var(--muted);
  white-space: nowrap;
}

.progress-track {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0eb;
}

.progress-track span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--quiz-accent);
}

.profile-panel {
  margin: 0 0 20px;
  border: 1px solid #f1d2c5;
  border-radius: 8px;
  padding: 20px;
  background: #fffaf7;
}

.profile-panel legend {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

.panel-kicker {
  color: #b94320;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.question-list {
  margin-top: 0;
}

.question-card {
  border: 1px solid #e0e5df;
  border-radius: 8px;
  padding: 25px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(37, 42, 37, 0.05);
}

.question-card legend {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  margin-bottom: 22px;
}

.question-card .question-badge {
  display: grid;
  width: 44px;
  height: 44px;
  grid-row: 1 / span 2;
  place-items: center;
  margin: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--quiz-accent);
  font-family: Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.question-type,
.assessment-type {
  display: block;
  margin-bottom: 4px;
  color: var(--quiz-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.question-card .question-text {
  grid-column: 2;
  font-size: 21px;
  line-height: 1.45;
}

.question-card .options {
  gap: 10px;
}

.question-card .option-card {
  display: grid;
  grid-template-columns: 20px 32px minmax(0, 1fr);
  align-items: center;
  min-height: 56px;
  gap: 12px;
  border: 1px solid #dfe5de;
  border-radius: 7px;
  padding: 11px 14px;
  background: #fbfcfa;
}

.question-card .option-card:hover {
  border-color: var(--quiz-accent);
  background: var(--quiz-soft);
}

.question-card .option-card:has(input:checked) {
  border-color: var(--quiz-accent);
  background: var(--quiz-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--quiz-accent) 13%, transparent);
}

.question-card .option-key {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: var(--quiz-accent-dark);
  background: #edf1ec;
  font-family: Georgia, serif;
  font-size: 14px;
}

.question-card .option-card:has(input:checked) .option-key {
  color: #fff;
  background: var(--quiz-accent);
}

.question-card.question-invalid {
  border-color: #d5a9a5;
  border-left: 4px solid var(--danger);
  padding-left: 22px;
  background: #fffafa;
}

.quiz-navigation {
  align-items: center;
  margin-top: 18px;
  border-top: 0;
  padding-top: 0;
}

.quiz-navigation .nav-primary,
.quiz-navigation .nav-secondary {
  min-height: 48px;
  border-radius: 7px;
  padding-inline: 22px;
}

.quiz-navigation .nav-primary {
  border-color: var(--quiz-accent);
  background: var(--quiz-accent);
}

.quiz-navigation .nav-primary:hover {
  border-color: var(--quiz-accent-dark);
  background: var(--quiz-accent-dark);
}

.quiz-navigation .nav-secondary {
  border-color: #d4dbd3;
  color: var(--quiz-accent-dark);
  background: #fff;
}

.quiz-navigation .nav-secondary:hover {
  border-color: var(--quiz-accent);
  color: var(--quiz-accent-dark);
  background: var(--quiz-soft);
}

.graduation-page .paper {
  border-color: #cfdad3;
  background: #f8fbf8;
}

.graduation-page .question-card {
  border-color: #d2dfd6;
  background: #fff;
}

.control-field > label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.control-field > label span[aria-hidden="true"] {
  color: var(--quiz-accent);
}

.identity-control {
  margin-bottom: 18px;
  border: 1px solid #e2e5df;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
}

.identity-control input.control-input {
  max-width: 520px;
}

.control-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cfd8d0;
  border-radius: 8px;
  padding: 12px 15px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.35;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.control-input:hover {
  border-color: #aab9ad;
  background: #fdfefd;
}

.control-input:focus {
  border-color: var(--quiz-accent);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--quiz-accent) 14%, transparent);
}

.control-input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(150, 58, 51, 0.1);
}

.select-control {
  position: relative;
}

.select-control::after {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--quiz-accent);
  border-bottom: 2px solid var(--quiz-accent);
  content: "";
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.select-control .control-input {
  appearance: none;
  padding-right: 46px;
}

input[type="number"].control-input {
  appearance: textfield;
}

input[type="number"].control-input::-webkit-inner-spin-button,
input[type="number"].control-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.graduation-page .identity-control {
  border-color: #d2dfd6;
  background: #fff;
}

.empty-state,
.success-state,
.error-state {
  padding: 58px 20px;
  text-align: center;
}

.empty-state.compact {
  border: 1px dashed var(--line-strong);
  padding: 28px 18px;
  color: var(--muted);
}

.empty-state.compact p {
  margin: 0;
}

.status-mark,
.error-code {
  display: flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
}

.error-code {
  width: auto;
  border: 0;
  border-radius: 0;
  font-size: 18px;
  letter-spacing: 0.14em;
}

.text-link,
.back-link {
  font-weight: 700;
}

.login-panel {
  max-width: 430px;
  margin: 24px auto;
}

.login-form {
  display: grid;
  gap: 12px;
  margin: 28px 0 22px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.admin-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
  padding: 12px 0;
}

.admin-nav a {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-weight: 700;
  text-decoration: none;
}

.admin-nav a:hover {
  background: var(--accent-pale);
}

.admin-section + .admin-section {
  border-top: 1px solid var(--line);
  margin-top: 42px;
  padding-top: 36px;
}

.section-heading {
  margin-bottom: 22px;
}

.submission-meta + .answer-list {
  margin-top: 8px;
}

.section-heading.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 5px;
}

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

.stat-card {
  border: 1px solid var(--line);
  padding: 22px;
  background: var(--paper-deep);
}

.stat-card span,
.stat-card small {
  display: block;
}

.stat-card strong {
  display: block;
  margin: 4px 0;
  color: var(--accent-dark);
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1.2;
}

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

.shortcut {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
}

.shortcut:hover {
  border-color: var(--accent);
  background: var(--accent-pale);
}

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

.upload-form {
  display: grid;
  max-width: 620px;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 22px;
  background: var(--paper-deep);
}

.upload-form button {
  width: max-content;
  margin-top: 6px;
}

.field-help {
  margin: 0;
  font-size: 14px;
}

.format-help {
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.format-help summary {
  color: var(--accent-dark);
  font-weight: 700;
  cursor: pointer;
}

.format-help code {
  display: block;
  overflow-x: auto;
  margin: 14px 0 8px;
  border: 1px solid var(--line);
  padding: 10px;
  background: #fff;
  white-space: nowrap;
}

.question-preview,
.answer-list {
  margin: 0;
  padding-left: 28px;
}

.question-preview li,
.answer-list li {
  border-top: 1px solid var(--line);
  padding: 20px 8px;
}

.preview-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.filter-form {
  display: grid;
  grid-template-columns: 1fr 190px auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  padding: 18px;
  background: var(--paper-deep);
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.score-cell {
  display: inline-flex;
  flex-direction: column;
  color: var(--accent-dark);
  font-weight: 700;
  line-height: 1.35;
}

.score-cell small {
  color: var(--muted);
  font-weight: 500;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: #4d534d;
  background: var(--paper-deep);
  font-size: 13px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafbf8;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.submission-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 32px;
  background: var(--line);
}

.submission-meta div {
  padding: 16px;
  background: var(--paper-deep);
}

.submission-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.submission-meta dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.answer-question {
  margin-bottom: 8px;
  font-weight: 700;
}

.answer-comparison {
  position: relative;
  display: grid;
  gap: 5px;
  border-left: 3px solid var(--line-strong);
  padding: 10px 130px 10px 14px;
  background: var(--paper-deep);
}

.answer-correct .answer-comparison {
  border-left-color: var(--success);
}

.answer-wrong .answer-comparison {
  border-left-color: var(--danger);
}

.answer-choice {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 0;
  color: var(--accent-dark);
}

.answer-choice b {
  font-family: Georgia, serif;
  font-weight: 700;
}

.answer-label {
  width: 68px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.result-badge {
  position: absolute;
  top: 50%;
  right: 14px;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 3px 9px;
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-50%);
}

.result-correct {
  color: var(--success);
  background: var(--accent-pale);
}

.result-wrong {
  color: var(--danger);
  background: var(--danger-pale);
}

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

.score-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
  color: var(--accent-dark);
}

.score-summary strong {
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.score-summary span {
  color: var(--muted);
  font-size: 14px;
}

.score-summary.unscored strong {
  font-family: inherit;
  font-size: 18px;
}

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

.graduation-page .page {
  width: min(100%, 720px);
}

.graduation-page .paper {
  padding-top: 34px;
}

.graduation-page .option {
  min-height: 44px;
  align-items: center;
}

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

.question-editor label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.question-editor input,
.question-editor textarea,
.question-editor select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.question-editor textarea {
  min-height: 110px;
  resize: vertical;
}

.danger-button {
  border-color: var(--danger);
  color: var(--danger);
}

.question-editor .field-wide {
  grid-column: 1 / -1;
}

.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 960px) {
  body:has(.admin-header) .page {
    width: min(calc(100% - 40px), var(--admin-content));
  }
}

@media (max-width: 720px) {
  .page {
    width: 100%;
    margin: 0;
  }

  .paper {
    min-height: 100vh;
    border-width: 0;
    padding: 34px 20px 42px;
    box-shadow: none;
  }

  .form-actions,
  .admin-header,
  .section-heading.split {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions button,
  .section-heading.split .button {
    width: 100%;
  }

  .quiz-progress {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .quiz-navigation .button-secondary {
    margin-right: 0;
  }

  .stat-grid,
  .shortcut-list,
  .submission-meta,
  .preview-options {
    grid-template-columns: 1fr;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

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

  .filter-actions > * {
    flex: 1;
  }

  .question-invalid {
    padding-left: 12px;
  }

  .graduation-page .paper {
    padding: 28px 18px 40px;
  }

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

  .question-editor .field-wide {
    grid-column: auto;
  }

  .question-actions > * {
    width: 100%;
  }

  .answer-comparison {
    padding-right: 14px;
  }

  .result-badge {
    position: static;
    width: max-content;
    margin-top: 5px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media print {
  body,
  html {
    background: #fff;
  }

  .page {
    width: 100%;
    margin: 0;
  }

  .paper {
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  .admin-nav,
  .admin-header form,
  .filter-form,
  .button,
  button {
    display: none;
  }
}

@media (max-width: 720px) {
  .exam-header {
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
  }

  .exam-mark {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    font-size: 18px;
  }

  .exam-header h1 {
    font-size: 32px;
  }

  .exam-kicker {
    margin-bottom: 9px;
  }

  .quiz-progress {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 14px;
  }

  .progress-copy {
    justify-content: space-between;
  }

  .progress-count {
    font-size: 13px;
  }

  .profile-panel {
    padding: 16px;
  }

  .question-card {
    padding: 20px 16px;
  }

  .question-card legend {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 10px;
    margin-bottom: 18px;
  }

  .question-card .question-badge {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .question-card .question-text {
    font-size: 18px;
  }

  .question-card .option-card {
    grid-template-columns: 20px 30px minmax(0, 1fr);
    min-height: 56px;
    padding: 10px 11px;
  }

  .quiz-navigation .nav-primary,
  .quiz-navigation .nav-secondary {
    width: 100%;
    min-height: 56px;
  }
}
