.section-status {
  display: none;
  flex: 1;
  font-size: 16px;
}

.mode-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #102a43, #164e75);
}

.mode-screen.hidden {
  display: none;
}

.pack-picker-link {
  text-decoration: none;
}

.mode-card {
  width: min(760px, 100%);
  padding: 46px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px #071b2b70;
  text-align: center;
}

.mode-kicker,
.result-heading > span,
.exam-flow-page .eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.mode-card h1 {
  margin: 8px 0 4px;
  font-size: 34px;
}

.mode-card > p,
.result-heading p,
.exam-flow-page p {
  color: var(--muted);
}

.mode-card > p {
  margin: 0 0 28px;
}

.mode-brand {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.mode-brand .brand-logo {
  width: 184px;
  height: auto;
}

.exam-header .brand {
  display: grid;
  grid-template-columns: 94px minmax(90px, 1fr);
  column-gap: 9px;
  align-items: center;
  min-width: 218px;
}

.exam-header .brand-logo {
  grid-row: 1 / span 2;
  width: 94px;
  height: auto;
  padding: 4px 6px;
  border-radius: 6px;
  background: #fff;
}

.exam-header .brand span {
  align-self: end;
  font-size: 10px;
  letter-spacing: .7px;
}

.exam-header .brand strong {
  align-self: start;
  font-size: 14px;
  white-space: nowrap;
}

.mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mode-options button {
  min-height: 145px;
  padding: 24px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.mode-options button:hover,
.mode-options button:focus-visible {
  border-color: var(--blue);
  background: var(--sky);
}

.mode-options strong,
.mode-options span {
  display: block;
}

.mode-options strong {
  margin-bottom: 7px;
  font-size: 21px;
}

.mode-options span {
  font-size: 13px;
  opacity: .84;
}

.mode-contact-trigger {
  margin-top: 30px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--blue2);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#headerContactButton {
  display: none;
}

.clear-module-button {
  display: none;
  margin-top: 12px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

body[data-mode="practice"] .clear-module-button {
  display: inline-block;
}

.clear-module-button:hover {
  color: var(--red);
  text-decoration: underline;
}

body[data-mode="practice"] #headerContactButton {
  display: inline-block;
}

body.exam-mode #subjectTabs,
body.exam-mode .exam-nav,
body.exam-mode #markButton,
body.exam-mode #reviewButton,
body.exam-mode #submitButton,
body.exam-mode #pauseButton {
  display: none;
}

body.exam-mode .section-status {
  display: block;
}

body.exam-mode .exam-shell {
  display: block;
  max-width: 1280px;
}

body.exam-mode .exam-content {
  padding-top: 28px;
}

body.exam-mode .question-stage {
  min-height: 650px;
}

body.exam-mode .question-stage:has(.passage-panel.empty) .question-panel {
  max-width: 1060px;
}

.content-toolbar {
  height: auto;
  min-height: 64px;
  gap: 16px;
}

.answer-panel {
  scroll-margin-top: 92px;
}

.answer-revealed-label {
  margin-bottom: 6px;
  color: var(--blue2);
  font-size: 12px;
  font-weight: 700;
}

