/* ============================================================
   NEXUS ACADEMY — LESSON PLAYER STYLES
   ============================================================ */

/* Layout Shell */
.lp-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
}

/* ── Sidebar ── */
.lp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line-soft);
  background: rgba(6, 14, 25, 0.96);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.lp-sidebar-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.lp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  transition: color 180ms;
}
.lp-back-link:hover { color: var(--gold-400); }
.lp-back-link::before { content: "←"; }

.lp-course-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-500);
  margin-bottom: 4px;
}

.lp-module-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  line-height: 1.25;
  color: var(--ivory-100);
  margin: 0;
}

.lp-lesson-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px;
}

.lp-course-module {
  margin-bottom: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.02);
}

.lp-course-module.current,
.lp-course-module[open] {
  background: rgba(200,168,75,0.04);
  border-color: var(--line);
}

.lp-course-module-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  list-style: none;
  cursor: pointer;
  padding: 12px 12px 10px;
}

.lp-course-module-summary::-webkit-details-marker {
  display: none;
}

.lp-course-module-code {
  font-size: 11px;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lp-course-module-copy strong {
  display: block;
  color: var(--ivory-100);
  font-size: 13px;
  line-height: 1.35;
}

.lp-course-module-copy em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lp-course-module-lessons {
  padding: 0 8px 8px;
}

.lp-lesson-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 0;
  border: 1px solid transparent;
  margin-bottom: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms, border-color 160ms;
}
.lp-lesson-item:hover {
  background: rgba(200, 168, 75, 0.07);
  border-color: var(--line-soft);
}
.lp-lesson-item.active {
  background: rgba(200, 168, 75, 0.12);
  border-color: var(--line);
}

.lp-lesson-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid var(--muted);
  background: transparent;
}
.lp-lesson-item.done .lp-lesson-dot {
  background: var(--success);
  border-color: var(--success);
}
.lp-lesson-item.active .lp-lesson-dot {
  background: var(--gold-500);
  border-color: var(--gold-500);
}
.lp-lesson-item.locked .lp-lesson-dot {
  border-color: rgba(145, 161, 179, 0.3);
}

.lp-lesson-info { flex: 1; min-width: 0; }
.lp-lesson-name {
  font-size: 13px;
  color: var(--ivory-200);
  line-height: 1.35;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-lesson-item.active .lp-lesson-name { color: var(--gold-400); font-weight: 600; }
.lp-lesson-item.locked .lp-lesson-name { color: var(--muted); }
.lp-lesson-duration {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* XP Tracker in sidebar */
.lp-xp-tracker {
  padding: 16px 20px;
  border-top: 1px solid var(--line-soft);
  background: rgba(200, 168, 75, 0.04);
}
.lp-xp-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}
.lp-xp-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.lp-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  border-radius: 999px;
  transition: width 600ms ease;
}
.lp-xp-numbers {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gold-400);
  font-family: "Cormorant Garamond", serif;
}

/* ── Main Content Area ── */
.lp-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar with stage progress */
.lp-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 40px;
  background: rgba(8, 18, 31, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.lp-stage-track {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-dot {
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  transition: background 300ms, width 300ms;
}
.stage-dot.done { background: var(--gold-500); opacity: 0.6; }
.stage-dot.active { background: var(--gold-400); width: 40px; }

.lp-stage-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.lp-lesson-title-bar {
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  color: var(--ivory-100);
  text-align: center;
  flex: 1;
}

.lp-xp-counter {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--gold-400);
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(200,168,75,0.06);
  white-space: nowrap;
}
.lp-xp-counter::before { content: "✦"; font-size: 10px; }

/* ── Content Area ── */
.lp-content {
  flex: 1;
  padding: 48px 40px 120px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* Stage panels */
.lp-stage { display: none; }
.lp-stage.active { display: block; }

.content-quick-check {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.module-brief-block,
.module-scenario-block {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(135deg, rgba(200,168,75,0.08), rgba(91,164,207,0.04)),
    rgba(255,255,255,0.02);
}

.lesson-resources {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.025);
}

.module-scenario-options {
  display: grid;
  gap: 10px;
}

.quick-check-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-500);
  margin-bottom: 10px;
}

.quick-check-prompt {
  font-family: "Cormorant Garamond", serif;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ivory-100);
  margin-bottom: 10px;
}

