/* ── Hide nav when embedded in learning path iframe ─────────── */
html.in-path #nav,
html.in-path #navMobile {
  display: none !important;
}
html.in-path .course-header {
  top: 0;
  margin-top: 0;
  border-bottom: none;
  box-shadow: none;
}
html.in-path .course-back-link,
html.in-path .post-nav {
  display: none;
}
html.in-path .course-title {
  font-size: 1.2rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
html.in-path .course-layout {
  min-height: calc(100vh - 70px);
}
html.in-path .course-header + .course-layout {
  margin-top: 0;
}
html.in-path .sidebar-wrap {
  height: calc(100vh - 70px);
  top: 70px;
}
html.in-path .course-sidebar {
  position: static;
  height: 100%;
  align-self: stretch;
  top: auto;
}
html.in-path .lesson-footer {
  position: sticky;
  bottom: 0;
  background: #F8F7FF;
  border-top: none;
  padding: 14px 48px;
  margin: 0 -48px;
  width: auto;
  max-width: 736px;
  z-index: 10;
}
html.in-path .quicknotes-fab {
  top: calc(70px + 48px);
}

/* ── Course Layout ──────────────────────────────────────────── */
.course-page body,
body.course-page {
  background: #F8F7FF;
}

/* ── Course hero (stage format) ─────────────────────────────── */
.course-hero {
  background: var(--navy);
  margin-top: var(--nav-h);
  padding: 56px 0 52px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.course-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 1;
}
.course-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(233,9,246,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.course-hero-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0 0 14px;
}
.course-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem) !important;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: #fff !important;
  margin: 0 0 12px;
}
.course-hero-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  margin: 0 0 28px;
  max-width: 560px;
}
.course-hero-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.course-hero-progress .progress-bar {
  flex: 1;
  max-width: 260px;
  height: 3px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  overflow: hidden;
}
.course-hero-progress .progress-fill {
  height: 100%;
  background: var(--magenta);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}
.course-hero-progress .progress-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}
.course-hero-back {
  display: inline-block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.course-hero-back:hover { color: #fff; }

/* ── Course header (sticky progress bar) ──────────────────── */
.course-header {
  position: sticky;
  top: var(--nav-h);
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  height: 70px;
  /* Pull the header up behind the fixed nav (nav-h=56, header=70 → -14px).
     At page load it's invisible under the nav; sticks below on scroll. */
  margin-top: calc(var(--nav-h) - 70px);
}

/* Stage format: hero is first, header comes after (not used) */
.course-hero + .course-header {
  margin-top: 0;
}
/* Scroll format: header is first (-14px), hero follows — cancel its nav-h offset */
.course-header + .course-hero {
  margin-top: 0;
}
/* Stage courses with sticky header: push layout below where header sticks (56+70=126px) */
.course-header + .course-layout {
  margin-top: 70px;
}

.course-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  gap: 24px;
  height: 70px;
}

.course-back-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.course-back-link:hover {
  border-color: var(--navy);
  background: #f0effe;
}

.course-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  display: block;
  line-height: 1;
  margin-bottom: 2px;
}

.course-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: calc(0.95rem + 2px);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.course-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.progress-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
}

.progress-bar {
  width: 120px;
  height: 4px;
  background: #e5e5f0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--magenta);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Two-column layout ─────────────────────────────────────── */
.course-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--nav-h) - 70px);
  padding: 0 var(--pad-x);
  transition: grid-template-columns 0.3s ease;
}

.course-layout.sidebar-collapsed { grid-template-columns: 0px 1fr; }

/* ── Sidebar wrapper (sticky, holds aside + toggle tab) ─────── */
.sidebar-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 70px);
  align-self: start;
  height: calc(100vh - var(--nav-h) - 70px);
  overflow: visible;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.course-sidebar {
  width: 250px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 48px 16px 32px 0;
  border-right: 1px solid rgba(22, 11, 82, 0.06) !important;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: width 0.3s ease, opacity 0.15s ease, padding 0.3s ease;
}

.course-layout.sidebar-collapsed .course-sidebar {
  width: 0;
  opacity: 0;
  padding: 0;
  overflow: hidden;
}

