/* ============================================================
   Creator's Hearth — Fiction 101 / Learn
   Shared stylesheet for the course.
   Extends the site's core design tokens; adds course-specific
   components (module grid, progress bar, exercise, quiz, certificate).
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS (mirrors the main site; do not drift) ── */
:root {
  --cream:       #FAF6EF;
  --cream-dark:  #F2EBE0;
  --parchment:   #EDE3D5;
  --brown-deep:  #2A1F14;
  --brown-mid:   #5C3D2E;
  --rust:        #8C3A2E;
  --rust-light:  #B85C4A;
  --amber:       #C4893A;
  --amber-light: #E8B86D;
  --text:        #3A2A1A;
  --text-soft:   #7A6655;
  --border:      #DDD0C0;
  --card:        #FFFAF4;
  --shadow:      rgba(42,31,20,0.10);

  /* course-specific tokens */
  --ember-glow:  rgba(232,184,109,0.28);
  --success:     #5A7A4C;
  --success-soft:#E8EEDD;
  --warn:        #A65A2E;
  --warn-soft:   #F3E4D4;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', Georgia, serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
}

/* ── SITE HEADER (shared with main site) ── */
header.site-header {
  background: var(--brown-deep);
  border-bottom: 2px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-text { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.25rem; color: var(--cream); }
.logo-text span { color: var(--amber-light); }
nav { display: flex; gap: 0.2rem; }
nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--parchment);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  transition: background 0.2s, color 0.2s;
}
nav a:hover, nav a.active {
  background: rgba(196,137,58,0.18);
  color: var(--amber-light);
}

/* ── BREADCRUMB ── */
.breadcrumb {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-soft); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb-sep { color: var(--border); }

/* ── COURSE HERO (used on course index only) ── */
.course-hero {
  background: var(--brown-deep);
  padding: 4.5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(196,137,58,0.25);
}
.course-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 140%, rgba(196,137,58,0.22) 0%, transparent 60%);
  pointer-events: none;
}
.course-hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
  display: block;
  position: relative;
}
.course-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 1rem;
  position: relative;
}
.course-hero h1 em { font-style: italic; color: var(--amber-light); }
.course-hero-lede {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--parchment);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
}

/* ── COURSE PAGE WRAPPER ── */
.course-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}
.course-intro {
  max-width: 680px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.course-intro p { margin-bottom: 1.25rem; }
.course-intro .pullquote { margin: 2rem 0; }

/* ── MODULE GRID (course index) ── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.module-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.5rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 180px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.module-card[href]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
  border-color: var(--amber);
}
.module-card[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--cream-dark);
}
.module-card-number {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--amber);
  text-transform: uppercase;
}
.module-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brown-deep);
  line-height: 1.3;
}
.module-card-desc {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.55;
  font-style: italic;
  margin-top: auto;
}
.module-card-status {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  width: max-content;
}
.module-card-status.status-locked    { background: var(--parchment);    color: var(--text-soft); }
.module-card-status.status-new       { background: var(--brown-deep);   color: var(--amber-light); }
.module-card-status.status-progress  { background: var(--amber);        color: var(--brown-deep); }
.module-card-status.status-complete  { background: var(--success-soft); color: var(--success); }
.module-card-status.status-coming    { background: var(--warn-soft);    color: var(--warn); }

/* ── PROGRESS BAR (per-module page header) ── */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 2.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-soft);
  flex-wrap: wrap;
}
.progress-dots { display: flex; gap: 0.35rem; }
.progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
}
.progress-dot.complete { background: var(--amber); }
.progress-dot.current  { background: var(--amber); transform: scale(1.25); box-shadow: 0 0 0 3px var(--ember-glow); }
.progress-label { font-weight: 500; color: var(--brown-mid); }
.progress-note {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: var(--text-soft);
  text-align: center;
  margin-top: -1.75rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* ── ARTICLE / LESSON BODY (mirrors blog craft articles) ── */
.lesson-wrap { max-width: 720px; margin: 0 auto; padding: 2.5rem 2rem 5rem; }
.lesson-header {
  background: var(--brown-deep);
  border-radius: 8px;
  padding: 2.25rem 2.5rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.lesson-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 130%, rgba(196,137,58,0.15) 0%, transparent 65%);
  pointer-events: none;
}
.lesson-cat {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
  display: block;
  position: relative;
}
.lesson-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--cream);
  margin-bottom: 1rem;
  position: relative;
}
.lesson-header h1 em { font-style: italic; color: var(--amber-light); }
.lesson-lede {
  font-size: 1.05rem;
  color: var(--parchment);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 1.5rem;
  position: relative;
}
.lesson-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(221,208,192,0.2);
  flex-wrap: wrap;
  position: relative;
}
.lesson-meta-item {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(250,246,239,0.55);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lesson-body { font-size: 1.02rem; line-height: 1.8; }
.lesson-body p { margin-bottom: 1.4rem; }
.lesson-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown-deep);
  margin: 2.75rem 0 1rem;
  line-height: 1.25;
}
.lesson-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brown-mid);
  margin: 2rem 0 0.75rem;
}
.lesson-body a {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: rgba(140,58,46,0.3);
  transition: color 0.2s;
}
.lesson-body a:hover { color: var(--rust-light); }
.lesson-body strong { font-weight: 600; color: var(--brown-deep); }
.lesson-body em { font-style: italic; }
.lesson-body ul, .lesson-body ol { margin: 0 0 1.4rem 1.5rem; }
.lesson-body li { margin-bottom: 0.5rem; }

