/* Carepatron Learning Centre — v6 (minimum viable, maximum care).
 *
 * Three user journeys this stylesheet is shaped for:
 *   1. New trialist: lands → reads what this is → starts course 1, lesson 1.
 *   2. Returning learner: lands → sees "Continue: …" → resumes one click in.
 *   3. Paid user with a question: ⌘K from anywhere → land on the answer.
 *
 * Everything else has been removed.
 */

:root {
  --cream: #fef6ec;
  --cream-deep: #f8eedf;
  --cream-deeper: #f0e4cf;
  --purple: #5b1db1;
  --purple-deep: #491577;
  --lilac: #e0d2f1;
  --lilac-soft: #f3ecfa;
  --black: #101010;
  /* Per Michaela's feedback: no greys in text. --black-soft and --black-mute
   * now alias --black so all body/meta copy is pure #101010. The cream/grey
   * tokens below are kept for non-text use (dividers, hover backgrounds). */
  --black-soft: #101010;
  --black-mute: #101010;
  --grey: #e6e1d7;
  --grey-soft: #f1ece1;
  --success: #2d7a3e;
  --white: #ffffff;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --radius: 6px;
  --radius-pill: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--black);
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on, "cv11" on;
  letter-spacing: 0;
}

/* ---------- Editorial system overrides (per Michaela's design pass) ----------
 * 1. Sentence case across eyebrows + headings (no uppercase).
 * 2. Letter-spacing zero everywhere — including headings.
 * 3. No font-size below 16px anywhere visible to the reader.
 *    (Tiny mock-UI text inside CSS-only product previews is exempt because it
 *    isn't reading copy — it's representing the look of the product.)
 * 4. Body text in regular (400). Headings keep their existing weight for
 *    hierarchy; emphasis stays at 500.
 */
.home-eyebrow,
.continue-card-eyebrow,
.courses-header h2,
.course-header-eyebrow,
.lesson-article-eyebrow,
.lesson-examples-label,
.lesson-examples-cite,
.lesson-faqs-label,
.lesson-related-label,
.lesson-explore-label,
.lesson-deeper-label,
.lesson-finish-context,
.playbook-eyebrow,
.playbook-takeaways-label,
.playbook-end-eyebrow,
.playbook-sidebar-label,
.playbook-meta-label,
.search-result-course,
.search-suggest-label,
.search-result-tag,
.lesson-sidebar-course,
.playbooks-home-label-eyebrow,
.lesson-nav-label,
.mock-note-label,
.mock-field-label,
.mock-pill,
.mock-node-label {
  text-transform: none;
  letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; background: transparent; border: 0; padding: 0; }
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}
/* On purple surfaces the default outline disappears — use a cream-coloured ring
 * with a thin purple inner stroke so it reads on both light and dark backgrounds. */
.btn-primary:focus-visible,
.open-in-product:focus-visible,
.lesson-finish-cta:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--purple);
}

.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--purple); color: var(--white);
  padding: 10px 16px; text-decoration: none; z-index: 200; font-size: 16px;
}
.skip-link:focus { top: 0; }

/* ---------- Top stroke (one quiet brand cue) ---------- */
.top-stroke { height: 4px; background: var(--purple); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(254, 246, 236, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--grey); }
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--black);
}
.brand-logo { height: 48px; width: auto; }
.brand-divider { width: 1px; height: 32px; background: var(--grey); }
.brand-label {
  font-size: 22px; font-weight: 400; color: var(--black-soft);
  letter-spacing: 0;
}
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 16px; color: var(--black); text-decoration: none;
  padding: 8px 12px; border-radius: var(--radius-pill);
  font-weight: 400; transition: background 0.15s var(--ease);
}
.nav-link:hover { background: var(--grey-soft); }
.btn-small {
  display: inline-flex; align-items: center; padding: 7px 14px;
  border: 1px solid var(--black); border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 400; text-decoration: none; color: var(--black);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.btn-small:hover { background: var(--black); color: var(--white); }
.search-trigger {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--grey); border-radius: var(--radius-pill);
  font-size: 16px; color: var(--black-soft);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.search-trigger:hover { border-color: var(--black); color: var(--black); }
.search-trigger svg { width: 14px; height: 14px; }
.search-trigger kbd {
  font: 11px/1 'Inter', system-ui, sans-serif;
  background: var(--grey-soft); padding: 3px 6px; border-radius: 3px;
  color: var(--black-soft);
}
@media (max-width: 720px) {
  .nav-inner { padding: 12px 18px; }
  .hide-mobile { display: none; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .brand-divider, .brand-label { display: none; }
}

main { min-height: 60vh; }

.page { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.page-narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) {
  .page, .page-narrow { padding: 0 20px; }
}

.app-loading {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  padding: 120px 20px; color: var(--black-soft); font-size: 16px;
}
.app-loading-dot {
  width: 8px; height: 8px; background: var(--purple); border-radius: 50%;
  animation: pulse 1.4s infinite var(--ease);
}
@keyframes pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* Respect reduced-motion preference — cuts transitions and animations to instant.
 * Keeps state changes legible, just without motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============== HOME =============== */

.home-hero {
  padding: 88px 0 56px;
  max-width: 720px;
}
.home-eyebrow {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--purple);
  margin-bottom: 18px;
}
.home-hero h1 {
  font-size: 62px;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
  margin: 0 0 24px;
  color: var(--black);
}
.home-hero p {
  font-size: 20px;
  line-height: 1.5;
  color: var(--black-soft);
  margin: 0 0 36px;
  max-width: 560px;
}
.home-hero-ctas {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.home-hero-meta {
  margin-top: 28px;
  font-size: 16px; color: var(--black-mute);
}
.home-hero-meta .dot { margin: 0 8px; color: var(--grey); }

/* Continue card — the returning-learner resume cue, separate from the hero CTA. */
.continue-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--grey);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--black);
  margin: 0 0 56px;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.continue-card:hover {
  border-color: var(--purple);
  transform: translateX(2px);
}
.continue-card-icon {
  width: 36px; height: 36px;
  background: var(--purple); color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.continue-card-icon svg { width: 14px; height: 14px; }
.continue-card-body { min-width: 0; }
.continue-card-eyebrow {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
   color: var(--purple);
  margin-bottom: 4px;
}
.continue-card-title {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
  margin-bottom: 8px;
}
.continue-card-bar {
  width: 100%; height: 3px;
  background: var(--grey); border-radius: 2px; overflow: hidden;
  max-width: 320px;
}
.continue-card-bar-fill {
  height: 100%; background: var(--purple); border-radius: 2px;
  transition: width 0.4s var(--ease);
}
.continue-card-arrow {
  font-size: 20px; color: var(--purple); padding-left: 8px;
}
@media (max-width: 720px) {
  .continue-card { grid-template-columns: 36px 1fr auto; gap: 14px; padding: 16px 18px; }
}

/* Tasteful white card wrapping list-style content (home courses + course lessons).
 * Rows do all the padding so dividers extend cleanly to the card's inner edge. */
.list-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 8px;
  padding: 0;
  margin-top: 20px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 16, 16, 0.03);
}
.list-card > a:last-child,
.list-card > div:last-child { border-bottom: 0; }
/* Stronger, more intentional divider line on white */
.list-card .course-row,
.list-card .lesson-row {
  border-bottom-color: rgba(16, 16, 16, 0.06);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 400;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-deep); }
