/* EpiPen Training Module — styles.css */
:root {
  --white: #fff;
  --black: #1a1a1a;
  --text-muted: #444;
  --teal: #0aafaf;
  --teal-dark: #088a8a;
  --teal-light: rgba(10, 175, 175, 0.23);
  --grey-bg: #e9edef;
  --highlight: rgba(255, 255, 66, 0.48);
  --font-title: 'Abhaya Libre', Georgia, serif;
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Istok Web', 'Inter', sans-serif;
  --content-max: 900px;
  --content-wide: 1200px;
  --slide-padding-h: 2.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--black);
  background: #f0f5f6;
  -webkit-font-smoothing: antialiased;
}

.main {
  height: 100vh;
  overflow: hidden;
  position: relative;
  width: 100%;
}

/* Progress header — Step-by-Step Learning style */
.progress-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #e3f4f8;
  padding: 0.85rem 1.5rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: none;
}

.progress-header.is-visible {
  display: block;
}

.progress-title {
  margin: 0 0 0.5rem 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(10, 175, 175, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-label {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Content card — white raised card */
.content-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 1.75rem 2rem 2rem;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.link-back {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 1rem;
}

.link-back:hover {
  text-decoration: underline;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.card-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #e3f4f8;
  color: var(--teal-dark);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem 0;
}

.content-card--quiz .slide-heading,
.content-card--quiz .quiz-title {
  margin-top: 0;
}

.card-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.btn-continue {
  padding: 0.6rem 1.25rem;
}

/* MC options — rounded boxes with letter */
.mc-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.mc-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.mc-option:hover {
  border-color: #bdbdbd;
}

.mc-option {
  position: relative;
}

.mc-option input[type="radio"] {
  position: relative;
  left: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  padding: 0;
  opacity: 1;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--teal);
}

.mc-letter {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #e0e0e0;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-option.is-correct {
  border-color: #2e7d32;
  background: #e8f5e9;
}

.mc-option.is-correct .mc-letter {
  background: #2e7d32;
  color: var(--white);
}

.mc-option.is-correct::after {
  content: '✓';
  margin-left: auto;
  color: #2e7d32;
  font-size: 1.25rem;
  font-weight: bold;
}

.mc-option.is-incorrect {
  border-color: #c62828;
  background: #ffebee;
}

.mc-option.is-incorrect .mc-letter {
  background: #c62828;
  color: var(--white);
}

.mc-option.is-incorrect::after {
  content: '✕';
  margin-left: auto;
  color: #c62828;
  font-size: 1.25rem;
  font-weight: bold;
}

.mc-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--black);
}

/* Feedback box — yellow (try again) / green (success) */
.feedback-box {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border-left: 4px solid #f9a825;
}

.feedback-box.feedback-box--pass {
  background: #e8f5e9;
  border-left-color: #2e7d32;
}

.feedback-box.feedback-box--fail {
  background: #fffde7;
  border-left-color: #f9a825;
}

.feedback-title {
  margin: 0 0 0.35rem 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
}

.feedback-box--pass .feedback-title {
  color: #1b5e20;
}

.feedback-box--fail .feedback-title {
  color: #e65100;
}

.feedback-box .quiz-feedback-actions {
  margin-top: 0.75rem;
  justify-content: flex-end;
}

/* Slides — fit viewport, no scroll */
.slide {
  display: none;
  height: 100vh;
  max-height: 100vh;
  padding: 0;
  padding-top: 0;
  max-width: 100%;
  margin: 0;
  position: absolute;
  inset: 0;
  flex-direction: column;
  overflow: hidden;
}

.slide.is-active {
  display: flex;
}

