/* ==========================================================================
   CET-4 Classroom UI — Design Tokens & Complete Stylesheet
   Target: cet4.fantasium.cn
   Aesthetic: Warm Editorial Exam Desk (zero CDN, projector-ready, responsive)
   ========================================================================== */

:root {
  /* Surfaces & Canvas */
  --bg-canvas: #f7f5f0;
  --bg-surface: #ffffff;
  --bg-elevated: #fdfcfa;
  --bg-muted: #efece5;
  --bg-subtle: #f4f1ea;
  --bg-hover: #f0ede4;

  /* Borders */
  --border-subtle: #e4e0d8;
  --border-default: #d6d0c4;
  --border-strong: #bdb5a6;

  /* Typography Inks */
  --ink-primary: #1c1f24;
  --ink-secondary: #49505c;
  --ink-muted: #707784;
  --ink-inverse: #ffffff;

  /* Academic Cobalt Accent */
  --accent-primary: #1d4e89;
  --accent-hover: #163c6b;
  --accent-soft: #ebf2fa;
  --accent-border: #b9d0ec;

  /* Semantic Feedback (pair with icons/labels, never color alone) */
  --ok-ink: #1a744b;
  --ok-bg: #e8f6ee;
  --ok-border: #9fd6ba;

  --err-ink: #b93226;
  --err-bg: #fceceb;
  --err-border: #ebb2ac;

  --flag-ink: #9e5b00;
  --flag-bg: #fef4df;
  --flag-border: #efc97d;

  /* Passage <-> Question Cross-Link Highlight */
  --link-bg: #fff3c2;
  --link-border: #d99b00;
  --link-ink: #5a3e00;

  /* Font Stacks (Zero external CDN) */
  --font-sans: 'PingFang SC', 'Hiragino Sans GB', -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-reading: 'Charter', 'Georgia', 'Source Serif 4', 'Cambria', 'Times New Roman', serif;
  --font-mono: ui-monospace, 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;

  /* Typographic Scale (Default / md) */
  --text-xs: 12px;
  --text-sm: 13.5px;
  --text-base: 15px;
  --text-stem: 15.5px;
  --text-option: 15px;
  --text-reading: 17.5px;
  --text-h1: 22px;
  --text-h2: 18px;
  --text-h3: 15.5px;

  --lh-tight: 1.35;
  --lh-base: 1.55;
  --lh-reading: 1.82;
  --measure-reading: 66ch;

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(28, 31, 36, 0.05);
  --shadow-sm: 0 2px 8px rgba(28, 31, 36, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 31, 36, 0.09);
  --shadow-drawer: -8px 0 32px rgba(28, 31, 36, 0.14);

  /* Shell Dimensions & Layers */
  --topbar-h: 56px;
  --subbar-h: 50px;
  --z-sticky: 20;
  --z-topbar: 40;
  --z-backdrop: 70;
  --z-drawer: 80;
  --z-modal: 90;

  /* Transitions */
  --ease-ui: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ==========================================================================
   Font Scale Presets & Classroom Projector Mode
   ========================================================================== */

html[data-font-scale='sm'] {
  --text-base: 14px;
  --text-stem: 14.5px;
  --text-option: 14px;
  --text-reading: 16px;
}

html[data-font-scale='md'] {
  --text-base: 15px;
  --text-stem: 15.5px;
  --text-option: 15px;
  --text-reading: 17.5px;
}

html[data-font-scale='lg'] {
  --text-base: 16.5px;
  --text-stem: 17.5px;
  --text-option: 16.5px;
  --text-reading: 19.5px;
}

html[data-font-scale='xl'] {
  --text-base: 18px;
  --text-stem: 19.5px;
  --text-option: 18px;
  --text-reading: 22px;
}

html[data-mode='classroom'] {
  --bg-canvas: #f3f0e8;
  --border-subtle: #cfc9bc;
  --border-default: #b8b0a0;
  --text-base: 17px;
  --text-stem: 20px;
  --text-option: 18.5px;
  --text-reading: 22.5px;
  --text-h1: 25px;
  --text-h2: 21px;
  --text-h3: 18px;
  --lh-reading: 1.86;
  --measure-reading: 58ch;
  --topbar-h: 60px;
  --subbar-h: 56px;
}

html[data-mode='classroom'][data-font-scale='xl'] {
  --text-stem: 22px;
  --text-option: 20px;
  --text-reading: 24.5px;
}

/* ==========================================================================
   Base Reset & Accessibility
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--ink-primary);
  background: var(--bg-canvas);
  min-height: 100vh;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Subtle custom scrollbars for split panes */
.pane-passage::-webkit-scrollbar,
.pane-questions::-webkit-scrollbar,
.answer-sheet-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.pane-passage::-webkit-scrollbar-thumb,
.pane-questions::-webkit-scrollbar-thumb,
.answer-sheet-body::-webkit-scrollbar-thumb {
  background: rgba(112, 119, 132, 0.28);
  border-radius: var(--radius-pill);
}

.pane-passage::-webkit-scrollbar-thumb:hover,
.pane-questions::-webkit-scrollbar-thumb:hover {
  background: rgba(112, 119, 132, 0.45);
}

/* Classroom visibility helpers */
.classroom-only {
  display: none;
}

html[data-mode='classroom'] .classroom-only {
  display: flex;
}

html[data-mode='classroom'] .classroom-hide {
  display: none !important;
}

/* ==========================================================================
   Buttons, Badges & Shared Controls
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-ui), border-color 140ms var(--ease-ui),
    color 140ms var(--ease-ui), box-shadow 140ms var(--ease-ui);
}

.btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 30px;
  padding: 4px 10px;
  font-size: var(--text-xs);
}

.btn-lg {
  min-height: 42px;
  padding: 8px 18px;
  font-size: var(--text-base);
}

.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-soft {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.btn-soft:hover:not(:disabled) {
  background: #dce8f7;
  border-color: #96b8e3;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-muted);
  border-color: transparent;
  color: var(--ink-primary);
}

.btn-toggle[aria-pressed='true'],
.btn.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--bg-muted);
  color: var(--ink-secondary);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.pill-accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.pill-ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-ink);
}

.pill-err {
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-ink);
}

.pill-flag {
  background: var(--flag-bg);
  border-color: var(--flag-border);
  color: var(--flag-ink);
}

/* ==========================================================================
   App Shell & Top Navigation Bar
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-5);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-primary);
  color: var(--ink-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-muted);
  padding-left: var(--space-2);
  border-left: 1px solid var(--border-subtle);
}

.nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-muted);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.nav-tab {
  min-height: 30px;
  padding: 4px 12px;
  border-radius: calc(var(--radius-sm) - 2px);
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 120ms var(--ease-ui), color 120ms var(--ease-ui);
}

.nav-tab:hover {
  color: var(--ink-primary);
}

.nav-tab[aria-selected='true'],
.nav-tab.is-active {
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-xs);
}

.nav-count {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  color: var(--ink-secondary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.font-scale-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
}

.font-scale-btn {
  min-width: 32px;
  min-height: 32px;
  padding: 0 8px;
  border: none;
  border-right: 1px solid var(--border-subtle);
  background: transparent;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-secondary);
}

.font-scale-btn:last-child {
  border-right: none;
}

.font-scale-btn[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

/* ==========================================================================
   Library View (Paper Browser — 15 Sets across 2024–2026)
   ========================================================================== */

.library-view {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
  flex: 1;
}

.library-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.library-title {
  margin: 0 0 4px;
  font-size: var(--text-h1);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.library-subtitle {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.filter-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  margin-right: 2px;
}

.filter-chip {
  min-height: 30px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: all 120ms var(--ease-ui);
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.filter-chip[aria-pressed='true'],
.filter-chip.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

.filter-select {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-size: var(--text-xs);
  color: var(--ink-primary);
}

.session-group {
  margin-bottom: var(--space-6);
}

.session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.session-title {
  margin: 0;
  font-size: var(--text-h2);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.session-note {
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.paper-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color 150ms var(--ease-ui), box-shadow 150ms var(--ease-ui),
    transform 150ms var(--ease-ui);
}

.paper-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.paper-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.paper-set-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.paper-card-title {
  margin: 4px 0 0;
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.35;
}

.paper-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.paper-progress-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  overflow: hidden;
}

.paper-progress-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: var(--radius-pill);
  transition: width 220ms var(--ease-ui);
}

.section-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.section-chip {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: background-color 120ms var(--ease-ui), border-color 120ms var(--ease-ui),
    color 120ms var(--ease-ui);
}

.section-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.section-chip.is-highlighted {
  background: var(--accent-soft);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

.paper-card-actions {
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* ==========================================================================
   Practice Workspace Shell & Header
   ========================================================================== */

.practice-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.practice-header {
  position: sticky;
  top: var(--topbar-h);
  z-index: var(--z-sticky);
  min-height: var(--subbar-h);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.practice-paper-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.practice-paper-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0;
}

.step-tab {
  min-height: 32px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.step-tab:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.step-tab[aria-current='step'],
.step-tab.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

.step-tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
}

.practice-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.timer-btn {
  border: none;
  background: none;
  padding: 2px 4px;
  font-size: 11px;
  color: var(--accent-primary);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* Classroom Projector Answer Control Bar */
.classroom-bar {
  background: #1d2838;
  color: #f4f6fa;
  padding: var(--space-2) var(--space-5);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-sm);
}

.classroom-bar-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
}

.classroom-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.classroom-bar .btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.classroom-bar .btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.classroom-bar .btn.is-active {
  background: #ffffff;
  border-color: #ffffff;
  color: #1d2838;
}

/* Mobile Pane Switcher (hidden on desktop) */
.mobile-pane-switch {
  display: none;
  padding: var(--space-2) var(--space-4);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  gap: var(--space-2);
}

.mobile-pane-btn {
  flex: 1;
  min-height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-secondary);
}

.mobile-pane-btn[aria-selected='true'] {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

/* ==========================================================================
   Split-Pane Reading Layout (Careful Reading, Long Reading, Banked Cloze)
   ========================================================================== */

.section-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.split-pane {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(360px, 1fr);
  height: calc(100vh - var(--topbar-h) - var(--subbar-h));
  min-height: 520px;
}

html[data-mode='classroom'] .split-pane {
  height: calc(100vh - var(--topbar-h) - var(--subbar-h) - 48px);
}

.pane-passage,
.pane-questions {
  overflow-y: auto;
  padding: var(--space-6);
}

.pane-passage {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
}

.pane-questions {
  background: var(--bg-canvas);
}

.passage-card {
  max-width: var(--measure-reading);
  margin: 0 auto;
}

.section-instructions-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

.section-instructions-title {
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.passage-body {
  font-family: var(--font-reading);
  font-size: var(--text-reading);
  line-height: var(--lh-reading);
  color: var(--ink-primary);
}

.passage-heading {
  font-family: var(--font-reading);
  font-size: calc(var(--text-reading) * 1.22);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 var(--space-4);
}

/* Careful Reading subtle paragraph numbers */
.careful-para {
  position: relative;
  margin: 0 0 var(--space-4);
  padding-left: 28px;
}

.para-num {
  position: absolute;
  left: 0;
  top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  user-select: none;
}

.careful-para.is-linked {
  background: var(--link-bg);
  border-radius: var(--radius-sm);
  padding: 6px 10px 6px 34px;
  margin-left: -6px;
  margin-right: -10px;
  box-shadow: inset 3px 0 0 var(--link-border);
}

/* ==========================================================================
   Long Reading Matching (Section B / Paragraph Badges A-J)
   ========================================================================== */

.para-block {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  margin: 0 calc(var(--space-3) * -1) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background-color 180ms var(--ease-ui), border-color 180ms var(--ease-ui);
}

.para-badge {
  width: 30px;
  height: 30px;
  margin-top: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.para-block.is-linked {
  background: var(--link-bg);
  border-color: var(--link-border);
}

.para-block.is-linked .para-badge {
  background: var(--link-border);
  border-color: var(--link-border);
  color: #ffffff;
}

.para-text {
  font-family: var(--font-reading);
  font-size: var(--text-reading);
  line-height: var(--lh-reading);
  margin: 0;
}

.match-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-3);
}

.match-pill {
  min-width: 36px;
  min-height: 34px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-primary);
}

.match-pill:hover {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.match-pill.is-selected {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

.match-pill.is-correct {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-ink);
}

.match-pill.is-wrong {
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-ink);
}

.jump-para-btn {
  margin-left: auto;
}

/* ==========================================================================
   Banked Cloze (Inline Blank Pills + Sticky A-O Word Bank)
   ========================================================================== */

.cloze-blank {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 78px;
  padding: 1px 10px;
  margin: 0 3px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-subtle);
  font-family: var(--font-sans);
  font-size: calc(var(--text-reading) * 0.84);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-secondary);
  vertical-align: baseline;
  transition: all 140ms var(--ease-ui);
}

