/* Método M.A.P.A. — identidade visual da arte do curso:
   marinho profundo, ciano neon, laranja (marcadores) e creme (títulos). */
#mapa-screen {
  --m-bg: #040f22; --m-panel: rgba(8,33,63,.72);
  --m-cyan: #42e3ff; --m-cyan-soft: rgba(66,227,255,.28); --m-cyan-faint: rgba(66,227,255,.14);
  --m-orange: #ff8a2b; --m-amber: #ffc857; --m-cream: #fff6b0; --m-pink: #ff4d8d;
  --m-text: #e9f6ff; --m-muted: #8fb7d6; --m-green: #2ee59d;
  --m-font: 'Montserrat', 'Nunito', system-ui, sans-serif;

  position: relative;
  max-width: 760px;
  margin: .5rem auto;
  padding-left: 1rem; padding-right: 1rem;
  border-radius: 20px;
  color: var(--m-text);
  background:
    linear-gradient(180deg, rgba(4,15,34,.90), rgba(5,20,42,.96)),
    url('/assets/img/mapa_bg.jpg') center top / cover no-repeat;
  border: 1px solid var(--m-cyan-soft);
  box-shadow: 0 0 40px rgba(66,227,255,.12), inset 0 0 60px rgba(66,227,255,.05);
}
/* cantos de "painel tecnológico", como na moldura da arte */
#mapa-screen::before, #mapa-screen::after {
  content: ''; position: absolute; width: 26px; height: 26px; pointer-events: none;
  border: 2px solid var(--m-cyan); opacity: .8; filter: drop-shadow(0 0 6px var(--m-cyan));
}
#mapa-screen::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
#mapa-screen::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }

#mapa-screen .prog-nav .btn, #mapa-screen .btn-ghost {
  background: transparent; color: var(--m-cyan); border: 1px solid rgba(66,227,255,.4);
}
#mapa-screen .btn-ghost:hover { background: var(--m-cyan-faint); box-shadow: 0 0 14px rgba(66,227,255,.25); }
#mapa-screen .btn-primary {
  background: linear-gradient(135deg, var(--m-cyan), #1b9bff); color: #021426; font-weight: 800;
  box-shadow: 0 0 18px rgba(66,227,255,.35); border: 0;
}
#mapa-screen .btn-primary:disabled { opacity: .4; box-shadow: none; }
#mapa-screen .prog-loading { color: var(--m-muted); }

/* ---- banner de entrada na tela inicial ---- */
.mapa-entry { margin-bottom: 1.5rem; border-radius: 18px; overflow: hidden; cursor: pointer; background: #040f22;
  border: 1px solid rgba(66,227,255,.38); box-shadow: 0 0 26px rgba(66,227,255,.16); transition: box-shadow .2s, transform .15s; }
