/* IELTS Computer-Delivered Mock Exam Simulation CSS */
html, body.mock-exam-body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #f8fafc;
  color: #0f172a;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
}

html[data-theme="dark"] body.mock-exam-body {
  background: #1b1b1d;
  color: #e1e2e5;
}

/* One exam bar, like the computer-delivered IELTS test (and the Reading and Listening test pages) */
.cdi-mock-header {
  position: relative;
  height: 48px;
  min-height: 48px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  box-sizing: border-box;
  z-index: 100;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[data-theme="dark"] .cdi-mock-header { background: #252627; border-bottom-color: #444548; }

.cdi-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 0; }
.cdi-brand-mark { width: 24px; height: 24px; border-radius: 4px; flex-shrink: 0; }
.cdi-exam-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cdi-exam-meta strong { font-size: 13.5px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mockSectionLabel { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="dark"] .cdi-exam-meta strong { color: #e1e2e5; }
html[data-theme="dark"] #mockSectionLabel { color: #94a3b8; }

.cdi-stages-bar { display: none; }

.cdi-timer-box {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .cdi-timer-box { color: #e1e2e5; }
.cdi-timer-box.warning { color: #dc2626; }

.cdi-header-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 0; }
.cdi-volume { display: inline-flex; align-items: center; gap: 6px; color: #475569; margin-right: 6px; }
.cdi-volume[hidden] { display: none; }
.cdi-volume input { width: 90px; accent-color: #1e293b; }
html[data-theme="dark"] .cdi-volume { color: #d4d5d8; }
html[data-theme="dark"] .cdi-volume input { accent-color: #e1e2e5; }
.cdi-hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.cdi-hdr-btn[hidden] { display: none; }
.cdi-hdr-btn:hover { background: #f3f4f6; }
html[data-theme="dark"] .cdi-hdr-btn { background: #313234; border-color: #444548; color: #e1e2e5; }
.cdi-finish-stage-btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #111827;
  border-radius: 4px;
  background: #111827;
  color: #ffffff;
  font: 600 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.cdi-finish-stage-btn:hover { background: #1f2937; }
html[data-theme="dark"] .cdi-finish-stage-btn { background: #e1e2e5; border-color: #e1e2e5; color: #252627; }

/* Viewport */
.cdi-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.cdi-loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}
.cdi-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #1e293b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* A section page sits in a frame whose own top bar is moved out of view (this bar replaces it). The frame stays
   hidden until the page is ready, so its first paint is never seen. */
.cdi-stage-frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
  visibility: hidden;
}
.cdi-stage-frame.is-ready { visibility: visible; }
.cdi-frame-loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cdi-frame-loader .cdi-spinner { margin: 0; }

/* Writing, laid out like the computer-delivered test */
.cdi-writing-exam { display: flex; flex-direction: column; height: 100%; background: #ffffff; }
.cdi-part-banner {
  flex-shrink: 0;
  padding: 10px 24px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cdi-part-banner strong { display: block; font-size: 14px; color: #1e293b; }
.cdi-part-banner span { font-size: 13px; color: #475569; }
.cdi-writing-split { flex: 1; min-height: 0; display: flex; }
.cdi-writing-prompt {
  width: 50%;
  overflow-y: auto;
  padding: 24px 28px 40px;
  box-sizing: border-box;
  border-right: 1px solid #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cdi-writing-prompt[hidden] { display: none; }
.cdi-writing-prompt h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #1e293b; }
.cdi-task-prompt {
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
  white-space: pre-line;
  border: 1px solid #1e293b;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.cdi-task-time { margin: 0 0 14px; font-size: 15px; color: #1e293b; }
.cdi-writing-answer { width: 50%; display: flex; flex-direction: column; padding: 24px 28px 16px; box-sizing: border-box; }
.cdi-writing-textarea {
  flex: 1;
  width: 100%;
  resize: none;
  border: 1px solid #9ca3af;
  border-radius: 2px;
  padding: 14px 16px;
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  background: #ffffff;
  box-sizing: border-box;
  outline: none;
}
.cdi-writing-textarea:focus { border-color: #1e293b; }
.cdi-word-count { margin-top: 8px; text-align: right; font-size: 13px; color: #475569; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.cdi-part-dock {
  flex-shrink: 0;
  display: flex;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cdi-dock-part {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  height: 48px;
  border: 0;
  border-top: 3px solid transparent;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}
.cdi-dock-part span { font-weight: 400; color: #64748b; }
.cdi-dock-part.active { border-top-color: #1e293b; color: #111827; }
html[data-theme="dark"] .cdi-writing-exam, html[data-theme="dark"] .cdi-part-dock { background: #252627; }
html[data-theme="dark"] .cdi-part-banner { background: #313234; border-color: #444548; }
html[data-theme="dark"] .cdi-part-banner strong, html[data-theme="dark"] .cdi-writing-prompt h3, html[data-theme="dark"] .cdi-task-prompt, html[data-theme="dark"] .cdi-task-time { color: #e1e2e5; }
html[data-theme="dark"] .cdi-part-banner span, html[data-theme="dark"] .cdi-word-count, html[data-theme="dark"] .cdi-dock-part { color: #94a3b8; }
html[data-theme="dark"] .cdi-task-prompt { border-color: #64748b; }
html[data-theme="dark"] .cdi-writing-prompt, html[data-theme="dark"] .cdi-part-dock { border-color: #444548; }
html[data-theme="dark"] .cdi-writing-textarea { background: #202021; border-color: #535558; color: #e1e2e5; }
html[data-theme="dark"] .cdi-dock-part.active { border-top-color: #e1e2e5; color: #e1e2e5; }

/* Between sections */
.cdi-intermission-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cdi-intermission-card {
  background: #ffffff;
  border-radius: 8px;
  max-width: 440px;
  width: 100%;
  padding: 28px 28px 24px;
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}
html[data-theme="dark"] .cdi-intermission-card { background: #252627; border: 1px solid #444548; }
.intermission-eyebrow { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.cdi-intermission-card h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: #0f172a; }
html[data-theme="dark"] .cdi-intermission-card h2 { color: #e1e2e5; }
.cdi-intermission-card p { font-size: 14.5px; line-height: 1.55; color: #475569; margin: 0 0 20px; }
html[data-theme="dark"] .cdi-intermission-card p { color: #94a3b8; }
.intermission-stats-box[hidden] { display: none; }

/* Results Screen */
.cdi-results-wrapper {
  height: 100%;
  overflow-y: auto;
  padding: 40px 24px;
  box-sizing: border-box;
}
.cdi-results-card {
  max-width: 800px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 12px 36px rgba(12, 28, 56, 0.06);
}
html[data-theme="dark"] .cdi-results-card {
  background: #232325;
  border-color: #343537;
}

.cdi-certificate-header {
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 28px;
  margin-bottom: 32px;
}
html[data-theme="dark"] .cdi-certificate-header {
  border-bottom-color: #343537;
}
.cdi-cert-brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #1468f3;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cdi-cert-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px;
}

.cdi-overall-band-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: linear-gradient(135deg, #0b1728, #11223b, #0d3880);
  border-radius: 18px;
  padding: 28px;
  color: #ffffff;
  margin-bottom: 32px;
}
.cdi-band-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #1468f3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(20, 104, 243, 0.4);
  flex-shrink: 0;
}
.cdi-band-circle small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.85;
}
.cdi-band-circle strong {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.cdi-skills-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.cdi-skill-score-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}
html[data-theme="dark"] .cdi-skill-score-card {
  background: #1e1e1f;
  border-color: #2c2d2f;
}
.cdi-skill-score-card .skill-name {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cdi-skill-score-card .skill-band {
  font-size: 24px;
  font-weight: 900;
  color: #1468f3;
  margin-bottom: 4px;
}
.cdi-skill-score-card .skill-band.is-pending {
  font-size: 17px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.6;
}
.cdi-skill-score-card .skill-detail {
  font-size: 11.5px;
  color: #94a3b8;
}

/* ==========================================================================
   CDI EXAM MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS (< 820px)
   ========================================================================== */
/* Narrow screens: the timer moves next to the buttons and the title shortens. */
@media (max-width: 760px) {
  .cdi-mock-header { padding: 0 10px; gap: 8px; }
  .cdi-timer-box { position: static; transform: none; font-size: 13px; }
  .cdi-header-right { flex: 0 0 auto; gap: 6px; }
  .cdi-volume input { width: 64px; }
  .cdi-brand-mark { display: none; }
  .cdi-writing-split { flex-direction: column; overflow-y: auto; }
  .cdi-writing-prompt, .cdi-writing-answer { width: 100%; border-right: 0; flex-shrink: 0; overflow: visible; }
  .cdi-writing-prompt { border-bottom: 1px solid #e2e8f0; padding: 18px 16px; }
  .cdi-writing-answer { min-height: 60vh; padding: 16px; }
  .cdi-dock-part { padding: 0 16px; }
}
@media (max-width: 600px) {
  /* Phones: the device buttons set the volume; text size is in the phone's own settings. */
  .cdi-volume, .cdi-hdr-btn#cdiSettingsBtn { display: none !important; }
  .cdi-header-left { min-width: 64px; }
  #mockSectionLabel { display: none; }
  .cdi-finish-stage-btn { padding: 0 10px; font-size: 12.5px; }
  .cdi-timer-box { font-size: 12.5px; }
}
@media (max-width: 820px) {
  .cdi-exam-header {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .cdi-header-brand {
    font-size: 13px;
  }
  .cdi-timer-badge {
    font-size: 13px;
    padding: 4px 10px;
  }
  .cdi-split-body {
    flex-direction: column !important;
    height: auto !important;
    overflow-y: visible !important;
  }
  .cdi-pane-passage,
  .cdi-pane-questions {
    width: 100% !important;
    max-height: 48vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px;
  }
  .cdi-pane-passage {
    border-right: none;
    border-bottom: 2px solid #e2e8f0;
  }
  html[data-theme="dark"] .cdi-pane-passage {
    border-bottom-color: #343537;
  }
  .cdi-footer-palette {
    padding: 8px 10px;
    flex-direction: column;
    gap: 8px;
  }
  .cdi-palette-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    width: 100%;
    justify-content: flex-start;
  }
  .cdi-palette-btn {
    min-width: 36px;
    height: 36px;
    font-size: 12.5px;
    flex-shrink: 0;
  }
  .cdi-nav-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .cdi-nav-btn {
    flex: 1;
    justify-content: center;
  }
  .cdi-skills-breakdown-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cdi-overall-band-box {
    flex-direction: column;
    text-align: center;
    padding: 18px;
    gap: 14px;
  }
}


/* Start, sign-in and error screens */
.cdi-intro { gap: 4px; max-width: 640px; margin: 0 auto; }
.cdi-intro h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: #10233f; }
.cdi-intro > p { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: #5b6b80; }
.cdi-intro-icon { font-size: 40px !important; color: #245bc7; margin-bottom: 10px; }
.cdi-intro-list { list-style: none; counter-reset: step; margin: 6px 0 16px; padding: 0; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.cdi-intro-list li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.cdi-intro-list li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #edf3fc; color: #245bc7; font-weight: 700; }
.cdi-intro-list strong { font-size: 15px; color: #10233f; }
.cdi-intro-list span { font-size: 14px; line-height: 1.5; color: #5b6b80; }
.cdi-intro-note { font-size: 13.5px !important; }
.cdi-intro-start { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 0; border-radius: 12px; background: #245bc7; color: #fff; font: 600 15px 'DM Sans', sans-serif; text-decoration: none; cursor: pointer; }
.cdi-intro-start:hover { background: #2446a9; }
.cdi-intro-link { margin-top: 10px; color: #245bc7; font-weight: 600; font-size: 14px; text-decoration: none; }
html[data-theme="dark"] .cdi-intro h2, html[data-theme="dark"] .cdi-intro-list strong { color: #e1e2e5; }
html[data-theme="dark"] .cdi-intro > p, html[data-theme="dark"] .cdi-intro-list span { color: #94a3b8; }
html[data-theme="dark"] .cdi-intro-list li { background: #232325; border-color: #343537; }
html[data-theme="dark"] .cdi-intro-list li::before { background: #313234; color: #9aaed6; }

/* Writing Task 1 chart */
.cdi-task-figure { margin: 0 0 20px; padding: 0; background: #fff; }
.cdi-task-figure img { display: block; width: 100%; height: auto; }
html[data-theme="dark"] .cdi-task-figure { border-color: #2c2d2f; }

/* Results: Writing feedback */
.mx-writing { margin-top: 26px; text-align: left; }
.mx-writing h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #10233f; }
.mx-writing-note { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: #5b6b80; }
.mx-writing-error { margin: 10px 0 0; font-size: 14px; color: #b42318; }
.mx-task { border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.mx-task-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.mx-task-head strong { font-size: 16px; color: #10233f; }
.mx-task-head span { font-size: 14px; font-weight: 600; color: #245bc7; }
.mx-task-summary { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: #334155; }
.mx-criterion { padding: 10px 0; border-top: 1px solid #eef2f6; }
.mx-criterion-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #10233f; }
.mx-criterion-head strong { font-weight: 700; }
.mx-criterion p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: #5b6b80; }
html[data-theme="dark"] .mx-writing h3, html[data-theme="dark"] .mx-task-head strong, html[data-theme="dark"] .mx-criterion-head { color: #e1e2e5; }
html[data-theme="dark"] .mx-task { background: #232325; border-color: #343537; }
html[data-theme="dark"] .mx-criterion { border-top-color: #343537; }
html[data-theme="dark"] .mx-task-summary { color: #d4d5d8; }
html[data-theme="dark"] .mx-writing-note, html[data-theme="dark"] .mx-criterion p { color: #94a3b8; }
html[data-theme="dark"] .mx-task-head span { color: #9aaed6; }
.mx-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.mx-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 1px solid #d5deea; border-radius: 12px; background: #fff; color: #10233f; font: 600 15px 'DM Sans', sans-serif; text-decoration: none; }
.mx-action:hover { border-color: #b3c3d9; background: #f6f9fc; }
.mx-action.is-primary { border-color: #245bc7; background: #245bc7; color: #fff; }
.mx-action.is-primary:hover { border-color: #2446a9; background: #2446a9; }
html[data-theme="dark"] .mx-action:not(.is-primary) { background: #232325; border-color: #343537; color: #e1e2e5; }
.mx-action:disabled, .cdi-intro-start:disabled { opacity: .6; cursor: default; }
.mx-list { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: #5b6b80; }
@media (min-width: 821px) and (max-width: 1100px) { .cdi-skills-breakdown-grid { grid-template-columns: repeat(2, 1fr); } }

/* Speaking section */
.mx-speak { width: 100%; max-width: 720px; margin: 0 auto; padding: 48px 20px 64px; box-sizing: border-box; }
.mx-speak-meta { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #245bc7; margin-bottom: 14px; }
.mx-speak-q { margin: 0 0 14px; font-size: 26px; line-height: 1.35; font-weight: 700; color: #10233f; }
.mx-cue { border: 1px solid #d5deea; border-radius: 14px; padding: 22px 24px; background: #fff; margin-bottom: 14px; }
.mx-cue .mx-speak-q { font-size: 22px; }
.mx-cue-lead { margin: 0 0 6px; font-size: 15px; color: #334155; }
.mx-cue ul { margin: 0; padding-left: 20px; font-size: 15.5px; line-height: 1.7; color: #10233f; }
.mx-speak-help { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: #5b6b80; }
.mx-notes { width: 100%; min-height: 96px; box-sizing: border-box; padding: 12px 14px; border: 1px solid #d5deea; border-radius: 12px; background: #fbfcfe; font: 14.5px/1.55 'DM Sans', sans-serif; color: #10233f; resize: vertical; margin-bottom: 10px; }
.mx-notes:focus { outline: none; border-color: #245bc7; }
.mx-speak-replay { display: inline-block; margin: 0 0 22px; padding: 0; border: 0; background: none; color: #245bc7; font: 600 14px 'DM Sans', sans-serif; cursor: pointer; }
.mx-speak-replay[hidden] { display: none; }
.mx-speak-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mx-speak-controls .cdi-intro-start[hidden] { display: none; }
.mx-rec { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #b42318; }
.mx-rec[hidden] { display: none; }
.mx-rec i { width: 10px; height: 10px; border-radius: 50%; background: #d92d20; animation: mxPulse 1.2s ease-in-out infinite; }
@keyframes mxPulse { 50% { opacity: .3; } }
.mx-speak-status { margin: 14px 0 0; font-size: 14px; color: #5b6b80; }
.mx-speak-status.is-error { color: #b42318; }
.mx-speak-heard { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #f3f6fa; }
.mx-speak-heard span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; margin-bottom: 6px; }
.mx-speak-heard p { margin: 0; font-size: 15px; line-height: 1.6; color: #10233f; }
.mx-speak-next { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.mx-speak-next .mx-action { cursor: pointer; }
.mx-speak-next .mx-action[hidden], .mx-speak-heard[hidden], .mx-speak-next[hidden] { display: none; }
html[data-theme="dark"] .mx-speak-q, html[data-theme="dark"] .mx-cue ul, html[data-theme="dark"] .mx-speak-heard p, html[data-theme="dark"] .mx-notes { color: #e1e2e5; }
html[data-theme="dark"] .mx-cue { background: #232325; border-color: #343537; }
html[data-theme="dark"] .mx-cue-lead, html[data-theme="dark"] .mx-speak-help, html[data-theme="dark"] .mx-speak-status, html[data-theme="dark"] .mx-list { color: #94a3b8; }
html[data-theme="dark"] .mx-notes { background: #232325; border-color: #343537; }
html[data-theme="dark"] .mx-speak-heard { background: #292a2c; }
html[data-theme="dark"] .mx-speak-meta, html[data-theme="dark"] .mx-speak-replay { color: #9aaed6; }
@media (max-width: 600px) { .mx-speak { padding: 28px 16px 48px; } .mx-speak-q { font-size: 21px; } }

/* Calm dark mode: the main action is a quiet blue. */
html[data-theme="dark"] .cdi-intro-start,
html[data-theme="dark"] .mx-action.is-primary { background: #3d5d9e; border-color: #3d5d9e; color: #eef0f4; box-shadow: none; }
html[data-theme="dark"] .cdi-intro-start:hover,
html[data-theme="dark"] .mx-action.is-primary:hover { background: #4768a8; border-color: #4768a8; }