.cloze-blank:hover {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.cloze-blank.is-active {
  border-style: solid;
  border-color: var(--accent-primary);
  background: var(--accent-soft);
  color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.14);
}

.cloze-blank.is-filled {
  border-style: solid;
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--ink-primary);
}

.cloze-blank.is-correct {
  border-style: solid;
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.cloze-blank.is-wrong {
  border-style: solid;
  border-color: var(--err-border);
  background: var(--err-bg);
  color: var(--err-ink);
}

.cloze-num {
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--ink-muted);
}

.word-bank {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--space-4);
}

.word-bank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.word-bank-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
}

.word-bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.word-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  text-align: left;
  font-size: var(--text-sm);
  transition: all 120ms var(--ease-ui);
}

.word-chip:hover {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.word-chip-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.word-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-chip.is-used {
  background: var(--bg-muted);
  border-color: var(--border-subtle);
  color: var(--ink-muted);
}

.word-chip.is-selected-for-blank {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

.word-chip.is-selected-for-blank .word-chip-label {
  color: var(--ink-inverse);
}

.word-chip-used-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--ink-secondary);
}

/* ==========================================================================
   Listening Layout (Single Column + Sticky Audio Bar + Collapsed Transcript)
   ========================================================================== */

.listening-layout {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-8);
}