.btn-primary:active { transform: scale(0.98); }
.btn-quiet {
  color: var(--black-soft); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 1px;
  padding: 12px 4px;
}
.btn-quiet:hover { color: var(--black); }

@media (max-width: 720px) {
  .home-hero { padding: 56px 0 32px; }
  .home-hero h1 { font-size: 42px; }
  .home-hero p { font-size: 18px; }
}

/* Course list (the spine of the home page) */
.courses { padding: 0 0 96px; }
.courses-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--grey);
}
.courses-header h2 {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
  color: var(--purple);
  margin: 0;
}
.courses-progress {
  font-size: 16px; color: var(--black-soft);
  display: flex; align-items: center; gap: 12px;
}
.courses-progress strong { color: var(--purple); font-weight: 400; }
.reset-link {
  font-size: 16px;
  color: var(--black-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s var(--ease);
}
.reset-link:hover { color: var(--black); }
.reset-link:focus-visible { color: var(--purple); }

.course-row {
  display: grid;
  grid-template-columns: 36px 1fr 140px;
  align-items: center;
  gap: 24px;
  padding: 22px 56px 22px 28px;
  border-bottom: 1px solid var(--grey);
  text-decoration: none; color: var(--black);
  transition: background 0.15s var(--ease);
  position: relative;
}
.course-row::after {
  content: "→";
  position: absolute; right: 24px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px; color: var(--black-mute);
  opacity: 0;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.course-row:hover { background: var(--grey-soft); }
.course-row:hover::after {
  opacity: 1; color: var(--purple);
  transform: translate(2px, -50%);
}
.course-row:hover .course-row-title { color: var(--purple); }
.course-row-num {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grey-soft); border-radius: 50%;
  font-size: 16px; font-weight: 400; color: var(--black-soft);
  letter-spacing: 0;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.course-row-num svg { width: 14px; height: 14px; }
.course-row.is-complete .course-row-num {
  background: var(--purple); color: var(--white);
}
.course-row-text { min-width: 0; }
.course-row-title {
  font-size: 22px; font-weight: 400;
  letter-spacing: 0; line-height: 1.2;
  margin: 0 0 4px;
  transition: color 0.15s var(--ease);
}
.course-row-sub {
  font-size: 16px; color: var(--black-soft);
  line-height: 1.5; margin: 0;
}
.course-row-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  min-width: 0;
}
.course-row-progress {
  font-size: 16px; color: var(--black-soft);
  white-space: nowrap;
}
.course-row-progress strong { color: var(--purple); font-weight: 400; }
.course-row-bar {
  width: 100%; height: 3px;
  background: var(--grey); border-radius: 2px; overflow: hidden;
}
.course-row-bar-fill {
  height: 100%; background: var(--purple); border-radius: 2px;
  transition: width 0.4s var(--ease);
}

@media (max-width: 720px) {
  .course-row {
    grid-template-columns: 28px 1fr;
    gap: 14px;
    padding: 22px 20px;
  }
  .course-row-meta {
    grid-column: 2 / -1;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    gap: 12px;
  }
  .course-row-bar { width: 80px; }
  .course-row-title { font-size: 22px; }
  .lesson-row { padding: 16px 20px; }
}

/* =============== COURSE PAGE =============== */

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 16px; color: var(--black-soft);
  text-decoration: none;
  padding: 32px 0 24px;
  transition: color 0.15s var(--ease);
}
.back-link:hover { color: var(--purple); }
.back-link svg { width: 14px; height: 14px; }

.course-header { padding: 16px 0 48px; }
.course-header-eyebrow {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
  color: var(--purple); margin-bottom: 14px;
}
.course-header h1 {
  font-size: 44px; font-weight: 400;
  letter-spacing: 0; line-height: 1.08;
  margin: 0 0 16px;
}
.course-header p {
  font-size: 18px; color: var(--black-soft);
  line-height: 1.55; margin: 0 0 28px;
  max-width: 580px;
}
.course-header-meta {
  display: flex; align-items: center; gap: 24px;
  font-size: 16px; color: var(--black-soft);
}
.course-header-meta strong { color: var(--purple); font-weight: 400; }
.course-header-meta-bar {
  display: inline-block;
  width: 120px; height: 3px;
  background: var(--grey); border-radius: 2px; overflow: hidden;
  vertical-align: middle;
}
.course-header-meta-bar-fill {
  display: block;
  height: 100%; background: var(--purple); border-radius: 2px;
  transition: width 0.4s var(--ease);
}

