/* ============================================================
   English Brief — Shared Module Enhancement Layer
   New interactive components on top of module-player.css
   ============================================================ */

/* ── SCROLL FADE-IN ANIMATIONS ──────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1),
              transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.fade-up.visible { opacity: 1; transform: none; }
.fade-up:nth-child(2) { transition-delay: 0.07s; }
.fade-up:nth-child(3) { transition-delay: 0.14s; }
.fade-up:nth-child(4) { transition-delay: 0.21s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── LESSON HEADER IMPROVEMENTS ─────────────────────────── */
.ls-header {
  border-bottom: 1px solid rgba(37,99,235,.08);
  padding-bottom: 18px;
  margin-bottom: 24px;
}
.ls-eyebrow { margin-bottom: 0; }
.ls-h2 {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--fg) 0%, var(--cobalt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ls-sub { margin-top: 8px; }
.ls-meta-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; flex-wrap: wrap;
}
.ls-outcome {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700;
  color: #92400E;
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.22);
  border-radius: 9999px; padding: 4px 12px;
}

/* ── IMPROVED H3 IN LESSON BODY ──────────────────────────── */
.lesson-body h3 {
  position: relative;
  padding-left: 14px;
  border-bottom: none !important;
}
.lesson-body h3::before {
  content: '';
  position: absolute; left: 0; top: 4px;
  width: 3px; height: calc(100% - 8px);
  background: linear-gradient(180deg, #38BDF8, #2563EB);
  border-radius: 2px;
}

/* ── IMPROVED PED BLOCKS ─────────────────────────────────── */
.ped {
  transition: box-shadow .22s, transform .22s;
  position: relative;
  overflow: hidden;
}
.ped::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 60px; height: 60px;
  border-radius: 50%;
  opacity: .06;
  pointer-events: none;
}
.ped-example::after { background: var(--blue); }
.ped-warning::after { background: var(--amber); }
.ped-tip::after { background: #16A34A; }
.ped:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(37,99,235,.10) !important;
}

/* ── IMPROVED COMPARE BLOCKS ─────────────────────────────── */
.compare {
  transition: box-shadow .22s;
}
.compare:hover {
  box-shadow: 0 8px 28px rgba(37,99,235,.10) !important;
}
.compare .bad, .compare .good {
  transition: background .25s;
}
/* FIX: hide .good by default in compare-reveal, show only after revealed */
.compare-reveal:not(.revealed) .good {
  display: none !important;
}
.compare-reveal.revealed .good {
  display: block !important;
}
.compare-reveal-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 7px; width: 100%;
  padding: 11px; font-size: 13px; font-weight: 700;
  background: rgba(22,163,74,.10); color: #15803D;
  border: 1.5px solid rgba(22,163,74,.25); border-top: none;
  cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s;
  border-radius: 0 0 16px 16px;
}
.compare-reveal-btn:hover { background: rgba(22,163,74,.16); }
.compare-reveal.revealed .compare-reveal-btn { display: none; }

/* ── VOCAB CARD REDESIGN ─────────────────────────────────── */
.vocab-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 0 16px; flex-wrap: wrap; gap: 10px;
}
.vocab-section-title {
  font-size: 16px; font-weight: 800;
  color: var(--fg); letter-spacing: -.02em;
}
.mode-toggle {
  display: flex; align-items: center;
  background: rgba(37,99,235,.06);
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 9999px; padding: 3px; gap: 2px;
}
.mode-btn {
  padding: 6px 14px; border-radius: 9999px;
  font-size: 12px; font-weight: 700;
  border: none; cursor: pointer; font-family: inherit;
  transition: all .2s; color: var(--fg-muted);
  background: transparent;
}
.mode-btn.active {
  background: #fff;
  color: var(--cobalt);
  box-shadow: 0 2px 8px rgba(37,99,235,.12);
}

/* ── IMPROVED VOCAB CARD (Reading Mode) ──────────────────── */
.vocab-card {
  border: 1px solid rgba(37,99,235,.10);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,.06);
  transition: box-shadow .22s, transform .22s;
}
.vocab-card:hover {
  box-shadow: 0 10px 32px rgba(37,99,235,.12);
  transform: translateY(-2px);
}
.vocab-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(37,99,235,.06) 0%, rgba(99,102,241,.05) 100%);
  border-bottom: 1px solid rgba(37,99,235,.07);
}
.vocab-word {
  font-size: 22px; font-weight: 800;
  color: var(--cobalt); letter-spacing: -.03em;
  flex: 1;
}
.vocab-ipa {
  font-size: 12.5px; color: var(--fg-muted);
  font-style: italic; flex-shrink: 0;
}
.audio-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(37,99,235,.18);
  background: rgba(37,99,235,.07);
  color: var(--cobalt); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  transition: all .18s; font-family: inherit;
}
.audio-btn:hover {
  background: var(--blue); color: #fff;
  border-color: var(--blue);
  transform: scale(1.08);
}
.audio-btn.playing {
  background: var(--blue); color: #fff;
  border-color: var(--blue);
  animation: audioPulse 0.6s ease-in-out infinite alternate;
}
@keyframes audioPulse {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

.vocab-body { padding: 18px 20px; }
.vocab-section { margin-bottom: 14px; }
.vocab-section-label {
  font-size: 10px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--fg-muted);
  margin-bottom: 5px;
}
.vocab-section p { font-size: 14px; line-height: 1.68; color: var(--fg-body); margin: 0; }
.vocab-warn {
  background: rgba(245,158,11,.07);
  border: 1px solid rgba(245,158,11,.18);
  border-left: 3px solid #F59E0B;
  border-radius: 12px; padding: 11px 14px;
  margin-bottom: 14px;
}
.vocab-warn .vocab-section-label { color: #92400E; }
.vocab-warn p { font-size: 13px; }
.vocab-examples {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 8px;
}
.vocab-ex {
  background: rgba(37,99,235,.04);
  border: 1px solid rgba(37,99,235,.09);
  border-radius: 10px; padding: 10px 12px;
}
.ex-env {
  font-size: 10px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--cobalt);
  margin-bottom: 4px;
}
.ex-text { font-size: 13px; color: var(--fg-body); line-height: 1.55; font-style: italic; }
blockquote.vocab-senior {
  background: linear-gradient(135deg, rgba(99,102,241,.06), rgba(37,99,235,.04)) !important;
  border-left-color: var(--indigo) !important;
  color: #4338CA !important; font-size: 13px !important;
}

