/* css/components/course.css */
/* Course section: lessons, units, grammar, vocabulary, review exercises */

/* Exercise feedback — orange palette for correct answers */
:root {
  --cu-ex-correct: #ea580c;
  --cu-ex-correct-bright: #f97316;
  --cu-ex-correct-soft: #fff7ed;
  --cu-ex-correct-soft-alt: #ffedd5;
  --cu-ex-correct-muted: rgba(249, 115, 22, 0.07);
  --cu-ex-correct-muted-strong: rgba(249, 115, 22, 0.14);
  --cu-ex-correct-border: rgba(249, 115, 22, 0.22);
  --cu-ex-correct-border-strong: rgba(249, 115, 22, 0.28);
  --cu-ex-correct-text: #c2410c;
  --cu-ex-correct-text-deep: #7c2d12;
  --cu-lesson-orange: #ff9600;
  --cu-lesson-orange-dark: #e68600;
  --cu-lesson-orange-hover: #ffa726;
}

/* ══════════════════════════════════════════════════════════════════════════
   COURSE UNIT CONTENT VIEWER
   ══════════════════════════════════════════════════════════════════════════ */

/* Course block/tab switcher view */
.cu-course-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
}

/* Unit section layout in block view */
.cu-unit-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cu-unit-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  padding: 8px 4px 10px;
  border-bottom: 1.5px solid rgba(45, 46, 95, 0.08);
  margin-bottom: 10px;
}

.cu-unit-section-header .material-symbols-outlined {
  font-size: 1.05rem;
}

.cu-us-title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 700;
}

.cu-us-done {
  color: #10b981;
  display: flex;
  align-items: center;
}

.cu-us-done .material-symbols-outlined {
  font-size: 1rem;
}

/* Section navigation bar */
.cu-section-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(45, 46, 95, 0.08);
}

.cu-section-nav > :first-child { justify-self: start; }
.cu-section-nav > :nth-child(2) { justify-self: center; }
.cu-section-nav > :last-child { justify-self: end; }

.cu-section-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.cu-section-nav-center .cu-ex-footer {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  justify-content: center;
  width: 100%;
  gap: 10px;
}

.cu-section-nav-center .cu-ex-footer > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cu-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-medium, #64748b);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}

.cu-nav-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.cu-nav-btn .material-symbols-outlined {
  font-size: 1rem;
}

/* Section dots navigation bar */
.cu-dots-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.06);
  margin-bottom: 16px;
}

.cu-dot-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  line-height: 1;
}

.cu-dot-nav:hover {
  transform: scale(1.12);
}

.cu-dot-theory {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.cu-dot-theory.cu-dot-active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.cu-dot-exercise {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.25);
  color: #8b5cf6;
}

