/* ============================================================
   LATIQUIZZ — Mastery Path (Learning Path) styles
   Uses design tokens from main.css — no new palette introduced.
   ============================================================ */

/* ── Top bar ── */
.mp-topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--purple-100);
}
.mp-topbar-stat, .mp-topbar-mission { display: flex; flex-direction: column; gap: 2px; }
.mp-topbar-mission { margin-left: auto; }
.mp-topbar-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--gray-400); }
.mp-topbar-value { font-size: 1.05rem; font-weight: 800; color: var(--purple-700); }
.mp-topbar-mascot { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }

/* ── Layout ── */
.mp-layout { display: grid; grid-template-columns: 200px 1fr; min-height: calc(100vh - 130px); background: var(--bg); }
.mp-sidebar { padding: 24px 14px; display: flex; flex-direction: column; gap: 6px; }
.mp-sidebar-link {
  padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: .88rem;
  color: var(--gray-700); text-decoration: none; display: flex; justify-content: space-between; align-items: center;
}
.mp-sidebar-link--active { background: var(--purple-600); color: #fff; }
.mp-sidebar-link--soon { color: var(--gray-400); cursor: default; }
.mp-sidebar-link--soon span { font-size: .62rem; background: var(--gray-100); color: var(--gray-500); padding: 2px 7px; border-radius: 999px; font-weight: 700; }

.mp-main { padding: 28px 36px; }
.mp-map-head h1 { font-size: 1.6rem; font-weight: 900; color: var(--purple-900); margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.mp-map-head p { font-size: .88rem; color: var(--gray-500); margin-bottom: 24px; }
.mp-beta-pill {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  background: var(--purple-100); color: var(--purple-600); padding: 4px 10px; border-radius: 999px;
}

/* ── Body map ── */
.mp-map-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.mp-body-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
/* Markers are positioned in % relative to this figure, which hugs the image exactly
   (display:inline-block) -- not the wider .mp-body-wrap card, so % math lines up with the art. */
.mp-body-figure { position: relative; display: inline-block; }
.mp-body-img { max-width: 100%; max-height: 560px; display: block; }

.mp-node-marker {
  position: absolute; width: 36px; height: 36px; border: none; background: none; cursor: pointer;
  transform: translate(-50%, -50%);
}
.mp-node-dot {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  background: var(--p600); box-shadow: 0 0 0 6px rgba(124,58,237,.22), var(--shadow-lg);
  animation: mp-pulse 1.8s ease-in-out infinite;
}
.mp-node-marker--mastered .mp-node-dot { background: var(--green); box-shadow: 0 0 0 6px rgba(34,197,94,.22); animation: none; }
.mp-node-marker--needs_repair .mp-node-dot { background: var(--red); box-shadow: 0 0 0 6px rgba(239,68,68,.22); }
.mp-node-marker--locked { cursor: not-allowed; }
.mp-node-marker--locked .mp-node-dot { background: var(--gray-300); box-shadow: 0 0 0 6px rgba(156,163,175,.18); animation: none; }
@keyframes mp-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.mp-node-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.mp-node-panel-eyebrow { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--purple-400); }
.mp-node-panel h2 { font-size: 1.2rem; font-weight: 800; color: var(--purple-900); margin: 6px 0 10px; }
.mp-node-panel p { font-size: .85rem; color: var(--gray-500); margin-bottom: 18px; }

/* ── Shared buttons ── */
.mp-btn-primary {
  background: var(--purple-600); color: #fff; border: none; border-radius: 999px;
  padding: 12px 24px; font-size: .9rem; font-weight: 700; cursor: pointer; font-family: var(--font);
}
.mp-btn-primary:hover { background: var(--purple-700); }
.mp-btn-primary:disabled { background: var(--gray-300); color: var(--gray-500); cursor: not-allowed; }
.mp-back-link { background: none; border: none; color: var(--purple-600); font-weight: 700; cursor: pointer; margin-bottom: 18px; font-size: .85rem; }

/* ── Lesson ── */
.mp-lesson { max-width: 760px; margin: 0 auto; }
.mp-lesson-img { width: 100%; max-height: 360px; object-fit: contain; border-radius: var(--radius); margin-bottom: 20px; background: var(--white); }
.mp-lesson-title { font-size: 1.4rem; font-weight: 900; color: var(--purple-900); margin-bottom: 14px; }
.mp-lesson-p { font-size: .94rem; line-height: 1.7; color: var(--gray-700); margin-bottom: 12px; }
.mp-section-h { font-size: 1rem; font-weight: 800; color: var(--purple-700); margin: 22px 0 10px; }
.mp-vocab-list { list-style: none; display: grid; gap: 8px; margin-bottom: 14px; }
.mp-vocab-list li { display: flex; flex-direction: column; background: var(--purple-50); border-radius: var(--radius-sm); padding: 10px 14px; }
.mp-vocab-list li strong { color: var(--purple-700); font-size: .88rem; }
.mp-vocab-list li span { color: var(--gray-500); font-size: .82rem; }
.mp-tip-box { background: var(--green-light); color: var(--green-dark); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .88rem; font-weight: 600; margin: 12px 0; }
.mp-mistakes-list { list-style: disc; padding-left: 20px; display: grid; gap: 8px; color: var(--gray-700); font-size: .9rem; margin-bottom: 18px; }

/* ── Quiz ── */
.mp-quiz { max-width: 640px; margin: 0 auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.mp-quiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mp-quiz-kind { font-size: .78rem; font-weight: 700; color: var(--purple-500); text-transform: uppercase; }
.mp-lives { font-size: 1.1rem; letter-spacing: 2px; }
.mp-quiz-question { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 18px; }
.mp-quiz-options { display: grid; gap: 10px; }
.mp-option {
  text-align: left; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--purple-200);
  background: var(--white); font-size: .9rem; cursor: pointer; font-family: var(--font);
}
.mp-option:hover { background: var(--purple-50); }
.mp-option-correct { background: var(--green-light); border-color: var(--green); }
.mp-option-wrong { background: var(--red-light); border-color: var(--red); }
.mp-option-dim { opacity: .5; }
.mp-quiz-feedback { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .88rem; }
.mp-fb-correct { background: var(--green-light); color: var(--green-dark); }
.mp-fb-wrong { background: var(--red-light); color: var(--red); }
.mp-fb-tip { margin-top: 8px; font-style: italic; color: var(--gray-500); }
#mp-next { margin-top: 16px; }

/* ── Repair mode ── */
.mp-repair { max-width: 700px; margin: 0 auto; }
.mp-repair-badge { display: inline-block; background: var(--red-light); color: var(--red); font-weight: 800; font-size: .72rem; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.mp-repair-img { width: 100%; max-width: 360px; display: block; margin: 0 auto 18px; }

/* ── Complete ── */
.mp-complete { text-align: center; padding: 60px 0; }
.mp-complete-badge { font-size: 3.5rem; margin-bottom: 12px; }

/* ── Mobile ── */
@media (max-width: 860px) {
  .mp-layout { grid-template-columns: 1fr; }
  .mp-sidebar { flex-direction: row; overflow-x: auto; padding: 14px; gap: 8px; }
  .mp-sidebar-link { white-space: nowrap; flex-shrink: 0; }
  .mp-map-grid { grid-template-columns: 1fr; }
  .mp-topbar { flex-wrap: wrap; gap: 14px; padding: 12px 18px; }
  .mp-topbar-mission { margin-left: 0; order: 3; flex-basis: 100%; }
  .mp-topbar-mascot { order: 2; margin-left: auto; }
  .mp-main { padding: 20px 16px; }
  .mp-body-wrap { padding: 14px; }
  .mp-body-img { max-height: 420px; }
}

@media (max-width: 600px) {
  .mp-topbar-value { font-size: .92rem; }
  .mp-map-head h1 { font-size: 1.32rem; }
  .mp-lesson-img { max-height: 220px; }
  .mp-quiz { padding: 18px; }
  .mp-quiz-question { font-size: .96rem; }
  .mp-option { padding: 11px 13px; font-size: .86rem; }
  .mp-lives { font-size: .95rem; }
  .mp-node-panel { padding: 18px; }
  .mp-repair-img { max-width: 100%; }
  .mp-body-img { max-height: 320px; }
  .mp-node-marker { width: 30px; height: 30px; }
}