/* ── FLASHCARD MODE ───────────────────────────────────────── */
.flashcard-deck { display: none; flex-direction: column; gap: 16px; }
.flashcard-deck.active { display: flex; }
.reading-deck.inactive { display: none; }

.flashcard {
  perspective: 1000px;
  cursor: pointer;
  min-height: 200px;
  -webkit-tap-highlight-color: transparent;
}
.flashcard-inner {
  position: relative; width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1);
  min-height: 200px;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }

.fc-front, .fc-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; gap: 10px;
  min-height: 200px;
}
.fc-front {
  background: #fff;
  border: 1px solid rgba(37,99,235,.12);
  box-shadow: 0 6px 24px rgba(37,99,235,.08);
}
.fc-back {
  background: linear-gradient(135deg, #1D4ED8, #6366F1);
  transform: rotateY(180deg);
  color: #fff;
}
.fc-word {
  font-size: 32px; font-weight: 800;
  color: var(--cobalt); letter-spacing: -.04em;
  text-align: center;
}
.fc-ipa {
  font-size: 14px; color: var(--fg-muted); font-style: italic;
}
.fc-hint {
  font-size: 11px; font-weight: 700; color: rgba(37,99,235,.5);
  letter-spacing: .04em; text-transform: uppercase;
  margin-top: auto;
}
.fc-audio-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
}
.fc-audio-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(37,99,235,.10); border: 1.5px solid rgba(37,99,235,.20);
  color: var(--cobalt); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all .18s;
}
.fc-audio-btn:hover { background: var(--blue); color: #fff; }

.fc-def {
  font-size: 15px; font-weight: 600; line-height: 1.6;
  color: rgba(255,255,255,.96); text-align: center;
}
.fc-ex {
  font-size: 13px; line-height: 1.6; font-style: italic;
  color: rgba(255,255,255,.80); text-align: center;
  background: rgba(255,255,255,.12); border-radius: 10px;
  padding: 10px 14px; margin-top: 4px;
}

.fc-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; gap: 8px;
}
.fc-knew { 
  flex: 1; padding: 10px; border-radius: 12px;
  background: rgba(22,163,74,.14); border: 1.5px solid rgba(22,163,74,.28);
  color: #15803D; font-weight: 800; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: all .18s;
}
.fc-knew:hover { background: rgba(22,163,74,.22); }
.fc-review {
  flex: 1; padding: 10px; border-radius: 12px;
  background: rgba(245,158,11,.10); border: 1.5px solid rgba(245,158,11,.22);
  color: #92400E; font-weight: 800; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: all .18s;
}
.fc-review:hover { background: rgba(245,158,11,.18); }

.fc-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 4px;
}
.fc-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(37,99,235,.16);
  background: #fff; color: var(--cobalt);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.fc-nav-btn:hover { background: rgba(37,99,235,.08); }
.fc-nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.fc-counter {
  font-size: 13px; font-weight: 700; color: var(--fg-muted);
  min-width: 60px; text-align: center;
}