.cu-dot-exercise.cu-dot-active {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

.cu-dot-vocab {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.cu-dot-vocab.cu-dot-active {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.cu-dot-nav.cu-dot-done-mark {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

/* Roadmap active item */
.course-roadmap-item.crm-active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #2563eb;
  font-weight: 700;
}

/* Grammar Form row */
.cu-gc-form-row {
  border: 1px solid rgba(45, 46, 95, 0.12);
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0 6px;
}
.cu-gc-form-content {
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cu-gc-form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  background: rgba(59, 130, 246, 0.06);
  padding: 6px 14px;
  margin: -8px -14px 8px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.1);
  line-height: 1.4;
}
.cu-gc-form-item {
  font-size: 0.87rem;
  color: var(--text-dark, #0f172a);
  font-style: italic;
  line-height: 1.5;
}
/* Formula line (e.g. "have/has + past participle") */
.cu-gc-form-formula {
  font-size: 0.87rem;
  color: var(--text-dark, #0f172a);
  font-style: italic;
  font-weight: 600;
  padding: 3px 0 5px;
}
/* Structured statement / negative / question rows */
.cu-gc-form-stmt-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: baseline;
  padding: 3px 0;
  border-top: 1px solid rgba(45, 46, 95, 0.05);
  gap: 6px;
}
.cu-gc-form-stmt-row:first-child {
  border-top: none;
}
.cu-gc-form-stmt-row.cu-gc-form-two-col {
  grid-template-columns: 72px 1fr 1fr;
}
.cu-gc-form-stmt-label {
  font-size: 0.76rem;
  font-style: italic;
  color: #64748b;
  line-height: 1.6;
  white-space: nowrap;
}
.cu-gc-form-stmt-cell {
  font-size: 0.86rem;
  color: var(--text-dark, #0f172a);
  font-style: italic;
  line-height: 1.55;
}
.cu-gc-form-stmt-note {
  font-size: 0.78rem;
  color: #64748b;
  padding-left: 78px;
  padding-bottom: 4px;
  font-style: italic;
  line-height: 1.5;
}

/* Watch out! box */
.cu-gc-watchout {
  background: rgba(234, 179, 8, 0.07);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-left: 3px solid #eab308;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 4px 0 2px;
}
.cu-gc-watchout-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.cu-gc-watchout-icon {
  font-size: 18px;
  color: #ca8a04;
}
.cu-gc-watchout-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cu-gc-watchout-desc {
  font-size: 0.87rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.55;
  margin-bottom: 6px;
}
.cu-gc-watchout-list {
  margin: 4px 0 0 4px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cu-gc-watchout-list li {
  font-size: 0.86rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}
.cu-gc-watchout-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: #ca8a04;
}
/* ✓ correct example line */
.cu-gc-watchout-list li.cu-gc-wo-correct::before { content: ''; }
.cu-gc-watchout-list li.cu-gc-wo-correct { padding-left: 0; color: var(--text-dark, #0f172a); }
.cu-gc-wo-correct .cu-gc-wo-mark {
  display: inline-block;
  color: #16a34a;
  font-weight: 700;
  margin-right: 5px;
  font-style: normal;
}
/* ✗ incorrect example line */
.cu-gc-watchout-list li.cu-gc-wo-incorrect::before { content: ''; }
.cu-gc-watchout-list li.cu-gc-wo-incorrect { padding-left: 0; color: #94a3b8; }
.cu-gc-wo-incorrect .cu-gc-wo-mark {
  display: inline-block;
  color: #dc2626;
  font-weight: 700;
  margin-right: 5px;
  font-style: normal;
}
.cu-gc-wo-incorrect s { color: #94a3b8; text-decoration-color: #dc2626; }
.cu-gc-wo-incorrect s strong { color: #94a3b8; font-weight: 600; }
/* Note line in Watch out */
.cu-gc-watchout-list li.cu-gc-wo-note { color: #64748b; font-style: italic; }

/* Two-column grid inside Watch out! (e.g. irregular plurals) */
.cu-gc-wo-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
  margin-top: 4px;
}
@media (max-width: 480px) {
  .cu-gc-wo-columns { grid-template-columns: 1fr; }
}

/* Useful notes info box */
.cu-gc-usefnote {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 4px 0 2px;
}
.cu-gc-usefnote-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.cu-gc-usefnote-icon {
  font-size: 18px;
  color: #2563eb;
}
.cu-gc-usefnote-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cu-gc-usefnote-desc {
  font-size: 0.87rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.55;
  margin-bottom: 6px;
}
.cu-gc-usefnote-list {
  margin: 4px 0 0 4px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cu-gc-usefnote-list li {
  font-size: 0.86rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}
.cu-gc-usefnote-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: #2563eb;
}
.cu-gc-usefnote-list li.cu-theory-list-correct::before { content: ''; }
.cu-gc-usefnote-list li.cu-theory-list-correct { padding-left: 0; }
.cu-gc-usefnote-list li.cu-theory-list-incorrect::before { content: ''; }
.cu-gc-usefnote-list li.cu-theory-list-incorrect { padding-left: 0; }
.cu-gc-usefnote-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Two-column side-by-side theory block */
.cu-theory-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  margin: 8px 0;
}
.cu-theory-col {
  min-width: 0;
}
.cu-theory-col-desc {
  margin-top: 6px;
}
@media (max-width: 600px) {
  .cu-theory-two-cols { grid-template-columns: 1fr; }
}

/* Uses + Examples table */
.cu-uses-examples-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 10px;
  font-size: 0.87rem;
}

.cu-ue-head {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 6px 10px 8px;
  border-bottom: 2px solid rgba(45, 46, 95, 0.08);
}

.cu-ue-head:first-child {
  width: 38%;
  color: #3b82f6;
}

.cu-ue-head:last-child {
  color: #64748b;
}

.cu-ue-row {
  border-bottom: 1px solid rgba(45, 46, 95, 0.05);
}

.cu-ue-row:last-child {
  border-bottom: none;
}

.cu-ue-use {
  padding: 7px 10px 7px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  vertical-align: top;
  line-height: 1.5;
  border-right: 1px solid rgba(45, 46, 95, 0.07);
  width: 38%;
}

.cu-ue-example {
  padding: 7px 10px 7px 12px;
  font-size: 0.85rem;
  color: var(--text-medium, #64748b);
  vertical-align: top;
  line-height: 1.55;
  font-style: italic;
}

.cu-ue-example strong {
  color: var(--text-dark, #0f172a);
  font-style: normal;
}

/* Subtitle-as-table: right column (items list, not italic) */
.cu-ue-items {
  padding: 7px 10px 7px 12px;
  font-size: 0.85rem;
  color: var(--text-dark, #0f172a);
  vertical-align: top;
  line-height: 1.55;
}

/* Type name heading within a type-table cell */
.cu-ue-type-name {
  display: block;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  margin-bottom: 4px;
}

/* Full-width cell spanning all columns (e.g. common uncountable nouns) */
.cu-ue-full-cell {
  padding: 7px 12px;
  font-size: 0.85rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
}

/* 3-column quantifier table */
.cu-ue-quantifier {
  padding: 7px 10px;
  font-size: 0.85rem;
  vertical-align: top;
  border-right: 1px solid rgba(45, 46, 95, 0.07);
  width: 20%;
}
.cu-3col-table .cu-ue-head:first-child { width: 20%; }
.cu-3col-table .cu-ue-use {
  width: 40%;
  border-right: 1px solid rgba(45, 46, 95, 0.07);
}

/* 3-column modal table (Use | Modal | Example) */
.cu-ue-modal {
  padding: 7px 10px;
  font-size: 0.85rem;
  color: var(--text-dark, #0f172a);
  vertical-align: top;
  border-right: 1px solid rgba(45, 46, 95, 0.07);
}
.cu-modal-table .cu-ue-head:nth-child(2) { width: 20%; }
.cu-modal-table .cu-ue-use { border-right: 1px solid rgba(45, 46, 95, 0.07); }

/* Direct/Reported table: type-group header row */
.cu-dr-type-row {
  background: rgba(45, 46, 95, 0.04);
  border-bottom: none;
}
.cu-dr-type-cell {
  padding: 5px 10px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.cu-dr-table .cu-ue-use { width: 50%; }

/* Common words chips */
.cu-theory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 6px;
}

.cu-theory-chip {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  line-height: 1.5;
}

/* Stative verb categories */
.cu-theory-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 6px;
}

.cu-theory-cat-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cu-theory-cat-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

/* US vs UK comparison block */
.cu-usuk-block {
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  overflow: hidden;
  margin: 4px 0 6px;
}

.cu-usuk-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(59, 130, 246, 0.08);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.cu-usuk-col-head {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2D2E5F;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cu-usuk-col-head:first-child {
  border-right: 1px solid rgba(59, 130, 246, 0.15);
}

.cu-usuk-flag {
  font-size: 1rem;
}

.cu-usuk-note {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  background: rgba(255,255,255,0.6);
}

.cu-usuk-note-mid {
  margin-top: 6px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  border-bottom: none;
}

.cu-usuk-rows {
  display: flex;
  flex-direction: column;
}

.cu-usuk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(45, 46, 95, 0.06);
}

.cu-usuk-row:last-child {
  border-bottom: none;
}

.cu-usuk-row-full {
  grid-template-columns: 1fr;
}

.cu-usuk-cell {
  padding: 7px 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dark, #0f172a);
}

.cu-usuk-us {
  border-right: 1px solid rgba(45, 46, 95, 0.06);
  background: rgba(239, 68, 68, 0.03);
}

.cu-usuk-uk {
  background: rgba(59, 130, 246, 0.03);
}

/* Restart buttons */
.cu-reset-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-medium, #64748b);
  background: rgba(45, 46, 95, 0.05);
  border: 1px solid rgba(45, 46, 95, 0.15);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.cu-reset-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

.cu-reset-btn .cu-reset-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.cu-reset-btn-sm {
  padding: 6px 10px;
  min-width: 36px;
  min-height: 36px;
  justify-content: center;
  font-size: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--text-medium, #64748b);
}

.cu-reset-btn-sm:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.cu-reset-btn-sm:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.cu-reset-btn-sm .cu-reset-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Review section slots in block view */
.fe-map-review-block {
  flex-direction: column;
  align-items: flex-start;
}

.fe-map-review-block .fe-map-review-slots {
  width: 100%;
}

.fe-map-review-slots {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Progress test slots – 2-column grid */
.fe-map-pt-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  width: 100%;
}

.fe-map-pt-block .fe-map-pt-slots {
  width: 100%;
}

@media (max-width: 500px) {
  .fe-map-pt-slots {
    grid-template-columns: 1fr;
  }
}

.fe-map-review-block .fe-review-slot {
  background: rgba(124, 58, 237, 0.04);
  border-color: rgba(124, 58, 237, 0.18);
}

.fe-map-review-block .fe-review-slot:hover {
  background: rgba(124, 58, 237, 0.09);
  border-color: rgba(124, 58, 237, 0.35);
}

.fe-map-review-block .fe-rs-letter {
  background: rgba(124, 58, 237, 0.15);
  color: #6d28d9;
}

.fe-map-review-block .fe-rs-total-score {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.12);
}

.fe-review-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  flex: 1 1 0;
  min-width: 72px;
}

.fe-review-slot:hover {
  background: rgba(245, 158, 11, 0.09);
  border-color: rgba(245, 158, 11, 0.35);
}

.fe-review-slot--locked {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

.fe-review-slot--locked:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.fe-review-slot--locked .fe-rs-letter {
  background: #e2e8f0;
  color: #94a3b8;
}

.fe-review-slot--locked .fe-rs-name,
.fe-review-slot--locked .fe-rs-score {
  color: #94a3b8;
}

.fe-review-slot--done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

.fe-review-slot--done:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
}

.fe-review-slot--done .fe-rs-letter {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.fe-review-slot--done .fe-rs-score {
  color: #059669;
}

.fe-review-slot--done .fe-rs-score .material-symbols-outlined {
  font-size: 1rem;
  vertical-align: middle;
}

.fe-rs-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  flex-shrink: 0;
}

.fe-rs-name {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  line-height: 1.3;
}

.fe-rs-score {
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 10px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.fe-rs-score.fe-rs-score-pending {
  color: #94a3b8;
  background: rgba(45, 46, 95, 0.06);
}

.fe-rs-total-score {
  font-size: 0.8rem;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 10px;
  padding: 2px 8px;
  flex-shrink: 0;
  margin-left: 4px;
}

.fe-rs-total-score.fe-rs-score-pending {
  color: #94a3b8;
  background: rgba(45, 46, 95, 0.06);
}

/* Roadmap collapsible groups */
.crm-block-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  padding: 4px 2px 8px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  margin-bottom: 4px;
}

.crm-group {
  margin-bottom: 4px;
  min-width: 0;
  overflow: hidden;
}

.crm-group-hdr {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  width: 100%;
  font-family: inherit;
  text-align: left;
  border: 1.5px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
}

.crm-current-hdr {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}

.crm-current-hdr:hover {
  background: rgba(59, 130, 246, 0.15);
}

.crm-other-hdr {
  background: rgba(45, 46, 95, 0.03);
  color: var(--text-dark, #0f172a);
}

.crm-other-hdr:hover {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.crm-group-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.crm-group-icon .material-symbols-outlined {
  font-size: 0.95rem;
}

.crm-current-hdr .crm-group-icon .material-symbols-outlined { color: #3b82f6; }
.crm-other-hdr .crm-group-icon .material-symbols-outlined { color: #64748b; }

.crm-group-title {
  flex: 1;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: break-word;
}

.crm-group-arrow {
  font-size: 1rem !important;
  flex-shrink: 0;
  color: inherit;
}

.crm-group-items {
  padding: 4px 0 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}


/* Block tabs bar */
.cu-block-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 8px;
}

.cu-block-tab {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-medium, #64748b);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.cu-block-tab:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}
.cu-block-tab-active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.cu-block-tab-active:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.cu-block-tab-locked {
  opacity: 0.48;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
}
.cu-block-tab-locked .material-symbols-outlined {
  font-size: 0.85rem;
}

/* Unit cards grid */
.cu-unit-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cu-unit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(45, 46, 95, 0.08);
  box-shadow: 0 2px 10px rgba(45, 46, 95, 0.05);
  transition: box-shadow 0.15s, transform 0.12s;
}

.cu-unit-card-available {
  cursor: pointer;
}
.cu-unit-card-available:hover {
  box-shadow: 0 6px 20px rgba(45, 46, 95, 0.11);
  transform: translateY(-1px);
}

.cu-unit-card-locked {
  opacity: 0.55;
}

.cu-unit-card-icon {
  font-size: 1.6rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(45, 46, 95, 0.04);
  border-radius: 10px;
}
.cu-unit-card-icon .material-symbols-outlined {
  font-size: 1.4rem;
}
.cu-unit-card-locked .cu-unit-card-icon {
  color: #94a3b8;
}

.cu-unit-card-body {
  flex: 1;
  min-width: 0;
}
.cu-unit-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  color: #94a3b8;
}
.cu-unit-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  line-height: 1.3;
}

.cu-unit-card-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}
.cu-unit-card-arrow .material-symbols-outlined {
  font-size: 1.2rem;
}

.course-unit-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
}

/* Course unit page header (mobile-friendly) */
.subpage-header--course-unit {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.subpage-header--course-unit .subpage-header-unit-core {
  flex: 1;
  min-width: 0;
}
.subpage-header--course-unit .subpage-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  line-height: 1.3;
  font-size: 1rem;
  font-weight: 800;
}
.subpage-header--course-unit .subpage-subtitle {
  margin-top: 2px;
  font-size: 0.78rem;
  color: #64748b;
}

/* Course theory overview header (B1/B2/C1 live on hub tiles, not in this bar) */
.subpage-header--course-theory {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}
.subpage-header--course-theory .subpage-header-core {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.subpage-header--course-theory .subpage-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  line-height: 1.25;
  font-size: 1.05rem;
  font-weight: 800;
}
.subpage-header--course-theory .subpage-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

/* Section card */
.cu-section {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(45, 46, 95, 0.08);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(45, 46, 95, 0.06);
}

.cu-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(45, 46, 95, 0.07);
}
.cu-section-title .material-symbols-outlined {
  font-size: 1.15rem;
  color: #3b82f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cu-theory .cu-section-title .material-symbols-outlined { color: #3b82f6; }
.cu-exercise .cu-section-title .material-symbols-outlined { color: #8b5cf6; }
.cu-vocab .cu-section-title .material-symbols-outlined { color: #10b981; }
.cu-pv .cu-section-title .material-symbols-outlined { color: #f59e0b; }
.cu-collocations .cu-section-title .material-symbols-outlined { color: #6366f1; }
.cu-idioms .cu-section-title .material-symbols-outlined { color: #ec4899; }
.cu-wf .cu-section-title .material-symbols-outlined { color: #ef4444; }

/* Theory body */
.cu-theory-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cu-theory-subtitle {
  font-size: 0.88rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.cu-theory-desc {
  font-size: 0.9rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
}
.cu-theory-list {
  margin: 4px 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cu-theory-list li {
  font-size: 0.88rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.55;
}

/* ✓/✗ items inside regular theory lists */
.cu-theory-list li.cu-theory-list-correct,
.cu-theory-list li.cu-theory-list-incorrect {
  list-style: none;
  margin-left: -18px;
  padding-left: 22px;
  position: relative;
}
.cu-theory-list-mark {
  position: absolute;
  left: 0;
  font-weight: 700;
  font-style: normal;
}
.cu-theory-list li.cu-theory-list-correct { color: var(--text-dark, #0f172a); }
.cu-theory-list-correct .cu-theory-list-mark { color: #16a34a; }
.cu-theory-list li.cu-theory-list-incorrect { color: #94a3b8; }
.cu-theory-list-incorrect .cu-theory-list-mark { color: #dc2626; }
.cu-theory-list-incorrect s { color: #94a3b8; text-decoration-color: #dc2626; }
.cu-theory-list-incorrect s strong { color: #94a3b8; font-weight: 600; }

/* Exercise sections */
.cu-ex-instructions {
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
}
.cu-ex-wordbank {
  font-size: 0.85rem;
  color: var(--text-medium, #64748b);
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 6px 8px;
}
.cu-ex-wordbank strong {
  color: var(--text-dark, #0f172a);
  margin-right: 4px;
  white-space: nowrap;
}
.cu-ex-wordbank .material-symbols-outlined {
  font-size: 1rem;
  color: #3b82f6;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.2em;
}
.cu-wordbank-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px 4px;
  min-height: 1.65rem;
  box-sizing: border-box;
  line-height: 1.2;
  background: #fff;
  border: 1.5px solid rgba(59, 130, 246, 0.25);
  border-radius: 7px;
  font-weight: 600;
  color: #1e40af;
  font-size: 0.83rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, text-decoration 0.15s, opacity 0.15s;
  user-select: none;
  vertical-align: baseline;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: center;
}
@media (hover: hover) and (pointer: fine) {
  .cu-wordbank-item:hover {
    background: rgba(59, 130, 246, 0.08);
  }
}
.cu-wordbank-item.cu-wordbank-used {
  text-decoration: line-through;
  opacity: 0.45;
  background: rgba(45, 46, 95, 0.06);
  color: #64748b;
  border-color: rgba(45, 46, 95, 0.15);
}

/* Hint words in parentheses (e.g. (EXPLAIN), (do), (1)) — Duolingo-style chips */
.cu-hint-word {
  display: inline-block;
  padding: 2px 9px;
  margin: 0 2px;
  background: var(--white, #fff);
  border: 2px solid #e2e8f4;
  border-bottom-width: 3px;
  border-bottom-color: #dce3f0;
  border-radius: 999px;
  box-shadow: 0 2px 0 #dce3f0;
  color: var(--text-dark, #0f172a);
  font-family: 'Nunito', sans-serif;
  font-size: 0.85em;
  font-weight: 700;
  font-style: normal;
  line-height: 1.35;
  vertical-align: baseline;
  white-space: nowrap;
}

/* Gap + hint group (e.g. "1 [____] you") — no surrounding box; the field shows an underline */
.cu-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 2px;
  vertical-align: middle;
  margin: 2px 3px;
  box-shadow: none;
}
.cu-hint-pill:focus-within {
  border: none;
  box-shadow: none;
}
.cu-hint-pill-num {
  color: #475569;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1.5;
}
.cu-ex-num-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: 50%;
  width: 1.4em;
  height: 1.4em;
  line-height: 1;
  vertical-align: middle;
  margin: 0 2px;
  flex-shrink: 0;
}
.cu-hint-pill-input {
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 2px solid rgba(37, 99, 235, 0.35) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-dark, #0f172a) !important;
  padding: 3px 4px 1px !important;
  width: 80px;
  min-width: 65px;
  max-width: 100%;
  font-size: 0.9rem !important;
  font-family: 'Nunito', sans-serif;
  font-weight: 500;
  resize: none;
  vertical-align: middle;
  line-height: 1.45;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  flex: 1 1 auto;
}
.cu-hint-pill:has(.cu-hint-word) input.cu-hint-pill-input,
.cu-hint-pill:has(.cu-hint-word) textarea.cu-hint-pill-input {
  min-width: 3.25ch;
  flex: 1 1 10ch;
}
.cu-hint-pill input.cu-hint-pill-input.cu-input-show-correct,
.cu-hint-pill input.cu-gap-input.cu-hint-pill-input.cu-input-show-correct,
.cu-hint-pill input.cu-hint-pill-input.cu-input-correct,
.cu-hint-pill input.cu-hint-pill-input.cu-input-incorrect {
  overflow-x: visible;
  text-overflow: clip;
}
textarea.cu-hint-pill-input {
  overflow-wrap: normal;
  word-break: normal;
}
.cu-hint-pill-input:focus {
  border-bottom-color: #2563eb !important;
  background: rgba(59, 130, 246, 0.06) !important;
  box-shadow: none !important;
  outline: none;
}
.cu-hint-pill-word {
  color: var(--text-dark, #0f172a);
  font-weight: 700;
  font-size: 0.82em;
  flex-shrink: 0;
  background: var(--white, #fff);
  border: 2px solid #e2e8f4;
  border-bottom-width: 3px;
  border-bottom-color: #dce3f0;
  border-radius: 999px;
  box-shadow: 0 2px 0 #dce3f0;
  padding: 2px 9px;
  line-height: 1.35;
}
.cu-wf-pill-word {
  color: var(--text-dark, #0f172a);
  background: var(--white, #fff);
}

/* Course gap + word hint: input first, hint badge to the right (DOM: hintline then fieldline — reorder with flex) */
.cu-hint-gap-stack {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  max-width: 100%;
  margin: 0 4px 0 0;
  box-sizing: border-box;
}
.cu-hint-gap-hintline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: fit-content;
  max-width: 100%;
  order: 2;
}
.cu-hint-gap-fieldline {
  display: inline-block;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  order: 1;
}
.cu-hint-gap-fieldline > .cu-inline-gap-wrap {
  display: inline-block;
  width: auto;
  max-width: 100%;
}
.cu-hint-gap-fieldline .cu-gap-input:not(.cu-gap-textarea),
.cu-hint-gap-fieldline textarea.cu-gap-inline-textarea {
  /* width: moved below base .cu-gap-inline-textarea rules — avoid !important vs JS inline width */
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box;
}

/* Slash-separated hints: hint on its own row above the pill (outside pill border). */
.cu-hint-pill-slash-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px 6px;
  vertical-align: text-bottom;
  max-width: 100%;
  box-sizing: border-box;
}
.cu-hint-slash-hint-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
  box-sizing: border-box;
}

.cu-hint-pill .cu-hint-slash-sep,
.cu-hint-slash-hint-line .cu-hint-slash-sep {
  color: #94a3b8;
  font-weight: 700;
  user-select: none;
  padding: 0 2px;
  font-size: 0.9em;
}

/* Slash-separated hints: answer row without pill chrome (hint badge stays above in .cu-hint-slash-hint-line). */
.cu-hint-slash-field {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 8px;
  vertical-align: text-bottom;
  max-width: 100%;
  box-sizing: border-box;
  margin: 2px 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.cu-hint-pill-slash-wrap > .cu-hint-slash-field {
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
}

.cu-hint-pill-slash-wrap > .cu-inline-gap-wrap--block,
.cu-hint-slash-field > .cu-inline-gap-wrap--block {
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
  margin-top: 0;
  margin-bottom: 0;
  vertical-align: text-bottom;
}

/* Desktop: slash-hint gap field below the hint row — single-line underline input (matches non-slash gaps).
   Textarea selector kept for legacy markup only. */
.cu-hint-pill-slash-wrap input.cu-hint-pill-input,
.cu-hint-pill-slash-wrap textarea.cu-hint-pill-input.cu-gap-inline-textarea {
  display: inline-block;
  vertical-align: text-bottom;
  width: auto;
  min-width: 3.25ch;
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  border: none !important;
  border-bottom: 2px solid rgba(37, 99, 235, 0.35) !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: none;
  overflow: hidden;
  line-height: 1.45;
  padding: 3px 4px 1px !important;
  font-size: 0.9rem !important;
}
.cu-hint-pill-slash-wrap textarea.cu-hint-pill-input.cu-gap-inline-textarea {
  white-space: pre-wrap !important;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cu-hint-pill-slash-wrap input.cu-hint-pill-input:focus,
.cu-hint-pill-slash-wrap textarea.cu-hint-pill-input.cu-gap-inline-textarea:focus {
  border-bottom-color: #2563eb !important;
  background: rgba(59, 130, 246, 0.06) !important;
  outline: none;
}

/* Feedback states on pill inputs: recolor the underline. Specificity (0,2,1) placed after the
   slash-wrap base above so it wins ties; lesson-focus themed feedback (0,3,0) still takes precedence. */
input.cu-hint-pill-input.cu-input-correct,
textarea.cu-hint-pill-input.cu-input-correct {
  border-bottom-color: var(--cu-ex-correct) !important;
  background: var(--cu-ex-correct-muted) !important;
}
input.cu-hint-pill-input.cu-input-incorrect,
textarea.cu-hint-pill-input.cu-input-incorrect {
  border-bottom-color: #d97706 !important;
  background: rgba(217, 119, 6, 0.08) !important;
}
input.cu-hint-pill-input.cu-input-show-correct,
textarea.cu-hint-pill-input.cu-input-show-correct {
  border-bottom-color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.08) !important;
}

/* Pills where the gap field is followed by .cu-hint-word: keep hint on the same row to the right; no extra space under the field */
.cu-hint-pill:has(.cu-hint-word):not(.cu-hint-pill-slash-hint) {
  flex-wrap: nowrap;
  align-items: center;
}
.cu-hint-pill:has(.cu-hint-word):not(.cu-hint-pill-slash-hint) textarea.cu-hint-pill-input,
.cu-hint-pill:has(.cu-hint-word):not(.cu-hint-pill-slash-hint) input.cu-hint-pill-input {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Middle text between two inputs in a grouped gap pill */
.cu-hint-pill-mid {
  color: var(--text-dark, #0f172a);
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Key Word Transformation two-sentence layout */
.cu-ex-num-badge {
  position: absolute;
  top: 0;
  left: 0;
  transform: none;
  background: var(--primary, #3b82f6);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 10px 0 8px 0;
  min-width: 26px;
  text-align: center;
  letter-spacing: 0.02em;
}
.cu-ex-kwtrans {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cu-ex-kwtrans-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 2;
}
.cu-ex-kwtrans-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
}
.cu-ex-kwtrans-text {
  flex: 1;
  min-width: 0;
}

/* A/B meaning-choice: clickable label buttons */
button.cu-ex-kwtrans-label.cu-ab-btn {
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
button.cu-ex-kwtrans-label.cu-ab-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}
button.cu-ex-kwtrans-label.cu-ab-btn.cu-ab-selected {
  background: #3b82f6;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}
button.cu-ex-kwtrans-label.cu-ab-btn.cu-ab-correct {
  background: var(--cu-ex-correct-muted-strong);
  border-color: var(--cu-ex-correct);
  color: var(--cu-ex-correct-text);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}
button.cu-ex-kwtrans-label.cu-ab-btn.cu-ab-incorrect {
  background: rgba(217, 119, 6, 0.12);
  border-color: #d97706;
  color: #b45309;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14);
}
button.cu-ex-kwtrans-label.cu-ab-btn.cu-ab-correct-reveal {
  background: rgba(124, 58, 237, 0.12);
  border-color: #7c3aed;
  color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}
button.cu-ex-kwtrans-label.cu-ab-btn:disabled {
  cursor: default;
}

.cu-kwt-copy-btn {
  align-self: center;
  flex-shrink: 0;
  margin-left: 4px;
}

/* Multiple-choice options (Exercise E) — hidden; interaction via gap-pill modal only */
.cu-mc-options {
  display: none;
}
.cu-mc-blank {
  display: inline-block;
  color: #94a3b8;
  letter-spacing: 2px;
  font-weight: 600;
  vertical-align: middle;
}
.cu-mc-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(45, 46, 95, 0.1);
  font-size: 0.75rem;
  font-weight: 800;
  margin-right: 5px;
  flex-shrink: 0;
}
.cu-option-btn.cu-mc-option {
  min-width: 120px;
  flex-grow: 1;
  max-width: calc(50% - 4px);
  justify-content: flex-start;
}

/* Retry button */
.cu-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: #7c3aed;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.28);
}
.cu-retry-btn:hover { background: #6d28d9; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.38); }
.cu-retry-btn:active { transform: scale(0.97); }
.cu-retry-btn:focus-visible { outline: 3px solid #c4b5fd; outline-offset: 2px; }

/* Pagination for long exercise item lists */
.cu-ex-page-dots {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.cu-ex-pdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(45, 46, 95, 0.15);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.cu-ex-pdot:hover {
  background: rgba(45, 46, 95, 0.3);
}
.cu-ex-pdot-active {
  background: var(--primary, #3b82f6);
  border-color: rgba(59, 130, 246, 0.3);
  transform: scale(1.3);
}
/* Text-label variant used for crossword Across/Down tabs */
.cu-ex-pdot.cu-ex-pdot-label {
  width: auto;
  height: auto;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(45, 46, 95, 0.6);
  background: rgba(45, 46, 95, 0.06);
  border: 1.5px solid transparent;
  transform: none;
}
.cu-ex-pdot.cu-ex-pdot-label:hover {
  background: rgba(45, 46, 95, 0.12);
  color: rgba(45, 46, 95, 0.85);
}
.cu-ex-pdot.cu-ex-pdot-label.cu-ex-pdot-active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--primary, #3b82f6);
  transform: none;
}
.cu-ex-page {
  display: none;
}
.cu-ex-page.cu-ex-page-active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cu-ex-page-more {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px dashed rgba(59, 130, 246, 0.22);
  border-radius: 8px;
  font-size: 0.8rem;
  color: #3b82f6;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.cu-ex-page-more:hover {
  background: rgba(59, 130, 246, 0.12);
}
.cu-ex-page-more .material-symbols-outlined {
  font-size: 1rem;
}
.cu-ex-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cu-ex-sub {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}
.cu-ex-sub:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.cu-ex-subtitle {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  margin-bottom: 8px;
}
.cu-ex-item {
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 1px 4px rgba(45, 46, 95, 0.04);
  transition: border-color 0.2s;
  position: relative;
}
.cu-ex-sentence {
  font-size: 0.92rem;
  color: var(--text-dark, #0f172a);
  line-height: 2;
  margin-bottom: 6px;
}
.cu-ex-context {
  font-size: 0.9rem;
  color: var(--text-muted, #475569);
  line-height: 1.55;
  margin-bottom: 6px;
}

/* Inline gap input: underline only (line below instead of a box) */
.cu-gap-input {
  display: inline-block;
  vertical-align: baseline;
  width: 80px;
  max-width: 80vw;
  padding: 3px 6px 1px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.2;
  color: var(--text-dark, #0f172a);
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(37, 99, 235, 0.35);
  border-radius: 0;
  outline: none;
  transition: border-color 0.18s, background 0.18s, width 0.12s;
  margin: 0 3px;
  box-shadow: none;
}
.cu-gap-input:focus {
  border-bottom-color: #2563eb;
  background: rgba(59, 130, 246, 0.06);
  box-shadow: none;
}
/* Correct: orange + bounce */
.cu-gap-input.cu-input-correct {
  border-bottom-color: var(--cu-ex-correct) !important;
  background: var(--cu-ex-correct-muted) !important;
  color: var(--cu-ex-correct-text-deep) !important;
  animation: feBounceIn 0.35s ease;
}
/* Incorrect: amber — constructive, non-punitive */
.cu-gap-input.cu-input-incorrect {
  border-bottom-color: #d97706 !important;
  background: rgba(217, 119, 6, 0.08) !important;
  color: #78350f !important;
  animation: feShake 0.4s ease;
}
/* Show correct answer in input (toggle mode) */
.cu-gap-input.cu-input-show-correct {
  border-bottom-color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.08) !important;
  color: #5b21b6 !important;
  animation: feBounceIn 0.3s ease;
  max-width: none;
  overflow-x: visible;
  text-overflow: clip;
}
/* Multi-line gap textareas must stay inside the exercise card (single-line inputs may grow with JS). */
textarea.cu-gap-input.cu-input-show-correct,
textarea.cu-hint-pill-input.cu-input-show-correct {
  max-width: 100%;
}
/* Alt-solution cycle badge — shown next to inputs that have multiple valid answers */
.cu-alt-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border: 1.5px solid rgba(37, 99, 235, 0.3);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  margin: 0 2px;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1.6;
}
.cu-alt-badge::before {
  content: '↻ ';
}
.cu-alt-badge:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.5);
}
/* Readonly inputs in show-correct mode with multiple alternatives are clickable to cycle */
.cu-gap-input[readonly].cu-input-show-correct {
  cursor: pointer;
}
.cu-gap-standalone {
  width: 100%;
  max-width: 520px;
  display: block;
  margin-top: 8px;
}

/* Inline gaps: auto-resize textarea flows with sentence text (replaces one-line <input>) */
.cu-inline-gap-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
  vertical-align: text-bottom;
  max-width: 100%;
  box-sizing: border-box;
}
.cu-inline-gap-wrap--block {
  display: block;
  width: 100%;
  max-width: 520px;
  margin-top: 8px;
}
.cu-inline-gap-wrap--block textarea.cu-gap-inline-textarea.cu-gap-standalone,
.cu-inline-gap-wrap--block input.cu-gap-input.cu-gap-standalone {
  margin-top: 0;
}
input.cu-gap-input.cu-bc-input {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  /* One-line correction: avoid 2em min-height (inflates the box vs sentence text) */
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  margin: 0;
  box-sizing: border-box;
}
textarea.cu-gap-input.cu-gap-inline-textarea {
  display: inline-block;
  vertical-align: baseline;
  width: 80px;
  min-width: 5ch;
  max-width: 100%;
  min-height: 1.55em;
  padding: 3px 6px 1px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.45;
  color: var(--text-dark, #0f172a);
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(37, 99, 235, 0.35);
  border-radius: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  margin: 0 3px;
  box-shadow: none;
  transition: border-color 0.18s, background 0.18s, width 0.12s;
}
textarea.cu-gap-input.cu-gap-inline-textarea:focus {
  border-bottom-color: #2563eb;
  background: rgba(59, 130, 246, 0.06);
  box-shadow: none;
}

/* Hint-gap row: beat base 80px gap width; no !important so _resizeCuInput inline width applies */
.cu-hint-gap-fieldline textarea.cu-gap-input.cu-gap-inline-textarea,
.cu-hint-gap-fieldline input.cu-gap-input:not(.cu-gap-textarea):not(.cu-cw-input) {
  width: auto;
  max-width: 100%;
}

.cu-inline-gap-wrap--block textarea.cu-gap-input.cu-gap-inline-textarea,
.cu-inline-gap-wrap--block input.cu-gap-input:not(.cu-cw-input) {
  display: block;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
textarea.cu-gap-input.cu-bc-input.cu-gap-inline-textarea {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  /* Mobile bold-correct: single-line field; JS (_resizeCuInput) grows height with content */
  min-height: calc(1.45em + 6px);
  padding-top: 2px;
  padding-bottom: 2px;
  margin: 0;
}

/* Textarea variant for long free-write answers (e.g. error-correction rewrite exercises):
   keeps a boxed surface since it spans multiple lines */
textarea.cu-gap-input.cu-gap-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  resize: none;
  overflow: hidden;
  line-height: 1.55;
  padding: 6px 10px;
  margin: 6px 0 0;
  min-height: 2.8em;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 2px solid rgba(59, 130, 246, 0.28);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.06);
}
textarea.cu-gap-input.cu-gap-textarea:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}
textarea.cu-gap-input.cu-gap-textarea.cu-input-correct {
  border-color: var(--cu-ex-correct) !important;
  background: var(--ex-feedback-bg, #fff) !important;
}
textarea.cu-gap-input.cu-gap-textarea.cu-input-incorrect {
  border-color: #d97706 !important;
  background: var(--ex-feedback-bg, #fff) !important;
}
textarea.cu-gap-input.cu-gap-textarea.cu-input-show-correct {
  border-color: #7c3aed !important;
  background: var(--ex-feedback-bg, #fff) !important;
}

/* Bold-correct sections that use textareaAnswer: keep a compact initial row */
textarea.cu-gap-input.cu-bc-input.cu-gap-textarea {
  min-height: 2.2em;
  padding: 4px 10px;
  margin-top: 4px;
}

/* Option buttons (circle the correct word) — WCAG: min 44px touch target */
.cu-option-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 5px 13px;
  min-height: 34px;
  margin: 3px 4px;
  font-size: 0.86rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  background: rgba(45, 46, 95, 0.04);
  border: 1.5px solid rgba(45, 46, 95, 0.16);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.cu-option-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.38);
  color: #1d4ed8;
  transform: translateY(-1px);
}
.cu-option-btn:active {
  transform: scale(0.96);
}
.cu-option-btn:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}
.cu-option-selected {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.cu-option-selected:hover {
  background: #6d28d9;
  border-color: #6d28d9;
  color: #fff;
}
/* Correct option: orange + bounce */
.cu-option-correct {
  background: var(--cu-ex-correct) !important;
  border-color: var(--cu-ex-correct) !important;
  color: #fff !important;
  animation: feBounceIn 0.35s ease;
}
/* Incorrect option: amber — constructive, non-punitive */
.cu-option-incorrect {
  background: #d97706 !important;
  border-color: #d97706 !important;
  color: #fff !important;
  animation: feShake 0.4s ease;
}
/* Correct answer reveal — the option the student should have chosen */
.cu-option-correct-reveal {
  background: rgba(37, 99, 235, 0.12) !important;
  border: 2px solid #2563eb !important;
  color: #1e3a8a !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22) !important;
  animation: feBounceIn 0.35s ease;
}

/* Footer row: answer reveal only (no button per item) */
.cu-ex-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 8px;
}

/* Section-level exercise footer with Corregir / Mostrar buttons */
.cu-ex-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(45, 46, 95, 0.07);
  flex-wrap: wrap;
}

.cu-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}
.cu-check-btn:hover { background: #1d4ed8; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38); }
.cu-check-btn:active { transform: scale(0.97); }
.cu-check-btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.cu-check-btn:disabled { background: rgba(45, 46, 95, 0.18); color: rgba(45,46,95,0.4); cursor: default; box-shadow: none; transform: none; }

.cu-show-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.08);
  border: 1.5px solid rgba(37, 99, 235, 0.28);
  border-radius: 10px;
  padding: 10px 20px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}
.cu-show-all-btn:hover { background: rgba(37, 99, 235, 0.14); }
.cu-show-all-btn:active { transform: scale(0.97); }
.cu-show-all-btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Score summary after checking */
.cu-ex-score-summary {
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  animation: feSlideIn 0.35s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cu-ex-score-good {
  background: var(--cu-ex-correct-muted);
  color: var(--cu-ex-correct-text-deep);
  border: 1.5px solid var(--cu-ex-correct-border);
}
.cu-ex-score-review {
  background: rgba(217, 119, 6, 0.08);
  color: #78350f;
  border: 1.5px solid rgba(217, 119, 6, 0.22);
}

/* "Got it" button for theory sections */
.cu-entendido-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}
.cu-entendido-btn:hover { background: #1d4ed8; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38); }
.cu-entendido-btn:active { transform: scale(0.97); }
.cu-entendido-btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

.cu-answer-btn {
  font-size: 0.78rem;
  font-weight: 700;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.cu-answer-btn:hover {
  background: rgba(59, 130, 246, 0.15);
}
.cu-answer {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cu-ex-correct-text-deep);
  margin-top: 8px;
  padding: 7px 12px;
  background: var(--cu-ex-correct-muted);
  border-radius: 8px;
  border: 1.5px solid var(--cu-ex-correct-border);
  animation: feSlideIn 0.25s ease;
}

/* Per-item answer toggle button (shown after checking when answer is wrong) */
.cu-item-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.07);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin-top: 6px;
  font-family: inherit;
}
.cu-item-toggle-btn:hover {
  background: rgba(37, 99, 235, 0.13);
}
.cu-item-toggle-btn .material-symbols-outlined {
  font-size: 1rem;
  vertical-align: middle;
}
.cu-item-toggle-btn[data-mode="correct"] {
  color: var(--cu-ex-correct-text);
  background: var(--cu-ex-correct-muted);
  border-color: var(--cu-ex-correct-border-strong);
}
.cu-item-toggle-btn[data-mode="correct"]:hover {
  background: var(--cu-ex-correct-muted-strong);
}

/* Vocabulary words */
.cu-vocab-group {
  margin-bottom: 16px;
}
.cu-vocab-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.cu-vocab-words {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}
.cu-vocab-word {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.12);
}
.cu-word {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}
.cu-pos {
  font-size: 0.75rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
}
.cu-variant {
  font-size: 0.72rem;
  color: var(--text-medium, #64748b);
}

/* Phrasal verbs / idioms list */
.cu-pv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cu-pv-item {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  align-items: flex-start;
}
.cu-idioms .cu-pv-item {
  background: rgba(236, 72, 153, 0.04);
  border-color: rgba(236, 72, 153, 0.12);
}
.cu-pv-verb {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  min-width: 160px;
  flex-shrink: 0;
}
.cu-pv-meaning {
  font-size: 0.85rem;
  color: var(--text-medium, #64748b);
  line-height: 1.5;
}

/* Collocations */
.cu-coll-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cu-coll-item {
  display: flex;
  gap: 12px;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  align-items: flex-start;
}
.cu-coll-word {
  font-size: 0.88rem;
  font-weight: 700;
  color: #6366f1;
  min-width: 120px;
  flex-shrink: 0;
}
.cu-coll-patterns {
  font-size: 0.84rem;
  color: var(--text-medium, #64748b);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .cu-section { padding: 14px 14px; }
  .cu-vocab-words { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .cu-pv-verb { min-width: 120px; }
  .cu-coll-word { min-width: 90px; }
}

/* ── Course Navigation Sidebar (left) ───────────────────────────────── */
.course-nav-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.course-nav-header {
  display: flex;
  align-items: center;
  padding: 12px 14px 10px;
  border-bottom: 2px solid rgba(45, 46, 95, 0.08);
  margin-bottom: 6px;
}

.course-nav-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 800;
  color: #2D2E5F;
  letter-spacing: 0.01em;
}

.course-nav-title .material-symbols-outlined {
  font-size: 1.2rem;
  color: #46B1E1;
}

.course-nav-empty {
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text-light, #94a3b8);
}

.course-nav-blocks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0;
}

.course-nav-block {
  border-radius: 10px;
  overflow: hidden;
}

.course-nav-block-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  transition: background 0.15s;
}

.cnb-available {
  cursor: pointer;
  color: #2D2E5F;
  background: rgba(45, 46, 95, 0.04);
}

.cnb-available:hover {
  background: rgba(45, 46, 95, 0.09);
}

.cnb-has-active {
  background: rgba(70, 177, 225, 0.18);
  color: #0e6b94;
  border-left: 3px solid #46B1E1;
}

.cnb-locked {
  cursor: default;
  color: var(--text-light, #94a3b8);
  opacity: 0.7;
  gap: 6px;
}

.cnb-pack-locked {
  cursor: pointer;
  color: var(--text-medium);
  background: rgba(99,102,241,0.06);
  border: 1px dashed rgba(99,102,241,0.3);
  border-radius: 8px;
}
.cnb-pack-locked:hover { background: rgba(99,102,241,0.12); }

.cnb-lock-icon {
  display: flex;
  align-items: center;
}

.cnb-lock-icon .material-symbols-outlined,
.cnb-arrow {
  font-size: 1rem;
  flex-shrink: 0;
}

.cnb-label {
  flex: 1;
}

.course-nav-items {
  flex-direction: column;
  gap: 2px;
  padding: 2px 4px 4px 10px;
}

.course-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  transition: background 0.12s;
}

.cni-available {
  cursor: pointer;
  color: var(--text-dark, #0f172a);
}

.cni-available:hover {
  background: rgba(59, 130, 246, 0.07);
  color: #2563eb;
}

.cni-active {
  background: rgba(59, 130, 246, 0.13);
  color: #1d4ed8;
  font-weight: 700;
}

.cni-active:hover {
  background: rgba(59, 130, 246, 0.18);
}

.cni-locked {
  color: var(--text-light, #94a3b8);
  opacity: 0.65;
}

.cni-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cni-icon .material-symbols-outlined {
  font-size: 0.9rem;
}

.cni-text {
  flex: 1;
  line-height: 1.35;
}

/* ── Course Learning Roadmap Sidebar (right) ─────────────────────────── */
.course-roadmap-widget {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(45, 46, 95, 0.09);
  border-radius: 16px;
  padding: 16px 14px;
  box-shadow: 0 4px 16px rgba(45, 46, 95, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.course-roadmap-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #5a7a9a;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}

.course-roadmap-heading .material-symbols-outlined {
  font-size: 1rem;
  color: #46B1E1;
}

.course-roadmap-unit-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2D2E5F;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(45, 46, 95, 0.08);
  line-height: 1.4;
}

.course-roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: rgba(45, 46, 95, 0.03);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dark, #0f172a);
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  width: 100%;
  font-family: inherit;
}

.course-roadmap-item:hover {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.crm-theory {
  border-left: 3px solid #3b82f6;
}

.crm-exercise {
  border-left: 3px solid #8b5cf6;
}

.crm-vocab {
  border-left: 3px solid #10b981;
}

.crm-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.crm-icon .material-symbols-outlined {
  font-size: 0.95rem;
}

.crm-theory .crm-icon .material-symbols-outlined { color: #3b82f6; }
.crm-exercise .crm-icon .material-symbols-outlined { color: #8b5cf6; }
.crm-vocab .crm-icon .material-symbols-outlined { color: #10b981; }

.crm-text {
  flex: 1;
}

.cu-unit-section .fe-map-lesson {
  flex-wrap: nowrap;
}

.cu-unit-section .fe-map-lesson .fe-map-lesson-num {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
}

.cu-unit-section .fe-map-lesson .fe-map-points-row {
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.cu-unit-section .fe-map-lesson .fe-dot-section-marker {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

.course-nav-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  background: rgba(45, 46, 95, 0.04);
  color: var(--text-medium, #64748b);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.course-nav-back-btn:hover {
  background: rgba(45, 46, 95, 0.1);
  color: #2D2E5F;
}

.course-nav-back-btn .material-symbols-outlined {
  font-size: 1.1rem;
}

/* ── Course Overview (all blocks roadmap) ──────────────────────────────── */
.cu-overview-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 32px;
}

.cu-overview-block-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(45, 46, 95, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(45, 46, 95, 0.06);
}

.cu-overview-block-filter-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  padding-bottom: 2px;
}

.cu-overview-block-filter-fixed {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

@media (hover: hover) and (pointer: fine) {
  .cu-obf-btn:hover {
    border-color: rgba(59, 130, 246, 0.75);
    background: rgba(59, 130, 246, 0.1);
    color: #1e3a8a;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
  }

  .cu-obf-btn-active:hover {
    background: linear-gradient(90deg, #2563eb, #2ea6db);
    border-color: #2563eb;
    color: #fff;
  }
}

.cu-overview-block-filter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(70, 177, 225, 0.14);
  color: #0ea5e9;
  flex-shrink: 0;
}

.cu-overview-block-filter-icon .material-symbols-outlined {
  font-size: 1.05rem;
}

.cu-obf-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1.5px solid rgba(45, 46, 95, 0.2);
  background: #fff;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.cu-obf-btn .material-symbols-outlined {
  font-size: 1.05rem;
}

.cu-obf-btn-active {
  background: linear-gradient(90deg, #3b82f6, #46B1E1);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.25);
}

.cu-obf-select-none.cu-obf-btn-active {
  background: #ef4444;
  border-color: #ef4444;
}

/* Overall progress bar */
.cu-overview-progress-bar-wrap {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(45, 46, 95, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(45, 46, 95, 0.06);
}

.cu-overview-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cu-overview-progress-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2D2E5F;
}

.cu-overview-progress-label .material-symbols-outlined {
  font-size: 1rem;
  color: #46B1E1;
}

.cu-overview-progress-pct {
  font-size: 1.1rem;
  font-weight: 800;
  color: #3b82f6;
}

.cu-overview-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(45, 46, 95, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.cu-overview-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #46B1E1);
  border-radius: 8px;
  transition: width 0.4s ease;
  min-width: 0;
}

.cu-overview-progress-sub {
  font-size: 0.78rem;
  color: var(--text-medium, #64748b);
  margin-top: 6px;
}

/* Block cards grid */
.cu-blocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.cu-overview-filterable.cu-overview-card-hidden {
  display: none;
}

/* Block card */
.cu-block-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(45, 46, 95, 0.09);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(45, 46, 95, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, transform 0.12s;
}

.cu-block-card-available:hover,
.cu-block-card-in-progress:hover {
  box-shadow: 0 8px 24px rgba(45, 46, 95, 0.12);
  transform: translateY(-2px);
}

.cu-block-card-locked {
  opacity: 0.75;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.cu-block-card-locked::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.45);
  border-radius: inherit;
  pointer-events: none;
}
.cu-block-lock-badge {
  position: absolute; top: 10px; right: 10px;
  background: #6366f1; color: #fff;
  font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
  display: flex; align-items: center; gap: 4px;
  z-index: 1;
}

.cu-block-card-done {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(240, 253, 247, 0.9);
}

.cu-block-card-in-progress {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(239, 246, 255, 0.9);
}

/* Block card header */
.cu-block-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cu-block-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2D2E5F;
}

/* Status badges */
.cu-block-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cu-badge-available {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.cu-badge-progress {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.cu-badge-done {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.cu-badge-locked {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.cu-block-badge .material-symbols-outlined {
  font-size: 0.85rem;
}

/* Unit rows within block card */
.cu-block-units {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cu-block-unit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  transition: background 0.12s;
}

.cu-block-unit-available {
  cursor: pointer;
  color: var(--text-dark, #0f172a);
  background: rgba(45, 46, 95, 0.03);
  border: 1px solid rgba(45, 46, 95, 0.06);
}

.cu-block-unit-available:hover {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.18);
}

.cu-block-unit-locked {
  color: var(--text-light, #94a3b8);
  background: rgba(45, 46, 95, 0.02);
  border: 1px solid transparent;
}

.cu-bur-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cu-bur-icon .material-symbols-outlined {
  font-size: 0.95rem;
}

.cu-bur-text {
  flex: 1;
  line-height: 1.35;
  font-weight: 500;
}

.cu-bur-done {
  display: flex;
  align-items: center;
  color: #10b981;
  flex-shrink: 0;
}

.cu-bur-done .material-symbols-outlined {
  font-size: 1rem;
}

.cu-bur-arrow {
  display: flex;
  align-items: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.cu-bur-arrow .material-symbols-outlined {
  font-size: 1rem;
}

/* Review row */
.cu-block-review-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 2px;
  transition: background 0.12s;
}

.cu-block-review-available {
  cursor: pointer;
  color: #92400e;
  background: rgba(245, 158, 11, 0.07);
  border: 1.5px solid rgba(245, 158, 11, 0.2);
}

.cu-block-review-available:hover {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.35);
}

.cu-block-review-locked {
  color: var(--text-light, #94a3b8);
  background: rgba(45, 46, 95, 0.02);
  border: 1px solid transparent;
}

.cu-brr-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cu-brr-icon .material-symbols-outlined {
  font-size: 0.95rem;
  color: #f59e0b;
}

.cu-block-review-locked .cu-brr-icon .material-symbols-outlined {
  color: #94a3b8;
}

.cu-brr-text {
  flex: 1;
  font-size: 0.8rem;
}

.cu-brr-done {
  display: flex;
  align-items: center;
  color: #10b981;
  flex-shrink: 0;
}

.cu-brr-done .material-symbols-outlined {
  font-size: 1rem;
}

.cu-brr-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f59e0b;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.cu-brr-badge-locked {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.cu-brr-badge-progress {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
  text-transform: none;
  letter-spacing: 0;
}

/* Block-level progress bar */
.cu-block-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.cu-block-progress-track {
  flex: 1;
  height: 5px;
  background: rgba(45, 46, 95, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.cu-block-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #46B1E1);
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 0;
}

.cu-block-card-done .cu-block-progress-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.cu-block-progress-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  white-space: nowrap;
  min-width: 28px;
  text-align: right;
}

/* Progress indicator in sidebar nav */
.cnb-pct {
  font-size: 0.7rem;
  font-weight: 700;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  margin-right: 2px;
}

.cni-check {
  display: flex;
  align-items: center;
  color: #10b981;
  flex-shrink: 0;
  margin-left: auto;
}

.cni-check .material-symbols-outlined {
  font-size: 0.9rem;
}

.cni-done {
  color: var(--text-medium, #64748b);
}

/* Unit card done state */
.cu-unit-card-done {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(240, 253, 247, 0.95);
}

.cu-unit-card-done-badge {
  display: flex;
  align-items: center;
  color: #10b981;
  flex-shrink: 0;
}

.cu-unit-card-done-badge .material-symbols-outlined {
  font-size: 1.3rem;
}

/* Review unit evaluation banner */
.cu-review-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.06));
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}

.cu-review-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  flex-shrink: 0;
}

.cu-review-banner-icon .material-symbols-outlined {
  font-size: 1.7rem;
  color: #d97706;
}

.cu-review-banner-body {
  flex: 1;
  min-width: 0;
}

.cu-review-banner-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.cu-review-banner-title {
  font-size: 1rem;
  font-weight: 800;
  color: #2D2E5F;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cu-review-banner-covers {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #92400e;
  font-style: italic;
}

.cu-review-banner-covers .material-symbols-outlined {
  font-size: 0.9rem;
  color: #f59e0b;
}

.cu-review-banner-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.cu-review-stat-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #d97706;
  line-height: 1;
}

.cu-review-stat-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

@media (max-width: 600px) {
  .cu-blocks-grid { grid-template-columns: 1fr; }
  .cu-review-banner { flex-wrap: wrap; }
  .cu-review-banner-stat { width: 100%; flex-direction: row; gap: 8px; justify-content: center; }
  .cu-overview-block-filter-wrap {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    overflow: hidden;
  }
  .cu-overview-block-filter-scroll {
    gap: 6px;
  }
  .cu-overview-block-filter-fixed {
    gap: 6px;
  }
  .cu-obf-btn {
    flex: 0 0 auto;
  }
}

/* ── Review total score bar ─────────────────────────────────────────── */
.cu-review-total-score {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  margin: 8px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #92400e;
}

.cu-review-total-score .material-symbols-outlined {
  font-size: 1.1rem;
  color: #d97706;
}

.cu-review-total-label {
  color: #92400e;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cu-review-total-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: #d97706;
}

.cu-review-total-max {
  font-size: 0.88rem;
  color: #78350f;
  font-weight: 600;
}

.cu-review-total-pct {
  font-size: 0.85rem;
  color: #92400e;
  font-weight: 700;
  margin-left: 4px;
}

.cu-block-card-header[onclick]:hover {
  opacity: 0.85;
}

/* ── Progress Test overview card ────────────────────────────────────── */
.cu-pt-overview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(167, 139, 250, 0.05));
  border: 1.5px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.07);
  transition: box-shadow 0.15s, transform 0.12s;
}

.cu-pt-ov-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cu-pt-overview-card.cu-pt-card-available:hover {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.14);
  transform: translateY(-2px);
}

.cu-pt-overview-card.cu-pt-card-done {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04));
}

.cu-pt-overview-card.cu-pt-card-locked {
  opacity: 0.6;
}

.cu-pt-ov-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.12);
  flex-shrink: 0;
}

.cu-pt-ov-icon .material-symbols-outlined {
  font-size: 1.25rem;
  color: #7c3aed;
}

.cu-pt-card-done .cu-pt-ov-icon {
  background: rgba(16, 185, 129, 0.12);
}

.cu-pt-card-done .cu-pt-ov-icon .material-symbols-outlined {
  color: #10b981;
}

.cu-pt-ov-body {
  flex: 1;
  min-width: 0;
}

.cu-pt-ov-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}

.cu-pt-card-done .cu-pt-ov-label {
  color: #10b981;
}

.cu-pt-ov-title {
  font-size: 1rem;
  font-weight: 800;
  color: #2D2E5F;
  line-height: 1.3;
  margin-bottom: 6px;
}

.cu-pt-ov-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 10px;
  padding: 3px 10px;
}

.cu-pt-ov-score .material-symbols-outlined {
  font-size: 0.95rem;
  color: #059669;
}

.cu-pt-ov-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #7c3aed;
}

.cu-pt-ov-cta .material-symbols-outlined {
  font-size: 0.95rem;
}

.cu-pt-ov-check {
  color: #10b981;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.cu-pt-ov-check .material-symbols-outlined {
  font-size: 1.6rem;
}

.cu-pt-ov-lock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  flex-shrink: 0;
}

/* ── Progress Test block view card ──────────────────────────────────── */
.fe-map-pt-block {
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 20px;
  gap: 10px;
}

.fe-map-pt-block .fe-map-lesson-title {
  width: 100%;
  justify-content: space-between;
}

.cu-pt-block-desc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #64748b;
  font-style: italic;
}

.cu-pt-block-desc .material-symbols-outlined {
  font-size: 0.9rem;
  color: #94a3b8;
}

.cu-pt-block-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 10px;
  padding: 5px 12px;
  margin-top: 2px;
}

.cu-pt-block-cta .material-symbols-outlined {
  font-size: 1rem;
}

/* ── Progress Test banner (inside unit view) ─────────────────────────── */
.cu-pt-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.09), rgba(167, 139, 250, 0.05));
  border-color: rgba(124, 58, 237, 0.22);
}

.cu-pt-banner .cu-review-banner-icon {
  background: rgba(124, 58, 237, 0.12);
}

.cu-pt-banner .cu-review-banner-icon .material-symbols-outlined {
  color: #7c3aed;
}

.cu-pt-banner .cu-review-banner-label {
  color: #7c3aed;
}

.cu-pt-banner .cu-review-banner-stat {
  background: rgba(124, 58, 237, 0.09);
  border-color: rgba(124, 58, 237, 0.18);
}

.cu-pt-banner .cu-review-stat-num {
  color: #7c3aed;
}

.cu-pt-banner .cu-review-stat-lbl {
  color: #5b21b6;
}

/* ── Progress Test scoring info line ─────────────────────────────────── */
.cu-pt-scoring-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.07);
  border-radius: 8px;
  padding: 3px 9px;
  margin-bottom: 10px;
}

.cu-pt-scoring-info .material-symbols-outlined {
  font-size: 0.9rem;
  color: #7c3aed;
}

/* ── Word Formation section list ────────────────────────────────────── */
.cu-wf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.cu-wf-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.cu-wf-base {
  font-weight: 800;
  font-size: 0.95rem;
  color: #4f46e5;
  min-width: 90px;
  flex-shrink: 0;
  padding-top: 4px;
}

.cu-wf-chips {
  flex: 1;
  margin: 0;
}

.cu-wf-chip {
  font-size: 0.78rem;
}

/* ── MC gap pill (shows selected option text) ───────────────────────── */
.cu-mc-gap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 1.55em;
  padding: 0 10px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.25;
  color: #64748b;
  vertical-align: baseline;
  margin: 0 2px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cu-mc-gap-pill-filled,
.cu-mc-gap-pill-correct,
.cu-mc-gap-pill-incorrect {
  border-style: solid;
  font-weight: 700;
}

.cu-mc-gap-pill-filled {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #0369a1;
}

.cu-mc-gap-pill-correct {
  background: var(--cu-ex-correct-soft-alt) !important;
  border-color: var(--cu-ex-correct) !important;
  color: var(--cu-ex-correct-text) !important;
}

.cu-mc-gap-pill-incorrect {
  background: #fef3c7 !important;
  border-color: #d97706 !important;
  color: #92400e !important;
}

/* ── Yes/No exercise items ──────────────────────────────────────────── */
.cu-yn-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
}

.cu-yn-row {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.cu-yn-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.cu-yn-content .cu-ex-context {
  margin-bottom: 0;
}

.cu-yn-sentence {
  flex: 1;
  min-width: 0;
}

.cu-yn-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.cu-yn-btn {
  padding: 5px 18px;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #64748b;
  font-family: 'Nunito', sans-serif;
}

.cu-yn-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.cu-yn-btn.cu-yn-selected {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
}

.cu-yn-btn.cu-yn-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
  color: var(--cu-ex-correct-text);
}

.cu-yn-btn.cu-yn-incorrect {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
}

/* Correct answer reveal for YN — the button the student should have chosen */
.cu-yn-btn.cu-yn-correct-reveal {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.22);
  animation: feBounceIn 0.35s ease;
}

/* ── Item tick buttons (Exercise H style: fill-in + tick) ────────────── */
.cu-item-tick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.cu-item-tick-row .cu-yn-buttons {
  margin-left: 0;
}

/* ── OK fill button (Exercise H showOkBtn style: sentence + OK button) ── */
.cu-ok-inline-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cu-ok-inline-sentence {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.cu-ok-inline-row .cu-ok-fill-btn {
  flex-shrink: 0;
  margin-left: auto;
}

.cu-ok-fill-btn {
  padding: 5px 18px;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #64748b;
  font-family: 'Nunito', sans-serif;
}

.cu-ok-fill-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.cu-ok-fill-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ── Word-tick exercise (e.g. Exercise P: tick valid -y adjectives) ─── */
.cu-word-tick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.cu-word-tick-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #334155;
  font-family: 'Nunito', sans-serif;
}

.cu-word-tick-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.cu-word-tick-btn.cu-word-tick-selected {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
}

.cu-word-tick-btn.cu-word-tick-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
  color: var(--cu-ex-correct-text);
}

.cu-word-tick-btn.cu-word-tick-incorrect {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
}

.cu-word-tick-btn.cu-word-tick-reveal {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
  animation: feBounceIn 0.35s ease;
}

/* ── Word-Spot exercise (clickable passage words) ────────────────────── */
.cu-ws-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #374151;
  margin-bottom: 12px;
}
.cu-ws-counter .material-symbols-outlined {
  font-size: 1.1rem;
  color: #6d28d9;
}

.cu-ws-passage {
  line-height: 1.85;
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 14px;
}

.cu-ws-word {
  display: inline;
  cursor: pointer;
  border-radius: 3px;
  padding: 1px 3px;
  transition: background 0.15s, color 0.15s, text-decoration 0.15s;
  border-bottom: 2px solid transparent;
}
.cu-ws-word:hover {
  background: rgba(109, 40, 217, 0.08);
  border-bottom-color: rgba(109, 40, 217, 0.4);
}
.cu-ws-word.cu-ws-selected {
  background: rgba(109, 40, 217, 0.15);
  border-bottom-color: #6d28d9;
  color: #4c1d95;
  text-decoration: line-through;
}
.cu-ws-word.cu-ws-correct {
  background: rgba(249, 115, 22, 0.15);
  border-bottom-color: var(--cu-ex-correct-bright);
  color: var(--cu-ex-correct-text);
  cursor: default;
}
.cu-ws-word.cu-ws-incorrect {
  background: rgba(239, 68, 68, 0.12);
  border-bottom-color: #ef4444;
  color: #b91c1c;
  cursor: default;
}
.cu-ws-word.cu-ws-reveal {
  background: rgba(37, 99, 235, 0.12);
  border-bottom-color: #2563eb;
  color: #1e40af;
  font-weight: 700;
  cursor: default;
  animation: feBounceIn 0.35s ease;
}

/* ── Comma-placement exercise (clickable comma slots) ─────────────────── */
.cu-comma-exercise {
  width: 100%;
}

.cu-comma-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 8px;
}

.cu-comma-item:last-child {
  margin-bottom: 0;
}

.cu-comma-sentence {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  line-height: 1.9;
  font-size: 0.95rem;
  color: #334155;
}

.cu-comma-slot {
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  border: 1.5px dashed #cbd5e1;
  background: #fff;
  color: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  line-height: 1;
}

.cu-comma-slot:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

.cu-comma-slot.cu-comma-selected {
  border-style: solid;
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
}

.cu-comma-slot.cu-comma-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
  color: var(--cu-ex-correct-text);
  cursor: default;
}

.cu-comma-slot.cu-comma-incorrect {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
  cursor: default;
}

.cu-comma-slot.cu-comma-reveal,
.cu-comma-slot.cu-comma-show-correct {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.10);
  color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  cursor: default;
  animation: feBounceIn 0.35s ease;
}

.cu-comma-item.cu-comma-item-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
}

.cu-comma-item.cu-comma-item-incorrect {
  border-color: #ef4444;
  background: #fef2f2;
}

/* ── Find-the-extra-word exercise ───────────────────────────────────── */
.cu-few-exercise {
  width: 100%;
}

.cu-few-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 8px;
}

.cu-few-item:last-child {
  margin-bottom: 0;
}

.cu-few-sentence-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cu-few-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  line-height: 2;
  font-size: 0.95rem;
  color: #334155;
  flex: 1;
  min-width: 0;
}

.cu-few-sentence-plain {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
}

.cu-few-word {
  display: inline;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 3px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border: 1.5px solid transparent;
  user-select: none;
}

.cu-few-word-static {
  display: inline;
  padding: 2px 3px;
}

.cu-few-word:hover {
  background: rgba(109, 40, 217, 0.08);
  border-color: rgba(109, 40, 217, 0.35);
}

.cu-few-word.cu-few-selected {
  background: rgba(109, 40, 217, 0.15);
  border-color: #7c3aed;
  color: #4c1d95;
  text-decoration: line-through;
}

.cu-few-word.cu-few-correct {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--cu-ex-correct-bright);
  color: var(--cu-ex-correct-text);
  cursor: default;
  text-decoration: line-through;
}

.cu-few-word.cu-few-incorrect {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #b91c1c;
  cursor: default;
  text-decoration: line-through;
}

.cu-few-word.cu-few-reveal {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
  color: #1e40af;
  font-weight: 700;
  cursor: default;
  text-decoration: line-through;
  animation: feBounceIn 0.35s ease;
}

.cu-few-word[data-few-disabled="1"] {
  cursor: default;
  pointer-events: none;
}

.cu-few-ok-btn {
  flex-shrink: 0;
  padding: 5px 16px;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #64748b;
  font-family: 'Nunito', sans-serif;
}

.cu-few-ok-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.cu-few-ok-btn.cu-few-ok-selected {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
}

.cu-few-ok-btn.cu-few-ok-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
  color: var(--cu-ex-correct-text);
  cursor: default;
}

