:root {
  --bg: #0f1117;
  --surface: #181b24;
  --surface-2: #202430;
  --border: #2c3140;
  --text: #e8eaf0;
  --muted: #9aa1b5;
  --accent: #c4981f;
  --accent-soft: rgba(196, 152, 31, 0.15);
  --ok: #3fb56b;
  --bad: #e05252;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 0.9rem; }
.container { max-width: 1000px; margin: 0 auto; padding: 24px 16px 80px; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.topbar nav { display: flex; gap: 16px; align-items: center; }
.inline { display: inline; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.card h2, .card h3 { margin-top: 0; }

.btn {
  display: inline-block; padding: 8px 18px; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: #14120a;
  font-weight: 600; cursor: pointer; font-size: 0.95rem;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.small { padding: 4px 12px; font-size: 0.85rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }

input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 1rem; font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label { display: block; margin: 12px 0 4px; font-size: 0.9rem; color: var(--muted); }
form.stack { max-width: 420px; }

.auth-wrap { max-width: 420px; margin: 8vh auto; }
.error {
  background: rgba(224, 82, 82, 0.12); border: 1px solid var(--bad);
  color: #f0a0a0; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px;
}
.notice {
  background: var(--accent-soft); border: 1px solid var(--accent);
  padding: 10px 14px; border-radius: 8px; margin-bottom: 12px;
}

.progressbar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progressbar > div { height: 100%; background: var(--accent); }

.class-list { list-style: none; padding: 0; margin: 0; }
.class-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid var(--border);
}
.class-list li:last-child { border-bottom: none; }
.check { color: var(--ok); }
.check.pending { color: var(--muted); }

.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.layout-class { display: block; }
.layout-main { max-width: 860px; }

/* ---- Apuntes de la clase (debajo del video) ---- */
.apuntes-barra { margin: 20px 0 0; }
#apuntes-toggle.activo { border-color: var(--accent); color: var(--accent); }
.apuntes { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.apuntes-acciones { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 8px; }
.apuntes-texto { max-width: 70ch; line-height: 1.7; overflow-wrap: anywhere; user-select: text; }
.apuntes-texto h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.apuntes-texto h4 { font-size: 1rem; margin: 22px 0 6px; }
.apuntes-texto h5 { font-size: 0.95rem; margin: 18px 0 4px; color: var(--muted); }
.apuntes-texto > :first-child { margin-top: 0; }
.apuntes-texto p { margin: 0 0 12px; }
.apuntes-texto ul, .apuntes-texto ol { margin: 0 0 12px; padding-left: 22px; }
.apuntes-texto li { margin: 3px 0; }
.apuntes-texto a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- Tutor: píldora contraída ---- */
.tutor-pill {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--accent); cursor: pointer;
  font-size: 0.95rem; box-shadow: 0 6px 22px rgba(0,0,0,0.45);
  transition: transform 0.15s ease;
}
.tutor-pill:hover { transform: translateY(-2px); }
.tutor-pill.hidden { display: none; }
.tutor-avatar {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--accent); font-size: 1rem; flex-shrink: 0;
}

/* ---- Tutor: panel expandido ---- */
.tutor-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(430px, 100vw);
  display: none; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(0,0,0,0.5);
}
.tutor-panel.open { display: flex; }
.tutor-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.tutor-close {
  margin-left: auto; background: none; border: none; color: var(--muted);
  font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.tutor-close:hover { background: var(--surface-2); color: var(--text); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.msg { padding: 12px 15px; border-radius: 14px; font-size: 0.94rem; line-height: 1.6; }
.msg.user {
  background: var(--accent-soft); border: 1px solid var(--accent);
  align-self: flex-end; max-width: 88%; border-bottom-right-radius: 4px;
}
.msg.bot {
  background: var(--surface-2); border: 1px solid var(--border);
  align-self: stretch; border-bottom-left-radius: 4px;
}
.msg.bot p { margin: 0 0 10px; }
.msg.bot p:last-child { margin-bottom: 0; }
.msg.bot ul { margin: 8px 0; padding-left: 20px; }
.msg.bot li { margin-bottom: 6px; }
.msg.bot h4 {
  margin: 14px 0 8px; font-size: 0.9rem; color: var(--accent);
  padding-top: 10px; border-top: 1px solid var(--border);
}
.msg.bot cite {
  display: block; font-style: normal; font-size: 0.78rem;
  color: var(--muted); margin-top: 2px;
}
.msg .sources { margin-top: 10px; font-size: 0.78rem; color: var(--muted); }
/* Cursor que late mientras la respuesta se va escribiendo */
.msg.streaming::after {
  content: '▋'; color: var(--accent); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.tutor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); font-size: 0.85rem; font-family: inherit;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.chat-input {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.chat-input input { flex: 1; border-radius: 999px; }
.chat-input .btn { border-radius: 50%; width: 42px; padding: 0; flex-shrink: 0; }

/* Quiz */
.question { margin-bottom: 20px; }
.question .opts label {
  display: flex; gap: 10px; align-items: flex-start; margin: 6px 0;
  padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; color: var(--text);
}
.question .opts label:hover { border-color: var(--accent); }
.question .opts input { width: auto; margin-top: 4px; }
.result-ok { border-left: 4px solid var(--ok); padding-left: 12px; }
.result-bad { border-left: 4px solid var(--bad); padding-left: 12px; }
.score-big { font-size: 3rem; font-weight: 700; margin: 0; }

/* Cabecera del alumno: sin caja, la racha va en la misma línea del saludo */
.hero { margin: 8px 0 32px; }
.hero h1 { margin: 0; font-size: 2rem; letter-spacing: -0.02em; }
.hero-sub {
  margin: 6px 0 0; color: var(--muted);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.streak { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.streak.on { color: var(--accent); }

/* Títulos de sección, sin caja */
h2.section {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); font-weight: 600; margin: 32px 0 12px;
}

/* Logros: texto suelto, sin recuadros */
.logros { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.logro {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.87rem; color: var(--muted); opacity: 0.5;
}
.logro.on { color: var(--text); opacity: 1; }
.logro-icono { font-size: 1.05rem; filter: grayscale(1); }
.logro.on .logro-icono { filter: none; }

/* Barra de marcas: anticipa dónde se pausa el video para preguntar */
.cp-track {
  position: relative; height: 10px; margin-top: 8px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--border); overflow: visible;
}
.cp-progress {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: var(--accent); opacity: 0.35; border-radius: 5px;
}
.cp-mark {
  position: absolute; top: 50%; width: 12px; height: 12px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--accent); border: 1px solid var(--bg);
  border-radius: 2px; cursor: pointer;
}
.cp-mark:hover { filter: brightness(1.3); }
.cp-mark.done { background: var(--ok); }

/* Quiz embebido en el video */
.quiz-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 12, 18, 0.85); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.quiz-overlay.open { display: flex; }
.quiz-modal {
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 24px; max-width: 640px;
  width: 100%; max-height: 85vh; overflow-y: auto;
}

/* Refuerzo inmediato dentro de la pausa */
#refuerzo {
  margin: 18px 0; padding: 16px;
  border-radius: var(--radius); background: var(--surface-2);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
}
.refuerzo-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.refuerzo-texto { font-size: 0.93rem; line-height: 1.6; }
.refuerzo-consigna {
  margin: 14px 0 8px; font-weight: 600; color: var(--accent); font-size: 0.93rem;
}
#refuerzo textarea { font-size: 0.92rem; }
.refuerzo-devolucion {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  font-size: 0.9rem; line-height: 1.55;
}
.refuerzo-devolucion.ok { background: rgba(63, 181, 107, 0.12); border: 1px solid var(--ok); }
.refuerzo-devolucion.mejorable { background: var(--accent-soft); border: 1px solid var(--accent); }

/* Miniaturas de clases */
.class-list li img.thumb {
  width: 96px; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 6px; flex-shrink: 0; background: #000;
}

/* Tablas admin */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.78rem; background: var(--surface-2); border: 1px solid var(--border);
}
.pill.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
details.qedit { margin: 8px 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
details.qedit summary { cursor: pointer; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }

/* Campus: editorial surfaces, local artwork and a lightweight tutor character. */
:root { --bg:#111312; --surface:#191c1a; --surface-2:#232824; --border:#343b35; --text:#eeefe9; --muted:#a4ada5; --accent:#d6bd78; --accent-soft:#d6bd7818; }
body { font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
.container { max-width:1180px; padding:48px 32px 100px; }
.topbar { background:var(--bg); padding:22px max(32px,calc((100vw - 1116px)/2)); gap:24px; }
.topbar .brand { letter-spacing:-.04em; font-size:1.4rem; }
.brand-mark { color:var(--accent); margin-right:10px; }
.topbar nav { font-size:.85rem; }
h1,h2,h3 { line-height:1.15; letter-spacing:-.035em; }
.eyebrow { font-size:.7rem; letter-spacing:.18em; text-transform:uppercase; color:var(--accent); }
.hero { padding:24px 0 42px; margin:0; border-bottom:1px solid var(--border); }
.hero h1 { font-size:clamp(2.4rem,5vw,4.6rem); font-weight:500; max-width:800px; margin:18px 0; }
.hero h1 em { font-style:normal; color:var(--accent); }
.hero-sub { max-width:630px; }
.section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:20px; margin:32px 0 22px; }
.section-heading h2 { font-size:1.5rem; font-weight:500; margin:0; }
.course-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:36px; }
.course-tile { display:block; color:var(--text); min-width:0; }
.course-tile:hover { text-decoration:none; }
.course-art { position:relative; height:230px; overflow:hidden; border-radius:6px; background:#27362f; display:flex; align-items:flex-end; padding:26px; }
.course-tile:nth-child(even) .course-art { background:#30323e; }
.course-art::before,.course-art::after { content:''; position:absolute; width:200px; height:200px; border:1px solid #d6bd7860; transform:rotate(-28deg); border-radius:44px; right:42px; top:-20px; }
.course-art::after { right:-25px; top:30px; width:230px; height:230px; }
.art-word { position:relative; font-size:3.6rem; line-height:1; letter-spacing:-.08em; color:#dfd8bc; }
.art-label { position:absolute; top:24px; left:26px; font-size:.68rem; letter-spacing:.16em; color:#d9dfd7; }
.art-play { position:absolute; bottom:24px; right:24px; width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:var(--accent); color:var(--bg); transition:transform .2s; }
.course-tile:hover .art-play { transform:scale(1.1); }
.course-tile h3 { font-size:1.35rem; font-weight:500; margin:20px 0 10px; }
.course-summary { color:var(--muted); margin:0 0 20px; font-size:.92rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.course-meta { display:flex; justify-content:space-between; gap:12px; font-size:.78rem; color:var(--muted); margin:10px 0; }
.course-meta strong { color:var(--accent); font-weight:500; }
.progressbar { height:3px; }
.achievements { border-top:1px solid var(--border); margin-top:44px; padding-top:8px; }
.logro { opacity:1; }
.logro-icono { color:var(--accent); font-size:1.2rem; }
.module-section { border-top:1px solid var(--border); padding:28px 0; margin:0; }
.module-section h3 { font-size:1.4rem; font-weight:500; }
.class-list li { padding:16px 0; gap:16px; }
.class-list li>a:not(:first-child) { color:var(--text); }
.layout-main { max-width:960px; }
.layout-main>.card { background:none; border:0; border-top:1px solid var(--border); border-radius:0; padding:28px 0; }
.tutor-avatar { background:none; width:42px; height:42px; border-radius:0; }
.tutor-character { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:7px; width:36px; height:31px; border-radius:12px 12px 14px 14px; background:var(--accent); animation:tutor-float 4s ease-in-out infinite; }
.tutor-character::before,.tutor-character::after { content:''; width:5px; height:9px; background:#26302a; border-radius:3px; animation:tutor-blink 5s infinite; }
.tutor-character i { position:absolute; width:10px; height:4px; border-bottom:2px solid #26302a; border-radius:50%; bottom:5px; }
.tutor-pill { border-color:var(--border); padding:12px 20px 12px 12px; }
.tutor-head { padding:24px 20px; }
.msg.bot { background:none; border:0; padding:12px 0; }
.chat-messages { padding:24px; }
.chip { border-radius:8px; text-align:left; }
.chat-input { padding:20px; }
.chat-input input { min-width:0; border-radius:8px; }
:focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
@keyframes tutor-float { 50% { transform:translateY(-3px) rotate(3deg); } }
@keyframes tutor-blink { 0%,44%,48%,100% { transform:scaleY(1); } 46% { transform:scaleY(.15); } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }
@media(max-width:650px) {
 .container { padding:28px 20px 110px; } .topbar { padding:16px 20px; flex-wrap:wrap; gap:12px; }
 .topbar nav { width:100%; gap:14px; flex-wrap:wrap; } .topbar nav .muted { margin-left:auto; }
 .hero { padding:16px 0 30px; } .hero h1 { font-size:2.65rem; } .course-grid { grid-template-columns:1fr; gap:28px; }
 .course-art { height:210px; } .art-word { font-size:2.8rem; max-width:calc(100% - 38px); overflow-wrap:anywhere; } .art-play { right:16px; bottom:16px; width:32px; height:32px; } .section-heading { gap:10px; } .section-heading .muted { font-size:.75rem; }
 .tutor-pill { right:16px; bottom:16px; } .class-list li { gap:10px; } .class-list li img.thumb { width:76px; }
 .layout-main h1 { font-size:1.9rem; } .logros { gap:16px 24px; }
}

/* Course > module > lesson. Three cards on desktop, two on tablet, one on mobile. */
:root {
  --bg:#080808;
  --surface:#141414;
  --surface-2:#202020;
  --border:#323232;
  --text:#f8f8f8;
  --muted:#a7a7a7;
  --accent:#e6bb32;
  --accent-soft:rgba(230,187,50,.12);
}
.course-art,.course-tile:nth-child(even) .course-art { background:#1b1b1b; }
.art-word { color:#f3df9b; }
.breadcrumb { display:inline-block; color:var(--muted); font-size:.85rem; margin-bottom:28px; }
.course-heading { max-width:850px; margin:0 0 36px; }
.course-heading h1 { font-size:clamp(2rem,4vw,3.5rem); font-weight:500; margin:14px 0 18px; }
.page-intro { color:var(--muted); line-height:1.7; margin:0 0 24px; overflow-wrap:anywhere; }
.course-count { font-size:.8rem; color:var(--muted); margin:24px 0 0; }
.module-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.module-card { display:flex; flex-direction:column; color:var(--text); background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; transition:border-color .15s,transform .15s; }
.module-card:hover { text-decoration:none; border-color:var(--accent); transform:translateY(-3px); }
.module-cover { position:relative; aspect-ratio:16/9; overflow:hidden; background:#25221a; }
.cover-fallback { display:flex; flex-direction:column; justify-content:space-between; position:absolute; inset:0; padding:24px; background:#25221a; }
.cover-number { padding-top:16px; }
.cover-number,.cover-symbol { font-size:3rem; color:var(--accent); line-height:1; letter-spacing:-.06em; }
.cover-title { font-size:1rem; font-weight:500; line-height:1.25; max-width:25ch; overflow-wrap:anywhere; }
.cover-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
[data-cover-image][hidden] { display:none; }
.cover-index { position:absolute; top:14px; left:14px; font-size:.6rem; font-weight:600; letter-spacing:.1em; background:#080808e8; color:#fff; padding:5px 9px; border-radius:4px; }
.module-card-body { padding:22px; display:flex; flex-direction:column; flex:1; }
.module-card h2 { font-size:1.12rem; font-weight:600; line-height:1.35; margin:0 0 10px; overflow-wrap:anywhere; }
.module-description { color:var(--muted); font-size:.84rem; line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:0 0 24px; min-height:2.7em; }
.module-progress-label { display:flex; justify-content:space-between; gap:16px; color:var(--muted); font-size:.75rem; margin:0 0 10px; }
.module-card .module-progress-label { margin-top:auto; }
.module-progress-label strong { font-weight:600; color:var(--accent); }
.module-card .progressbar,.module-hero .progressbar { height:5px; }
.module-card-link { display:flex; justify-content:space-between; color:var(--text); font-size:.78rem; margin-top:20px; }
.module-card-link>span { color:var(--accent); font-size:1rem; }
.module-hero { display:grid; grid-template-columns:1fr 1.2fr; gap:40px; align-items:center; margin:0 0 48px; }
.module-hero-cover { border-radius:10px; }
.module-hero-copy { min-width:0; }
.module-hero-copy h1 { font-size:clamp(1.9rem,3vw,2.7rem); font-weight:500; margin:12px 0 18px; line-height:1.15; overflow-wrap:anywhere; }
.module-hero-copy .eyebrow { margin-top:0; }
.module-start { display:inline-flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:24px; max-width:100%; }
.start-class { flex-basis:100%; font-weight:400; font-size:.78rem; overflow-wrap:anywhere; }
.module-completed { color:var(--accent); font-size:.85rem; margin-top:24px; }
.module-lessons { border-top:1px solid var(--border); }
.module-lessons .section-heading h2 { font-size:1.3rem; }
.lesson-list { list-style:none; padding:0; margin:0; }
.lesson-row { display:flex; align-items:center; gap:18px; padding:18px 4px; border-bottom:1px solid var(--border); color:var(--text); }
.lesson-row:hover { text-decoration:none; background:var(--surface); }
.lesson-thumb { position:relative; display:block; width:112px; aspect-ratio:16/9; flex-shrink:0; border-radius:5px; overflow:hidden; background:var(--surface-2); }
.lesson-thumb-fallback { position:absolute; inset:0; display:grid; place-items:center; color:var(--accent); font-size:1.25rem; }
.lesson-thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.lesson-copy { flex:1; min-width:0; }
.lesson-title { display:block; line-height:1.4; font-size:.95rem; overflow-wrap:anywhere; }
.lesson-meta { display:flex; flex-wrap:wrap; gap:6px 14px; color:var(--muted); font-size:.7rem; margin-top:6px; }
.pause-badge { color:var(--accent); }
.lesson-status { color:var(--muted); }
.lesson-status.complete { color:var(--accent); }
.lesson-arrow { color:var(--muted); }
.module-quiz { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:32px 0; border-bottom:1px solid var(--border); }
.module-quiz h2 { font-size:1.2rem; font-weight:500; margin:10px 0; }
.module-quiz .btn { flex-shrink:0; }
.module-pagination { display:flex; flex-wrap:wrap; justify-content:space-between; gap:24px; margin-top:32px; }
.module-pagination a { display:block; max-width:45%; color:var(--text); }
.module-pagination strong { display:block; font-size:.9rem; font-weight:500; margin-top:8px; }
.module-pagination .muted { font-size:.75rem; }
.next-module { margin-left:auto; text-align:right; }
.empty-state { color:var(--muted); padding:24px 0; }
/* Small architectural cue on the compact tutor; no large illustration. */
.tutor-character .tutor-helmet { position:absolute; top:-7px; width:32px; height:12px; background:#fff; border-radius:20px 20px 2px 2px; }
.tutor-helmet::before { content:''; position:absolute; width:3px; height:9px; top:0; left:15px; background:var(--accent); border-radius:2px; }
.tutor-helmet::after { content:''; position:absolute; height:3px; width:38px; background:#fff; bottom:-1px; left:-3px; border-radius:3px; }
@media(max-width:1000px) { .module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .module-hero { gap:28px; } }
@media(max-width:650px) {
 .module-grid { grid-template-columns:1fr; gap:22px; }
 .module-hero { grid-template-columns:1fr; gap:24px; margin-bottom:36px; }
 .course-heading { margin-bottom:28px; } .course-heading h1 { font-size:2.2rem; }
 .module-card-body { padding:20px; } .module-start { width:100%; }
 .lesson-row { gap:10px; padding:16px 0; } .lesson-thumb { width:76px; }
 .lesson-title { font-size:.88rem; } .lesson-arrow { display:none; }
 .module-quiz { display:block; } .module-quiz .btn { margin-top:16px; }
 .module-pagination a { max-width:100%; flex:1 1 100%; } .next-module { text-align:left; }
}

/* ---- Acceso a la bienvenida desde el curso ---- */
.course-heading .welcome-nav { display:flex; gap:20px; margin-top:16px; font-size:.9rem; }
.course-heading .welcome-nav a { color:var(--muted); padding-bottom:6px; border-bottom:2px solid transparent; }
.course-heading .welcome-nav a[aria-current="page"] { color:var(--text); border-bottom-color:var(--accent); }
.course-heading .welcome-nav a:hover { color:var(--text); text-decoration:none; }
.welcome-invite { display:block; margin:0 0 24px; padding:14px 18px; border:1px solid var(--accent); border-radius:var(--radius); background:var(--accent-soft); color:var(--text); }
.welcome-invite:hover { text-decoration:none; filter:brightness(1.1); }
.welcome-invite strong { color:var(--accent); margin-right:6px; }

/* ---- Texto de la clase (transcripción plegada debajo del video) ---- */
.transcripcion { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.transcripcion > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style-position: inside; }
.transcripcion[open] > summary { border-bottom: 1px solid var(--border); }
.transcripcion-acciones { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 12px 18px 0; }
.transcripcion-acciones span:last-child { display: flex; gap: 8px; }
.transcripcion-texto { max-height: 420px; overflow-y: auto; padding: 8px 18px 16px; line-height: 1.7; overflow-wrap: anywhere; }
.transcripcion-texto p { margin: 10px 0; }
.transcripcion-min { background: none; border: 0; padding: 0 6px 0 0; color: var(--accent); font: inherit; font-size: .82rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.transcripcion-min:hover { text-decoration: underline; }

/* ---- Material y recursos de la clase ---- */
.recursos { margin-top: 20px; }
.recursos h2.section { margin: 0 0 10px; }
.recursos-lista { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.recursos-lista li + li { border-top: 1px solid var(--border); }
.recursos-lista a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); }
.recursos-lista a:hover { background: var(--surface-2); text-decoration: none; }
.recurso-icono { color: var(--accent); width: 1.2em; text-align: center; }
.recurso-titulo { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.recurso-tipo { color: var(--muted); font-size: .8rem; white-space: nowrap; }
