/* Carepatron Learning Centre — 2026 design system (CP1028)
   Cream / purple / lilac / black with Inter Tight.
   Premium editorial-healthcare execution. */

:root {
  --cream: #fef6ec;
  --cream-deep: #f8eedf;
  --cream-deeper: #f0e4cf;
  --purple: #5b1db1;
  --purple-deep: #4a1690;
  --purple-soft: #f4eefe;
  --lilac: #e0d2f1;
  --lilac-soft: #efe5fa;
  --lilac-deep: #c9b3e8;
  --black: #101010;
  --black-soft: #231f20;
  --black-mid: #4a4747;
  --grey: #d9d9d9;
  --grey-soft: #efefef;
  --white: #ffffff;
  --success: #2d7a3e;
  --radius: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter Tight', 'Inter', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--black);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }

h1, h2, h3, h4, h5 {
  font-family: 'Inter Tight', 'Inter', Helvetica, Arial, sans-serif;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.018em;
}
h1 { font-size: 30px; font-weight: 400; color: var(--black); }
h2 { font-size: 22px; font-weight: 400; color: var(--purple); line-height: 1.4; }
h3 { font-size: 18px; font-weight: 700; color: var(--black); line-height: 1.4; }
h4 { font-size: 16px; font-weight: 700; color: var(--black); }
em { font-style: italic; }

button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
p { margin: 0; }
ul { margin: 0; padding-left: 22px; }
li { margin: 6px 0; }

::selection { background: var(--lilac); color: var(--black); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 4px; }

/* ---------- Top stroke ---------- */
.top-stroke {
  height: 14px;
  background: var(--purple);
}

/* ---------- Nav ---------- */
.nav {
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav.scrolled {
  background: rgba(254, 246, 236, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--grey);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--black);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}
.brand-divider {
  height: 30px;
  width: 1px;
  background: var(--black);
  opacity: 0.15;
}
.brand-label {
  font-weight: 700;
  color: var(--black);
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s var(--ease);
}
.nav-link:hover { background: var(--cream-deep); text-decoration: none; }

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: 40px;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 20px;
  font-size: 14px;
  color: var(--black-soft);
  cursor: pointer;
  font-family: inherit;
  min-width: 260px;
  transition: border-color 0.18s var(--ease), color 0.15s var(--ease);
}
.search-trigger:hover { border-color: var(--black); color: var(--black); }
.search-trigger svg { width: 16px; height: 16px; color: var(--black-soft); flex-shrink: 0; }
.search-trigger kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--grey-soft);
  border-radius: 3px;
  color: var(--black);
  margin-left: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.005em;
  transition: background 0.18s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-deep); color: var(--white); }
.btn-secondary {
  background: var(--white);
  color: var(--black);
  border-color: var(--black);
}
.btn-secondary:hover { background: var(--black); color: var(--white); }
.btn-tertiary {
  background: transparent;
  color: var(--black);
  border-color: var(--grey);
}
.btn-tertiary:hover { background: var(--white); color: var(--black); border-color: var(--black); }
.btn-lg { height: 48px; padding: 0 28px; font-size: 16px; }

.btn-small {
  height: 32px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--black);
  border: 1px solid var(--black);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.btn-small:hover { background: var(--black); color: var(--white); text-decoration: none; }

.nav-trial-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--black-soft);
  text-decoration: none;
  white-space: nowrap;
}
.nav-trial-pill strong { color: var(--purple); font-weight: 700; }
.nav-trial-pill:hover { text-decoration: none; }
.nav-trial-pill:hover strong { text-decoration: underline; }

.kbd-inline {
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  background: var(--grey-soft);
  border-radius: 3px;
  color: var(--black);
}

/* ---------- Page wrappers ---------- */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.page-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
}
.page-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Continue strip ---------- */
.continue-strip {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 22px 18px 18px;
  margin: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--lilac);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.continue-strip:hover { border-color: var(--purple); background: var(--lilac-soft); text-decoration: none; color: inherit; }