.cu-few-ok-btn.cu-few-ok-incorrect {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
  cursor: default;
}

.cu-few-ok-btn.cu-few-ok-reveal {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.10);
  color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
  animation: feBounceIn 0.35s ease;
  cursor: default;
}

.cu-few-passage-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1e293b;
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #e2e8f0;
}

.cu-few-item.cu-few-ok-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
}

.cu-few-item.cu-few-ok-reveal {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.07);
}

/* ── Bold-Correct exercise ───────────────────────────────────────────── */
.cu-bc-exercise {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cu-bc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 8px;
}

.cu-bc-item:last-child {
  margin-bottom: 0;
}

.cu-bc-row {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cu-bc-sentence {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.65;
}

.cu-bc-sentence strong {
  font-weight: 700;
  color: #1e293b;
}

.cu-bc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cu-bc-input {
  flex: 1;
  min-width: 120px;
  max-width: 100%;
}

.cu-bc-ok-btn {
  flex-shrink: 0;
  padding: 5px 18px;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #64748b;
  font-family: 'Nunito', sans-serif;
}

.cu-bc-ok-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.cu-bc-ok-btn.cu-bc-ok-selected {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
}

.cu-bc-ok-btn.cu-bc-ok-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
  color: var(--cu-ex-correct-text);
  cursor: default;
}

