:root{
  --chalkboard:#1E3A2F;
  --chalkboard-dark:#142A20;
  --chalk:#F6F2E7;
  --pencil:#F0B429;
  --pencil-dark:#C98F14;
  --marker:#E24E36;
  --blue:#2F5F8A;
  --ink:#16261D;
  --ink-soft:#4A5D51;
  --line:#DCD3BC;
  --green:#25824B;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--chalk);
  color:var(--ink);
  font-family:'Inter',sans-serif;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.display{font-family:'Fredoka',sans-serif;font-weight:600;letter-spacing:-0.01em;margin:0;}
.mono{font-family:'Space Mono',monospace;}
a{color:inherit;text-decoration:none;}
img,svg{display:block;max-width:100%;}
button{font-family:inherit;cursor:pointer;}
ul{margin:0;padding:0;list-style:none;}
.hidden{display:none !important;}

.container{max-width:1120px;margin:0 auto;padding:0 28px;}
.section{padding:96px 0;}
.section-eyebrow, .eyebrow{
  font-family:'Space Mono',monospace;text-transform:uppercase;letter-spacing:.14em;
  font-size:12px;color:var(--pencil-dark);display:inline-block;margin-bottom:14px;
}
.eyebrow--blue{color:var(--blue);}
.eyebrow--green{color:var(--chalkboard);}
.section-header{max-width:600px;margin:0 auto 48px;text-align:center;}
.section-header p{color:var(--ink-soft);margin-top:12px;font-size:15px;line-height:1.6;}
.highlight{color:var(--marker);}
.highlight-blue{color:var(--blue);}
.highlight-yellow{background:linear-gradient(180deg, transparent 60%, rgba(240,180,41,0.45) 60%);}

.btn-primary, .btn-nav, .btn-secondary, .btn-cta, .btn-curso, .btn-submit, .btn-mobile{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border-radius:8px;padding:12px 22px;font-size:14px;font-weight:600;border:1px solid transparent;
  transition:transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary, .btn-nav, .btn-cta, .btn-curso, .btn-submit{background:var(--pencil);color:var(--ink);}
.btn-primary:hover, .btn-nav:hover, .btn-cta:hover, .btn-curso:hover, .btn-submit:hover{background:var(--pencil-dark);}
.btn-secondary{background:transparent;color:var(--chalk);border-color:rgba(246,242,231,0.4);}
.btn-secondary:hover{background:var(--chalk);color:var(--ink);}
.btn-mobile{width:100%;margin-top:8px;}
a:active, button:active{transform:translateY(1px);}


/* ---------- modo oscuro ---------- */
.theme-toggle{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(246,242,231,0.22);
  border-radius:10px;
  background:rgba(246,242,231,0.08);
  color:var(--chalk);
  font-size:18px;
  transition:transform .15s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover{
  background:rgba(246,242,231,0.16);
  border-color:rgba(246,242,231,0.35);
}
.mobile-theme-toggle{
  width:100%;
  height:auto;
  padding:11px 16px;
  font-size:14px;
  justify-content:flex-start;
  gap:8px;
  margin-top:2px;
}
html[data-theme="dark"]{
  --chalk:#17201B;
  --chalkboard:#0E2118;
  --chalkboard-dark:#08150F;
  --ink:#F1F3EE;
  --ink-soft:#E0E7E2;
  --line:#34443A;
  --blue:#6FA3D1;
  --pencil:#F0B429;
  --pencil-dark:#DDA11B;
  --marker:#F06A52;
  --green:#62C58A;
}
html[data-theme="dark"] body{
  background:var(--chalk);
  color:var(--ink);
}
html[data-theme="dark"] .stats,
html[data-theme="dark"] .section:not(.cursos){
  background:var(--chalk);
}
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .testi-card,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .profile-stat{
  background:#202A24;
  color:var(--ink);
  border-color:var(--line);
}
html[data-theme="dark"] .curso-card,
html[data-theme="dark"] .card-index{
  background:#202A24;
  color:var(--ink);
}
html[data-theme="dark"] .card-index::before{
  background-image:repeating-linear-gradient(180deg, transparent 0 27px, var(--line) 27px 28px);
}
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select{
  background:#121A15;
  color:var(--ink);
  border-color:var(--line);
}
html[data-theme="dark"] .widget-tab{
  background:rgba(246,242,231,0.07);
  color:var(--ink-soft);
}
html[data-theme="dark"] .widget-tab.active{
  background:var(--chalkboard);
  color:var(--chalk);
}
html[data-theme="dark"] .tab-btn.active{
  background:#2A342E;
  color:var(--ink);
}
html[data-theme="dark"] .ring-bg{
  stroke:rgba(246,242,231,0.12);
}
html[data-theme="dark"] .btn-secondary{
  color:var(--ink);
  border-color:rgba(241,243,238,0.35);
}
html[data-theme="dark"] .btn-secondary:hover{
  background:var(--ink);
  color:#0E2118;
}
html[data-theme="dark"] .btn-cta{
  background:#202A24;
  color:var(--ink);
}
html[data-theme="dark"] .btn-cta:hover{
  background:#2A342E;
}
html[data-theme="dark"] .back-link:hover{
  color:var(--ink);
}
html[data-theme="dark"] .highlight-yellow{
  background:linear-gradient(180deg, transparent 60%, rgba(240,180,41,0.28) 60%);
}

/* ---------- navbar ---------- */
.navbar{position:sticky;top:0;z-index:50;background:var(--chalkboard);border-bottom:1px solid rgba(246,242,231,0.12);}
.nav-inner{display:flex;align-items:center;gap:28px;padding:14px 28px;}
.nav-logo{width:38px;height:38px;border-radius:10px;}
.nav-links{display:flex;gap:26px;margin-right:auto;margin-left:8px;font-size:14px;color:rgba(246,242,231,0.75);}
.nav-links a:hover{color:var(--chalk);}
.hamburger{display:none;background:none;border:none;color:var(--chalk);font-size:22px;}
.mobile-menu{display:flex;flex-direction:column;gap:14px;padding:18px 28px 24px;background:var(--chalkboard-dark);color:var(--chalk);font-size:15px;}
.mobile-menu a{color:rgba(246,242,231,0.85);}

/* ---------- hero ---------- */
.hero{background:radial-gradient(circle at 85% 15%, rgba(240,180,41,0.10), transparent 45%), var(--chalkboard);color:var(--chalk);position:relative;overflow:hidden;}
.hero::before{content:"";position:absolute;inset:0;background-image:repeating-linear-gradient(0deg, rgba(246,242,231,0.035) 0px, rgba(246,242,231,0.035) 1px, transparent 1px, transparent 42px);pointer-events:none;}
.hero-inner{display:grid;grid-template-columns:1.1fr 0.9fr;gap:56px;align-items:center;padding:80px 28px 90px;position:relative;}
.hero-text h1{font-size:clamp(34px,5vw,54px);line-height:1.08;margin:16px 0 20px;}
.hero-text p{font-size:17px;line-height:1.6;color:rgba(246,242,231,0.8);max-width:480px;margin:0 0 32px;}
.hero-btns{display:flex;gap:14px;flex-wrap:wrap;}

/* index card / notebook motif (signature element) */
.card-index{background:var(--chalk);color:var(--ink);border-radius:6px;border-left:5px solid var(--marker);box-shadow:0 22px 44px rgba(0,0,0,0.28);position:relative;}
.card-index::before{content:"";position:absolute;left:34px;right:18px;top:0;bottom:0;background-image:repeating-linear-gradient(180deg, transparent 0 27px, var(--line) 27px 28px);pointer-events:none;}

.timer-card{padding:26px 26px 30px;}
.widget-tabs{display:flex;gap:8px;margin-bottom:20px;position:relative;z-index:1;}
.widget-tab{flex:1;text-align:center;padding:8px 6px;border-radius:6px;font-size:13px;font-weight:600;background:rgba(20,42,32,0.06);color:var(--ink-soft);border:none;}
.widget-tab.active{background:var(--chalkboard);color:var(--chalk);}
.timer-face{position:relative;width:190px;height:190px;margin:6px auto 18px;z-index:1;}
.timer-ring{width:100%;height:100%;transform:rotate(-90deg);}
.ring-bg{fill:none;stroke:rgba(20,42,32,0.10);stroke-width:10;}
.ring-progress{fill:none;stroke:var(--marker);stroke-width:10;stroke-linecap:round;stroke-dasharray:565.48;stroke-dashoffset:0;transition:stroke-dashoffset .3s linear, stroke .3s ease;}
.timer-time{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:'Space Mono',monospace;font-size:38px;font-weight:700;color:var(--ink);}
.timer-controls{display:flex;gap:10px;justify-content:center;position:relative;z-index:1;}
.timer-caption{text-align:center;font-size:12px;color:var(--ink-soft);margin-top:14px;font-family:'Space Mono',monospace;position:relative;z-index:1;}

/* ---------- stats / ficha ---------- */
.stats{background:var(--chalk);border-bottom:1px solid var(--line);}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;padding:36px 0;}
.stat-card{text-align:center;border-right:1px dashed var(--line);padding:0 12px;}
.stat-card:last-child{border-right:none;}
.stat-num{display:block;font-family:'Space Mono',monospace;font-size:30px;font-weight:700;color:var(--chalkboard);}
.stat-label{display:block;font-size:12.5px;color:var(--ink-soft);margin-top:4px;}

/* ---------- nosotros ---------- */
.nosotros-inner{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:start;}
.nosotros-text p{color:var(--ink-soft);line-height:1.65;font-size:15.5px;margin:16px 0 24px;}
.features-list li{display:flex;align-items:center;gap:12px;font-size:14.5px;padding:10px 0;border-top:1px solid var(--line);}
.features-list li:first-child{border-top:none;}
.feat-icon{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;}
.feat-yellow{background:rgba(240,180,41,0.18);}
.feat-blue{background:rgba(47,95,138,0.14);}
.feat-green{background:rgba(30,58,47,0.10);}
.feat-pink{background:rgba(226,78,54,0.12);}

.nosotros-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.info-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:22px 20px;border-top:4px solid var(--pencil);}
.info-card.card-blue{border-top-color:var(--blue);}
.info-card.card-green{border-top-color:var(--chalkboard);}
.info-card.card-coral{border-top-color:var(--marker);}
.card-icon{font-size:20px;margin-bottom:10px;}
.info-card h3{font-size:15px;margin-bottom:6px;}
.info-card p{font-size:13px;color:var(--ink-soft);line-height:1.5;margin:0;}

/* ---------- cursos ---------- */
.cursos{background:var(--chalkboard);color:var(--chalk);}
.cursos .section-header p{color:rgba(246,242,231,0.7);}
.cursos-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.curso-card{background:var(--chalk);color:var(--ink);border-radius:8px;padding:24px 22px;position:relative;}
.curso-badge{position:absolute;top:16px;right:16px;font-family:'Space Mono',monospace;font-size:10px;text-transform:uppercase;letter-spacing:.06em;padding:4px 9px;border-radius:20px;}
.badge-blue{background:rgba(47,95,138,0.15);color:var(--blue);}
.badge-green{background:rgba(30,58,47,0.12);color:var(--chalkboard);}
.badge-yellow{background:rgba(240,180,41,0.2);color:var(--pencil-dark);}
.curso-icon{font-size:26px;margin-bottom:14px;}
.curso-card h3{font-size:16.5px;margin-bottom:8px;line-height:1.3;}
.curso-card p{font-size:13.5px;color:var(--ink-soft);line-height:1.55;margin:0 0 16px;}
.curso-meta{display:flex;gap:16px;font-size:12px;color:var(--ink-soft);font-family:'Space Mono',monospace;margin-bottom:18px;}
.btn-curso{width:100%;}

/* ---------- testimonios ---------- */
.testi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.testi-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:24px 22px;}
.testi-featured{background:var(--chalkboard);color:var(--chalk);border-color:transparent;}
.testi-featured .testi-author span{color:rgba(246,242,231,0.65);}
.stars{color:var(--pencil-dark);letter-spacing:2px;margin-bottom:12px;}
.testi-featured .stars{color:var(--pencil);}
.testi-card p{font-size:14.5px;line-height:1.6;margin:0 0 20px;}
.testi-author{display:flex;align-items:center;gap:12px;}
.avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Fredoka',sans-serif;font-weight:600;font-size:13px;color:#fff;flex-shrink:0;}
.av-blue{background:var(--blue);}
.av-green{background:var(--chalkboard);}
.av-yellow{background:var(--pencil-dark);}
.testi-author strong{display:block;font-size:14px;}
.testi-author span{font-size:12px;color:var(--ink-soft);}