/* Flashcard deck progress bar */
.fc-deck-progress {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.fc-deck-bar {
  flex: 1; height: 4px; border-radius: 9999px;
  background: rgba(37,99,235,.10);
}
.fc-deck-fill {
  height: 100%; border-radius: 9999px;
  background: linear-gradient(90deg, #38BDF8, #2563EB);
  transition: width .4s ease;
}
.fc-deck-label {
  font-size: 11px; font-weight: 700; color: var(--fg-muted);
  white-space: nowrap;
}

/* ── KNOWLEDGE CHECK QUIZ ─────────────────────────────────── */
.quiz-section {
  margin-top: 32px;
  border: 1.5px solid rgba(37,99,235,.14);
  border-radius: 22px; overflow: hidden;
}
.quiz-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(37,99,235,.07), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
  cursor: pointer; user-select: none;
  transition: background .18s;
}
.quiz-header:hover { background: rgba(37,99,235,.10); }
.quiz-header-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #38BDF8, #2563EB);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.quiz-header-text { flex: 1; }
.quiz-header-title {
  font-size: 14px; font-weight: 800; color: var(--fg);
}
.quiz-header-sub {
  font-size: 12px; color: var(--fg-muted); margin-top: 1px;
}
.quiz-toggle-icon {
  font-size: 18px; color: var(--fg-muted);
  transition: transform .3s;
}
.quiz-section.open .quiz-toggle-icon { transform: rotate(180deg); }

.quiz-body { 
  display: none; padding: 20px;
  background: rgba(255,255,255,.6);
}
.quiz-section.open .quiz-body { display: block; }

.quiz-q {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(37,99,235,.08);
}
.quiz-q:last-of-type { border-bottom: none; margin-bottom: 0; }
.quiz-q-num {
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cobalt);
  margin-bottom: 6px;
}
.quiz-q-text {
  font-size: 15px; font-weight: 700; color: var(--fg);
  line-height: 1.5; margin-bottom: 12px;
}
.quiz-opts {
  display: flex; flex-direction: column; gap: 8px;
}
.quiz-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  border: 1.5px solid rgba(37,99,235,.12);
  background: rgba(255,255,255,.88);
  cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 600; color: var(--fg-body);
  text-align: left; width: 100%;
  transition: all .18s;
}
.quiz-opt:hover:not(:disabled) {
  border-color: rgba(37,99,235,.32);
  background: rgba(37,99,235,.05);
  transform: translateX(3px);
}
.quiz-opt .opt-letter {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: rgba(37,99,235,.10); color: var(--cobalt);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  transition: all .18s;
}
.quiz-opt.correct {
  border-color: #16A34A !important;
  background: rgba(22,163,74,.08) !important;
  color: #15803D !important;
}
.quiz-opt.correct .opt-letter {
  background: #16A34A; color: #fff;
}
.quiz-opt.wrong {
  border-color: #BE123C !important;
  background: rgba(190,18,60,.06) !important;
  color: #9F1239 !important;
}
.quiz-opt.wrong .opt-letter {
  background: #BE123C; color: #fff;
}
.quiz-opt:disabled { cursor: default; }
.quiz-explanation {
  margin-top: 10px; padding: 10px 14px;
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.2);
  border-radius: 10px; font-size: 13px;
  color: #15803D; line-height: 1.6;
  display: none;
}
.quiz-explanation.show { display: block; animation: fadeIn .3s ease; }
.quiz-explanation.wrong-exp {
  background: rgba(245,158,11,.08) !important;
  border-color: rgba(245,158,11,.2) !important;
  color: #92400E !important;
}

.quiz-result {
  display: none; text-align: center;
  padding: 20px; border-top: 1px solid rgba(37,99,235,.1);
  background: rgba(37,99,235,.04);
}
.quiz-result.show { display: block; animation: fadeIn .4s ease; }
.quiz-score-display {
  font-size: 38px; font-weight: 800;
  color: var(--cobalt); margin-bottom: 6px;
}
.quiz-score-label {
  font-size: 14px; color: var(--fg-muted); margin-bottom: 16px;
}
.quiz-retry-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 9999px;
  border: 1.5px solid rgba(37,99,235,.2);
  background: #fff; color: var(--cobalt);
  font-weight: 700; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all .18s;
}
.quiz-retry-btn:hover { background: rgba(37,99,235,.06); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── FILL-IN-BLANK EXERCISE ──────────────────────────────── */
.fitb-section {
  background: rgba(37,99,235,.04);
  border: 1.5px dashed rgba(37,99,235,.22);
  border-radius: 18px; padding: 20px; margin: 20px 0;
}
.fitb-title {
  font-size: 13px; font-weight: 800; color: var(--cobalt);
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.fitb-item {
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(37,99,235,.08);
}
.fitb-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.fitb-prompt {
  font-size: 14.5px; line-height: 1.8; color: var(--fg-body);
  margin-bottom: 8px;
}
.fitb-input {
  display: inline-block;
  border: none !important;
  border-bottom: 2px solid var(--blue) !important;
  background: transparent !important;
  padding: 0 6px 2px !important;
  font-size: 14.5px !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  color: var(--cobalt) !important;
  outline: none !important;
  min-width: 80px;
  text-align: center;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: border-color .18s;
}
.fitb-input:focus { border-color: var(--indigo) !important; }
.fitb-input.correct {
  border-color: #16A34A !important; color: #15803D !important;
  border-bottom-style: solid !important;
}
.fitb-input.wrong {
  border-color: #BE123C !important; color: #BE123C !important;
}
.fitb-check {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 16px; border-radius: 9999px;
  border: 1.5px solid rgba(37,99,235,.18);
  background: rgba(255,255,255,.88); color: var(--cobalt);
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; margin-top: 4px;
  transition: all .18s;
}
.fitb-check:hover { background: rgba(37,99,235,.08); }
.fitb-feedback {
  font-size: 12.5px; margin-top: 8px; display: none;
  padding: 8px 12px; border-radius: 10px;
  animation: fadeIn .25s ease;
}
.fitb-feedback.show { display: block; }
.fitb-feedback.ok {
  background: rgba(22,163,74,.08); color: #15803D;
  border: 1px solid rgba(22,163,74,.2);
}
.fitb-feedback.fix {
  background: rgba(245,158,11,.08); color: #92400E;
  border: 1px solid rgba(245,158,11,.2);
}

/* ── SIDEBAR ENHANCEMENTS ────────────────────────────────── */
.streak-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(245,158,11,.10), rgba(251,146,60,.08));
  border: 1px solid rgba(245,158,11,.20);
  border-radius: 12px; margin-bottom: 14px;
}
.streak-icon { font-size: 18px; }
.streak-text { font-size: 12px; font-weight: 700; color: #92400E; }
.streak-count { font-size: 16px; font-weight: 800; color: #B45309; margin-left: auto; }

.xp-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px; margin: 10px 0 6px;
}
.xp-label { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.xp-count { font-size: 11px; font-weight: 800; color: var(--cobalt); }
.xp-bar { height: 5px; background: rgba(37,99,235,.10); border-radius: 9999px; overflow: hidden; margin-bottom: 10px; }
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38BDF8, #2563EB, #6366F1);
  border-radius: 9999px;
  transition: width .6s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* ── MOBILE SIDEBAR DRAWER ───────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(6,14,28,.55); z-index: 199;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.open { display: block; animation: fadeOverlay .25s ease; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.m0-side-drawer {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 200;
  width: min(320px, 88vw);
  background: rgba(239,246,255,.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(37,99,235,.12);
  box-shadow: 8px 0 40px rgba(37,99,235,.15);
  overflow-y: auto; padding: 16px;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(0.34, 1.1, 0.64, 1);
  display: none;
}
.m0-side-drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(37,99,235,.15);
  background: rgba(255,255,255,.8);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--fg-muted);
  transition: all .18s;
}
.drawer-close:hover { background: rgba(37,99,235,.08); }

/* Open lesson list button (mobile) */
.mob-ls-open-btn {
  display: none;
  position: fixed; bottom: 100px; right: 16px; z-index: 89;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--cobalt);
  border: none; cursor: pointer;
  box-shadow: 0 6px 22px rgba(37,99,235,.4);
  align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  transition: all .18s;
}
.mob-ls-open-btn:hover { transform: scale(1.08); }
@media (max-width: 979px) {
  .mob-ls-open-btn { display: flex; }
  .m0-side-drawer { display: block; }
}

/* ── LESSON COMPLETE CELEBRATION ─────────────────────────── */
.confetti-wrap {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -10px;
  width: 8px; height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ── KEY TAKEAWAY BOX ─────────────────────────────────────── */
.key-takeaway {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,.07), rgba(37,99,235,.04));
  border: 1px solid rgba(99,102,241,.18);
  border-radius: 18px; padding: 18px 20px;
  margin: 24px 0 8px;
}
.kt-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366F1, #2563EB);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.kt-body { flex: 1; }
.kt-label {
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #4338CA; margin-bottom: 5px;
}
.kt-text { font-size: 14.5px; font-weight: 600; color: var(--fg); line-height: 1.65; }

