:root {
  color-scheme: light;
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f2f5f9;
  --surface-strong: #eaf0fb;
  --ink: #1f2937;
  --muted: #667085;
  --quiet: #98a2b3;
  --line: #e6e8ec;
  --line-strong: #d9dde5;
  --primary: #246bfd;
  --primary-dark: #1856d3;
  --primary-soft: #e9f0ff;
  --green: #1e9a62;
  --green-soft: #e9f8f0;
  --red: #e34d59;
  --red-soft: #ffedef;
  --amber: #c98200;
  --amber-soft: #fff5df;
  --radius: 8px;
  --safe-top: max(14px, env(safe-area-inset-top));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(36 107 253 / 25%);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.35;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.35;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  display: block;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--quiet);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.brand-symbol {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 750;
}

.brand-symbol.compact {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: 16px;
}

.brand-lockup,
.learner-header,
.admin-header,
.admin-header-actions,
.section-heading,
.admin-section-heading,
.drawer-header,
.editor-header,
.editor-actions,
.attempt-header,
.attempt-footer,
.access-status,
.mode-action,
.continue-action,
.feedback-title,
.license-item-header,
.license-actions,
.question-item-header,
.question-actions,
.answer-editor-row,
.admin-tabs,
.segmented-fieldset,
.result-breakdown,
.progress-grid,
.admin-stats {
  display: flex;
  align-items: center;
}

.primary-action,
.secondary-action,
.text-button,
.icon-control,
.primary-compact,
.secondary-compact,
.submit-action,
.mode-action,
.continue-action,
.admin-tab,
.license-action,
.question-action,
.category-button,
.question-nav-button {
  border: 0;
  border-radius: 6px;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.primary-action,
.primary-compact {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.primary-action {
  width: 100%;
}

.primary-action:hover:not(:disabled),
.primary-compact:hover:not(:disabled) {
  background: var(--primary-dark);
}

.secondary-action,
.secondary-compact {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #394150;
  font-weight: 650;
}

.secondary-action:hover:not(:disabled),
.secondary-compact:hover:not(:disabled) {
  background: var(--surface-soft);
}

.secondary-compact,
.primary-compact {
  min-height: 36px;
  padding: 0 11px;
  font-size: 13px;
}

.text-button {
  min-height: 36px;
  padding: 0 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.text-button:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--ink);
}

.icon-control {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
}

.icon-control.small {
  width: 36px;
  height: 36px;
  font-size: 21px;
}

.icon-control:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--ink);
}

.form-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.activation-view,
.admin-login-view {
  display: flex;
  min-height: 100dvh;
  padding: var(--safe-top) 24px var(--safe-bottom);
  flex-direction: column;
  justify-content: center;
}

.activation-brand,
.activation-form,
.admin-login-brand,
.admin-login-form {
  width: min(100%, 390px);
  margin-right: auto;
  margin-left: auto;
}

.activation-brand,
.admin-login-brand {
  margin-bottom: 26px;
}

.activation-brand .brand-symbol,
.admin-login-brand .brand-symbol {
  margin-bottom: 18px;
}

.activation-brand h1,
.admin-login-brand h1 {
  margin-bottom: 8px;
  font-size: 29px;
}

.activation-brand > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.activation-form,
.admin-login-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgb(37 47 65 / 6%);
}

.activation-form label,
.admin-login-form label,
.admin-form > label,
.field-grid label {
  display: block;
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

.activation-form input,
.admin-login-form input,
.admin-form input,
.admin-form textarea,
.admin-form select {
  margin-top: 7px;
}

.activation-form input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.activation-form .primary-action,
.admin-login-form .primary-action {
  margin-top: 15px;
}

.dashboard-view,
.result-view,
.attempt-view,
.admin-dashboard {
  width: min(100%, 780px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--safe-top) 16px calc(28px + var(--safe-bottom));
}

.attempt-view {
  padding-bottom: calc(104px + var(--safe-bottom));
}

.learner-header,
.admin-header {
  min-height: 42px;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup {
  min-width: 0;
  gap: 9px;
}

.brand-lockup h1 {
  font-size: 18px;
}

.brand-lockup .eyebrow {
  margin-bottom: 1px;
  font-size: 11px;
}

.access-status {
  min-height: 46px;
  gap: 8px;
  margin: 18px 0 0;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgb(30 154 98 / 12%);
}

.access-status.expiring .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgb(201 130 0 / 12%);
}

.access-status time {
  margin-left: auto;
  color: var(--quiet);
  white-space: nowrap;
}

.progress-band,
.action-section,
.continue-section,
.category-section,
.review-section,
.admin-tab-panel {
  margin-top: 28px;
}

.progress-band h2,
.section-heading h2,
.continue-section h2,
.review-section h2,
.admin-tab-panel > h2 {
  margin-bottom: 13px;
}

.progress-grid,
.admin-stats,
.result-breakdown {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 65%);
}

