/* Carepatron Learning Centre — design system.
 * Academy-grade structure with the carepatron.com marketing design language:
 * #fafaf3 canvas, white hairline cards, pill buttons, uppercase mini-badges,
 * tinted-black secondary text, dark #101010 CTA band.
 * verify/brand-gate.sh encodes this language; keep the two in sync. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafaf3;
  --card: #ffffff;
  --ink: #101010;
  --ink-60: rgba(16,16,16,.62);
  --ink-40: rgba(16,16,16,.58); /* muted tier; 4.59:1 on the canvas, keeps AA */
  --hairline: rgba(16,16,16,.10);
  --hairline-soft: rgba(16,16,16,.06);
  --purple: #5b1db1;
  --purple-hover: #4e18a0;
  --violet: #a379d5;
  --lilac: #e5ddfb;
  --cream: #fef6ec;
  --badge-purple: #ebe6fa;
  --badge-lime: #dcf2a8;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --pill: 3.125rem;
  --shadow-1: 0 1px 2px rgba(16,16,16,.04);
  --shadow-2: 0 14px 40px -12px rgba(16,16,16,.14);
  --font: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
a { color: inherit; }
strong, b { font-weight: 700; }
button { font: inherit; cursor: pointer; background: transparent; border: none; color: inherit; }
code {
  font-family: var(--font);
  background: var(--badge-purple);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 15px;
}
kbd {
  font-family: var(--font);
  font-size: 12px; font-weight: 700; color: var(--ink-40);
  border: 1px solid var(--hairline); border-radius: 5px; padding: 1px 6px;
  background: var(--card);
}
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--purple); color: #ffffff; font-weight: 700;
  padding: 10px 18px; border-radius: 0 0 var(--r-sm) 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ================= Nav ================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,243,.88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--hairline-soft); }
.nav-inner {
  max-width: 1152px; margin: 0 auto; padding: 0 32px;
  height: 64px; display: flex; align-items: center; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 8px; margin-right: 14px; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 24px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 2px; font-size: 15px; }
.nav-links a {
  text-decoration: none; padding: 8px 13px; border-radius: var(--pill); color: var(--ink-60);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(16,16,16,.05); }

.search-trigger {
  margin-left: auto; display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--pill); padding: 8px 16px; min-width: 210px;
  font-size: 15px; color: var(--ink-40); text-align: left;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.search-trigger:hover { border-color: rgba(16,16,16,.22); box-shadow: var(--shadow-1); }
.search-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }
.search-trigger span { flex: 1; }
.nav-actions { display: contents; }
.nav .btn-pill { margin-left: 10px; }

/* ================= Buttons ================= */
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 2.875rem; padding: 0 1.5rem;
  border-radius: var(--pill);
  font-size: 1.06rem; font-weight: 700; line-height: 1; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .18s var(--ease);
}
.btn-pill:active { transform: scale(.985); }
.btn-primary { background: var(--purple); border-color: var(--purple); color: #ffffff; }
.btn-primary:hover { background: var(--purple-hover); border-color: var(--purple-hover); }
.btn-secondary { background: var(--card); border-color: var(--hairline); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-sm { height: 2.375rem; padding: 0 1.15rem; font-size: .94rem; }

/* ================= Badges ================= */
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--purple); background: var(--badge-purple);
  border-radius: 6px; padding: 4px 8px 3px; line-height: 1.2;
}
.badge-lime { background: var(--badge-lime); color: var(--ink); }

.meta { font-size: 14.5px; color: var(--ink-60); display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta .badge { position: relative; top: -1px; }

/* ================= Page scaffolding ================= */
.page { max-width: 1152px; margin: 0 auto; padding: 0 32px; }
.page-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }

.crumbs { padding: 26px 0 0; font-size: 14.5px; color: var(--ink-60); }
.crumbs a { text-decoration: none; color: var(--ink-60); }
.crumbs a:hover { color: var(--purple); }
.crumbs .sep { margin: 0 8px; color: var(--ink-40); }

.divider { border: none; border-top: 1px solid var(--hairline-soft); margin: 44px 0; }

/* Anchored sections land below the sticky nav */
#courses, #lessons, #playbooks, .playbook-section { scroll-margin-top: 96px; }

/* ================= Home: hero ================= */
.hero { padding: 88px 0 76px; text-align: center; }
.hero .badge { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(44px, 5vw, 64px); font-weight: 400; line-height: 1.12;
  max-width: 760px; margin: 0 auto 20px;
}
.hero .lede { font-size: 20px; line-height: 1.5; color: var(--ink-60); max-width: 560px; margin: 0 auto 36px; }
.hero-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Returning-user resume card (client-only; appears when stored progress exists) */
.continue-card {
  display: flex; align-items: center; gap: 18px;
  max-width: 640px; margin: -30px auto 44px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 16px 22px; text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.continue-card:hover { border-color: rgba(16,16,16,.18); box-shadow: var(--shadow-1); }
.continue-card-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--purple); margin-bottom: 3px; }
.continue-card-title { font-size: 16.5px; font-weight: 700; }
.continue-card-bar { width: 120px; height: 5px; border-radius: 3px; background: rgba(16,16,16,.08); overflow: hidden; margin-left: auto; flex-shrink: 0; }
.continue-card-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--purple); }
.continue-card-arrow { color: var(--purple); font-size: 18px; flex-shrink: 0; }