/* numbered section headings (per blog style) */
.numbered-sections { counter-reset: section; }
.numbered-h2 { counter-increment: section; }
.numbered-h2::before {
  content: counter(section, decimal-leading-zero);
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 0.4rem;
}

.pullquote {
  border-left: 3px solid var(--amber);
  margin: 2.5rem 0;
  padding: 0.5rem 0 0.5rem 1.75rem;
}
.pullquote p {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--brown-mid);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.pullquote cite {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-style: normal;
}

.callout {
  background: var(--brown-deep);
  color: var(--cream);
  padding: 2rem 2.25rem;
  border-radius: 8px;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 130%, rgba(196,137,58,0.18) 0%, transparent 65%);
  pointer-events: none;
}
.callout-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
  display: block;
}
.callout p {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--parchment);
  margin: 0;
  position: relative;
}
.callout a { color: var(--amber-light); }

.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.75rem 0;
}
.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider span { color: var(--amber); font-size: 0.85rem; }

/* ── EXERCISE BLOCK ── */
.ch-exercise {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  padding: 1.75rem 1.75rem 1.5rem;
  margin: 2.5rem 0;
}
.ch-exercise-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
  display: block;
}
.ch-exercise h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brown-deep);
  margin: 0 0 0.75rem;
}
.ch-exercise p { margin-bottom: 1rem; font-size: 0.98rem; }
.ch-exercise ul { margin: 0.5rem 0 1.25rem 1.25rem; }
.ch-exercise li { margin-bottom: 0.35rem; font-size: 0.95rem; color: var(--text); }
.ch-exercise textarea {
  width: 100%;
  min-height: 140px;
  padding: 0.9rem 1rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 4px;
  resize: vertical;
  transition: border-color 0.2s;
}
.ch-exercise textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--ember-glow);
}
.ch-exercise-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.ch-button {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.55rem 1.15rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: var(--brown-deep);
  color: var(--cream);
  transition: background 0.2s, transform 0.1s;
}
.ch-button:hover { background: var(--brown-mid); }
.ch-button:active { transform: translateY(1px); }
.ch-button.secondary {
  background: transparent;
  color: var(--brown-mid);
  border: 1px solid var(--border);
}
.ch-button.secondary:hover { background: var(--cream-dark); }
.ch-button:disabled { opacity: 0.5; cursor: not-allowed; }
.ch-exercise-status {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-style: italic;
}
.ch-exercise-status.saved { color: var(--success); font-style: normal; }
.ch-exercise-reflection {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border);
  display: none;
}
.ch-exercise-reflection.visible { display: block; }
.ch-exercise-reflection-prompt {
  font-style: italic;
  color: var(--brown-mid);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}
.ch-exercise-reflection textarea { min-height: 80px; }

