/*
 * course.css — illawarra.ai · From Chat-terbox to Agent Boss
 * Shared styles for all 8 course modules.
 * Depends on Google Fonts (Cormorant Garamond + Space Grotesk).
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Space+Grotesk:wght@300;400;500;600&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Brand tokens ── */
:root {
  --bg:        #0d1219;
  --bg2:       #131a24;
  --surface:   #1a2230;
  --border:    #1f2d3d;
  --text:      #e6eaf0;
  --muted:     #9aabbc;
  --micro:     0.75rem;
  --teal:      #2ec4b6;
  --teal-dim:  oklch(70% 0.17 195 / 0.15);
  --teal-mid:  oklch(70% 0.17 195 / 0.25);
  --amber:     #e8a838;
  --amber-dim: oklch(72% 0.13 68 / 0.15);
  --red-dim:   oklch(60% 0.15 25 / 0.12);
  --red:       #e87070;
  --radius:    8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
}

/* Inline links on dark backgrounds (skip nav / pill links that set their own colour) */
.page-wrap a[href]:not(.nav-btn):not(.ni-link):not(.wordmark) {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.page-wrap a[href]:not(.nav-btn):not(.ni-link):not(.wordmark):hover {
  color: oklch(82% 0.11 195);
}

/* ── Layout ── */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 0 28px 100px; }

