/* astro-learn — Tharusikuru palette, Sinhala first.
   Loaded only on /astro/learn/* pages via the layout. */

/* ── learn-specific bits layered over the shared astro.css ─────── */

.learn-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, var(--cream-warm), var(--saffron-soft));
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  border: 1px solid var(--burgundy-faint);
}
.learn-hero h1 { margin: 0 0 0.3rem; font-size: 1.7rem; }
.learn-hero p  { margin: 0; color: var(--ink-soft); font-family: var(--font-ui); }

.learn-stage-h {
  font-family: var(--font-ui);
  color: var(--burgundy);
  font-size: 1.05rem;
  margin: 1.4rem 0 0.6rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.3rem;
}

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; }
.module-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  transition: all 0.15s ease;
}
.module-card:hover {
  transform: translateY(-1px);
  border-color: var(--burgundy-soft);
  box-shadow: var(--shadow-soft);
}
.module-card .num {
  position: absolute; top: 0.5rem; right: 0.7rem;
  font-family: var(--font-ui); color: var(--ink-faint); font-size: 0.8rem;
}
.module-card .title { color: var(--burgundy); font-weight: 500; font-size: 1.05rem; }
.module-card .subtitle { color: var(--ink-soft); font-size: 0.85rem; font-family: var(--font-ui); }
.module-card .meta {
  display: flex; gap: 0.6rem; margin-top: auto; padding-top: 0.4rem;
  font-family: var(--font-ui); font-size: 0.78rem; color: var(--ink-soft);
}
.module-card.is-stub { opacity: 0.7; }
.module-card.is-stub .title::after { content: ' (ඉදිරියට…)'; color: var(--ink-faint); font-weight: 400; }
.module-card.is-completed { border-color: #4f6b2f; }
.module-card.is-completed::after {
  content: '✓'; position: absolute; bottom: 0.6rem; right: 0.7rem;
  color: #4f6b2f; font-weight: 600;
}
.depth-badge {
  display: inline-block; padding: 0 0.4rem;
  font-size: 0.7rem; border-radius: 3px;
  font-family: var(--font-ui);
}
.depth-badge.deep  { background: var(--saffron); color: var(--burgundy); }
.depth-badge.light { background: var(--cream-warm); color: var(--ink-soft); }
.depth-badge.stub  { background: var(--ink-faint); color: white; }

/* ── progress ring on the hero ───────────────────────────────────── */
.progress-ring {
  position: relative;
  width: 88px; height: 88px;
}
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring .ring-bg, .progress-ring .ring-fg { fill: none; stroke-width: 8; }
.progress-ring .ring-bg { stroke: rgba(124,27,31,0.15); }
.progress-ring .ring-fg { stroke: var(--burgundy); stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.progress-ring .num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 1.2rem; font-weight: 500; color: var(--burgundy);
}

/* ── module page: card walker + quiz CTA ─────────────────────────── */
.lesson-walker { display: flex; flex-direction: column; gap: 0.8rem; }
.lesson-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--saffron);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  position: relative;
}
.lesson-card h3 { margin: 0 0 0.4rem; color: var(--burgundy); font-size: 1.1rem; }
.lesson-card p  { margin: 0 0 0.5rem; line-height: 1.7; }
.lesson-card .glossary {
  margin: 0.6rem 0 0; padding: 0.4rem 0.7rem;
  background: var(--cream-warm); border-radius: 4px;
  font-family: var(--font-ui); font-size: 0.82rem; color: var(--ink-soft);
}
.lesson-card .glossary span { margin-right: 0.8rem; }

.lesson-card .card-cite {
  margin: 0.6rem 0 0;
  padding: 0.35rem 0.7rem;
  background: rgba(124, 27, 31, 0.08);
  border-left: 2px solid var(--burgundy);
  border-radius: 0 4px 4px 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
}
.lesson-card .card-cite .cite-icon { margin-right: 0.3rem; font-style: normal; }
.lesson-card .card-cite strong { color: var(--burgundy); font-style: normal; }
.lesson-card .card-num {
  position: absolute; top: 0.6rem; right: 0.9rem;
  font-family: var(--font-ui); font-size: 0.8rem; color: var(--ink-faint);
}
/* Pill-shaped audio button — icon + readable label. */
.w-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.8rem;
  background: var(--saffron);
  color: var(--burgundy);
  border: 1px solid var(--burgundy-soft);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  margin-right: 0.5rem;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s, transform 0.05s;
}
.w-audio:hover  { background: var(--terracotta); color: var(--cream-light); }
.w-audio:active { transform: scale(0.97); }
.w-audio.playing {
  background: var(--burgundy);
  color: var(--cream-light);
  border-color: var(--burgundy);
}
.w-audio .w-audio-icon { font-size: 1.02em; line-height: 1; margin-top: -1px; }
.w-audio .w-audio-text { white-space: nowrap; }