/* ================= Home: sections ================= */
.section { padding: 30px 0 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(26px, 2.6vw, 32px); font-weight: 400; line-height: 1.25; }
.section-head .courses-progress { font-size: 14.5px; color: var(--ink-60); white-space: nowrap; }
.reset-link {
  font-size: 14.5px; color: var(--ink-40); text-decoration: underline; margin-left: 10px;
  padding: 0; transition: color .15s var(--ease);
}
.reset-link:hover { color: var(--purple); }
.section-sub { font-size: 16.5px; color: var(--ink-60); max-width: 560px; margin-bottom: 6px; }

/* ================= Home: course cards ================= */
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.area-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  text-decoration: none; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.area-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: rgba(16,16,16,.16); }
.area-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.area-card h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.area-card .desc { font-size: 15px; line-height: 1.5; color: var(--ink-60); flex: 1; }
.area-card .meta { margin-top: 8px; }

.thumb { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--cream); }
.thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s var(--ease);
}
.area-card:hover .thumb img { transform: scale(1.04); }

/* ================= Home: popular lessons ================= */
.list-card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; margin-top: 20px; }
.list-row {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 22px; text-decoration: none;
  transition: background .15s var(--ease);
}
.list-row + .list-row { border-top: 1px solid var(--hairline-soft); }
.list-row:hover { background: var(--bg); }
.list-row .t { font-size: 16.5px; font-weight: 700; }
.list-row .m { margin-left: auto; white-space: nowrap; }
.list-row .go { color: var(--ink-40); font-size: 16px; transition: transform .15s var(--ease), color .15s var(--ease); }
.list-row:hover .go { transform: translateX(3px); color: var(--purple); }

/* ================= Home: playbook rows (bare, hairline) ================= */
.pb-rows { margin-top: 20px; }
.pb-row {
  display: flex; align-items: baseline; gap: 18px;
  padding: 17px 2px; text-decoration: none;
  border-top: 1px solid var(--hairline-soft);
}
.pb-row:last-child { border-bottom: 1px solid var(--hairline-soft); }
.pb-row .t { font-size: 17.5px; transition: color .15s var(--ease); }
.pb-row:hover .t { color: var(--purple); }
.pb-row .m { margin-left: auto; white-space: nowrap; }

/* ================= Dark CTA band ================= */
.cta-band {
  background: var(--ink); color: #ffffff; border-radius: var(--r-xl);
  padding: 64px 48px; margin: 44px 0 0; text-align: center;
}
.cta-band h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 400; line-height: 1.2; margin-bottom: 12px; }
.cta-band p { font-size: 17px; color: rgba(255,255,255,.72); max-width: 460px; margin: 0 auto 30px; }
.cta-band .btn-pill { background: #ffffff; border-color: #ffffff; color: var(--ink); }
.cta-band .btn-pill:hover { background: var(--cream); border-color: var(--cream); }
.cta-band .quiet-link { display: inline-block; margin-left: 18px; font-size: 16px; color: rgba(255,255,255,.72); }
.cta-band .quiet-link:hover { color: #ffffff; }

/* ================= Footer ================= */
.footer {
  max-width: 1152px; margin: 64px auto 0; padding: 30px 32px 40px;
  border-top: 1px solid var(--hairline-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 14.5px; color: var(--ink-60);
}
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { text-decoration: none; color: var(--ink-60); }
.footer a:hover { color: var(--ink); }

/* ================= Course page ================= */
.course-hero { padding: 40px 0 14px; }
.course-hero .badge { margin-bottom: 18px; }
.course-hero h1 { font-size: clamp(38px, 4.4vw, 54px); font-weight: 400; line-height: 1.15; margin-bottom: 16px; }
.course-hero .lede { font-size: 19px; line-height: 1.55; color: var(--ink-60); max-width: 620px; margin-bottom: 20px; }
.course-hero .meta { margin-bottom: 30px; }
.course-ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.course-ctas .note { font-size: 14.5px; color: var(--ink-60); }

.course-body h2 { font-size: 26px; font-weight: 400; margin: 0 0 20px; }
.learn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; max-width: 720px; }
.learn-item { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; }
.learn-item .ck {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  background: var(--badge-purple); position: relative;
}
.learn-item .ck::after {
  content: ""; position: absolute; left: 5.5px; top: 5.5px;
  width: 8px; height: 4.5px;
  border-left: 2px solid var(--purple); border-bottom: 2px solid var(--purple);
  transform: rotate(-45deg);
}

.curriculum { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; max-width: 720px; }
.lesson-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; text-decoration: none;
  transition: background .15s var(--ease);
}
.lesson-row + .lesson-row { border-top: 1px solid var(--hairline-soft); }
.lesson-row:hover { background: var(--bg); }
.lesson-row .n {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--hairline); color: var(--ink-60);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative; background: var(--card);
}
.lesson-row.is-complete .n { background: var(--purple); border-color: var(--purple); color: transparent; }
.lesson-row.is-complete .n::after {
  content: ""; position: absolute; left: 10px; top: 11px;
  width: 10px; height: 5.5px;
  border-left: 2px solid #ffffff; border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}
.lesson-row.is-complete .t { color: var(--ink-60); }
.lesson-row .n.q { background: var(--badge-lime); border-color: var(--badge-lime); color: var(--ink); }
.lesson-row .t { font-size: 16.5px; font-weight: 700; }
.lesson-row .resume-chip {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--purple);
  background: var(--badge-purple); border-radius: var(--pill); padding: 3px 10px; margin-left: 6px;
  text-transform: uppercase; letter-spacing: .04em; position: relative; top: -1px;
}
.lesson-row .m { margin-left: auto; font-size: 14.5px; color: var(--ink-60); white-space: nowrap; }