.progress-grid > div,
.admin-stats > div,
.result-breakdown > div {
  min-width: 0;
  flex: 1 1 0;
  padding: 13px 8px;
  text-align: center;
}

.progress-grid > div + div,
.admin-stats > div + div,
.result-breakdown > div + div {
  border-left: 1px solid var(--line);
}

.progress-grid strong,
.admin-stats strong,
.result-breakdown strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-grid span,
.admin-stats span,
.result-breakdown span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.action-section {
  margin-top: 30px;
}

.section-heading,
.admin-section-heading {
  justify-content: space-between;
  gap: 12px;
}

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

.mode-action,
.continue-action {
  width: 100%;
  min-height: 76px;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.mode-action:hover:not(:disabled),
.continue-action:hover:not(:disabled) {
  border-color: #bfd1ff;
  background: #fbfcff;
}

.mode-icon {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 17px;
  font-weight: 750;
}

.mode-icon.exam {
  background: var(--amber-soft);
  color: var(--amber);
}

.mode-action > span:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
}

.mode-action strong,
.mode-action small {
  display: block;
}

.mode-action strong {
  font-size: 15px;
}

.mode-action small {
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-arrow {
  color: var(--quiet);
  font-size: 25px;
  font-weight: 300;
}

.continue-action {
  min-height: 50px;
  justify-content: space-between;
  padding: 0 13px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

.category-button:hover:not(:disabled) {
  border-color: #bcd0fe;
  background: var(--primary-soft);
  color: var(--primary);
}

.category-button span {
  margin-left: 4px;
  color: var(--quiet);
  font-size: 11px;
}

.attempt-view {
  display: flex;
  min-height: 100dvh;
  padding-bottom: calc(94px + var(--safe-bottom));
  flex-direction: column;
}

.attempt-header {
  min-height: 44px;
  justify-content: space-between;
}

.attempt-progress {
  display: grid;
  gap: 2px;
  text-align: center;
}

.attempt-progress span:first-child {
  font-size: 14px;
  font-weight: 700;
}

.attempt-progress span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.exam-timer {
  align-self: center;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--amber-soft);
  color: #936400;
  font-size: 12px;
  font-weight: 700;
}

.exam-timer.urgent {
  background: var(--red-soft);
  color: #ba3541;
}

.question-panel {
  flex: 1 1 auto;
  padding: 34px 2px 24px;
}

.question-category {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.question-stem {
  margin-bottom: 26px;
  font-size: 19px;
  font-weight: 680;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.answer-composer {
  display: grid;
  gap: 10px;
}

.answer-composer-heading,
.answer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.answer-composer-heading label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.answer-save-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.answer-composer textarea {
  min-height: 148px;
  border-color: var(--line-strong);
  background: var(--surface);
}

.answer-composer textarea:focus {
  border-color: var(--primary);
}

.answer-tools {
  justify-content: flex-end;
}

.reference-action {
  color: var(--primary);
}

.question-feedback {
  margin-top: 18px;
  padding: 13px;
  border-left: 3px solid var(--primary);
  background: var(--surface-soft);
  color: #475467;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

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

.question-feedback.incorrect {
  border-color: var(--red);
  background: var(--red-soft);
}

.question-feedback strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.attempt-footer {
  position: fixed;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 78px;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--canvas);
}

.attempt-footer .secondary-action,
.attempt-footer .primary-action,
.attempt-footer .submit-action {
  width: min(46%, 260px);
}

.submit-action {
  min-height: 44px;
  padding: 0 14px;
  background: #213a70;
  color: #fff;
  font-weight: 700;
}

.submit-action:hover:not(:disabled) {
  background: #182d58;
}

.question-drawer {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(22 31 45 / 38%);
}

.drawer-panel {
  width: min(100%, 780px);
  max-height: 72dvh;
  overflow: auto;
  padding: 14px 16px calc(20px + var(--safe-bottom));
  border-radius: 8px 8px 0 0;
  background: var(--surface);
}

.drawer-header,
.editor-header {
  min-height: 38px;
  justify-content: space-between;
  gap: 12px;
}

.question-nav-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.question-nav-button {
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.question-nav-button.answered {
  border-color: #a7c2ff;
  background: var(--primary-soft);
  color: var(--primary);
}

.question-nav-button.current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.score-band {
  margin: 50px 0 0;
  padding: 34px 18px 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.score-band .eyebrow {
  margin-bottom: 8px;
  color: var(--primary);
}

.score-band > strong {
  font-size: 64px;
  line-height: 0.9;
}

.score-band > span {
  margin-left: 4px;
  font-size: 16px;
  font-weight: 700;
}

.score-band > p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.result-breakdown {
  margin-top: 20px;
}

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

.review-item {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.review-item:last-child {
  border-bottom: 0;
}

.review-item h3 {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.5;
}

.review-item p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.review-answer,
.review-correct {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.review-answer strong,
.review-correct strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.review-answer p,
.review-correct p {
  margin: 0;
  color: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-item .review-answer {
  border-color: #f1c3c8;
  background: #fffafb;
  color: #a23541;
}

.review-item .review-correct {
  border-color: #b6dfca;
  background: #fbfffc;
  color: #187448;
}

.result-action {
  margin-top: 24px;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 16px;
  bottom: calc(20px + var(--safe-bottom));
  left: 16px;
  max-width: 480px;
  margin: auto;
  padding: 11px 13px;
  border-radius: 7px;
  background: #252d3a;
  color: #fff;
  box-shadow: 0 10px 28px rgb(22 31 45 / 18%);
  font-size: 14px;
  line-height: 1.45;
}

.toast.error {
  background: #a53643;
}

.admin-app {
  min-height: 100dvh;
}

.admin-login-view {
  background: var(--canvas);
}

.admin-login-form {
  display: grid;
  gap: 7px;
}

.admin-login-form label:not(:first-child) {
  margin-top: 7px;
}

.admin-dashboard {
  width: min(100%, 1060px);
}

.admin-tabs {
  overflow-x: auto;
  gap: 2px;
  margin: 22px -16px 0;
  padding: 0 16px 9px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  min-height: 35px;
  flex: 0 0 auto;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.admin-tab:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--ink);
}

.admin-tab.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-tab-panel > h2 {
  margin-bottom: 16px;
}

.admin-note,
.admin-section-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.question-bank-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.question-bank-select-label {
  display: grid;
  min-width: min(100%, 280px);
  gap: 7px;
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

.question-bank-select-label select {
  min-width: 260px;
}

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

.question-bank-actions .secondary-compact.danger {
  border-color: #f1c9ce;
  color: #b53543;
}

.question-bank-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.compact-form {
  max-width: 760px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

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

.segmented-fieldset {
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-fieldset legend {
  width: 100%;
  margin-bottom: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

.segmented-fieldset label,
.checkbox-label {
  display: inline-flex !important;
  width: auto;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

.segmented-fieldset input,
.checkbox-label input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.generated-codes {
  margin-top: 20px;
  padding: 14px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}

.generated-codes pre {
  max-height: 220px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #bfe6ce;
  border-radius: 6px;
  background: var(--surface);
  color: #2c4c38;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

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

.license-item,
.question-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.license-item.expired {
  border-color: #efd6b0;
}

.license-item.revoked {
  border-color: #f0c9cd;
}

.license-item-header,
.question-item-header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.license-code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.state-tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--green-soft);
  color: #237447;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.state-tag.expired {
  background: var(--amber-soft);
  color: #956200;
}

.state-tag.revoked,
.state-tag.unpublished {
  background: var(--red-soft);
  color: #b53543;
}

.license-meta,
.question-meta {
  display: grid;
  gap: 4px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.license-bank-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  max-width: 320px;
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

.license-bank-field select {
  min-height: 34px;
  margin: 0;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 500;
}

.license-actions,
.question-actions {
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.license-action,
.question-action {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

.license-action:hover:not(:disabled),
.question-action:hover:not(:disabled) {
  background: var(--surface-soft);
}

.license-action.danger,
.question-action.danger {
  border-color: #f1c9ce;
  color: #b53543;
}

.question-editor {
  margin-top: 16px;
  padding: 16px;
  border-top: 2px solid var(--primary);
  background: var(--surface-soft);
}

.question-editor .admin-form {
  margin-top: 13px;
}

.answer-editor {
  display: grid;
  gap: 9px;
}

.answer-editor-fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.answer-editor-fieldset legend {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.answer-editor-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.answer-editor-row textarea {
  flex: 1 1 auto;
  margin: 0;
  resize: vertical;
}

.remove-answer {
  display: inline-grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--red);
  font-size: 20px;
}

.remove-answer:hover:not(:disabled) {
  background: var(--red-soft);
}

.editor-actions {
  justify-content: flex-end;
  gap: 8px;
}

.editor-actions .primary-action {
  width: auto;
}

.question-item h3 {
  min-width: 0;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.question-item-answers {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.question-item-answers span:first-child {
  color: var(--green);
}

@media (min-width: 760px) {
  .dashboard-view,
  .result-view,
  .attempt-view,
  .admin-dashboard {
    padding-right: 24px;
    padding-left: 24px;
  }

  .admin-tabs {
    margin-right: -24px;
    margin-left: -24px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .question-drawer {
    align-items: center;
    padding: 24px;
  }

  .drawer-panel {
    border-radius: var(--radius);
  }

  .question-nav-list {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

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

  .question-bank-toolbar {
    align-items: stretch;
  }

  .question-bank-select-label,
  .question-bank-select-label select {
    width: 100%;
    min-width: 0;
  }

  .progress-grid > div,
  .admin-stats > div,
  .result-breakdown > div {
    padding-right: 4px;
    padding-left: 4px;
  }

  .progress-grid strong,
  .admin-stats strong,
  .result-breakdown strong {
    font-size: 19px;
  }

  .access-status-copy {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .review-answer-grid {
    grid-template-columns: 1fr;
  }
}

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