/* A shared workspace for every IELTS exercise, mock section and skill room. */
body .study-split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch; gap: 0; height: min(72dvh, 780px); min-height: 340px;
  margin: 18px 0; border: 1px solid #c8d0cf; border-radius: 14px;
  background: #fff; overflow: hidden; text-align: left;
}
body .study-split > .study-pane {
  min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain;
  scrollbar-gutter: stable; padding: 0 24px 28px; background: #fff;
  scroll-padding-top: 60px; overflow-wrap: anywhere;
}
body .study-split > .study-pane-source { background: #f5f8f7; border-right: 1px solid #c8d0cf; }
body[data-study-mode="ielts"] .study-split .study-pane-title {
  position: sticky; top: 0; z-index: 2; margin: 0 -1px 20px; padding: 16px 0;
  background: inherit; background-color: #fff; border-bottom: 1px solid #dce3e1;
  font: 700 15px/1.5 var(--study-interface, sans-serif); letter-spacing: 0;
}
body .study-pane-source > .study-pane-title { background-color: #f5f8f7; }
body .study-pane :is(input, select, textarea, audio, canvas, img) { max-width: 100%; }
body .study-pane :is(form, fieldset, .mock-questions) { min-width: 0; }
body .study-pane :is(.mock-passage, .re-passage, .ielts-source) {
  position: static; max-height: none; height: auto; overflow: visible;
  margin: 0; padding: 0; border: 0; background: transparent;
}
body .study-pane textarea { width: 100%; min-height: 220px; box-sizing: border-box; }
body .study-pane #ielts-record-state { font-size: 14px; line-height: 1.5; margin: 10px 0; }
body .study-pane-source :is(.ll-section-top, .sr-part2) { display: block; }
body .study-pane-source .ll-task-intro { margin-top: 20px; }
body .study-split-switch { display: none; }
body .study-split [hidden] { display: none !important; }
.study-exercise-outline { margin: 0 0 18px; }
.study-exercise-outline summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
body .exercise-page .lesson-layout { display: block; max-width: 1440px; }
body .exercise-page { padding-top: 24px; }
body .exercise-page .lesson-body { margin-top: 12px; }
body .exercise-page .ielts-workbook { padding: 20px; }
body .exercise-page #ielts-exercise-title { font-size: clamp(24px, 2.2vw, 32px); }
body .exercise-page :is(.lesson-kicker, .step-before) { margin: 8px 0; }
body .exercise-page .lesson { max-width: none; width: 100%; }
body .exercise-page .lesson-outline { position: static; width: auto; max-height: 280px; overflow: auto; }
body .exercise-page .ielts-workbook { max-width: none; }
body .exercise-page .ielts-workbook > .kicker { display: none; }
body .exercise-page .ielts-tools { margin: 12px 0; }
body .wc-work .wc-grid, body .sr-work .sr-grid { grid-template-columns: minmax(0, 1fr); }
body .wc-work .wc-editor, body .sr-work .sr-room { min-width: 0; }
body .wc-work .wc-history, body .sr-work .sr-side { position: static; max-height: none; }
body .sr-work .sr-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
body .study-pane .sr-stage { min-height: 0; }
body .study-pane .sr-stage-art { max-height: 180px; object-fit: contain; }
body .study-pane .sr-prep { display: flex; flex-wrap: wrap; }
body .mock-writing-task { padding: 0; border: 0; background: transparent; }
body .mock-reading-layout.study-split, body .mp-q-stage.study-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body .study-pane .mock-recorder { margin-top: 0; }
body .ll-stage.study-split { padding: 0; }
body .study-pane .ll-deck { min-width: 0; }
body .study-pane .ll-map { max-width: 100%; }
body .study-pane .ll-questions.is-map { display: block; }
/* The Reading lab already has accessible passage/question tabs. Keep those controls. */
body #rl-layout { height: min(72dvh, 780px); align-items: stretch; }
body #rl-layout > :is(#rl-passage, #rl-questions) {
  position: static; max-height: none; min-height: 0; overflow: auto;
  overscroll-behavior: contain; scrollbar-gutter: stable;
}
@media (min-width: 761px) {
  body #rl-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body #rl-layout > :is(#rl-passage, #rl-questions) { display: block; }
  body .rl-tabs { display: none; }
}
@media (max-width: 760px) {
  body .study-split, body .mock-reading-layout.study-split, body .mp-q-stage.study-split {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    height: 70dvh; min-height: 300px;
  }
  body .study-split-switch { display: flex; gap: 4px; padding: 8px; background: #edf2f0; }
  .study-split-switch button { flex: 1; min-width: 0; padding: 10px 8px; border: 1px solid #c8d0cf; border-radius: 8px; background: #fff; color: #24362d; font: 600 14px/1.4 sans-serif; cursor: pointer; }
  .study-split-switch button[aria-pressed="true"] { background: #173e32; color: #fff; border-color: #173e32; }
  body .study-split[data-mobile-pane="answers"] > .study-pane-source,
  body .study-split[data-mobile-pane="source"] > .study-pane-answers { display: none; }
  body .study-split > .study-pane { padding: 0 16px 24px; border-right: 0; }
  body .study-pane .study-pane-title { font-size: 14px; }
  body .sr-work .sr-side { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  body .study-split { display: block; height: auto; overflow: visible; }
  body .study-split > .study-pane { display: block !important; overflow: visible; }
  body .study-split-switch { display: none; }
}