.quick-check-clue {
  color: var(--muted-strong);
  line-height: 1.7;
  font-size: 14px;
  margin-bottom: 16px;
}

.quick-check-options {
  display: grid;
  gap: 10px;
}

.quick-check-option {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.03);
  color: var(--ivory-200);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 160ms, background 160ms, transform 160ms;
}

.quick-check-option:hover {
  border-color: var(--line);
  background: rgba(200,168,75,0.08);
  transform: translateY(-1px);
}

.quick-check-option.correct {
  border-color: rgba(98,197,158,0.5);
  background: rgba(98,197,158,0.12);
  color: var(--ivory-100);
}

.quick-check-option.incorrect {
  border-color: rgba(214,125,125,0.5);
  background: rgba(214,125,125,0.12);
  color: var(--ivory-100);
}

.quick-check-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold-500);
  background: rgba(200,168,75,0.08);
  border-radius: 0 14px 14px 0;
  color: var(--muted-strong);
  line-height: 1.7;
  font-size: 14px;
}

.section-links,
.resource-grid {
  display: grid;
  gap: 12px;
}

.section-links {
  margin-top: 16px;
}

.section-links.compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.section-link,
.resource-card {
  display: grid;
  gap: 6px;
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  transition: border-color 160ms, transform 160ms, background 160ms;
}

.section-link:hover,
.resource-card:hover {
  border-color: var(--line);
  background: rgba(200,168,75,0.08);
  transform: translateY(-1px);
}

.resource-kind {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-500);
}

.section-link strong,
.resource-card strong {
  color: var(--ivory-100);
  font-size: 14px;
  line-height: 1.5;
}

.resource-note {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.resource-grid {
  margin-top: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Overview stage */
.lp-overview-hook {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.25;
  color: var(--ivory-100);
  margin-bottom: 28px;
  border-left: 3px solid var(--gold-500);
  padding-left: 20px;
}
.lp-objectives-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-500);
  margin-bottom: 14px;
}
.lp-objectives {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.lp-objectives li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted-strong);
  line-height: 1.65;
  font-size: 15px;
}
.lp-objectives li::before {
  content: counter(obj);
  counter-increment: obj;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200,168,75,0.12);
  border: 1px solid var(--line);
  color: var(--gold-400);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.lp-objectives { counter-reset: obj; }

.lp-xp-preview {
  margin-top: 32px;
  padding: 18px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(200,168,75,0.04);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lp-xp-preview-icon {
  font-size: 22px;
}
.lp-xp-preview-text {
  flex: 1;
}
.lp-xp-preview-text strong {
  display: block;
  color: var(--gold-400);
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
}
.lp-xp-preview-text span {
  color: var(--muted);
  font-size: 13px;
}

/* Content Sections (Reading stage) */
.content-section {
  margin-bottom: 44px;
}
.content-section + .content-section {
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}
.section-heading {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  color: var(--ivory-100);
  margin: 0 0 16px;
}
.section-body {
  color: var(--muted-strong);
  line-height: 1.85;
  font-size: 16px;
}
.section-body p { margin: 0 0 14px; }
.section-body p:last-child { margin-bottom: 0; }

.callout {
  margin: 20px 0;
  padding: 18px 22px;
  border-radius: 16px;
  border-left: 3px solid var(--gold-500);
  background: rgba(200,168,75,0.07);
}
.callout.field-note {
  border-left-color: #5ba4cf;
  background: rgba(91,164,207,0.07);
}
.callout.key-principle {
  border-left-color: var(--warning);
  background: rgba(210,159,87,0.08);
}
.callout.danger {
  border-left-color: var(--danger);
  background: rgba(214,125,125,0.07);
}
.callout-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--gold-500);
  margin-bottom: 8px;
}
.callout.field-note .callout-label { color: #5ba4cf; }
.callout.key-principle .callout-label { color: var(--warning); }
.callout.danger .callout-label { color: var(--danger); }
.callout p {
  color: var(--ivory-200);
  line-height: 1.75;
  font-size: 15px;
  margin: 0;
}

/* ── Flashcard Deck ── */
.flashcard-stage-head {
  text-align: center;
  margin-bottom: 36px;
}
.flashcard-stage-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  margin: 0 0 8px;
}
.flashcard-stage-head p {
  color: var(--muted);
  font-size: 14px;
}

