/* GGC Planners. How to be THAT Planner Girly.
   Brand register. Committed color strategy: baby pink + cocoa carry the surface.
   OKLCH tinted neutrals. No pure black or white. */

:root {
  /* ------- Surface ------- */
  --bg:           oklch(97.8% 0.012 60);   /* warm cream */
  --bg-soft:      oklch(95.2% 0.018 40);   /* sandy beige */
  --bg-blush:     oklch(94.5% 0.028 20);   /* baby pink, the brand pink */
  --bg-blush-2:   oklch(92.0% 0.038 18);   /* deeper blush for sections */
  --bg-cocoa:     oklch(89.0% 0.022 50);   /* warm cocoa cream */
  --surface:      oklch(99.0% 0.008 60);   /* the cleanest surface, never pure white */
  --surface-warm: oklch(96.5% 0.020 35);   /* warm card surface */

  /* ------- Ink ------- */
  --ink:          oklch(28% 0.045 50);     /* deep chocolate, never #000 */
  --ink-strong:   oklch(22% 0.050 45);     /* darkest, for big display type */
  --ink-soft:     oklch(42% 0.040 50);     /* medium cocoa for body */
  --ink-mute:     oklch(58% 0.030 50);     /* muted brown for captions */
  --line:         oklch(88% 0.020 40);     /* warm hairline */
  --line-soft:    oklch(93% 0.015 40);

  /* ------- Brand colors ------- */
  --rose:         oklch(78% 0.085 22);     /* dusty rose */
  --rose-soft:    oklch(88% 0.055 22);     /* soft rose tint */
  --rose-deep:    oklch(60% 0.115 22);     /* deeper rose for emphasis */
  --cocoa:        oklch(42% 0.075 48);     /* rich cocoa */
  --cocoa-deep:   oklch(32% 0.065 48);     /* darkest cocoa */
  --gold:         oklch(68% 0.105 70);     /* warm gold */
  --gold-deep:    oklch(55% 0.115 65);     /* deeper gold */

  /* ------- Tokens for components ------- */
  --shadow-xs:  0 1px 2px oklch(20% 0.05 50 / 0.06);
  --shadow-sm:  0 2px 8px oklch(20% 0.05 50 / 0.08);
  --shadow-md:  0 12px 36px oklch(20% 0.05 50 / 0.10);
  --shadow-lg:  0 32px 80px oklch(20% 0.05 50 / 0.14);
  --radius-sm:  10px;
  --radius:     16px;
  --radius-lg:  28px;
  --radius-xl:  48px;
  --maxw:       1280px;
  --read-max:   72ch;

  /* Type */
  --serif:  "Playfair Display", "DM Serif Display", Georgia, serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --script: "Dancing Script", "Brush Script MT", cursive;

  /* Motion. Ease-out-expo & quart. No bounce. */
  --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --t-fast:    180ms;
  --t-med:     360ms;
  --t-slow:    720ms;
}

/* ============ RESET ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--cocoa); text-decoration: none; transition: color var(--t-fast) var(--ease-quart); }
a:hover { color: var(--rose-deep); }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--rose-soft); color: var(--cocoa-deep); }

/* ============ READING PROGRESS BAR ============ */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}
.read-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--rose), var(--cocoa));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 80ms linear;
  border-radius: 0 99px 99px 0;
}

/* ============ APP SHELL ============ */
.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

/* ------- Sidebar ------- */
.sidebar {
  background: var(--surface-warm);
  border-right: 1px solid var(--line);
  padding: 28px 20px 36px;
  position: fixed;
  inset: 0 auto 0 0;
  width: 304px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--t-med) var(--ease-expo);
  z-index: 40;
}
.sidebar.open { transform: translateX(0); }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 20px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 22px;
  transition: opacity var(--t-fast);
}
.sidebar-logo:hover { opacity: 0.7; }
.sidebar-logo img { height: 44px; width: auto; }

.sidebar-home-link {
  display: block;
  text-align: center;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 22px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  transition: all var(--t-fast) var(--ease-quart);
}
.sidebar-home-link:hover {
  background: var(--bg-blush);
  border-color: var(--rose);
  color: var(--cocoa-deep);
}