.continue-info { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1; }
.continue-icon {
  width: 48px; height: 48px;
  background: var(--lilac);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--purple);
}
.continue-icon svg { width: 22px; height: 22px; }
.continue-text { min-width: 0; }
.continue-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.continue-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

/* ---------- Hero ---------- */
.hero {
  padding: 40px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.hero-feature {
  background: var(--lilac);
  border-radius: var(--radius-lg);
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: '';
  width: 32px; height: 2px; background: var(--purple);
}
.hero h1 {
  font-size: 60px;
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--black);
  margin: 0 0 28px;
}
.hero h1 em {
  font-style: italic;
  color: var(--purple);
}
.hero-sub {
  font-size: 20px;
  line-height: 1.5;
  color: var(--black);
  margin: 0 0 36px;
  max-width: 500px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-meta {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(91, 29, 177, 0.18);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hero-meta-item strong {
  display: block;
  font-size: 28px;
  font-weight: 400;
  color: var(--purple);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.hero-meta-item-label {
  font-size: 12px;
  color: var(--black-soft);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

/* Hero video card — refined product preview */
.hero-video {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.video-frame {
  aspect-ratio: 16 / 10;
  background: var(--cream-deep);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease);
}
.video-frame:hover { transform: scale(1.005); }
/* Calendar-style mock UI — more like the actual product */
.video-mock {
  position: absolute;
  inset: 20px;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  pointer-events: none;
  border: 1px solid var(--grey-soft);
}
.video-mock-header {
  height: 32px;
  background: var(--white);
  border-bottom: 1px solid var(--grey-soft);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
}
.video-mock-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grey); }
.video-mock-tab {
  height: 18px;
  width: 64px;
  background: var(--purple-soft);
  border-radius: 4px;
  margin-left: auto;
}
.video-mock-cal {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px;
  background: var(--grey-soft);
}
.video-mock-day {
  background: var(--white);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}
.video-mock-day-header {
  height: 14px;
  width: 50%;
  background: var(--grey-soft);
  border-radius: 2px;
  margin-bottom: 4px;
}
.video-mock-appt {
  height: 18px;
  border-radius: 3px;
  background: var(--lilac);
  border-left: 2px solid var(--purple);
}
.video-mock-appt.alt { background: var(--cream); border-left-color: var(--cream-deeper); }
.video-mock-appt.sm { height: 12px; }
.play-btn {
  position: relative;
  width: 80px;
  height: 80px;
  background: var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  z-index: 2;
  transition: transform 0.25s var(--ease);
}
.video-frame:hover .play-btn { transform: scale(1.04); }
.play-btn::after {
  content: '';
  border-style: solid;
  border-width: 13px 0 13px 20px;
  border-color: transparent transparent transparent var(--white);
  margin-left: 5px;
}
.video-caption {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  z-index: 2;
  background: var(--white);
  padding: 6px 14px;
  border-radius: 14px;
  letter-spacing: -0.01em;
}
.video-meta {
  font-size: 14px;
  color: var(--black);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--grey);
  line-height: 1.55;
}

/* ---------- Section primitives ---------- */
.section { padding: 32px 0 80px; }
.section-tight { padding: 0 0 48px; }
.section-header { margin-bottom: 32px; max-width: 720px; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-eyebrow::before {
  content: '';
  width: 32px; height: 2px; background: var(--purple);
}
.section-title {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--black);
  max-width: 720px;
  margin: 0 0 14px;
  line-height: 1.1;
}
.section-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--black);
  max-width: 620px;
  margin: 0;
}