/* ── QUIZ BLOCK ── */
.ch-quiz {
  background: var(--cream-dark);
  border-radius: 8px;
  padding: 2.25rem 2rem 2rem;
  margin: 3rem 0 2rem;
}
.ch-quiz-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
  display: block;
  text-align: center;
}
.ch-quiz h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown-deep);
  margin: 0 0 0.4rem;
  text-align: center;
}
.ch-quiz-sub {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-soft);
  font-style: italic;
  text-align: center;
  max-width: 480px;
  margin: 0 auto 2rem;
}
.ch-question {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
  transition: border-color 0.2s;
}
.ch-question.answered-correct { border-color: var(--success); }
.ch-question.answered-wrong   { border-color: var(--rust); }
.ch-question-number {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  display: block;
}
.ch-question-prompt {
  font-family: 'Playfair Display', serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--brown-deep);
  margin-bottom: 1rem;
  line-height: 1.4;
}
.ch-options { display: flex; flex-direction: column; gap: 0.5rem; }
.ch-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.55;
  transition: background 0.15s, border-color 0.15s;
}
.ch-option:hover { background: var(--cream); border-color: var(--amber-light); }
.ch-option input { margin-top: 0.25rem; accent-color: var(--amber); }
.ch-option.selected   { background: var(--cream); border-color: var(--amber); }
.ch-option.is-correct { background: var(--success-soft); border-color: var(--success); }
.ch-option.is-wrong   { background: var(--warn-soft); border-color: var(--warn); }
.ch-option.locked     { cursor: default; }
.ch-explanation {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--parchment);
  border-left: 3px solid var(--amber);
  border-radius: 3px;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--brown-mid);
  display: none;
}
.ch-explanation.visible { display: block; }
.ch-quiz-footer {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.ch-quiz-result {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brown-deep);
  text-align: center;
  display: none;
}
.ch-quiz-result.visible { display: block; }
.ch-quiz-result.pass { color: var(--success); }
.ch-quiz-result.retry { color: var(--warn); }
.ch-quiz-result-note {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-top: 0.35rem;
}

/* ── MODULE NAVIGATION (prev/next) ── */
.module-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.module-nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--rust);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.module-nav-link:hover { color: var(--rust-light); }
.module-nav-link.disabled { color: var(--text-soft); opacity: 0.55; pointer-events: none; }
.module-nav-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.module-nav-next { text-align: right; align-items: flex-end; }

/* ── COMPLETION SCREEN ── */
.completion {
  background: var(--brown-deep);
  color: var(--cream);
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}
.completion::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(196,137,58,0.2) 0%, transparent 60%);
  pointer-events: none;
  animation: ember-sweep 14s ease-in-out infinite;
}
@keyframes ember-sweep {
  0%, 100% { opacity: 0.7; transform: translateY(0); }
  50%      { opacity: 1.0; transform: translateY(-10px); }
}
.completion-inner { max-width: 760px; position: relative; text-align: center; }
.completion-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
}
.completion h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 2rem;
}
.completion h1 em { font-style: italic; color: var(--amber-light); }
.completion-quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--parchment);
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto 0.75rem;
}
.completion-quote-cite {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(250,246,239,0.55);
  margin-bottom: 3rem;
  font-style: normal;
  display: block;
}

/* certificate card */
.certificate {
  background: linear-gradient(180deg, #FFFAF4 0%, #F2EBE0 100%);
  color: var(--brown-deep);
  border: 1px solid var(--amber);
  border-radius: 6px;
  padding: 3rem 3rem 2.5rem;
  margin: 0 auto 2rem;
  max-width: 620px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  position: relative;
}
.certificate::before, .certificate::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border: 1px solid var(--amber);
}
.certificate::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.certificate::after  { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.cert-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.cert-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  font-style: italic;
  color: var(--brown-deep);
  margin-bottom: 1.5rem;
}
.cert-body {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.cert-name-input {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--brown-deep);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--amber);
  text-align: center;
  padding: 0.25rem 0.5rem;
  margin: 0.5rem 0 1rem;
  width: 80%;
  max-width: 340px;
}
.cert-name-input:focus { outline: none; border-bottom-color: var(--brown-mid); }
.cert-name-display {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-style: italic;
  color: var(--brown-deep);
  display: block;
  margin: 0.5rem 0 1rem;
}
.cert-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}
.cert-signature {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--brown-mid);
  margin-top: 0.5rem;
}

.completion-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.completion-actions .ch-button { background: var(--amber); color: var(--brown-deep); }
.completion-actions .ch-button:hover { background: var(--amber-light); }
.completion-actions .ch-button.secondary {
  background: transparent;
  color: var(--parchment);
  border: 1px solid rgba(250,246,239,0.25);
}
.completion-actions .ch-button.secondary:hover { background: rgba(250,246,239,0.08); color: var(--cream); }