.lesson-list { padding: 0; }
.lesson-row {
  display: grid;
  grid-template-columns: 22px auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--grey);
  text-decoration: none; color: var(--black);
  transition: background 0.15s var(--ease);
}
.lesson-row:hover { background: var(--grey-soft); }
.lesson-row:hover .lesson-row-title { color: var(--purple); }
.lesson-row-check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--grey);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.lesson-row-check svg {
  width: 10px; height: 10px; color: var(--white); opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.lesson-row.is-complete .lesson-row-check {
  background: var(--purple); border-color: var(--purple);
}
.lesson-row.is-complete .lesson-row-check svg { opacity: 1; }
.lesson-row-num {
  font-size: 16px; font-weight: 400; color: var(--black-mute);
  letter-spacing: 0;
}
.lesson-row-title {
  font-size: 17px; font-weight: 400;
  letter-spacing: 0;
  transition: color 0.15s var(--ease);
}
.lesson-row-time {
  font-size: 16px; color: var(--black-soft); white-space: nowrap;
}

.course-cta {
  padding: 32px 0 16px;
  text-align: center;
  font-size: 16px; color: var(--black-soft);
}
.course-cta a {
  color: var(--purple); text-decoration: none; font-weight: 400;
}
.course-cta a:hover { text-decoration: underline; }

/* =============== LESSON PAGE =============== */

.lesson-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 72px;
  padding: 32px 0 96px;
}
.lesson-sidebar {
  position: sticky;
  top: 108px;
  align-self: start;
  font-size: 16px;
}
.lesson-sidebar-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 16px; color: var(--black-soft);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s var(--ease);
}
.lesson-sidebar-back:hover { color: var(--purple); }
.lesson-sidebar-back svg { width: 12px; height: 12px; }
.lesson-sidebar-course {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
   color: var(--purple);
  margin-bottom: 4px;
}
.lesson-sidebar-course-name {
  font-size: 16px; font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 20px;
}
.lesson-sidebar-list {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--grey);
}
.lesson-sidebar-list li { border-bottom: 1px solid var(--grey); }
.lesson-sidebar-link {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 4px 12px 10px;
  margin-left: -10px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  text-decoration: none;
  color: var(--black-soft);
  font-size: 16px;
  line-height: 1.35;
  transition: color 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.lesson-sidebar-link:hover { color: var(--black); }
.lesson-sidebar-link.is-current {
  color: var(--purple);
  font-weight: 400;
  background: var(--lilac-soft);
  border-left-color: var(--purple);
}
.lesson-sidebar-link.is-done { color: var(--black); }
.lesson-sidebar-link-check {
  width: 16px; height: 16px;
  border: 1.5px solid var(--grey);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
}
.lesson-sidebar-link-check svg {
  width: 8px; height: 8px; color: var(--white); opacity: 0;
}
.lesson-sidebar-link.is-done .lesson-sidebar-link-check {
  background: var(--purple); border-color: var(--purple);
}
.lesson-sidebar-link.is-done .lesson-sidebar-link-check svg { opacity: 1; }

.lesson-article {
  min-width: 0;
  max-width: 760px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 56px 64px 48px;
}
@media (max-width: 900px) {
  .lesson-article { padding: 36px 28px 32px; }
}
@media (max-width: 560px) {
  .lesson-article { padding: 28px 22px 28px; border-radius: 4px; }
}
.lesson-article-eyebrow {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
   color: var(--purple);
  margin-bottom: 14px;
}
.lesson-article h1 {
  font-size: 40px; font-weight: 400;
  letter-spacing: 0; line-height: 1.1;
  margin: 0 0 18px;
}
.lesson-article-summary {
  font-size: 19px; line-height: 1.55;
  color: var(--black-soft);
  margin: 0 0 36px;
}
.lesson-section { margin: 36px 0; }
.lesson-section h2 {
  font-size: 22px; font-weight: 400;
  letter-spacing: 0; line-height: 1.3;
  margin: 0 0 14px;
  color: var(--purple);
}
.lesson-section p {
  font-size: 17px; line-height: 1.65;
  margin: 0;
}
.lesson-section strong { font-weight: 400; }

.tier-inline {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  background: var(--lilac-soft);
  border-radius: var(--radius);
  margin: 36px 0;
  font-size: 16px; color: var(--black-soft); line-height: 1.5;
}
.tier-inline strong { color: var(--purple); font-weight: 400; }
.tier-inline-icon {
  width: 18px; height: 18px;
  color: var(--purple); flex-shrink: 0;
  margin-top: 1px;
}

/* Examples block — curated worked examples per lesson */
.lesson-examples {
  margin: 48px 0 8px;
  padding: 28px 28px 24px;
  background: var(--cream);
  border-radius: var(--radius);
}
.lesson-examples-label {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--purple);
  margin-bottom: 4px;
}
.lesson-examples-title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--purple);
}
.lesson-examples-intro {
  font-size: 16px;
  color: var(--black-soft);
  line-height: 1.55;
  margin: 0 0 20px;
}
.lesson-examples-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lesson-examples-item {
  padding: 14px 16px;
  background: var(--white);
  border-radius: 4px;
}
.lesson-examples-cite {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--purple);
  margin-bottom: 6px;
}
.lesson-examples-quote {
  font-size: 16px;
  line-height: 1.55;
  color: var(--black);
  margin: 0;
}
@media (max-width: 720px) {
  .lesson-examples { padding: 22px 20px; }
}

/* "Open this in Carepatron" — quiet inline helper link, not a primary action.
 * Pairs with an outbound-arrow icon to read as "leave this page to the product". */
.open-in-product {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 32px 0 0;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--purple);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 29, 177, 0.32);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.open-in-product:hover {
  color: var(--purple-deep);
  border-bottom-color: var(--purple);
}
.open-in-product svg { width: 12px; height: 12px; transition: transform 0.18s var(--ease); }
.open-in-product:hover svg { transform: translate(2px, -2px); }