/* ── Sidebar toggle: absolutely centred on the drawer's right edge */
.sidebar-toggle {
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s, background 0.15s;
  z-index: 10;
}
.sidebar-toggle:hover { color: var(--navy); background: #f0effe; }

.sidebar-toggle span {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.course-sidebar::-webkit-scrollbar { width: 4px; }
.course-sidebar::-webkit-scrollbar-track { background: transparent; }
.course-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── No sticky header variant (new stage format with hero) ─── */
.no-sticky-header .course-layout {
  min-height: calc(100vh - var(--nav-h));
}
.no-sticky-header .sidebar-wrap {
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
}
.no-sticky-header .quicknotes-fab {
  top: calc(var(--nav-h) + 48px);
}
.no-sticky-header .quicknotes-panel {
  top: calc(var(--nav-h) + 48px + 17px);
}

/* ── Quicknotes FAB ────────────────────────────────────────── */
.quicknotes-fab {
  position: fixed;
  top: calc(var(--nav-h) + 70px + 48px);
  right: var(--pad-x);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 1100;
  box-shadow: 0 2px 10px rgba(22,11,82,0.25);
  transition: background 0.15s, transform 0.15s;
}
.quicknotes-fab:hover { background: var(--magenta); transform: scale(1.08); }
.quicknotes-fab.active { background: var(--magenta); }

/* ── Quicknotes floating panel ─────────────────────────────── */
.quicknotes-panel {
  position: fixed;
  top: calc(var(--nav-h) + 70px + 48px + 17px);
  right: calc(var(--pad-x) + 17px);
  width: 280px;
  height: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(22,11,82,0.12);
  display: none;
  flex-direction: column;
  z-index: 1099;
  overflow: hidden;
  transition: width 0.3s ease;
}
.quicknotes-panel.open {
  display: flex;
  animation: tooltipIn 0.18s ease both;
}

.course-layout.sidebar-collapsed ~ .quicknotes-panel {
  width: 420px;
}


.quicknotes-header {
  display: flex;
  align-items: center;
  padding: 10px 48px 8px 14px;
  flex-shrink: 0;
}

.quicknotes-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.quicknotes-area {
  flex: 1;
  resize: none;
  border: none;
  padding: 12px 14px;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  outline: none;
}
.quicknotes-area:focus { background: #fafbff; }

.quicknotes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  flex-shrink: 0;
  min-height: 34px;
}

.quicknotes-saved {
  font-size: 12px;
  color: var(--muted);
}

.quicknotes-clear {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.quicknotes-clear:hover { color: var(--navy); }

.reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  appearance: none;
  background: none;
  border: 0px;
  outline: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, transform 0.3s;
  line-height: 0;
}
.reset-btn:hover { color: var(--navy); transform: rotate(-180deg); }

.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.15s ease;
}



.lesson-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 6px;
  border-top-left-radius: 5px !important;
  border-top-right-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
  border-bottom-left-radius: 5px !important;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--muted);
}

.lesson-item:hover { background: #f0effe; color: var(--navy); }

.lesson-item.active {
  background: #ede9ff;
  color: var(--navy);
  font-weight: 600;
}

.lesson-item.done .lesson-num {
  background: var(--magenta);
  color: #fff;
  border-color: var(--magenta);
}

.lesson-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.lesson-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
}

/* ── Main content ──────────────────────────────────────────── */
.course-main {
  border-left: 1px solid var(--border);
  padding: 48px 48px 48px 48px;
  min-width: 0;
}

.lesson {
  display: none;
}

.lesson.active {
  display: block;
  animation: lessonIn 0.3s ease both;
}

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

.lesson-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.lesson > p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 640px;
}

/* ── Slides ────────────────────────────────────────────────── */
.slide-deck {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 640px;
}

.slide {
  display: none;
  padding: 40px 56px;
  min-height: 220px;
}

.slide.active { display: block; }

.slide-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 16px;
}

.slide h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.slide p {
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
}

.slide-arrow {
  width: 38px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.slide-arrow:hover:not(:disabled) { border-color: var(--magenta); color: var(--magenta); }
.slide-arrow:disabled { opacity: 0.3; cursor: default; }

.slide-dots-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 20px;
}

.slide-dots {
  display: flex;
  gap: 6px;
  order: 1;
  flex: 1;
}

.slide-prev { order: 2; }
.slide-next { order: 3; margin-left: 8px; }

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  transition: background 0.2s, width 0.2s, border-radius 0.2s;
  padding: 0;
}
.slide-dot.active { background: var(--magenta); width: 22px; border-radius: 4px; }