.about-course { max-width: 620px; }
.about-course p { margin-bottom: 13px; font-size: 16.5px; color: var(--ink-60); }
.about-course p strong { color: var(--ink); }

/* ================= Lesson page ================= */
.lesson-grid {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 64px;
  max-width: 1040px; margin: 0 auto; padding: 40px 32px 160px;
}
.rail { position: sticky; top: 96px; align-self: start; font-size: 14.5px; }
.rail .back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px;
  text-decoration: none; color: var(--ink-60); font-weight: 700; margin-bottom: 22px;
  transition: color .15s var(--ease);
}
.rail .back:hover { color: var(--purple); }
.rail .back svg { width: 14px; height: 14px; }
.rail .course-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin-bottom: 12px; }
.rail ol { list-style: none; display: flex; flex-direction: column; }
.rail li { border-left: 1px solid var(--hairline-soft); }
.rail li > a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-left: -1px; text-decoration: none; color: var(--ink-60);
  border-left: 2px solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.rail li > a:hover { color: var(--ink); }
.rail .tickc { width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--hairline); background: var(--card); position: relative; }
.rail .is-done .tickc { background: var(--purple); border-color: var(--purple); }
.rail .is-done .tickc::after {
  content: ""; position: absolute; left: 3.5px; top: 4px;
  width: 6px; height: 3.5px;
  border-left: 1.5px solid #ffffff; border-bottom: 1.5px solid #ffffff;
  transform: rotate(-45deg);
}
.rail .tickc.q { background: var(--badge-lime); border-color: var(--badge-lime); }
.rail .is-current { color: var(--ink); font-weight: 700; border-left-color: var(--purple); }
.rail li > a span:last-child {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rail .is-current .tickc { border-color: var(--purple); }

.lesson-article { max-width: 660px; }
.lesson-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-60); margin-bottom: 16px; }
.lesson-article h1 { font-size: clamp(34px, 3.8vw, 44px); font-weight: 400; line-height: 1.15; margin-bottom: 16px; }
.lesson-article .summary { font-size: 19px; line-height: 1.55; color: var(--ink-60); margin-bottom: 30px; }
.lesson-article h2 { font-size: 25px; font-weight: 400; margin: 48px 0 14px; text-wrap: balance; }
.lesson-article p { margin-bottom: 14px; font-size: 16.5px; }
.lesson-article ul { margin: 0 0 14px 22px; }
.lesson-article ul li { margin-bottom: 7px; font-size: 16.5px; }

.inline-xlink { color: var(--purple); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--lilac); transition: border-color .15s var(--ease); }
.inline-xlink:hover { border-bottom-color: var(--purple); }

/* task card */
.taskcard {
  background: var(--badge-purple); border-radius: var(--r-lg);
  padding: 24px 26px; margin: 0 0 14px;
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
}
.taskcard .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--purple); margin-bottom: 6px; }
.taskcard .outcome { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.taskcard .path { font-size: 14.5px; color: var(--ink-60); }
.taskcard .path strong { color: var(--ink); }

/* prereqs */
.prereqs { padding: 18px 0 4px; margin-bottom: 12px; }
.prereqs .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin-bottom: 10px; }
.prereqs ul { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.prereqs li { display: flex; gap: 11px; align-items: baseline; font-size: 16px; color: var(--ink-60); margin: 0; }
.prereqs li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); flex-shrink: 0; position: relative; top: -3px; }

