/* ============================================================
   Slap Post — Learning Library ("The Free X Growth Course").
   Sits on top of /_shared.css (palette, nav, footer, buttons,
   texture) and /tools/tools.css (panel, inputs, result, bars,
   tool-cta, seo, toast — reused by the per-lesson interactive
   tools). This file only adds course-specific furniture.
   ============================================================ */

.course-main { padding: 30px 0 90px; position: relative; z-index: 2; }
.wrap-learn { max-width: 880px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* ---------- Hand-drawn doodle (vintage ink cartoon) ---------- */
/* color = the "ink"; shapes use stroke/fill="currentColor" so it
   crosses the <use> shadow boundary (class selectors don't). */
.doodle { display: block; width: 100%; height: auto; color: var(--ink); }
.doodle-frame {
  position: relative; background: var(--surface-1);
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 14px; overflow: hidden;
}
.doodle-frame::after {
  content: ""; position: absolute; inset: 6px; border: 1.5px dashed rgba(197,247,79,0.22);
  border-radius: 10px; pointer-events: none;
}
/* the "ink" + "paper" tokens the SVGs reference */
:root { --ink: #F2F4EC; --paper: #14160F; --doodle-accent: #C5F74F; }

/* ======================= COURSE HUB ======================= */
.course-hero { text-align: center; max-width: 760px; margin: 8px auto 12px; }
.course-hero .label { display: inline-block; margin-bottom: 16px; }
.course-hero h1 {
  font-size: clamp(38px, 6.5vw, 68px); line-height: 1.0; letter-spacing: -0.035em;
  font-weight: 900; margin: 0 0 16px;
}
.course-hero h1 .accent { color: var(--accent); }
.course-hero .lede { color: var(--text-2); font-size: 18px; line-height: 1.55; margin: 0 auto 8px; max-width: 600px; }
.course-hero .worth {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 16px;
}
.course-hero .worth b { color: var(--accent); }
.course-hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

.course-stats { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin: 34px auto 6px; }
.course-stats .s { text-align: center; }
.course-stats .s .n { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; color: var(--accent); }
.course-stats .s .l { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-top: 2px; }

/* lesson index cards */
.lesson-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; margin: 40px auto 0; }
.lesson-card {
  display: flex; gap: 18px; align-items: center; background: var(--surface-1);
  border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); padding: 18px 20px;
  transition: transform .12s, border-color .12s;
}
.lesson-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.lesson-card .num {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 17px; color: var(--accent-ink);
  background: var(--accent); border-radius: 12px;
}
.lesson-card .art { flex: none; width: 72px; height: 72px; }
.lesson-card .art svg { width: 100%; height: 100%; }
/* .lc-body (NOT .meta — that collides with _shared.css `main .meta`,
   which forces mono + uppercase on article datelines). */
.lesson-card .lc-body { flex: 1; min-width: 0; }
.lesson-card .lc-body h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -0.015em; font-family: var(--ui); text-transform: none; }
.lesson-card .lc-body p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; font-family: var(--ui); text-transform: none; letter-spacing: normal; }
.lesson-card .lc-body .tags { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.lesson-card .lc-body .tags .tool-tag { color: var(--accent); }

/* ====================== LESSON PAGE ====================== */
.lesson-top { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); letter-spacing: 0.05em; margin-bottom: 10px; }
.lesson-top a { color: var(--text-3); }
.lesson-top a:hover { color: var(--accent); }

.lesson-hero { display: grid; grid-template-columns: 1fr 230px; gap: 30px; align-items: center; margin: 6px 0 30px; }
.lesson-hero .num-pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.lesson-hero .num-pill .dotbar { width: 22px; height: 2px; background: var(--accent); display: inline-block; }
.lesson-hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 900; margin: 0 0 14px; }
.lesson-hero h1 .accent { color: var(--accent); }
.lesson-hero .lede { color: var(--text-2); font-size: 17px; line-height: 1.6; margin: 0; }
.lesson-hero .art .doodle-frame { padding: 12px; }
@media (max-width: 720px) {
  .lesson-hero { grid-template-columns: 1fr; gap: 18px; }
  .lesson-hero .art { max-width: 200px; }
}

