
/* A continuous document for single-column tasks, two independently scrollable
   panes for desktop tasks that require consulting the prompt while answering. */
html:root body.ft-official-exam-active {
  --ft-pane-padding: clamp(16px, min(2.5vw, 3.5vh), 38px);
}

/* Keep the original controls available to the shared header's handlers. */
html:root body.ft-official-exam-active #app [data-ft-official-surface="reading"] :is(.ft-exam-top, .ft-exam-status) {
  display: none !important;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface="reading"] .ft-mock-fill {
  display: block !important;
  box-sizing: border-box;
  width: min(100%, 860px) !important;
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: var(--ft-pane-padding) !important;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface="reading"] .ft-mock-fill > :is(h1, .reading-passage, .reading-question) {
  box-sizing: border-box;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface="reading"] .ft-mock-fill > h1 {
  margin-bottom: var(--ft-pane-padding) !important;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface="reading"] .ft-mock-fill > [hidden] {
  display: none !important;
}

html:root body.ft-official-exam-active #app [data-ft-official-surface]:is(.exam-shell, .word-practice-page) :is(.exam-body, .panel),
html:root body.ft-official-exam-active #app [data-ft-official-surface="ordering"] :is(.ord-stage, .ord-item, .conversation-message, .dialog-bubble, .ord-tray) {
  box-sizing: border-box;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100%;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface="ordering"] .exam-body,
html:root body.ft-official-exam-active #app [data-ft-official-surface="words"] :is(.reading-exam-body, .panel) {
  align-self: center;
  width: 100% !important;
  padding: var(--ft-pane-padding) !important;
  margin: 0 auto !important;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface="words"] .panel {
  max-width: 860px !important;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface="ordering"] .ord-tray {
  flex-wrap: wrap !important;
}
html:root body.ft-official-exam-active #app [data-ft-official-surface] .reading-passage img {
  max-width: 100% !important;
  height: auto;
}

@media (min-width: 701px) {
  html:root body.ft-official-exam-active #app [data-ft-official-surface] .reading-exam-layout:not(.ft-mock-fill),
  html:root body.ft-official-exam-active #app[data-ft-official-surface="reading-single"] .reading-exam-layout {
    box-sizing: border-box;
    height: var(--ft-exam-height, calc(100dvh - 96px)) !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template: "passage question" minmax(0, 1fr) / repeat(2, minmax(0, 1fr)) !important;
  }
  html:root body.ft-official-exam-active #app .reading-exam-layout:not(.ft-mock-fill) > :is(.reading-passage, .reading-question),
  html:root body.ft-official-exam-active #app [data-ft-official-surface="speaking"] .sp-layout > section {
    box-sizing: border-box;
    align-self: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: auto !important;
    padding: var(--ft-pane-padding) !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="writing"].write-shell {
    height: var(--ft-exam-height, calc(100dvh - 96px)) !important;
    box-sizing: border-box;
    grid-template: minmax(0, 1fr) / repeat(2, minmax(0, 1fr)) !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="writing"] > :is(.write-q, .write-editor) {
    grid-row: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="writing"] > .write-q {
    padding: var(--ft-pane-padding) !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="writing"] .write-ta {
    min-height: 0 !important;
    flex: 1 1 0;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="speaking"].sp-shell {
    display: grid !important;
    height: var(--ft-exam-height, calc(100dvh - 96px)) !important;
    box-sizing: border-box;
    padding: 0 !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 0 !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="speaking"] .sp-layout {
    grid-template-rows: minmax(0, 1fr) !important;
    min-height: 0 !important;
    width: 100% !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="speaking"] .sp-prompt {
    min-height: 0 !important;
    height: clamp(150px, 44vh, 530px) !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="speaking"] :is(.sp-cue-image, .sp-cue-svg) {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  html:root body.ft-official-exam-active #app [data-ft-official-surface="speaking"] .sp-sentence-footer {
    margin: 0 !important;
    padding-block: clamp(6px, 1.5vh, 16px) !important;
  }
}

@media (max-width: 700px) {
  html:root body.ft-official-exam-active #app .reading-exam-layout:not(.ft-mock-fill) {
    grid-template-areas: "passage" "question" !important;
    height: auto !important;
  }
  html:root body.ft-official-exam-active #app .reading-exam-layout:not(.ft-mock-fill) > section,
  html:root body.ft-official-exam-active #app [data-ft-official-surface="writing"] > .write-q {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