/* ── Accordion ─────────────────────────────────────────────── */
.accordion {
  max-width: 640px;
  margin-left: -10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: none;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.accordion-trigger::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--magenta);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.accordion-item.open .accordion-trigger { background: #fafafe; }
.accordion-item.open .accordion-trigger::after { transform: rotate(45deg); }

.accordion-panel {
  display: none;
  padding: 4px 20px 20px;
}

.accordion-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.accordion-item.open .accordion-panel {
  display: block;
  animation: accordionOpen 0.22s ease both;
}

@keyframes accordionOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hotspot Image ─────────────────────────────────────────── */
.hotspot-container {
  position: relative;
  max-width: 640px;
  margin: 0;
}

.hotspot-image-placeholder {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.hotspot-image-placeholder img {
  width: 100%;
  height: auto;
  display: block;
}

.hotspot {
  position: absolute;
  cursor: pointer;
  z-index: 10;
}

.hotspot-marker {
  width: 32px;
  height: 32px;
  background: #160B52;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(22,11,82,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: hotspotPulse 2s ease-in-out infinite;
}

@keyframes hotspotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,11,82,0.5); }
  50%       { box-shadow: 0 0 0 10px rgba(22,11,82,0); }
}

.hotspot.active .hotspot-marker,
.hotspot:hover .hotspot-marker {
  transform: scale(1.15);
  animation: none;
}

.hotspot-tooltip {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(22, 11, 82, 0.96);
  color: #fff;
  padding: 36px 40px;
  z-index: 20;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
}

.hotspot-tooltip.open {
  display: flex;
  animation: tooltipIn 0.2s ease both;
}

@keyframes tooltipIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hotspot-tooltip strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.hotspot-tooltip p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
  max-width: 480px;
}

.tooltip-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  transition: color 0.15s;
}
.tooltip-close:hover { color: #fff; }

/* ── Media ─────────────────────────────────────────────────── */
.media-block {
  max-width: 640px;
  margin-bottom: 36px;
}

.media-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 12px !important;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: inherit;
}

.audio-player {
  width: 100%;
  margin-top: 4px;
}

.media-caption {
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  margin-top: 10px !important;
}

/* ── Quiz ──────────────────────────────────────────────────── */
.quiz {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  max-width: 640px;
  margin-bottom: 24px;
}

.quiz-hint {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 16px !important;
  margin-top: -4px !important;
}

.quiz-question {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 20px !important;
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.quiz-option:hover {
  border-color: var(--navy);
  background: #fafafe;
}

.quiz-option input {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--magenta);
}