/* FAQs */
.lesson-faqs {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--grey);
}
.lesson-faqs-label {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
   color: var(--black-soft);
  margin-bottom: 14px;
}
.lesson-faq {
  border-bottom: 1px solid var(--grey);
  padding: 14px 0;
}
.lesson-faq summary {
  cursor: pointer;
  font-size: 16px; font-weight: 400;
  list-style: none; position: relative;
  padding-right: 24px;
  transition: color 0.15s var(--ease);
}
.lesson-faq summary:hover { color: var(--purple); }
.lesson-faq summary:hover::after { color: var(--purple); }
.lesson-faq summary::-webkit-details-marker { display: none; }
.lesson-faq summary::after {
  content: "+";
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 20px; color: var(--black-soft); font-weight: 400;
  transition: color 0.15s var(--ease);
}
.lesson-faq[open] summary::after { content: "−"; }
.lesson-faq[open] summary { color: var(--purple); }
.lesson-faq p {
  font-size: 16px; color: var(--black-soft);
  line-height: 1.6; margin: 12px 0 4px;
}

.lesson-related {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--grey);
}
.lesson-related-label {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
   color: var(--black-soft);
  margin-bottom: 10px;
}
.lesson-related ul { list-style: none; padding: 0; margin: 0; }
.lesson-related li { padding: 4px 0; }
.lesson-related a {
  font-size: 16px; color: var(--purple);
  text-decoration: none; font-weight: 400;
}
.lesson-related a:hover { text-decoration: underline; }

/* =============== LESSON FINISH (editorial) =============== */
/* The primary progression action. A small context line ("Next up · …") sits
 * above the button so the page reads top-down as: "here's what's next →
 * confirm". The button itself is the unambiguous action on the *current* lesson. */
.lesson-finish {
  margin: 56px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--grey);
}
.lesson-finish-context {
  font-size: 16px;
  font-weight: 400;
  color: var(--black-soft);
  margin-bottom: 18px;
  letter-spacing: 0;
}
.lesson-finish-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Inherits .btn .btn-primary — same visual family as the hero CTA. */
}
.lesson-finish-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lesson-finish-check svg { width: 10px; height: 10px; color: var(--white); }
.lesson-finish.is-done .lesson-finish-cta {
  background: transparent;
  color: var(--purple);
  border: 1px solid var(--purple);
  padding: 11px 21px;
}
.lesson-finish.is-done .lesson-finish-cta:hover {
  background: var(--lilac-soft);
}
.lesson-finish-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 16px;
  color: var(--black-mute);
}
.lesson-finish-meta strong {
  color: var(--purple);
  font-weight: 400;
}
.lesson-finish-meta kbd {
  font: 12px/1 'Inter', system-ui, sans-serif;
  background: var(--grey-soft);
  padding: 2px 6px; border-radius: 3px;
  color: var(--black-soft);
}
.lesson-finish-sep {
  color: var(--grey);
}

@media (max-width: 560px) {
  .lesson-finish { margin-top: 40px; padding-top: 28px; }
}

/* =============== KEEP EXPLORING (optional secondary content) =============== */
.lesson-explore {
  margin: 48px 0 56px;
  padding-top: 32px;
  border-top: 1px solid var(--grey);
}
.lesson-explore-label {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
   color: var(--black-mute);
  margin-bottom: 22px;
}
/* Tighter rhythm between explore sub-blocks so they read as a single optional
 * group, not as four separate competing modules. */
.lesson-explore > .lesson-deeper,
.lesson-explore > .lesson-faqs,
.lesson-explore > .lesson-related,
.lesson-explore > .lesson-related-internal {
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
}
.lesson-explore > :first-child {
  margin-top: 0;
}

.lesson-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lesson-nav-card {
  padding: 14px 18px;
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  text-decoration: none; color: var(--black);
  min-width: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}
.lesson-nav-card:hover { border-color: var(--purple); }
.lesson-nav-card.is-next { text-align: right; }
.lesson-nav-card.is-disabled { opacity: 0.35; pointer-events: none; cursor: default; }
.lesson-nav-label {
  font-size: 16px; color: var(--black-mute);
  letter-spacing: 0; 
  margin-bottom: 4px;
}
.lesson-nav-title {
  font-size: 16px; font-weight: 400;
  letter-spacing: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 900px) {
  .lesson-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 16px 0 80px;
  }
  .lesson-sidebar {
    position: static;
    margin-bottom: 32px;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--grey);
    border-radius: var(--radius);
  }
  .lesson-sidebar-back { margin-bottom: 16px; padding-top: 0; }
  .lesson-article h1 { font-size: 30px; }
  .lesson-article-summary { font-size: 17px; margin-bottom: 28px; }
  .lesson-section h2 { font-size: 20px; }
  .lesson-section p { font-size: 16px; }
  .lesson-nav { grid-template-columns: 1fr; }
  .lesson-nav-card.is-next { text-align: left; }
  .course-header h1 { font-size: 32px; }
  .course-header { padding: 8px 0 32px; }
}

/* =============== FOOTER =============== */