.flashcard-deck {
  perspective: 1000px;
  max-width: 580px;
  margin: 0 auto 28px;
}
.flashcard {
  width: 100%;
  height: 280px;
  cursor: pointer;
  position: relative;
}
.card-inner {
  width: 100%;
  height: 100%;
  transition: transform 500ms ease;
  transform-style: preserve-3d;
  position: relative;
}
.flashcard.flipped .card-inner {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid var(--line);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}
.card-front {
  background: linear-gradient(160deg, rgba(22, 51, 84, 0.9), rgba(8, 18, 31, 0.95));
}
.card-back {
  background: linear-gradient(160deg, rgba(12, 30, 53, 0.95), rgba(8, 18, 31, 0.98));
  transform: rotateY(180deg);
}
.card-front-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-500);
  margin-bottom: 16px;
}
.card-term {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  color: var(--ivory-100);
  margin-bottom: 12px;
}
.card-tap-hint {
  color: var(--muted);
  font-size: 12px;
}
.card-back-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-500);
  margin-bottom: 14px;
}
.card-definition {
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}
.card-example {
  font-size: 13px;
  color: var(--gold-400);
  font-style: italic;
}

.card-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}
.card-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--ivory-100);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms, border-color 160ms;
}
.card-nav-btn:hover:not(:disabled) {
  background: rgba(200,168,75,0.1);
  border-color: var(--line);
}
.card-nav-btn:disabled { opacity: 0.3; cursor: default; }
.card-counter {
  font-size: 14px;
  color: var(--muted);
  min-width: 60px;
  text-align: center;
}

.flashcard-progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.fc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: background 200ms;
}
.fc-dot.seen { background: var(--gold-500); opacity: 0.5; }
.fc-dot.current { background: var(--gold-400); }

/* ── Matching Exercise ── */
.matching-head {
  text-align: center;
  margin-bottom: 28px;
}
.matching-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  margin: 0 0 8px;
}
.matching-head p { color: var(--muted); font-size: 14px; }

.matching-ex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.match-col-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-500);
  margin-bottom: 10px;
  padding-left: 4px;
}
.match-item {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--line-soft);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted-strong);
  transition: border-color 200ms, background 200ms, transform 150ms;
  margin-bottom: 10px;
  user-select: none;
}
.match-item:hover:not(.matched):not(.locked) {
  border-color: rgba(200,168,75,0.35);
  background: rgba(200,168,75,0.05);
}
.match-item.selected {
  border-color: var(--gold-500);
  background: rgba(200,168,75,0.12);
  color: var(--gold-400);
}
.match-item.matched {
  border-color: rgba(98,197,158,0.45);
  background: rgba(98,197,158,0.08);
  color: var(--success);
  cursor: default;
}
.match-item.wrong {
  border-color: rgba(214,125,125,0.5);
  background: rgba(214,125,125,0.08);
  animation: wrongShake 300ms ease;
}
.match-item.locked { cursor: default; opacity: 0.5; }

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.matching-score {
  text-align: center;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-size: 14px;
}
.matching-score strong { color: var(--gold-400); }

/* ── Scenario Exercise ── */
.scenario-head {
  text-align: center;
  margin-bottom: 28px;
}
.scenario-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  margin: 0 0 8px;
}
.scenario-head p { color: var(--muted); font-size: 14px; }

.scenario-box {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
}
.scenario-intro {
  padding: 18px 22px;
  background: rgba(200,168,75,0.05);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.scenario-situation {
  padding: 22px;
  color: var(--ivory-200);
  line-height: 1.8;
  font-size: 16px;
  background: rgba(8,18,31,0.5);
}

.scenario-choices-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 14px;
}
.choice-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.choice-btn {
  padding: 16px 20px;
  border-radius: 14px;
  border: 1.5px solid var(--line-soft);
  background: rgba(255,255,255,0.02);
  color: var(--muted-strong);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  line-height: 1.55;
  transition: border-color 180ms, background 180ms;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}