.mapa-entry:hover { box-shadow: 0 0 36px rgba(66,227,255,.34); transform: translateY(-2px); }
.mapa-entry img { display: block; width: 100%; height: auto; }
.mapa-entry-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  background: linear-gradient(90deg, rgba(8,33,63,.97), rgba(4,15,34,.97)); }
.mapa-entry-body p { margin: 0; color: #9cc4e0; font-size: .85rem; line-height: 1.4; }
.mapa-entry-body p b { color: #e9f6ff; font-size: .95rem; }
.mapa-entry .btn-primary { flex: none; background: linear-gradient(135deg, #ff8a2b, #ffc857); color: #2b1300; font-weight: 800;
  box-shadow: 0 0 16px rgba(255,138,43,.4); border: 0; }
@media (max-width: 520px) { .mapa-entry-body { flex-direction: column; align-items: stretch; text-align: center; } }

.mapa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- arte do curso (lista de unidades) ---- */
.mapa-hero { margin: 0 0 1rem; border-radius: 16px; overflow: hidden; border: 1px solid var(--m-cyan-soft);
  box-shadow: 0 0 28px rgba(66,227,255,.18); }
.mapa-hero img { display: block; width: 100%; height: auto; }
.mapa-count { text-align: center; color: var(--m-muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin: -.2rem 0 .8rem; }
.mapa-count b { color: var(--m-orange); }

/* ---- cabeçalho de unidade ---- */
.mapa-head { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; margin-bottom: 1rem;
  border: 1px solid var(--m-cyan-soft); box-shadow: 0 0 24px rgba(66,227,255,.12);
  background: linear-gradient(90deg, rgba(4,15,34,.96) 38%, rgba(4,15,34,.55) 100%),
              url('/assets/img/mapa_bg.jpg') right center / cover no-repeat; }
.mapa-head-text { flex: 1; min-width: 0; }
.mapa-head small:first-child { color: var(--m-cyan); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mapa-head small:last-child { color: var(--m-muted); font-size: .8rem; }
.mapa-head h1 { font-family: var(--m-font); font-weight: 800; font-size: clamp(1.35rem, 4.6vw, 1.9rem); line-height: 1.12;
  margin: 4px 0; color: var(--m-cream); text-shadow: 0 0 18px rgba(255,246,176,.25); }
.mapa-head h1 b { color: var(--m-orange); }
.mapa-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid var(--m-cyan); box-shadow: 0 0 14px rgba(66,227,255,.5); }
.mapa-logo-sm { width: 28px; height: 28px; border-width: 1px; box-shadow: none; }
.mapa-pct { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  padding: 4px; overflow: hidden; line-height: 1.05; font-family: var(--m-font); font-weight: 800; font-size: .95rem;
  color: var(--m-cyan); background: rgba(66,227,255,.08); border: 2px solid var(--m-cyan);
  box-shadow: 0 0 14px rgba(66,227,255,.45), inset 0 0 10px rgba(66,227,255,.2); text-shadow: 0 0 8px rgba(66,227,255,.6); }

.mapa-intro p, .mapa-msg { color: var(--m-muted); }
.mapa-msg { text-align: center; padding: 2rem 1rem; }
.mapa-upsell { background: rgba(255,200,87,.08); border: 1px solid rgba(255,200,87,.35); border-radius: 12px; padding: .7rem 1rem; color: var(--m-text) !important; }
.mapa-review-btn { width: 100%; margin: 1rem 0 0; }

/* ---- lista de unidades ---- */
.mapa-cards { display: grid; gap: 10px; margin-top: 1rem; }
.mapa-card { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: linear-gradient(90deg, rgba(8,33,63,.85), rgba(8,33,63,.5)); border: 1px solid rgba(66,227,255,.22);
  color: var(--m-text); border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; font-weight: 700;
  transition: border-color .2s, box-shadow .2s, transform .15s; }
.mapa-card:hover { border-color: var(--m-cyan); box-shadow: 0 0 18px rgba(66,227,255,.25); transform: translateY(-1px); }
.mapa-card.is-locked { opacity: .55; filter: saturate(.55); }
.mapa-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mapa-card-title { font-size: .98rem; line-height: 1.25; }
.mapa-card em { font-style: normal; font-size: .68rem; background: var(--m-green); color: #032; border-radius: 99px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.mapa-card-status { color: var(--m-muted); font-weight: 600; font-size: .8rem; flex: none; text-align: right; }

/* marcador numerado (pin) */
.mapa-card-pin { flex: none; width: 30px; height: 30px; margin: 0 4px 0 2px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #ffb35c, var(--m-orange));
  box-shadow: 0 0 12px rgba(255,138,43,.55); }
.mapa-card-pin i { transform: rotate(45deg); font-style: normal; font-weight: 800; font-size: .78rem; color: #3a1a00; }
.mapa-card-pin.is-passed { background: radial-gradient(circle at 40% 35%, #8af1ff, var(--m-cyan)); box-shadow: 0 0 12px rgba(66,227,255,.6); }
.mapa-card-pin.is-passed i { color: #032a3a; }
.mapa-card.is-locked .mapa-card-pin { background: #34506b; box-shadow: none; }
.mapa-card.is-locked .mapa-card-pin i { color: #9db8d0; }
.mapa-dots { display: inline-flex; gap: 5px; }
.mapa-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(66,227,255,.4); background: transparent; }
.mapa-dots i.on { background: var(--m-orange); border-color: var(--m-orange); box-shadow: 0 0 6px rgba(255,138,43,.8); }

/* ---- trilha de progresso (4 marcadores) ---- */
.mapa-progress { margin-bottom: 1rem; text-align: center; }
.mapa-progress small { color: var(--m-muted); }
.mapa-trail { display: flex; align-items: flex-start; margin: .2rem 0 .5rem; }
.mapa-pin { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer; font: inherit; color: var(--m-muted); padding: 4px 0; }
.mapa-pin::after { content: ''; position: absolute; top: 18px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 3px; border-radius: 3px;
  background: rgba(66,227,255,.18); }
.mapa-pin:last-child::after { display: none; }
.mapa-pin.is-done::after { background: linear-gradient(90deg, var(--m-orange), var(--m-cyan)); box-shadow: 0 0 8px rgba(255,138,43,.55); }
.mapa-pin-dot { width: 28px; height: 28px; margin-top: 4px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center;
  border: 2px solid rgba(66,227,255,.4); background: rgba(8,33,63,.9); }
.mapa-pin-dot b { transform: rotate(45deg); font-size: .78rem; color: var(--m-muted); }
.mapa-pin.is-done .mapa-pin-dot { background: radial-gradient(circle at 40% 35%, #ffb35c, var(--m-orange)); border-color: #ffd9a0; box-shadow: 0 0 14px rgba(255,138,43,.7); }
.mapa-pin.is-done .mapa-pin-dot b { color: #3a1a00; }
.mapa-pin.is-next .mapa-pin-dot { border-color: var(--m-cyan); box-shadow: 0 0 14px rgba(66,227,255,.7); animation: mapa-pulse 1.8s ease-in-out infinite; }
.mapa-pin.is-next .mapa-pin-dot b { color: var(--m-cyan); }
.mapa-pin-label { font-size: .7rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.mapa-pin.is-done .mapa-pin-label { color: var(--m-cream); }
.mapa-pin.is-next .mapa-pin-label { color: var(--m-cyan); }
@keyframes mapa-pulse { 50% { box-shadow: 0 0 22px rgba(66,227,255,.95); } }
@media (prefers-reduced-motion: reduce) { .mapa-pin.is-next .mapa-pin-dot { animation: none; } }

/* ---- etapas M · A · P · A ---- */
.mapa-step { display: grid; grid-template-columns: 56px 1fr; gap: 0 14px; padding: 22px 0 8px; border-top: 1px solid var(--m-cyan-faint); scroll-margin-top: 12px; }
.mapa-letter { font-family: var(--m-font); font-size: 3.4rem; font-weight: 800; line-height: .9; text-align: center; color: var(--m-green);
  text-shadow: 0 0 18px rgba(46,229,157,.55); }
.mapa-step[data-phase="mapear"] .mapa-letter { color: var(--m-orange); text-shadow: 0 0 18px rgba(255,138,43,.65); }
.mapa-step[data-phase="aprender"] .mapa-letter { color: #ffa64d; text-shadow: 0 0 18px rgba(255,166,77,.6); }
.mapa-step[data-phase="praticar"] .mapa-letter { color: var(--m-cyan); text-shadow: 0 0 18px rgba(66,227,255,.65); }
.mapa-step[data-phase="aprofundar"] .mapa-letter { color: var(--m-amber); text-shadow: 0 0 18px rgba(255,200,87,.6); }
.mapa-step-body { min-width: 0; }
.mapa-step-body h2 { font-family: var(--m-font); font-weight: 800; font-size: 1.45rem; margin: 0; color: var(--m-cream); }
.mapa-step-body h3 { margin: 16px 0 6px; color: var(--m-cyan); font-size: 1.02rem; }
.mapa-sub { color: var(--m-muted); font-size: .9rem; margin: 2px 0 10px; }
.mapa-step p, .mapa-step li, .mapa-q p { line-height: 1.55; }
.mapa-step ul { padding-left: 20px; }
.mapa-step li::marker { color: var(--m-cyan); }

.mapa-box { background: rgba(66,227,255,.07); border: 1px solid rgba(66,227,255,.16); border-left: 4px solid var(--m-cyan);
  border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.mapa-box--warn { background: rgba(255,138,43,.1); border-color: rgba(255,138,43,.25); border-left-color: var(--m-orange); }
.mapa-box--ok { background: rgba(46,229,157,.09); border-color: rgba(46,229,157,.25); border-left-color: var(--m-green); }
.mapa-formula { font-weight: 700; font-size: 1.12rem; margin: 2px 0; color: var(--m-cream); text-shadow: 0 0 12px rgba(255,246,176,.18); }
.mapa-fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.1; margin: 0 3px; }
.mapa-fr i { font-style: normal; padding: 0 4px; }
.mapa-fr i:first-child { border-bottom: 2px solid currentColor; }
.mapa-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.mapa-tags span { background: rgba(66,227,255,.08); border: 1px solid rgba(66,227,255,.3); color: var(--m-cream); border-radius: 99px; padding: 3px 12px; font-size: .82rem; }
.mapa-chk { list-style: none; padding-left: 0 !important; }
.mapa-chk label { cursor: pointer; }
.mapa-chk input { accent-color: var(--m-cyan); }
.mapa-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mapa-cmp .mapa-box { margin: 0; }
.mapa-alg { font-family: ui-monospace, Consolas, monospace; font-weight: 700; white-space: pre; overflow-x: auto; margin: 6px 0; color: var(--m-cream); }
.mapa-alg small { font-family: inherit; font-weight: 400; color: var(--m-muted); white-space: normal; }
.mapa-table-wrap { overflow-x: auto; }
.mapa-table { border-collapse: collapse; margin: 6px 0; }
.mapa-table td, .mapa-table th { border: 1px solid rgba(66,227,255,.25); padding: 4px 12px; text-align: center; }
.mapa-table th { background: rgba(66,227,255,.12); color: var(--m-cream); }
.mapa-step details { margin: 8px 0; }
.mapa-step summary { cursor: pointer; font-weight: 700; color: var(--m-cyan); }
.mapa-practice { display: flex; gap: 10px; margin: 8px 0; }
.mapa-practice > span { flex: none; }

/* ---- questões ---- */
.mapa-q { margin: 14px 0; }
.mapa-q-text { font-weight: 700; }
.mapa-chip { display: inline-block; font-size: .68rem; border-radius: 99px; padding: 1px 9px; font-weight: 800; color: #04121f; letter-spacing: .02em; }
.mapa-chip--basico { background: var(--m-green); }
.mapa-chip--medio { background: var(--m-amber); }
.mapa-chip--aprofundado { background: var(--m-pink); color: #fff; }
.mapa-alts { list-style: none; padding: 0 !important; }
.mapa-alts li { margin: 6px 0; }
.mapa-alts button { display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--m-text);
  background: rgba(8,33,63,.75); border: 1px solid rgba(66,227,255,.22); border-radius: 10px; padding: 9px 12px;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.mapa-alts button:hover:not(:disabled) { border-color: var(--m-cyan); box-shadow: 0 0 12px rgba(66,227,255,.22); }
.mapa-alts button.is-picked { border-color: var(--m-cyan); background: rgba(66,227,255,.16); box-shadow: 0 0 14px rgba(66,227,255,.35); }
.mapa-alts button.right { background: rgba(46,229,157,.15); border-color: var(--m-green); opacity: 1; box-shadow: 0 0 12px rgba(46,229,157,.25); }
.mapa-alts button.wrong { background: rgba(255,138,43,.15); border-color: var(--m-orange); }
.mapa-alts button:disabled { cursor: default; opacity: .85; }
.mapa-errors .btn { margin: 0 6px 6px 0; }
.mapa-errors .is-picked { border-color: var(--m-orange); background: rgba(255,138,43,.18); color: var(--m-cream); }
.mapa-done { margin: 12px 0; }
.mapa-done.is-done { color: var(--m-green); border-color: rgba(46,229,157,.5); }
.mapa-foot { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid var(--m-cyan-faint); color: var(--m-muted); font-size: .85rem; }

@media (max-width: 520px) {
  #mapa-screen { border-radius: 16px; padding-left: .75rem; padding-right: .75rem; }
  .mapa-step { grid-template-columns: 40px 1fr; }
  .mapa-letter { font-size: 2.5rem; }
  .mapa-cmp { grid-template-columns: 1fr; }
  .mapa-logo, .mapa-pct { width: 48px; height: 48px; }
  .mapa-pct { font-size: .75rem; }
  .mapa-card-status { font-size: .72rem; }
  .mapa-pin-label { font-size: .6rem; }
}