.cu-bc-ok-btn.cu-bc-ok-incorrect {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
  cursor: default;
}

.cu-bc-ok-btn.cu-bc-ok-reveal {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.10);
  color: #1e40af;
  font-weight: 700;
  animation: feBounceIn 0.35s ease;
  cursor: default;
}

.cu-bc-item.cu-bc-item-correct {
  border-color: var(--cu-ex-correct-bright);
  background: var(--cu-ex-correct-soft);
}

.cu-bc-item.cu-bc-item-incorrect {
  border-color: #ef4444;
  background: #fef2f2;
}

.cu-bc-reveal {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e40af;
  background: rgba(37, 99, 235, 0.10);
  border: 1.5px solid #2563eb;
  border-radius: 6px;
  padding: 3px 10px;
  animation: feBounceIn 0.35s ease;
}

/* textarea variant of bold-correct (Section I style) */
.cu-bc-controls-textarea {
  flex-direction: column;
  align-items: stretch;
}

.cu-bc-controls-textarea .cu-bc-input {
  max-width: 100%;
  width: 100%;
  resize: vertical;
}

.cu-bc-controls-textarea .cu-bc-ok-btn {
  align-self: flex-start;
}

/* ── Key Word Transformation (reading4 style) ───────────────────────── */
.cu-kwtrans-item {
  display: flex;
  flex-direction: column;
}

.cu-kwtrans-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cu-kwtrans-original {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.5;
}

.cu-kwtrans-keyword-row {
  display: flex;
  align-items: center;
}

.cu-kwtrans-keyword {
  display: inline-block;
  padding: 2px 10px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cu-kwtrans-second {
  font-size: 0.92rem;
  color: #334155;
  line-height: 2;
}

/* Inline word bank for KW transform: shown on small screens only (see mobile + display rule) */
.cu-kwtrans-wordbank-slot {
  display: none;
}

/* ── Sync (one-word-for-three) exercise ──────────────────────────────── */
.cu-sync-sentences {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cu-sync-sentence {
  padding: 4px 0;
  line-height: 2;
  font-size: 0.92rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.cu-sync-sentence:last-child {
  border-bottom: none;
}

/* ── Passage exercise (word formation text with inline gaps) ─────────── */
.cu-passage-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e293b;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 6px 14px;
  margin-bottom: 10px;
  text-align: center;
}

.cu-passage-text {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px 24px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  line-height: 1.9;
  text-align: justify;
  hyphens: auto;
  color: #3c3c3c;
  margin-bottom: 12px;
}

.cu-wf-gap-wrap {
  display: inline;
}

/* ── Inline multiple-choice exercise (exercise C/E style) ───────────── */
.cu-mc-inline-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.cu-mc-inline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 1px 4px rgba(45, 46, 95, 0.04);
  position: relative;
}

.cu-mc-inline-item .cu-ex-sentence {
  flex: 1;
  line-height: 2.2;
  margin-bottom: 0;
}

/* Sentence top-padding modifier (ex.sentencePaddingTop) */
.cu-mc-inline-sentence-pt .cu-mc-inline-item .cu-ex-sentence {
  padding-top: 10px;
}

/* Continuous email/passage block (ex.continuous) – no per-item badges */
.cu-mc-inline-continuous {
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 1px 4px rgba(45, 46, 95, 0.04);
  padding: 14px 18px;
}
.cu-mc-inline-continuous .cu-ex-sentence {
  line-height: 2.2;
  margin-bottom: 0;
}

/* ── Multiple-choice passage gap pills (exercise D style) ───────────── */
.cu-mc-passage-gap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  vertical-align: middle;
  margin: 0 2px;
}

.cu-mc-passage-gap-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1.5;
  flex-shrink: 0;
}

.cu-mc-passage-gap-slot {
  display: inline-block;
  min-width: 90px;
  padding: 2px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  font-weight: 500;
  font-size: 0.88rem;
  color: #64748b;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  vertical-align: middle;
  line-height: 1.4;
  height: 20px;
}

.cu-mc-passage-gap-slot.cu-mc-passage-gap-filled {
  background: #e0f2fe;
  border-color: #38bdf8;
  border-style: solid;
  color: #0369a1;
  font-weight: 700;
}

.cu-mc-passage-gap:hover .cu-mc-passage-gap-slot:not(.cu-mc-passage-gap-filled) {
  background: #e2e8f0;
  border-color: #64748b;
}

.cu-mc-passage-gap.cu-mc-passage-gap-answered .cu-mc-passage-gap-slot {
  background: #e0f2fe;
  border-color: #38bdf8;
  border-style: solid;
  color: #0369a1;
  font-weight: 700;
}

.cu-mc-passage-gap.cu-mc-passage-gap-correct .cu-mc-passage-gap-slot {
  background: var(--cu-ex-correct-soft);
  border-color: var(--cu-ex-correct-bright);
  border-style: solid;
  color: var(--cu-ex-correct-text);
}

.cu-mc-passage-gap.cu-mc-passage-gap-incorrect .cu-mc-passage-gap-slot {
  background: #fff7ed;
  border-color: #f97316;
  border-style: solid;
  color: #c2410c;
}

/* Show-correct state: revealed correct answers (used by "Show answers" toggle and "Correct answers" view) */
.cu-mc-passage-gap.cu-mc-passage-gap-show-correct .cu-mc-passage-gap-slot {
  background: #f5f3ff;
  border-color: #a78bfa;
  border-style: solid;
  color: #6d28d9;
  font-weight: 700;
}

/* Split gap: two-slot pill for sentences with (N) ...... FIXED_TEXT ...... */
.cu-mc-passage-gap-split .cu-mc-passage-gap-slot {
  display: none;
}

.cu-mc-passage-gap-slot-pre,
.cu-mc-passage-gap-slot-post {
  display: inline-block;
  min-width: 60px;
  padding: 2px 10px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  font-weight: 500;
  font-size: 0.88rem;
  color: #64748b;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  vertical-align: middle;
  line-height: 1.4;
  min-height: 20px;
}

.cu-mc-passage-gap-mid {
  font-size: 0.9rem;
  color: #475569;
  padding: 0 3px;
}

.cu-mc-passage-gap-split:hover .cu-mc-passage-gap-slot-pre,
.cu-mc-passage-gap-split:hover .cu-mc-passage-gap-slot-post {
  background: #e2e8f0;
  border-color: #64748b;
}

.cu-mc-passage-gap-split.cu-mc-passage-gap-answered .cu-mc-passage-gap-slot-pre,
.cu-mc-passage-gap-split.cu-mc-passage-gap-answered .cu-mc-passage-gap-slot-post {
  background: #e0f2fe;
  border-color: #38bdf8;
  border-style: solid;
  color: #0369a1;
  font-weight: 700;
}

.cu-mc-passage-gap-split.cu-mc-passage-gap-correct .cu-mc-passage-gap-slot-pre,
.cu-mc-passage-gap-split.cu-mc-passage-gap-correct .cu-mc-passage-gap-slot-post {
  background: var(--cu-ex-correct-soft);
  border-color: var(--cu-ex-correct-bright);
  border-style: solid;
  color: var(--cu-ex-correct-text);
}

.cu-mc-passage-gap-split.cu-mc-passage-gap-incorrect .cu-mc-passage-gap-slot-pre,
.cu-mc-passage-gap-split.cu-mc-passage-gap-incorrect .cu-mc-passage-gap-slot-post {
  background: #fff7ed;
  border-color: #f97316;
  border-style: solid;
  color: #c2410c;
}

.cu-mc-passage-gap-split.cu-mc-passage-gap-show-correct .cu-mc-passage-gap-slot-pre,
.cu-mc-passage-gap-split.cu-mc-passage-gap-show-correct .cu-mc-passage-gap-slot-post {
  background: #f5f3ff;
  border-color: #a78bfa;
  border-style: solid;
  color: #6d28d9;
  font-weight: 700;
}

/* View-toggle buttons added after check (Your answers / Correct answers) */
.cu-mc-passage-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cu-mc-passage-view-btn .material-symbols-outlined {
  font-size: 1rem;
}

.cu-mc-passage-view-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #1e293b;
}

.cu-mc-passage-view-btn.cu-mc-passage-view-active {
  background: #0369a1;
  color: #fff;
  border-color: #0369a1;
}

/* ── Two-column matching exercise ────────────────────────────────────── */
.cu-match-exercise {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cu-match-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.cu-match-left-cell,
.cu-match-right-cell {
  width: 50%;
  padding: 0;
  vertical-align: top;
}

.cu-match-left-cell {
  padding-right: 6px;
}

.cu-match-right-cell {
  padding-left: 6px;
}

.cu-match-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.4;
  height: 100%;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s;
}

.cu-match-right-item {
  cursor: grab;
  user-select: none;
}

.cu-match-right-item:active {
  cursor: grabbing;
}

.cu-match-right-item.cu-match-dragging {
  opacity: 0.5;
  background: #dbeafe;
  border-color: #3b82f6;
}

.cu-match-right-item.cu-match-drag-over {
  background: #eff6ff;
  border-color: #60a5fa;
  border-style: dashed;
}

.cu-match-num,
.cu-match-letter {
  font-weight: 800;
  font-size: 0.82rem;
  min-width: 20px;
  flex-shrink: 0;
  color: #3b82f6;
}

.cu-match-letter {
  color: #7c3aed;
}

.cu-match-correct {
  background: var(--cu-ex-correct-soft-alt) !important;
  border-color: var(--cu-ex-correct-bright) !important;
}

.cu-match-show-correct {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
}

.cu-match-incorrect {
  background: #fff7ed !important;
  border-color: #f97316 !important;
}

/* Toggle button for matching exercise correct-order view */
.cu-match-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.07);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.cu-match-view-btn:hover {
  background: rgba(37, 99, 235, 0.13);
}
.cu-match-view-btn .material-symbols-outlined {
  font-size: 1rem;
  vertical-align: middle;
}
.cu-match-view-btn[data-mode="correct"] {
  color: var(--cu-ex-correct-text);
  background: var(--cu-ex-correct-muted);
  border-color: var(--cu-ex-correct-border-strong);
}
.cu-match-view-btn[data-mode="correct"]:hover {
  background: var(--cu-ex-correct-muted-strong);
}

/* Keyword-row inside kwtrans-match left cell */
.cu-match-kwrow {
  margin: 0;
  flex: 1;
}
.cu-match-kwrow .cu-kwtrans-keyword {
  text-transform: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: normal;
  word-break: break-word;
}

/* ── Custom confirm dialog ───────────────────────────────────────────── */
.cu-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.cu-confirm-dialog {
  background: #fff;
  border-radius: 18px;
  padding: 28px 32px 22px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: 'Nunito', sans-serif;
}

.cu-confirm-message {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
  text-align: center;
}

.cu-confirm-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.cu-confirm-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: 'Nunito', sans-serif;
}

.cu-confirm-cancel {
  background: #f1f5f9;
  color: #64748b;
}

.cu-confirm-cancel:hover {
  background: #e2e8f0;
}

.cu-confirm-ok {
  background: #3b82f6;
  color: #fff;
}

.cu-confirm-ok:hover {
  background: #2563eb;
}

.cu-admin-advance-dialog {
  max-width: 420px;
}

.cu-admin-advance-badge {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cu-admin-advance-hint {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.45;
  text-align: center;
}

.cu-admin-advance-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cu-admin-advance-skip {
  background: #10b981;
  color: #fff;
}

.cu-admin-advance-skip:hover {
  background: #059669;
}

.cu-admin-advance-test {
  background: #3b82f6;
  color: #fff;
}

.cu-admin-advance-test:hover {
  background: #2563eb;
}

.course-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 14px;
  padding: 16px 18px;
  min-height: 52px;
  border-radius: 12px;
  border: 1px dashed #fbbf24;
  background: #fffbeb;
  box-sizing: border-box;
}

.course-admin-toolbar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  letter-spacing: 0.02em;
}

.course-admin-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: #f59e0b;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.course-admin-toolbar-btn:hover {
  background: #d97706;
}

.course-admin-toolbar-btn .material-symbols-outlined {
  font-size: 1.1rem;
}