.audio-bar {
  position: sticky;
  top: calc(var(--topbar-h) + var(--subbar-h) + 8px);
  z-index: 15;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.audio-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.audio-play-btn {
  min-width: 88px;
}

.audio-scrubber-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.audio-scrubber {
  flex: 1;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.audio-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  white-space: nowrap;
}

.speed-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}

.speed-btn {
  min-height: 30px;
  padding: 2px 8px;
  border: none;
  border-right: 1px solid var(--border-subtle);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-secondary);
}

.speed-btn:last-child {
  border-right: none;
}

.speed-btn[aria-pressed='true'] {
  background: var(--accent-primary);
  color: var(--ink-inverse);
}

.transcript-drawer {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  overflow: hidden;
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.transcript-drawer[data-open='false'] .transcript-header {
  border-bottom: none;
}

.transcript-body {
  padding: var(--space-4);
  font-family: var(--font-reading);
  font-size: calc(var(--text-reading) * 0.94);
  line-height: 1.75;
  white-space: pre-line;
  color: var(--ink-primary);
}

.transcript-drawer[data-open='false'] .transcript-body {
  display: none;
}

/* ==========================================================================
   Question Cards, Options & Per-Question Answer Reveal
   ========================================================================== */

.questions-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 780px;
  margin: 0 auto;
}