/* numbered steps inside lesson sections render as a step card */
.lesson-section ol {
  counter-reset: step; list-style: none;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  overflow: hidden; margin: 20px 0 18px;
}
.lesson-section ol li {
  position: relative; padding: 17px 20px 17px 66px;
  font-size: 16px; line-height: 1.55; margin: 0;
}
.lesson-section ol li + li { border-top: 1px solid var(--hairline-soft); }
.lesson-section ol li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 16px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--badge-purple); color: var(--purple);
  font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center;
}

/* journey strip (optional, per-course) */
.journey {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 26px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.journey-step {
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; color: var(--ink-40);
  font-size: 13.5px; white-space: nowrap; flex-shrink: 0;
  padding: 4px 6px; border-radius: var(--r-sm);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.journey-step:hover { color: var(--ink); background: var(--bg); }
.journey-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--bg); border: 1px solid var(--hairline); color: var(--ink-40);
}
.journey-dot svg { width: 11px; height: 11px; }
.journey-step.is-past { color: var(--ink-60); }
.journey-step.is-past .journey-dot { background: var(--lilac); border-color: var(--lilac); color: var(--purple); }
.journey-step.is-here { color: var(--ink); font-weight: 700; }
.journey-step.is-here .journey-dot { background: var(--purple); border-color: var(--purple); color: #ffffff; }
.journey-line { flex: 1 0 12px; min-width: 12px; height: 1px; background: var(--hairline); }
@media (max-width: 720px) {
  .journey { padding: 12px; }
  .journey-step:not(.is-here) .journey-label { display: none; }
  .journey-line { flex-basis: 8px; min-width: 8px; }
}

/* facts row (optional, per-lesson) */
.factrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 26px; }
.fact {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 18px 18px 16px;
}
.fact-n { font-size: 30px; line-height: 1.1; margin-bottom: 6px; }
.fact-label { font-size: 14px; line-height: 1.45; color: var(--ink-60); }
.fact-label strong { color: var(--ink); }

/* section callout (optional, per-section) */
.callout {
  background: var(--cream); border-radius: var(--r-md);
  padding: 16px 18px; margin-top: 16px;
}
.callout-label {
  display: block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--purple); margin-bottom: 6px;
}
.callout-text { font-size: 15.5px; line-height: 1.55; }
.callout-text p { margin: 0; }
.callout-text strong { color: var(--ink); }

/* tier note */
.tier-inline {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 15px 17px; margin: 22px 0;
  font-size: 15.5px; line-height: 1.55; color: var(--ink-60);
}
.tier-inline strong { color: var(--ink); }
.tier-inline-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--violet); margin-top: 2px; }

/* check it worked */
.checkit { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 26px 28px; margin: 46px 0 8px; }
.checkit .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--purple); margin-bottom: 4px; }
.checkit .lead { font-size: 16px; color: var(--ink-60); margin-bottom: 16px; }
.checkit .item {
  display: flex; gap: 13px; align-items: flex-start;
  text-align: left; font-size: 16px; line-height: 1.5; padding: 10px 12px;
  margin: 0 -12px; width: calc(100% + 24px);
  border-radius: var(--r-sm);
  transition: background .15s var(--ease);
}
.checkit .item:hover { background: var(--bg); }
.checkit .cbx {
  width: 21px; height: 21px; border-radius: 7px; flex-shrink: 0; margin-top: 2px;
  border: 1.5px solid rgba(16,16,16,.32); background: var(--card);
  position: relative; transition: background .15s var(--ease), border-color .15s var(--ease);
}
.checkit .item.on .cbx { background: var(--purple); border-color: var(--purple); }
.checkit .item.on .cbx::after {
  content: ""; position: absolute; left: 4.5px; top: 5px;
  width: 9px; height: 5px;
  border-left: 2px solid #ffffff; border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}
.checkit .item.on span:last-child { color: var(--ink-60); }
.checkit .allgood {
  margin: 14px -12px 0; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--badge-lime); font-size: 15px; font-weight: 700;
}