/* When progress bar is visible, leave room at top */
.main.has-progress .slide:not(.slide--title) {
  padding-top: 4rem;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

.main.has-progress .slide .content-card {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* Final assessment: single page, no scroll, use full screen */
.slide--final {
  overflow: hidden;
  padding-top: 4rem;
  padding-bottom: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.main.has-progress .slide--final {
  padding-top: 5.5rem;
  justify-content: flex-start;
  align-items: stretch;
}

.slide--final .content-card--final {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.75rem 1.25rem 0.5rem;
  max-width: 100%;
}

.slide--final .card-pill--final {
  margin-bottom: 0.2rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
}

.slide--final .quiz-title--final {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.slide--final .final-quiz-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  align-content: start;
  overflow: hidden;
  padding: 0.25rem 0 0.4rem 0;
}

.slide--final .final-quiz-grid .quiz-block {
  margin-bottom: 0.2rem;
  min-width: 0;
}

.slide--final .final-quiz-grid .quiz-q {
  font-size: 0.75rem;
  margin-top: 0;
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.slide--final .final-quiz-grid label {
  font-size: 0.7rem;
  margin-bottom: 0.08rem;
  line-height: 1.25;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.slide--final .final-quiz-grid input[type="radio"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.slide--final .quiz-actions--final {
  flex: 0 0 auto;
  margin-top: 0.35rem;
  margin-bottom: 0.25rem;
}

@media (max-width: 700px) {
  .slide--final .final-quiz-grid {
    grid-template-columns: 1fr;
  }
}

.slide-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 1rem var(--slide-padding-h);
  width: 100%;
  max-width: var(--content-wide);
}

.slide .content-card .slide-heading {
  margin-bottom: 0.75rem;
}

.slide .content-card .slide-content {
  margin: 0;
}

/* Title slide — centered, fills width */
.slide--title {
  background: var(--white);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 3rem;
  position: relative;
  overflow: hidden;
}

.slide--title.is-active {
  display: flex;
}

.title-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    linear-gradient(135deg, var(--teal-light) 0%, transparent 50%),
    linear-gradient(225deg, var(--teal-light) 0%, transparent 40%),
    linear-gradient(315deg, var(--teal-light) 0%, transparent 50%);
  opacity: 0.6;
}

.title-line {
  font-family: var(--font-title);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0 0 0.2rem 0;
  position: relative;
  z-index: 1;
  color: var(--black);
}

.title-main {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(3.25rem, 9vw, 6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem 0;
  position: relative;
  z-index: 1;
  color: var(--black);
}

.title-meta {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin: 0 0 1.25rem 0;
  position: relative;
  z-index: 1;
  color: var(--text-muted);
}

.title-meta p {
  margin: 0 0 0.2rem 0;
}

.pass-notice {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin: 0 0 1.5rem 0;
  max-width: 440px;
  position: relative;
  z-index: 1;
  line-height: 1.5;
  color: var(--text-muted);
}

.btn--start {
  position: relative;
  z-index: 1;
}

/* Content slides — centered, appealing type */
.slide-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 1.75rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem 0;
  max-width: 100%;
  color: var(--black);
  line-height: 1.3;
}

.slide-content {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  max-width: 100%;
  color: var(--black);
}

.slide-content p {
  margin: 0 0 0.5rem 0;
}

.slide-content p:last-child {
  margin-bottom: 0;
}

.slide-content ul,
.slide-content ol {
  margin: 0.5rem 0 0.6rem 0;
  padding-left: 1.75rem;
}

.slide-content li {
  margin-bottom: 0.35rem;
}

.slide-content strong {
  color: var(--black);
  font-weight: 600;
}

.slide-desc {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  max-width: 520px;
  line-height: 1.55;
}

.slide--video .slide-inner {
  align-items: center;
  text-align: center;
}

.slide--video .slide-heading {
  margin-bottom: 0.35rem;
}

.video-link {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.video-link:hover {
  text-decoration: underline;
}

/* Video thumbnail at start */
.video-thumb-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.75rem auto;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: box-shadow 0.2s, transform 0.2s;
}

.video-thumb-link:hover {
  box-shadow: 0 6px 20px rgba(10, 175, 175, 0.25);
  transform: translateY(-2px);
}

.video-thumb-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
}

.video-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: background 0.2s;
}

.video-thumb-play::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 24px 0 24px 42px;
  border-color: transparent transparent transparent rgba(255,255,255,0.95);
  margin-left: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.video-thumb-link:hover .video-thumb-play {
  background: rgba(0,0,0,0.35);
}

.video-thumb-label {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal);
}

.video-thumb-link:hover .video-thumb-label {
  text-decoration: underline;
}

/* Next button — right-aligned */
.btn-next {
  position: absolute;
  right: var(--slide-padding-h);
  top: 50%;
  transform: translateY(-50%);
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  background: var(--teal);
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  box-shadow: 0 3px 12px rgba(10, 175, 175, 0.35);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.btn-next span {
  display: inline;
}

.btn-next:hover {
  background: var(--teal-dark);
  transform: translateY(-50%) scale(1.02);
  box-shadow: 0 4px 16px rgba(10, 175, 175, 0.4);
}

.btn-next--pass {
  right: var(--slide-padding-h);
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--teal-dark);
  box-shadow: 0 4px 12px rgba(10, 175, 175, 0.35);
}

.btn:disabled,
.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: auto;
}

