/* Start custom CSS for html, class: .elementor-element-69517d8 */<style>
:root{
  --pupa-primary:#7723D8;
  --pupa-primary-dark:#4E2278;
  --pupa-black:#2D2D2D;
  --pupa-gray:#c6c6c6;
}
.lc-hero h1{font-size:clamp(28px,3.4vw,48px);color:var(--pupa-black);margin:0 0 8px}
.lc-hero p{font-size:clamp(16px,1.6vw,20px);color:#444;margin:0 0 16px}
.lc-btn{display:inline-block;padding:12px 18px;border-radius:12px;background:linear-gradient(135deg,var(--pupa-primary),var(--pupa-primary-dark));color:#fff;text-decoration:none;font-weight:600}
.lc-btn[disabled]{opacity:.45;pointer-events:none}
.lc-muted{color:#666}
.lc-section{margin:28px 0}
.lc-card{border:1px solid #eee;border-radius:16px;padding:16px;background:#fff}
.lc-grid{display:grid;gap:16px}
@media (min-width:768px){.lc-grid.cols-2{grid-template-columns:repeat(2,1fr)}}
@media (min-width:992px){.lc-grid.cols-3{grid-template-columns:repeat(3,1fr)}}
.lc-stepper{display:flex;gap:12px;justify-content:center;margin:16px 0 8px}
.lc-step{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:2px solid #bbb;opacity:.45;background:#fff;font-weight:700}
.lc-step.active{border-color:var(--pupa-primary-dark);opacity:1}
.lc-step.done{border-color:var(--pupa-primary-dark);background:var(--pupa-primary-dark);color:#fff;opacity:1}
.lc-progress{height:10px;background:#eee;border-radius:6px;overflow:hidden}
.lc-progress > span{display:block;height:10px;width:0;background:var(--pupa-primary)}
.lc-badge{display:flex;align-items:center;gap:12px;border:1px dashed #ddd;padding:12px;border-radius:12px}
.lc-badge .dot{width:16px;height:16px;border-radius:50%;background:#bbb}
.lc-badge.unlocked{border-style:solid;border-color:var(--pupa-primary)}
.lc-badge.unlocked .dot{background:var(--pupa-primary)}
.lc-quiz .q{margin-bottom:14px}
.lc-quiz .fb{margin-top:6px;font-size:.95em}
.lc-quiz.ok{border-left:4px solid #28a745;padding-left:8px}
.lc-quiz.ko{border-left:4px solid #dc3545;padding-left:8px}
.lc-hint{font-size:.95em;color:#666}
.no-print{display:block}
@media print {.no-print{display:none}}
</style>

<script>
/* --- Camino Líder Coach - Core --- */
(function(w,d){
  const KEY='lc_state_v1';
  const TOTAL=4;
  const init={units:[false,false,false,false], badges:{}, notes:{}};
  function read(){try{return JSON.parse(localStorage.getItem(KEY))||structuredClone(init);}catch(e){return structuredClone(init);}}
  function save(s){localStorage.setItem(KEY,JSON.stringify(s));}
  function pct(s){const c=s.units.filter(Boolean).length;return Math.round(c/TOTAL*100);}
  function render(){
    const s=read();
    // stepper circles
    d.querySelectorAll('[data-lc-step]').forEach(el=>{
      const n=Number(el.getAttribute('data-lc-step'));// 1..4
      const done = s.units.slice(0,n).every(Boolean);
      const prevDone = n===1 ? true : s.units[n-2]===true;
      el.classList.toggle('done', done);
      el.classList.toggle('active', !done && prevDone);
    });
    // progress bars
    d.querySelectorAll('[data-lc-progress]').forEach(el=>{
      const bar=el.querySelector('span'); if(bar){ bar.style.width=pct(s)+'%'; }
      const t=el.querySelector('[data-lc-progress-text]'); if(t){ t.textContent=(s.units.filter(Boolean).length+'/'+TOTAL); }
    });
    // badges
    d.querySelectorAll('[data-lc-badge]').forEach(el=>{
      const id=el.getAttribute('data-lc-badge'); el.classList.toggle('unlocked', !!s.badges[id]);
    });
    // gate buttons/links
    d.querySelectorAll('[data-lc-require-unit]').forEach(el=>{
      const need=Number(el.getAttribute('data-lc-require-unit')); // needs unit X done
      const ok = (need<=0) ? true : s.units[need-1]===true;
      if(!ok){ el.setAttribute('disabled','disabled'); el.classList.add('is-locked'); }
      else { el.removeAttribute('disabled'); el.classList.remove('is-locked'); }
    });
    // notes to display (if any consumer)
    d.querySelectorAll('[data-lc-note-display]').forEach(el=>{
      const unit=el.getAttribute('data-lc-note-display');
      const key = el.getAttribute('data-lc-note-key');
      const val = (s.notes?.[unit]?.[key])||'';
      el.textContent = val;
    });
  }
  function guard(requiredPrev){ // requiredPrev: number (1..3), ensures previous unit completed
    const s=read();
    if(requiredPrev>0 && !s.units[requiredPrev-1]){
      alert('Este tramo se desbloquea al completar la misión anterior.');
      location.href='/camino-lider-coach';
    }
  }
  w.LC={
    get:read, save,
    markDone:(unitIndex)=>{const s=read(); s.units[unitIndex-1]=true; save(s); render();},
    earn:(badgeId)=>{const s=read(); s.badges[badgeId]=true; save(s); render();},
    saveNote:(unitKey,key,val)=>{const s=read(); s.notes[unitKey]=s.notes[unitKey]||{}; s.notes[unitKey][key]=val; save(s);},
    progressPct:()=>pct(read()),
    guard, render
  };
  d.addEventListener('DOMContentLoaded', render);
})(window,document);
</script>/* End custom CSS */