/* examples */
.lesson-examples { margin: 46px 0 8px; }
.lesson-examples-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin-bottom: 8px; }
.lesson-examples-title { font-size: 25px; font-weight: 400; margin: 0 0 10px; }
.lesson-examples-intro { font-size: 16px; color: var(--ink-60); margin-bottom: 16px; }
.lesson-examples-list { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.lesson-examples-item { padding: 16px 20px; }
.lesson-examples-item + .lesson-examples-item { border-top: 1px solid var(--hairline-soft); }
.lesson-examples-cite { font-size: 13px; font-weight: 700; color: var(--purple); margin-bottom: 4px; }
.lesson-examples-quote { font-size: 15.5px; line-height: 1.55; color: var(--ink-60); margin: 0; }

/* open in product */
.open-in-product {
  display: inline-flex; align-items: center; gap: 8px;
  height: 2.375rem; padding: 0 1.15rem; margin: 8px 0 4px;
  border-radius: var(--pill); border: 1px solid var(--hairline);
  background: var(--card); font-size: .94rem; font-weight: 700; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.open-in-product:hover { border-color: var(--ink); }
.open-in-product svg { width: 14px; height: 14px; }

/* expanders (FAQs, deeper layers) */
.lesson-explore { margin: 42px 0 0; }
.lesson-faqs-label, .lesson-related-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin: 34px 0 6px; }
details.layer { border-top: 1px solid var(--hairline-soft); }
details.layer:last-of-type { border-bottom: 1px solid var(--hairline-soft); }
details.layer summary {
  list-style: none; cursor: pointer;
  padding: 15px 2px; font-size: 16.5px; font-weight: 700;
  display: flex; align-items: center; gap: 12px;
  transition: color .15s var(--ease);
}
details.layer summary:hover { color: var(--purple); }
details.layer summary::-webkit-details-marker { display: none; }
details.layer summary::after {
  content: "+"; margin-left: auto; color: var(--ink-40); font-size: 21px; font-weight: 400;
  transition: transform .2s var(--ease); flex-shrink: 0;
}
details.layer[open] summary::after { transform: rotate(45deg); }
details.layer .layer-body { padding: 2px 2px 18px; font-size: 16px; color: var(--ink-60); }
details.layer .layer-body p { margin-bottom: 10px; font-size: 16px; }
details.layer .layer-body strong { color: var(--ink); }

.lesson-deeper { margin: 34px 0 0; display: flex; flex-direction: column; gap: 10px; }
.lesson-deeper-link {
  display: flex; align-items: baseline; gap: 14px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 15px 18px; text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.lesson-deeper-link:hover { border-color: rgba(16,16,16,.18); box-shadow: var(--shadow-1); }
.lesson-deeper-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--purple); white-space: nowrap; }
.lesson-deeper-title { font-size: 16px; font-weight: 700; }

.lesson-related ul { list-style: none; margin: 0; columns: 2; column-gap: 28px; }
.lesson-related li { margin: 0 0 8px; break-inside: avoid; }
.lesson-related a { font-size: 15.5px; color: var(--ink-60); text-decoration: none; transition: color .15s var(--ease); }
.lesson-related a:hover { color: var(--purple); }

/* lesson feedback */
.lesson-feedback {
  margin: 44px 0 0; padding: 22px 0 0; border-top: 1px solid var(--hairline-soft);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.lesson-feedback-prompt { font-size: 15px; font-weight: 700; }
.lesson-feedback-thanks { width: 100%; margin-top: 0; }
.lesson-feedback-actions { display: flex; gap: 10px; }
.lesson-feedback-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 2.375rem; padding: 0 1.15rem;
  border-radius: var(--pill); border: 1px solid var(--hairline);
  background: var(--card); font-size: .94rem; font-weight: 700;
  transition: border-color .2s, background .2s, color .2s;
}
.lesson-feedback-btn svg { width: 15px; height: 15px; }
.lesson-feedback-btn:hover:not(:disabled) { border-color: var(--ink); }
.lesson-feedback-btn.is-chosen { background: var(--badge-purple); border-color: var(--purple); color: var(--purple); }
.lesson-feedback-btn:disabled { cursor: default; }
.lesson-feedback.has-voted .lesson-feedback-btn:not(.is-chosen) { opacity: .5; }
.lesson-feedback-thanks { margin-top: 12px; font-size: 15px; color: var(--ink-60); }

/* finish block */
.lesson-finish { margin: 46px 0 0; text-align: center; }
.lesson-finish-context { font-size: 14.5px; color: var(--ink-60); margin-bottom: 12px; }
.lesson-finish-cta { margin: 0 auto; }
.lesson-finish-check { display: inline-flex; width: 16px; height: 16px; }
.lesson-finish-check svg { width: 16px; height: 16px; }
.lesson-finish-meta { margin-top: 12px; font-size: 14.5px; color: var(--ink-40); display: flex; justify-content: center; gap: 8px; align-items: center; }

/* prev / next cards */
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 0; }
.lesson-nav-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 18px 22px; text-decoration: none; text-align: left; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.lesson-nav-card:hover:not(.is-disabled) { border-color: rgba(16,16,16,.18); box-shadow: var(--shadow-1); }
.lesson-nav-card.is-disabled { opacity: .5; cursor: default; }
.lesson-nav-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin-bottom: 4px; }
.lesson-nav-card.is-next .lesson-nav-label { color: var(--purple); }
.lesson-nav-title { font-size: 16.5px; font-weight: 700; line-height: 1.35; }