.progress-card {
  background: var(--bg-blush);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.progress-card::before {
  content: "✦";
  position: absolute;
  top: -6px; right: 12px;
  color: var(--rose);
  font-size: 38px;
  opacity: 0.35;
}
.progress-card .label {
  font-family: var(--script);
  font-size: 16px;
  color: var(--rose-deep);
  line-height: 1;
  margin-bottom: 6px;
}
.progress-card .value {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--cocoa-deep);
}
.progress-bar {
  height: 6px;
  background: oklch(82% 0.040 22 / 0.5);
  border-radius: 99px;
  margin-top: 12px;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--cocoa));
  border-radius: 99px;
  transform-origin: left center;
  transition: transform var(--t-slow) var(--ease-expo);
}

.nav-module { margin-bottom: 20px; }
.nav-module-title {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-module-title::before { content: "☽"; color: var(--rose); font-size: 14px; }

.nav-list { list-style: none; padding: 0; margin: 0; }
.nav-list li a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.35;
  position: relative;
  transition: background var(--t-fast) var(--ease-quart), color var(--t-fast) var(--ease-quart);
}
.nav-list li a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.nav-list li a.active {
  background: var(--bg-blush);
  color: var(--cocoa-deep);
  font-weight: 500;
}
.nav-list li a .num {
  font-family: var(--serif);
  font-size: 12px;
  width: 22px;
  flex-shrink: 0;
  color: var(--ink-mute);
  font-feature-settings: "tnum";
}
.nav-list li a.active .num { color: var(--rose-deep); }
.nav-list li a .label { flex: 1; min-width: 0; }
.nav-list li a .done {
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--t-fast);
  color: var(--cocoa);
  font-size: 13px;
}
.nav-list li.completed a .done { opacity: 1; }
.nav-list li.completed a .label { opacity: 0.55; }

.sidebar-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--script);
  font-size: 15px;
}
.sidebar-footer button {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 99px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  font-family: var(--sans);
  transition: all var(--t-fast) var(--ease-quart);
}
.sidebar-footer button:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
  background: var(--bg-blush);
}
.sidebar-footer .credit { margin-top: 14px; text-align: center; }

/* ------- Top bar (mobile) ------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: oklch(97.8% 0.012 60 / 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar img { height: 34px; width: auto; }
.topbar .title {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.menu-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 18px;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease-quart);
}
.menu-btn:hover { background: var(--bg-blush); border-color: var(--rose); }

.backdrop {
  position: fixed; inset: 0;
  background: oklch(20% 0.05 50 / 0.42);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-med) var(--ease-quart);
  z-index: 35;
  backdrop-filter: blur(4px);
}
.backdrop.show { opacity: 1; pointer-events: all; }

/* ------- Main ------- */
.main {
  padding: 26px 22px 120px;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* ============ HOME / DASHBOARD ============ */
.cover-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 56px;
  padding: 64px 26px 56px;
  text-align: center;
  background:
    radial-gradient(circle at 18% 12%, oklch(94% 0.035 25) 0%, transparent 38%),
    radial-gradient(circle at 88% 84%, oklch(89% 0.030 20) 0%, transparent 42%),
    linear-gradient(140deg, oklch(96% 0.020 30), oklch(91% 0.030 22));
  box-shadow: var(--shadow-md);
}
.cover-hero::before {
  content: "✦";
  position: absolute;
  top: 28px; right: 36px;
  font-size: 28px;
  color: var(--rose);
  opacity: 0.5;
  animation: drift 9s ease-in-out infinite;
}
.cover-hero::after {
  content: "☽";
  position: absolute;
  bottom: 32px; left: 38px;
  font-size: 32px;
  color: var(--cocoa);
  opacity: 0.4;
  animation: drift 11s ease-in-out infinite reverse;
}
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.cover-hero .eyebrow {
  font-family: var(--script);
  font-size: 20px;
  color: var(--rose-deep);
  margin-bottom: 4px;
}
.cover-hero .logo-wrap {
  background: var(--surface);
  padding: 22px 30px;
  border-radius: var(--radius);
  display: inline-block;
  margin: 14px 0 26px;
  box-shadow: var(--shadow-sm);
}
.cover-hero .logo-wrap img { height: 72px; width: auto; }
.cover-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.04;
  margin: 0 auto 14px;
  color: var(--cocoa-deep);
  max-width: 22ch;
}
.cover-hero h1 em {
  font-family: var(--script);
  font-style: normal;
  font-weight: 500;
  color: var(--rose-deep);
  font-size: 1.1em;
}
.cover-hero p {
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 14px auto 0;
  font-size: 16px;
}
.cover-hero .author {
  font-family: var(--script);
  font-size: 22px;
  color: var(--cocoa);
  margin-top: 22px;
}