/* ── READING MODE TOGGLE (top of lesson) ─────────────────── */
.lesson-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin-bottom: 10px;
}
.toolbar-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 9999px;
  border: 1px solid rgba(37,99,235,.14);
  background: rgba(255,255,255,.7);
  font-size: 11.5px; font-weight: 700; color: var(--fg-muted);
  cursor: pointer; font-family: inherit; transition: all .18s;
}
.toolbar-btn:hover { background: rgba(37,99,235,.07); color: var(--cobalt); }
.toolbar-btn.active { background: rgba(37,99,235,.10); color: var(--cobalt); border-color: rgba(37,99,235,.24); }

/* Focus/reading mode overlay */
body.reading-mode .m0-side { opacity: .3; pointer-events: none; transition: opacity .3s; }
body.reading-mode .lesson-card { max-width: 760px; margin: 0 auto; }
body.reading-mode .lesson-body { font-size: 17px !important; }

/* ── VOCAB CARDS → DOCUMENT SECTIONS (no nested boxes) ─── */
/* Each vocab word = a section separated by a divider, not a card */

.vocab-card {
  background: transparent !important;
  border: none !important;
  border-top: 1.5px solid rgba(37,99,235,.09) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 32px 0 12px !important;
  margin-bottom: 0 !important;
  transform: none !important;
}
.vocab-card:hover {
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}
.vocab-card:first-child { border-top: none !important; }

/* Header: word + IPA + audio in a single clean row */
.vocab-header {
  background: transparent !important;
  border-bottom: none !important;
  padding: 0 0 6px !important;
  gap: 8px !important;
  flex-wrap: wrap;
}
.vocab-word {
  font-size: 20px !important;
  color: var(--cobalt) !important;
  font-weight: 800 !important;
}
.vocab-ipa {
  font-size: 13px !important;
  color: var(--fg-muted) !important;
  flex: 1;
}
.audio-btn {
  width: 30px !important;
  height: 30px !important;
  flex-shrink: 0;
}

/* Body — remove padding box feel */
.vocab-body { padding: 0 !important; }

/* Section label + content — inline, no box */
.vocab-section {
  padding: 8px 0 !important;
  margin-bottom: 0 !important;
  border-bottom: none !important;
}
.vocab-section-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  color: var(--fg-muted) !important;
  margin-bottom: 4px !important;
}
.vocab-section p { margin: 0 !important; font-size: 14px !important; line-height: 1.65 !important; }