.footer {
  border-top: 1px solid var(--grey);
  margin-top: 32px;
  padding: 32px 32px 40px;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.footer-left {
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; color: var(--black);
}
.footer-links {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
}
.footer-links a {
  font-size: 16px; color: var(--black-soft);
  text-decoration: none;
  padding: 6px 12px; border-radius: 16px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.footer-links a:hover { background: var(--grey-soft); color: var(--black); }
.footer-trial {
  max-width: 1080px; margin: 24px auto 0;
  font-size: 16px; color: var(--black-mute);
  text-align: center;
}
.footer-trial a {
  color: var(--purple); text-decoration: none; font-weight: 400;
}
.footer-trial a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .footer { padding: 24px 20px 32px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* =============== SEARCH OVERLAY =============== */

.search-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(16, 16, 16, 0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 100;
  padding: 80px 20px 20px;
  justify-content: center; align-items: flex-start;
}
.search-overlay.open { display: flex; }
.search-box {
  background: var(--white);
  width: 100%; max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(16, 16, 16, 0.18);
  overflow: hidden;
  max-height: 70vh;
  display: flex; flex-direction: column;
  animation: slideDown 0.18s var(--ease);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--grey);
}
.search-input-wrap svg { width: 16px; height: 16px; color: var(--black-soft); }
.search-input {
  flex: 1; border: 0; outline: 0; font: inherit;
  font-size: 16px; color: var(--black); background: transparent;
}
.search-close {
  background: var(--grey-soft);
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  padding: 5px 8px; border-radius: 4px; color: var(--black-soft);
}
.search-results {
  overflow-y: auto;
  padding: 6px;
  min-height: 0;
}
.search-result {
  display: block;
  padding: 12px 16px;
  text-decoration: none; color: var(--black);
  border-radius: 6px;
  transition: background 0.1s var(--ease);
}
.search-result.is-active,
.search-result:hover { background: var(--grey-soft); }
.search-result-course {
  font-size: 16px; font-weight: 400;
  letter-spacing: 0; 
  color: var(--purple); margin-bottom: 3px;
}
.search-result-title {
  font-size: 16px; font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 2px;
}
.search-result-summary {
  font-size: 16px; color: var(--black-soft);
  line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.search-empty {
  padding: 28px 20px; text-align: center;
  font-size: 16px; color: var(--black-soft);
}
.search-suggest {
  padding: 18px 22px 14px;
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}
.search-suggest-label {
  font-size: 16px; font-weight: 400; letter-spacing: 0;
   color: var(--black-mute);
}
.search-suggest-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.search-suggest-chip {
  font: inherit;
  font-size: 16px; color: var(--black);
  background: var(--grey-soft);
  padding: 5px 11px; border-radius: var(--radius-pill);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.search-suggest-chip:hover { background: var(--lilac-soft); color: var(--purple); }
.search-didyoumean {
  padding: 12px 22px; font-size: 16px;
  color: var(--black-soft);
  border-bottom: 1px solid var(--grey);
}
.search-didyoumean-btn {
  color: var(--purple); font-weight: 400; cursor: pointer;
  text-decoration: underline;
}
.search-tips {
  display: flex; gap: 12px;
  padding: 10px 22px; border-top: 1px solid var(--grey);
  font-size: 16px; color: var(--black-mute);
}
.search-tips kbd {
  font: 600 10px/1 'Inter', system-ui, sans-serif;
  background: var(--grey-soft);
  padding: 2px 5px; border-radius: 3px;
  color: var(--black-soft);
  margin-right: 2px;
}

/* =============== CELEBRATION MODAL =============== */

.celebrate {
  display: none;
  position: fixed; inset: 0;
  background: rgba(16, 16, 16, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 200;
  padding: 20px;
  justify-content: center; align-items: center;
}
.celebrate.open { display: flex; }
.celebrate-card {
  background: var(--white);
  border-radius: 12px;
  padding: 48px 36px 36px;
  text-align: center;
  max-width: 420px; width: 100%;
  position: relative;
  animation: popIn 0.2s var(--ease);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.celebrate-close {
  position: absolute; top: 14px; right: 14px;
  font-size: 22px; line-height: 1;
  color: var(--black-soft);
}
.celebrate-icon {
  width: 56px; height: 56px;
  background: var(--lilac);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.celebrate-icon svg { width: 26px; height: 26px; color: var(--purple); }
.celebrate-card h2 {
  font-size: 24px; font-weight: 400;
  letter-spacing: 0;
  margin: 0 0 8px;
  color: var(--purple);
}
.celebrate-card p {
  font-size: 16px; color: var(--black-soft);
  line-height: 1.5;
  margin: 0 0 24px;
}
.celebrate-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.celebrate-actions a {
  display: block;
  padding: 12px 20px; border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 16px; font-weight: 400;
}
.celebrate-actions a.primary { background: var(--purple); color: var(--white); }
.celebrate-actions a.primary:hover { background: var(--purple-deep); }
.celebrate-actions a.secondary { color: var(--black-soft); }
.celebrate-actions a.secondary:hover { color: var(--black); }

/* Mock CSS appended from v3 */
/* ---------- Branded product mockups (CSS-only, no images) ---------- */
/* Each mockup is a 16:9 framed preview that mimics Carepatron's actual UI surfaces.
   Used as lesson hero visuals — replaces generic "screenshot goes here" placeholders. */
.mock {
  aspect-ratio: 16 / 9;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--grey-soft);
  display: grid;
  grid-template-columns: 56px 1fr;
  font-family: 'Inter Tight', 'Inter', Helvetica, Arial, sans-serif;
  position: relative;
}
.mock-sidebar {
  background: var(--black-soft);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.mock-logo {
  width: 28px; height: 28px;
  background: var(--purple);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.mock-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: 100%;
}
.mock-nav-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  cursor: default;
}
.mock-nav-dot svg { width: 16px; height: 16px; }
.mock-nav-dot.active {
  background: rgba(91, 29, 177, 0.25);
  color: var(--white);
}
.mock-main {
  display: flex;
  flex-direction: column;
  background: var(--white);
  min-width: 0;
}
.mock-topbar {
  height: 32px;
  background: var(--white);
  border-bottom: 1px solid var(--grey-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}
.mock-crumbs {
  font-size: 9px;
  color: var(--black-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.mock-crumbs strong { color: var(--black); }
.mock-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--lilac);
  border: 1px solid var(--purple);
}
.mock-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}
.mock-h {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}
.mock-sub {
  font-size: 9px;
  color: var(--black-soft);
}
.mock-pill {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--lilac);
  color: var(--purple);
  display: inline-block;
}
.mock-pill.green { background: #d4ead7; color: var(--success); }
.mock-pill.grey { background: var(--grey-soft); color: var(--black-soft); }
.mock-btn {
  font-size: 9px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--purple);
  color: var(--white);
  display: inline-block;
}
.mock-btn.ghost { background: transparent; color: var(--black); border: 1px solid var(--grey); }
.mock-line {
  height: 6px;
  background: var(--grey-soft);
  border-radius: 3px;
}
.mock-line.short { width: 35%; }
.mock-line.med { width: 60%; }
.mock-line.dark { background: var(--black-soft); opacity: 0.18; }

/* Calendar */
.mock-cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
}
.mock-cal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: var(--grey-soft);
  border-radius: 4px;
  flex: 1;
  overflow: hidden;
  padding: 1px;
}
.mock-cal-time-col {
  display: flex; flex-direction: column;
  background: var(--white);
  padding: 4px 2px;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  color: var(--black-soft);
}
.mock-cal-day {
  background: var(--white);
  padding: 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.mock-cal-day-h {
  font-size: 8px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}
.mock-appt {
  border-radius: 3px;
  padding: 3px 4px;
  font-size: 7px;
  line-height: 1.2;
  color: var(--purple);
  background: var(--lilac);
  border-left: 2px solid var(--purple);
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mock-appt.alt { color: var(--success); background: #e6f0e7; border-left-color: var(--success); }
.mock-appt.tele { color: var(--black); background: var(--cream-deep); border-left-color: var(--cream-deeper); }
.mock-appt.sm { padding: 2px 4px; }

/* Client record */
.mock-client-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--grey-soft);
}
.mock-client-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lilac);
  color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.mock-client-meta { flex: 1; min-width: 0; }
.mock-client-name { font-size: 12px; font-weight: 700; color: var(--black); }
.mock-client-sub { font-size: 8px; color: var(--black-soft); }
.mock-tabs {
  display: flex; gap: 12px;
  border-bottom: 1px solid var(--grey-soft);
  margin: -4px -16px 0;
  padding: 4px 16px 0;
}
.mock-tab { font-size: 9px; padding: 4px 0; color: var(--black-soft); border-bottom: 2px solid transparent; }
.mock-tab.active { color: var(--purple); border-bottom-color: var(--purple); font-weight: 700; }
.mock-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.mock-field-label { font-size: 7px; color: var(--black-soft); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 2px; }
.mock-field-val { font-size: 10px; color: var(--black); font-weight: 500; }

/* Note / SOAP */
.mock-note-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 6px;
}
.mock-note-section { margin-bottom: 6px; }
.mock-note-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

/* AI Scribe — split view */
.mock-ai {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 0;
  flex: 1;
  min-height: 0;
}
.mock-ai-main {
  padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--grey-soft);
  background: var(--white);
}
.mock-ai-panel {
  background: var(--cream-deep);
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.mock-ai-h {
  font-size: 10px;
  font-weight: 700;
  color: var(--black);
  display: flex; align-items: center; gap: 4px;
}
.mock-ai-h::before {
  content: '';
  width: 16px; height: 16px;
  background: var(--purple);
  border-radius: 50%;
  display: inline-block;
}
.mock-ai-prompt {
  font-size: 9px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--grey);
  padding: 6px 8px;
  border-radius: 4px;
  line-height: 1.4;
}
.mock-ai-chip {
  font-size: 8px;
  color: var(--purple);
  background: var(--lilac);
  padding: 3px 7px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 500;
}

/* Invoice */
.mock-invoice {
  border: 1px solid var(--grey-soft);
  border-radius: 4px;
  padding: 14px;
  background: var(--white);
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.mock-inv-head { display: flex; justify-content: space-between; align-items: flex-start; }
.mock-inv-brand { font-size: 11px; font-weight: 700; color: var(--purple); }
.mock-inv-number { font-size: 8px; color: var(--black-soft); }
.mock-inv-items {
  display: grid;
  grid-template-columns: 1fr 60px 60px;
  gap: 4px 8px;
  font-size: 9px;
  padding: 6px 0;
  border-top: 1px solid var(--grey-soft);
  border-bottom: 1px solid var(--grey-soft);
}
.mock-inv-item-desc { color: var(--black); }
.mock-inv-item-val { color: var(--black-soft); text-align: right; }
.mock-inv-total { display: flex; justify-content: space-between; align-items: center; }
.mock-inv-total-val { font-size: 14px; font-weight: 700; color: var(--black); }

/* Portal / forms preview */
.mock-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; }
.mock-card {
  background: var(--cream-deep);
  border-radius: 4px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.mock-card-h { font-size: 9px; font-weight: 700; color: var(--black); display: flex; justify-content: space-between; }
.mock-card-body { font-size: 8px; color: var(--black-soft); line-height: 1.4; }
.mock-card.accent { background: var(--lilac); }
.mock-card.accent .mock-card-h { color: var(--purple); }

/* Intake form */
.mock-form {
  background: var(--white);
  border: 1px solid var(--grey-soft);
  border-radius: 4px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.mock-form-progress {
  height: 4px; background: var(--grey-soft); border-radius: 2px; overflow: hidden;
}
.mock-form-progress-fill {
  height: 100%; width: 60%; background: var(--purple); border-radius: 2px;
}
.mock-form-q {
  display: flex; flex-direction: column; gap: 3px;
}
.mock-form-input {
  border: 1px solid var(--grey);
  border-radius: 3px;
  height: 18px;
  padding: 0 6px;
  display: flex; align-items: center;
  font-size: 8px; color: var(--black);
}
.mock-form-radios { display: flex; gap: 6px; }
.mock-form-radio {
  font-size: 8px; padding: 3px 8px;
  border: 1px solid var(--grey);
  border-radius: 8px;
  color: var(--black-soft);
}
.mock-form-radio.selected { background: var(--lilac); border-color: var(--purple); color: var(--purple); font-weight: 700; }

/* Workflow editor */
.mock-flow {
  display: flex; align-items: center; gap: 8px;
  flex: 1; justify-content: center;
}
.mock-node {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 70px;
}
.mock-node-label { font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple); font-weight: 700; }
.mock-node-title { font-size: 9px; color: var(--black); font-weight: 700; }
.mock-node.trigger { border-color: var(--purple); background: var(--lilac); }
.mock-node-arrow { color: var(--black-soft); font-size: 14px; }

/* Stripe / settings cards */
.mock-setting {
  background: var(--white);
  border: 1px solid var(--grey-soft);
  border-radius: 4px;
  padding: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex: 1;
}
.mock-setting-info { flex: 1; }
.mock-setting-title { font-size: 11px; font-weight: 700; color: var(--black); margin-bottom: 2px; }
.mock-setting-sub { font-size: 8px; color: var(--black-soft); line-height: 1.4; }
.mock-stripe-logo {
  font-size: 11px; font-weight: 700; color: #635bff; letter-spacing: -0.02em;
}

/* Insurance claim row */
.mock-rows { display: flex; flex-direction: column; gap: 4px; }
.mock-row {
  display: grid; grid-template-columns: 1fr 80px 50px; gap: 8px;
  background: var(--white); border: 1px solid var(--grey-soft); border-radius: 3px;
  padding: 6px 10px; align-items: center; font-size: 9px;
}
.mock-row-meta { color: var(--black-soft); font-size: 8px; }

/* Service list */
.mock-list { display: flex; flex-direction: column; gap: 4px; }
.mock-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--grey-soft);
  border-radius: 4px;
}
.mock-list-item-name { font-size: 10px; font-weight: 500; color: var(--black); }
.mock-list-item-meta { font-size: 8px; color: var(--black-soft); }