/* ---------- cta ---------- */
.cta-section{background:linear-gradient(120deg, var(--marker), var(--pencil-dark));color:var(--chalk);}
.cta-inner{text-align:center;padding:60px 0;}
.cta-inner h2{font-size:clamp(24px,3.4vw,34px);margin-bottom:12px;}
.cta-inner p{font-size:15px;color:rgba(246,242,231,0.9);margin-bottom:26px;}
.btn-cta{background:var(--chalk);color:var(--ink);}
.btn-cta:hover{background:#fff;}

/* ---------- contacto ---------- */
.contacto-inner{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:start;}
.contacto-text p{color:var(--ink-soft);line-height:1.6;font-size:15px;margin:16px 0 26px;}
.contact-item{display:flex;align-items:center;gap:10px;font-size:14.5px;padding:10px 0;border-top:1px solid var(--line);}
.contact-item:first-child{border-top:none;}
.contact-form{background:#fff;border:1px solid var(--line);border-radius:10px;padding:28px;}
.form-group{margin-bottom:16px;}
.form-group label{display:block;font-size:12.5px;font-weight:600;color:var(--ink-soft);margin-bottom:6px;}
.form-group input, .form-group textarea{width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:6px;font-family:inherit;font-size:14px;color:var(--ink);background:var(--chalk);resize:vertical;}
.form-group input:focus, .form-group textarea:focus{outline:2px solid var(--pencil-dark);outline-offset:1px;}
.btn-submit{width:100%;justify-content:center;padding:13px;}
.form-success{margin-top:14px;font-size:13.5px;color:var(--chalkboard);background:rgba(30,58,47,0.08);padding:10px 12px;border-radius:6px;}

/* ---------- footer ---------- */
.footer{background:var(--chalkboard-dark);color:rgba(246,242,231,0.65);}
.footer-inner{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:32px;padding:56px 0 36px;}
.footer-logo{width:34px;height:34px;border-radius:8px;margin-bottom:14px;}
.footer-brand p{font-size:13px;line-height:1.6;color:rgba(246,242,231,0.5);}
.footer-links h4{color:var(--chalk);font-size:13px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:14px;}
.footer-links a{display:block;font-size:13.5px;padding:6px 0;color:rgba(246,242,231,0.6);}
.footer-links a:hover{color:var(--chalk);}
.footer-bottom{border-top:1px solid rgba(246,242,231,0.1);text-align:center;padding:18px 0;font-size:12.5px;color:rgba(246,242,231,0.45);}

/* ---------- reveal ---------- */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none;}html{scroll-behavior:auto;}}