.quiz-submit {
  font-family: 'Raleway', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 8px;
  padding: 11px 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.quiz-submit:hover { background: #2a1a8a; }

.quiz-feedback {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Space Grotesk', sans-serif;
}

.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: #e8f9ee; color: #186a34; border: 1px solid #a8e6be; }
.quiz-feedback.wrong   { background: #fde8f0; color: #9b1c3a; border: 1px solid #f5b0c8; }
.quiz-feedback.neutral { background: #f0effe; color: var(--navy); border: 1px solid #c8c0f0; }

/* ── Lesson footer navigation ──────────────────────────────── */
.lesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 24px;
  width: 100%;
  max-width: 640px;
}

.lesson-nav-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 22px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.lesson-nav-btn:hover:not(:disabled) {
  border-color: var(--navy);
  background: #fafafe;
}

.lesson-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.lesson-counter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Completion screen ─────────────────────────────────────── */
.completion-block {
  text-align: center;
  padding: 60px 20px;
  max-width: 480px;
}

.completion-icon {
  width: 64px;
  height: 64px;
  background: var(--magenta);
  color: #fff;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.completion-block p {
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.btn-course {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  padding: 13px 28px;
  transition: background 0.2s;
}
.btn-course:hover { background: #2a1a8a; }

/* ── Microlearning blocks (for blog posts) ─────────────────── */
.microlearning {
  margin: 48px 0;
  padding: 0;
}

.microlearning-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 12px;
  display: block;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .course-layout {
    grid-template-columns: 1fr;
    padding: 0 var(--pad-x);
  }

  .sidebar-wrap {
    position: static;
    height: auto;
    overflow: visible;
  }

  .course-sidebar {
    width: 100% !important;
    height: auto;
    padding: 24px 0 0 !important;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: visible !important;
    opacity: 1 !important;
  }

  .course-layout.sidebar-collapsed { grid-template-columns: 1fr; }

  .sidebar-toggle,
  .quicknotes-fab {
    display: none;
  }

  .lesson-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 16px;
  }

  .lesson-item {
    flex-shrink: 0;
  }

  .lesson-name {
    display: none;
  }

  .course-main {
    border-left: none;
    padding: 32px 0;
  }
}


/* ── Celebration screen (lesson 7) ─────────────────────── */
.completion-screen {
  text-align: center;
  padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 56px);
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: celebrationIn 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes celebrationIn {
  from { transform: scale(0.88) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.completion-screen-icon {
  margin-bottom: 24px;
}

.thumb-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--magenta);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-icon.bounce {
  animation: thumbBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes thumbBounce {
  0%   { transform: translateY(0) scale(1); }
  25%  { transform: translateY(-16px) scale(1.1); }
  50%  { transform: translateY(0) scale(0.94); }
  70%  { transform: translateY(-7px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

.celebration-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.celebration-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 22px;
}

.celebration-msg {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 420px;
}

/* ── Feedback section ──────────────────────────────────── */
.feedback-section {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-bottom: 8px;
}

.feedback-prompt {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}

.feedback-emojis {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.feedback-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  line-height: 0;
}
.feedback-btn:hover { transform: scale(1.12); }
.feedback-btn.selected {
  border-color: var(--magenta);
}
.feedback-btn.selected svg circle:first-child {
  fill: rgba(233,9,246,0.10);
  stroke: var(--magenta);
}

.feedback-thanks {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  color: var(--magenta);
  font-weight: 600;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.3s;
}
.feedback-thanks.visible { opacity: 1; }

/* ── Confetti ──────────────────────────────────────────── */
@keyframes confettiFall {
  0%   { transform: translateY(0)    translateX(0);                                  opacity: 0.95; }
  20%  { transform: translateY(20vh) translateX(calc(var(--drift) * 0.2 + var(--wobble, 0px)));  opacity: 0.95; }
  50%  { transform: translateY(55vh) translateX(calc(var(--drift) * 0.5 - var(--wobble, 0px)));  opacity: 0.9;  }
  80%  { transform: translateY(85vh) translateX(calc(var(--drift) * 0.8 + var(--wobble, 0px)));  opacity: 0.5;  }
  100% { transform: translateY(110vh) translateX(var(--drift, 0px));                 opacity: 0;    }
}

@media (max-width: 600px) {
  .course-header-inner {
    gap: 12px;
  }

  .progress-bar { width: 80px; }

  .course-back-link { display: none; }

  .slide { padding: 24px 48px; }

  .quiz { padding: 20px; }
}

/* ── Flip Cards ─────────────────────────────────────────────── */
.flip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 640px;
}

.flip-card {
  perspective: 1000px;
  height: 240px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  overflow-y: auto;
}

.flip-card-front {
  background: #fff;
  border: 1.5px solid var(--border);
}

.flip-card-back {
  background: var(--navy);
  transform: rotateY(180deg);
}

.flip-card-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0;
}

.flip-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}

.flip-card-hint {
  color: var(--magenta);
  margin: 0;
  line-height: 0;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.flip-card:not(.flipped):hover .flip-card-hint {
  opacity: 0.7;
}

.flip-card-back strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.flip-card-back p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
  margin: 0;
}

/* ── Feedback emojis centered ───────────────────────────────── */
.feedback-emojis {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 0;
}

/* ── Agamotto ────────────────────────────────────────────────── */
.agamotto { max-width: 640px; margin-top: 24px; }

.agamotto-stage {
  position: relative;
  width: 100%;
  min-height: 120px;
  background: #F8F7FF;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.agamotto-step { display: none; padding: 24px; }
.agamotto-step.active { display: block; }

.agamotto-step img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin-bottom: 12px;
}

.agamotto-caption {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.agamotto-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agamotto-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.agamotto-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy);
  cursor: pointer;
}
.agamotto-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: none;
  cursor: pointer;
}

.agamotto-counter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Juxtapose ───────────────────────────────────────────────── */
.juxtapose { max-width: 640px; margin-top: 24px; }

.juxtapose-stage {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  background: var(--border);
}

.juxtapose-after { width: 100%; display: block; }

.juxtapose-before {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
}
.juxtapose-before img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.juxtapose-after img { width: 100%; display: block; }

.juxtapose-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: rgba(255,255,255,0.9);
  transform: translateX(-50%);
  pointer-events: none;
}
.juxtapose-handle::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.juxtapose-label {
  position: absolute;
  bottom: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(0,0,0,0.45);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
}
.juxtapose-label.before { left: 12px; }
.juxtapose-label.after  { right: 12px; }

/* ── Block heading spacing (h3 from genPage) ──────────────────── */
.scroll-section > h3,
.lesson > h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-top: 32px;
  margin-bottom: 12px;
  line-height: 1.25;
}
.scroll-section > h3:first-of-type,
.lesson > h3:first-of-type { margin-top: 8px; }