/* Warn block — accent left border only, no box */
.vocab-warn {
  background: transparent !important;
  border: none !important;
  border-left: 3px solid #F59E0B !important;
  border-radius: 0 !important;
  padding: 6px 0 6px 12px !important;
  margin: 6px 0 8px !important;
}
.vocab-warn .vocab-section-label { color: #B45309 !important; }
.vocab-warn p { font-size: 13px !important; color: var(--fg-body) !important; }

/* Compare blocks — left stripe only, no box */
.vocab-card .compare {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin: 8px 0 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
.vocab-card .compare .bad {
  background: transparent !important;
  border: none !important;
  border-left: 3px solid rgba(190,18,60,.35) !important;
  border-radius: 0 !important;
  padding: 5px 10px !important;
}
.vocab-card .compare .good {
  background: transparent !important;
  border: none !important;
  border-left: 3px solid rgba(22,163,74,.40) !important;
  border-radius: 0 !important;
  padding: 5px 10px !important;
}
.vocab-card .compare .clabel {
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .05em !important;
  margin-bottom: 3px !important;
  opacity: .8;
}
/* Global fix: all pre inside compare blocks wrap properly */
.compare pre {
  font-size: 13.5px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: var(--fg-body);
  line-height: 1.7;
}
/* Ensure .good is fully visible in non-reveal contexts */
.compare:not(.compare-reveal) .good {
  opacity: 1 !important;
  filter: none !important;
  visibility: visible !important;
}
.vocab-card .compare pre {
  font-size: 13.5px !important;
  margin: 0 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  font-family: inherit !important;
  color: var(--fg-body) !important;
}
.vocab-card .compare .why {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 4px 0 0 10px !important;
  font-size: 12px !important;
  color: var(--fg-muted) !important;
  font-style: italic !important;
}
.vocab-card .compare-reveal .good::before { display: none !important; }
.vocab-card .compare-reveal-btn { display: none !important; }

/* Examples — inline with env label */
.vocab-card .vocab-examples {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  margin-top: 6px !important;
}
.vocab-card .vocab-ex {
  background: transparent !important;
  border: none !important;
  border-left: 2px solid rgba(37,99,235,.15) !important;
  border-radius: 0 !important;
  padding: 4px 10px !important;
}
.vocab-card .ex-env {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: var(--cobalt) !important;
  margin-bottom: 2px !important;
  text-transform: uppercase !important;
  letter-spacing: .05em !important;
}
.vocab-card .ex-text { font-size: 13px !important; font-style: italic !important; }

/* Senior blockquote — left border only */
.vocab-card blockquote.vocab-senior,
.vocab-card .vocab-senior {
  background: transparent !important;
  border: none !important;
  border-left: 3px solid rgba(99,102,241,.30) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 6px 0 6px 12px !important;
  margin: 8px 0 4px !important;
  font-size: 12.5px !important;
  color: var(--fg-muted) !important;
  font-style: italic !important;
  font-weight: 500 !important;
}

/* ── EXERCISE BLOCK ──────────────────────────────────────── */
.exercise-block {
  border: 1.5px solid rgba(37,99,235,.14);
  border-radius: 20px;
  overflow: hidden;
  margin: 24px 0;
  background: #fff;
  box-shadow: 0 4px 20px rgba(37,99,235,.07);
}
.exercise-header {
  padding: 13px 20px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
}
.exercise-header h4 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--cobalt) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none !important;
  padding: 0 !important;
}
.exercise-header h4::before { display: none !important; }
.exercise-header h4 span { font-style: normal; }
.exercise-prompt { padding: 18px 20px; }
.exercise-prompt > p {
  font-size: 14px;
  color: var(--fg-body);
  line-height: 1.65;
  margin-bottom: 14px;
}