.choice-btn:hover:not(:disabled) {
  border-color: rgba(200,168,75,0.35);
  background: rgba(200,168,75,0.05);
}
.choice-btn:disabled { cursor: default; }
.choice-btn.selected-choice {
  border-color: var(--gold-500);
  background: rgba(200,168,75,0.1);
}
.choice-btn.optimal-choice {
  border-color: rgba(98,197,158,0.5);
  background: rgba(98,197,158,0.07);
}
.choice-btn.poor-choice {
  border-color: rgba(214,125,125,0.4);
  background: rgba(214,125,125,0.05);
}
.choice-label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.outcome-panel {
  display: none;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(12,30,53,0.6);
  margin-bottom: 16px;
}
.outcome-panel.visible { display: block; }
.outcome-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 10px;
}
.outcome-text {
  color: var(--muted-strong);
  line-height: 1.75;
  font-size: 15px;
  margin-bottom: 16px;
}

.expert-take {
  padding: 16px 20px;
  border-radius: 14px;
  border-left: 3px solid var(--gold-500);
  background: rgba(200,168,75,0.07);
}
.expert-take-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-500);
  margin-bottom: 8px;
}
.expert-take p {
  color: var(--ivory-200);
  line-height: 1.75;
  font-size: 15px;
  margin: 0;
}

/* ── Quiz ── */
.quiz-head {
  text-align: center;
  margin-bottom: 28px;
}
.quiz-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  margin: 0 0 8px;
}
.quiz-head p { color: var(--muted); font-size: 14px; }

.quiz-progress-wrap {
  margin-bottom: 28px;
}
.quiz-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.quiz-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  border-radius: 999px;
  transition: width 400ms ease;
}

.quiz-question-wrap {
  margin-bottom: 24px;
}
.quiz-q-number {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-500);
  margin-bottom: 10px;
}
.quiz-question {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  color: var(--ivory-100);
  line-height: 1.3;
  margin-bottom: 22px;
}
.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-opt {
  padding: 15px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--line-soft);
  background: rgba(255,255,255,0.02);
  color: var(--muted-strong);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 180ms, background 180ms;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.quiz-opt:hover:not(:disabled) {
  border-color: rgba(200,168,75,0.35);
  background: rgba(200,168,75,0.05);
}
.quiz-opt:disabled { cursor: default; }
.quiz-opt.selected { border-color: var(--gold-500); background: rgba(200,168,75,0.1); }
.quiz-opt.correct {
  border-color: rgba(98,197,158,0.5);
  background: rgba(98,197,158,0.1);
  color: var(--success);
}
.quiz-opt.incorrect {
  border-color: rgba(214,125,125,0.4);
  background: rgba(214,125,125,0.07);
  color: var(--danger);
}
.quiz-opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.7;
}
.quiz-feedback {
  display: none;
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(12,30,53,0.7);
  color: var(--muted-strong);
  line-height: 1.75;
  font-size: 14px;
}
.quiz-feedback.visible { display: block; }
.quiz-feedback.correct-fb { border-color: rgba(98,197,158,0.3); }
.quiz-feedback.incorrect-fb { border-color: rgba(214,125,125,0.3); }
.quiz-feedback-icon {
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
}
.quiz-next-btn {
  margin-top: 16px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(200,168,75,0.1);
  color: var(--gold-400);
  cursor: pointer;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  transition: background 160ms;
  display: none;
}
.quiz-next-btn.visible { display: inline-flex; }
.quiz-next-btn:hover { background: rgba(200,168,75,0.18); }

.quiz-result {
  display: none;
  text-align: center;
  padding: 40px 30px;
}
.quiz-result.visible { display: block; }
.quiz-result-score {
  font-family: "Cormorant Garamond", serif;
  font-size: 48px;
  color: var(--gold-400);
  line-height: 1;
  margin-bottom: 12px;
}
.quiz-result-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}
.quiz-result-msg {
  font-size: 16px;
  color: var(--ivory-200);
  line-height: 1.7;
  max-width: 440px;
  margin: 0 auto;
}
.xp-earned-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(200,168,75,0.1);
  color: var(--gold-400);
  font-weight: 700;
  font-size: 15px;
  margin-top: 18px;
}

/* ── Reflection ── */
.reflection-head {
  text-align: center;
  margin-bottom: 28px;
}
.reflection-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  margin: 0 0 8px;
}
.reflection-head p { color: var(--muted); font-size: 14px; }

.reflection-prompt-box {
  padding: 20px 24px;
  border-radius: 16px;
  border-left: 3px solid var(--gold-500);
  background: rgba(200,168,75,0.06);
  margin-bottom: 22px;
}
.reflection-prompt-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-500);
  margin-bottom: 8px;
}
.reflection-prompt-text {
  color: var(--ivory-100);
  font-size: 15px;
  line-height: 1.7;
}

