body.test-mode {
  --exam-ink: #14212a;
  --exam-bar: #182a36;
  --exam-line: #bac1c6;
  --exam-focus: #236aa8;
  --app-rose: #245579;
  --app-font: Arial, Helvetica, sans-serif;
  margin: 0;
  color: var(--exam-ink);
  background: #fff;
  font: 1rem/1.5 var(--app-font);
}

.test-mode > .app-header, .test-mode > .app-footer,
.test-mode #main > :not(#workspace), .test-mode #workspace[hidden] { display: none; }
.test-mode main.toefl.app-frame { width: 100%; max-width: none; margin: 0; padding: 0; }
.test-mode #workspace { margin: 0; padding: 0; }
.test-mode .exam-shell { min-height: 100vh; min-height: 100dvh; background: #fff; }
.test-mode .exam-shell :is(button, a):focus-visible,
.test-mode .exam-shell :is(input, textarea, summary, select):focus-visible {
  outline: 3px solid #3984bd; outline-offset: 3px;
}
.test-mode .exam-toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem;
  min-height: 3.5rem; padding: .5rem clamp(.75rem, 3vw, 2.5rem);
  color: #fff; background: var(--exam-bar);
  box-sizing: border-box; border-bottom: 1px solid #0d1921;
}
.test-mode .exam-toolbar :is(h1, h2, strong, span, small, p, a) { color: inherit; }
.test-mode .exam-brand { font-size: 1.05rem; font-weight: 700; }
.test-mode .exam-status { font-size: .98rem; }
.test-mode .exam-toolbar .exam-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-inline-start: auto;
}
.test-mode .exam-shell :is(button, .app-btn, select) {
  font-family: inherit; font-size: .96rem; font-weight: 500;
  min-height: 2.55rem; border: 1px solid #8c9ba5; border-radius: 3px;
  box-shadow: none; transform: none; transition: none;
}
.test-mode .exam-toolbar :is(button, .app-btn) {
  background: #f2f4f5; color: #15232d; padding: .35rem .9rem;
}
.test-mode .exam-toolbar :is(button, .app-btn):hover:enabled { background: white; }
.test-mode .exam-shell .app-btn-dark { background: #28465b; color: #fff; border-color: #183347; }
.test-mode .exam-shell .app-btn-outline { background: #fff; color: #233d50; border-color: #8e9da6; }
.test-mode .exam-shell button:disabled { opacity: .55; }
.test-mode .exam-timer { white-space: nowrap; font-variant-numeric: tabular-nums; }
.test-mode .exam-page, .test-mode .exam-stage, .test-mode .exam-content { min-width: 0; }
.test-mode .exam-page { max-width: 88rem; margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem); }
.test-mode :is(.exam-stage, .exam-start, .exam-review) { max-width: 78rem; margin-inline: auto; }
.test-mode .exam-start, .test-mode .exam-review { padding: clamp(1rem, 3vw, 2.25rem); }
.test-mode .exam-shell h1 { font: bold clamp(1.55rem, 3vw, 2rem)/1.2 var(--app-font); letter-spacing: normal; }
.test-mode .exam-shell h2 { font: bold 1.35rem/1.25 var(--app-font); letter-spacing: normal; }
.test-mode .exam-shell h3 { font: bold 1.12rem/1.4 var(--app-font); letter-spacing: normal; }
.test-mode .task, .test-mode .catalog-panel { border: 0; border-radius: 0; box-shadow: none; background: white; margin: 0; }
.test-mode .toefl .question-layout.has-context {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3.5vw, 3.25rem);
}
.test-mode .toefl .context {
  padding: .5rem clamp(1rem, 2.5vw, 2rem) .75rem 0;
  border: 0; border-right: 1px solid var(--exam-line); border-radius: 0; background: white;
}
.test-mode .toefl .stimulus { font-size: 1.07rem; line-height: 1.72; color: #17232c; }
.test-mode .toefl .question .prompt { color: #15222c; font-weight: 600; }
.test-mode .toefl .choices { gap: .25rem; }
.test-mode .toefl .choice { border: 1px solid transparent; border-radius: 2px; padding: .5rem; }
.test-mode .toefl .choice:has(:checked) { border-color: #8babbf; background: #edf4f8; }
.test-mode .toefl input[type=radio] { accent-color: #245b84; }
.test-mode .toefl .answer-text { color: #111d26; border-radius: 2px; font: inherit; }
.test-mode .toefl textarea.answer-text { min-height: 16rem; padding: .9rem; }
.test-mode .toefl .step { color: #44535d; }
.test-mode .toefl .tiles button { background: #f2f4f6; border-color: #8e9ba5; border-radius: 3px; }
.test-mode .exam-shell audio { width: min(100%, 32rem); }
.test-mode .exam-shell .feedback { border-color: #5d778c; background: #f4f7f9; }
.test-mode .exam-review details { border-top: 1px solid #d0d7dc; padding: .65rem .2rem; }
.test-mode .exam-review summary { cursor: pointer; font-weight: 600; }
@media (max-width: 48rem) {
  .test-mode .toefl .question-layout.has-context { grid-template-columns: 1fr; gap: .75rem; }
  .test-mode .toefl .context { padding: .25rem 0 .85rem; border: 0; border-bottom: 1px solid var(--exam-line); }
  .test-mode .exam-toolbar { gap: .4rem .7rem; }
}
@media (max-width: 35rem) {
  .test-mode .exam-toolbar { position: static; }
  .test-mode .exam-toolbar .exam-controls { width: 100%; margin: 0; }
  .test-mode .exam-shell :is(button, .app-btn) { min-height: 2.75rem; }
  .test-mode .toefl textarea.answer-text { min-height: 11rem; }
}

.test-mode .exam-shell [hidden] { display: none !important; }
.test-mode .exam-clock-row {
  display: flex; justify-content: flex-end; align-items: center; gap: .85rem;
  padding: .4rem clamp(.75rem, 3vw, 2.5rem); border-bottom: 1px solid #d8dde1;
  background: #fff; color: #243540;
}
.test-mode .exam-clock-row .app-btn { min-height: 2rem; padding: .15rem .65rem; border: 1px solid #a0acb5; }
.test-mode .exam-shell .exam-exit { padding: .45rem .15rem; color: #fff; font-size: .92rem; text-underline-offset: .15rem; }
.test-mode .exam-page > .directions { margin-bottom: 1.25rem; color: #394b57; }
.test-mode .exam-shell .exam-outline { padding-left: 1.5rem; line-height: 1.8; }
.test-mode .exam-shell .cloze-passage {
  max-width: 64rem; padding-top: .4rem; font-size: 1.1rem; line-height: 2.25; white-space: pre-line;
}
.test-mode .cloze-word { white-space: nowrap; }
.test-mode .cloze-input {
  display: inline-block; max-width: 8rem; min-width: 1.5em; margin: 0 .08rem; padding: 0 .1rem;
  color: #17232c; background: #ebedf0; border: 1px solid #87939c; border-radius: 2px;
  text-align: center; font: inherit; line-height: 1.45; cursor: text;
}
.test-mode .exam-volume { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .6rem; }
.test-mode .exam-volume input { accent-color: #335972; max-width: 8rem; }
.test-mode .exam-audio {
  padding: 1.2rem; border: 1px solid #c3cbd0; background: #f5f7f8; border-radius: 3px;
}
.test-mode .exam-audio audio:not([controls]) { display: none; }
.test-mode .exam-page .exam-controls, .test-mode .exam-speaking-controls, .test-mode .exam-writing-tools {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-block: .75rem;
}
.test-mode .exam-writing, .test-mode .exam-speaking { margin-top: 1rem; }
.test-mode .exam-writing-tools { background: #eef1f3; border: 1px solid #bcc6cd; padding: .4rem; margin-bottom: 0; }
.test-mode .exam-writing-input {
  box-sizing: border-box; width: 100%; min-height: 14rem; margin: 0; padding: .8rem;
  background: #fff; border: 1px solid #8a99a4; border-radius: 0; font: 1.05rem/1.5 Arial, Helvetica, sans-serif;
}
.test-mode .exam-writing-tools button { padding: .3rem .6rem; font-size: .9rem; background: #fff; color: #14212a; }
.test-mode .exam-writing-count { font-variant-numeric: tabular-nums; }
.test-mode .exam-writing-meta { margin: .2rem 0; font-size: .98rem; }
.test-mode .exam-speaking-time { font: bold 1.45rem/1.25 Arial, sans-serif; font-variant-numeric: tabular-nums; }
.test-mode .exam-speaking-status { margin: .5rem 0; }
.test-mode .review-item { border-top: 1px solid var(--exam-line); padding-top: .9rem; margin-top: 1rem; }
@media(max-width:35rem) {
  .test-mode .exam-toolbar .exam-exit { position: static; }
  .test-mode .exam-writing-tools { gap: .3rem; }
  .test-mode .exam-clock-row { justify-content: space-between; }
}