/* ── BRIEF EXCERPT ───────────────────────────────────────── */
.brief-excerpt {
  background: rgba(248,250,255,.9);
  border: 1px solid rgba(37,99,235,.12);
  border-left: 4px solid var(--cobalt);
  border-radius: 0 12px 12px 0;
  padding: 14px 16px;
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.85;
}
.brief-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(37,99,235,.12);
}
.brief-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 3px 0;
  color: var(--fg-body);
  font-size: 13.5px;
  line-height: 1.7;
  flex-wrap: wrap;
}
.brief-key {
  font-weight: 800;
  color: var(--fg);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── EXERCISE QUESTIONS + ANSWERS ───────────────────────── */
ol.ex-questions {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
ol.ex-questions li {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-body);
  line-height: 1.6;
  padding-left: 4px;
}
details.exercise-sample {
  border-top: 1px solid rgba(37,99,235,.09);
  margin: 0;
}
.exercise-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cobalt);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background .15s;
}
.exercise-summary::-webkit-details-marker { display: none; }
.exercise-summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform .25s;
}
details[open] .exercise-summary::before { transform: rotate(90deg); }
.exercise-summary:hover { background: rgba(37,99,235,.04); }
.exercise-sample-body { padding: 0 20px 18px; }
ol.ex-answers {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
ol.ex-answers li {
  font-size: 13.5px;
  color: #15803D;
  font-weight: 600;
  line-height: 1.6;
  padding-left: 4px;
}
blockquote.exercise-takeaway {
  margin: 0 !important;
  padding: 14px 20px !important;
  border-top: 1px solid rgba(37,99,235,.09) !important;
  border-left: 3px solid rgba(99,102,241,.30) !important;
  background: rgba(99,102,241,.03) !important;
  font-size: 13px !important;
  font-style: italic !important;
  color: var(--fg-muted) !important;
  line-height: 1.75 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ── QUIZ BLOCK (Module 1–14 native quiz system) ─────────── */
.quiz-block {
  border: 1.5px solid rgba(37,99,235,.13);
  border-radius: 20px;
  overflow: hidden;
  margin: 24px 0;
  background: #fff;
  box-shadow: 0 4px 18px rgba(37,99,235,.07);
}
.quiz-block .quiz-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 13px 20px !important;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05)) !important;
  border-bottom: 1px solid rgba(37,99,235,.10) !important;
  cursor: default !important;
}
.quiz-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--cobalt) !important;
}
.quiz-reveal-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1.5px solid rgba(37,99,235,.20);
  background: rgba(255,255,255,.88);
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}
.quiz-reveal-btn:hover { background: rgba(37,99,235,.08); }
.quiz-block .quiz-body {
  display: block !important;
  padding: 18px 20px !important;
}
.quiz-block .quiz-q {
  padding: 14px 0;
  border-bottom: 1px solid rgba(37,99,235,.08);
}
.quiz-block .quiz-q:last-child { border-bottom: none; padding-bottom: 0; }
.quiz-qnum {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 5px;
}
.quiz-qtext {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.5;
  margin-bottom: 12px;
}
.quiz-opts {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}
.quiz-opt {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  border-radius: 11px !important;
  border: 1.5px solid rgba(37,99,235,.11) !important;
  background: rgba(248,250,255,.7) !important;
  cursor: pointer;
  transition: all .18s;
  font-size: 14px;
  color: var(--fg-body);
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.quiz-opt:hover:not(.quiz-correct):not(.quiz-wrong) {
  border-color: rgba(37,99,235,.28) !important;
  background: rgba(37,99,235,.05) !important;
  transform: translateX(3px);
}
.quiz-letter {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(37,99,235,.10);
  color: var(--cobalt);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .18s;
}
.quiz-text { flex: 1; line-height: 1.5; }
/* selected state — shows immediately when user clicks an option */
.quiz-opt.quiz-selected {
  border-color: rgba(37,99,235,.45) !important;
  background: rgba(37,99,235,.09) !important;
  color: var(--cobalt) !important;
  transform: translateX(3px);
}
.quiz-opt.quiz-selected .quiz-letter {
  background: rgba(37,99,235,.18) !important;
  color: var(--cobalt) !important;
}
/* quiz-correct only styled after "Xem đáp án" is clicked (adds .revealed to parent) */
.quiz-block.revealed .quiz-correct {
  border-color: #16A34A !important;
  background: rgba(22,163,74,.08) !important;
  color: #15803D !important;
}
.quiz-block.revealed .quiz-correct .quiz-letter { background: #16A34A !important; color: #fff !important; }
.quiz-wrong {
  border-color: #BE123C !important;
  background: rgba(190,18,60,.06) !important;
  color: #9F1239 !important;
}
.quiz-wrong .quiz-letter { background: #BE123C !important; color: #fff !important; }

/* ── EMAIL BLOCK (Modules 2, 3, 6, 10, 11, 14) ──────────── */
.email-block {
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 16px;
  overflow: hidden;
  margin: 16px 0;
  background: #fff;
  box-shadow: 0 4px 18px rgba(37,99,235,.07);
  font-size: 14px;
}
.email-block-header {
  padding: 9px 16px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cobalt);
  display: flex;
  align-items: center;
  gap: 7px;
}
.email-block-body {
  padding: 16px 20px;
  line-height: 1.85;
  color: var(--fg-body);
  font-size: 13.5px;
}
.email-block-body p { margin-bottom: 10px; }
.email-block-body p:last-child { margin-bottom: 0; }
.email-subject {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  background: rgba(37,99,235,.05);
  border-left: 3px solid rgba(37,99,235,.30);
  padding: 7px 12px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
}
.email-note {
  display: inline;
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.22);
  color: #92400E;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  margin-left: 5px;
  vertical-align: middle;
  white-space: nowrap;
}
.email-highlight {
  background: rgba(99,102,241,.08);
  border-bottom: 2px solid rgba(99,102,241,.35);
  border-radius: 2px;
  padding: 0 2px;
  color: var(--cobalt);
  font-weight: 600;
}

/* ── INTERVIEW BLOCK (Module 7) ──────────────────────────── */
.iv-block {
  border: 1px solid rgba(109,40,217,.14);
  border-radius: 16px;
  overflow: hidden;
  margin: 16px 0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,.07);
  font-size: 14px;
}
.iv-block-header {
  padding: 9px 16px;
  background: linear-gradient(135deg, rgba(109,40,217,.07), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(109,40,217,.10);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7C3AED;
  display: flex;
  align-items: center;
  gap: 7px;
}
.iv-block-body {
  padding: 16px 20px;
  line-height: 1.85;
  color: var(--fg-body);
  font-size: 13.5px;
}
.iv-block-body p { margin-bottom: 10px; }
.iv-block-body p:last-child { margin-bottom: 0; }
.iv-block-body em { color: var(--fg-body); font-style: italic; }

/* ── STAR METHOD TABLE (Module 7) ───────────────────────── */
.star-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 16px 0;
  border: 1px solid rgba(109,40,217,.14);
  border-radius: 16px;
  overflow: hidden;
}
.star-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  padding: 14px 18px !important;
  background: #fff;
  border-bottom: 1px solid rgba(109,40,217,.08);
  transition: background .15s;
}
.star-row:last-child { border-bottom: none; }
.star-row:hover { background: rgba(109,40,217,.03); }
.star-letter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7C3AED, #6366F1);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  letter-spacing: 0;
}
.star-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-body);
}
.star-content strong {
  display: block;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 3px;
}
.star-content p { margin: 0; }

/* ── RECAP SECTION (Modules 4, 6, 7, 8, 9) ─────────────── */
.recap-section {
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 18px;
  overflow: hidden;
  margin: 20px 0;
  background: rgba(255,255,255,.7);
}
.recap-header {
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
  font-size: 13px;
  font-weight: 800;
  color: var(--cobalt);
  display: flex;
  align-items: center;
  gap: 8px;
}
.recap-body {
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--fg-body);
}
.recap-body p { margin-bottom: 10px; }
.recap-body p:last-child { margin-bottom: 0; }

/* ── SH-BLOCK (Module 8 inline CSS → globalised) ─────────── */
/* Note: module-8 has its own inline CSS — this is for other modules */
.sh-block {
  border-radius: 16px;
  border: 1px solid rgba(37,99,235,.14);
  background: rgba(255,255,255,.88);
  margin: 16px 0;
  overflow: hidden;
  font-size: 13.5px;
}
.sh-block-header {
  padding: 10px 16px;
  background: rgba(37,99,235,.06);
  border-bottom: 1px solid rgba(37,99,235,.10);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cobalt);
}
.sh-block-body {
  padding: 16px;
  line-height: 1.9;
  color: var(--fg-body);
}
.sh-label {
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 2px;
}
.sh-note {
  display: inline-block;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.25);
  color: #92400E;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── FORMULA BLOCK (Modules 8, 9 inline CSS → globalised) ── */