/* Mock on lesson hero — bigger and contained */
.media-hero .mock { aspect-ratio: 16 / 9; }
.media-inline .mock { aspect-ratio: 16 / 9; }

/* Container for the in-lesson mock (sits between summary and first section) */
.lesson-mock {
  margin: 0 0 36px;
  padding: 0;
}
.lesson-mock .mock { aspect-ratio: 16 / 9; }

/* =============== PLAYBOOKS — HOME SECTION =============== */

/* Playbooks on home — book-cover row. Quiet at rest (subtle tilts in palette tones),
 * cool on hover (straighten, lift, shadow). Five small books on a shelf. */
.playbooks-home {
  padding: 24px 0 88px;
  perspective: 1200px;
}
.playbooks-home-label {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  padding: 0 4px 20px;
}
.playbooks-home-label-eyebrow {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--black-soft);
}
.playbooks-home-label-hint {
  font-size: 16px;
  color: var(--black-mute);
}

.playbooks-home-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  padding: 24px 4px 32px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.playbook-card {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 16px 16px;
  text-decoration: none;
  color: var(--white);
  background: var(--purple);
  border-radius: 2px 6px 6px 2px;
  position: relative;
  transform-origin: center bottom;
  transform: rotate(-1.5deg);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  box-shadow:
    inset 4px 0 0 rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(16, 16, 16, 0.08);
  will-change: transform;
  border-bottom: 0;
}
.playbook-card:nth-child(2) { background: var(--lilac); color: var(--black); transform: rotate(1deg); }
.playbook-card:nth-child(3) { background: var(--black); color: var(--white); transform: rotate(-0.5deg); }
.playbook-card:nth-child(4) { background: var(--cream-deeper); color: var(--black); transform: rotate(1.5deg); }
.playbook-card:nth-child(5) { background: var(--purple-deep); color: var(--white); transform: rotate(-2deg); }