.btn--primary:disabled:hover {
  background: var(--teal);
  box-shadow: none;
}

.btn--secondary {
  background: var(--teal);
  color: var(--white);
  margin-right: 0.5rem;
}

.btn--outline {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}

.btn--outline:hover {
  background: var(--teal-light);
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Quiz slides — card wraps everything */
.slide--quiz {
  background: #f0f5f6;
  padding: 1.5rem var(--slide-padding-h);
}

.slide--quiz .content-card {
  max-width: 720px;
}

.slide--quiz .quiz-title {
  text-align: left;
  font-size: 1.15rem;
}

.slide--quiz .slide-inner {
  padding-left: 0;
  padding-right: 0;
  justify-content: flex-start;
  overflow: hidden;
  margin: 0 auto;
  max-width: var(--content-wide);
}

.quiz-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  text-align: center;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem 0;
  color: var(--black);
  line-height: 1.3;
}

.quiz-subtitle {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  margin: 0 0 0.6rem 0;
  color: var(--text-muted);
}

.quiz-instruction {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.quiz-list {
  padding-left: 1.5rem;
  margin: 0 0 0.6rem 0;
}

.quiz-list li {
  margin-bottom: 0.4rem;
  font-size: 1rem;
  line-height: 1.5;
}

.quiz-list input[type="text"] {
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 90px;
  max-width: 120px;
}

.quiz-list input.correct {
  border-color: #0a8a0a;
  background: #e8f5e9;
}

.quiz-list input.incorrect {
  border-color: #c00;
  background: #ffebee;
}

.word-bank {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin: 0.5rem 0 0.6rem 0;
  padding: 0.5rem 0.9rem;
  background: var(--grey-bg);
  border-radius: 8px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Word bank drag-and-drop (fill-in-blank) */
.wb-instruction {
  margin-bottom: 0.5rem;
}

.quiz-list--wb {
  margin-bottom: 0.75rem;
}

.quiz-list--wb li {
  margin-bottom: 0.4rem;
}

.wb-drop-zone {
  display: inline-block;
  min-width: 6rem;
  min-height: 2rem;
  vertical-align: middle;
  border: 2px dashed #bdbdbd;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  margin: 0 0.15rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s;
}

.wb-drop-zone.drag-over {
  border-color: var(--teal);
  background: rgba(10, 175, 175, 0.08);
}

.wb-drop-zone.filled {
  border-style: solid;
  border-color: #9e9e9e;
  background: var(--white);
  color: var(--black);
}

.wb-drop-zone.correct {
  border-color: #2e7d32;
  background: #e8f5e9;
}

.wb-drop-zone.incorrect {
  border-color: #c62828;
  background: #ffebee;
}

.wb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: var(--grey-bg);
  border-radius: 8px;
}

.wb-chip {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: var(--white);
  border: 2px solid #9e9e9e;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  touch-action: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.wb-chip:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(10, 175, 175, 0.2);
}

.wb-chip:active {
  cursor: grabbing;
}

.wb-chip.dragging {
  opacity: 0.6;
}

.quiz-block {
  margin-bottom: 0.5rem;
}

.quiz-q {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.45rem 0;
  line-height: 1.5;
  color: var(--black);
}

.quiz-q input[type="text"] {
  font-size: 0.85rem;
  padding: 0.15rem 0.35rem;
  min-width: 70px;
  max-width: 100px;
}

.quiz-mc label,
.slide--quiz label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1.45;
  color: var(--black);
}

.quiz-mc input[type="radio"],
.slide--quiz input[type="radio"] {
  margin-right: 0.4rem;
}