.completion-reflection {
  max-width: 620px;
  margin: 3.5rem auto 2rem;
  text-align: left;
  background: rgba(250,246,239,0.04);
  border: 1px solid rgba(250,246,239,0.1);
  border-radius: 6px;
  padding: 1.75rem 2rem;
}
.completion-reflection h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
}
.completion-reflection p {
  font-family: 'Lora', Georgia, serif;
  color: var(--parchment);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}
.completion-reflection textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(250,246,239,0.06);
  color: var(--cream);
  border: 1px solid rgba(250,246,239,0.15);
  border-radius: 4px;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  line-height: 1.6;
  resize: vertical;
}
.completion-reflection textarea::placeholder { color: rgba(250,246,239,0.45); }
.completion-reflection textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--ember-glow);
}

.completion-invitation {
  max-width: 620px;
  margin: 3.5rem auto 0;
  text-align: left;
}
.completion-invitation h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1rem;
  text-align: center;
}
.completion-invitation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  list-style: none;
}
.completion-invitation-list a {
  display: block;
  padding: 1.1rem 1.2rem;
  background: rgba(250,246,239,0.04);
  border: 1px solid rgba(250,246,239,0.1);
  border-radius: 6px;
  color: var(--parchment);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.completion-invitation-list a:hover {
  border-color: var(--amber);
  background: rgba(196,137,58,0.1);
  color: var(--amber-light);
}
.completion-invitation-list strong {
  display: block;
  color: var(--cream);
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.25rem;
  font-style: italic;
}

/* not-yet-completed guard */
.completion-guard {
  max-width: 540px;
  margin: 0 auto;
  color: var(--parchment);
  text-align: center;
}
.completion-guard h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--cream);
  margin-bottom: 1rem;
  font-weight: 600;
}
.completion-guard p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}

/* ── SITE FOOTER ── */
footer.site-footer {
  background: #1A1208;
  color: rgba(250,246,239,0.45);
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(196,137,58,0.15);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--cream); }
.footer-logo span { color: var(--amber); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(250,246,239,0.38);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--amber); }
.footer-copy { font-family: 'Inter', sans-serif; font-size: 0.73rem; }

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .header-inner { padding: 0 1.25rem; }
  .course-wrap, .lesson-wrap { padding: 2rem 1.25rem 4rem; }
  .lesson-header { padding: 1.75rem 1.5rem 1.5rem; }
  .ch-exercise, .ch-quiz { padding: 1.4rem 1.25rem; }
  .certificate { padding: 2.25rem 1.5rem 2rem; }
  nav a { padding: 0.35rem 0.55rem; font-size: 0.78rem; }
}

/* ── MOTION PREFERENCES ── */
@media (prefers-reduced-motion: reduce) {
  .completion::before { animation: none; }
  * { transition: none !important; }
}

/* ── AUTH HEADER SLOT ── */
.ch-auth-slot { display: flex; align-items: center; margin-left: 0.25rem; }
.ch-auth-nav-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--parchment);
  background: transparent;
  border: 1px solid rgba(250,246,239,0.25);
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ch-auth-nav-btn:hover { background: rgba(196,137,58,0.18); color: var(--amber-light); border-color: var(--amber); }

/* Account avatar + dropdown */
.ch-auth-account {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.ch-auth-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--brown-deep);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.2s;
}
.ch-auth-account:hover .ch-auth-avatar { background: var(--amber-light); }
.ch-auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--brown-deep);
  border: 1px solid rgba(196,137,58,0.3);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  padding: 0.5rem 0;
  display: none;
  z-index: 200;
}
.ch-auth-account.open .ch-auth-dropdown { display: block; }
.ch-auth-dropdown-email {
  display: block;
  padding: 0.6rem 1rem 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: rgba(250,246,239,0.55);
  border-bottom: 1px solid rgba(250,246,239,0.1);
  margin-bottom: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-auth-dropdown-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  color: var(--parchment);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ch-auth-dropdown-link:hover { background: rgba(250,246,239,0.07); color: var(--amber-light); }

/* ── SAVE PROGRESS BANNER ── */
.ch-save-banner {
  background: var(--brown-deep);
  border-bottom: 1px solid rgba(196,137,58,0.25);
  padding: 0.65rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: sticky;
  top: 64px;
  z-index: 90;
}
.ch-save-banner-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(250,246,239,0.75);
  text-align: center;
}
.ch-save-banner-link {
  background: transparent;
  border: none;
  color: var(--amber-light);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(232,184,109,0.4);
  padding: 0;
  transition: color 0.2s;
}
.ch-save-banner-link:hover { color: var(--cream); }
.ch-save-banner-close {
  background: transparent;
  border: none;
  color: rgba(250,246,239,0.35);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s;
  flex-shrink: 0;
}
.ch-save-banner-close:hover { color: var(--parchment); }