.reflection-area {
  width: 100%;
  min-height: 200px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1.5px solid var(--line-soft);
  background: rgba(8,18,31,0.6);
  color: var(--ivory-100);
  font-family: "Barlow", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  resize: vertical;
  transition: border-color 200ms;
  box-sizing: border-box;
}
.reflection-area:focus {
  outline: none;
  border-color: var(--gold-500);
}
.reflection-char-count {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-top: 8px;
}
.reflection-char-count.ready { color: var(--success); }

/* ── Completion Screen ── */
.completion-screen {
  text-align: center;
  padding: 48px 24px;
}
.completion-badge {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  background: radial-gradient(circle at 35% 35%, rgba(228,201,106,0.2), rgba(12,30,53,0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
}
.completion-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  color: var(--ivory-100);
  margin-bottom: 10px;
}
.completion-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}
.completion-xp-total {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(200,168,75,0.1);
  color: var(--gold-400);
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 36px;
}
.completion-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Bottom Footer / Continue Bar ── */
.lp-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 16px 40px;
  background: rgba(8,18,31,0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.lp-footer-left {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-footer-left .xp-award {
  color: var(--gold-400);
  font-weight: 600;
}
.lp-continue-btn {
  padding: 0 28px;
  min-height: 46px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-950);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 180ms, box-shadow 180ms, opacity 180ms;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-continue-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(200,168,75,0.22);
}
.lp-continue-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.lp-continue-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.lp-continue-btn::after { content: "→"; }
.lp-secondary-btn {
  padding: 0 24px;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, opacity 180ms;
}
.lp-secondary-btn:hover:not(:disabled) {
  background: rgba(200,168,75,0.08);
  border-color: var(--gold-500);
  color: var(--gold-400);
}
.lp-secondary-btn:disabled,
.lp-secondary-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Footer inner layout */
.lp-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}
.lp-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.lp-footer-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.lp-stage-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-continue-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 540px;
}
.lp-continue-help.warning {
  color: var(--warning);
}
.lp-continue-help.flash {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lp-guide-link {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.lp-guide-link:hover {
  color: var(--gold-400);
}
.footer-stage-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.footer-xp-badge {
  font-size: 12px;
  color: var(--gold-400);
  font-weight: 600;
  background: rgba(200,168,75,0.1);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.lp-navigation-card {
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
}
.lp-navigation-card p {
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 10px;
}
.lp-navigation-card p:last-child {
  margin-bottom: 0;
}

/* Choice button reveal states */
.choice-btn.optimal-reveal {
  border-color: rgba(98,197,158,0.5);
  background: rgba(98,197,158,0.07);
  color: var(--success);
}
.choice-btn.selected-reveal {
  border-color: var(--gold-500);
  background: rgba(200,168,75,0.1);
}

/* XP pop animation */
@keyframes xpPop {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  60% { transform: translateY(-28px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-50px) scale(1); opacity: 0; }
}
.xp-pop {
  position: fixed;
  color: var(--gold-400);
  font-weight: 700;
  font-size: 16px;
  pointer-events: none;
  animation: xpPop 900ms ease-out forwards;
  z-index: 999;
}

/* ── Mobile Responsive ── */
@media (max-width: 900px) {
  .lp-shell {
    grid-template-columns: 1fr;
  }
  .lp-sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }
  .lp-sidebar-head {
    min-width: 200px;
    border-bottom: none;
    border-right: 1px solid var(--line-soft);
  }
  .lp-lesson-nav {
    display: flex;
    overflow-x: auto;
    padding: 12px;
    gap: 6px;
    flex: 1;
  }
  .lp-lesson-item {
    min-width: 120px;
    margin-bottom: 0;
    flex-direction: column;
    text-align: center;
  }
  .lp-xp-tracker {
    min-width: 140px;
    border-top: none;
    border-left: 1px solid var(--line-soft);
  }
  .lp-content { padding: 28px 20px 100px; }
  .lp-topbar { padding: 12px 20px; }
  .lp-footer { padding: 14px 20px; }
  .lp-footer-inner,
  .lp-footer-actions,
  .lp-stage-info {
    flex-direction: column;
    align-items: flex-start;
  }
  .matching-ex { grid-template-columns: 1fr; }
}