/* ---------- Overall progress ---------- */
.overall-progress {
  margin-top: 28px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.overall-progress-label { font-size: 14px; color: var(--black); flex-shrink: 0; }
.overall-progress-label strong { color: var(--purple); font-weight: 700; }
.overall-bar {
  flex: 1;
  height: 8px;
  background: var(--cream-deep);
  border-radius: 4px;
  overflow: hidden;
}
.overall-bar-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 4px;
  transition: width 0.6s var(--ease);
}
.reset-link {
  font-size: 13px;
  color: var(--black-soft);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.reset-link:hover { color: var(--purple); }

/* ---------- Course cards ---------- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.course-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease), border-color 0.18s var(--ease);
  border: 1px solid transparent;
}
.course-card:hover {
  background: var(--lilac);
  color: var(--black);
  text-decoration: none;
  transform: translateY(-3px);
}
.course-card.is-complete {
  border-color: var(--purple);
  background: var(--lilac-soft);
}
.course-card.is-recommended {
  background: var(--lilac);
  border-color: transparent;
}

/* Inline "Start here" pill — replaces the absolute-positioned ribbon to avoid overlap with the "Course 01" label. */
.course-pill {
  display: inline-flex;
  align-items: center;
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.course-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.course-icon {
  width: 64px; height: 64px;
  border-radius: 12px;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--purple);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.course-icon svg { width: 30px; height: 30px; }
.course-card:hover .course-icon { background: var(--white); }
.course-card.is-complete .course-icon,
.course-card.is-recommended .course-icon {
  background: var(--purple);
  color: var(--white);
}

.course-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.course-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.course-status svg { width: 14px; height: 14px; }
.course-name {
  font-size: 26px;
  font-weight: 400;
  color: var(--black);
  margin: 0 0 10px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.course-tagline {
  font-size: 15px;
  color: var(--black);
  margin: 0 0 28px;
  line-height: 1.5;
}
.course-meta {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--black-soft);
  margin-top: auto;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.course-meta .dot { width: 3px; height: 3px; background: currentColor; opacity: 0.5; border-radius: 50%; }
.course-progress { margin-top: 0; }
.course-progress-label {
  font-size: 12px;
  color: var(--black-soft);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.02em;
}
.course-progress-label strong { color: var(--purple); font-weight: 700; letter-spacing: 0; }
.course-bar {
  height: 6px;
  background: var(--cream-deep);
  border-radius: 3px;
  overflow: hidden;
}
.course-card:hover .course-bar { background: rgba(91, 29, 177, 0.18); }
.course-card.is-complete .course-bar,
.course-card.is-recommended .course-bar { background: rgba(91, 29, 177, 0.22); }
.course-bar-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 3px;
  transition: width 0.6s var(--ease);
}

/* ---------- Featured lessons strip ---------- */
.featured-strip {
  margin-top: 64px;
  padding: 48px 40px;
  background: var(--white);
  border-radius: var(--radius-lg);
}
.featured-strip-header { margin-bottom: 28px; }
.featured-strip-header h3 {
  font-size: 28px;
  font-weight: 400;
  color: var(--black);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.featured-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid transparent;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.15s var(--ease);
}
.featured-card:hover {
  background: var(--lilac-soft);
  border-color: var(--lilac);
  color: var(--black);
  text-decoration: none;
  transform: translateY(-2px);
}
.featured-card-course {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
}
.featured-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.featured-card-meta {
  font-size: 13px;
  color: var(--black-soft);
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.featured-card-meta svg { width: 12px; height: 12px; }

/* ---------- Talk to team card (integrated throughout) ---------- */
.talk-card {
  background: var(--black-soft);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 48px 0;
}
.talk-card-text { flex: 1; min-width: 240px; }
.talk-card-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lilac);
  margin-bottom: 10px;
}
.talk-card-eyebrow::before {
  content: '';
  width: 24px; height: 2px; background: var(--lilac);
}
.talk-card h3 {
  font-size: 24px !important;
  font-weight: 400 !important;
  color: var(--white) !important;
  margin: 0 0 8px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
}
.talk-card p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  margin: 0;
  max-width: 480px;
}
.talk-card .btn-on-dark {
  background: var(--white);
  color: var(--black);
  height: 44px;
  padding: 0 22px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s var(--ease), transform 0.1s var(--ease);
  white-space: nowrap;
}
.talk-card .btn-on-dark:hover { background: var(--cream); color: var(--black); }
.talk-card .btn-on-dark:active { transform: translateY(1px); }