.formula-block {
  background: rgba(37,99,235,.04);
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 16px 0;
  overflow-x: auto;
}
.formula-block pre {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  color: var(--fg-body);
  margin: 0;
  line-height: 2.1;
  white-space: pre;
}

/* ── OUTPUT CARD (Modules 7, 8, 9 inline CSS → globalised) ─ */
.output-card {
  border-radius: 18px;
  border: 1px solid rgba(37,99,235,.14);
  background: rgba(255,255,255,.75);
  overflow: hidden;
  margin: 14px 0;
}
.output-card-header {
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
  display: flex;
  align-items: center;
  gap: 10px;
}
.output-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #38BDF8, #6366F1);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.output-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--fg);
}
.output-card-body {
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--fg-body);
}

/* ── ANNOTATED EMAIL ─────────────────────────────────────── */
.annotated-email {
  border: 1px solid rgba(37,99,235,.14);
  border-left: 4px solid #6366F1;
  border-radius: 0 16px 16px 0;
  background: rgba(248,250,255,.92);
  padding: 18px 20px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.9;
}
.ann-subject {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  color: var(--fg);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(37,99,235,.10);
}
.ann-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--cobalt);
  background: rgba(37,99,235,.10);
  padding: 2px 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}
.ann-body { display: flex; flex-direction: column; gap: 2px; }
.ann-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--fg-body);
  font-size: 13.5px;
  line-height: 1.75;
  min-height: 1.75em;
}
.ann-line:empty { min-height: 10px; }
.ann-note {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  color: #4338CA;
  background: rgba(99,102,241,.10);
  border: 1px solid rgba(99,102,241,.20);
  border-radius: 9999px;
  padding: 2px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.6;
  max-width: 100%;
  white-space: normal;
}

/* ── TONE SCALE TABLE ────────────────────────────────────── */
.tone-scale {
  border: 1px solid rgba(37,99,235,.13);
  border-radius: 16px;
  overflow: hidden;
  margin: 16px 0;
}
.tone-header {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cobalt);
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
}
.tone-scale .tbl-wrap { margin: 0 !important; border-radius: 0 !important; }
.tone-scale .tbl { border-radius: 0 !important; }
.tone-bad td { color: #9F1239 !important; background: rgba(190,18,60,.04) !important; }
.tone-scale tr.hl td {
  background: rgba(22,163,74,.06) !important;
  color: #15803D !important;
  font-weight: 700;
}

/* ── EX-SCENARIOS (Choose correct tone) ─────────────────── */
.ex-scenarios {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0;
}
.ex-scenario {
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(248,250,255,.8);
}
.ex-sc-ctx {
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  background: rgba(37,99,235,.05);
  border-bottom: 1px solid rgba(37,99,235,.09);
  line-height: 1.55;
}
.ex-sc-opts {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ex-sc-opts > div {
  font-size: 13.5px;
  color: var(--fg-muted);
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.55;
}
.ex-sc-correct {
  color: #15803D !important;
  font-weight: 700 !important;
  background: rgba(22,163,74,.08) !important;
  border: 1px solid rgba(22,163,74,.20) !important;
}
.ex-hint {
  font-size: 12.5px;
  color: var(--cobalt);
  font-weight: 600;
  background: rgba(37,99,235,.05);
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 10px;
  padding: 10px 13px;
  margin-top: 12px;
  line-height: 1.6;
}

/* ── DATA TABLE BLOCK ────────────────────────────────────── */
.data-table-block {
  border: 1px solid rgba(37,99,235,.13);
  border-radius: 16px;
  overflow: hidden;
  margin: 16px 0;
}
.data-table-label {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cobalt);
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
}
.data-table-block .tbl-wrap { margin: 0 !important; border-radius: 0 !important; }

/* ── FULL PRACTICE SCENARIOS ─────────────────────────────── */
.fp-scenario {
  border: 1.5px solid rgba(37,99,235,.14);
  border-radius: 20px;
  overflow: hidden;
  margin: 20px 0;
  background: #fff;
  box-shadow: 0 4px 18px rgba(37,99,235,.07);
}
.fp-scenario-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(99,102,241,.05));
  border-bottom: 1px solid rgba(37,99,235,.10);
}
.fp-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563EB, #6366F1);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.02em;
}
.fp-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 3px;
}
.fp-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.4;
}
/* All direct content blocks inside fp-scenario get consistent 20px side padding */
.fp-scenario > *:not(.fp-scenario-header):not(.exercise-sample) {
  margin-left: 20px !important;
  margin-right: 20px !important;
}
.fp-scenario .brief-excerpt { margin: 14px 20px; }
.fp-scenario .ex-questions { padding: 0 0 14px 20px; margin: 0 20px; }
.fp-scenario .exercise-sample { border-top: 1px solid rgba(37,99,235,.09); }
.fp-scenario .exercise-sample-body { padding: 14px 20px 18px; }
.fp-scenario .ex-answers { padding-left: 20px; }
.fp-scenario .ex-hint { margin: 0 20px 16px; }
.fp-scenario .fp-email-in { margin: 14px 20px; }
.fp-scenario .fp-slack-msg { margin: 12px 20px; }

/* Incoming email inside FP */
.fp-email-in {
  margin: 14px 20px;
  border: 1px solid rgba(37,99,235,.12);
  border-left: 4px solid var(--cobalt);
  border-radius: 0 12px 12px 0;
  background: rgba(248,250,255,.9);
  overflow: hidden;
}
.fp-email-meta {
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  background: rgba(37,99,235,.04);
  border-bottom: 1px solid rgba(37,99,235,.08);
}
.fp-email-body {
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--fg-body);
}