.dashboard-intro {
  text-align: center;
  margin-bottom: 40px;
}
.dashboard-intro .kicker {
  font-family: var(--script);
  font-size: 20px;
  color: var(--rose-deep);
}
.dashboard-intro h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--cocoa-deep);
  margin: 4px 0 12px;
}
.dashboard-intro .lead {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto;
}
.dashboard-intro .divider {
  display: inline-block;
  margin: 22px 0 0;
  font-size: 14px;
  letter-spacing: 1.6em;
  color: var(--rose);
}

.overview-progress {
  background: var(--bg-blush);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin: 0 auto 44px;
  max-width: 720px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.overview-progress::before,
.overview-progress::after {
  content: "✦";
  position: absolute;
  font-size: 60px;
  color: var(--rose);
  opacity: 0.18;
  top: -10px;
}
.overview-progress::before { left: 14px; }
.overview-progress::after { right: 14px; }
.overview-progress .small {
  font-family: var(--script);
  color: var(--rose-deep);
  font-size: 18px;
  margin-bottom: 4px;
}
.overview-progress .big {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--cocoa-deep);
  font-weight: 500;
}
.overview-progress .progress-bar {
  margin: 18px auto 0;
  max-width: 420px;
  height: 8px;
}

/* Module cards. NOT identical grid. First card is the "current" one, larger. */
.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.module-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface-warm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line-soft);
  transition: transform var(--t-med) var(--ease-expo),
              box-shadow var(--t-med) var(--ease-expo),
              border-color var(--t-fast);
  position: relative;
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--rose);
  text-decoration: none;
}
.module-card .img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-cocoa);
  position: relative;
}
.module-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-expo);
}
.module-card:hover .img-wrap img { transform: scale(1.04); }

.module-card .body {
  padding: 26px 26px 28px;
  position: relative;
}
.module-card .module-num {
  position: absolute;
  top: -28px; right: 22px;
  background: var(--surface);
  font-family: var(--script);
  color: var(--rose-deep);
  font-size: 38px;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  line-height: 1;
  border: 1px solid var(--bg-blush);
}
.module-card .kicker {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.module-card h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--cocoa-deep);
  margin: 6px 0 10px;
  line-height: 1.15;
}
.module-card p {
  color: var(--ink-soft);
  margin: 0 0 16px;
  font-size: 15px;
}
.module-card .progress-mini {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--cocoa);
  font-feature-settings: "tnum";
}
.module-card .progress-mini .pct {
  background: var(--bg-blush);
  padding: 4px 12px;
  border-radius: 99px;
  color: var(--rose-deep);
  font-weight: 500;
}
.module-card .progress-mini .progress-bar {
  flex: 1;
  height: 5px;
  margin: 0;
}

/* ============ LESSON VIEW ============ */
.lesson-frame {
  position: relative;
}