/* Soft talk-link variant for inline placement */
.talk-link-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 14px;
  color: var(--black-soft);
  text-align: center;
}
.talk-link-row a { color: var(--purple); font-weight: 700; }

/* ---------- Course detail ---------- */
.course-header { padding: 40px 0 28px; }
.breadcrumb {
  font-size: 14px;
  color: var(--black-soft);
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--black-soft); text-decoration: underline; }
.breadcrumb a:hover { color: var(--purple); }
.breadcrumb-sep { margin: 0 8px; color: var(--grey); }

.course-header h1 {
  font-size: 56px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 12px 0 20px;
}
.course-header .num-prefix {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--purple);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.course-header .num-prefix::before {
  content: '';
  width: 32px; height: 2px; background: var(--purple);
}
.course-header .tagline {
  font-size: 22px;
  color: var(--black);
  max-width: 640px;
  margin: 0 0 16px;
  line-height: 1.35;
  font-weight: 400;
}
.course-header .summary {
  font-size: 17px;
  color: var(--black-soft);
  max-width: 640px;
  margin: 0 0 32px;
  line-height: 1.6;
}

.course-stats-row {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 28px;
}
.course-stats {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--black);
  flex-wrap: wrap;
  align-items: center;
}
.course-stats strong { font-weight: 700; }
.course-stats .dot { width: 3px; height: 3px; background: var(--grey); border-radius: 50%; }
.course-stats-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  justify-content: flex-end;
}
.course-stats-bar .label { font-size: 13px; color: var(--black-soft); white-space: nowrap; }
.course-stats-bar .label strong { color: var(--purple); font-weight: 700; }
.course-stats-bar .bar {
  flex: 1;
  max-width: 200px;
  height: 6px;
  background: var(--cream-deep);
  border-radius: 3px;
  overflow: hidden;
}
.course-stats-bar .bar-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 3px;
  transition: width 0.5s var(--ease);
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.lesson-row {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 26px;
  display: flex;
  gap: 24px;
  align-items: center;
  text-decoration: none;
  color: var(--black);
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease);
}
.lesson-row:hover {
  background: var(--lilac-soft);
  color: var(--black);
  text-decoration: none;
  border-color: var(--lilac);
  transform: translateX(2px);
}
.lesson-row.is-complete {
  background: var(--lilac-soft);
  border-color: var(--lilac);
}
.lesson-check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--white);
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lesson-row.is-complete .lesson-check {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}
.lesson-check svg { width: 14px; height: 14px; }
.lesson-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.04em;
  min-width: 36px;
}
.lesson-content { flex: 1; min-width: 0; }
.lesson-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  letter-spacing: -0.01em;
}
.lesson-summary { font-size: 14px; color: var(--black-soft); line-height: 1.55; }
.lesson-meta {
  font-size: 12px;
  color: var(--black-soft);
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.lesson-meta svg { width: 12px; height: 12px; }
.lesson-arrow {
  color: var(--black);
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.15s, transform 0.18s var(--ease), color 0.15s;
}
.lesson-row:hover .lesson-arrow { opacity: 1; transform: translateX(4px); color: var(--purple); }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}
.tag-plan { background: var(--lilac); color: var(--purple); }
.tag-optional { background: var(--cream-deep); color: var(--black-soft); }

/* ---------- Lesson page (3-column layout) ---------- */
.lesson-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: flex-start;
  padding: 32px 0 64px;
}
.lesson-sidebar {
  position: sticky;
  top: 96px;
  align-self: flex-start;
  font-size: 14px;
}
.lesson-sidebar .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--black-soft);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.15s var(--ease);
  font-weight: 500;
}
.lesson-sidebar .back-link svg { width: 14px; height: 14px; }
.lesson-sidebar .back-link:hover { color: var(--purple); text-decoration: none; }
.lesson-sidebar-course {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}
.lesson-sidebar-course-name {
  font-size: 20px;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 14px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.lesson-sidebar-progress {
  font-size: 12px;
  color: var(--black-soft);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.02em;
}
.lesson-sidebar-progress strong { color: var(--purple); font-weight: 700; letter-spacing: 0; }
.lesson-sidebar-bar {
  height: 4px;
  background: var(--cream-deep);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 22px;
}
.lesson-sidebar-bar-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 2px;
  transition: width 0.5s var(--ease);
}
.lesson-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lesson-sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--black-soft);
  font-size: 13px;
  line-height: 1.4;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.lesson-sidebar-link:hover { background: var(--cream-deep); color: var(--black); text-decoration: none; }