/* ── Course bar ── */
.course-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.wordmark { display: flex; align-items: center; text-decoration: none; line-height: 0; }
.wordmark-logo { display: block; height: 1.25rem; width: auto; }
.breadcrumb { font-size: var(--micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ── Module hero ── */
.module-hero { padding: 64px 0 52px; border-bottom: 1px solid var(--border); margin-bottom: 56px; }
.stage-tag { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: var(--micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.module-hero h1 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; margin-bottom: 14px; color: var(--text); }
.module-hero h1 em { font-style: italic; color: var(--teal); }
.module-hero .subtitle { font-size: 1rem; color: var(--muted); max-width: 540px; line-height: 1.8; margin-bottom: 36px; }
.module-meta { display: flex; gap: 32px; flex-wrap: wrap; }
.meta-item { font-size: var(--micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.meta-item strong { display: block; font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.8rem; line-height: 1; color: var(--teal); letter-spacing: 0; text-transform: none; margin-bottom: 2px; }

/* ── Section labels ── */
.section-eyebrow { font-size: var(--micro); letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; font-weight: 500; }
.section-title { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 2rem; line-height: 1.12; color: var(--text); margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
section { margin-bottom: 64px; }

/* ── Outcomes ── */
.outcomes-box { background: var(--teal-dim); border: 1px solid oklch(70% 0.17 195 / 0.25); border-radius: var(--radius); padding: 26px 30px; }
.outcomes-box .ob-label { font-size: var(--micro); letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin-bottom: 16px; font-weight: 500; }
.outcomes-box ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.outcomes-box li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; color: var(--muted); line-height: 1.65; }
.outcomes-box li::before { content: '◆'; color: var(--teal); font-size: 0.55rem; flex-shrink: 0; margin-top: 6px; }
.outcomes-box li strong { color: var(--text); font-weight: 400; }

/* ── What you'll need ── */
.needs-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.needs-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 18px 28px; display: flex; align-items: center; gap: 10px; }
.needs-header .nh-diamond { width: 7px; height: 7px; background: var(--amber); transform: rotate(45deg); flex-shrink: 0; }
.needs-header h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: var(--micro); letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin: 0; }
.needs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--border); }
/* Module “what you’ll need” blocks: three cards on row one, optional row full width */
@media (min-width: 601px) {
  .needs-grid:has(> .needs-item.optional) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.needs-item { background: var(--surface); padding: 18px 22px; display: flex; flex-direction: column; gap: 5px; }
.needs-item .ni-label { font-size: var(--micro); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.needs-item .ni-title { font-size: 0.95rem; color: var(--text); font-weight: 400; line-height: 1.4; }
.needs-item .ni-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.needs-item .ni-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.needs-item .ni-link { font-size: var(--micro); font-weight: 500; color: var(--teal); text-decoration: none; border: 1px solid oklch(70% 0.17 195 / 0.3); border-radius: 20px; padding: 3px 10px; transition: background .15s, border-color .15s; white-space: nowrap; }
.needs-item .ni-link:hover { background: var(--teal-dim); border-color: var(--teal); }
.needs-item.optional { opacity: .75; grid-column: 1 / -1; }
.needs-item.optional .ni-label::after { content: ' · optional'; color: var(--muted); opacity: .6; }

/* ── Lesson card ── */
.lesson { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 38px 42px; margin-bottom: 24px; }
.lesson-eyebrow { font-size: var(--micro); letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; font-weight: 500; }
.lesson h2 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.75rem; line-height: 1.15; color: var(--text); margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.lesson h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin: 30px 0 12px; }
.lesson p { font-size: 0.98rem; color: var(--muted); line-height: 1.85; margin-bottom: 14px; }
.lesson p strong { color: var(--text); font-weight: 400; }
.lesson p:last-child { margin-bottom: 0; }
.lesson ul, .lesson ol { list-style: none; padding: 0; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.lesson ul li, .lesson ol li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.98rem; color: var(--muted); line-height: 1.65; counter-increment: lesson-counter; }
.lesson ul li::before { content: '◆'; color: var(--teal); font-size: 0.5rem; flex-shrink: 0; margin-top: 7px; }
.lesson ol { counter-reset: lesson-counter; }
.lesson ol li::before { content: counter(lesson-counter) '.'; color: var(--teal); font-size: 0.78rem; font-weight: 500; flex-shrink: 0; min-width: 18px; margin-top: 2px; }
/* Prompt-tester API body uses .pt-ul / .pt-ol; undo lesson ::before + flex list layout on ul only */
.lesson .pt-response-body .pt-ul,
.lesson .pt-response-body .pt-ol {
  display: block;
  margin: 0.4rem 0 0.65rem;
  padding-left: 1.2rem;
  gap: 0;
}
.lesson .pt-response-body .pt-ul { list-style: disc; }
.lesson .pt-response-body .pt-ol { list-style: none; }
.lesson .pt-response-body .pt-ul li,
.lesson .pt-response-body .pt-ol li {
  display: list-item;
  counter-increment: none;
  align-items: unset;
  gap: unset;
}
.lesson .pt-response-body .pt-ul li::before { content: none; }
.lesson .pt-response-body { counter-reset: pt-ol-seq; }
.lesson .pt-response-body ol.pt-ol:not(ol.pt-ol ol.pt-ol) { list-style: none; padding-left: 0; margin-left: 0; }
.lesson .pt-response-body ol.pt-ol:not(ol.pt-ol ol.pt-ol) > li {
  counter-increment: pt-ol-seq;
  position: relative;
  list-style: none;
  padding-left: 1.75em;
  margin-left: 0;
}
.lesson .pt-response-body ol.pt-ol:not(ol.pt-ol ol.pt-ol) > li::before {
  content: counter(pt-ol-seq) ". ";
  position: absolute;
  left: 0;
  width: 1.55em;
  text-align: right;
  font-weight: 500;
  color: var(--muted);
}
.lesson .pt-response-body ol.pt-ol ol.pt-ol { counter-reset: pt-ol-nest; list-style: none; margin: 0.35rem 0 0; padding-left: 0; }
.lesson .pt-response-body ol.pt-ol ol.pt-ol > li {
  counter-increment: pt-ol-nest;
  position: relative;
  list-style: none;
  padding-left: 1.75em;
}
.lesson .pt-response-body ol.pt-ol ol.pt-ol > li::before {
  content: counter(pt-ol-nest) ". ";
  position: absolute;
  left: 0;
  width: 1.55em;
  text-align: right;
  font-weight: 500;
  color: var(--muted);
}
.lesson li strong { color: var(--text); font-weight: 400; }

/* Section-based lessons (Modules 3+): same copy/list treatment as .lesson; skip feedback section */
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 30px 0 12px;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) p {
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 14px;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) p strong { color: var(--text); font-weight: 400; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) p:last-child { margin-bottom: 0; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) ul,
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) ol {
  list-style: none;
  padding: 0;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) ul li,
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) ol li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.65;
  counter-increment: lesson-counter;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) ul li::before {
  content: '◆';
  color: var(--teal);
  font-size: 0.5rem;
  flex-shrink: 0;
  margin-top: 7px;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) ol { counter-reset: lesson-counter; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) ol li::before {
  content: counter(lesson-counter) '.';
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 18px;
  margin-top: 2px;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body .pt-ul,
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body .pt-ol {
  display: block;
  margin: 0.4rem 0 0.65rem;
  padding-left: 1.2rem;
  gap: 0;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body .pt-ul { list-style: disc; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body .pt-ol { list-style: none; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body .pt-ul li,
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body .pt-ol li {
  display: list-item;
  counter-increment: none;
  align-items: unset;
  gap: unset;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body .pt-ul li::before { content: none; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body { counter-reset: pt-ol-seq; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body ol.pt-ol:not(ol.pt-ol ol.pt-ol) { list-style: none; padding-left: 0; margin-left: 0; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body ol.pt-ol:not(ol.pt-ol ol.pt-ol) > li {
  counter-increment: pt-ol-seq;
  position: relative;
  list-style: none;
  padding-left: 1.75em;
  margin-left: 0;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body ol.pt-ol:not(ol.pt-ol ol.pt-ol) > li::before {
  content: counter(pt-ol-seq) ". ";
  position: absolute;
  left: 0;
  width: 1.55em;
  text-align: right;
  font-weight: 500;
  color: var(--muted);
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body ol.pt-ol ol.pt-ol { counter-reset: pt-ol-nest; list-style: none; margin: 0.35rem 0 0; padding-left: 0; }
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body ol.pt-ol ol.pt-ol > li {
  counter-increment: pt-ol-nest;
  position: relative;
  list-style: none;
  padding-left: 1.75em;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .pt-response-body ol.pt-ol ol.pt-ol > li::before {
  content: counter(pt-ol-nest) ". ";
  position: absolute;
  left: 0;
  width: 1.55em;
  text-align: right;
  font-weight: 500;
  color: var(--muted);
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) li strong { color: var(--text); font-weight: 400; }

/* ── Callouts ── */
.callout { border-radius: var(--radius); padding: 18px 22px; margin: 22px 0; font-size: 0.95rem; line-height: 1.75; color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.callout strong { color: var(--text); font-weight: 400; }
.callout.tip  { background: var(--teal-dim);  border-left: 2px solid var(--teal); }
.callout.warn { background: var(--amber-dim); border-left: 2px solid var(--amber); }
.callout.good { background: var(--teal-dim);  border-left: 2px solid var(--teal); }
.callout-label { font-size: var(--micro); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.callout.tip  .callout-label { color: var(--teal); }
.callout.warn .callout-label { color: var(--amber); }
.callout.good .callout-label { color: var(--teal); }

/* BEM-style callouts (Modules 3+) — mirror .tip / .warn */
.callout.callout-tip { background: var(--teal-dim); border-left: 2px solid var(--teal); }
.callout.callout-warning { background: var(--amber-dim); border-left: 2px solid var(--amber); }
.callout.callout-tip .callout-label { color: var(--teal); }
.callout.callout-warning .callout-label { color: var(--amber); }

/* Section-level ol/ul flex layout breaks normal numbered lists inside callouts (each text node becomes a flex item). */
.page-wrap .callout ol,
.page-wrap .callout ul {
  display: block !important;
  padding-left: 1.35rem;
  margin: 0.75rem 0 0;
  gap: 0 !important;
}
.page-wrap .callout ol {
  list-style: decimal !important;
}
.page-wrap .callout ul {
  list-style: disc !important;
}
.page-wrap .callout ol li,
.page-wrap .callout ul li {
  display: list-item !important;
  align-items: unset !important;
  gap: unset !important;
  counter-increment: none !important;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.75;
}
.page-wrap .callout ol li:last-child,
.page-wrap .callout ul li:last-child {
  margin-bottom: 0;
}
.page-wrap .callout ol li::before,
.page-wrap .callout ul li::before {
  content: none !important;
}

/* ── Comparison table ── */
.compare-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem; }
.compare-table th { background: var(--bg); color: var(--teal); padding: 12px 16px; text-align: left; font-size: var(--micro); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.compare-table td { padding: 12px 16px; border-bottom: 1px solid oklch(30% 0.02 240 / 0.5); vertical-align: top; color: var(--muted); line-height: 1.65; }
.compare-table td strong { color: var(--text); font-weight: 400; }
.compare-table tr:last-child td { border-bottom: none; }

/* ── Prompt code block ── */
.prompt-example { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin: 18px 0; font-family: 'Courier New', monospace; font-size: 0.9rem; line-height: 1.75; color: var(--muted); }
.prompt-label { font-family: 'Space Grotesk', sans-serif; font-size: var(--micro); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.prompt-highlight { color: var(--teal); }

/* Prompt example — alternate markup (Modules 3+) */
.prompt-example-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 18px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--muted);
}
.peb-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.peb-body { white-space: pre-wrap; }

/* ── Before / After ── */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.ba-card { border-radius: var(--radius); padding: 20px 22px; font-size: 0.87rem; line-height: 1.65; border: 1px solid var(--border); }
.ba-card.before { background: var(--red-dim); border-color: oklch(60% 0.15 25 / 0.3); }
.ba-card.after  { background: var(--teal-dim); border-color: oklch(70% 0.17 195 / 0.3); }
.ba-label { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.ba-card.before .ba-label { color: var(--red); }
.ba-card.after  .ba-label { color: var(--teal); }
.ba-card p { color: var(--muted); margin: 0; }

/* Before/after — alternate class names (Modules 3+) */
.before-after-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.ba-item {
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 0.87rem;
  line-height: 1.65;
  border: 1px solid var(--border);
}
.ba-item:has(> .ba-label.before) { background: var(--red-dim); border-color: oklch(60% 0.15 25 / 0.3); }
.ba-item:has(> .ba-label.after) { background: var(--teal-dim); border-color: oklch(70% 0.17 195 / 0.3); }
.ba-item .ba-label { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.ba-item:has(> .ba-label.before) .ba-label { color: var(--red); }
.ba-item:has(> .ba-label.after) .ba-label { color: var(--teal); }
.ba-item p { color: var(--muted); margin: 0; }

/* ── Platform grid ── */
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.platform-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.platform-card .p-name { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.25rem; color: var(--text); margin-bottom: 2px; }
.platform-card .p-maker { font-size: var(--micro); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; font-weight: 500; }
.platform-card .p-desc { font-size: 0.92rem; color: var(--muted); line-height: 1.6; }
.platform-card .p-free { display: inline-block; margin-top: 12px; background: var(--teal-dim); color: var(--teal); font-size: var(--micro); font-weight: 500; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 20px; border: 1px solid oklch(70% 0.17 195 / 0.25); }

/* ── Diamond divider ── */
.diamond-divider { display: flex; justify-content: center; margin: 48px 0; color: var(--teal); font-size: 0.7rem; letter-spacing: 8px; opacity: 0.6; }

/* ── Lesson overview grid (Modules 3+) ── */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.lesson-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.lc-number {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--teal);
  opacity: 0.9;
  flex-shrink: 0;
  padding-top: 2px;
}
.lc-body { min-width: 0; flex: 1; }
.lc-title {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 6px;
}
.lc-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* Inline reflect prompt inside lessons (Modules 3+) */
.reflection-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}
.reflection-box .rb-label {
  font-size: var(--micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.reflection-box p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
}
.compare-table-wrap .compare-table { margin: 0; }

/* Numbered exercise steps (Modules 3+) */
.exercise-block {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.exercise-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.exercise-step:last-child { border-bottom: none; }
.es-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 500;
  flex-shrink: 0;
}
.es-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.es-content > strong {
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
}
.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .exercise-block .es-content p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.page-wrap > section:has(> h2.section-title):not(:has(> .reflection)):not(:has(> .quiz-wrap)):not(:has(> .exercise)):not(:has(> .lesson)) .reflection-box p {
  margin-bottom: 0;
}

/* ── Knowledge check ── */
.quiz-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.quiz-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 22px 30px; }
.quiz-header .qh-label { font-size: var(--micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; font-weight: 500; }
.quiz-header h2 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.6rem; color: var(--text); }
.quiz-header p { font-size: 0.95rem; color: var(--muted); margin-top: 4px; }
.quiz-body { padding: 28px 30px; }
.question { margin-bottom: 34px; }
.question:last-child { margin-bottom: 0; }
.q-text { font-size: 0.98rem; font-weight: 400; color: var(--text); margin-bottom: 14px; line-height: 1.6; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.95rem; color: var(--muted); line-height: 1.5; transition: border-color .15s, background .15s; user-select: none; background: var(--bg); }
.option:hover { border-color: var(--teal); background: var(--teal-dim); color: var(--text); }
.option input[type=radio] { accent-color: var(--teal); margin-top: 2px; flex-shrink: 0; }
.option.correct-answer { border-color: var(--teal) !important; background: var(--teal-dim) !important; color: var(--text); }
.option.wrong-answer   { border-color: var(--red) !important;  background: var(--red-dim) !important; }
.feedback { display: none; margin-top: 10px; font-size: 0.9rem; padding: 10px 14px; border-radius: var(--radius); line-height: 1.65; }
.feedback.correct { background: var(--teal-dim); color: var(--teal); border-left: 2px solid var(--teal); display: block; }
.feedback.wrong   { background: var(--red-dim);  color: var(--red);  border-left: 2px solid var(--red);  display: block; }
.check-btn { background: transparent; color: var(--teal); border: 1px solid oklch(70% 0.17 195 / 0.4); padding: 8px 20px; border-radius: var(--radius); font-family: 'Space Grotesk', sans-serif; font-size: var(--micro); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; margin-top: 12px; transition: background .15s, border-color .15s; }
.check-btn:hover { background: var(--teal-dim); border-color: var(--teal); }

/* ── Exercise ── */
.exercise { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.exercise-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 22px 30px; }
.exercise-header .ex-label { font-size: var(--micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; font-weight: 500; }
.exercise-header h2 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.6rem; color: var(--text); }
.exercise-body { padding: 30px 32px; }
.exercise-body p { font-size: 0.98rem; color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.exercise-body p strong { color: var(--text); font-weight: 400; }
.exercise-body h3 { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin: 26px 0 14px; }
.template-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin: 16px 0; }
.template-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.template-field:last-of-type { margin-bottom: 24px; }
.template-field label { font-size: var(--micro); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.template-field input, .template-field textarea { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; font-family: 'Space Grotesk', sans-serif; font-size: 0.87rem; font-weight: 300; color: var(--text); width: 100%; resize: vertical; transition: border-color .15s; }
.template-field input::placeholder, .template-field textarea::placeholder { color: var(--muted); opacity: .6; }
.template-field input:focus, .template-field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px oklch(70% 0.17 195 / 0.1); }
.generate-btn { background: var(--teal); color: var(--bg); border: none; padding: 11px 26px; border-radius: var(--radius); font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: opacity .15s; }
.generate-btn:hover { opacity: .85; }
.prompt-output-hint { font-size: 0.88rem; color: var(--muted); line-height: 1.7; margin: 0 0 10px; max-width: 52rem; }
.prompt-output-hint strong { color: var(--text); font-weight: 400; }
.generated-prompt-wrap { display: none; position: relative; margin-top: 14px; }
.generated-prompt-wrap.has-content { display: block; }
.generated-prompt-wrap .generated-prompt {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 44px 20px 24px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-wrap;
}
.generated-prompt-copy-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--teal);
  background: var(--surface);
  border: 1px solid oklch(70% 0.17 195 / 0.35);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s ease, border-color 0.15s ease;
  pointer-events: none;
}
.generated-prompt-wrap.has-content:hover .generated-prompt-copy-icon,
.generated-prompt-wrap.has-content:focus-within .generated-prompt-copy-icon {
  opacity: 1;
}
.generated-prompt.is-ready { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.generated-prompt-wrap.has-content:hover .generated-prompt.is-ready,
.generated-prompt-wrap.has-content:focus-within .generated-prompt.is-ready {
  border-color: oklch(70% 0.17 195 / 0.55);
  box-shadow: 0 0 0 3px oklch(70% 0.17 195 / 0.12);
}
.generated-prompt.is-ready:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px oklch(70% 0.17 195 / 0.18); }
.prompt-copy-status { min-height: 1.35em; font-size: 0.82rem; color: var(--teal); margin-top: 10px; font-weight: 500; }
.prompt-copy-status.is-error { color: oklch(62% 0.2 25); font-weight: 400; }
.exercise-body ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.exercise-body li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.98rem; color: var(--muted); line-height: 1.65; }
.exercise-body li::before { content: '◆'; color: var(--teal); font-size: 0.5rem; flex-shrink: 0; margin-top: 7px; }
.exercise-body li strong { color: var(--text); font-weight: 400; }

/* ── Reflection ── */
.reflection { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.reflection-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 22px 30px; }
.reflection-header .r-label { font-size: var(--micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.reflection-header h2 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.6rem; color: var(--text); }
.reflection-body { padding: 28px 32px; }
.reflection-body p { font-size: 0.98rem; color: var(--muted); line-height: 1.8; margin-bottom: 6px; }
.reflection-body p strong { color: var(--text); font-weight: 400; }
.reflection-body .r-sub { font-size: 0.9rem; color: var(--muted); opacity: .85; margin-bottom: 28px; }
/* Tighter gap before textarea: helper line directly above a field, or intro before reflection questions */
.reflection-body > .r-sub:first-child { margin-bottom: 12px; }
.reflection-body .r-sub:has(+ textarea) { margin-bottom: 10px; }
.reflection-body textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-family: 'Space Grotesk', sans-serif; font-size: 0.87rem; font-weight: 300; color: var(--text); resize: vertical; min-height: 90px; margin: 8px 0 24px; transition: border-color .15s; }
.reflection-body textarea:focus { outline: none; border-color: var(--teal); }

.reflection-feedback-fields { margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--border); }
.reflection-feedback-fields .reflection-feedback-heading { font-size: 0.92rem; color: var(--text); margin: 0 0 10px; }
.reflection-feedback-fields .reflection-feedback-heading strong { font-weight: 400; color: var(--text); }
.reflection-feedback-fields > p:not(.r-sub):not(.reflection-feedback-heading) { margin-bottom: 6px; }
.reflection-radio-group {
  border: none;
  margin: 0 0 22px;
  padding: 0;
  min-width: 0;
}
.reflection-radio-legend {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 400;
  padding: 0;
  margin: 0 0 12px;
  line-height: 1.5;
}
.reflection-radio-legend strong { font-weight: 400; color: var(--text); }
.reflection-radio-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.87rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.55;
}
.reflection-radio-row:last-of-type { margin-bottom: 0; }
.reflection-radio-row input[type="radio"] {
  flex-shrink: 0;
  margin: 0.28em 0 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--teal);
}
.reflection-radio-text { flex: 1; min-width: 0; color: var(--muted); }
.reflection-radio-row:hover .reflection-radio-text { color: var(--text); }
.reflection-tooling,
.reflection-notes { margin-bottom: 8px; }

.reflection-submit-wrap { position: relative; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.reflection-notice { font-size: var(--micro); color: var(--muted); line-height: 1.65; margin: 0 0 16px; opacity: 0.95; }
.reflection-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.reflection-submit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal); color: var(--bg); border: 1px solid var(--teal);
  padding: 12px 22px; border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif; font-size: var(--micro); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: opacity .15s;
}
.reflection-submit-btn:hover:not(:disabled) { opacity: 0.9; }
.reflection-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.reflection-submit-status { margin-top: 12px; font-size: 0.8rem; line-height: 1.5; min-height: 1.25em; color: var(--muted); }
.reflection-submit-status.is-success { color: var(--teal); }
.reflection-submit-status.is-error { color: oklch(62% 0.2 25); }

/* ── Module nav ── */
.module-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--border); }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--teal); text-decoration: none; padding: 10px 20px; border-radius: var(--radius); font-size: var(--micro); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid oklch(70% 0.17 195 / 0.35); transition: background .15s, border-color .15s; }
.nav-btn:hover { background: var(--teal-dim); border-color: var(--teal); }
.nav-btn.primary { background: var(--teal); color: var(--bg); border-color: var(--teal); }
.nav-btn.primary:hover { opacity: .85; }
.progress-indicator { font-size: var(--micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ── Footer ── */
.page-footer { margin-top: 80px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: var(--micro); color: var(--muted); letter-spacing: 0.04em; font-weight: 500; }

/* ── Shared quiz JS helper (used inline) ── */

/* ── Responsive ── */
@media (max-width: 600px) {
  .page-wrap { padding: 0 18px 60px; }
  .lesson { padding: 26px 22px; }
  .ba-grid { grid-template-columns: 1fr; }
  .before-after-grid { grid-template-columns: 1fr; }
  .lesson-grid { grid-template-columns: 1fr; }
  .module-nav { flex-direction: column; gap: 14px; }
  .needs-grid { grid-template-columns: 1fr; }
}