/* floating progress pill */
.progress-pill {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 90px);
  max-width: calc(100vw - 24px);
  z-index: 60; display: flex; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--pill); padding: 6px;
  box-shadow: var(--shadow-2);
  transition: transform .3s var(--ease);
}
.progress-pill.show { transform: translate(-50%, 0); }
.progress-pill a, .progress-pill button {
  font-size: 14.5px; font-weight: 700; padding: 10px 16px; border-radius: var(--pill);
  text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 52vw;
  transition: background .15s var(--ease);
}
.progress-pill a:hover { background: var(--bg); }
.progress-pill .muted { color: var(--ink-60); font-weight: 400; }
.progress-pill .done { background: var(--purple); color: #ffffff; }
.progress-pill .done:hover { background: var(--purple-hover); }

/* ================= Quiz page ================= */
.quiz-wrap { max-width: 640px; margin: 0 auto; padding: 0 32px 90px; }
.quiz-hero { padding: 34px 0 30px; }
.quiz-hero .badge { margin-bottom: 18px; }
.quiz-hero h1 { font-size: clamp(34px, 4vw, 46px); font-weight: 400; line-height: 1.15; margin-bottom: 14px; }
.quiz-hero .lede { font-size: 18px; line-height: 1.55; color: var(--ink-60); }

.quiz-progress { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.quiz-progress .count { font-size: 14.5px; font-weight: 700; color: var(--ink-60); white-space: nowrap; }
.quiz-progress .track { flex: 1; height: 5px; border-radius: 3px; background: rgba(16,16,16,.08); overflow: hidden; }
.quiz-progress .track .fill { display: block; height: 100%; width: 0%; border-radius: 3px; background: var(--purple); transition: width .4s var(--ease); }

.quiz-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 30px 32px;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.quiz-card.swap { opacity: 0; transform: translateY(6px); }
.quiz-card .q { font-size: 21px; font-weight: 700; line-height: 1.35; margin-bottom: 20px; }
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px;
  text-align: left; font-size: 16px; line-height: 1.45;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 14px 16px; width: 100%;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.opt .key {
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  border: 1px solid rgba(16,16,16,.32);
  font-size: 12.5px; font-weight: 700; color: var(--ink-60);
  display: flex; align-items: center; justify-content: center;
  margin-top: -1px;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.opt:hover:not(:disabled) { border-color: var(--purple); }
.opt:hover:not(:disabled) .key { border-color: var(--purple); color: var(--purple); }
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--purple); background: var(--badge-purple); font-weight: 700; }
.opt.right .key { background: var(--purple); border-color: var(--purple); color: #ffffff; }
.opt.wrong { color: var(--ink-60); border-color: rgba(16,16,16,.35); }
.opt.wrong .key { border-color: rgba(16,16,16,.42); color: var(--ink); }
.opt.faded { opacity: .7; }

.fb { margin-top: 18px; padding: 15px 17px; border-radius: var(--r-md); background: var(--bg); font-size: 15.5px; line-height: 1.55; color: var(--ink-60); }
.fb strong { color: var(--ink); }
.quiz-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 20px; min-height: 46px; }

.result-head { text-align: center; padding: 6px 0 26px; }
.result-head .score { font-size: 56px; font-weight: 400; line-height: 1.1; }
.result-head .score strong { color: var(--purple); font-weight: 400; }
.result-head p { font-size: 17px; color: var(--ink-60); max-width: 440px; margin: 10px auto 0; }
.recap { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.recap-row { display: flex; align-items: center; gap: 13px; padding: 15px 20px; font-size: 15.5px; }
.recap-row + .recap-row { border-top: 1px solid var(--hairline-soft); }
.recap-row .rc { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; background: var(--purple); position: relative; }
.recap-row .rc::after {
  content: ""; position: absolute; left: 5.5px; top: 6px;
  width: 8px; height: 4.5px;
  border-left: 2px solid #ffffff; border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}
.recap-row.missed .rc { background: var(--card); border: 1.5px solid var(--violet); }
.recap-row.missed .rc::after { display: none; }
.recap-row .qq { color: var(--ink-60); }
.recap-row .revisit { margin-left: auto; font-size: 14.5px; font-weight: 700; color: var(--purple); text-decoration: none; white-space: nowrap; }
.recap-row .revisit:hover { color: var(--purple-hover); }
.result-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* ================= Playbook page ================= */
.playbook-layout {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 64px;
  max-width: 976px; margin: 0 auto; padding: 40px 0 120px;
}
.playbook-sidebar { position: sticky; top: 96px; align-self: start; font-size: 14.5px; }
.playbook-sidebar-back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px;
  text-decoration: none; color: var(--ink-60); font-weight: 700; margin-bottom: 22px;
  transition: color .15s var(--ease);
}
.playbook-sidebar-back:hover { color: var(--purple); }
.playbook-sidebar-back svg { width: 14px; height: 14px; }
.playbook-sidebar-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin-bottom: 12px; }
.playbook-sidebar-toc { list-style: none; display: flex; flex-direction: column; }
.playbook-sidebar-toc li { border-left: 1px solid var(--hairline-soft); }
.playbook-sidebar-toc a {
  display: block; padding: 8px 12px; margin-left: -1px;
  text-decoration: none; color: var(--ink-60);
  border-left: 2px solid transparent; line-height: 1.4;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.playbook-sidebar-toc a:hover { color: var(--ink); }
.playbook-sidebar-toc a.is-active { color: var(--ink); font-weight: 700; border-left-color: var(--purple); }

.playbook-article { max-width: 660px; }
.playbook-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-60); margin-bottom: 16px; }
.playbook-article h1 { font-size: clamp(34px, 3.8vw, 44px); font-weight: 400; line-height: 1.15; margin-bottom: 14px; }
.playbook-subtitle { font-size: 19px; line-height: 1.55; color: var(--ink-60); margin-bottom: 24px; }
.playbook-article h2 { font-size: 25px; font-weight: 400; margin: 44px 0 14px; text-wrap: balance; }
.playbook-article p { margin-bottom: 14px; font-size: 16.5px; }
.playbook-article ul, .playbook-article ol { margin: 0 0 14px 22px; }
.playbook-article li { margin-bottom: 7px; font-size: 16.5px; }