.lesson-sidebar-link.is-current {
  background: var(--lilac);
  color: var(--black);
}
.lesson-sidebar-link.is-current .lesson-sidebar-link-title { color: var(--black); font-weight: 700; }
.lesson-sidebar-link-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--grey);
  flex-shrink: 0;
  background: transparent;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.lesson-sidebar-link-check svg { width: 10px; height: 10px; }
.lesson-sidebar-link.is-done .lesson-sidebar-link-check {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}
.lesson-sidebar-link-num {
  font-weight: 700;
  color: var(--purple);
  margin-right: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.lesson-sidebar-link-title { color: var(--black-soft); }

.lesson-sidebar-talk {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--grey);
  font-size: 13px;
  color: var(--black-soft);
  line-height: 1.5;
}
.lesson-sidebar-talk strong { display: block; color: var(--black); margin-bottom: 4px; font-weight: 700; }
.lesson-sidebar-talk a { color: var(--purple); font-weight: 700; }

/* TOC right column */
.lesson-toc {
  position: sticky;
  top: 96px;
  align-self: flex-start;
  font-size: 13px;
}
.lesson-toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black-soft);
  margin-bottom: 14px;
}
.lesson-toc ul { list-style: none; padding: 0; margin: 0; }
.lesson-toc li { margin: 0; }
.lesson-toc a {
  display: block;
  padding: 8px 12px 8px 14px;
  font-size: 13px;
  color: var(--black-soft);
  text-decoration: none;
  border-left: 2px solid var(--grey);
  line-height: 1.5;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.lesson-toc a:hover { color: var(--black); border-left-color: var(--purple); background: var(--cream-deep); }
.lesson-toc a.is-active { color: var(--purple); border-left-color: var(--purple); font-weight: 700; }

/* ---------- Article ---------- */
.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px;
}
.article-header { margin-bottom: 36px; }
.article-header h1 {
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -0.028em;
  line-height: 1.1;
  margin: 18px 0 20px;
}
.article-summary {
  font-size: 20px;
  color: var(--black);
  line-height: 1.55;
  margin: 0;
  letter-spacing: -0.005em;
}
.article-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--grey);
  font-size: 13px;
  color: var(--black-soft);
  flex-wrap: wrap;
}
.article-meta-row svg { width: 14px; height: 14px; }
.article-meta-row .dot { width: 3px; height: 3px; background: var(--grey); border-radius: 50%; }
.article-meta-row span { display: inline-flex; align-items: center; gap: 6px; }

.callout {
  background: var(--lilac);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 36px 0;
}
.callout h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--black);
  margin: 0 0 14px !important;
}
.callout ul { margin: 0; padding-left: 22px; }
.callout li { margin: 8px 0; font-size: 16px; color: var(--black); line-height: 1.5; }
.callout p { margin: 0; font-size: 16px; color: var(--black); line-height: 1.55; }
.tier-callout { background: var(--cream-deep); border-left: 3px solid var(--purple); }
.tier-callout h3 { color: var(--purple); }

/* ---------- Media placeholders (swap for real screenshots/videos) ---------- */
.media {
  background: var(--cream-deep);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  margin: 28px 0;
  border: 1px solid var(--cream-deeper);
}
.media-hero {
  margin: 0 0 32px;
}
.media-frame {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px 24px;
  text-align: center;
  gap: 12px;
}
.media-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--lilac);
  padding: 5px 12px;
  border-radius: 12px;
}
.media-tag svg { width: 14px; height: 14px; }
.media-caption {
  font-size: 14px;
  color: var(--black);
  font-weight: 500;
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}
.media-inline { aspect-ratio: 16 / 9; }
.media-inline .media-frame { padding: 24px; }
.media-inline .media-caption { font-size: 13px; }