/* Lesson hero. Big, immersive, scripty. */
.lesson-hero {
  position: relative;
  margin: 0 -22px 56px;
  overflow: hidden;
}
.lesson-hero .hero-watermark {
  position: absolute;
  top: 6px; right: -8px;
  font-family: var(--script);
  font-size: clamp(180px, 28vw, 320px);
  color: oklch(98% 0.005 50);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.04em;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 2px 0 oklch(94% 0.025 25);
}
.lesson-hero .hero-img-wrap {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-cocoa);
}
.lesson-hero .hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-expo);
}
.lesson-hero:hover .hero-img { transform: scale(1.02); }
.lesson-hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    oklch(20% 0.05 50 / 0) 30%,
    oklch(20% 0.05 50 / 0.45) 75%,
    oklch(18% 0.05 50 / 0.72) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 26px 36px;
  color: var(--surface);
}
.lesson-hero .eyebrow {
  font-family: var(--script);
  font-size: 22px;
  color: oklch(92% 0.05 22);
  margin-bottom: 4px;
}
.lesson-hero .chapter-mark {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: oklch(94% 0.020 35);
  margin-bottom: 14px;
  opacity: 0.92;
}
.lesson-hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 1.05;
  margin: 0;
  max-width: 18ch;
  letter-spacing: -0.005em;
}

/* The body of the lesson. NOT one card. A frame for varied sections. */
.lesson-body {
  max-width: var(--read-max);
  margin: 0 auto;
  position: relative;
}

/* Section. Default treatment. */
.section {
  margin: 0 auto 56px;
  position: relative;
}
.section .heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 32px);
  color: var(--cocoa-deep);
  margin: 0 0 18px;
  line-height: 1.18;
  position: relative;
}
.section .heading::before {
  content: "✦";
  display: block;
  font-size: 14px;
  color: var(--rose);
  margin-bottom: 12px;
  letter-spacing: 0.4em;
}

.section p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.72;
  max-width: var(--read-max);
}
.section p:last-child { margin-bottom: 0; }

/* Section type: lead (first content section, drop cap energy). */
.section.is-lead .heading {
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 500;
}
.section.is-lead .heading::before { display: none; }
.section.is-lead > p:first-of-type {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
}
.section.is-lead > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 4.4em;
  line-height: 0.85;
  padding: 8px 14px 0 0;
  color: var(--rose-deep);
  font-weight: 500;
}

/* Section type: numbered-subsections. */
.section.is-numbered .sub-stack {
  display: grid;
  gap: 28px;
  margin-top: 6px;
}
.section.is-numbered .sub-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 4px 0;
  position: relative;
}
.section.is-numbered .sub-num {
  font-family: var(--script);
  font-size: 44px;
  color: var(--rose);
  line-height: 0.85;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-blush);
  border-radius: 50%;
  font-weight: 600;
}
.section.is-numbered .sub-body strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--cocoa-deep);
  letter-spacing: 0.005em;
  margin-bottom: 6px;
}
.section.is-numbered .sub-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

/* Section type: subsection-grid (for {h,p} items that aren't numbered). */
.section.is-subgrid .sub-stack {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.section.is-subgrid .sub-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}
.section.is-subgrid .sub-item:last-child { border-bottom: none; }
.section.is-subgrid .sub-body strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--cocoa-deep);
  margin-bottom: 6px;
}
.section.is-subgrid .sub-body strong::before {
  content: "☽";
  color: var(--rose);
  margin-right: 8px;
  font-size: 14px;
  vertical-align: 1px;
}
.section.is-subgrid .sub-body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* Section type: bullet list (the list:true sections). */
.section.is-list ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 12px;
}
.section.is-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}
.section.is-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--rose);
  font-size: 14px;
}

/* Section type: tinted block (every nth section for rhythm). */
.section.is-blush {
  background: var(--bg-blush);
  border-radius: var(--radius-lg);
  padding: 38px 32px 36px;
  margin-left: -16px;
  margin-right: -16px;
}
.section.is-cocoa {
  background: var(--bg-cocoa);
  border-radius: var(--radius-lg);
  padding: 38px 32px 36px;
  margin-left: -16px;
  margin-right: -16px;
}