.toolbar-actions,
.question-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.question-navigation button {
  padding: 9px 15px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.question-navigation button:hover {
  background: var(--blue2);
}

.question-navigation button.secondary {
  background: #e8f0f5;
  color: var(--navy);
}

.exam-flow-page {
  min-height: 520px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 40px;
  text-align: center;
}

.exam-flow-page h1 {
  margin: 7px 0 12px;
  font-size: 34px;
}

.exam-flow-page p {
  max-width: 680px;
}

.flow-types {
  width: min(700px, 100%);
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
}

.flow-types div {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.flow-types div:first-child {
  border-top: 0;
}

.flow-types span {
  color: var(--muted);
}

.result-screen {
  max-width: 1200px;
  margin: 0 auto;
  padding: 54px 24px;
}

.result-heading {
  margin-bottom: 30px;
  text-align: center;
}

.result-logo {
  display: block;
  width: 168px;
  height: auto;
  margin: 0 auto 7px;
}

.result-heading > span {
  color: var(--green);
}

.result-heading h1 {
  margin: 7px 0;
}

.result-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.result-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.result-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-card h2 {
  margin: 0;
}

.result-card .score {
  color: var(--blue2);
  font-size: 24px;
  font-weight: 800;
}

.result-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.result-card li {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.result-card button,
.result-actions button {
  padding: 9px 15px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

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

.result-actions .secondary {
  background: #e8f0f5;
  color: var(--navy);
}

.contact-card,
.contact-modal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.contact-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.contact-copy p {
  margin: 0 0 10px;
  color: var(--muted);
}

.contact-copy .contact-note {
  color: var(--navy);
  font-weight: 700;
}

.account-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
  padding: 10px 12px;
  border: 1px solid #b7d9ed;
  border-radius: 9px;
  background: var(--sky);
  color: var(--navy);
  font-weight: 800;
}

.account-search button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.contact-copy .account-steps {
  color: var(--navy);
  font-size: 13px;
}

.consult-divider {
  margin: 18px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.consult-divider h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.contact-privacy {
  color: var(--muted);
}

.contact-qr {
  display: block;
  width: 190px;
  height: auto;
  background: #fff;
}

.qr-block {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.result-contact {
  width: min(820px, 100%);
  margin: 32px auto 0;
  padding: 24px 28px;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.contact-modal.hidden {
  display: none;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: #102a43c7;
}

.contact-modal-card {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  padding: 30px;
  box-shadow: 0 24px 70px #071b2b70;
}

.contact-modal-close {
  position: absolute;
  top: 10px;
  right: 13px;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.email-meta {
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.email-meta div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.email-meta div:first-child {
  border-top: 0;
}

.email-meta span {
  color: var(--muted);
}

.writing-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 9px;
}

.writing-tools button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}

.audio-gate .source-image {
  max-height: 320px;
  object-fit: contain;
}

.inline-blank,
.inline-blank:focus {
  height: 2.15em;
  padding: 1px 5px 5px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background-color: #d7d9dc;
  background-image: linear-gradient(to right, #394552 0 72%, transparent 72% 100%);
  background-position: left bottom;
  background-repeat: repeat-x;
  background-size: calc(100% / var(--letter-count, 1)) 2px;
  box-shadow: none;
  caret-color: var(--blue);
}

.inline-blank:focus {
  background-color: #cfd5da;
}

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

.question-grid button {
  min-width: 0;
}

.question-grid button.range-label {
  font-size: inherit;
  font-weight: 700;
  letter-spacing: normal;
  white-space: nowrap;
}

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

.question-grid.range-layout button {
  grid-column: span 2;
}

.question-grid.range-layout button.range-label {
  grid-column: span 5;
  aspect-ratio: auto;
  min-height: 42px;
}

.question-grid.range-layout.single-range button.range-label {
  grid-column: 1 / span 10;
}

.vocabulary-highlight {
  padding: 0 0.12em;
  color: #fff;
  font-weight: 700;
  background: #0f696e;
}

.speaking-instruction {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 20px 28px;
  text-align: center;
}

.speaking-instruction .eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.speaking-instruction h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.28;
}

body[data-subject="speaking"] .question-stage {
  grid-template-columns: 1fr;
  align-content: start;
  height: calc(100vh - 184px);
  min-height: 0;
}

body[data-subject="listening"] .question-stage,
body[data-subject="writing"] .question-stage {
  grid-template-columns: 1fr;
  align-content: start;
  min-height: calc(100vh - 184px);
}

body[data-subject="listening"] .passage-panel,
body[data-subject="listening"] .question-panel,
body[data-subject="writing"] .passage-panel,
body[data-subject="writing"] .question-panel,
body[data-subject="speaking"] .passage-panel,
body[data-subject="speaking"] .question-panel {
  width: min(100%, 1000px);
  margin: 0 auto;
  max-height: none;
  border-right: 0;
  background: #fff;
}

body[data-subject="listening"] .passage-panel,
body[data-subject="writing"] .passage-panel,
body[data-subject="speaking"] .passage-panel {
  padding-bottom: 12px;
}

body[data-subject="listening"] .passage-panel h2,
body[data-subject="writing"] .passage-panel h2,
body[data-subject="speaking"] .passage-panel h2 {
  margin-bottom: 0;
  text-align: center;
}

body[data-subject="listening"] .question-panel,
body[data-subject="writing"] .question-panel,
body[data-subject="speaking"] .question-panel {
  padding-top: 18px;
  padding-bottom: 18px;
}

.speaking-instruction .source-image {
  width: auto;
  max-width: min(100%, 760px);
  max-height: max(210px, calc(100vh - 480px));
  margin: 0 auto;
  object-fit: contain;
}

.speaking-task .source-image {
  width: auto;
  max-width: min(100%, 760px);
  max-height: max(190px, calc(100vh - 465px));
  margin: 0 auto;
  object-fit: contain;
}

.speaking-prompt-gate .source-image {
  width: auto;
  max-width: min(100%, 760px);
  max-height: max(220px, calc(100vh - 400px));
  margin: 0 auto;
  object-fit: contain;
}

.speaking-task {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.speaking-task h2,
.speaking-prompt-gate h2 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 34px);
  text-align: center;
}

.speaking-task .audio-card {
  width: min(100%, 760px);
  margin: 0;
  padding: 8px 12px;
}

body[data-subject="speaking"] .record-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
}

body[data-subject="speaking"] .record-status {
  margin: 0 0 0 auto;
}

body[data-subject="speaking"] .record-card p {
  display: none;
}

@media (max-width: 920px) {
  .exam-header .brand {
    min-width: 196px;
  }

  .exam-header .brand-logo {
    width: 82px;
  }

  .answer-panel {
    scroll-margin-top: 156px;
  }

  .mode-options,
  .result-cards {
    grid-template-columns: 1fr;
  }

  .mode-card {
    padding: 30px;
  }

  .contact-card,
  .contact-modal-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .contact-card .account-search,
  .contact-modal-card .account-search {
    align-items: stretch;
    flex-direction: column;
  }

  .section-status {
    order: 3;
    width: 100%;
  }

  .content-toolbar,
  .toolbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
  }

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

  .speaking-instruction {
    padding: 22px 8px;
  }

  body[data-subject="speaking"] .question-stage {
    height: auto;
    min-height: 0;
  }

  body[data-subject="writing"] .question-stage {
    min-height: 0;
  }

  body[data-subject="listening"] .question-stage {
    min-height: 0;
  }

  body[data-subject="speaking"] .record-card {
    display: block;
  }

  body[data-subject="speaking"] .record-status {
    margin: 5px 0;
  }
}

@media (max-width: 570px) {
  .clock {
    width: 100%;
    justify-content: flex-end;
  }

  #timeToggleButton {
    display: none;
  }
}