/* ── AUTH MODAL OVERLAY ── */
.ch-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,12,5,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
}
.ch-auth-modal {
  background: var(--cream);
  border-radius: 10px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  animation: ch-modal-in 0.2s ease-out;
}
@keyframes ch-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ch-auth-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  z-index: 1;
}
.ch-auth-close:hover { color: var(--text); background: var(--cream-dark); }
.ch-auth-inner {
  padding: 2rem 2rem 1.75rem;
}
.ch-auth-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 0.6rem;
}
.ch-auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--brown-deep);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}
.ch-auth-sub {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.92rem;
  color: var(--text-soft);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.ch-auth-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.ch-auth-tab {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.ch-auth-tab:hover { color: var(--text); }
.ch-auth-tab.active { color: var(--amber); border-bottom-color: var(--amber); }
.ch-auth-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}
.ch-auth-input {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ch-auth-input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--ember-glow);
}
.ch-auth-pass-hint {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--text-soft);
  margin: -0.5rem 0 0.9rem;
  font-style: italic;
}
.ch-auth-submit {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  background: var(--brown-deep);
}
.ch-auth-submit:hover { background: var(--brown-mid); }
.ch-auth-error {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--rust);
  background: var(--warn-soft);
  border: 1px solid rgba(140,58,46,0.2);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}
.ch-auth-disclaimer {
  font-family: 'Inter', sans-serif;
  font-size: 0.73rem;
  color: var(--text-soft);
  text-align: center;
  margin-top: 1.25rem;
  font-style: italic;
}
.ch-auth-sent { text-align: center; padding: 0.5rem 0; }
.ch-auth-sent-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.ch-auth-sent-msg {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brown-deep);
  margin-bottom: 0.75rem;
}
.ch-auth-sent-note {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9rem;
  color: var(--text-soft);
  font-style: italic;
  line-height: 1.6;
}

/* ── PROGRESSIVE PROMPT ── */
.ch-progressive-prompt {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber-light);
  border-radius: 5px;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.55;
  transition: opacity 0.4s;
}
.ch-pp-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.ch-pp-text { flex: 1; }
.ch-pp-link {
  background: transparent;
  border: none;
  color: var(--amber);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: rgba(196,137,58,0.4);
  transition: color 0.2s;
}
.ch-pp-link:hover { color: var(--brown-mid); }
.ch-pp-close {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.ch-pp-close:hover { opacity: 1; }

/* ── ACCOUNT PAGE ── */
.ch-account-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}
.ch-account-hero {
  background: var(--brown-deep);
  border-radius: 8px;
  padding: 2.25rem 2.5rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.ch-account-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 130%, rgba(196,137,58,0.15) 0%, transparent 65%);
  pointer-events: none;
}
.ch-account-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 0.75rem;
  position: relative;
}
.ch-account-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.75rem;
  position: relative;
}
.ch-account-email {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: rgba(250,246,239,0.65);
  position: relative;
}
.ch-account-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brown-deep);
  margin-bottom: 1rem;
}
.acc-module {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
}
.acc-module-n { color: var(--amber); font-size: 0.72rem; font-weight: 600; min-width: 60px; letter-spacing: 0.1em; }
.acc-module-title { color: var(--text); flex: 1; }
.acc-module-status {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}
.acc-mod-complete .acc-module-status { background: var(--success-soft); color: var(--success); }
.acc-mod-progress .acc-module-status { background: rgba(196,137,58,0.15); color: var(--amber); }
.acc-mod-new .acc-module-status { background: var(--cream-dark); color: var(--text-soft); }
.ch-account-signout {
  margin-top: 2.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ch-account-signout:hover { background: var(--cream-dark); color: var(--text); }
.ch-account-unauth {
  text-align: center;
  padding: 4rem 2rem;
}
.ch-account-unauth h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--brown-deep);
  margin-bottom: 0.75rem;
}
.ch-account-unauth p {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-soft);
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* ── RESPONSIVE (auth) ── */
@media (max-width: 680px) {
  .ch-auth-inner { padding: 1.75rem 1.25rem 1.5rem; }
  .ch-save-banner { padding: 0.6rem 1.25rem; }
  .ch-account-hero { padding: 1.75rem 1.5rem 1.5rem; }
}