/* Sample email inside FP */
.fp-sample-email {
  border: 1px solid rgba(22,163,74,.18);
  border-left: 4px solid #16A34A;
  border-radius: 0 12px 12px 0;
  background: rgba(240,253,244,.8);
  overflow: hidden;
  margin-bottom: 12px;
}
.fp-sample-email .fp-email-meta {
  background: rgba(22,163,74,.07);
  border-bottom-color: rgba(22,163,74,.12);
  color: #15803D;
}
.fp-sample-email .fp-email-body { color: var(--fg-body); }

/* Senior feedback */
.fp-senior-feedback {
  background: rgba(99,102,241,.06);
  border: 1px solid rgba(99,102,241,.18);
  border-left: 4px solid #6366F1;
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  margin-top: 12px;
}
.fp-sf-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4338CA;
  margin-bottom: 6px;
}
.fp-senior-feedback p {
  font-size: 13px;
  line-height: 1.72;
  color: #3730A3;
  margin: 0;
  font-style: italic;
}

/* Meeting notes block */
.fp-notes {
  margin: 14px 20px;
  border: 1px solid rgba(37,99,235,.12);
  border-left: 4px solid var(--cobalt);
  border-radius: 0 12px 12px 0;
  background: rgba(248,250,255,.9);
  padding: 12px 16px 14px;
}
.fp-notes-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(37,99,235,.10);
}
.fp-notes ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fp-notes ul li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--fg-body);
  padding-left: 0;
}
.fp-notes ul li::before {
  content: '→';
  color: var(--cobalt);
  font-weight: 800;
  flex-shrink: 0;
  font-size: 13px;
}

/* Slack message preview */
.fp-slack-msg {
  background: #fff;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 20px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fg-body);
}
.fp-slack-sender {
  font-weight: 800;
  color: #7C3AED;
  margin-bottom: 4px;
  display: block;
  font-size: 13px;
}

/* Cumulative vocab used */
.fp-cum-used {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  background: rgba(37,99,235,.05);
  border: 1px solid rgba(37,99,235,.10);
  border-radius: 9999px;
  padding: 6px 14px;
  margin-top: 10px;
  display: inline-block;
  line-height: 1.5;
}
.fp-cum-used strong { color: var(--cobalt); }

/* Quiz answer key */
.quiz-answer-key {
  margin-top: 14px;
  padding: 14px 18px;
  background: rgba(22,163,74,.06);
  border: 1px solid rgba(22,163,74,.18);
  border-radius: 14px;
}
.quiz-ak-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #15803D;
  margin-bottom: 8px;
}

/* ── MODULE-14 SPECIFIC (lesson-nav-row etc.) ─────────────── */
.lesson-nav-row, .mobile-nav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 8px;
}
.btn-next-lesson, .btn-prev-lesson {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
  text-decoration: none;
  border: 1.5px solid rgba(37,99,235,.20);
  background: #fff;
  color: var(--cobalt);
}
.btn-next-lesson { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.btn-next-lesson:hover { background: #1D4ED8; }
.btn-prev-lesson:hover { background: rgba(37,99,235,.07); }
.done-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  margin-left: auto;
}
.done-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #16A34A;
}
.mn-center { text-align: center; flex: 1; }

/* ── TBL-COMPACT (Module 3, 11) ──────────────────────────── */
.tbl-compact td, .tbl-compact th {
  padding: 6px 12px !important;
  font-size: 12.5px !important;
}

/* ── FINAL LESSON INDICATOR (various modules) ────────────── */
.final .ls-tag {
  background: rgba(245,158,11,.12) !important;
  color: #B45309 !important;
  border-color: rgba(245,158,11,.28) !important;
}

/* ── RECAP (Module 7 sidebar) ────────────────────────────── */
.recap {
  background: rgba(37,99,235,.04);
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--fg-body);
}

/* ── QA-GROUP VOCAB CHECKLIST (Module 1 Recap + others) ──── */
.qa-group {
  padding-top: 14px;
  border-top: 1px solid rgba(37,99,235,.08);
}
.qa-group:first-child { border-top: none; padding-top: 0; }

.qa-group-header {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qa-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qa-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  cursor: pointer;
  padding: 7px 10px !important;
  border-radius: 10px;
  transition: background .15s;
  width: 100%;
  line-height: 1;
}
.qa-row:hover { background: rgba(37,99,235,.05); }

.qa-row input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  accent-color: #16A34A;
  cursor: pointer;
  margin-top: 3px !important;
}

.qa-row span {
  font-size: 14px !important;
  line-height: 1.62 !important;
  color: var(--fg-body) !important;
  font-weight: 500;
  flex: 1;
}

.qa-row input:checked + span {
  color: var(--fg-muted) !important;
  text-decoration: line-through;
  text-decoration-color: rgba(22,163,74,.45);
}

.qa-row em {
  color: var(--cobalt);
  font-style: italic;
  font-weight: 700;
}

/* ── RESPONSIVE IMPROVEMENTS ─────────────────────────────── */
@media (max-width: 639px) {
  .flashcard { min-height: 180px; }
  .flashcard-inner { min-height: 180px; }
  .fc-front, .fc-back { min-height: 180px; padding: 18px; }
  .fc-word { font-size: 26px; }
  .vocab-header { flex-wrap: wrap; }
  .vocab-ipa { font-size: 11.5px; }
  .quiz-opt { font-size: 13px; padding: 10px 12px; }
  .mode-toggle { display: none; }
}