.lesson-cta {
  margin-top: 1.4rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, var(--cream-warm), var(--terracotta-soft));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.lesson-cta .copy h3 { margin: 0; color: var(--burgundy); }
.lesson-cta .copy p { margin: 0.3rem 0 0; color: var(--ink-soft); font-family: var(--font-ui); font-size: 0.9rem; }

/* ── widget 1: rashi wheel ──────────────────────────────────────── */
.w-rashi-wheel {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  background: var(--panel); padding: 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.w-rashi-wheel svg { max-width: 380px; width: 100%; height: auto; }
.w-rashi-wheel .wheel-ctrl {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  font-family: var(--font-ui); font-size: 0.9rem;
}
.w-rashi-wheel .wheel-ctrl input[type=range] { flex: 1; min-width: 200px; }
.w-rashi-wheel .wheel-ctrl button {
  background: var(--burgundy); color: white;
  border: none; padding: 0.3rem 0.8rem; border-radius: 4px;
  font: inherit; cursor: pointer;
}
.w-rashi-wheel .planet-node:hover circle { fill: var(--saffron-soft) !important; }

/* ── widget 2: kundli live ──────────────────────────────────────── */
.w-kundli-live {
  background: var(--panel); padding: 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.kundli-live-ctrl {
  display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; font-family: var(--font-ui); font-size: 0.9rem;
  margin-bottom: 0.7rem; padding-bottom: 0.6rem; border-bottom: 1px dashed var(--line);
}
.kundli-live-ctrl input[type=date] { padding: 0.2rem 0.4rem; border: 1px solid var(--line); border-radius: 4px; }
.kundli-live-ctrl input[type=range] { flex: 1; min-width: 200px; }
.kundli-live-stage { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.kundli-live-stage svg { max-width: 320px; width: 100%; height: auto; }
.kundli-live-stage [data-summary] { text-align: center; font-family: var(--font-ui); font-size: 0.92rem; }

/* ── widget 3: nakshatra strip ──────────────────────────────────── */
.w-nakshatra-strip {
  background: var(--panel); padding: 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.nak-strip {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 0.3rem;
}
.nak-cell {
  background: var(--cream-light); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.4rem 0.2rem;
  font-family: var(--font-ui); font-size: 0.7rem; cursor: pointer;
  display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.2;
  color: var(--ink);
}
.nak-cell:hover { border-color: var(--burgundy-soft); }
.nak-cell.active { background: var(--saffron); border-color: var(--burgundy); color: var(--burgundy); }
.nak-cell .num { color: var(--ink-faint); font-size: 0.65rem; }
.nak-cell .name { font-weight: 500; }
.nak-cell .lord { color: var(--ink-soft); font-size: 0.68rem; }
.nak-info { margin-top: 0.7rem; padding: 0.6rem 0.8rem; background: var(--cream-warm); border-radius: 4px; font-family: var(--font-ui); font-size: 0.85rem; }
@media (max-width: 720px) {
  .nak-strip { grid-template-columns: repeat(3, 1fr); }
}

/* ── widget 4: drag-drop ──────────────────────────────────────────── */
.w-drag-drop {
  background: var(--panel); padding: 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.dd-stage { display: grid; grid-template-columns: 1fr; gap: 0.7rem; }
.dd-pool {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.6rem; background: var(--cream-light); border-radius: 4px;
  min-height: 50px;
}
.dd-chip {
  padding: 0.3rem 0.8rem; background: var(--saffron-soft);
  border: 1px solid var(--burgundy-soft); border-radius: 999px;
  cursor: grab; font-family: var(--font-ui); font-size: 0.9rem;
  user-select: none;
}
.dd-chip:active { cursor: grabbing; }
.dd-targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem; }
.dd-target { border: 2px dashed; padding: 0.5rem 0.6rem; border-radius: 6px; min-height: 100px; }
.dd-target .lbl { font-family: var(--font-ui); font-size: 0.88rem; font-weight: 500; margin-bottom: 0.3rem; color: var(--burgundy); }
.dd-target .drop { display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 60px; }

/* ── widget 5: quiz runner ────────────────────────────────────────── */
.w-quiz {
  background: var(--panel); padding: 1.2rem 1.4rem;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  max-width: 760px;
}
.quiz-head { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: 0.88rem; margin-bottom: 0.6rem; }
.quiz-stem { font-size: 1.1rem; font-weight: 500; color: var(--burgundy); margin-bottom: 1rem; }
.quiz-body { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.quiz-choice {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.8rem; background: var(--cream-light);
  border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--font-ui); cursor: pointer; transition: background 0.15s;
}
.quiz-choice:hover { background: var(--cream-warm); }
.quiz-choice.correct { background: #dceec6; border-color: #4f6b2f; }
.quiz-choice.wrong   { background: #fbd5d5; border-color: #a8423e; }
.quiz-feedback { padding: 0.6rem 0.8rem; border-radius: 4px; font-family: var(--font-ui); font-size: 0.92rem; min-height: 1.4em; }
.quiz-feedback.correct { background: #e6f1d3; color: #3a4f25; }
.quiz-feedback.wrong   { background: #fbe5e5; color: #7a2a2c; }
.match-tbl { width: 100%; border-collapse: collapse; }
.match-tbl td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); font-family: var(--font-ui); }
.match-tbl select { padding: 0.2rem 0.4rem; border: 1px solid var(--line); border-radius: 4px; min-width: 12rem; font: inherit; }
.quiz-results { text-align: center; padding: 1rem; }
.quiz-results h3 { color: var(--burgundy); }

/* ── long-form module layout ───────────────────────────────────── */

.ll-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem 1.6rem;
  margin: 1.2rem 0;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.ll-section .ll-h {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--saffron-soft);
  font-size: 1.4rem;
  color: var(--burgundy);
}
.ll-section .ll-h .w-audio {
  margin-left: auto;
  font-size: 0.92rem;
  padding: 0.42rem 0.95rem;
}
.ll-section .ll-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--cream-light);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.05rem;
}

.ll-section p {
  font-size: 1.04rem;
  line-height: 1.85;
  margin: 0 0 0.9rem;
  color: var(--ink);
}
.ll-section p:last-child { margin-bottom: 0; }

/* Visual variation per section */
.ll-theory       { border-left: 4px solid var(--saffron); }
.ll-application  { border-left: 4px solid var(--terracotta); }
.ll-examples     { border-left: 4px solid var(--burgundy-soft); }
.ll-practice     { border-left: 4px solid #4f6b2f; background: linear-gradient(180deg, var(--panel) 0%, #f1ead2 100%); }
.ll-exam         { border-left: 4px solid #a8423e; }

/* Examples sub-card */
.ll-example {
  background: var(--cream-light);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
  border-left: 2px solid var(--terracotta-soft);
}
.ll-example:last-child { margin-bottom: 0; }
.ll-example h3 {
  color: var(--burgundy);
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-family: var(--font-ui);
}

/* Practice task callout */
.ll-practice-task {
  background: var(--cream-warm);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin: 0.7rem 0 1rem;
  border-left: 3px solid var(--saffron);
}
.ll-practice-refs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 1rem;
}
.ll-practice-refs-label {
  color: var(--burgundy);
  font-weight: 500;
  font-size: 0.92rem;
  width: 100%;
  margin-bottom: 0.15rem;
}
.ll-widget-host {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--line);
}
.ll-widget-host > * + * { margin-top: 1rem; }

/* Exam */
.ll-exam-intro {
  background: var(--cream-light);
  padding: 0.6rem 0.9rem;
  border-radius: 4px;
  font-style: italic;
  color: var(--ink-soft);
}
.ll-exam .w-quiz {
  margin-top: 0.9rem;
  background: transparent;
  border: 0;
  padding: 0;
}

/* Citation footer */
.ll-cite-footer {
  margin-top: 1.4rem;
  padding: 0.7rem 1rem;
  background: rgba(124, 27, 31, 0.06);
  border-left: 2px solid var(--burgundy);
  border-radius: 0 4px 4px 0;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.ll-cite-footer strong { color: var(--burgundy); }

/* ── cross-reference UI: prereq chips + next-step cards ─────── */

.ll-prereq {
  background: linear-gradient(135deg, var(--cream-warm), var(--saffron-soft));
  border: 1px solid var(--burgundy-faint);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
}
.ll-prereq-label {
  color: var(--burgundy);
  font-weight: 500;
  font-size: 0.92rem;
  margin-right: 0.3rem;
}
.ll-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  background: var(--cream-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--burgundy);
  text-decoration: none;
  transition: all 0.15s;
}
.ll-link-chip:hover {
  background: var(--burgundy);
  color: var(--cream-light);
  border-color: var(--burgundy);
}
.ll-link-chip.is-done {
  background: #dceec6;
  border-color: #4f6b2f;
  color: #3a4f25;
}
.ll-link-chip.is-done:hover {
  background: #4f6b2f;
  color: white;
}
.chip-check {
  display: inline-block;
  font-weight: 700;
  color: #4f6b2f;
}
.ll-link-chip.is-done .chip-check { color: inherit; }

/* Next-step grid (richer than prereq strip) */
.ll-nextstep {
  margin-top: 1.5rem;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, #fbf3dc, #f0e2b8);
  border-radius: var(--radius);
  border: 1px solid var(--burgundy-faint);
}
.ll-nextstep h3 {
  margin: 0 0 0.5rem;
  color: var(--burgundy);
  font-size: 1.15rem;
}
.ll-nextstep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.7rem;
}
.ll-nextstep-card {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--terracotta);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s;
}
.ll-nextstep-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  border-left-color: var(--burgundy);
}
.ll-nextstep-card.is-done {
  border-left-color: #4f6b2f;
  background: linear-gradient(135deg, var(--panel) 0%, #e6f1d3 100%);
}
.ll-nextstep-title {
  font-family: var(--font-ui);
  color: var(--burgundy);
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.ll-nextstep-sub {
  font-family: var(--font-ui);
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}
.ll-nextstep-meta {
  font-family: var(--font-ui);
  color: var(--ink-faint);
  font-size: 0.78rem;
}

/* End-of-course panel (no next steps) */
.ll-nextstep-end {
  background: linear-gradient(135deg, var(--saffron-soft), var(--terracotta-soft));
  text-align: center;
}
.ll-nextstep-end h3 { font-size: 1.25rem; }

/* ── lesson illustrations (SVG figures) ───────────────────── */

.ll-figure {
  margin: 1.4rem 0 0;
  padding: 0;
  background: var(--cream-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ll-figure .ll-svg {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
}
.ll-figure figcaption {
  padding: 0.7rem 1rem;
  border-top: 1px dashed var(--line);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
  line-height: 1.5;
  background: var(--panel);
}

/* ── language switcher ────────────────────────────────────────── */
.ll-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  margin: 0 0 0.8rem;
  background: var(--cream-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  width: fit-content;
}
.ll-lang-switcher .ll-lang-icon { font-size: 1rem; }
.ll-lang-switcher .ll-lang-label { color: var(--ink-soft); }
.ll-lang-switcher .ll-lang-btn {
  display: inline-block;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--burgundy);
  transition: all 0.15s;
}
.ll-lang-switcher .ll-lang-btn:hover { background: var(--cream-warm); }
.ll-lang-switcher .ll-lang-btn.is-active {
  background: var(--burgundy);
  color: var(--cream-light);
  font-weight: 500;
}

/* ── Module navigation: prev/next + progress strip ─────────────── */
.ll-mnav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  background: var(--cream-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  margin: 0.4rem 0 1rem;
}
.ll-mnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--burgundy);
  text-decoration: none;
  font-family: var(--font-ui);
  transition: all 0.15s;
  max-width: 100%;
  min-width: 0;
}
.ll-mnav-btn:hover { background: var(--cream-warm); border-color: var(--burgundy-soft); }
.ll-mnav-btn.is-disabled { opacity: 0.35; pointer-events: none; }
.ll-mnav-btn:last-child { justify-self: end; flex-direction: row; }
.ll-mnav-arrow { font-size: 1.1rem; color: var(--burgundy); flex-shrink: 0; }
.ll-mnav-label { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.ll-mnav-label-right { align-items: flex-end; text-align: right; }
.ll-mnav-key { font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.ll-mnav-title { font-size: 0.88rem; color: var(--burgundy); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14em; }

/* The dot strip (centre cell) */
.ll-mnav-strip {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.2rem 0;
}
.ll-mnav-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--burgundy-faint);
  background: white;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
  position: relative;
}
.ll-mnav-dot:hover { transform: scale(1.3); border-color: var(--burgundy); }
.ll-mnav-dot.is-current {
  background: var(--burgundy);
  border-color: var(--burgundy);
  transform: scale(1.4);
  box-shadow: 0 0 0 3px rgba(124, 27, 31, 0.18);
}
.ll-mnav-dot.is-done { background: #4f6b2f; border-color: #4f6b2f; }
.ll-mnav-dot.is-done.is-current { background: var(--burgundy); border-color: var(--burgundy); }
.ll-mnav-dot.is-stub { background: var(--ink-faint); border-color: var(--ink-faint); opacity: 0.5; }
/* Add a stage separator before the first module of each new stage */
.ll-mnav-dot.stage-intermediate:before,
.ll-mnav-dot.stage-advanced:before,
.ll-mnav-dot.stage-practitioner:before {
  content: '';
  position: absolute;
  left: -7px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 14px;
  background: var(--line);
}
.ll-mnav-strip .ll-mnav-dot.stage-intermediate:first-of-type:before,
.ll-mnav-strip .ll-mnav-dot.stage-advanced:first-of-type:before,
.ll-mnav-strip .ll-mnav-dot.stage-practitioner:first-of-type:before {
  display: block;
}

.ll-mnav-counter {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: -0.6rem 0 0.9rem;
}
.ll-mnav-counter strong { color: var(--burgundy); }

@media (max-width: 800px) {
  .ll-mnav { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .ll-mnav-strip { grid-column: 1 / -1; order: -1; justify-content: center; }
  .ll-mnav-title { max-width: 9em; }
}

/* ── exercises / activities (reveal-answer practice cards) ───────────── */
.ll-exercises { margin-top: 0.6rem; }
.ex-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.ex-item {
  border: 1px solid var(--line, #e6d3a8);
  border-left: 3px solid var(--saffron, #f2c730);
  border-radius: 10px;
  background: var(--cream-light, #fbf3dc);
  padding: 0.7rem 0.9rem;
}
.ex-badge {
  display: inline-block;
  font-family: var(--font-ui, sans-serif);
  font-size: 0.72rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
  background: var(--saffron-soft, #fae39a);
  color: var(--burgundy, #7c1b1f);
}
.ex-badge.ex-puzzle { background: #f0c399; }
.ex-badge.ex-apply  { background: #c8e0a8; color: #4f6b2f; }
.ex-prompt { margin-bottom: 0.5rem; line-height: 1.55; }
.ex-reveal { font-family: var(--font-ui, sans-serif); }
.ex-reveal.is-open { background: var(--burgundy, #7c1b1f); color: var(--cream-light, #fbf3dc); border-color: var(--burgundy, #7c1b1f); }
.ex-answer {
  margin-top: 0.55rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed var(--burgundy-faint, #d8b7b8);
  line-height: 1.6;
}

/* ── simulation widgets (nakshatra finder, arudha calc) ─────────────── */
.sim-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.6rem; }
.sim-row input, .sim-row select {
  font-family: var(--font-ui, sans-serif); padding: 0.45rem 0.6rem;
  border: 1px solid var(--line, #e6d3a8); border-radius: 8px; background: #fff;
}
.sim-row label { font-family: var(--font-ui, sans-serif); font-size: 0.88rem; display: inline-flex; gap: 0.3rem; align-items: center; }
.sim-card {
  border: 1px solid var(--line, #e6d3a8); border-left: 3px solid var(--saffron, #f2c730);
  border-radius: 10px; background: #fff; padding: 0.7rem 0.9rem; line-height: 1.7;
}
.sim-hl {
  margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px dashed var(--burgundy-faint, #d8b7b8);
  color: var(--burgundy, #7c1b1f); font-size: 1.05rem;
}

/* ── tap quiz (button instant feedback) ─────────────────────────────── */
.ll-tapquiz { margin-top: 0.6rem; }
.tq-stem { font-weight: 500; margin: 0.3rem 0 0.6rem; line-height: 1.55; }
.tq-opts { display: grid; gap: 0.45rem; }
.tq-opt {
  text-align: right; font-family: var(--font-body, serif); font-size: 1rem;
  padding: 0.55rem 0.8rem; border: 1px solid var(--line, #e6d3a8);
  border-radius: 9px; background: var(--cream-light, #fbf3dc); cursor: pointer;
}
.tq-opt:hover:not(:disabled) { border-color: var(--burgundy-soft, #a44a4d); }
.tq-opt.correct { background: #dceec6; border-color: #4f6b2f; color: #38501f; }
.tq-opt.wrong   { background: #fbd5d5; border-color: #a8423e; color: #7a1f1c; }
.tq-opt:disabled { cursor: default; }
.tq-fb { margin-top: 0.55rem; font-family: var(--font-ui, sans-serif); font-size: 0.9rem; line-height: 1.55; }
.tq-ok { color: #4f6b2f; font-weight: 600; }
.tq-no { color: #a8423e; font-weight: 600; }
.tq-head { font-family: var(--font-ui, sans-serif); font-size: 0.8rem; }
.tq-done { font-family: var(--font-ui, sans-serif); font-size: 1.05rem; padding: 0.6rem 0; }

/* simulation result table (current transit) */
.sim-tbl { width: 100%; border-collapse: collapse; font-family: var(--font-ui, sans-serif); font-size: 0.9rem; }
.sim-tbl th, .sim-tbl td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line, #e6d3a8); }
.sim-tbl th { color: var(--ink-soft, #7a4a4c); font-weight: 500; }