/* ── List styles inside page blocks ───────────────────────────── */
.page-body ul,
.page-body ol {
  padding-left: 1.5em;
  margin: 6px 0 16px;
}
.page-body li {
  margin-bottom: 5px;
  line-height: 1.65;
  color: inherit;
}
.page-body ul { list-style-type: disc; }
.page-body ol { list-style-type: decimal; }
.page-body ul ul { list-style-type: circle; margin: 4px 0 4px; }
.page-body p    { margin-bottom: 12px; line-height: 1.7; }
.page-body h2   { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 24px 0 10px; letter-spacing: -0.02em; }
.page-body h3   { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; color: var(--navy); margin: 18px 0 7px; }
/* Quill indent helper classes */
.page-body .ql-indent-1 { padding-left: 1.5em; }
.page-body .ql-indent-2 { padding-left: 3em; }
.page-body .ql-indent-3 { padding-left: 4.5em; }

/* ── Hero description line ────────────────────────────────────── */
.scroll-hero-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  margin-top: 14px;
  max-width: 560px;
}

/* ── Callout boxes ──────────────────────────────────────────── */
.lesson-callout {
  background: #f0effe;
  border-left: 4px solid var(--navy);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 24px 0;
  max-width: 640px;
}
.lesson-callout.exercise {
  background: #fff3f8;
  border-left-color: var(--magenta);
}
.lesson-callout.important {
  background: #f0effe;
  border-left-color: var(--navy);
}
.lesson-callout-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.lesson-callout.exercise .lesson-callout-title { color: var(--magenta); }
.lesson-callout.important .lesson-callout-title { color: var(--navy); }
.lesson-callout p { font-size: 0.95rem; line-height: 1.7; margin: 0; }
.lesson-callout p + p { margin-top: 8px; }

/* ── Pull quote ─────────────────────────────────────────────── */
.pull-quote {
  border-left: 3px solid var(--magenta);
  padding: 18px 28px;
  margin: 28px 0;
  max-width: 640px;
  background: #fff;
  border-radius: 0 8px 8px 0;
}
.pull-quote blockquote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--navy);
  line-height: 1.72;
  margin: 0 0 10px;
}
.pull-quote cite {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  font-style: normal;
  display: block;
}

/* ── Phase grid ─────────────────────────────────────────────── */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 24px 0;
}
.phase-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.phase-card-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 6px;
}
.phase-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.phase-card p {
  font-size: 0.88rem;
  line-height: 1.62;
  color: var(--text);
  margin-bottom: 8px;
}
.phase-card p:last-child { margin-bottom: 0; }
.phase-marker-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 10px 0 4px;
}
@media (max-width: 640px) { .phase-grid { grid-template-columns: 1fr; } }

/* ── Reflection textarea ─────────────────────────────────────── */
.reflection-field {
  width: 100%;
  min-height: 90px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  color: var(--navy);
  resize: vertical;
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.2s;
}
.reflection-field:focus { outline: none; border-color: var(--magenta); }
.reflection-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin: 16px 0 4px;
}

/* ── Numbered exercise steps ─────────────────────────────────── */
.exercise-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 16px 0;
  max-width: 560px;
}
.exercise-steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.65;
}
.exercise-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ── Data table ─────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  max-width: 640px;
}
.data-table th {
  background: var(--navy);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  padding: 11px 16px;
  text-align: left;
  font-size: 0.82rem;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: #f8f7ff; }
.data-table-note {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

/* ── Practice cards ─────────────────────────────────────────── */
.practice-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin: 24px 0;
}
.practice-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.practice-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.practice-body { flex: 1; }
.practice-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}
.practice-body p { font-size: 0.9rem; line-height: 1.65; color: var(--text); margin: 0; }

/* ── Summary bullet list ────────────────────────────────────── */
.summary-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  max-width: 640px;
}
.summary-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.6;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list li::before {
  content: "→";
  color: var(--magenta);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