/* ---------- login page ---------- */
.auth-shell{min-height:calc(100vh - 66px);display:grid;grid-template-columns:1fr 1fr;}
.auth-side{background:var(--chalkboard);color:var(--chalk);padding:64px 56px;display:flex;flex-direction:column;justify-content:center;position:relative;overflow:hidden;}
.auth-side::before{content:"";position:absolute;inset:0;background-image:repeating-linear-gradient(0deg, rgba(246,242,231,0.035) 0px, rgba(246,242,231,0.035) 1px, transparent 1px, transparent 42px);pointer-events:none;}
.auth-side h2{font-size:clamp(26px,3vw,36px);line-height:1.2;margin-bottom:16px;position:relative;}
.auth-side p{color:rgba(246,242,231,0.75);font-size:15px;line-height:1.6;max-width:380px;position:relative;margin-bottom:28px;}
.auth-side .features-list{position:relative;}
.auth-side .features-list li{border-top-color:rgba(246,242,231,0.15);color:rgba(246,242,231,0.85);}
.auth-main{display:flex;align-items:center;justify-content:center;padding:56px 28px;}
.auth-card{width:100%;max-width:380px;}
.auth-card h1{font-size:26px;margin-bottom:6px;}
.auth-card .sub{color:var(--ink-soft);font-size:13.5px;margin-bottom:26px;}
.tabs{display:flex;gap:6px;margin-bottom:22px;background:rgba(20,42,32,0.06);border-radius:8px;padding:4px;}
.tab-btn{flex:1;padding:9px;border:none;background:transparent;border-radius:6px;font-size:13.5px;font-weight:600;color:var(--ink-soft);}
.tab-btn.active{background:#fff;color:var(--ink);box-shadow:0 2px 6px rgba(0,0,0,0.08);}
.field{margin-bottom:15px;}
.field label{display:block;font-size:12px;font-weight:600;margin-bottom:6px;color:var(--ink-soft);}
.field input, .field select{width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:6px;font-size:14px;font-family:inherit;background:#fff;color:var(--ink);}
.field input:focus, .field select:focus{outline:2px solid var(--pencil-dark);outline-offset:1px;}
.form-msg{font-size:13px;padding:10px 12px;border-radius:6px;margin-bottom:15px;display:none;}
.form-msg.show{display:block;}
.form-msg.error{background:rgba(226,78,54,0.1);color:#B4381F;}
.form-msg.ok{background:rgba(30,58,47,0.1);color:var(--chalkboard);}
.full-btn{width:100%;justify-content:center;padding:13px;}
.privacy-note{font-size:11.5px;color:var(--ink-soft);margin-top:18px;line-height:1.5;}
.back-link{font-size:13.5px;color:var(--ink-soft);display:inline-flex;align-items:center;gap:6px;margin-bottom:22px;}
.back-link:hover{color:var(--ink);}

.profile-role{display:inline-block;font-family:'Space Mono',monospace;font-size:11px;text-transform:uppercase;background:rgba(240,180,41,0.18);color:var(--pencil-dark);padding:3px 9px;border-radius:20px;margin-bottom:16px;}
.profile-stat{background:#fff;border:1px solid var(--line);border-radius:8px;padding:16px;margin:18px 0;display:flex;justify-content:space-between;align-items:center;}
.profile-stat .num{font-family:'Space Mono',monospace;font-size:26px;font-weight:700;}
.profile-stat .lbl{font-size:12px;color:var(--ink-soft);max-width:150px;text-align:right;line-height:1.4;}

/* ---------- responsive ---------- */
@media (max-width:960px){
  .nav-links{display:none;}
  .hamburger{display:block;}

  .hero-inner, .nosotros-inner, .contacto-inner{grid-template-columns:1fr;}
  .cursos-grid, .testi-grid{grid-template-columns:repeat(2,1fr);}
  .nosotros-cards{grid-template-columns:1fr 1fr;}
  .footer-inner{grid-template-columns:1fr 1fr;}
  .auth-shell{grid-template-columns:1fr;}
  .auth-side{padding:48px 32px;}
}
@media (max-width:640px){
  .section{padding:64px 0;}
  .cursos-grid, .testi-grid{grid-template-columns:1fr;}
  .nosotros-cards{grid-template-columns:1fr;}
  .stats-grid{grid-template-columns:repeat(2,1fr);row-gap:24px;}
  .stat-card{border-right:none;}
  .footer-inner{grid-template-columns:1fr;}
}


/* ---------- valoraciones ---------- */
.rating-section{background:var(--chalk);}
.rating-layout{max-width:900px;margin:0 auto;display:grid;grid-template-columns:280px 1fr;gap:28px;align-items:stretch;}
.rating-summary,.rating-form{background:var(--chalk);border:2px solid var(--ink);border-radius:14px;padding:28px;}
.rating-summary{text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;}
.rating-average{font-family:'Fredoka',sans-serif;font-size:64px;line-height:1;color:var(--ink);}
.rating-stars{font-size:25px;letter-spacing:3px;color:var(--pencil);margin:8px 0;}
.rating-summary p{color:var(--ink-soft);font-size:13px;margin:4px 0 0;}
.rating-form>label{display:block;font-weight:700;font-size:14px;margin-bottom:10px;}
.star-picker{display:flex;gap:4px;margin-bottom:22px;}
.star-picker button{border:0;background:transparent;color:#BFC5BE;font-size:34px;line-height:1;padding:0 2px;transition:transform .12s,color .12s;}
.star-picker button:hover,.star-picker button.selected{color:var(--pencil);}
.star-picker button:hover{transform:scale(1.12);}
.rating-form .form-group{margin-bottom:14px;}
.rating-form textarea{resize:vertical;min-height:80px;}
#rating-error{margin-top:12px;} #rating-error:not(.hidden){display:block;}

/* ---------- editor de perfil ---------- */
.profile-editor{margin:26px 0;border-top:1px solid var(--line);padding-top:24px;}
.profile-editor-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:16px;}
.profile-editor-head .eyebrow{margin-bottom:4px;}
.profile-editor h2{font-size:25px;}
.profile-save-state{font-size:12px;font-weight:600;text-align:right;max-width:220px;}
.profile-save-state.ok{color:#25824b;}
.profile-save-state.error{color:#B4381F;}

html[data-theme="dark"] .rating-summary,
html[data-theme="dark"] .rating-form,
html[data-theme="dark"] .profile-editor{background:#202A24;border-color:var(--line);}
html[data-theme="dark"] .star-picker button{color:#5A655E;}
html[data-theme="dark"] .star-picker button:hover,
html[data-theme="dark"] .star-picker button.selected{color:var(--pencil);}

/* ---------- modo oscuro: página de cursos ---------- */
html[data-theme="dark"] .course-hero{background:#0B1711;color:#F5F7F3;border-bottom-color:var(--marker);}
html[data-theme="dark"] .course-hero h1{color:#FFFFFF;}
html[data-theme="dark"] .course-description{color:#D7E4DB;}
html[data-theme="dark"] .course-meta-large{color:#F5F7F3;}
html[data-theme="dark"] .course-hero .back-link{color:#FFD45A;}
html[data-theme="dark"] .course-content{background:#101813;color:#F1F3EE;}
html[data-theme="dark"] .course-progress-card,
html[data-theme="dark"] .course-intro-card,
html[data-theme="dark"] .lesson-card,
html[data-theme="dark"] .syllabus-card,
html[data-theme="dark"] .lesson-dialog{
  background:#202A24;color:#F1F3EE;border-color:#46554B;
}
html[data-theme="dark"] .course-progress-card strong,
html[data-theme="dark"] .course-intro-card p,
html[data-theme="dark"] .syllabus-card h3,
html[data-theme="dark"] .syllabus-module-title strong,
html[data-theme="dark"] .lesson-card h3,
html[data-theme="dark"] .lesson-dialog h2{color:#FFFFFF;}
html[data-theme="dark"] .course-progress-card{color:#F1F3EE;}
html[data-theme="dark"] .progress-bar{background:#34443A;}
html[data-theme="dark"] .lesson-card{border-color:#46554B;}
html[data-theme="dark"] .lesson-card:hover{border-color:#B8C7BD;box-shadow:5px 5px 0 #0A120D;}
html[data-theme="dark"] .lesson-card p,
html[data-theme="dark"] .course-progress-card p,
html[data-theme="dark"] .syllabus-lesson{color:#C7D1CA;}
html[data-theme="dark"] .lesson-module,
html[data-theme="dark"] .lesson-kicker,
html[data-theme="dark"] .module-heading>span{color:#AEBBB2;}
html[data-theme="dark"] .module-heading h2{color:#FFFFFF;}
html[data-theme="dark"] .lesson-number{background:#34443A;color:#FFFFFF;}
html[data-theme="dark"] .syllabus-module{border-color:#46554B;}
html[data-theme="dark"] .syllabus-lesson:hover{color:#FFFFFF;}
html[data-theme="dark"] .syllabus-lesson.done{color:#70D69A;}
html[data-theme="dark"] .activity-box{background:#173126;border-left-color:var(--green);color:#F1F3EE;}
html[data-theme="dark"] .activity-box p{color:#D5E0D9;}
html[data-theme="dark"] .modal-close{color:#FFFFFF;}
html[data-theme="dark"] .lesson-text{color:#E1E7E3;}
html[data-theme="dark"] .lesson-actions .btn-secondary{color:#F1F3EE;border-color:#64736A;}
html[data-theme="dark"] .lesson-actions .btn-secondary:hover{background:#F1F3EE;color:#101813;}

@media(max-width:700px){
  .rating-layout{grid-template-columns:1fr;}
  .rating-summary{padding:22px;}
}


/* ---------- navegación de perfil ---------- */
.profile-nav{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:rgba(246,242,231,.9);}
.profile-nav:hover{color:var(--chalk);}
.profile-nav-icon{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:rgba(246,242,231,.12);border:1px solid rgba(246,242,231,.22);flex:0 0 auto;}
.profile-nav-icon svg{width:18px;height:18px;fill:currentColor;}
.profile-nav-mobile{padding:11px 0;justify-content:flex-start;}

/* ---------- accesibilidad y contraste global ---------- */
:root{
  --paper:#F7F4EA;
  --card:#FFFFFF;
  --muted:#5B6B61;
  --ink:#17231C;
  --chalkboard:#173A2A;
  --chalkboard-dark:#0E261B;
  --line:#D4CFBF;
}
body{color:var(--ink);}
.section-header p,.nosotros-text p,.info-card p,.stat-label,.timer-caption{color:#4F6056;}
.section-eyebrow,.eyebrow{color:#9A6700;}
.eyebrow--green{color:#176B42;}
.eyebrow--blue{color:#245D91;}
.highlight-blue{color:#245D91;}
.stat-num{color:#176B42;}

/* Formularios claros más legibles */
.field label,.form-group label{color:#26372D;font-weight:700;}
.field input,.field select,.form-group input,.form-group textarea{
  background:#FFFFFF;
  color:#17231C;
  border-color:#B8BFB8;
}
.field input::placeholder,.form-group input::placeholder,.form-group textarea::placeholder{color:#6A776F;}
.field input:focus,.field select:focus,.form-group input:focus,.form-group textarea:focus{
  outline:3px solid rgba(240,180,41,.24);border-color:#A96F00;
}

/* ---------- perfil: diseño independiente ---------- */
.profile-page{
  min-height:calc(100vh - 80px);
  padding:46px 0 88px;
  background:
    radial-gradient(circle at 8% 0%, rgba(240,180,41,.12), transparent 28%),
    linear-gradient(180deg,#F8F6EF 0%,#EFECE2 100%);
}
.profile-page-inner{max-width:1100px;}
.profile-page .back-link{
  display:inline-flex;align-items:center;gap:8px;
  color:#456154;font-weight:700;font-size:14px;
}
.profile-page .back-link:hover{color:#173A2A;}
.profile-loading{
  min-height:46vh;display:grid;place-items:center;text-align:center;
  color:#33463A;font-weight:700;
}
.profile-content{max-width:1050px;margin:0 auto;}
.profile-heading{
  position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  margin:24px 0 28px;padding:30px 32px;
  background:linear-gradient(135deg,#173A2A 0%,#24543D 100%);
  color:#FFFDF7;border-radius:24px;
  box-shadow:0 18px 38px rgba(23,58,42,.18);
}
.profile-heading::after{
  content:"";position:absolute;width:220px;height:220px;border-radius:50%;right:-70px;top:-100px;
  background:rgba(240,180,41,.16);pointer-events:none;
}
.profile-heading .eyebrow{color:#FFD45A;margin-bottom:8px;}
.profile-heading h1{font-size:clamp(30px,4vw,42px);margin:0 0 7px;}
.profile-heading .sub{margin:0;max-width:650px;color:rgba(255,253,247,.78);line-height:1.55;font-size:14px;}
.profile-avatar{
  width:86px;height:86px;border-radius:50%;display:grid;place-items:center;
  background:#F0B429;color:#173A2A;font:700 29px/1 'Fredoka',sans-serif;
  border:5px solid rgba(255,255,255,.9);box-shadow:0 9px 0 rgba(10,35,24,.26);flex:0 0 auto;
  position:relative;z-index:1;
}
.profile-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:22px;}
.profile-card{
  background:#FFF;border:1px solid #D8D5CB;border-radius:20px;padding:28px;
  box-shadow:0 12px 30px rgba(30,48,39,.08);
}
.profile-card h2{font-size:24px;color:#173A2A;margin:5px 0 0;}
.profile-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:24px;}
.profile-card-head .eyebrow{margin-bottom:4px;}
.profile-save-state{font-size:12px;font-weight:800;text-align:right;max-width:260px;}
.profile-save-state.ok{color:#187548;}
.profile-save-state.error{color:#A9362A;}
.profile-card .field{margin-bottom:18px;}
.profile-card .field label{display:block;margin-bottom:7px;font-size:13px;}
.profile-card .field input{width:100%;min-height:48px;border-radius:12px;padding:12px 14px;font-size:14px;}
.full-btn{width:100%;}
.profile-card .privacy-note{margin:14px 0 0;color:#67746C;font-size:12px;line-height:1.5;}
.large-stat{
  margin:10px 0 22px;padding:22px 20px;background:#F5F2E8;border-radius:16px;border:1px solid #DDD8CA;
}
.large-stat .num{font-size:48px;color:#173A2A;}
.large-stat .lbl{color:#65736A;font-size:12px;line-height:1.4;margin-top:4px;}
.mini-profile-row{
  display:flex;justify-content:space-between;gap:20px;padding:14px 0;border-bottom:1px solid #E0DDD4;
  color:#68756D;font-size:14px;
}
.mini-profile-row strong{color:#24382D;}
.profile-go-home{margin-top:20px;text-align:center;display:flex;justify-content:center;}
.profile-danger{
  margin-top:22px;border:1px solid #E6B3AD;background:#FFF4F2;border-radius:18px;padding:20px 22px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
}
.profile-danger strong{color:#8F3027;}
.profile-danger p{margin:4px 0 0;color:#765A56;font-size:13px;}
.profile-danger .btn-secondary{border-color:#D58D84;color:#8F3027;background:#FFF;}
.profile-danger .btn-secondary:hover{background:#8F3027;color:#FFF;border-color:#8F3027;}

/* ---------- dark mode: alto contraste ---------- */
html[data-theme="dark"]{
  --paper:#0F1712;
  --card:#1A251E;
  --muted:#C7D4CC;
  --ink:#F4F7F4;
  --line:#3D4D43;
  --chalkboard:#0F2B1D;
  --chalkboard-dark:#081B11;
}
html[data-theme="dark"] body{background:#0F1712;color:#F4F7F4;}
html[data-theme="dark"] .section-header p,
html[data-theme="dark"] .nosotros-text p,
html[data-theme="dark"] .info-card p,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .timer-caption{color:#D1DDD5;}
html[data-theme="dark"] .eyebrow--green{color:#7EE2A7 !important;}
html[data-theme="dark"] .eyebrow--blue{color:#87B9E8 !important;}
html[data-theme="dark"] .section-eyebrow{color:#FFD45A;}
html[data-theme="dark"] .highlight-blue{color:#87B9E8;}
html[data-theme="dark"] .stat-num{color:#7EE2A7;}
html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .nosotros-text h2,
html[data-theme="dark"] .info-card h3{color:#F7FAF7;}
html[data-theme="dark"] .field label,.form-group label{color:#E3EBE6;}
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group textarea{
  background:#111A15;color:#F5F8F5;border-color:#526259;
}
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .form-group input::placeholder,
html[data-theme="dark"] .form-group textarea::placeholder{color:#9BAAA1;}
html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field select:focus,
html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group textarea:focus{outline:3px solid rgba(255,212,90,.18);border-color:#F0B429;}
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .testi-card,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .profile-stat,
html[data-theme="dark"] .curso-card,
html[data-theme="dark"] .card-index{background:#1A251E;color:#F4F7F4;border-color:#3D4D43;}
html[data-theme="dark"] .card-index::before{background-image:repeating-linear-gradient(180deg,transparent 0 27px,#34453B 27px 28px);}
html[data-theme="dark"] .widget-tab{background:#26332B;color:#D4DED8;}
html[data-theme="dark"] .widget-tab.active{background:#0F2B1D;color:#FFFFFF;}
html[data-theme="dark"] .timer-time{color:#F7FAF7;}
html[data-theme="dark"] .ring-bg{stroke:rgba(255,255,255,.17);}
html[data-theme="dark"] .btn-secondary{color:#F1F5F2;border-color:#617067;}
html[data-theme="dark"] .btn-secondary:hover{background:#F1F5F2;color:#0F2B1D;}
html[data-theme="dark"] .back-link{color:#BFD0C5;}

html[data-theme="dark"] .profile-page{
  background:radial-gradient(circle at 8% 0%,rgba(240,180,41,.08),transparent 28%),linear-gradient(180deg,#0D1510 0%,#101C15 100%);
}
html[data-theme="dark"] .profile-page .back-link{color:#BCD0C2;}
html[data-theme="dark"] .profile-page .back-link:hover{color:#FFFFFF;}
html[data-theme="dark"] .profile-heading{background:linear-gradient(135deg,#102F20 0%,#17462F 100%);box-shadow:0 18px 38px rgba(0,0,0,.28);}
html[data-theme="dark"] .profile-heading .sub{color:#D2DED6;}
html[data-theme="dark"] .profile-card{background:#18231D;border-color:#3D4D43;box-shadow:0 14px 32px rgba(0,0,0,.22);}
html[data-theme="dark"] .profile-card h2{color:#F6FAF7;}
html[data-theme="dark"] .profile-card .privacy-note{color:#AEBDB4;}
html[data-theme="dark"] .large-stat{background:#111A15;border-color:#3D4D43;}
html[data-theme="dark"] .large-stat .num{color:#7EE2A7;}
html[data-theme="dark"] .large-stat .lbl,.mini-profile-row{color:#B4C3BA;}
html[data-theme="dark"] .mini-profile-row{border-color:#34443B;}
html[data-theme="dark"] .mini-profile-row strong{color:#F0F5F1;}
html[data-theme="dark"] .profile-danger{background:#241715;border-color:#70433D;}
html[data-theme="dark"] .profile-danger strong{color:#FFAAA0;}
html[data-theme="dark"] .profile-danger p{color:#CFADA8;}
html[data-theme="dark"] .profile-danger .btn-secondary{background:#2B1B19;color:#FFB7AF;border-color:#86534C;}
html[data-theme="dark"] .profile-danger .btn-secondary:hover{background:#A54438;color:#FFFFFF;border-color:#A54438;}

@media(max-width:800px){
  .profile-grid{grid-template-columns:1fr;}
  .profile-heading{align-items:flex-start;padding:25px;}
}
@media(max-width:560px){
  .profile-page{padding-top:28px;}
  .profile-card{padding:20px;}
  .profile-heading{padding:22px;border-radius:18px;}
  .profile-heading .sub{font-size:13px;}
  .profile-avatar{width:64px;height:64px;font-size:21px;border-width:4px;box-shadow:0 6px 0 rgba(10,35,24,.24);}
  .profile-danger{align-items:flex-start;flex-direction:column;}
  .profile-danger .btn-secondary{width:100%;}
}