.playbook-meta { margin: 0 0 22px; display: flex; flex-direction: column; gap: 6px; }
.playbook-meta-row { display: flex; gap: 12px; font-size: 15px; color: var(--ink-60); }
.playbook-meta-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); min-width: 72px; position: relative; top: 2px; }
.playbook-lesson-link { color: var(--purple); text-decoration: none; font-weight: 700; }
.playbook-lesson-link:hover { color: var(--purple-hover); }

.playbook-takeaways {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 22px 26px; margin: 0 0 12px;
}
.playbook-takeaways-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--purple); margin-bottom: 10px; }
.playbook-takeaways ul { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.playbook-takeaways li { display: flex; gap: 11px; align-items: baseline; font-size: 16px; margin: 0; }
.playbook-takeaways li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); flex-shrink: 0; position: relative; top: -3px; }

.playbook-end { margin-top: 48px; }
.playbook-end-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin-bottom: 12px; }
.playbook-end-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.playbook-end-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 18px 22px; text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.playbook-end-card:hover { border-color: rgba(16,16,16,.18); box-shadow: var(--shadow-1); }
.playbook-end-card-title { font-size: 16.5px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
.playbook-end-card-sub { font-size: 14.5px; color: var(--ink-60); line-height: 1.45; }

/* ================= Search overlay ================= */
.search-overlay {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: rgba(16,16,16,.42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 12vh 20px 0;
}
.search-overlay.open { display: block; }
.search-box {
  max-width: 620px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.search-input-wrap { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hairline-soft); }
.search-input-wrap svg { width: 17px; height: 17px; color: var(--ink-40); flex-shrink: 0; }
.search-input { flex: 1; border: none; outline: none; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.search-input::placeholder { color: var(--ink-40); }
.search-close {
  font-size: 12px; font-weight: 700; color: var(--ink-40);
  border: 1px solid var(--hairline); border-radius: 5px; padding: 3px 8px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.search-close:hover { color: var(--ink); border-color: var(--ink); }
.search-results {
  max-height: 46vh; overflow-y: auto; padding-bottom: 6px;
  -webkit-mask-image: linear-gradient(to bottom, #101010 calc(100% - 26px), transparent);
  mask-image: linear-gradient(to bottom, #101010 calc(100% - 26px), transparent);
}
.search-result { display: block; padding: 13px 20px; text-decoration: none; transition: background .12s var(--ease); }
.search-result + .search-result { border-top: 1px solid var(--hairline-soft); }
.search-result:hover { background: var(--bg); }
.search-result.is-active { background: rgba(91,29,177,.06); box-shadow: inset 3px 0 0 var(--purple); }
.search-result-head { display: flex; align-items: center; gap: 10px; }
.search-result-course { font-size: 12.5px; font-weight: 700; color: var(--purple); }
.search-result-tag {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); background: var(--badge-lime); border-radius: 6px; padding: 2px 7px 1px;
}
.search-result-title { font-size: 16px; font-weight: 700; margin: 2px 0; }
.search-result-summary { font-size: 14.5px; color: var(--ink-60); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.search-empty { padding: 26px 20px; font-size: 15.5px; color: var(--ink-60); }
.search-suggest { padding: 18px 20px; }
.search-suggest-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40); margin-bottom: 10px; }
.search-suggest-row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-suggest-chip {
  font-size: 14px; font-weight: 700; padding: 7px 14px;
  border: 1px solid var(--hairline); border-radius: var(--pill); background: var(--card);
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.search-suggest-chip:hover { border-color: var(--purple); color: var(--purple); }
.search-didyoumean { padding: 13px 20px; font-size: 15px; color: var(--ink-60); border-bottom: 1px solid var(--hairline-soft); }
.search-didyoumean-btn { font-weight: 700; color: var(--purple); padding: 0; text-decoration: underline; }
.search-tips { display: flex; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--hairline-soft); font-size: 12.5px; color: var(--ink-40); }
.search-tips kbd { margin-right: 2px; }

/* ================= Celebrate + finale modals ================= */
.celebrate, .finale {
  position: fixed; inset: 0; z-index: 85; display: none;
  background: rgba(16,16,16,.42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.celebrate.open, .finale.open { display: flex; }
.celebrate-card, .finale-card {
  position: relative; max-width: 480px; width: 100%;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-xl);
  box-shadow: var(--shadow-2); padding: 44px 40px 36px; text-align: center;
}
.celebrate-close, .finale-close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--ink-40);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.celebrate-close:hover, .finale-close:hover { color: var(--ink); background: rgba(16,16,16,.05); }
.celebrate-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--badge-purple); color: var(--purple);
  display: flex; align-items: center; justify-content: center;
}
.celebrate-icon svg { width: 26px; height: 26px; }
.celebrate-card h2 { font-size: 28px; font-weight: 400; margin-bottom: 10px; }
.celebrate-card p { font-size: 16.5px; color: var(--ink-60); margin-bottom: 24px; }
.celebrate-actions { display: flex; flex-direction: column; gap: 10px; }
.celebrate-actions a {
  display: block; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 12px 20px; border-radius: var(--pill);
  transition: background .2s, border-color .2s, color .2s;
}
.celebrate-actions a.primary { background: var(--purple); color: #ffffff; }
.celebrate-actions a.primary:hover { background: var(--purple-hover); }
.celebrate-actions a.secondary { border: 1px solid var(--hairline); color: var(--ink); }
.celebrate-actions a.secondary:hover { border-color: var(--ink); }

.finale-emblem {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--badge-lime); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.finale-emblem svg { width: 30px; height: 30px; }
.finale-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--purple); margin-bottom: 8px; }
.finale-title { font-size: 30px; font-weight: 400; margin-bottom: 12px; }
.finale-body { font-size: 16.5px; color: var(--ink-60); margin-bottom: 26px; }
.finale-actions { display: flex; justify-content: center; }
.finale-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-piece {
  position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: .7; }
}
@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;
  }
  .confetti-piece { display: none; }
  html { scroll-behavior: auto; }
}