.quiz-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quiz-feedback {
  margin-top: 0.5rem;
  padding: 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.quiz-feedback--fail {
  background: #ffebee;
  border: 1px solid #ffcdd2;
}

.quiz-feedback p {
  margin: 0 0 0.4rem 0;
}

.quiz-feedback .btn {
  margin-right: 0.4rem;
  margin-bottom: 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.quiz-feedback-inline {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--grey-bg);
}

.quiz-feedback-msg {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  line-height: 1.5;
}

.quiz-feedback-msg.pass {
  color: #0a8a0a;
  font-weight: 600;
}

.quiz-feedback-msg.fail {
  color: #c00;
}

.quiz-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.match-pairs p {
  margin: 0 0 0.5rem 0;
}

.match-pairs select {
  margin-left: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.95rem;
  min-width: 200px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.match-pairs select.correct {
  border-color: #0a8a0a;
  background: #e8f5e9;
}

.match-pairs select.incorrect {
  border-color: #c00;
  background: #ffebee;
}

/* Quiz result overlay — success (green) / fail (yellow) with animation */
.quiz-result-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 4rem 2rem 2rem;
  opacity: 0;
  transform: scale(0.96);
  animation: quizResultIn 0.4s ease forwards;
  z-index: 10;
}

.quiz-result-overlay .quiz-result-actions {
  width: 100%;
  max-width: var(--content-wide);
  justify-content: flex-end;
  padding-right: 0;
}

@keyframes quizResultIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.quiz-result--success {
  background: linear-gradient(160deg, #e8f5e9 0%, #c8e6c9 100%);
}

.quiz-result--fail {
  background: linear-gradient(160deg, #fffde7 0%, #fff9c4 100%);
}

.quiz-result-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.quiz-result--success .quiz-result-icon { color: #2e7d32; }
.quiz-result--fail .quiz-result-icon { color: #f57f17; }

.quiz-result-message {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  max-width: 420px;
  margin: 0 0 0.5rem 0;
  line-height: 1.45;
}

.quiz-result--success .quiz-result-message { color: #1b5e20; }
.quiz-result--fail .quiz-result-message { color: #e65100; }

.quiz-result-detail {
  font-size: 0.95rem;
  text-align: center;
  max-width: 380px;
  margin: 0 0 1.25rem 0;
  line-height: 1.5;
  color: var(--text-muted);
}

.quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.quiz-result .btn {
  margin: 0;
}

.slide--quiz .quiz-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* Drag-and-drop matching */
.drag-match-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  min-height: 2.5rem;
}

.drag-match-prompt {
  flex: 0 0 auto;
  min-width: 180px;
  font-size: 1rem;
  line-height: 1.4;
}

.drag-drop-zone {
  flex: 1;
  min-height: 3rem;
  min-width: 120px;
  border: 2px dashed #bdbdbd;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s;
}

.drag-drop-zone.drag-over {
  border-color: var(--teal);
  background: rgba(10, 175, 175, 0.08);
}

.drag-drop-zone.filled {
  border-style: solid;
  border-color: #9e9e9e;
  background: var(--white);
  color: var(--black);
}

.drag-word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--grey-bg);
  border-radius: 8px;
}

.drag-chip {
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  background: var(--white);
  border: 2px solid #9e9e9e;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  touch-action: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.drag-chip:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(10, 175, 175, 0.2);
}

.drag-chip:active {
  cursor: grabbing;
}

.drag-chip.dragging {
  opacity: 0.6;
}

.drag-chip.selected-chip {
  border-color: var(--teal);
  background: rgba(10, 175, 175, 0.12);
  box-shadow: 0 0 0 2px var(--teal);
}

.drag-chip.used {
  opacity: 0.5;
  pointer-events: none;
}

.drag-drop-zone.correct {
  border-color: #2e7d32;
  background: #e8f5e9;
}

.drag-drop-zone.incorrect {
  border-color: #c62828;
  background: #ffebee;
}

/* Matching quiz (legacy / fallback) */
.matching-quiz {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: flex-start;
  margin: 0.4rem 0 0.5rem 0;
  flex-wrap: wrap;
}

.matching-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.match-item {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-width: 180px;
  line-height: 1.4;
}

.matching-left .match-item { text-align: right; }
.matching-right .match-item { text-align: left; }

.match-item.selected {
  border-color: var(--teal);
  background: rgba(10, 175, 175, 0.1);
}

.match-item.correct {
  border-color: #0a8a0a;
  background: #e8f5e9;
}

.match-item.incorrect {
  border-color: #c00;
  background: #ffebee;
}

/* Final assessment */
.final-intro {
  font-size: 1.05rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto 1.25rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.slide--final .quiz-q {
  margin-top: 0.35rem;
}

.slide--final #finalQuizContainer .quiz-block {
  margin-bottom: 0.35rem;
}

.slide--final #finalQuizContainer .quiz-q {
  font-size: 0.9rem;
}

.slide--final #finalQuizContainer label {
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

/* Ready for assessment (slide 17) */
.slide--ready-assessment .content-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.card-pill--teal {
  background: rgba(10, 175, 175, 0.15);
  color: var(--teal);
}

.ready-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  color: var(--black);
  margin: 0 0 0.5rem 0;
}

.ready-intro {
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 1.25rem 0;
}

.ready-section {
  margin-bottom: 1.25rem;
}

.ready-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
  margin: 0 0 0.5rem 0;
}

.ready-section-p {
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 0.5rem 0;
}

.ready-list {
  margin: 0.35rem 0 0 0;
  padding-left: 1.35rem;
}

.ready-list--checks li {
  list-style: none;
  position: relative;
  margin-bottom: 0.35rem;
}

.ready-list--checks li::before {
  content: "✓";
  position: absolute;
  left: -1.35rem;
  color: #2e7d32;
  font-weight: 700;
}

.ready-rules {
  margin: 0.35rem 0 0 0;
  padding-left: 1.25rem;
}

.ready-rules li {
  position: relative;
  margin-bottom: 0.4rem;
  line-height: 1.5;
  color: var(--text-muted);
  padding-left: 0.5rem;
}

.ready-rule-icon {
  position: absolute;
  left: 0;
  top: 0.25rem;
  color: var(--teal);
  font-size: 0.5rem;
}

.ready-tip {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.4);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--black);
}