/* ── COURSE HUB TILES (Theory + Phrasal Verbs + Idioms + Word Formation) ── */
.course-hub-tiles {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.course-hub-theory {
  border-radius: 16px;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.course-hub-theory:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.course-hub-theory-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.course-hub-theory-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.course-hub-theory-desc {
  font-size: 0.83rem;
  opacity: 0.75;
  margin-top: 2px;
}

.course-hub-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.course-hub-tile {
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.course-hub-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.course-hub-tile-icon {
  font-size: 1.8rem;
}

.course-hub-tile-title {
  font-weight: 700;
  font-size: 0.92rem;
}

/* Course hub grid: 2-col grid with Theory card spanning full width */
.course-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.course-hub-grid .fe-category-card:first-child {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .course-hub-three {
    grid-template-columns: 1fr 1fr;
  }
  .course-hub-grid {
    grid-template-columns: 1fr;
  }
  .course-hub-grid .fe-category-card:first-child {
    grid-column: 1;
  }
}

/* ── Drag-category exercise (Exercise G/M style) ──────────────────────────── */
.cu-drag-category-exercise { display: flex; flex-direction: column; gap: 12px; }
.cu-drag-pool { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: var(--bg-2, #f5f5f5); border-radius: 8px; min-height: 44px; align-items: flex-start; align-content: flex-start; }
.cu-drag-chip { display: inline-flex; align-items: center; padding: 5px 12px; background: var(--accent, #1976d2); color: #fff; border-radius: 20px; font-size: 0.88rem; font-weight: 500; cursor: grab; user-select: none; transition: opacity .15s, box-shadow .15s; align-self: flex-start; flex: 0 0 auto; }
.cu-drag-chip:active { cursor: grabbing; opacity: .8; }
.cu-drag-zones { display: flex; gap: 12px; flex-wrap: wrap; }
.cu-drag-zone { flex: 1 1 120px; border: 2px dashed var(--border, #ccc); border-radius: 8px; padding: 8px; min-height: 60px; transition: border-color .15s, background .15s; }
.cu-drag-zone-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #888); margin-bottom: 6px; }
.cu-drag-zone-items { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; align-items: flex-start; align-content: flex-start; }
.cu-drag-zone-over { border-color: var(--accent, #1976d2); background: var(--accent-light, #e3f0fb); }
.cu-drag-chip-correct { background: var(--cu-ex-correct, #ea580c) !important; }
.cu-drag-chip-incorrect { background: var(--incorrect, #c62828) !important; }
.cu-drag-chip-unplaced { background: var(--text-muted, #888) !important; }

/* ── Grouped exercise (Exercise A/B style) ────────────────────────────────── */
.cu-grouped-exercise { display: flex; flex-direction: column; gap: 16px; }
.cu-group-section { display: flex; flex-direction: column; gap: 8px; }
.cu-group-wordbank { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: var(--bg-2, #f5f5f5); border-radius: 8px; font-size: .88rem; }
.cu-group-wordbank .material-symbols-outlined { font-size: 1.1rem; color: var(--text-muted, #888); flex-shrink: 0; }

/* ── Passage-input exercise (Exercise C style) ────────────────────────────── */
.cu-pi-gap-wrap { display: inline; }
.cu-pi-pill { display: inline-flex; align-items: center; gap: 2px; }
.cu-pi-input { min-width: 60px; max-width: 160px; }

/* ── Crossword exercise (clue-list style) ────────────────────────────────── */
.cu-cw-exercise { display: flex; flex-direction: column; gap: 16px; }
.cu-cw-section { display: flex; flex-direction: column; gap: 8px; }
.cu-cw-section-label { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent, #1976d2); padding-bottom: 4px; border-bottom: 2px solid var(--accent, #1976d2); }
.cu-cw-clue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cu-cw-clue-item { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; background: var(--bg-2, #f5f5f5); border-radius: 6px; }
.cu-cw-clue-item::marker { display: none; }
.cu-cw-clue-text { font-size: .9rem; color: var(--text, #222); }
.cu-cw-clue-num { font-weight: 700; color: var(--accent, #1976d2); margin-right: 2px; }
.cu-cw-input-row { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.cu-cw-box { display: inline-block; width: 26px; height: 26px; border: 1.5px solid var(--border, #ccc); border-radius: 3px; background: #fff; text-align: center; font-size: .9rem; font-weight: 600; padding: 0; line-height: 26px; cursor: text; outline: none; transition: border-color .15s, background .15s; }
.cu-cw-box:focus { border-color: var(--accent, #1976d2); box-shadow: 0 0 0 2px rgba(25,118,210,.18); }
.cu-cw-box:disabled { cursor: default; }
.cu-cw-letter-correct { background: var(--cu-ex-correct-soft) !important; border-color: var(--cu-ex-correct-bright) !important; color: var(--cu-ex-correct-text); }
.cu-cw-letter-incorrect { background: #fce4ec !important; border-color: #e53935 !important; color: #c62828; }
.cu-cw-box.cu-input-show-correct { background: var(--ex-feedback-bg, #fff) !important; border-color: #8b5cf6 !important; color: #5b21b6; }
.cu-cw-answer-reveal { font-size: .82rem; font-weight: 600; color: var(--accent, #1976d2); margin-top: 3px; letter-spacing: .04em; }
.cu-cw-input { display: none; }

.cu-correct-inline {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  background: var(--cu-ex-correct-soft);
  color: var(--cu-ex-correct-text);
  border-radius: 4px;
  font-size: 0.82em;
  font-weight: 500;
  border: 1px solid #fdba74;
  white-space: nowrap;
}

.cu-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 7px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  color: #3b82f6;
  vertical-align: middle;
  line-height: 1;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cu-copy-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #2563eb;
}
.cu-copy-btn:active {
  background: #bfdbfe;
}

@media (max-width: 768px), ((max-height: 520px) and (orientation: landscape) and (max-width: 1024px) and ((pointer: coarse) or (any-pointer: coarse))) {
  .cu-unit-section .fe-map-lesson .fe-map-points-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    overflow-x: visible;
  }

  .course-hub-grid {
    gap: 10px;
  }

  .course-hub-grid .fe-category-card {
    padding: 14px;
    border-radius: 16px;
  }

  .course-hub-grid .fe-category-card-header {
    gap: 10px;
  }

  .course-hub-grid .fe-category-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 1.55rem;
  }

  .cu-dot-nav,
  .cu-ex-pdot {
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
  }

  .cu-dot-nav {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  .cu-ex-pdot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
  }

  .cu-ex-pdot.cu-ex-pdot-label {
    aspect-ratio: auto;
    width: auto !important;
    height: auto !important;
    min-width: 64px !important;
    min-height: 32px !important;
    padding: 5px 14px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    line-height: 1.15;
  }

  .cu-section-nav {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .cu-section-nav > :nth-child(2) {
    justify-self: stretch;
    min-width: 0;
  }

  .cu-nav-btn,
  .cu-reset-btn:not(.cu-reset-btn-sm),
  #courseCenterSection .subpage-back-btn {
    gap: 0;
    min-width: 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
    font-size: 0;
  }

  .cu-nav-btn .material-symbols-outlined,
  .cu-reset-btn:not(.cu-reset-btn-sm) .cu-reset-icon,
  .subpage-back-btn .material-symbols-outlined {
    width: 1.25rem;
    height: 1.25rem;
  }

  .cu-reset-btn-sm,
  .cu-reset-btn-sm.cu-reset-btn {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .cu-reset-btn-sm:hover {
    background: rgba(239, 68, 68, 0.12) !important;
  }

  .cu-reset-btn-sm .cu-reset-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .cu-reset-btn span,
  .subpage-back-btn span:not(.material-symbols-outlined) {
    display: none;
  }

  .cu-check-btn,
  .cu-show-all-btn,
  .cu-retry-btn {
    min-width: 44px;
    width: 44px;
    height: 44px;
    min-height: 44px !important;
    padding: 0;
    font-size: 0;
    border-radius: 14px;
    justify-content: center;
    align-items: center;
    gap: 0;
  }

  .cu-check-btn .material-symbols-outlined,
  .cu-show-all-btn .material-symbols-outlined,
  .cu-retry-btn .material-symbols-outlined {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1;
  }

  /* Middle column stretches on phones; center icon + label in the bar */
  .cu-section-nav .cu-entendido-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .cu-ex-page-dots {
    gap: 7px;
    margin-bottom: 10px;
  }

  /* Unit header: one compact row on phones */
  .subpage-header--course-unit {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 14px;
  }
  .subpage-header--course-unit .subpage-subtitle {
    display: none;
  }
  .subpage-header--course-unit .subpage-title {
    font-size: 0.92rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .subpage-header--course-unit .subpage-title .material-symbols-outlined {
    font-size: 1.05rem;
  }

  .subpage-header--course-theory {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 14px;
    align-items: center;
  }
  .subpage-header--course-theory .subpage-subtitle {
    display: none;
  }
  .subpage-header--course-theory .subpage-title {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .cu-section {
    padding: 14px 14px;
    border-radius: 14px;
  }

  .cu-section-title {
    font-size: 0.92rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    gap: 6px;
  }

  /* No numeric labels inside course exercise sections on phones (badges, gap nums, hint pills,
     embedded reading/listening gap markers, etc.). Scoped to .cu-exercise so hub/overview UI keeps block labels.
     Matching exercise numbers (.cu-match-num, .cu-match-letter) are kept visible. */
  .cu-section.cu-exercise :is(
    .cu-ex-num-badge,
    .cu-ex-num-circle,
    .cu-hint-pill-num,
    .cu-mc-passage-gap-num,
    .cu-cw-clue-num,
    .cu-alt-badge:not(.cu-theory-alt-badge),
    .reading-type1-gap-number,
    .reading-type2-gap-number,
    .reading-type3-gap-number,
    .reading-type7-gap-num,
    .reading-type7-gap-number,
    .gap-number,
    .gap-number-outside,
    .reading-type4-number,
    .reading-type4-answer-route-num,
    .reading-type5-question-number,
    .listening-type4-q-number
  ) {
    display: none !important;
  }

  .cu-ex-sentence,
  .cu-bc-sentence,
  .cu-sync-sentence,
  .cu-passage-text {
    display: block;
    line-height: 1.75;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .cu-kwtrans-wordbank-slot {
    display: block;
    margin: 4px 0 10px;
  }

  .cu-ex-wordbank--kwtrans-top {
    display: none !important;
  }

  .cu-kwtrans-wordbank-slot .cu-ex-wordbank {
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 2rem;
    padding: 4px 6px;
    gap: 3px 5px;
    align-content: center;
    border-style: dashed;
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.04);
  }

  /* KW trans match: circular A/B buttons (avoid stretched ovals on narrow rows) */
  button.cu-ex-kwtrans-label.cu-ab-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    align-self: flex-start;
    line-height: 1;
    font-size: 0.76rem;
    -webkit-appearance: none;
    appearance: none;
  }

  /* Keep gaps inside the sentence flow (not full-width rows) so text + answer + hint wrap
     naturally, e.g. "… he [answer wraps] [write] a letter …" */
  .cu-wf-gap-wrap,
  .cu-pi-gap-wrap {
    display: inline-block;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 2px 2px;
    vertical-align: text-bottom;
  }

  /* Hint-gap: one compact row (num + underline field + hint); wraps as a unit in the passage */
  .cu-hint-pill,
  .cu-hint-pill.cu-pi-pill {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    align-content: flex-start;
    gap: 4px 8px;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0 1px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box;
    vertical-align: text-bottom;
  }

  .cu-hint-pill:focus-within {
    border: none !important;
    box-shadow: none !important;
  }

  .cu-hint-gap-stack {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    max-width: 100%;
    margin: 0 2px 0 0;
    box-sizing: border-box;
  }
  .cu-hint-gap-hintline {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    width: fit-content;
    max-width: 100%;
    order: 2;
  }
  .cu-hint-gap-fieldline {
    display: inline-block;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    order: 1;
  }
  .cu-hint-gap-fieldline > .cu-inline-gap-wrap {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
  }

  .cu-hint-pill:has(.cu-hint-word):not(.cu-hint-pill-slash-hint) {
    flex-wrap: nowrap;
    align-items: center;
  }

  .cu-hint-pill:has(.cu-hint-word):not(.cu-hint-pill-slash-hint) span.cu-inline-gap-wrap.cu-hint-pill-input.cu-gap-inline-editable:not(.cu-inline-gap-wrap--block) {
    padding-bottom: 1px !important;
    margin-bottom: 0 !important;
  }

  .cu-hint-pill-word,
  .cu-hint-pill .cu-hint-word,
  .cu-hint-gap-stack .cu-hint-word,
  .cu-hint-pill-slash-wrap .cu-hint-slash-hint-line .cu-hint-word,
  .cu-hint-pill-slash-wrap .cu-hint-slash-hint-line .cu-hint-pill-word {
    flex-shrink: 0;
    align-self: center;
    max-width: 100%;
    margin: 0 0 0 2px;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    background: var(--white, #fff) !important;
    border: 2px solid #e2e8f4 !important;
    border-bottom-width: 3px !important;
    border-bottom-color: #dce3f0 !important;
    box-shadow: 0 2px 0 #dce3f0 !important;
    color: var(--text-dark, #0f172a);
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  /* Slash-separated hints: keep hint and field inline until the row genuinely runs out of room. */
  .cu-hint-pill-slash-wrap {
    display: inline-flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    gap: 2px 6px;
    vertical-align: baseline;
  }

  .cu-hint-slash-hint-line {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100%;
    align-items: center;
  }

  .cu-hint-pill-slash-wrap > .cu-hint-slash-field {
    align-self: auto !important;
    width: auto !important;
  }

  .cu-hint-slash-field {
    display: inline-flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    align-content: center;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Slash hints: pill numbers hidden on mobile — layout as if no num (DOM may still contain span) */
  .cu-hint-pill-slash-wrap .cu-hint-slash-hint-line .cu-hint-word,
  .cu-hint-pill-slash-wrap .cu-hint-slash-hint-line .cu-hint-pill-word {
    align-self: flex-start;
  }

  .cu-hint-slash-field textarea.cu-hint-pill-input,
  .cu-hint-slash-field input.cu-hint-pill-input {
    order: 0 !important;
    flex: 0 1 auto;
    width: auto !important;
    max-width: 100% !important;
    min-width: 5ch !important;
  }

  .cu-hint-pill-mid {
    white-space: normal;
    line-height: 1.5;
    padding: 2px 0;
  }

  /* Slash hints: contenteditable block field below hint row (same as textarea ordering) */
  .cu-hint-slash-field span.cu-inline-gap-wrap.cu-gap-inline-editable.cu-inline-gap-wrap--block {
    order: 0 !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 5ch !important;
  }

  /* Non-slash hint pills: no flex row — field + hint flow like normal inline text (ex. B, passage-input F) */
  .cu-ex-sentence .cu-hint-pill:not(.cu-hint-pill-slash-hint),
  .cu-bc-sentence .cu-hint-pill:not(.cu-hint-pill-slash-hint),
  .cu-sync-sentence .cu-hint-pill:not(.cu-hint-pill-slash-hint),
  .cu-ex-kwtrans-text .cu-hint-pill:not(.cu-hint-pill-slash-hint),
  .cu-passage-text .cu-hint-pill.cu-pi-pill:not(.cu-hint-pill-slash-hint) {
    display: inline !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    align-items: baseline !important;
    align-content: unset !important;
    gap: 0 !important;
    vertical-align: baseline;
    width: auto !important;
    max-width: none !important;
  }

  .cu-passage-text .cu-pi-gap-wrap {
    display: inline !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 2px 0 0;
    vertical-align: baseline;
  }

  .cu-passage-text .cu-pi-gap-wrap.cu-hint-pill-slash-wrap,
  .cu-passage-text .cu-wf-gap-wrap.cu-hint-pill-slash-wrap {
    display: inline-flex !important;
    flex-direction: column !important;
    width: auto !important;
    max-width: 100% !important;
    vertical-align: text-bottom;
  }

  /* Sentence gaps (mobile): contenteditable inline flow; underline anchored to bottom padding so it does not cross text */
  span.cu-inline-gap-wrap.cu-gap-inline-editable:not(.cu-inline-gap-wrap--block) {
    display: inline !important;
    vertical-align: baseline;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    flex-grow: 0 !important;
    padding: 0 3px 2px;
    margin: 0 1px;
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    border: none !important;
    border-radius: 0;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background-color: transparent;
    background-image: linear-gradient(to right, #7a9cff 100%, #7a9cff 100%);
    background-position: 0 100%;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    box-shadow: none;
    outline: none;
    cursor: text;
    -webkit-user-select: text;
    user-select: text;
    box-sizing: border-box;
  }

  span.cu-inline-gap-wrap.cu-gap-inline-editable:not(.cu-inline-gap-wrap--block):focus {
    background-color: rgba(59, 130, 246, 0.06);
    background-image: linear-gradient(to right, #2563eb 100%, #2563eb 100%);
    background-position: 0 100%;
    background-size: 100% 2px;
    background-repeat: no-repeat;
  }

  span.cu-inline-gap-wrap.cu-gap-inline-editable.cu-gap-editable-empty[data-placeholder]::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
  }

  span.cu-inline-gap-wrap.cu-inline-gap-wrap--block.cu-gap-inline-editable {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    margin-top: 6px;
    padding-bottom: 2px;
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    border: none !important;
    border-radius: 0;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background-color: transparent;
    background-image: linear-gradient(to right, #7a9cff 100%, #7a9cff 100%);
    background-position: 0 100%;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    outline: none;
    cursor: text;
    -webkit-user-select: text;
    user-select: text;
  }

  span.cu-inline-gap-wrap.cu-inline-gap-wrap--block.cu-gap-inline-editable:focus {
    background-color: rgba(59, 130, 246, 0.06);
    background-image: linear-gradient(to right, #2563eb 100%, #2563eb 100%);
    background-position: 0 100%;
    background-size: 100% 2px;
    background-repeat: no-repeat;
  }

  span.cu-inline-gap-wrap.cu-gap-inline-editable[contenteditable="false"] {
    cursor: default;
    opacity: 0.92;
  }

  /* Inline gaps: underline-only, fluid wrap (textarea auto-grows height) */
  input.cu-gap-input:not(.cu-gap-textarea):not(.cu-cw-input),
  textarea.cu-gap-input.cu-gap-inline-textarea {
    display: inline-block;
    vertical-align: baseline;
    width: auto !important;
    min-width: 5ch;
    max-width: 100%;
    margin: 4px 2px;
    padding: 3px 6px 1px !important;
    font-size: 0.86rem !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 2px solid #2563eb !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box;
  }

  .cu-inline-gap-wrap:not(.cu-inline-gap-wrap--block) textarea.cu-gap-input.cu-gap-inline-textarea {
    flex: 1 1 10ch;
    min-width: 5ch !important;
    max-width: 100% !important;
    width: auto !important;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.45;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .cu-inline-gap-wrap--block textarea.cu-gap-input.cu-gap-inline-textarea {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    flex: none;
  }

  textarea.cu-hint-pill-input {
    display: block;
    flex: 1 1 10ch;
    width: auto !important;
    max-width: 100% !important;
    min-width: 5ch !important;
    min-height: 1.75rem;
    margin: 0 2px 2px 0 !important;
    padding: 2px 2px 1px !important;
    font-size: 0.9rem !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 2px solid #2563eb !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.45;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  /* Hint + gap row: minimal space under the field so the blue underline clears descenders */
  .cu-hint-gap-fieldline textarea.cu-gap-input.cu-gap-inline-textarea,
  .cu-hint-gap-fieldline input.cu-gap-input:not(.cu-gap-textarea):not(.cu-cw-input) {
    padding-bottom: 1px !important;
    margin-bottom: 0 !important;
  }

  .cu-hint-gap-fieldline span.cu-inline-gap-wrap.cu-gap-inline-editable:not(.cu-inline-gap-wrap--block) {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  .cu-hint-pill:has(.cu-hint-word):not(.cu-hint-pill-slash-hint) textarea.cu-hint-pill-input,
  .cu-hint-pill:has(.cu-hint-word):not(.cu-hint-pill-slash-hint) input.cu-hint-pill-input {
    margin-bottom: 0 !important;
    padding-bottom: 1px !important;
  }

  @supports (field-sizing: content) {
    input.cu-gap-input:not(.cu-gap-textarea):not(.cu-cw-input),
    textarea.cu-gap-input.cu-gap-inline-textarea {
      field-sizing: content;
    }
  }

  input.cu-gap-input:not(.cu-gap-textarea):not(.cu-cw-input):focus,
  textarea.cu-gap-input.cu-gap-inline-textarea:focus,
  textarea.cu-hint-pill-input:focus {
    border-bottom-color: #2563eb !important;
    box-shadow: none !important;
    background: rgba(59, 130, 246, 0.06) !important;
  }

  .cu-bc-controls {
    flex-direction: column;
    align-items: stretch;
  }

  /* Error-correction OK chips: on phones students type OK in the field (button hidden) */
  .cu-ok-inline-row .cu-ok-fill-btn,
  .cu-bc-ok-btn {
    display: none !important;
  }

  .cu-bc-input {
    flex: 1 1 auto;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  textarea.cu-bc-input.cu-gap-inline-textarea {
    display: block !important;
  }

  /* Passage-input gaps: same inline underline behaviour as other hint pills */
  .cu-pi-input.cu-hint-pill-input {
    min-width: 5ch !important;
    max-width: 100% !important;
    width: auto !important;
  }

  .cu-ex-instructions {
    font-size: 0.8rem;
    padding: 8px 10px;
    line-height: 1.45;
  }

  /* Word bank: dense chips — minimal padding/gap/fonts so more tokens fit per row */
  .cu-ex-wordbank {
    font-size: 0.72rem;
    padding: 4px 7px;
    line-height: 1.2;
    border-radius: 8px;
    gap: 3px 5px;
    margin-bottom: 8px;
    align-items: center;
    align-content: center;
  }

  .cu-ex-wordbank .material-symbols-outlined {
    font-size: 0.85rem;
    margin-top: 0.08em;
  }

  .cu-wordbank-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px 3px;
    min-height: 24px;
    line-height: 1.15;
    border-radius: 6px;
    border-width: 1.5px;
    box-sizing: border-box;
  }

  .cu-ex-item {
    padding: 12px 12px;
    min-width: 0;
  }

  input.cu-gap-input.cu-input-correct:not(.cu-gap-textarea):not(.cu-cw-input),
  textarea.cu-gap-input.cu-gap-inline-textarea.cu-input-correct,
  textarea.cu-hint-pill-input.cu-input-correct {
    border-bottom-color: var(--cu-ex-correct) !important;
    background: var(--cu-ex-correct-muted) !important;
  }
  span.cu-inline-gap-wrap.cu-gap-inline-editable.cu-input-correct {
    border: none !important;
    background-color: var(--cu-ex-correct-muted) !important;
    background-image: linear-gradient(to right, var(--cu-ex-correct) 100%, var(--cu-ex-correct) 100%) !important;
    background-position: 0 100% !important;
    background-size: 100% 2px !important;
    background-repeat: no-repeat !important;
  }
  input.cu-gap-input.cu-input-incorrect:not(.cu-gap-textarea):not(.cu-cw-input),
  textarea.cu-gap-input.cu-gap-inline-textarea.cu-input-incorrect,
  textarea.cu-hint-pill-input.cu-input-incorrect {
    border-bottom-color: #d97706 !important;
    background: rgba(217, 119, 6, 0.08) !important;
  }
  span.cu-inline-gap-wrap.cu-gap-inline-editable.cu-input-incorrect {
    border: none !important;
    background-color: rgba(217, 119, 6, 0.08) !important;
    background-image: linear-gradient(to right, #d97706 100%, #d97706 100%) !important;
    background-position: 0 100% !important;
    background-size: 100% 2px !important;
    background-repeat: no-repeat !important;
  }
  input.cu-gap-input.cu-input-show-correct:not(.cu-gap-textarea):not(.cu-cw-input),
  textarea.cu-gap-input.cu-gap-inline-textarea.cu-input-show-correct,
  textarea.cu-hint-pill-input.cu-input-show-correct {
    border-bottom-color: #7c3aed !important;
    background: rgba(124, 58, 237, 0.08) !important;
    padding-bottom: 1px !important;
  }
  span.cu-inline-gap-wrap.cu-gap-inline-editable.cu-input-show-correct {
    border: none !important;
    background-color: rgba(124, 58, 237, 0.08) !important;
    background-image: linear-gradient(to right, #7c3aed 100%, #7c3aed 100%) !important;
    background-position: 0 100% !important;
    background-size: 100% 2px !important;
    background-repeat: no-repeat !important;
    padding-bottom: 1px !important;
  }
}

/* ── Course hub (Duolingo-style, shared with tests/crosswords) ─────────── */

.dashboard-center--course .cw-section-header {
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: space-between;
}

.dashboard-center--learning-no-header .cw-page-content {
  padding-top: 8px;
}

.dashboard-center--learning-stages .cw-page-content {
  padding-top: 0;
}

/* Mobile hub layout — shared by learning stage, vocabulary, tests, etc. */
@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) and (max-width: 1024px) {
  .dashboard-center--mobile-hub,
  .dashboard-center--learning-stage {
    --mobile-hub-pad-x: 16px;
    --learning-stage-unit-gap: 28px;
    --learning-stage-header-gap: 10px;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding-bottom: 0 !important;
  }

  .dashboard-center--mobile-hub .mobile-nav-top-bar,
  .dashboard-center--learning-stage .mobile-nav-top-bar {
    flex-shrink: 0;
    position: relative;
    top: auto;
    z-index: auto;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 2px;
  }

  .dashboard-center--mobile-hub .cw-section-header,
  .dashboard-center--learning-stage .cw-section-header {
    flex-shrink: 0;
    position: relative;
    top: auto;
    z-index: 4;
    margin-left: var(--mobile-hub-pad-x);
    margin-right: var(--mobile-hub-pad-x);
    margin-top: var(--learning-stage-header-gap);
    margin-bottom: 0;
    padding: 18px 18px;
    min-height: 60px;
  }

  .dashboard-center--course .cw-section-header .cw-section-header-text {
    order: -1;
  }

  .dashboard-center--course .cw-section-header .cw-section-back {
    order: 1;
    margin-left: auto;
  }

  .dashboard-center--mobile-hub .cw-section-header .cw-section-title,
  .dashboard-center--learning-stage .cw-section-header .cw-section-title {
    font-size: 1.25rem;
  }

  .dashboard-center--mobile-hub .cw-page-content,
  .dashboard-center--learning-stage .cw-page-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-left: var(--mobile-hub-pad-x);
    padding-right: var(--mobile-hub-pad-x);
    padding-top: 16px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }

  .dashboard-center--mobile-hub .course-hub-page,
  .dashboard-center--mobile-hub .tests-hub-page,
  .dashboard-center--learning-stage .course-hub-page {
    padding-left: 0;
    padding-right: 0;
  }

  /* Learning stage map unit blocks */
  .dashboard-center--learning-stage .course-etapa-path {
    gap: 0;
  }

  .dashboard-center--learning-stage .course-etapa-path > .course-etapa-header,
  .dashboard-center--learning-stage .course-etapa-path > .course-review-accelerator-wrap {
    margin-top: var(--learning-stage-unit-gap);
  }

  .dashboard-center--learning-stage .course-etapa-path > .course-etapa-header:first-child,
  .dashboard-center--learning-stage .course-etapa-path > .course-review-accelerator-wrap:first-child {
    margin-top: 0;
  }

  .dashboard-center--learning-stage .course-etapa-header + .course-exercise-grid {
    margin-top: var(--learning-stage-header-gap);
  }

  .dashboard-center--learning-stage .course-etapa-map .course-etapa-header {
    gap: 12px;
    padding: 14px 16px;
    min-height: 52px;
    border-radius: 12px;
    flex-wrap: nowrap;
  }

  .dashboard-center--learning-stage .course-etapa-header-title {
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.3;
  }

  .dashboard-center--learning-stage .course-etapa-header-guide {
    gap: 5px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .dashboard-center--learning-stage .course-etapa-header-guide .material-symbols-outlined {
    font-size: 0.85rem;
  }

  .dashboard-center--learning-stage .course-etapa-map .course-exercise-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(4px, 1.2vw, 7px);
    width: 100%;
    padding: 2px 0 4px;
  }

  .dashboard-center--learning-stage .course-etapa-map .course-exercise-cell {
    width: 100%;
    max-width: none;
    aspect-ratio: 1;
    min-width: 0;
    min-height: 44px;
    height: auto;
    justify-self: center;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
  }

  .dashboard-center--learning-stage .course-etapa-map .course-exercise-cell-label {
    font-size: clamp(0.78rem, 2.6vw, 0.9rem);
  }

  .dashboard-center--learning-stage .course-etapa-map .course-exercise-cell--current {
    transform: scale(1.06);
    box-shadow: 0 4px 0 #e08600;
  }

  .dashboard-center--mobile-hub .tests-section-cards,
  .dashboard-center--mobile-hub .tests-section-cards-grid,
  .dashboard-center--mobile-hub .tests-full-exam-bar,
  .dashboard-center--learning-stage .tests-full-exam-bar {
    flex-shrink: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .dashboard-center--mobile-hub .fe-section--merged-path.fe-section--course-vocab {
    display: contents;
  }

  .dashboard-center--mobile-hub .fe-section--course-vocab .cw-page-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-center--mobile-hub .fe-section--course-vocab .fe-map-outer.fe-map-single-page.fe-map-merged {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  /* Vocabulary hub header — kicker + title left-aligned, no subtitle */
  .dashboard-center--vocab-hub .cw-section-header {
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
  }

  .dashboard-center--vocab-hub .cw-section-header-text {
    width: auto;
    flex: 1;
    min-width: 0;
    padding: 0;
    text-align: left;
  }

  .dashboard-center--vocab-hub .cw-section-header .cw-section-title {
    font-size: 1rem;
  }

  .dashboard-center--vocab-hub .course-vocab-header-subtitle {
    display: none;
  }

  /* Vocabulary category pages — title flush left next to back arrow, single line */
  .dashboard-center--course-vocab .cw-section-header.cw-section-header--vocab {
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
    padding: 12px 12px 12px 10px;
    min-height: 56px;
  }

  .dashboard-center--course-vocab .cw-section-header.cw-section-header--vocab .cw-section-back {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    width: 38px;
    height: 38px;
    min-width: 38px;
    flex-shrink: 0;
  }

  .dashboard-center--course-vocab .cw-section-header.cw-section-header--vocab .cw-section-header-text {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 0;
    text-align: left;
  }

  .dashboard-center--course-vocab .cw-section-header.cw-section-header--vocab .cw-section-title,
  .dashboard-center--vocab-hub .cw-section-header .cw-section-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.92rem, 4.5vw, 1.15rem);
    line-height: 1.2;
  }

  .dashboard-center--course-vocab .cw-section-header.cw-section-header--vocab .cw-section-info-btn {
    margin-left: auto;
    flex-shrink: 0;
  }

  .course-vocab-section-card .tests-section-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Vocabulary / stage list cards */
  .dashboard-center--mobile-hub .course-etapas-page {
    padding-top: 0;
    gap: 14px;
  }
}

@media (min-width: 769px) {
  .dashboard-center--learning-stages .cw-section-header--duo {
    margin-left: 0;
    margin-right: 0;
  }
}

.cw-section-header--duo.cw-section-header--level,
.cw-section-header--learning.cw-section-header--duo {
  box-shadow: 0 4px 0 color-mix(in srgb, var(--cw-header-color, #3b82f6) 72%, #000), 0 8px 24px color-mix(in srgb, var(--cw-header-color, #3b82f6) 22%, transparent);
}

.cw-section-header--learning.cw-section-header--duo {
  background: var(--cw-header-color, #3b82f6);
}

.cw-section-header--vocab.cw-section-header--duo {
  background: var(--cw-header-color, #10b981);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--cw-header-color, #10b981) 72%, #000), 0 8px 24px color-mix(in srgb, var(--cw-header-color, #10b981) 22%, transparent);
}

.cw-section-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-left: auto;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cw-section-info-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
}

.cw-section-info-btn .material-symbols-outlined {
  font-size: 1.2rem;
}

.cw-section-header--duo .cw-section-back {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

.cw-section-header--duo .cw-section-back:hover {
  background: rgba(0, 0, 0, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
}

.course-etapa-card--available,
.course-pt-card--available {
  background: #fff;
  border-color: #e5e7eb;
  box-shadow: 0 2px 0 #e5e7eb;
}

.course-hub-page {
  padding: 0 4px 24px;
}

.course-section-cards,
.course-level-cards {
  margin-top: 8px;
}

.course-path-map {
  margin-top: 4px;
}

.course-path-grid {
  margin-bottom: 8px;
}

.course-path-cell {
  position: relative;
}

.course-path-cell--review .cw-path-cell-num {
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.course-path-cell--pt .cw-path-cell-num {
  font-size: 0.68rem;
  font-weight: 900;
}

.course-path-cell--locked {
  opacity: 0.72;
}

.course-path-lock {
  position: absolute;
  bottom: 4px;
  right: 4px;
  line-height: 1;
}

.course-path-lock .material-symbols-outlined {
  font-size: 0.85rem;
  color: #94a3b8;
}

.course-vocab-categories {
  margin-top: 28px;
  padding-top: 8px;
}

.course-vocab-categories--main {
  margin-top: 8px;
  padding-top: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.course-vocab-hub--themed {
  margin-top: 4px;
  padding: 0 4px 24px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.course-vocab-section-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.course-vocab-header-subtitle {
  margin-top: 2px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}

.dashboard-center--vocab-hub .cw-section-header {
  flex-wrap: nowrap;
}

.dashboard-center--vocab-hub .cw-section-header-text {
  flex: 1;
  min-width: 0;
}

.vocab-mode-header-toggle {
  margin-left: auto;
  flex-shrink: 0;
}

.course-vocab-section-card {
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.course-vocab-section-card:focus-visible {
  outline: 2px solid var(--tests-card-accent, #10b981);
  outline-offset: 2px;
}

.course-vocab-section-card-desc {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
  color: color-mix(in srgb, var(--tests-card-title, #0f172a) 72%, #64748b);
}

.course-vocab-section-card-desc--done {
  color: #059669;
}

.course-vocab-section-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tests-card-accent, #10b981) 14%, #fff);
  color: var(--tests-card-title, #0f172a);
  font-family: 'Nunito', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.course-vocab-section-card-art {
  position: relative;
  width: 148px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 0 0;
  pointer-events: none;
}

.course-vocab-section-card-art .tests-section-card-img {
  max-width: 136px;
  max-height: 136px;
}

.course-vocab-section-card-art-icon {
  font-size: 3.5rem;
  color: var(--tests-card-accent, #10b981);
  opacity: 0.25;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 48;
}

.course-vocab-section-card--phrasal-verbs .course-vocab-section-card-art-icon {
  transform: rotate(-8deg);
}

.course-vocab-section-card--idioms .course-vocab-section-card-art-icon {
  transform: rotate(6deg);
}

.course-vocab-section-card--word-formation .course-vocab-section-card-art-icon {
  transform: rotate(-4deg);
}

.course-vocab-section-card--irregular-verbs .course-vocab-section-card-art-icon {
  transform: rotate(10deg);
}

.course-vocab-section-card--sune-stories .course-vocab-section-card-art-icon {
  transform: rotate(-6deg);
}

.course-vocab-section-card .tests-section-play-btn {
  pointer-events: none;
}

@media (min-width: 769px) {
  .dashboard-center--vocab-hub .course-vocab-hub--themed,
  .dashboard-center--vocab-hub .course-vocab-section-cards-grid {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .course-vocab-section-card {
    min-height: 96px;
    overflow: hidden;
  }

  .course-vocab-section-card .tests-section-card-body {
    padding: 14px 84px 14px 14px;
    gap: 6px;
    justify-content: center;
  }

  .course-vocab-section-card .tests-section-card-footer {
    display: none;
  }

  .course-vocab-section-card .tests-section-card-title-row {
    align-items: flex-start;
    gap: 6px;
  }

  .course-vocab-section-card .tests-section-card-icon {
    flex-shrink: 0;
    font-size: 1.15rem;
    margin-top: 1px;
  }

  .course-vocab-section-card .tests-section-card-title {
    flex: 1;
    min-width: 0;
    font-size: 0.94rem;
    line-height: 1.25;
  }

  .course-vocab-section-card-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .course-vocab-section-card-art {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    padding: 8px 6px 8px 0;
    justify-content: flex-end;
    align-items: center;
  }

  .course-vocab-section-card-art .tests-section-card-img {
    max-width: 72px;
    max-height: 72px;
    object-position: right center;
  }

  .course-vocab-section-card-art-icon {
    font-size: 2.4rem;
  }
}

.course-vocab-hub--duo {
  margin-top: 4px;
  padding: 0 4px 24px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.course-vocab-duo-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-vocab-hub--duo .course-vocab-section-heading {
  margin: 0 0 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #3c3c3c;
  letter-spacing: -0.01em;
}

.course-vocab-hub--duo .course-vocab-section-heading:not(:first-child) {
  margin-top: 32px;
}

.course-vocab-duo-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.course-vocab-duo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.course-vocab-duo-card .mode-card-status {
  color: #777;
}

.course-vocab-duo-card .mode-card-icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 48;
}

.course-vocab-section-heading {
  margin: 0 0 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2d2e5f;
}

.course-vocab-hub .course-vocab-section-heading:not(:first-child) {
  margin-top: 28px;
}

.course-vocab-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-vocab-mode-cards .mode-card {
  width: 100%;
}

.course-section-cards-grid--stacked {
  grid-template-columns: 1fr;
}

.course-vocab-categories-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 14px;
}

.course-vocab-categories-title .material-symbols-outlined {
  font-size: 1.1rem;
  color: #10b981;
}

.course-section-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.course-section-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 2px solid #e5e5e5;
  border-bottom: 5px solid #d0d0d0;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.12s ease;
  font-family: 'Nunito', sans-serif;
}

.course-section-card:hover {
  border-color: var(--course-card-color, #3b82f6);
}

.course-section-card:active {
  transform: translateY(3px);
  border-bottom-width: 2px;
}

.course-section-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--course-card-color, #3b82f6) 12%, white);
  color: var(--course-card-color, #3b82f6);
  border: 2px solid color-mix(in srgb, var(--course-card-color, #3b82f6) 25%, white);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--course-card-color, #3b82f6) 20%, #d0d0d0);
}

.course-section-card-icon .material-symbols-outlined {
  font-size: 1.5rem;
}

.course-section-card-body {
  flex: 1;
  min-width: 0;
}

.course-section-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 2px;
}

.course-section-card-desc {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}

.course-section-card-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-section-card-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.course-section-card-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.course-section-card-progress-text {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
}

.course-section-card-arrow {
  color: #cbd5e1;
  flex-shrink: 0;
}

.course-section-card-arrow .material-symbols-outlined {
  font-size: 1.4rem;
}

@media (min-width: 640px) {
  .course-section-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .course-section-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   ETAPAS (Duolingo-style stages)
   ══════════════════════════════════════════════════════════════════════════ */

.course-etapas-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 32px;
}

/* Vocabulary category cards: 3 columns on desktop, 1 on mobile */
@media (min-width: 769px) {
  .course-etapas-page[data-section="vocabulary"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .course-etapas-page[data-section="vocabulary"] .course-etapa-card {
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    padding: 18px 16px 16px;
  }

  .course-etapas-page[data-section="vocabulary"] .course-etapa-card-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .course-etapas-page[data-section="vocabulary"] .course-etapa-card-title-row .course-etapa-progress {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .course-etapas-page[data-section="vocabulary"] .course-etapa-card--done .course-etapa-card-status {
    align-self: flex-start;
  }
}

.course-etapa-card,
.course-pt-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  border: 2px solid #e5e7eb;
  background: #fff;
  padding: 20px 22px 18px;
  box-shadow: 0 2px 0 #e5e7eb;
  font-family: 'Nunito', sans-serif;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.course-etapa-card--interactive {
  cursor: pointer;
}

.course-etapa-card--interactive:hover {
  transform: translateY(-2px);
  border-color: #7dd3fc;
  box-shadow: 0 6px 0 #bae6fd;
}

.course-etapa-card--interactive:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #bae6fd;
}

.course-etapa-card--done.course-etapa-card--interactive:hover {
  border-color: #4ade80;
  box-shadow: 0 6px 0 #22c55e;
}

.course-etapa-card--active.course-etapa-card--interactive:hover {
  border-color: #38bdf8;
  box-shadow: 0 6px 0 #38bdf8;
}

.course-etapa-card--done.course-etapa-card--interactive:active {
  box-shadow: 0 2px 0 #22c55e;
}

.course-etapa-card--active.course-etapa-card--interactive:active {
  box-shadow: 0 2px 0 #38bdf8;
}

.course-etapa-card--available.course-etapa-card--interactive:hover {
  background: #f8fafc;
}

.course-etapa-card--done,
.course-pt-card--done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 55%, #d1fae5 100%);
  box-shadow: 0 4px 0 #22c55e;
}

.course-etapa-card--done .course-etapa-card-title,
.course-pt-card--done .course-pt-card-title {
  color: #14532d;
  margin-bottom: 0;
}

.course-etapa-card--done .course-etapa-card-details,
.course-pt-card--done .course-pt-card-kicker {
  color: #15803d;
}

.course-etapa-card--done .course-etapa-card-status,
.course-pt-card--done .course-pt-card-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #166534;
  line-height: 1;
  flex-shrink: 0;
}

.course-etapa-card--done .course-etapa-card-status .material-symbols-outlined,
.course-pt-card--done .course-pt-card-status .material-symbols-outlined {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.course-etapa-card-main {
  flex: 1;
  min-width: 0;
}

.course-etapa-card-main:has(.course-etapa-card-btn--advance) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.course-etapa-card-main-content {
  flex: 1;
  min-width: 0;
}

.course-etapa-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.course-etapa-card-title-row .course-etapa-card-title {
  margin-bottom: 0;
  flex-shrink: 0;
}

.course-etapa-card-title-row .course-etapa-progress {
  flex: 0 1 160px;
  width: 160px;
  max-width: 42%;
  margin-bottom: 0;
}

.course-etapa-card-title-row .course-etapa-card-status {
  margin-bottom: 0;
}

.course-level-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.course-level-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #64748b;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.course-level-tab:hover {
  border-color: var(--course-level-color, #3b82f6);
  color: var(--course-level-color, #3b82f6);
}

.course-level-tab--active {
  background: var(--course-level-color, #3b82f6);
  border-color: var(--course-level-color, #3b82f6);
  color: #fff;
}

.course-etapa-card--active,
.course-pt-card--active {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 55%, #ddf4ff 100%);
  border-color: #7dd3fc;
  box-shadow: 0 4px 0 #38bdf8;
  animation: course-etapa-card-pulse 2.4s ease-in-out infinite;
}

.course-etapa-card--active .course-etapa-card-title,
.course-pt-card--active .course-pt-card-title {
  color: #0c4a6e;
}

.course-etapa-card--active .course-etapa-card-subtitle {
  color: #0369a1;
  font-weight: 700;
}

.course-etapa-card--active .course-etapa-card-details,
.course-pt-card--active .course-pt-card-kicker {
  color: #0284c7;
}

.course-etapa-card--locked,
.course-pt-card--locked {
  opacity: 1;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #d1d5db;
  box-shadow: 0 4px 0 #9ca3af;
}

.course-etapa-card--locked {
  padding-top: 14px;
  padding-bottom: 12px;
}

.course-etapa-card--locked .course-etapa-card-subtitle {
  margin-bottom: 0;
}

.course-etapa-card--locked .course-etapa-card-title,
.course-pt-card--locked .course-pt-card-title {
  color: #64748b;
}

.course-etapa-card--locked .course-etapa-card-subtitle {
  color: #94a3b8;
}

.course-etapa-card--locked .course-etapa-card-details,
.course-pt-card--locked .course-pt-card-kicker {
  color: #94a3b8;
  cursor: default;
  pointer-events: none;
}

.course-etapa-card-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: #94a3b8;
  font-size: 2.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.course-stage-skip {
  border: 2px solid #ffb020;
  border-radius: 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fffaf0 0%, #fff4d6 100%);
  box-shadow: 0 4px 0 #e08600;
  font-family: 'Nunito', sans-serif;
}

.course-stage-skip--expanded {
  padding-bottom: 14px;
}

.course-stage-skip-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.course-stage-skip-heading:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.3);
  outline-offset: 2px;
  border-radius: 10px;
}

.course-stage-skip--expanded .course-stage-skip-heading {
  margin-bottom: 12px;
}

.course-stage-skip-eyebrow {
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.course-stage-skip-copy {
  margin-top: 0;
  margin-bottom: 10px;
  color: #78350f;
  font-size: 0.92rem;
  font-weight: 800;
}

.course-stage-skip-chevron {
  color: #f59e0b;
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.course-stage-skip-body[hidden] {
  display: none;
}

.course-stage-skip-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-stage-skip-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 2px solid #fed7aa;
  border-radius: 12px;
  background: #fff;
  color: #b45309;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 0 #f3d5a8;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.course-stage-skip-item:hover {
  border-color: #f59e0b;
  background: #fffaf0;
  color: #92400e;
  transform: translateY(-1px);
}

.course-stage-skip-item:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.3);
  outline-offset: 2px;
}

.course-stage-skip-item--done {
  border-color: #e08600;
  background: linear-gradient(180deg, #ffc800 0%, #ff9600 100%);
  color: #fff;
  box-shadow: 0 3px 0 #e08600;
}

.course-stage-skip-item--done:hover {
  border-color: #c97700;
  background: linear-gradient(180deg, #ffb800 0%, #f08a00 100%);
  color: #fff;
}

.course-stage-skip-progress {
  margin-top: 9px;
  color: #b45309;
  font-size: 0.73rem;
  font-weight: 900;
  text-align: right;
}

@media (max-width: 600px) {
  .course-stage-skip {
    padding: 14px;
  }

  .course-stage-skip-item {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 10px;
    font-size: 0.88rem;
  }
}

.course-etapa-card-details {
  display: inline-block;
  padding: 0;
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #38a3f1;
  font-family: inherit;
  pointer-events: none;
}

.course-etapa-card-title,
.course-pt-card-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #1f2937;
  line-height: 1.15;
  margin-bottom: 4px;
}

.course-etapa-card-subtitle {
  font-size: 0.92rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 12px;
}

.course-etapa-card-status,
.course-pt-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0369a1;
  margin-bottom: 12px;
}

.course-etapa-card-status .material-symbols-outlined,
.course-pt-card-status .material-symbols-outlined {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.course-etapa-card-locked-msg,
.course-pt-card-desc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #94a3b8;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.course-etapa-card-locked-msg .material-symbols-outlined,
.course-pt-card-desc .material-symbols-outlined {
  font-size: 1rem;
  color: #94a3b8;
}

.course-etapa-progress {
  height: 22px;
  border-radius: 999px;
  background: #e0f2fe;
  overflow: hidden;
  margin-bottom: 14px;
  border: 2px solid #7dd3fc;
  box-shadow: inset 0 2px 0 rgba(14, 116, 144, 0.1);
}

.course-etapa-progress-fill {
  height: 100%;
  min-width: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 55%, #0ea5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(3, 105, 161, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: width 0.25s ease;
}

.course-etapa-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  border-bottom-width: 4px;
  background: #fff;
  color: #38a3f1;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s ease;
}

.course-etapa-card-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.course-etapa-card-btn--continue {
  background: var(--ex-duo-blue, #1cb0f6);
  border: 2px solid var(--ex-duo-blue-dark, #1899d6);
  border-bottom-width: 2px;
  color: #fff;
  min-width: 180px;
  box-shadow: 0 4px 0 var(--ex-duo-blue-dark, #1899d6);
}

.course-etapa-card-btn--continue:hover {
  background: var(--ex-duo-blue-hover, #2eb8f6);
}

.course-etapa-card-btn--continue:active {
  transform: translateY(4px);
  box-shadow: none;
}

.course-etapa-card-btn--advance {
  width: 56px;
  height: 56px;
  min-width: 0;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc800 0%, #ff9600 100%);
  border-color: #e08600;
  color: #fff;
  box-shadow: 0 4px 0 #e08600;
}

.course-etapa-card-btn--advance:hover {
  background: linear-gradient(180deg, #ffd033 0%, #ffa31a 100%);
}

.course-etapa-card-btn--advance:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 2px 0 #e08600;
}

.course-etapa-card-btn--advance .course-etapa-card-btn-advance-icon {
  width: 1.65rem;
  height: auto;
  display: block;
}

.course-pt-card-kicker,
.course-etapa-card-details {
  color: #38a3f1;
}

/* Etapa map (path inside a stage) */
.course-etapa-map {
  max-width: 840px;
  margin: 0 auto;
  padding-bottom: 48px;
  padding-top: 4px;
}

.course-etapa-path {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Unit / section headers inside etapa map (not sticky — distinct from main cw-section-header) */
.course-etapa-map .course-etapa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  min-height: 56px;
  border-radius: 14px;
  box-sizing: border-box;
  position: relative;
  z-index: 0;
}

.course-etapa-header--unit {
  background: #f0f9ff;
  border: 2px solid #bae6fd;
  color: #0c4a6e;
  box-shadow: none;
}

.course-etapa-header--vocab {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #14532d;
}

.course-etapa-header--section {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

.course-etapa-header--section .course-etapa-header-guide {
  background: rgba(255, 255, 255, 0.15);
}

.course-etapa-header--unit .course-etapa-header-guide {
  background: rgba(12, 74, 110, 0.1);
  color: #0c4a6e;
}

.course-etapa-header--unit .course-etapa-header-guide:hover {
  background: rgba(12, 74, 110, 0.16);
}

.course-etapa-header--vocab .course-etapa-header-guide {
  background: rgba(20, 83, 45, 0.1);
  color: #14532d;
}

.course-etapa-header--vocab .course-etapa-header-guide:hover {
  background: rgba(20, 83, 45, 0.16);
}

.course-etapa-header-text {
  flex: 1;
  min-width: 0;
}

.course-etapa-header-title {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.3;
}

.course-etapa-header-guide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: rgba(12, 74, 110, 0.1);
  color: #0c4a6e;
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.course-etapa-header--section .course-etapa-header-guide {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.course-etapa-header-guide:hover {
  background: rgba(12, 74, 110, 0.16);
}

.course-etapa-header--section .course-etapa-header-guide:hover {
  background: rgba(255, 255, 255, 0.32);
}

.course-etapa-header-guide .material-symbols-outlined {
  font-size: 1rem;
}

.course-exercise-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  width: 100%;
  padding: 4px 2px 8px;
  justify-content: flex-start;
}

.course-exercise-cell {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  color: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  padding: 0;
  flex-shrink: 0;
}

.course-exercise-cell .material-symbols-outlined {
  display: none;
}

.course-exercise-cell-label {
  font-family: 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.course-exercise-cell:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.course-exercise-cell--done {
  background: #1cb0f6;
  box-shadow: 0 5px 0 #1899d6;
}

.course-exercise-cell--progress {
  background: #94a3b8;
  box-shadow: 0 5px 0 #64748b;
}

.course-exercise-cell--pending {
  background: #94a3b8;
  box-shadow: 0 5px 0 #64748b;
}

.course-exercise-cell--current {
  background: #ff9600;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 5px 0 #e08600;
  animation: course-circle-pulse 1.8s ease-in-out infinite;
}

.course-exercise-cell--locked {
  background: #e5e7eb;
  color: #94a3b8;
  box-shadow: 0 5px 0 #cbd5e1;
  cursor: not-allowed;
}

.course-etapa-header--review {
  background: #f5f3ff;
  border: 2px solid #c4b5fd;
  color: #5b21b6;
  box-shadow: none;
}

.course-etapa-header--review .course-etapa-header-guide--review {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.course-etapa-header--review .course-etapa-header-guide--review:hover {
  background: rgba(124, 58, 237, 0.2);
}

.course-exercise-grid--review {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.course-exercise-cell--review.course-exercise-cell--pending {
  background: #8b5cf6;
  color: #fff;
  box-shadow: 0 5px 0 #6d28d9;
}

.course-exercise-cell--review.course-exercise-cell--done {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #5b21b6;
  box-shadow: 0 5px 0 #a78bfa;
}

.course-exercise-cell--review.course-exercise-cell--progress {
  background: #a78bfa;
  color: #fff;
  box-shadow: 0 5px 0 #7c3aed;
}

.course-exercise-cell--review.course-exercise-cell--locked {
  background: #e5e7eb;
  color: #94a3b8;
  box-shadow: 0 5px 0 #cbd5e1;
  cursor: not-allowed;
}

.course-exercise-cell--review.course-exercise-cell--current {
  background: #ff9600;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 5px 0 #e08600;
  animation: course-circle-pulse 1.8s ease-in-out infinite;
}

@media (max-width: 520px) {
  .course-exercise-grid--review {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
}

/* Review accelerator — full-width bar, no header */
.course-review-accelerator-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 4px 0 8px;
}

.course-review-accelerator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 18px 24px;
  border: 2px solid var(--cu-lesson-orange-dark, #e68600);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffc800 0%, var(--cu-lesson-orange, #ff9600) 100%);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 0 #e08600;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.course-review-accelerator .material-symbols-outlined {
  display: none;
}

.course-review-accelerator-text {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.course-review-accelerator:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #e08600;
}

.course-review-accelerator--done {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 55%, #ddf4ff 100%);
  color: #0369a1;
  border-color: #7dd3fc;
  box-shadow: 0 6px 0 #38bdf8;
}

.course-review-accelerator--done:active {
  box-shadow: 0 2px 0 #38bdf8;
}

.course-review-accelerator--locked {
  background: #e5e7eb;
  color: #94a3b8;
  border-color: #d1d5db;
  box-shadow: 0 6px 0 #cbd5e1;
  cursor: not-allowed;
}

.course-review-accelerator--locked.course-review-accelerator--active {
  background: linear-gradient(180deg, #ffc800 0%, var(--cu-lesson-orange, #ff9600) 100%);
  color: #fff;
  border-color: var(--cu-lesson-orange-dark, #e68600);
  box-shadow: 0 6px 0 #e08600;
  opacity: 0.55;
}

.course-review-accelerator--current {
  transform: scale(1.02);
}

.course-review-accelerator--locked:active {
  transform: none;
  box-shadow: 0 6px 0 #cbd5e1;
}

.course-review-accelerator--active {
  animation: course-circle-pulse 1.8s ease-in-out infinite;
}

/* Circular path nodes */
.course-path-circle {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  color: #fff;
  box-shadow: 0 6px 0 rgba(0,0,0,0.18);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.course-path-circle .material-symbols-outlined {
  font-size: 1.65rem;
}

.course-path-circle:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.18);
}

.course-path-circle--done {
  background: #1cb0f6;
  box-shadow: 0 6px 0 #1899d6;
}

.course-path-circle--progress {
  background: #1cb0f6;
  box-shadow: 0 6px 0 #1899d6;
}

.course-path-circle--pending {
  background: #58cc02;
  box-shadow: 0 6px 0 #46a302;
}

.course-path-circle--current {
  background: #1cb0f6;
  transform: scale(1.08);
  box-shadow: 0 6px 0 #1899d6;
  animation: course-circle-pulse 1.8s ease-in-out infinite;
}

.course-path-circle--locked {
  background: #e5e7eb;
  color: #94a3b8;
  box-shadow: 0 6px 0 #cbd5e1;
  cursor: not-allowed;
}

.course-path-circle--review {
  background: #ff9600;
  box-shadow: 0 6px 0 #e08600;
  width: 80px;
  height: 80px;
}

.course-path-circle--review-active {
  animation: course-circle-pulse 1.8s ease-in-out infinite;
}

.course-path-circle-pos--0 { align-self: flex-start; margin-left: 12%; }
.course-path-circle-pos--1 { align-self: center; }
.course-path-circle-pos--2 { align-self: flex-end; margin-right: 12%; }

@keyframes course-circle-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

@keyframes course-etapa-card-pulse {
  0%, 100% { box-shadow: 0 4px 0 #38bdf8; }
  50% { box-shadow: 0 4px 0 #38bdf8, 0 0 0 3px rgba(56, 189, 248, 0.22); }
}

@media (max-width: 768px) {
  .course-etapa-card-title,
  .course-pt-card-title {
    font-size: 1.3rem;
  }

  .course-path-circle {
    width: 64px;
    height: 64px;
  }

  .course-exercise-grid {
    gap: 12px;
  }

  .course-exercise-cell {
    width: 56px;
    height: 56px;
  }

  .course-exercise-cell-label {
    font-size: 1.2rem;
  }

  .course-etapa-map .course-etapa-header {
    flex-wrap: nowrap;
    padding: 14px 16px;
    min-height: 52px;
  }

  .course-etapa-header-title {
    font-size: 0.95rem;
  }

  .course-etapa-card--done,
  .course-etapa-card--active {
    flex-direction: column;
    align-items: stretch;
  }

  .course-etapa-card-title-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .course-etapa-card-title-row .course-etapa-progress {
    flex: 1 1 120px;
    width: auto;
    max-width: none;
    min-width: 120px;
  }

  .course-etapa-card--locked {
    align-items: stretch;
  }

  .course-etapa-card-main:has(.course-etapa-card-btn--advance) {
    align-items: flex-start;
    gap: 12px;
  }

  .course-etapa-card--locked .course-etapa-card-btn--advance {
    align-self: center;
    flex-shrink: 0;
  }

  .course-review-accelerator {
    padding: 16px 18px;
    font-size: 0.92rem;
  }
}

/* ── Duolingo-style lesson focus (Learning / Vocabulary exercises) ─────── */

:root {
  --cu-duo-green: var(--secondary, #1E9D8E);
  --cu-duo-green-dark: #158f82;
  --cu-duo-green-hover: #22b3a3;
  --cu-duo-green-light: #e6f7f4;
  --cu-duo-blue-bg: #e8f4fc;
  --cu-duo-blue-border: var(--primary, #2D2E5F);
  --cu-duo-red: #ef4444;
  --cu-duo-red-dark: #dc2626;
  --cu-duo-red-light: #fee2e2;
  --cu-duo-text: var(--text-dark, #2D2E5F);
  --cu-duo-border: #e8ecf4;
  --cu-duo-yellow: #FFD28E;
  --cu-lesson-bg: #ffffff;
}

body:has(.dashboard-layout--lesson-focus) {
  background: var(--cu-lesson-bg);
  min-height: 100vh;
  min-height: 100dvh;
}

body:has(.dashboard-layout--lesson-focus) #app {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cu-lesson-bg);
}

body:has(.dashboard-layout--lesson-focus) .app-container {
  max-width: none;
  margin: 0;
  padding: 0 !important;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cu-lesson-bg);
}

body:has(.dashboard-layout--lesson-focus) #main-content,
body:has(.dashboard-layout--lesson-focus) #courseCenterSection,
body:has(.dashboard-layout--lesson-focus) #feCenterSection.fe-section--vocab-exercise {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cu-lesson-bg);
}

.dashboard-layout--lesson-focus {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr) !important;
  padding: 0 !important;
  max-width: none;
  background: var(--cu-lesson-bg);
}

.dashboard-layout--lesson-focus .dashboard-left-sidebar,
.dashboard-layout--lesson-focus .dashboard-left-sidebar.dashboard-sidebar-shell,
.dashboard-layout--lesson-focus .dashboard-right-sidebar,
.dashboard-layout--lesson-focus .dashboard-right-sidebar.dashboard-sidebar-shell {
  display: none !important;
}

.dashboard-layout--lesson-focus > .dashboard-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cu-lesson-bg);
}

.course-center--lesson-focus {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 0;
  box-sizing: border-box;
  background: var(--cu-lesson-bg);
}

@media (min-width: 769px) {
  .course-center--lesson-focus {
    max-width: none;
    width: 50%;
    min-width: 50%;
  }

  .course-center--lesson-focus .cu-gap-standalone,
  .course-center--lesson-focus .cu-inline-gap-wrap--block {
    max-width: none;
  }
}

.cu-lesson-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 4px 12px;
  flex-shrink: 0;
}

.cu-lesson-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.cu-lesson-close:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}

.cu-lesson-close .material-symbols-outlined {
  font-size: 1.4rem;
}

.cu-lesson-progress-wrap {
  flex: 1;
  position: relative;
  height: 16px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: visible;
}

.cu-lesson-progress-fill {
  height: 100%;
  background: var(--cu-duo-green, #58cc02);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cu-lesson-streak {
  position: absolute;
  left: 0;
  top: -18px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cu-duo-green, #58cc02);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.cu-lesson-streak--visible {
  opacity: 1;
  transform: translateY(0);
}

.cu-lesson-hearts {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.cu-lesson-heart i {
  font-size: 1.2rem;
  color: #ff4b4b;
  transition: color 0.2s ease;
}

.cu-lesson-heart--empty i {
  color: #e5e7eb;
}

.cu-lesson-item-hidden {
  display: none !important;
}

.cu-lesson-gap-hidden {
  display: none !important;
}

.course-center--lesson-focus .course-unit-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cu-lesson-bg);
}

.course-center--theory-focus .cu-section.cu-theory {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 16px 0 0;
  margin: 0;
}

.course-center--theory-focus .cu-theory-body {
  flex: 1;
}

.course-center--theory-focus .cu-section-nav--theory {
  margin-top: auto;
  padding: 20px 0 16px;
  border-top: 2px solid rgba(91, 110, 232, 0.15);
}

.course-center--lesson-focus .cu-section.cu-exercise {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.cu-lesson-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 20px;
  padding: 8px 0 0;
}

.cu-lesson-instruction {
  width: 100%;
  max-width: 100%;
  font-size: 1.45rem;
  font-weight: 800;
  color: #3c3c3c;
  text-align: left;
  line-height: 1.35;
  margin: 0;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  overflow-wrap: anywhere;
}

.course-center--lesson-focus .cu-section-title,
.course-center--lesson-focus .cu-ex-instructions {
  display: none;
}

.course-center--lesson-focus .cu-ex-items,
.course-center--lesson-focus .cu-ex-wordbank,
.course-center--lesson-focus .cu-matching-grid,
.course-center--lesson-focus .cu-passage-wrap {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
}

.course-center--lesson-focus .cu-ex-item {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  padding-top: 0;
}

.course-center--lesson-focus .cu-ex-num-badge {
  display: none;
}

.course-center--lesson-focus .cu-section-nav {
  margin-top: auto;
  padding: 16px 0 0;
  border-top: 2px solid var(--cu-duo-border, #e5e5e5);
}

.course-center--lesson-focus .cu-section-nav .cu-nav-prev,
.course-center--lesson-focus .cu-section-nav .cu-nav-next {
  display: none !important;
}

.course-center--lesson-focus .cu-section-nav--lesson {
  display: flex;
  justify-content: center;
}

.course-center--lesson-focus .cu-ex-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  width: 100%;
}

.course-center--lesson-focus .cu-ex-footer.cu-ex-footer--hidden {
  display: none;
  pointer-events: none;
}

.course-center--lesson-focus .cu-show-all-btn,
.course-center--lesson-focus .cu-retry-btn {
  display: none !important;
}

.course-center--lesson-focus .cu-section-nav-center {
  width: 100%;
}

.course-center--lesson-focus .cu-section-nav-center .cu-ex-footer {
  width: 100%;
}

.cu-skip-btn {
  display: none !important;
}

.course-center--lesson-focus .cu-skip-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.cu-lesson-secondary-btn,
.cu-skip-btn {
  background: transparent !important;
  border: 2px solid var(--cu-duo-border, #e5e5e5) !important;
  border-radius: 14px !important;
  color: #afafaf !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem !important;
  padding: 12px 16px !important;
  min-height: 44px !important;
  box-shadow: none !important;
}

.cu-lesson-secondary-btn:hover {
  color: #8a8a8a !important;
  background: transparent !important;
}

.cu-lesson-secondary-btn .material-symbols-outlined {
  display: none;
}

.cu-lesson-primary-btn {
  flex: 0 0 auto;
  max-width: 220px;
  width: auto;
  margin-left: 0;
  justify-content: center;
  background: #e5e7eb !important;
  color: #afafaf !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 8px 20px !important;
  min-height: 36px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem !important;
  box-shadow: none !important;
}

.cu-lesson-primary-btn:not(:disabled) {
  background: var(--cu-duo-green, #58cc02) !important;
  color: #fff !important;
  box-shadow: 0 4px 0 var(--cu-duo-green-dark, #58a700) !important;
}

.cu-lesson-primary-btn:not(:disabled):hover {
  background: var(--cu-duo-green-hover, #61d802) !important;
}

.cu-lesson-primary-btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--cu-duo-green-dark, #58a700) !important;
}

.course-center--lesson-focus .cu-check-btn {
  padding: 12px 32px;
  min-height: 48px;
  font-size: 0.88rem;
  border-radius: 14px;
  box-shadow: none;
  max-width: 220px;
}

/* ── Lesson exit confirmation modal ───────────────────────────────────── */

.cu-lesson-exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cuExitOverlayIn 0.18s ease;
}

@keyframes cuExitOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cu-lesson-exit-box {
  position: relative;
  background: #fff;
  border-radius: 24px;
  border: 2px solid #e5e5e5;
  border-bottom-width: 5px;
  border-bottom-color: #d0d0d0;
  max-width: 420px;
  width: 100%;
  padding: 24px 28px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  animation: cuExitBoxIn 0.22s ease;
}

@keyframes cuExitBoxIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.cu-lesson-exit-hero {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}

.cu-lesson-exit-fox {
  flex-shrink: 0;
  width: 88px;
  height: auto;
  margin-bottom: 4px;
  pointer-events: none;
}

.cu-lesson-exit-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.cu-lesson-exit-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  bottom: 52px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid #e5e5e5;
}

.cu-lesson-exit-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  bottom: 53px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid #fff;
}

.cu-lesson-exit-text {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #3c3c3c;
  line-height: 1.45;
}

.cu-lesson-exit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cu-lesson-exit-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s;
}

.cu-lesson-exit-btn--stay {
  background: var(--ex-duo-orange, #f47417);
  color: #fff;
  border: none;
  border-bottom: 4px solid var(--ex-duo-orange-dark, #d45f0a);
  box-shadow: 0 4px 0 var(--ex-duo-orange-dark, #d45f0a);
}

.cu-lesson-exit-btn--stay:hover {
  background: var(--ex-duo-orange-hover, #f6802a);
}

.cu-lesson-exit-btn--stay:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 1px 0 var(--ex-duo-orange-dark, #d45f0a);
}

.cu-lesson-exit-btn--leave {
  background: transparent;
  color: #afafaf;
  border: none;
}

.cu-lesson-exit-btn--leave:hover {
  color: #8a8a8a;
}

/* ── Lesson completion modal ──────────────────────────────────────────── */

.cu-lesson-complete-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cuExitOverlayIn 0.18s ease;
}

.cu-lesson-complete-box {
  position: relative;
  background: #fff;
  border-radius: 24px;
  border: 2px solid #e5e5e5;
  border-bottom-width: 5px;
  border-bottom-color: #d0d0d0;
  max-width: 420px;
  width: 100%;
  padding: 32px 28px 28px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  animation: cuExitBoxIn 0.22s ease;
}

.cu-lesson-complete-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--cu-duo-green-light, #d7ffb8);
  color: var(--cu-duo-green, #58cc02);
}

.cu-lesson-complete-icon .material-symbols-outlined {
  font-size: 2.4rem;
}

.cu-lesson-complete-title {
  margin: 0 0 8px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cu-duo-green-dark, #58a700);
}

.cu-lesson-complete-text {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: #4b4b4b;
}

.cu-lesson-complete-score {
  margin: 0 0 24px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #777;
}

.cu-lesson-complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 14px;
  border-bottom: 4px solid var(--cu-duo-green-dark, #58a700);
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cu-duo-green, #58cc02);
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.cu-lesson-complete-btn:hover {
  filter: brightness(1.05);
}

.cu-lesson-complete-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

@media (max-width: 768px) {
  .course-center--lesson-focus {
    max-width: 100%;
    padding: 0 10px 14px;
  }

  .cu-lesson-instruction {
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .course-center--lesson-focus .cu-ex-sentence {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .course-center--lesson-focus .cu-skip-btn,
  .course-center--lesson-focus .cu-lesson-secondary-btn {
    min-height: 38px !important;
    padding: 8px 12px !important;
    font-size: 0.68rem !important;
    border-radius: 12px !important;
  }

  .course-center--lesson-focus .cu-check-btn {
    min-height: 40px;
    padding: 8px 20px;
    font-size: 0.8rem;
    border-radius: 12px;
    max-width: 180px;
  }

  .course-center--lesson-focus .cu-ex-footer {
    gap: 8px;
  }

  .course-center--lesson-focus .cu-section-nav {
    padding: 12px 0 0;
  }

  .cu-lesson-stage {
    gap: 14px;
    padding-top: 4px;
  }
}

@media (max-width: 480px) {
  .cu-lesson-instruction {
    font-size: 0.85rem;
  }

  .course-center--lesson-focus .cu-ex-sentence {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .course-center--lesson-focus .cu-skip-btn,
  .course-center--lesson-focus .cu-lesson-secondary-btn {
    min-height: 36px !important;
    padding: 7px 10px !important;
    font-size: 0.65rem !important;
  }

  .course-center--lesson-focus .cu-check-btn {
    min-height: 38px;
    padding: 7px 16px;
    font-size: 0.76rem;
    max-width: 160px;
  }
}

/* ── Lesson prompt (mascot + speech bubble) ───────────────────────────── */

.cu-lesson-prompt {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
}

.cu-lesson-prompt-mascot {
  flex-shrink: 0;
  width: 72px;
  height: auto;
  pointer-events: none;
}

.cu-lesson-prompt-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 2px solid var(--cu-duo-border, #e5e5e5);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cu-lesson-prompt-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  bottom: 20px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid var(--cu-duo-border, #e5e5e5);
}

.cu-lesson-prompt-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  bottom: 21px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid #fff;
}

.cu-lesson-prompt-speaker {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1cb0f6;
  cursor: pointer;
  padding: 0;
}

.cu-lesson-prompt-speaker .material-symbols-outlined {
  font-size: 1.35rem;
}

.cu-lesson-prompt-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cu-duo-text, #4b4b4b);
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #d0d0d0;
  text-underline-offset: 4px;
}

/* ── Lesson feedback bar (correct / incorrect) ────────────────────────── */

.cu-lesson-feedback {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  animation: cuLessonFeedbackIn 0.28s ease-out;
}

.cu-lesson-feedback-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.cu-lesson-feedback:not(.cu-lesson-feedback--mobile-explain) .cu-lesson-feedback-top {
  display: contents;
}

.cu-lesson-feedback-actions {
  display: contents;
}

@keyframes cuLessonFeedbackIn {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.cu-lesson-feedback--correct {
  background: var(--cu-duo-green-light, #d7ffb8);
  border-top: 2px solid #bce788;
}

.cu-lesson-feedback--wrong {
  background: var(--cu-duo-red-light, #ffdfe0);
  border-top: 2px solid #ffb8b8;
}

.cu-lesson-feedback-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
}

.cu-lesson-feedback--correct .cu-lesson-feedback-icon {
  color: var(--cu-duo-green, #58cc02);
}

.cu-lesson-feedback--wrong .cu-lesson-feedback-icon {
  color: var(--cu-duo-red, #ff4b4b);
}

.cu-lesson-feedback-icon .material-symbols-outlined {
  font-size: 1.6rem;
  font-weight: 700;
}

.cu-lesson-feedback-body {
  flex: 1;
  min-width: 0;
}

.cu-lesson-feedback-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.cu-lesson-feedback--correct .cu-lesson-feedback-title {
  color: var(--cu-duo-green-dark, #58a700);
}

.cu-lesson-feedback--wrong .cu-lesson-feedback-title {
  color: var(--cu-duo-red, #ff4b4b);
}

.cu-lesson-feedback-detail {
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--cu-duo-red, #ff4b4b);
}

.cu-lesson-feedback-continue {
  flex-shrink: 0;
  border: none;
  border-radius: 14px;
  padding: 12px 24px;
  min-height: 48px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.cu-lesson-feedback--correct .cu-lesson-feedback-continue {
  background: var(--cu-duo-green, #58cc02);
  box-shadow: 0 4px 0 var(--cu-duo-green-dark, #58a700);
}

.cu-lesson-feedback--wrong .cu-lesson-feedback-continue {
  background: var(--cu-duo-red, #ff4b4b);
  box-shadow: 0 4px 0 var(--cu-duo-red-dark, #ea2b2b);
}

.cu-lesson-feedback-continue:hover {
  filter: brightness(1.05);
}

.cu-lesson-feedback-continue:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* ── Lesson-mode option buttons (stacked, numbered) ───────────────────── */

.course-center--lesson-focus .cu-mc-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.course-center--lesson-focus .cu-option-btn.cu-mc-option,
.course-center--lesson-focus .cu-ab-choice-row {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: 56px;
  margin: 0;
  padding: 12px 16px;
  text-align: left;
  border: 2px solid var(--cu-duo-border, #e5e5e5);
  border-radius: 16px;
  border-bottom-width: 4px;
  background: #fff;
  color: var(--cu-duo-text, #4b4b4b);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.course-center--lesson-focus .cu-ab-choice-row {
  cursor: pointer;
  gap: 12px;
}

.course-center--lesson-focus .cu-ab-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--cu-duo-border, #e5e5e5);
  background: #f7f7f7;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--cu-duo-text, #4b4b4b);
  padding: 0;
}

.course-center--lesson-focus .cu-ex-kwtrans {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-center--lesson-focus .cu-option-btn.cu-mc-option .cu-mc-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f7f7f7;
  border: 2px solid var(--cu-duo-border, #e5e5e5);
  font-size: 0.82rem;
  color: var(--cu-duo-text, #4b4b4b);
  margin-right: 12px;
}

.course-center--lesson-focus .cu-option-selected,
.course-center--lesson-focus .cu-ab-btn.cu-ab-selected {
  background: var(--cu-duo-blue-bg, #ddf4ff) !important;
  border-color: var(--cu-duo-blue-border, #1899d6) !important;
  color: var(--cu-duo-text, #4b4b4b) !important;
}

.course-center--lesson-focus .cu-option-correct,
.course-center--lesson-focus .cu-ab-btn.cu-ab-correct {
  background: var(--cu-duo-green-light, #d7ffb8) !important;
  border-color: var(--cu-duo-green, #58cc02) !important;
  color: var(--cu-duo-green-dark, #58a700) !important;
}

.course-center--lesson-focus .cu-option-incorrect,
.course-center--lesson-focus .cu-ab-btn.cu-ab-incorrect {
  background: var(--cu-duo-red-light, #ffdfe0) !important;
  border-color: var(--cu-duo-red, #ff4b4b) !important;
  color: var(--cu-duo-red, #ff4b4b) !important;
}

.course-center--lesson-focus .cu-option-correct-reveal,
.course-center--lesson-focus .cu-ab-btn.cu-ab-correct-reveal {
  background: var(--cu-duo-green-light, #d7ffb8) !important;
  border-color: var(--cu-duo-green, #58cc02) !important;
  color: var(--cu-duo-green-dark, #58a700) !important;
  box-shadow: none !important;
}

.course-center--lesson-focus .cu-gap-input {
  border-color: #1cb0f6;
  border-bottom-width: 3px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-width: 2ch;
  width: 2ch;
  padding: 2px 2px 4px;
}

.course-center--lesson-focus .cu-hint-pill-input,
.course-center--lesson-focus .cu-gap-inline-textarea,
.course-center--lesson-focus textarea.cu-gap-input.cu-gap-inline-textarea {
  border: none !important;
  border-bottom: 2px solid #1cb0f6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-width: 2ch !important;
  width: 2ch;
  padding: 2px 2px 4px !important;
}

.course-center--lesson-focus .cu-hint-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0 4px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 2px;
  box-shadow: none;
}

.course-center--lesson-focus .cu-hint-pill:focus-within {
  border: none;
  box-shadow: none;
}

.course-center--lesson-focus .cu-hint-pill:has(.cu-hint-word) input.cu-hint-pill-input,
.course-center--lesson-focus .cu-hint-pill:has(.cu-hint-word) textarea.cu-hint-pill-input {
  min-width: 2ch !important;
  flex: 0 1 auto;
}

.course-center--lesson-focus .cu-gap-input.cu-input-correct {
  border-color: var(--cu-duo-green, #58cc02) !important;
  background: var(--cu-duo-green-light, #d7ffb8) !important;
  color: var(--cu-duo-green-dark, #58a700) !important;
}

.course-center--lesson-focus .cu-gap-input.cu-input-incorrect {
  border-color: var(--cu-duo-red, #ff4b4b) !important;
  background: var(--cu-duo-red-light, #ffdfe0) !important;
  color: var(--cu-duo-red, #ff4b4b) !important;
}

.course-center--lesson-focus .cu-ex-sentence {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--cu-duo-text, #4b4b4b);
}

.course-center--lesson-focus .cu-passage-text {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  background: #fff;
  text-align: justify;
  hyphens: auto;
}

.course-center--lesson-focus .cu-ex-context {
  display: none;
}

@media (max-width: 768px) {
  .cu-lesson-feedback {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  }

  .cu-lesson-feedback-top {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .cu-lesson-feedback-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .cu-lesson-feedback-continue,
  .cu-lesson-feedback-explain {
    width: 100%;
    margin-top: 0;
  }

  .cu-lesson-prompt-mascot {
    width: 56px;
  }

  body:has(.dashboard-layout--lesson-focus) .mobile-bottom-nav--duo {
    display: none;
  }

  .course-center--lesson-focus {
    max-width: none;
    padding: 0 16px;
  }

  .cu-lesson-chrome {
    padding-top: calc(8px + env(safe-area-inset-top));
  }

  .cu-lesson-stage {
    justify-content: flex-start;
    padding-top: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cu-lesson-instruction {
    font-size: 0.92rem;
    text-align: left;
    color: var(--primary, #2D2E5F);
  }
}

/* ── Mobile feedback with explain button ─────────────────────────────── */

.cu-lesson-feedback--mobile-explain .cu-lesson-feedback-top {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.cu-lesson-feedback--mobile-explain .cu-lesson-feedback-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.cu-lesson-feedback-explain {
  flex-shrink: 0;
  border: 2px solid var(--cu-duo-green, #1E9D8E);
  border-radius: 14px;
  padding: 12px 20px;
  min-height: 48px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #fff;
  color: var(--cu-duo-green, #1E9D8E);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.cu-lesson-feedback-explain:hover {
  background: var(--cu-duo-green-light, #e6f7f4);
}

.cu-lesson-feedback-explain:active {
  transform: translateY(1px);
}

.cu-lesson-feedback--mobile-explain .cu-lesson-feedback-continue {
  width: 100%;
}

/* ── Full-screen explanation sheet (mobile learning) ───────────────────── */

body.lesson-explanation-open {
  overflow: hidden;
}

.lesson-explanation-sheet {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  animation: lessonExplanationIn 0.28s ease-out;
}

@keyframes lessonExplanationIn {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes lessonExplBlockIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.lesson-explanation-sheet-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
}

/* ── Minimal header ───────────────────────────────────────────────────────── */

.lesson-explanation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  flex-shrink: 0;
  border-bottom: 2px solid #f0f0f0;
  background: #ffffff;
}

.lesson-explanation-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #e8e8e8;
  border-radius: 50%;
  background: #ffffff;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.lesson-explanation-back:hover {
  background: #f5f5f5;
  color: #4b4b4b;
}

.lesson-explanation-back:active {
  transform: scale(0.92);
}

.lesson-explanation-back .material-symbols-outlined {
  font-size: 1.2rem;
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

.lesson-explanation-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1cb0f6;
  color: #ffffff;
  flex-shrink: 0;
}

.lesson-explanation-header-icon .material-symbols-outlined {
  font-size: 1.2rem;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* ── Sheet body ───────────────────────────────────────────────────────────── */

.lesson-explanation-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
}

.lesson-explanation-context {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
  color: #4b4b4b;
}

/* Icon styles inside label pills */

.lesson-explanation-question-label .material-symbols-outlined,
.lesson-explanation-answer-label .material-symbols-outlined {
  font-size: 0.95rem;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lesson-explanation-question-label .material-symbols-outlined {
  color: #1cb0f6;
}

.lesson-explanation-answer-label .material-symbols-outlined {
  color: #46a302;
}

/* ── Question block ───────────────────────────────────────────────────────── */

.lesson-explanation-question {
  padding: 14px 16px;
  border-radius: 16px;
  background: #edf8ff;
  border: 2.5px solid #1cb0f6;
  border-bottom-width: 4px;
  border-bottom-color: #1899d6;
  box-shadow: 0 4px 0 #1899d6;
  animation: lessonExplBlockIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) 0.26s both;
}

.lesson-explanation-question-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
  padding: 5px 13px 5px 6px;
  border-radius: 999px;
  background: #1cb0f6;
  border: 2px solid #1899d6;
  border-bottom-width: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.lesson-explanation-question-text {
  margin: 0;
  padding: 11px 14px;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.45;
  color: #1f2937;
  background: #ffffff;
  border: 2px solid #b8e8fc;
  border-bottom-width: 3px;
  border-bottom-color: #7ec8e4;
  box-shadow: 0 2px 0 rgba(28, 176, 246, 0.14);
}

/* ── Answer block ─────────────────────────────────────────────────────────── */

.lesson-explanation-answer {
  padding: 14px 16px;
  border-radius: 16px;
  background: #e8ffd6;
  border: 2.5px solid #58cc02;
  border-bottom-width: 4px;
  border-bottom-color: #46a302;
  box-shadow: 0 4px 0 #46a302;
  animation: lessonExplBlockIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) 0.33s both;
}

.lesson-explanation-answer-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
  padding: 5px 13px 5px 6px;
  border-radius: 999px;
  background: #58cc02;
  border: 2px solid #46a302;
  border-bottom-width: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.lesson-explanation-answer-text {
  display: block;
  margin: 0;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
  color: #46a302;
  background: #ffffff;
  border: 2px solid #a8e06c;
  border-bottom-width: 3px;
  border-bottom-color: #46a302;
  box-shadow: 0 3px 0 rgba(70, 163, 2, 0.25);
}

/* ── WHY / Tips card ──────────────────────────────────────────────────────── */

.lesson-explanation-card {
  padding: 16px;
  border-radius: 16px;
  background: #fffbe6;
  border: 2.5px solid #ffc800;
  border-bottom-width: 4px;
  border-bottom-color: #e5b400;
  box-shadow: 0 4px 0 #e5b400;
  animation: lessonExplBlockIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) 0.40s both;
}

.lesson-explanation-card-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px 13px 5px 6px;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5c3f00;
  background: #ffc800;
  border: 2px solid #e5b400;
  border-bottom-width: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.lesson-explanation-card-label .material-symbols-outlined {
  font-size: 1.2rem;
  font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 24;
  color: #c99000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lesson-explanation-text {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  line-height: 1.62;
  color: #3a2900;
  background: rgba(255, 255, 255, 0.65);
  border: 2px solid rgba(255, 200, 0, 0.28);
}

.lesson-explanation-text strong {
  color: #8c6800;
  font-weight: 800;
}

/* ── Sheet footer ─────────────────────────────────────────────────────────── */

.lesson-explanation-footer {
  flex-shrink: 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 2px solid #f0f0f0;
}

.lesson-explanation-continue {
  width: 100%;
  border: none;
  border-bottom: 4px solid #e68600;
  border-radius: 16px;
  padding: 16px 20px;
  min-height: 54px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: #ff9600;
  cursor: pointer;
  box-shadow: 0 4px 0 #e68600;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.1s;
}

.lesson-explanation-continue:hover {
  filter: brightness(1.07);
}

.lesson-explanation-continue:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #e68600;
}

/* ── Compact (modal) variant ──────────────────────────────────────────────── */

.lesson-explanation-sheet--compact {
  background: rgba(28, 40, 72, 0.5);
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: lessonExplanationCompactIn 0.22s ease-out;
}

@keyframes lessonExplanationCompactIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lesson-explanation-sheet--compact .lesson-explanation-sheet-inner {
  width: 100%;
  max-width: 440px;
  max-height: min(72vh, 540px);
  height: auto;
  border-radius: 24px;
  border: 2.5px solid #1cb0f6;
  border-bottom-width: 5px;
  border-bottom-color: #1899d6;
  box-shadow: 0 8px 0 #1899d6, 0 20px 56px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  animation: lessonExplanationModalIn 0.24s ease-out;
}

@keyframes lessonExplanationModalIn {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.lesson-explanation-sheet--compact .lesson-explanation-body {
  flex: 1;
  min-height: 0;
}

.lesson-explanation-sheet--compact .lesson-explanation-card {
  flex: initial;
}