.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-xs);
  transition: border-color 150ms var(--ease-ui), box-shadow 150ms var(--ease-ui);
}

.question-card.is-active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(29, 78, 137, 0.12);
}

.question-card.is-flagged {
  border-left: 3px solid var(--flag-border);
}

.question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.question-stem-wrap {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-primary);
  flex-shrink: 0;
}

.q-stem {
  margin: 0;
  font-size: var(--text-stem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-primary);
}

.question-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.flag-btn {
  min-height: 28px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}

.flag-btn[aria-pressed='true'] {
  background: var(--flag-bg);
  border-color: var(--flag-border);
  color: var(--flag-ink);
  font-weight: 600;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  text-align: left;
  font-size: var(--text-option);
  line-height: 1.48;
  transition: background-color 120ms var(--ease-ui), border-color 120ms var(--ease-ui);
}

.option-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.option-label {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.option-btn.is-selected {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.option-btn.is-selected .option-label {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-inverse);
}

.option-btn.is-correct {
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: var(--ink-primary);
}

.option-btn.is-correct .option-label {
  background: var(--ok-ink);
  border-color: var(--ok-ink);
  color: var(--ink-inverse);
}

.option-btn.is-wrong {
  border-color: var(--err-border);
  background: var(--err-bg);
}

.option-btn.is-wrong .option-label {
  background: var(--err-ink);
  border-color: var(--err-ink);
  color: var(--ink-inverse);
}

.question-footer {
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.answer-panel {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.answer-panel.is-correct-box {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.answer-panel.is-wrong-box {
  background: var(--err-bg);
  border-color: var(--err-border);
}

.answer-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-weight: 700;
  margin-bottom: 4px;
}

/* ==========================================================================
   Translation & Writing Studio (Side-by-Side Prompt + Editor + Reference)
   ========================================================================== */

.subjective-layout {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-8);
}

.subjective-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--space-5);
  align-items: start;
}