.ready-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.ready-actions .link-back {
  margin: 0;
}

/* Score slide — Assessment Passed / Failed */
.slide--score {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #e8e8e8;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  text-align: left;
}

.slide--score.is-active {
  display: flex;
}

.main.has-progress .slide--score {
  padding-top: 6rem;
}

.score-card {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.score-page-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: #424242;
  margin: 0 0 1rem 0;
}

.score-card-inner {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 2rem;
}

.score-state {
  margin: 0;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 4px solid;
}

.score-circle--pass {
  background: #e8f5e9;
  border-color: #66bb6a;
  color: #1b5e20;
}

.score-circle--fail {
  background: var(--white);
  border-color: #e57373;
  color: #c62828;
}

.score-circle-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.2;
}

.score-circle-detail {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.score-congrats {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
  text-align: center;
  margin: 0 0 0.75rem 0;
}

.score-not-quite {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
  text-align: center;
  margin: 0 0 0.75rem 0;
}

.score-desc {
  text-align: center;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 1.25rem 0;
  font-size: 0.95rem;
}

.score-module-complete {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.score-module-complete-icon {
  color: #2e7d32;
  font-weight: 700;
  margin-right: 0.35rem;
}

.score-module-complete strong {
  color: #1b5e20;
}

.score-module-complete p {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.score-alert {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.score-alert--fail {
  background: #ffebee;
  border: 1px solid #ef9a9a;
}

.score-alert--fail strong {
  color: #c62828;
}

.score-alert-icon {
  color: #c62828;
  margin-right: 0.35rem;
  font-weight: 700;
}

.score-alert-msg {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.score-ready-box {
  background: rgba(10, 175, 175, 0.08);
  border: 1px solid rgba(10, 175, 175, 0.35);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.score-ready-box strong {
  color: var(--teal);
  font-size: 0.95rem;
}

.score-ready-box p {
  margin: 0.35rem 0 0.75rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.score-ready-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.score-review-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--black);
  margin: 0 0 0.75rem 0;
}

.score-review-count {
  font-weight: 600;
  color: var(--text-muted);
}

.score-review-list {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
}

.score-review-list li {
  background: #fffde7;
  border: 1px solid #fff59d;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--black);
}

.score-review-list li strong {
  display: block;
  margin-bottom: 0.25rem;
}

.score-review-list li p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.score-actions--pass {
  margin-top: 0.5rem;
}

.score-actions--fail {
  margin-top: 0.5rem;
  justify-content: center;
}

/* Highlight for failed review (e.g. yellow) */
.slide-content .highlight-fail {
  background: var(--highlight);
  padding: 0.1em 0.2em;
}

/* Responsive — keep everything on screen */
@media (max-width: 900px) {
  .slide--title {
    padding: 1.5rem 2rem;
  }

  .slide-inner {
    padding-left: 1rem;
    padding-right: 3rem;
  }

  .slide--quiz {
    padding-left: 1rem;
    padding-right: 3rem;
  }

  .btn-next {
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .matching-quiz {
    flex-direction: column;
    align-items: stretch;
  }

  .matching-left .match-item,
  .matching-right .match-item {
    text-align: left;
  }

  .video-thumb-wrap {
    width: min(280px, 90vw);
  }
}
