/* ============================================================
   TÉCNICO WEB — Hoja de estilos principal
   Paleta adaptada al logo: morado #6020c0 · dorado #e0c000
   ============================================================ */

:root {
  --bg: #0b0514;
  --bg-alt: #110826;
  --panel: #170b31;
  --panel-2: #1e1040;
  --line: rgba(167, 139, 250, .16);

  --violet: #7c3aed;
  --violet-strong: #6020c0;
  --violet-light: #a78bfa;
  --violet-soft: #cdb9f7;

  --gold: #e6c229;
  --gold-light: #f5d95a;
  --gold-dark: #d4a017;

  --text: #ece7f7;
  --muted: #a99cc9;

  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(900px 480px at 85% -5%, rgba(124, 58, 237, .16), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(230, 194, 41, .06), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: min(1180px, 92%); margin-inline: auto; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

::selection { background: var(--violet); color: #fff; }

/* ---------- utilidades de texto degradado ---------- */
.grad-text {
  background: linear-gradient(92deg, var(--violet-light), #d8b4fe);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-gold {
  background: linear-gradient(92deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.kicker {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .6rem;
}

.badge-glow {
  display: inline-block; padding: .42rem 1rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--violet-soft);
  border: 1px solid rgba(167, 139, 250, .35);
  background: rgba(124, 58, 237, .12);
  box-shadow: 0 0 24px rgba(124, 58, 237, .25);
  margin-bottom: 1.1rem;
}

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.7rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn-violet {
  background: linear-gradient(135deg, var(--violet), var(--violet-strong));
  color: #fff; box-shadow: 0 10px 28px rgba(124, 58, 237, .4);
}
.btn-violet:hover { box-shadow: 0 14px 36px rgba(124, 58, 237, .55); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: #241a02; box-shadow: 0 10px 26px rgba(230, 194, 41, .32);
}
.btn-gold:hover { box-shadow: 0 14px 34px rgba(230, 194, 41, .45); }
.btn-outline {
  border-color: rgba(167, 139, 250, .5); color: var(--violet-soft);
  background: rgba(124, 58, 237, .07);
}
.btn-outline:hover { background: rgba(124, 58, 237, .18); }
.btn-sm { padding: .55rem 1.15rem; font-size: .86rem; }

/* ============ HEADER ============ */
.header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 5, 20, .78);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.header.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }

.navbar { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .65rem; }
.brand-logo {
  width: 46px; height: 46px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(124, 58, 237, .5));
  transition: transform .35s ease;
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.08); }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.28rem; }
.brand-name em {
  font-style: normal;
  background: linear-gradient(92deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-menu { display: flex; align-items: center; gap: .35rem; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem .9rem; border-radius: 10px;
  font-weight: 600; font-size: .93rem; color: var(--muted);
  transition: color .2s, background .2s;
}
.nav-link:hover { color: #fff; background: rgba(124, 58, 237, .14); }
.nav-link.active { color: var(--gold); }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 190px; padding: .5rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  display: block; padding: .55rem .9rem; border-radius: 9px;
  font-size: .9rem; font-weight: 500; color: var(--text);
  transition: background .2s, color .2s;
}
.dropdown-menu a:hover { background: rgba(124, 58, 237, .22); color: var(--gold-light); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--violet-light); transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============ HERO ============ */
.hero { padding: clamp(3.5rem, 7vw, 6rem) 0 4rem; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: clamp(2rem, 5vw, 4rem);
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; margin-bottom: 1.1rem; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 56ch; margin-bottom: 1.8rem; }
.lead strong { color: var(--text); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.4rem; }

.stats { display: flex; flex-wrap: wrap; gap: 1.6rem 2.6rem; }
.stats li { display: flex; flex-direction: column; }
.stats b {
  font-family: var(--font-head); font-size: 1.75rem; font-weight: 800;
  background: linear-gradient(92deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { font-size: .84rem; color: var(--muted); }

.hero-img img { filter: drop-shadow(0 30px 60px rgba(96, 32, 192, .35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ============ SECCIONES ============ */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-alt {
  background:
    radial-gradient(700px 380px at 110% 0%, rgba(124, 58, 237, .12), transparent 60%),
    var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { text-align: center; max-width: 780px; margin: 0 auto 3rem; }
.section-desc { color: var(--muted); margin-top: .9rem; }
.section-desc strong { color: var(--gold-light); }

/* ---------- La escuela ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.about-card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.5rem; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.about-card:hover {
  transform: translateY(-8px);
  border-color: rgba(230, 194, 41, .45);
  box-shadow: 0 18px 40px rgba(96, 32, 192, .3);
}
.about-icon {
  width: 54px; height: 54px; display: grid; place-items: center;
  font-size: 1.5rem; border-radius: 15px; margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, .3), rgba(230, 194, 41, .18));
  border: 1px solid var(--line);
}
.about-card h3 { font-size: 1.08rem; margin-bottom: .55rem; }
.about-card p { color: var(--muted); font-size: .93rem; }

/* ---------- Niveles / metodología ---------- */
.levels { max-width: 720px; margin: 0 auto 3.4rem; position: relative; counter-reset: lvl; }
.levels::before {
  content: ""; position: absolute; left: 27px; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(var(--violet), var(--gold));
}
.level {
  position: relative; display: flex; gap: 1.3rem; align-items: flex-start;
  padding: .9rem 0 .9rem 0;
}
.level-num {
  flex-shrink: 0; width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; font-family: var(--font-head); font-weight: 800; font-size: .95rem;
  color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-strong));
  border: 3px solid var(--bg-alt); box-shadow: 0 0 0 2px rgba(124, 58, 237, .5);
}
.level h3 { font-size: 1.06rem; margin-bottom: .3rem; }
.level p { color: var(--muted); font-size: .93rem; }
.level-final .level-num {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: #241a02; box-shadow: 0 0 0 2px rgba(230, 194, 41, .55), 0 0 30px rgba(230, 194, 41, .4);
}
.level-final h3 { color: var(--gold-light); }

.method-flow {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .7rem 1rem;
}
.flow-step {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: 1rem 1.5rem; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: .88rem; font-weight: 600; color: var(--violet-soft);
  min-width: 130px; transition: transform .25s;
}
.flow-step:hover { transform: translateY(-5px); }
.flow-step b {
  font-family: var(--font-head); font-size: 1.3rem;
  color: var(--gold);
}
.flow-exam { border-color: rgba(230, 194, 41, .5); background: rgba(230, 194, 41, .07); }
.flow-arrow { color: var(--gold); font-size: 1.2rem; }

/* ---------- Tarjetas de cursos ---------- */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem; }
.course-card {
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .32s ease, border-color .32s ease, box-shadow .32s ease;
}
.course-card:hover {
  transform: translateY(-10px) scale(1.015);
  border-color: rgba(230, 194, 41, .5);
  box-shadow: 0 26px 60px rgba(96, 32, 192, .45);
}
.course-card img { aspect-ratio: 16/9.6; object-fit: cover; width: 100%; }
.course-card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.course-card-body h3 { font-size: 1.25rem; }
.course-card-body h3::after {
  content: " →"; color: var(--gold); opacity: 0; transition: opacity .25s, margin-left .25s;
}
.course-card:hover h3::after { opacity: 1; margin-left: .3rem; }
.course-card-body p { color: var(--muted); font-size: .92rem; }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 700; padding: .32rem .75rem;
  border-radius: 999px; letter-spacing: .02em;
}
.chip-level { background: rgba(124, 58, 237, .18); color: var(--violet-soft); border: 1px solid rgba(167, 139, 250, .4); }
.chip-time { background: rgba(230, 194, 41, .1); color: var(--gold-light); border: 1px solid rgba(230, 194, 41, .35); }
.chip-task { background: rgba(124, 58, 237, .16); color: var(--violet-soft); border: 1px dashed rgba(167, 139, 250, .45); }
.chip-exam { background: rgba(230, 194, 41, .12); color: var(--gold-light); border: 1px dashed rgba(230, 194, 41, .5); }

/* ---------- Detalle de curso ---------- */
.course-detail { scroll-margin-top: 70px; }
.course-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }
.course-actions .btn[hidden] { display: none; }
.course-note { color: var(--muted); font-size: .84rem; }
.course-grid {
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.course-grid-flip .course-media { order: 2; }
.course-media {
  position: sticky; top: 105px;
}
.course-media img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(96, 32, 192, .35);
}
.course-meta {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem;
}
.meta-item {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line);
  padding: .38rem .8rem; border-radius: 999px;
}
.course-info h2 { margin: .2rem 0 1rem; }
.course-desc { color: var(--muted); margin-bottom: 1.8rem; }

.syllabus { display: flex; flex-direction: column; gap: .9rem; }
.block {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 15px;
  overflow: hidden; transition: border-color .3s;
}
.block[open] { border-color: rgba(124, 58, 237, .55); }
.block summary {
  cursor: pointer; list-style: none; user-select: none;
  padding: 1rem 1.2rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: .6rem;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
}
.block summary::-webkit-details-marker { display: none; }
.block summary::after {
  content: "+"; margin-left: auto; font-size: 1.25rem; font-weight: 400;
  color: var(--gold); transition: transform .3s;
}
.block[open] summary::after { transform: rotate(45deg); }
.block-tag {
  font-family: var(--font-body); font-size: .72rem; font-weight: 700;
  padding: .3rem .7rem; border-radius: 999px; white-space: nowrap;
}
.block-tag.t1 { background: rgba(124, 58, 237, .2); color: #d8ccff; }
.block-tag.t2 { background: rgba(167, 139, 250, .18); color: var(--violet-soft); }
.block-tag.t3 { background: rgba(200, 180, 60, .16); color: #ecd77a; }
.block-tag.t4 { background: rgba(230, 194, 41, .16); color: var(--gold-light); }
.block-tag.t5 { background: linear-gradient(135deg, rgba(230,194,41,.3), rgba(124,58,237,.3)); color: #ffe98a; }
.block-tag.t6 { background: rgba(56, 189, 248, .16); color: #a5e8ff; }
.block-tag.t7 { background: rgba(52, 211, 153, .16); color: #a8f0d0; }
.block-tag.t8 { background: linear-gradient(135deg, rgba(52,211,153,.28), rgba(124,58,237,.28)); color: #c9fff0; }

.block ul { padding: 0 1.4rem .4rem; display: grid; gap: .45rem; }
.block ul li {
  position: relative; padding-left: 1.4rem;
  color: var(--muted); font-size: .92rem;
}
.block ul li::before {
  content: "▸"; position: absolute; left: 0; color: var(--violet-light);
}
.block-foot {
  display: flex; flex-wrap: wrap; gap: .55rem;
  padding: .8rem 1.4rem 1.1rem; margin-top: .4rem;
  border-top: 1px dashed var(--line);
}

/* ---------- CTA ---------- */
.cta-section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.cta-box {
  text-align: center;
  background:
    radial-gradient(600px 260px at 50% -40%, rgba(230, 194, 41, .18), transparent 70%),
    linear-gradient(150deg, #221048, #170b31 60%);
  border: 1px solid rgba(230, 194, 41, .35);
  border-radius: 26px; padding: clamp(2.4rem, 6vw, 4rem);
  box-shadow: 0 30px 80px rgba(96, 32, 192, .4);
}
.cta-box h2 { margin-bottom: 1rem; }
.cta-box p { color: var(--muted); max-width: 60ch; margin: 0 auto 1.8rem; }
.cta-form {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem;
  margin-bottom: 1rem;
}
.cta-form input {
  flex: 1 1 280px; max-width: 420px;
  padding: .9rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(11, 5, 20, .6);
  color: var(--text); font-size: .95rem; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.cta-form input:focus { border-color: var(--violet-light); box-shadow: 0 0 0 4px rgba(124, 58, 237, .22); }
.cta-box small { color: var(--muted); }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--line); background: #090411; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.2rem; padding: 3.2rem 0 2.2rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.footer-brand img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(124, 58, 237, .45)); }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 34ch; }
.footer-col h4 { font-size: .95rem; margin-bottom: .9rem; color: var(--gold); }
.footer-col a { display: block; color: var(--muted); font-size: .9rem; padding: .22rem 0; transition: color .2s, transform .2s; }
.footer-col a:hover { color: var(--violet-light); transform: translateX(4px); }
.footer-col p { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.socials { display: flex; gap: .6rem; }
.socials a {
  width: 38px; height: 38px; display: grid !important; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--panel);
  transition: all .25s; padding: 0;
}
.socials a:hover { background: var(--violet); color: #fff !important; transform: translateY(-4px); }
.footer-bottom {
  text-align: center; padding: 1.2rem; font-size: .8rem; color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------- volver arriba ---------- */
#toTop {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(230, 194, 41, .5);
  background: linear-gradient(135deg, var(--violet), var(--violet-strong));
  color: #fff; font-size: 1.2rem; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: all .3s ease; box-shadow: 0 10px 26px rgba(124, 58, 237, .5);
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#toTop:hover { transform: translateY(-4px); }

/* ---------- animaciones reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   PÁGINAS DE CURSO (bloques)
   ============================================================ */
.breadcrumb {
  font-size: .85rem; color: var(--muted);
  padding: 1.6rem 0 .4rem;
}
.breadcrumb a { color: var(--violet-light); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--gold); }

.course-hero { padding: 1.2rem 0 2.2rem; }
.course-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: .8rem; }
.course-hero .lead { margin-bottom: 1.2rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: .55rem; }

.course-layout {
  display: grid; grid-template-columns: 250px 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
  padding-bottom: 4rem;
}

/* ---------- índice lateral ---------- */
.toc {
  position: sticky; top: 100px;
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.1rem 1.3rem;
}
.toc h4 { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .8rem; }
.toc ol { counter-reset: toc; display: grid; gap: .15rem; }
.toc a {
  display: block; padding: .42rem .6rem; border-radius: 9px;
  font-size: .88rem; color: var(--muted); transition: all .2s;
}
.toc a:hover { background: rgba(124, 58, 237, .16); color: #fff; transform: translateX(4px); }

/* ---------- lecciones ---------- */
.lesson { margin-bottom: 3.6rem; scroll-margin-top: 95px; }
.lesson > h2 { margin-bottom: 1.1rem; padding-bottom: .7rem; border-bottom: 1px dashed var(--line); }
.lesson h3 { margin: 1.7rem 0 .7rem; font-size: 1.12rem; color: var(--violet-soft); }
.lesson p { margin-bottom: .95rem; color: #cfc6e4; }
.lesson p strong { color: var(--text); }
.lesson code, .toc code { font-family: "Fira Code", ui-monospace, monospace; font-size: .84em; background: rgba(124,58,237,.14); border: 1px solid rgba(167,139,250,.22); padding: .08em .38em; border-radius: 6px; color: var(--violet-soft); }
.lesson a.dl-link code, .lesson a[download] code { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(167,139,250,.6); }
.lesson a[download] code:hover { background: rgba(124,58,237,.28); border-color: var(--violet); color: #fff; }

.steps { counter-reset: paso; display: grid; gap: .65rem; margin: 0 0 1rem; }
.steps li {
  position: relative; padding-left: 2.5rem; color: var(--muted); font-size: .95rem;
}
.steps li::before {
  counter-increment: paso; content: counter(paso);
  position: absolute; left: 0; top: -2px;
  width: 26px; height: 26px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--violet-strong));
  color: #fff; font-weight: 700; font-size: .78rem; border-radius: 50%;
}
.check-list { display: grid; gap: .55rem; margin-bottom: 1rem; }
.check-list li { position: relative; padding-left: 1.6rem; color: var(--muted); font-size: .95rem; }
.check-list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }

kbd {
  font-family: "Fira Code", monospace; font-size: .8em;
  background: var(--panel-2); border: 1px solid var(--line);
  border-bottom-width: 3px; border-radius: 6px; padding: .1em .5em;
}

/* ---------- avisos ---------- */
.note, .tip {
  border-radius: 13px; padding: .95rem 1.15rem;
  font-size: .93rem; margin: 1.1rem 0;
  border: 1px solid rgba(230, 194, 41, .35);
  background: rgba(230, 194, 41, .07); color: #e8dcb0;
}
.tip { border-color: rgba(124, 58, 237, .45); background: rgba(124, 58, 237, .1); color: var(--violet-soft); }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: 1rem 0; }
.rule { border-radius: 12px; padding: .8rem 1rem; font-size: .88rem; border: 1px solid var(--line); background: var(--panel); }
.rule.ok { border-left: 4px solid #34d399; }
.rule.ko { border-left: 4px solid #f87171; }

/* ---------- tablas de documentación ---------- */
.doc-table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem;
  font-size: .89rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: 13px; overflow: hidden;
}
.doc-table caption { caption-side: top; text-align: left; font-weight: 600; color: var(--violet-soft); padding: .5rem 2px; font-size: .86rem; }
.doc-table th, .doc-table td { padding: .62rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table thead th { background: rgba(124, 58, 237, .18); color: #dcd0ff; font-family: var(--font-head); font-size: .82rem; letter-spacing: .04em; }
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table tbody tr:hover td { background: rgba(124, 58, 237, .07); }

/* ---------- ventanas de código ---------- */
.code-window {
  border-radius: 14px; overflow: hidden; margin: 1rem 0 1.3rem;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.cw-bar {
  display: flex; align-items: center; gap: .45rem;
  background: #241245; padding: .5rem .9rem;
}
.cw-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.cw-bar i:nth-child(2) { background: #febc2e; }
.cw-bar i:nth-child(3) { background: #28c840; }
.cw-bar span { margin-left: .5rem; font-size: .74rem; color: var(--muted); font-family: "Fira Code", monospace; }
pre.code, pre.tree {
  background: #12081f !important; margin: 0; padding: 1.05rem 1.2rem;
  overflow-x: auto; tab-size: 2;
}
pre.code code, pre.tree code {
  font-family: "Fira Code", ui-monospace, Consolas, monospace;
  font-size: .83rem; line-height: 1.75; color: #ded5f3;
  white-space: pre;
}
.tk-tag { color: #b79bff; }
.tk-attr { color: #7dd3fc; }
.tk-val { color: #f0cf5a; }
.tk-com { color: #7a6f96; font-style: italic; }
.tk-txt { color: #ece7f7; }
.code-window.bad { border-color: rgba(248, 113, 113, .45); }
.code-window.good { border-color: rgba(52, 211, 153, .45); }
pre.tree { border: 1px solid var(--line); border-radius: 13px; margin: 0 0 1.2rem; }

.duo-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; align-items: start; }
.duo-codes .code-window { margin: 0 0 1rem; }

/* ---------- diagrama de anatomía ---------- */
.anatomy {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 13px; padding: 1.3rem; margin: 1rem 0 .4rem;
  text-align: center; font-family: "Fira Code", monospace; font-size: 1rem;
}
.an-open { background: rgba(125, 211, 252, .14); color: #7dd3fc; border: 1px dashed rgba(125,211,252,.5); border-radius: 8px; padding: .25em .5em; }
.an-text { background: rgba(230, 194, 41, .13); color: var(--gold-light); border: 1px dashed rgba(230,194,41,.5); border-radius: 8px; padding: .25em .6em; margin: 0 .3em; }
.an-close { background: rgba(183, 155, 255, .14); color: #b79bff; border: 1px dashed rgba(183,155,255,.5); border-radius: 8px; padding: .25em .5em; }
.an-labels {
  display: flex; justify-content: space-between; gap: .5rem;
  margin-top: .7rem; font-size: .72rem; color: var(--muted);
  font-family: var(--font-body);
}

/* ---------- ejercicios ---------- */
.exercises .exercise {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-left: 4px solid var(--violet);
  border-radius: 14px; padding: 1.25rem 1.4rem; margin-top: 1.2rem;
}
.exercise.challenge { border-left-color: var(--gold); box-shadow: 0 0 30px rgba(230, 194, 41, .07); }
.exercise h3 { display: flex; align-items: center; gap: .7rem; font-size: 1.02rem; margin: 0 0 .6rem !important; color: var(--text) !important; }
.ex-num {
  flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; font-size: .92rem;
  background: linear-gradient(135deg, var(--violet), var(--violet-strong)); color: #fff;
}
.challenge .ex-num { background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); color: #241a02; }
.exercise p { font-size: .93rem; }
.req-list { display: grid; gap: .4rem; margin: .6rem 0 0; }
.req-list li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: .9rem; }
.req-list li::before { content: "☐"; position: absolute; left: 0; color: var(--gold); }
.solution { margin-top: .9rem; }
.solution summary {
  cursor: pointer; user-select: none;
  display: inline-block; padding: .45rem 1.1rem; border-radius: 999px;
  font-size: .84rem; font-weight: 700;
  color: var(--gold-light); border: 1px dashed rgba(230, 194, 41, .5);
  transition: background .25s;
}
.solution summary:hover { background: rgba(230, 194, 41, .1); }
.solution[open] summary { margin-bottom: .8rem; }
.solution .steps li { color: #cfc6e4; }

/* ---------- examen ---------- */
.exam h3 { margin-top: 1.8rem; }
.quiz .question {
  border: 1px solid var(--line); border-radius: 13px;
  background: var(--panel); padding: 1rem 1.2rem; margin-bottom: .9rem;
  transition: border-color .3s, background .3s;
}
.quiz legend { font-weight: 600; font-size: .94rem; margin-bottom: .6rem; padding: 0; }
.quiz label {
  display: flex; align-items: center; gap: .6rem;
  padding: .48rem .7rem; border-radius: 9px;
  font-size: .9rem; color: var(--muted); cursor: pointer;
  transition: background .2s, color .2s;
}
.quiz label:hover { background: rgba(124, 58, 237, .13); color: var(--text); }
.quiz input[type="radio"] { accent-color: var(--violet); width: 16px; height: 16px; }
.question.correct { border-color: rgba(52, 211, 153, .65); background: rgba(52, 211, 153, .07); }
.question.correct legend::after { content: " ✅"; }
.question.incorrect { border-color: rgba(248, 113, 113, .65); background: rgba(248, 113, 113, .06); }
.question.incorrect legend::after { content: " ❌"; }
.question.unanswered { border-style: dashed; border-color: rgba(248, 113, 113, .5); }
.quiz-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0 1rem; }
.quiz-result {
  display: block; border-radius: 14px; padding: 1.1rem 1.4rem;
  font-size: 1rem; font-weight: 600; text-align: center;
  border: 1px solid var(--line); background: var(--panel-2);
}
.quiz-result.pass { border-color: rgba(52, 211, 153, .6); background: rgba(52, 211, 153, .1); color: #86efac; }
.quiz-result.fail { border-color: rgba(248, 113, 113, .6); background: rgba(248, 113, 113, .09); color: #fca5a5; }
.btn.disabled { opacity: .45; pointer-events: none; }

.practice {
  margin-top: 2rem; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  padding: 1.4rem 1.6rem;
}
.checklist { display: grid; gap: .45rem; margin: .9rem 0; }
.checklist label {
  display: flex; gap: .65rem; align-items: center; cursor: pointer;
  padding: .55rem .8rem; border-radius: 10px; font-size: .91rem;
  color: var(--muted); border: 1px solid transparent; transition: all .2s;
}
.checklist label:hover { background: rgba(124, 58, 237, .1); color: var(--text); }
.checklist input { accent-color: var(--gold); width: 17px; height: 17px; flex-shrink: 0; }
.checklist input:checked + span, .checklist label:has(input:checked) { color: #a7f3d0; text-decoration: line-through; opacity: .75; }
.check-progress { font-weight: 700; color: var(--gold-light) !important; margin: 0 !important; }
.exam-pass {
  margin-top: 1.8rem; text-align: center;
  border: 1px solid rgba(230, 194, 41, .4); border-radius: 16px;
  background: radial-gradient(400px 140px at 50% 0%, rgba(230,194,41,.14), transparent),
              var(--panel);
  padding: 1.4rem; font-size: .98rem;
}
.block-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

/* ---------- demo renderizada en vivo ---------- */
.demo-form {
  margin-top: 1.4rem;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  padding: 1.3rem 1.5rem 1.5rem;
}
.demo-form fieldset { border: 1px dashed var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.demo-form legend { font-size: .8rem; font-weight: 700; color: var(--gold); padding: 0 .5rem; letter-spacing: .06em; }
.demo-form label { display: block; font-size: .84rem; font-weight: 600; color: var(--violet-soft); margin: .8rem 0 .3rem; }
.demo-form input, .demo-form select, .demo-form textarea {
  width: 100%; max-width: 360px; padding: .6rem .9rem;
  border-radius: 10px; border: 1px solid var(--line);
  background: #12081f; color: var(--text); font-size: .9rem; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.demo-form input:focus, .demo-form select:focus, .demo-form textarea:focus {
  border-color: var(--violet-light); box-shadow: 0 0 0 4px rgba(124, 58, 237, .18);
}
.demo-form input:user-invalid, .demo-form input:not(:placeholder-shown):invalid { border-color: rgba(248, 113, 113, .7); }
.demo-form textarea { resize: vertical; }
.demo-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.demo-row > div { flex: 1 1 200px; }
.demo-ok { color: #86efac; }

@media (max-width: 1020px) {
  .course-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .an-labels { font-size: .64rem; }
}
@media (max-width: 1020px) {
  .hero-grid, .course-grid { grid-template-columns: 1fr; }
  .hero-img { order: -1; max-width: 520px; margin-inline: auto; }
  .course-grid-flip .course-media { order: 0; }
  .course-media { position: static; max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: rgba(13, 6, 26, .97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 6% 1.6rem; gap: .4rem;
    transform: translateY(-130%); transition: transform .38s cubic-bezier(.6, .05, .28, .91);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-link { width: 100%; padding: .8rem 1rem; }
  .nav-menu .btn { justify-content: center; margin-top: .6rem; }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent;
    display: none; min-width: 0; padding: 0 0 0 1.1rem;
  }
  .dropdown.open .dropdown-menu { display: block; }
  .drop-btn svg { transition: transform .3s; }
  .dropdown.open .drop-btn svg { transform: rotate(180deg); }
}

@media (max-width: 560px) {
  .stats { gap: 1.1rem 1.8rem; }
  .stats b { font-size: 1.45rem; }
  .flow-arrow { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .brand-name { font-size: 1.12rem; }
}

/* ============================================================
   LABORATORIO DE RETOS PRÁCTICOS
   ============================================================ */
[data-lab] { margin-top: .4rem; }

.lab-dialog {
  position: fixed; inset: 0; margin: auto;
  width: min(1400px, 97vw);
  height: min(920px, 95vh);
  padding: 0; border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); color: var(--text);
  overflow: hidden;
}
/* display:flex SOLO abierto: si no, sobrescribe el display:none del
   <dialog> cerrado y el panel seguiría visible tras pulsar Cerrar */
.lab-dialog[open] { display: flex; flex-direction: column; }
.lab-dialog::backdrop { background: rgba(4, 2, 10, .78); backdrop-filter: blur(4px); }

.lab-head { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.lab-title { font-size: 1rem; }
.lab-score { margin-left: auto; font-weight: 700; color: var(--gold); white-space: nowrap; }
.lab-score.all-done { color: #86efac; }
.lab-head .btn-sm { flex: none; }

.lab-reset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .65rem 1.3rem;
  font-size: .9rem;
  color: #fde68a;
  background: rgba(250, 204, 21, .08);
  border-bottom: 1px solid rgba(250, 204, 21, .35);
}
.lab-reset-bar[hidden] { display: none; }
.lab-reset-bar-actions { display: flex; gap: .5rem; flex: none; }

.lab-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
.lab-right { display: grid; grid-template-rows: 52% 48%; min-height: 0; }

.lab-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.lab-editor-pane { border-right: 1px solid var(--line); }
.lab-preview-pane { border-bottom: 1px solid var(--line); }

.lab-pane-bar {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .55rem 1rem; font-size: .78rem; font-weight: 700;
  color: var(--violet-soft); letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); background: rgba(124, 58, 237, .07);
}
.lab-pane-bar small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); margin-left: auto; }

.lab-editor {
  flex: 1; width: 100%; resize: none; border: 0; outline: none;
  background: #12081f; color: #ece7f8;
  font-family: "Fira Code", monospace; font-size: .86rem; line-height: 1.55;
  padding: 1rem 1.1rem; tab-size: 2; white-space: pre;
}
.lab-editor:focus { box-shadow: inset 0 0 0 2px rgba(124, 58, 237, .45); }

.lab-frame { flex: 1; width: 100%; border: 0; background: #fff; }

.lab-rules { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: .8rem 1.1rem; display: grid; gap: .55rem; align-content: start; }
.lab-rule {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .88rem; line-height: 1.4;
  padding: .55rem .8rem; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
}
.lab-rule.pass { border-color: rgba(134, 239, 172, .35); background: rgba(134, 239, 172, .07); }
.lab-rule.fail { opacity: .75; }

@media (max-width: 900px) {
  .lab-dialog { height: 97vh; }
  .lab-grid { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 42%) 58%; overflow-y: auto; }
  .lab-editor-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .lab-right { grid-template-rows: auto auto; }
  .lab-frame { min-height: 200px; }
}

/* ============================================================
   DIÁLOGO DE ENHORABUENA DEL LABORATORIO
   ============================================================ */
.lab-congrats {
  position: fixed; inset: 0; margin: auto;
  width: min(440px, 92vw);
  padding: 2.6rem 2.2rem 2.2rem;
  border: 1px solid rgba(134, 239, 172, .4);
  border-radius: 20px;
  text-align: center;
  color: #dcfce7;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, .18), transparent 62%),
    linear-gradient(165deg, #122a1e 0%, #0e1d15 60%, #0b1510 100%);
}
.lab-congrats[open] { animation: congrats-pop .38s cubic-bezier(.34, 1.56, .64, 1); }
.lab-congrats::backdrop { background: rgba(3, 12, 7, .74); backdrop-filter: blur(3px); }

@keyframes congrats-pop {
  from { transform: scale(.82); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.congrats-logo {
  width: 64px; height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(250, 204, 21, .35));
}
.congrats-title { margin: .9rem 0 .3rem; font-size: 1.5rem; color: #86efac; }
.congrats-score { display: block; margin-bottom: .55rem; font-weight: 800; letter-spacing: .02em; color: var(--gold); }
.congrats-text { margin: 0 0 1.5rem; font-size: .92rem; line-height: 1.55; color: #bbf7d0; }

.btn-congrats {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  border-color: transparent;
  color: #052e14;
  font-weight: 700;
}
.btn-congrats:hover { background: linear-gradient(135deg, #86efac, #22c55e); }

@media (prefers-reduced-motion: reduce) {
  .lab-congrats[open] { animation: none; }
}

/* ============================================================
   DIÁLOGO DE BIENVENIDA (botón Test del menú)
   ============================================================ */
.test-dialog {
  position: fixed; inset: 0; margin: auto;
  width: min(1240px, 80vw);
  height: min(820px, 80vh);
  padding: 0; overflow: hidden;
  border: 1px solid rgba(167, 139, 250, .35);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 58, 237, .22), transparent 46%),
    radial-gradient(circle at 88% 82%, rgba(234, 179, 8, .12), transparent 42%),
    var(--panel);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}
/* display:flex SOLO abierto, para no pisar el display:none nativo */
.test-dialog[open] { display: flex; animation: test-in .6s cubic-bezier(.22, 1, .36, 1) both; }

@keyframes test-in {
  from { opacity: 0; transform: translateY(56px) scale(.88); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.test-dialog[open]::backdrop { animation: test-backdrop .45s ease both; background: rgba(4, 2, 10, .8); backdrop-filter: blur(5px); }
@keyframes test-backdrop { from { opacity: 0; } to { opacity: 1; } }

.test-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
  color: var(--text); font-size: 1rem; cursor: pointer;
  transition: transform .25s, background .25s;
}
.test-close:hover { transform: rotate(90deg) scale(1.08); background: rgba(124, 58, 237, .3); }

.test-grid {
  flex: 1; min-width: 0; overflow-y: auto;
  display: flex; align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem);
  padding: clamp(1.6rem, 4vw, 3.5rem);
}

.test-logo { flex: 0 1 min(360px, 34%); margin: 0; text-align: center; }
.test-logo img {
  width: 100%; max-width: 340px; height: auto;
  filter: drop-shadow(0 14px 38px rgba(124, 58, 237, .45));
  animation: test-float 5.5s ease-in-out infinite alternate;
}
@keyframes test-float {
  from { transform: translateY(-8px) rotate(-1.2deg); }
  to   { transform: translateY(10px) rotate(1.2deg); }
}

.test-content { flex: 1; min-width: 0; }
.test-content > * { animation: test-rise .65s ease backwards; }
.test-content > *:nth-child(1) { animation-delay: .15s; }
.test-content > *:nth-child(2) { animation-delay: .25s; }
.test-content > *:nth-child(3) { animation-delay: .35s; }
.test-content > *:nth-child(4) { animation-delay: .45s; }
.test-content > *:nth-child(5) { animation-delay: .55s; }
.test-content > *:nth-child(6) { animation-delay: .68s; }
.test-content > *:nth-child(7) { animation-delay: .8s; }
@keyframes test-rise {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: none; }
}

.test-content h2 { margin: .35rem 0 1.1rem; font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.15; }
.test-content h2 em { color: var(--gold); font-style: normal; }
.test-content p { margin: 0 0 1rem; line-height: 1.65; color: var(--muted); font-size: .98rem; max-width: 62ch; }
.test-content p strong { color: var(--text); }
.test-final { color: #fde68a !important; font-weight: 600; }
.test-cta { margin-top: .6rem; }

@media (max-width: 760px) {
  .test-dialog { width: 92vw; height: 92vh; }
  .test-grid { flex-direction: column; justify-content: center; text-align: left; gap: 1.4rem; }
  .test-logo { flex-basis: auto; }
  .test-logo img { max-width: 150px; animation: none; }
  .test-content > * { animation-duration: .5s; }
}

@media (prefers-reduced-motion: reduce) {
  .test-dialog[open],
  .test-dialog[open]::backdrop,
  .test-content > *,
  .test-logo img { animation: none; }
}

/* ============================================================
   PÁGINA LEGAL (Aviso legal · Privacidad · Cookies)
   ============================================================ */
.footer-bottom a {
  color: var(--violet-soft);
  transition: color .2s;
}
.footer-bottom a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.legal-article { max-width: 880px; margin: 0 auto 3.5rem; }
.legal-article .lesson > h2:first-child {
  margin-top: 0;
  color: var(--gold-light);
}
.legal-article .lesson { margin-bottom: 4rem; }
.legal-article h3 { display: flex; align-items: center; gap: .5rem; }
.legal-article h3::before {
  content: "◆";
  font-size: .62rem;
  color: var(--gold);
}

.legal-link { color: var(--violet-light); text-decoration: underline; text-underline-offset: 3px; }
.legal-link:hover { color: var(--gold-light); }

.doc-table-like {
  display: grid; gap: .45rem;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 13px;
  padding: 1rem 1.2rem; margin: 0 0 1.2rem;
  font-size: .93rem; color: var(--muted);
}
.doc-table-like li strong { color: var(--text); font-weight: 600; }

/* ============================================================
   DIÁLOGO LEGAL (Aviso legal · Privacidad · Cookies)
   ============================================================ */
.legal-dialog {
  position: fixed; inset: 0; margin: auto;
  width: min(900px, 96vw);
  height: min(880px, 94vh);
  padding: 0; overflow: hidden;
  border: 1px solid rgba(167, 139, 250, .35);
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog::backdrop { background: rgba(4, 2, 10, .8); backdrop-filter: blur(5px); }
.legal-dialog iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }

.legal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 5;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
  color: var(--text); font-size: 1rem; cursor: pointer;
  transition: transform .25s, background .25s;
}
.legal-close:hover { transform: rotate(90deg) scale(1.08); background: rgba(124, 58, 237, .3); }

/* aviso-legal.html cuando se muestra dentro del diálogo */
body.legal-dialog-mode .header,
body.legal-dialog-mode .footer,
body.legal-dialog-mode #toTop,
body.legal-dialog-mode .breadcrumb { display: none; }
body.legal-dialog-mode .course-hero { padding-top: 2.4rem; }
