/* EMBER learning path — gated competency journey + spaced-retrieval reviews. */
:root {
  --bg: #0e1116; --panel: #161b22; --panel2: #1c232d; --line: #2a323d;
  --ink: #e7edf3; --muted: #93a1b0; --brand: #ff7a3c; --brand2: #7ec9ff;
  --good: #3fb950; --bad: #f85149; --partial: #d29922;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 16px 24px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #11161d, #0e1116); }
.topbar .back, .topbar .scenarios-link { color: var(--brand2); text-decoration: none; font-size: 14px; white-space: nowrap; }
.topbar .back:hover, .topbar .scenarios-link:hover { text-decoration: underline; }
.title-wrap { flex: 1; } .title-wrap h1 { margin: 0; font-size: 18px; } .title-wrap .sub { color: var(--muted); font-size: 13px; }
.ember-badge { line-height: 0; } .ember-badge svg { filter: drop-shadow(0 4px 10px rgba(255,122,24,.2)); }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }
.loading, .empty { color: var(--muted); padding: 48px 8px; text-align: center; }

.reviews { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; }
.reviews.due { border-color: var(--partial); }
.reviews b { font-size: 20px; color: var(--brand); }
.reviews .sub { color: var(--muted); font-size: 13px; }
.reviews .muted { color: var(--muted); font-size: 13px; }
.reviews button { cursor: pointer; background: var(--brand); color: #160a04; border: 0; font-weight: 700;
  border-radius: 9px; padding: 10px 18px; font-size: 14px; }
.reviews button:hover { filter: brightness(1.08); }

.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.node { display: flex; align-items: center; gap: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
/* the progress RING is the node badge — plain transparent box centres it */
.node-icon { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.node-icon .pring { width: 34px; height: 34px; display: block; }
.node-icon svg:not(.pring) { width: 20px; height: 20px; display: block; }
.node-body { flex: 1; min-width: 0; }
.node-title { font-weight: 600; }
.node-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.mbar { display: inline-block; width: 90px; height: 6px; background: var(--panel2); border-radius: 3px;
  overflow: hidden; vertical-align: middle; margin-right: 8px; }
.mbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--good)); }
.node-go { color: var(--brand2); text-decoration: none; font-size: 13px; white-space: nowrap; }
.node-go:hover { text-decoration: underline; }
.node-lock { color: var(--muted); font-size: 12px; }
/* status colour now lives in the ring itself; keep node badges transparent */
.node.locked { opacity: .55; }
.node.capstone { border-style: dashed; margin-top: 6px; }
.node.capstone.ready { border-color: var(--brand); border-style: solid; }
.node.capstone.ready .node-icon { color: var(--brand); }
.legend { color: var(--muted); font-size: 12px; margin-top: 18px; text-align: center; }

/* Adaptive recommendation banner */
.recommend { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(135deg, rgba(255,122,24,.14), rgba(126,201,255,.08));
  border: 1px solid var(--brand); border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.rec-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand2); margin-bottom: 4px; }
.rec-level { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 8px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.rec-reason { font-size: 15px; line-height: 1.4; }
.rec-btn { cursor: pointer; white-space: nowrap; background: var(--brand); color: #160a04; border: 0; font-weight: 700; border-radius: 9px; padding: 11px 18px; font-size: 14px; }
.rec-btn:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .recommend { flex-direction: column; align-items: stretch; } }

/* Re-teach viewer */
.reteach { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.reteach .crumbs { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.reteach .crumbs a { color: var(--brand2); text-decoration: none; font-size: 13px; }
.reteach .progress { color: var(--muted); font-size: 12px; }
.rt-ember { text-align: center; line-height: 0; margin: 6px 0 4px; }
.reteach h2 { margin: 6px 0 2px; font-size: 19px; }
.reteach h3 { margin: 0 0 12px; font-size: 14px; color: var(--brand2); font-weight: 600; }
.reteach p { line-height: 1.6; }
.rt-points { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; } .rt-points li { line-height: 1.5; }
.rt-note { margin-top: 14px; background: var(--panel2); border-left: 3px solid var(--brand); border-radius: 8px; padding: 10px 14px; color: var(--muted); font-size: 14px; }
.rt-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.rt-practise { background: var(--brand); color: #160a04; text-decoration: none; font-weight: 700; border-radius: 9px; padding: 10px 18px; font-size: 14px; }
.rt-actions button { cursor: pointer; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 10px 18px; font-size: 14px; }

/* Review session */
.review-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.review-card .crumbs { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.review-card .crumbs a { color: var(--brand2); text-decoration: none; font-size: 13px; }
.review-card .progress { color: var(--muted); font-size: 12px; }
.review-card h2 { margin: 0 0 8px; }
.q { font-size: 19px; line-height: 1.35; }
.choices { display: grid; gap: 10px; margin-top: 8px; }
.choice { text-align: left; cursor: pointer; background: var(--panel2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; font-size: 15px; }
.choice:hover:not(:disabled) { border-color: var(--brand2); }
.choice:disabled { opacity: .75; cursor: default; }
.choice.right { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.choice.wrong { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad) inset; }
.consequence { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--panel2); }
.consequence.good { border-color: var(--good); } .consequence.bad { border-color: var(--bad); }
.consequence .verdict { font-weight: 700; margin-bottom: 6px; }
.consequence.good .verdict { color: var(--good); } .consequence.bad .verdict { color: var(--bad); }
.consequence p { margin: 0 0 10px; }
.cite { color: var(--muted); font-size: 12px; font-style: italic; margin-bottom: 12px; }
.next, .review-card button { cursor: pointer; background: var(--brand); color: #160a04; border: 0;
  font-weight: 700; border-radius: 9px; padding: 10px 18px; font-size: 14px; }
.next:hover, .review-card button:hover { filter: brightness(1.08); }

/* Module hero illustration thumbnail on each competency card (rendered images). */
.node-hero { width: 132px; height: 74px; object-fit: cover; border-radius: 8px; margin-right: 12px; flex: none; border: 1px solid var(--line, #2a323d); background: #0a0e1c; }
/* Shared module thumbnail box on the path (order: circle → image → title). */
.node-thumb { width: 116px; height: 68px; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--line, #2a323d); background: #0a0e1c; }
@media (max-width: 640px) { .node-hero, .node-thumb { width: 84px; height: 50px; } }

/* ── Light-mode overrides ─────────────────────────────────────────────
   Dark (default) stays byte-identical; only re-ground the dark literal
   thumbnail placeholders so they don't read as dark boxes on a white card. */
:root[data-theme="light"] .node-hero,
:root[data-theme="light"] .node-thumb { background: var(--panel2); }
/* Re-ground the top bar light without touching its dark literal gradient. */
:root[data-theme="light"] .topbar { background: linear-gradient(180deg, var(--panel), var(--bg)); }