.article-section { margin: 44px 0; scroll-margin-top: 96px; }
.article-section h2 {
  font-size: 26px;
  font-weight: 400;
  color: var(--purple);
  margin: 0 0 18px;
  line-height: 1.25;
  letter-spacing: -0.018em;
}
.article-section p { font-size: 18px; line-height: 1.7; color: var(--black); }
.article-section p strong { font-weight: 700; color: var(--black); }
.article-section code {
  background: var(--grey-soft);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px;
}

.faqs { margin-top: 56px; scroll-margin-top: 96px; }
.faqs > h2 {
  font-size: 26px;
  font-weight: 400;
  color: var(--purple);
  margin: 0 0 18px;
  letter-spacing: -0.018em;
}
.faq {
  border-top: 1px solid var(--grey);
  padding: 22px 0;
}
.faq:last-child { border-bottom: 1px solid var(--grey); }
.faq summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  line-height: 1.4;
  letter-spacing: -0.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 24px;
  color: var(--purple);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}
.faq[open] summary::after { content: '−'; }
.faq p { margin: 14px 0 0; font-size: 16px; color: var(--black); line-height: 1.65; }

.related {
  margin-top: 36px;
  background: var(--cream-deep);
  border-radius: var(--radius);
  padding: 28px 32px;
  scroll-margin-top: 96px;
}
.related h3 {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--black);
  margin: 0 0 14px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin: 10px 0; }
.related a {
  font-size: 16px;
  color: var(--purple);
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-underline-offset: 3px;
}
.related a:hover { text-decoration: none; }

/* Try-it aside */
.try-it {
  margin: 36px 0;
  background: var(--cream-deep);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.try-it h3 { font-size: 18px !important; font-weight: 700 !important; margin: 0 !important; color: var(--black); }
.try-it p { font-size: 14px; color: var(--black-soft); margin: 4px 0 0; }

/* Feedback */
.feedback {
  margin-top: 36px;
  padding: 28px;
  background: var(--cream);
  border-radius: var(--radius);
  text-align: center;
}
.feedback h4 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--black);
  margin: 0 0 14px !important;
}
.feedback-btns { display: inline-flex; gap: 10px; }
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid var(--grey);
  background: var(--white);
  color: var(--black);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.feedback-btn:hover { border-color: var(--purple); transform: translateY(-1px); }
.feedback-btn.selected {
  border-color: var(--purple);
  background: var(--lilac);
  color: var(--purple);
}
.feedback-btn svg { width: 14px; height: 14px; }
.feedback-thanks {
  display: none;
  font-size: 14px;
  color: var(--black);
}

/* End of lesson */
.lesson-end {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--grey);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mark-complete-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.mark-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 26px;
  border-radius: 24px;
  background: var(--purple);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease), transform 0.1s var(--ease);
  letter-spacing: -0.005em;
}
.mark-complete-btn:hover { background: var(--purple-deep); }
.mark-complete-btn:active { transform: translateY(1px); }
.mark-complete-btn.is-done {
  background: var(--lilac);
  color: var(--purple);
}
.mark-complete-btn.is-done:hover { background: var(--lilac); }
.mark-complete-btn .check-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mark-complete-btn .check-circle svg { width: 12px; height: 12px; }
.mark-complete-btn.is-done .check-circle {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}
.shortcut-hint {
  font-size: 13px;
  color: var(--black-soft);
}
.shortcut-hint kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  background: var(--grey-soft);
  border-radius: 3px;
  color: var(--black);
}

.lesson-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lesson-nav-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.lesson-nav-card:hover {
  border-color: var(--purple);
  background: var(--lilac-soft);
  color: var(--black);
  text-decoration: none;
}
.lesson-nav-card.disabled { opacity: 0.5; pointer-events: none; }
.lesson-nav-card.next {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}
.lesson-nav-card.next:hover {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
  color: var(--white);
}
.lesson-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.lesson-nav-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.lesson-nav-card.next .lesson-nav-title::after { content: ' →'; }
.lesson-nav-card.prev .lesson-nav-title::before { content: '← '; }