/* ================= Responsive ================= */
@media (max-width: 980px) {
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 860px) {
  .lesson-grid { grid-template-columns: 1fr; gap: 28px; padding: 28px 22px 160px; }
  .rail { position: static; min-width: 0; max-width: 100%; }
  .rail .course-label { display: none; }
  .rail ol { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; }
  .rail li { border-left: none; flex-shrink: 0; }
  .rail li > a { margin: 0; padding: 7px 12px; border: 1px solid var(--hairline); border-radius: var(--pill); background: var(--card); white-space: nowrap; }
  .rail li > a span:last-child { display: inline; }
  .rail .is-current { border-color: var(--purple); }
  .playbook-layout { grid-template-columns: 1fr; gap: 28px; }
  .playbook-sidebar { position: static; }
  .playbook-sidebar-toc { display: none; }
  .page, .page-narrow { padding: 0 22px; }
  .hero { padding: 60px 0 52px; }
  .learn-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 48px 28px; }
  .lesson-nav { grid-template-columns: 1fr; }
  .playbook-end-list { grid-template-columns: 1fr; }
  .footer { padding: 30px 22px 40px; }
  .taskcard { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .area-grid { grid-template-columns: 1fr; }
  .nav-inner { padding: 0 16px; }
  .nav-actions .btn-secondary { display: none; }
  .nav .btn-pill { margin-left: 6px; }
  .btn-sm { height: 2.25rem; padding: 0 .95rem; font-size: .9rem; }
  .search-trigger { min-width: 0; padding: 8px 12px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-tips { display: none; }
  .search-close { padding: 8px 12px; font-size: 13px; }
  .quiz-wrap { padding: 0 22px 70px; }
  .quiz-card { padding: 24px 20px; }
  .list-row .m .badge { display: none; }
  .progress-pill .muted { display: none; }
}

/* ================= Print ================= */
@media print {
  .nav, .footer, .progress-pill, .rail, .lesson-feedback, .lesson-nav, .lesson-finish,
  .search-overlay, .celebrate, .finale, .skip-link, .cta-band { display: none !important; }
  body { background: #ffffff; }
  .lesson-grid { display: block; padding: 0; }
  .lesson-article, .playbook-article { max-width: none; }
  a { text-decoration: none; }
}