/* prose body */
.lesson-prose { max-width: 720px; }
.lesson-prose h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 800; margin: 40px 0 12px; }
.lesson-prose h2 .accent { color: var(--accent); }
.lesson-prose h3 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.lesson-prose p { color: var(--text); font-size: 16.5px; line-height: 1.7; margin: 0 0 16px; }
.lesson-prose p.sub { color: var(--text-2); }
.lesson-prose ul, .lesson-prose ol { color: var(--text); font-size: 16.5px; line-height: 1.7; padding-left: 22px; margin: 0 0 16px; }
.lesson-prose li { margin: 7px 0; }
.lesson-prose li::marker { color: var(--accent); }
.lesson-prose a.inline { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(197,247,79,0.35); }
.lesson-prose a.inline:hover { border-bottom-color: var(--accent); }

/* key-idea callout */
.callout {
  background: radial-gradient(420px 160px at 100% 0%, rgba(197,247,79,0.08), transparent 60%), var(--surface-1);
  border: 1px solid var(--hairline); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); padding: 18px 20px; margin: 22px 0;
}
.callout .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 6px; }
.callout p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); }

/* pull quote with attribution */
.quote { margin: 24px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); }
.quote blockquote { margin: 0; font-size: 19px; line-height: 1.5; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 14px; color: var(--text-2); }
.quote cite a { color: var(--accent); }

/* expert citation cards */
.expert-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0 6px; }
.expert {
  display: flex; gap: 14px; background: var(--surface-1); border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg); padding: 16px 18px;
}
.expert .av {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: var(--accent-ink); background: var(--accent);
}
.expert .body { flex: 1; min-width: 0; }
.expert .who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.expert .who .nm { font-weight: 800; font-size: 15.5px; }
.expert .who .hd { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.expert .who .hd:hover { text-decoration: underline; }
.expert .what { color: var(--text-2); font-size: 14.5px; line-height: 1.55; margin: 0 0 8px; }
.expert .what b { color: var(--text); }
.expert .src { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.expert .src a { color: var(--text-3); border-bottom: 1px solid var(--hairline); }
.expert .src a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* video embeds */
.videos { margin: 22px 0; }
.videos .vh { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 12px; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.vid { background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); overflow: hidden; }
.vid .frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.vid .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid .cap { padding: 12px 14px; }
.vid .cap .t { font-size: 14px; font-weight: 700; line-height: 1.35; margin: 0 0 4px; }
.vid .cap .by { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.vid .cap .by a { color: var(--accent); }

/* numbered steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.steps li {
  counter-increment: step; position: relative; padding: 14px 16px 14px 56px;
  background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--r-md);
  color: var(--text); font-size: 15.5px; line-height: 1.55;
}
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 13px;
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px;
  background: var(--surface-3); color: var(--accent); font-family: var(--mono); font-weight: 700; font-size: 14px;
}
.steps li b { color: var(--text); }

/* algorithm "Heavy Ranker weights" table */
.weights { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 16px 20px; margin: 20px 0; }
.weights .wh { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 6px; }
.weights .wlist { list-style: none; padding: 0; margin: 0; }
.weights .wlist li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--hairline-soft); }
.weights .wlist li:last-child { border-bottom: 0; }
.weights .wl { color: var(--text-2); font-size: 14.5px; line-height: 1.4; }
.weights .wv { flex: none; font-family: var(--mono); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.weights .wv.pos { color: var(--accent); }
.weights .wv.neg { color: var(--danger); }

/* takeaways checklist */
.takeaways { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 20px 22px; margin: 26px 0; }
.takeaways h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.takeaways ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.takeaways li { position: relative; padding-left: 30px; color: var(--text); font-size: 15px; line-height: 1.5; }
.takeaways li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent-ink); background: var(--accent); width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 900; }