/* ---------- Course-complete celebration modal ---------- */
.celebrate {
  position: fixed; inset: 0;
  background: rgba(16, 16, 16, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.celebrate.open { display: flex; animation: celebrateFade 0.3s var(--ease); }
.celebrate-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 56px 48px 48px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: celebratePop 0.5s var(--ease);
  overflow: hidden;
}
.celebrate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
  background: var(--purple);
}
.celebrate-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--lilac);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  animation: celebrateScale 0.6s var(--ease) 0.1s backwards;
}
.celebrate-icon svg { width: 44px; height: 44px; }
.celebrate-card h2 {
  font-size: 32px !important;
  font-weight: 400 !important;
  color: var(--black) !important;
  margin: 0 0 14px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
}
.celebrate-card p {
  font-size: 17px;
  color: var(--black);
  margin: 0 0 32px;
  line-height: 1.5;
}
.celebrate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.celebrate-close {
  position: absolute;
  top: 28px; right: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black-soft);
  font-size: 24px;
  line-height: 1;
}
@keyframes celebrateFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes celebratePop {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes celebrateScale {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ---------- Search overlay ---------- */
.search-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(16, 16, 16, 0.45);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.search-overlay.open { display: flex; }
.search-box {
  width: 100%;
  max-width: 680px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  animation: celebratePop 0.25s var(--ease);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--grey);
}
.search-input-wrap svg { width: 18px; height: 18px; color: var(--black-soft); }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  font-family: inherit;
  color: var(--black);
  background: transparent;
}
.search-input::placeholder { color: var(--black-soft); opacity: 0.6; }
.search-close {
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  background: var(--grey-soft);
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.search-results { overflow-y: auto; flex: 1; }
.search-result {
  display: block;
  padding: 18px 26px;
  border-bottom: 1px solid var(--grey);
  text-decoration: none;
  color: var(--black);
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result.is-active { background: var(--cream); text-decoration: none; color: var(--black); }
.search-result-course {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 4px;
}
.search-result-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--black); letter-spacing: -0.01em; }
.search-result-summary { font-size: 14px; color: var(--black-soft); line-height: 1.5; }
.search-empty { padding: 36px 26px; text-align: center; color: var(--black-soft); font-size: 14px; }
.search-tips {
  padding: 14px 26px;
  font-size: 12px;
  color: var(--black-soft);
  background: var(--cream);
  border-top: 1px solid var(--grey);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.search-tips kbd {
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 3px;
  color: var(--black);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--cream);
  padding: 80px 32px 56px;
  text-align: center;
  font-size: 14px;
  color: var(--black-soft);
  border-top: 1px solid var(--grey);
  margin-top: 96px;
}
.footer-talk {
  max-width: 720px;
  margin: 0 auto 56px;
  padding: 48px 48px;
  background: var(--black-soft);
  color: var(--white);
  border-radius: var(--radius-lg);
  text-align: left;
}
.footer-talk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lilac);
  margin-bottom: 16px;
}
.footer-talk-eyebrow::before {
  content: '';
  width: 32px; height: 2px; background: var(--lilac);
}
.footer-talk h3 {
  font-size: 32px !important;
  font-weight: 400 !important;
  color: var(--white) !important;
  margin: 0 0 12px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
}
.footer-talk p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 520px;
}
.footer-talk .btn {
  background: var(--white);
  color: var(--black);
  height: 48px;
  padding: 0 28px;
  border-radius: 24px;
  font-size: 16px;
}
.footer-talk .btn:hover { background: var(--cream); color: var(--black); }