/* Divider between sections. ✦ ✦ ✦. */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 48px;
  color: var(--rose);
  font-size: 12px;
  letter-spacing: 0.4em;
}
.section-divider::before,
.section-divider::after {
  content: "";
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---- Action step ---- */
.action-step {
  position: relative;
  margin: 64px auto 32px;
  padding: 38px 32px 36px;
  background:
    linear-gradient(135deg, var(--bg-blush), oklch(96% 0.020 40));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: var(--read-max);
  overflow: hidden;
}
.action-step::before {
  content: "★";
  position: absolute;
  top: 22px; right: 28px;
  font-size: 22px;
  color: var(--rose);
  opacity: 0.5;
}
.action-step .label {
  font-family: var(--script);
  font-size: 22px;
  color: var(--rose-deep);
  margin-bottom: 4px;
  line-height: 1;
}
.action-step h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--cocoa-deep);
  margin: 6px 0 12px;
}
.action-step p {
  margin: 0;
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.65;
}

/* ---- Notes ---- */
.notes {
  margin: 48px auto 0;
  max-width: var(--read-max);
  padding: 32px;
  background: var(--surface-warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}
.notes .label {
  font-family: var(--script);
  font-size: 20px;
  color: var(--rose-deep);
  margin-bottom: 0;
  line-height: 1;
}
.notes h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--cocoa-deep);
  margin: 6px 0 14px;
}
.notes textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
  transition: border-color var(--t-fast) var(--ease-quart),
              box-shadow var(--t-fast) var(--ease-quart);
}
.notes textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 4px oklch(88% 0.055 22 / 0.4);
}
.notes .saved {
  font-size: 12px;
  color: var(--cocoa);
  margin-top: 8px;
  min-height: 16px;
  font-style: italic;
  font-family: var(--script);
  font-size: 14px;
}

/* ---- Lesson controls ---- */
.lesson-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 48px auto 0;
  padding-top: 32px;
  max-width: var(--read-max);
  border-top: 1px solid var(--line-soft);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-quart),
              background var(--t-fast) var(--ease-quart),
              border-color var(--t-fast) var(--ease-quart),
              color var(--t-fast) var(--ease-quart),
              box-shadow var(--t-fast) var(--ease-quart);
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--rose);
  color: var(--rose-deep);
  background: var(--bg-blush);
  text-decoration: none;
}
.btn-primary {
  background: var(--cocoa-deep);
  color: var(--surface);
  border-color: var(--cocoa-deep);
}
.btn-primary:hover {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
  color: var(--surface);
  box-shadow: var(--shadow-sm);
}
.btn-primary.completed {
  background: var(--cocoa);
  border-color: var(--cocoa);
}
.lesson-controls .spacer { flex: 1; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--cocoa-deep);
  color: var(--surface);
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-quart),
              transform var(--t-med) var(--ease-expo);
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============ SCROLL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease-expo),
              transform 800ms var(--ease-expo);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-expo),
              transform 700ms var(--ease-expo);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 60ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 120ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 180ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 360ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(n+8) { transition-delay: 420ms; opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============ DESKTOP ============ */
@media (min-width: 900px) {
  .app { grid-template-columns: 304px 1fr; }
  .sidebar {
    position: sticky;
    inset: auto;
    height: 100vh;
    top: 0;
    transform: none;
  }
  .topbar { display: none; }
  .main {
    padding: 48px 56px 140px;
    max-width: 1080px;
  }

  .lesson-hero { margin: 0 -56px 64px; }
  .lesson-hero .hero-overlay { padding: 48px 56px 56px; }

  .module-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  /* First module card spans both columns for hierarchy. */
  .module-grid > .module-card:first-child {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
  .module-grid > .module-card:first-child .img-wrap {
    aspect-ratio: 4 / 3;
  }
  .module-grid > .module-card:first-child .body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
  }
  .module-grid > .module-card:first-child h3 {
    font-size: 32px;
  }

  .section.is-blush,
  .section.is-cocoa {
    margin-left: -32px;
    margin-right: -32px;
    padding: 48px 44px;
  }

  .section.is-numbered .sub-stack {
    gap: 32px;
  }
}

/* Print */
@media print {
  .sidebar, .topbar, .lesson-controls, .notes, .read-progress { display: none; }
  .main { padding: 0; }
  .lesson-hero { margin: 0 0 32px; }
}