/* worked before→after examples ("see it work") */
.examples { margin: 20px 0; display: flex; flex-direction: column; gap: 16px; }
.ex { background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); overflow: hidden; }
.ex .ba { display: grid; grid-template-columns: 1fr 1fr; }
.ex .ba > div { padding: 15px 18px; }
.ex .ba .bad { border-right: 1px solid var(--hairline); background: rgba(255,77,77,0.03); }
.ex .ba .good { background: rgba(197,247,79,0.04); }
.ex .ba .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 8px; display: block; font-weight: 700; }
.ex .ba .bad .tag { color: var(--danger); }
.ex .ba .good .tag { color: var(--accent); }
.ex .ba .txt { font-size: 15px; line-height: 1.5; color: var(--text); }
.ex .why { padding: 12px 18px; border-top: 1px solid var(--hairline); background: var(--surface-2); font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.ex .why b { color: var(--text); }
.ex .why::before { content: "→ "; color: var(--accent); font-weight: 700; }
@media (max-width: 560px) { .ex .ba { grid-template-columns: 1fr; } .ex .ba .bad { border-right: 0; border-bottom: 1px solid var(--hairline); } }

/* common mistakes */
.mistakes { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 9px; }
.mistakes li { position: relative; padding: 12px 16px 12px 44px; background: var(--surface-1); border: 1px solid var(--hairline-soft); border-left: 3px solid var(--danger); border-radius: var(--r-md); font-size: 15px; line-height: 1.5; color: var(--text); }
.mistakes li::before { content: "✕"; position: absolute; left: 16px; top: 11px; color: var(--danger); font-weight: 900; font-size: 15px; }
.mistakes li b { color: var(--text); }

/* "do this now" callout heading helper reused via .lesson-prose .steps */

/* the interactive tool block heading */
.lesson-tool { margin: 36px 0 0; }
.lesson-tool .th { text-align: center; max-width: 600px; margin: 0 auto 18px; }
.lesson-tool .th .tag { display: inline-block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 8px; }
.lesson-tool .th h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 8px; }
.lesson-tool .th p { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0; }

/* card preview (downloadable) */
.card-preview { display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
.card-preview canvas { width: 100%; max-width: 320px; height: auto; border-radius: var(--r-md); border: 1px solid var(--hairline); }

/* lesson prev/next nav */
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 46px auto 0; max-width: 720px; }
.lesson-nav a {
  display: flex; flex-direction: column; gap: 4px; background: var(--surface-1);
  border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); padding: 16px 18px;
  transition: border-color .12s, transform .12s;
}
.lesson-nav a:hover { border-color: var(--accent); transform: translateY(-2px); }
.lesson-nav a.next { text-align: right; }
.lesson-nav .dir { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.lesson-nav .ttl { font-size: 15.5px; font-weight: 700; color: var(--text); }
.lesson-nav a.disabled { opacity: 0.35; pointer-events: none; }
@media (max-width: 560px) { .lesson-nav { grid-template-columns: 1fr; } }

/* progress rail (top of lesson) */
.progress-rail { display: flex; gap: 7px; align-items: center; justify-content: center; margin: 0 0 22px; }
.progress-rail .dot { width: 28px; height: 5px; border-radius: 999px; background: var(--surface-3); }
.progress-rail .dot.on { background: var(--accent); }
.progress-rail .dot.cur { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* source / disclaimer note */
.source-note { font-size: 13px; color: var(--text-3); line-height: 1.6; margin-top: 8px; }
.source-note a { color: var(--text-2); border-bottom: 1px solid var(--hairline); }
.source-note a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .course-stats { gap: 18px; }
  .lesson-card { gap: 14px; padding: 16px; }
  .lesson-card .art { width: 56px; height: 56px; }
}