.playbook-card:hover {
  transform: rotate(0deg) translateY(-10px) scale(1.04);
  box-shadow:
    inset 4px 0 0 rgba(0, 0, 0, 0.15),
    0 24px 40px rgba(16, 16, 16, 0.18);
  z-index: 2;
}

.playbook-card-title {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.18;
  margin: auto 0 0;
  padding: 0;
  transition: none;
}
.playbook-card-time {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  opacity: 0.7;
  margin-top: 14px;
  white-space: normal;
  padding: 0;
}
.playbook-card-time::before {
  content: "Playbook " counter(playbook-num, decimal-leading-zero) " · ";
  font-weight: 400;
  opacity: 1;
}
.playbooks-home-list { counter-reset: playbook-num; }
.playbook-card { counter-increment: playbook-num; }

.playbook-card-meta,
.playbook-card-desc,
.playbook-card-for { display: none; }

@media (max-width: 900px) {
  .playbooks-home-list { grid-template-columns: repeat(3, 1fr); }
  .playbook-card:nth-child(4),
  .playbook-card:nth-child(5) { margin-top: 8px; }
  /* On a 3-col grid, the 4th & 5th sit on row 2 and look balanced; nothing to span. */
}
@media (max-width: 560px) {
  .playbooks-home { padding: 16px 0 64px; }
  .playbooks-home-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  /* 5 cards / 2 columns leaves the 5th alone. Span it to keep the shelf tidy. */
  .playbook-card:nth-child(5) {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 7;
    transform: rotate(-0.5deg);
  }
  .playbook-card-title { font-size: 16px; }
  .playbook-card-time { font-size: 16px; }
}

/* =============== PLAYBOOK PAGE =============== */

.playbook-page { background: var(--cream); }

.playbook-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.playbook-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  font-size: 16px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 8px;
}
.playbook-sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: var(--black-soft);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s var(--ease);
}
.playbook-sidebar-back:hover { color: var(--purple); }
.playbook-sidebar-back svg { width: 12px; height: 12px; }

