/* Move Up course pages — lesson bar, step navigation, classroom mode, lesson footer.
   Added by scripts/apply-lesson-ux.mjs. Works on top of the existing page styles. */
:root { --mu-purple: #6c28d9; --mu-purple-dark: #4b17a3; --mu-ink: #221a3a; --mu-muted: #6f6787; --mu-line: #e6e0f2; --mu-soft: #f4effd; --mu-green: #1f8a5b; }

/* old controls replaced by the new bar and footer */
.mu-ux .lesson-tools, .mu-ux .mu-actionbar, .mu-ux main > .tools { display: none !important; }

/* ---------- lesson bar ---------- */
.mu-bar { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--mu-line); box-shadow: 0 4px 18px rgba(40,20,90,.06); font-family: Inter, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.mu-bar__row { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 9px 16px; }
.mu-bar a, .mu-bar button { font: inherit; }
.mu-bar__back { color: var(--mu-purple); text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; padding: 6px 4px; }
.mu-bar__title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mu-bar__title small { color: var(--mu-muted); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.mu-bar__title b { color: var(--mu-ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-bar__nav { display: flex; gap: 6px; }
.mu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--mu-line); background: #fff; color: var(--mu-ink); border-radius: 10px; padding: 7px 11px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.mu-btn:hover { border-color: var(--mu-purple); color: var(--mu-purple); }
.mu-btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.mu-btn--class[aria-pressed="true"] { background: var(--mu-purple); border-color: var(--mu-purple); color: #fff; }
.mu-btn--primary { background: var(--mu-purple); border-color: var(--mu-purple); color: #fff; }
.mu-btn--primary:hover { background: var(--mu-purple-dark); color: #fff; }

/* step chips */
.mu-steps { max-width: 1180px; margin: 0 auto; display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 0 16px 9px; scrollbar-width: none; }
.mu-steps::-webkit-scrollbar { display: none; }
.mu-phase { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #fff; border-radius: 6px; padding: 3px 7px; margin-left: 6px; }
.mu-phase:first-child { margin-left: 0; }
.mu-phase--pre { background: #2f86c9; } .mu-phase--in { background: var(--mu-purple); } .mu-phase--post { background: #1f8a5b; }
.mu-chip { flex: none; border: 1px solid var(--mu-line); background: #fff; color: #4a4163; border-radius: 99px; padding: 5px 11px; font-size: 13px; cursor: pointer; white-space: nowrap; font: inherit; font-size: 13px; }
.mu-chip.is-active { background: var(--mu-soft); border-color: var(--mu-purple); color: var(--mu-purple); font-weight: 700; }
.mu-chip.is-hidden { display: none; }

/* sections get a phase tag */
.mu-ux [data-mu-phase] { scroll-margin-top: 120px; }
.mu-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; color: #fff; border-radius: 6px; padding: 2px 7px; margin-bottom: 8px; }

/* ---------- lesson footer ---------- */
.mu-end { margin: 26px 0 40px; background: #fff; border: 1px solid var(--mu-line); border-radius: 18px; padding: 22px; text-align: center; box-shadow: 0 8px 28px rgba(40,20,90,.06); }
.mu-end h3 { margin: 0 0 6px; color: var(--mu-ink); font-size: 19px; }
.mu-end p { margin: 0 0 16px; color: var(--mu-muted); }
.mu-end__done { font-size: 16px; padding: 13px 22px; border-radius: 12px; }
.mu-end__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.mu-end.is-done .mu-end__done { background: #e9f7ef; color: var(--mu-green); border-color: #bfe6cf; }

/* ---------- classroom mode (teacher shares the screen) ---------- */
.mu-class header, .mu-class .hero, .mu-class aside, .mu-class footer { display: none !important; }
.mu-class .layout { display: block !important; max-width: 1060px; margin: 0 auto !important; }
.mu-class [data-mu-phase="pre"], .mu-class [data-mu-phase="post"] { display: none !important; }
.mu-class main { font-size: 1.16em; max-width: 1060px; margin: 0 auto; }
.mu-class main h2 { font-size: 1.5em; } .mu-class main h3 { font-size: 1.25em; }
.mu-class .mu-bar { box-shadow: none; }
.mu-class-note { display: none; max-width: 1180px; margin: 0 auto; padding: 0 16px 8px; color: var(--mu-purple); font-size: 12px; font-weight: 700; }
.mu-class .mu-class-note { display: block; }

/* ---------- lesson list pages ---------- */
.mu-continue { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: linear-gradient(110deg, #6c28d9, #9b46f2); color: #fff; border-radius: 16px; padding: 16px 18px; margin: 0 0 18px; }
.mu-continue b { font-size: 16px; } .mu-continue small { display: block; opacity: .85; }
.mu-continue a { background: #fff; color: var(--mu-purple); border-radius: 10px; padding: 9px 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.mu-progress-line { margin: 0 0 14px; color: var(--mu-muted); font-weight: 700; }
.card.mu-done { border-color: #bfe6cf !important; background: #f6fcf8 !important; }
.mu-check { display: inline-block; margin-left: 6px; color: var(--mu-green); font-weight: 800; }
.card.mu-current { outline: 2px solid var(--mu-purple); outline-offset: 2px; }

@media (max-width: 700px) {
  .mu-bar__row { padding: 8px 10px; gap: 6px; }
  .mu-bar__back span, .mu-btn .mu-lbl { display: none; }
  .mu-bar__title b { font-size: 14px; }
  .mu-btn { padding: 7px 9px; }
  .mu-steps { padding: 0 10px 8px; }
  .mu-end { padding: 18px 14px; }
  .mu-end__done { width: 100%; }
}
@media print { .mu-bar, .mu-end { display: none !important; } }