.footer-brand {
  margin-bottom: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.footer-brand img {
  height: 36px;
  width: auto;
  display: block;
}
.footer-brand-line { font-size: 14px; color: var(--black-soft); }
.footer-help { font-size: 18px; color: var(--black); font-weight: 700; margin: 0 0 8px; }
.footer-help-sub { font-size: 16px; color: var(--black); margin: 0 0 36px; }
.footer-help-sub a { color: var(--purple); text-decoration: underline; }
.footer-legal { font-size: 13px; color: var(--black-soft); }
.footer-legal a { color: var(--black-soft); text-decoration: underline; }
.footer-legal .sep { margin: 0 8px; color: var(--grey); }
.footer-trial { margin-top: 24px; font-size: 14px; color: var(--black-soft); }
.footer-trial a { color: var(--purple); font-weight: 700; text-decoration: underline; }

/* ---------- Survey popup ---------- */
.survey {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px;
  z-index: 60;
  display: none;
  border: 1px solid var(--grey);
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}
.survey.open { display: block; animation: celebratePop 0.3s var(--ease); }
.survey-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  font-size: 22px;
  line-height: 1;
  font-family: inherit;
}
.survey h4 { font-size: 18px !important; font-weight: 700 !important; margin: 0 0 8px !important; color: var(--black); }
.survey-q { font-size: 15px; color: var(--black-soft); margin: 0 0 16px; line-height: 1.5; }
.survey textarea {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 14px;
  color: var(--black);
  background: var(--white);
}
.survey textarea:focus { outline: none; border-color: var(--purple); }
.survey .btn-primary { width: 100%; justify-content: center; height: 44px; }
.survey-thanks { display: none; padding: 14px 0; text-align: center; color: var(--black); font-size: 15px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--purple);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  z-index: 80;
  display: none;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(16, 16, 16, 0.18);
}
.toast.show {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast svg { width: 18px; height: 18px; }

/* ---------- Loading state ---------- */
.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  flex-direction: column;
  gap: 18px;
  color: var(--black-soft);
}
.app-loading-dot {
  width: 10px; height: 10px;
  background: var(--purple);
  border-radius: 50%;
  animation: pulse 1.4s infinite var(--ease);
}
@keyframes pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.9); }
  40% { opacity: 1; transform: scale(1); }
}

/* ---------- Mobile + responsive ---------- */
@media (max-width: 1240px) {
  .lesson-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
  .lesson-toc { display: none; }
}
@media (max-width: 980px) {
  body { font-size: 17px; }
  .nav-inner { padding: 16px 20px; gap: 12px; flex-wrap: wrap; }
  .search-trigger { display: none; }
  .nav-actions { gap: 10px; }
  .page, .page-narrow, .page-wide { padding: 0 20px; }
  .hero { padding: 24px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-feature { padding: 40px 28px; }
  .hero h1 { font-size: 38px; }
  .hero-meta { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .hero-meta-item strong { font-size: 22px; }
  .section { padding: 16px 0 56px; }
  .section-title { font-size: 30px; }
  .courses-grid { grid-template-columns: 1fr; }
  .featured-strip { padding: 32px 24px; margin-top: 40px; }
  .featured-grid { grid-template-columns: 1fr; }
  .course-card { padding: 28px 24px 22px; }
  .course-name { font-size: 22px; }
  .course-header h1 { font-size: 38px; }
  .article-card { padding: 32px 28px; }
  .article-header h1 { font-size: 30px; }
  .article-section h2 { font-size: 22px; }
  .article-section p, .callout li, .callout p { font-size: 16px; }
  .lesson-nav { grid-template-columns: 1fr; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-sidebar { display: none; }
  .survey { left: 16px; right: 16px; width: auto; bottom: 16px; }
  .course-stats-row { flex-direction: column; align-items: flex-start; }
  .course-stats-bar { width: 100%; max-width: none; justify-content: flex-start; }
  .course-stats-bar .bar { max-width: none; }
  .celebrate-card { padding: 40px 28px 32px; }
  .talk-card { padding: 28px 24px; }
  .talk-card h3 { font-size: 22px !important; }
  .footer-talk { padding: 36px 28px; }
  .footer-talk h3 { font-size: 26px !important; }
}
@media (max-width: 560px) {
  .brand-label { display: none; }
  .brand-divider { display: none; }
  .nav-trial-pill { display: none; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
}