.prompt-panel,
.editor-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.prompt-source-text {
  font-size: var(--text-reading);
  line-height: var(--lh-reading);
  color: var(--ink-primary);
  margin: var(--space-3) 0 0;
  white-space: pre-line;
}

.editor-textarea {
  width: 100%;
  min-height: 290px;
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  font-family: var(--font-reading);
  font-size: var(--text-reading);
  line-height: 1.72;
  resize: vertical;
}

.editor-textarea:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.12);
}

.editor-status-bar {
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}

.word-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-primary);
}

.autosave-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ok-ink);
}

.reference-panel {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--ok-ink);
}

.reference-text {
  font-family: var(--font-reading);
  font-size: calc(var(--text-reading) * 0.94);
  line-height: 1.75;
  margin: var(--space-2) 0 0;
  white-space: pre-line;
}

/* ==========================================================================
   Answer Sheet Drawer & Objective Accuracy Summary
   ========================================================================== */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  background: rgba(20, 24, 31, 0.36);
}

.answer-sheet-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  z-index: var(--z-drawer);
  background: var(--bg-surface);
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
}

.answer-sheet-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.answer-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.score-summary-card {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.score-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.score-percent {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-primary);
}

.score-note {
  margin: 6px 0 0;
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}

.sheet-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
}

.legend-dot.is-answered {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.legend-dot.is-flagged {
  background: var(--flag-bg);
  border-color: var(--flag-border);
}

.legend-dot.is-correct {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.legend-dot.is-wrong {
  background: var(--err-bg);
  border-color: var(--err-border);
}

.sheet-section-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-secondary);
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.sheet-cell {
  position: relative;
  min-height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-primary);
}

.sheet-cell:hover {
  border-color: var(--accent-primary);
}

.sheet-cell.is-answered {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.sheet-cell.is-active {
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.sheet-cell.is-flagged::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flag-ink);
}

.sheet-cell.is-correct {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-ink);
}

.sheet-cell.is-wrong {
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-ink);
}

.answer-sheet-footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  display: flex;
  gap: var(--space-2);
}

.answer-sheet-footer .btn {
  flex: 1;
}

/* ==========================================================================
   Mistake Review View
   ========================================================================== */

.mistakes-view {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
  flex: 1;
}

.mistakes-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.mistake-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mistake-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-xs);
}

.mistake-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.mistake-compare {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  font-size: var(--text-sm);
}

.mistake-actions {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.empty-state {
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Sources / Info Modal
   ========================================================================== */

.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-height: 82vh;
  z-index: var(--z-modal);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: var(--space-4) var(--space-5);
  overflow-y: auto;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

/* ==========================================================================
   Responsive Breakpoints (Tablet & Mobile)
   ========================================================================== */

@media (max-width: 1023px) {
  .paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-pane {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1fr);
  }

  .pane-passage,
  .pane-questions {
    padding: var(--space-4);
  }

  .subjective-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767px) {
  .topbar {
    padding: 0 var(--space-3);
    height: auto;
    min-height: var(--topbar-h);
    flex-wrap: wrap;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand-sub {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .library-view,
  .mistakes-view,
  .listening-layout,
  .subjective-layout {
    padding: var(--space-4) var(--space-3) var(--space-7);
  }

  .paper-grid {
    grid-template-columns: 1fr;
  }

  .practice-header {
    top: 0;
    position: static;
    padding: var(--space-2) var(--space-3);
  }

  .mobile-pane-switch {
    display: flex;
  }

  .split-pane {
    display: block;
    height: auto;
    min-height: 0;
  }

  .split-pane[data-mobile-pane='passage'] .pane-questions {
    display: none;
  }

  .split-pane[data-mobile-pane='questions'] .pane-passage {
    display: none;
  }

  .pane-passage,
  .pane-questions {
    overflow: visible;
    border-right: none;
    padding: var(--space-4) var(--space-3);
  }

  .audio-bar {
    position: static;
  }

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

  .answer-sheet-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 82vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .btn {
    min-height: 40px;
  }
}