.playbook-sidebar-label {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--black-mute);
  margin-bottom: 10px;
}
.playbook-sidebar-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--grey);
}
.playbook-sidebar-toc li { margin: 0; }
.playbook-sidebar-toc a {
  display: block;
  padding: 7px 14px;
  color: var(--black-soft);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.playbook-sidebar-toc a:hover { color: var(--black); }
.playbook-sidebar-toc a.is-active {
  color: var(--purple);
  border-left-color: var(--purple);
  font-weight: 400;
}

.playbook-article {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 10px;
  padding: 56px 64px 64px;
  min-width: 0;
  /* Subtle inset to feel like an opened booklet */
  box-shadow: 0 1px 2px rgba(16, 16, 16, 0.03);
}
.playbook-eyebrow {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--purple);
  margin-bottom: 16px;
}
.playbook-article h1 {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0 0 16px;
}
.playbook-subtitle {
  font-size: 19px;
  color: var(--black-soft);
  line-height: 1.5;
  margin: 0 0 32px;
  font-weight: 400;
}

.playbook-meta {
  border-top: 1px solid var(--grey-soft);
  border-bottom: 1px solid var(--grey-soft);
  padding: 18px 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.playbook-meta-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 16px;
  color: var(--black-soft);
}
.playbook-meta-label {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--black-mute);
  min-width: 80px;
  flex-shrink: 0;
}
.playbook-lesson-link {
  color: var(--purple);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease);
}
.playbook-lesson-link:hover { border-bottom-color: var(--purple); }

.playbook-takeaways {
  background: var(--lilac-soft);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 0 0 48px;
}
.playbook-takeaways-label {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--purple);
  margin-bottom: 14px;
}
.playbook-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.playbook-takeaways li {
  font-size: 16px;
  color: var(--black);
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
}
.playbook-takeaways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
}

.playbook-section {
  margin: 0 0 44px;
  scroll-margin-top: 90px;
}
.playbook-section h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 0 18px;
  color: var(--purple);
}
.playbook-section p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--black);
  margin: 0 0 16px;
}
.playbook-section p:last-child { margin-bottom: 0; }
.playbook-section strong { font-weight: 400; }
.playbook-section em { font-style: italic; color: var(--black-soft); }
.playbook-section code {
  background: var(--grey-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 16px;
  color: var(--purple-deep);
}

.playbook-end {
  margin: 64px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--grey);
}
.playbook-end-eyebrow {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--black-mute);
  margin-bottom: 16px;
}
.playbook-end-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.playbook-end-card {
  display: block;
  padding: 16px 20px;
  background: var(--cream);
  border: 1px solid var(--grey);
  border-radius: 6px;
  text-decoration: none;
  color: var(--black);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.playbook-end-card:hover {
  border-color: var(--purple);
  background: var(--lilac-soft);
}
.playbook-end-card-title {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  margin-bottom: 4px;
}
.playbook-end-card:hover .playbook-end-card-title { color: var(--purple); }
.playbook-end-card-sub {
  font-size: 16px;
  color: var(--black-soft);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .playbook-layout { grid-template-columns: 1fr; gap: 24px; padding: 32px 20px 64px; }
  .playbook-sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .playbook-sidebar-toc { display: none; }
  .playbook-sidebar-label { display: none; }
  .playbook-article { padding: 32px 24px 40px; }
  .playbook-article h1 { font-size: 30px; }
  .playbook-subtitle { font-size: 17px; }
  .playbook-section h2 { font-size: 21px; }
  .playbook-section p { font-size: 16px; }
  .playbook-end-list { grid-template-columns: 1fr; }
  .playbook-meta-row { flex-direction: column; gap: 4px; }
  .playbook-meta-label { min-width: 0; }
}

/* =============== LESSON "DEEPER ON THIS" CALLOUT =============== */

.lesson-deeper {
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lesson-deeper-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 22px;
  background: var(--lilac-soft);
  border-radius: 6px;
  border-left: 3px solid var(--purple);
  text-decoration: none;
  color: var(--black);
  transition: background 0.15s var(--ease);
}
.lesson-deeper-link:hover { background: var(--lilac); }
.lesson-deeper-label {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--purple);
  flex-shrink: 0;
}
.lesson-deeper-title {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--black);
}
.lesson-deeper-link:hover .lesson-deeper-title { color: var(--purple); }

@media (max-width: 720px) {
  .lesson-deeper-link { flex-direction: column; gap: 6px; padding: 16px 18px; }
  .lesson-deeper-title { font-size: 16px; }
}

/* =============== INLINE CROSS-LINKS (in lesson/playbook prose) =============== */

.inline-xlink {
  color: var(--purple);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 29, 177, 0.32);
  font-weight: 400;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
  padding: 0 1px;
}
.inline-xlink:hover {
  border-bottom-color: var(--purple);
  background: var(--lilac-soft);
}

/* =============== RELATED IN THIS LEARNING CENTRE =============== */

.lesson-related-internal { margin-top: 28px; padding-top: 24px; }
.lesson-related-internal ul { display: flex; flex-direction: column; gap: 4px; }
.lesson-related-internal li { padding: 0; }
.lesson-related-internal a {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 6px;
  text-decoration: none;
  color: var(--black);
  font-weight: 400;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.lesson-related-internal a:hover {
  border-color: var(--purple);
  background: var(--lilac-soft);
  text-decoration: none;
}
.lesson-related-id {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--purple);
  font-variant-numeric: tabular-nums;
}
.lesson-related-title {
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--black);
}
.lesson-related-internal a:hover .lesson-related-title { color: var(--purple); }
.lesson-related-course {
  font-size: 16px;
  color: var(--black-mute);
  font-weight: 400;
}

@media (max-width: 720px) {
  .lesson-related-internal a {
    grid-template-columns: 28px 1fr;
    grid-template-rows: auto auto;
    row-gap: 2px;
  }
  .lesson-related-course { grid-column: 2; font-size: 16px; }
}

/* =============== SEARCH RESULT PLAYBOOK TAG =============== */

.search-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.search-result-head .search-result-course { margin-bottom: 0; }
.search-result-tag {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  
  color: var(--purple);
  background: var(--lilac-soft);
  padding: 2px 7px;
  border-radius: 10px;
  line-height: 1.4;
}
.search-result.is-active .search-result-tag,
.search-result:hover .search-result-tag {
  background: var(--white);
}
