/* =============================================================================
   Sidif Awareness — Capa de dirección de arte (editorial premium).
   Carga DESPUÉS de styles.css, así que gana en igualdad de especificidad.
   Sistema: Fraunces (display serif) · Inter (UI/cuerpo) · IBM Plex Mono (etiquetas).
   Paleta: navy #01325C · granate #7D0E0F sobre papel cálido.
   ============================================================================= */

:root {
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-ui: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "Plus Jakarta Sans", system-ui, sans-serif;

  --navy: #01325C;
  --navy-900: #0d2746;
  --navy-950: #071a30;
  --granate: #7d0e0f;
  --granate-600: #951517;
  --sand: #c98a4b;          /* acento cálido caribeño, muy puntual */

  --paper: #f4f0e8;         /* papel cálido */
  --paper-2: #ece6d9;
  --surface: #fffdf8;       /* tarjetas */
  --ink: #1b2531;
  --muted: #5d6775;
  --line: #e4dccd;          /* filete cálido */
  --line-strong: #d4c9b3;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -34px rgba(13, 39, 70, .45);
  --shadow-sm: 0 1px 2px rgba(27, 37, 49, .06);
  --maxw: 1200px;
}

html, body { background: var(--paper); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(125, 14, 15, .16); }

/* ---------------------------------------------------------------- Topbar --- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(248, 245, 238, .82);
  -webkit-backdrop-filter: saturate(1.3) blur(12px); backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--ink); box-shadow: none;
  padding: 15px clamp(20px, 4vw, 48px); min-height: 0;
}
.topbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--granate) 0%, var(--granate) 38%, var(--navy) 100%);
}
.brand { display: flex; align-items: center; gap: 15px; }
.brand-logo { width: 100px; height: auto; object-fit: contain; filter: brightness(.38) saturate(.5); }
.brand-divider { height: 26px; width: 1px; background: var(--line-strong); }
.brand-product { font-family: var(--font-ui); font-weight: 650; font-size: 15px; letter-spacing: -.01em; color: var(--navy); }
.brand-product span { display: block; font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.nav-training { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); text-decoration: none; }
.nav-training:hover { color: var(--granate); }
.lang-toggle {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 7px; padding: 6px 11px;
}
.lang-toggle:hover { border-color: var(--navy); color: var(--navy); background: transparent; }
.who { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 600; font-size: 12px; }
.logout { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.logout:hover { color: var(--granate); }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 99; background: #fff; color: var(--navy); padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 10px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }

/* ----------------------------------------------------------- Home / hero --- */
.learning-home { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px) 80px; flex: 1; }

.page-context {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.page-context span:first-child { color: var(--navy); font-weight: 500; }
.page-context span:last-child { letter-spacing: 0; text-transform: none; font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--navy-900); }

.welcome-grid {
  display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; padding: clamp(44px, 6vw, 84px) 0;
}
.eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--granate); margin: 0; display: inline-flex; align-items: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--granate); margin-right: 10px; box-shadow: 0 0 0 4px rgba(125, 14, 15, .13); }
.welcome-copy h1 {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-weight: 600; font-size: clamp(40px, 5vw, 66px); line-height: 1.02; letter-spacing: -.015em;
  color: var(--navy); margin: 22px 0 0;
}
.welcome-copy h1 span { color: var(--granate); font-style: normal; font-weight: 600; }
.welcome-lead { font-size: 17.5px; line-height: 1.68; color: var(--muted); max-width: 44ch; margin: 24px 0 32px; }
.welcome-copy .btn-primary { margin-top: 2px; }
.course-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.course-meta span + span::before { content: "/"; margin-right: 14px; color: var(--line-strong); }
.reassurance { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); margin: 26px 0 0; }
.reassurance span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(26, 127, 75, .12); color: #1a7f4b; font-size: 12px; margin: 0; }

.editorial-hero {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 4.6; max-height: 580px; box-shadow: var(--shadow); isolation: isolate;
}
.editorial-hero > img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 28%; }
.editorial-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(185deg, rgba(7, 26, 48, 0) 38%, rgba(7, 20, 38, .9) 100%); }
.editorial-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); pointer-events: none; }
.editorial-hero figcaption { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 26px; color: #fff; }
.editorial-hero figcaption span { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #e4bb8e; margin-bottom: 12px; }
.editorial-hero figcaption strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.5vw, 30px); line-height: 1.16; letter-spacing: -.01em; max-width: 15ch; }

/* --------------------------------------------------------- Learning path --- */
.learning-path { padding-top: 58px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.section-heading .eyebrow { color: var(--muted); }
.section-heading h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.015em; line-height: 1.08; color: var(--navy); margin: 14px 0 0; max-width: 20ch; }
.section-heading h2 + * { white-space: nowrap; }
.path-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-strong); }
.path-item { position: relative; display: block; padding: 30px 28px 32px; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); background: transparent; transition: background .22s ease; }
.path-item:nth-child(3n) { border-right: 0; }
.path-item::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 0; height: 2px; background: var(--granate); transition: width .3s ease; }
.path-item:hover { background: var(--surface); }
.path-item:hover::after { width: 46px; }
.step-number { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: -.02em; color: var(--granate); margin-bottom: 20px; }
.path-item h3 { font-family: var(--font-ui); font-weight: 650; font-size: 17px; letter-spacing: -.01em; color: var(--navy); margin: 0 0 9px; }
.path-item p { font-size: 14px; line-height: 1.62; color: var(--muted); margin: 0 0 20px; }
.step-kind { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ----------------------------------------------- Pantallas de tarjeta ------ */
.hero { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); padding: clamp(48px, 8vw, 96px) 20px; }
.hero::after, .hero-aura { display: none; }
.card {
  position: relative; overflow: hidden; text-align: left;
  width: 100%; max-width: 460px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(32px, 4vw, 46px); animation: none;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--granate), var(--navy)); }
.card h1 { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: clamp(26px, 3vw, 33px); letter-spacing: -.015em; }
.card .h2 { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: clamp(22px, 2.6vw, 27px); letter-spacing: -.01em; }
.card .lead, .card .muted { margin-left: 0; }
.card-narrow { max-width: 430px; }
.card-alert { border-top: 1px solid var(--line); }
.card-result { text-align: center; }
.card-result .lead, .card-result .muted { margin-left: auto; margin-right: auto; }
.pill-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; text-transform: none; color: var(--granate); background: rgba(125, 14, 15, .07); border: 1px solid rgba(125, 14, 15, .18); }

/* ----------------------------------------------------------- Botones -------- */
.btn { font-family: var(--font-ui); font-weight: 600; letter-spacing: -.005em; border-radius: 10px; }
.btn-lg { padding: 15px 26px; font-size: 15px; }
.btn-primary { background: var(--granate); color: #fff; box-shadow: 0 12px 26px -16px rgba(125, 14, 15, .85); }
.btn-primary:hover { background: var(--granate-600); transform: translateY(-1px); box-shadow: 0 16px 30px -16px rgba(125, 14, 15, .8); }
.btn-ms { background: var(--navy); color: #fff; box-shadow: 0 12px 26px -16px rgba(1, 50, 92, .7); }
.btn-ms:hover { background: var(--navy-900); transform: translateY(-1px); }
.btn-ghost { border: 1.5px solid var(--line-strong); color: var(--navy); background: transparent; }
.btn-ghost:hover { border-color: var(--navy); background: var(--surface); }

/* --------------------------------------------------- Formularios ----------- */
.field span { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input { background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-family: var(--font-body); }
.field input:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(1, 50, 92, .1); }

/* ------------------------------------------------ Módulo / lección --------- */
.wrap { max-width: 980px; }
.module-head { text-align: left; border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 34px; }
.module-head .eyebrow { color: var(--granate); }
.module-head h1 { font-family: var(--font-display); font-weight: 600; color: var(--navy); letter-spacing: -.015em; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; margin: 14px 0 10px; }
.module-head .lead { margin-left: 0; color: var(--muted); font-size: 17px; }

.video-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; overflow: hidden; }
.video-embed { border-radius: 0; }
.lesson-intro { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
.lesson-intro > img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; object-position: 50% 30%; }
.lesson-intro > div { padding: clamp(26px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.lesson-intro .eyebrow { color: var(--granate); }
.lesson-intro h2 { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.01em; line-height: 1.18; margin: 12px 0 10px; }
.lesson-intro p:not(.eyebrow) { font-size: 14.5px; color: var(--muted); line-height: 1.65; margin: 0 0 20px; }

.keypoints h2, .quiz h2 { font-family: var(--font-display); font-weight: 600; color: var(--navy); letter-spacing: -.01em; font-size: clamp(22px, 2.4vw, 28px); }
.kp-list li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--granate); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); font-size: 15px; }
.kp-check { background: rgba(26, 127, 75, .12); color: #1a7f4b; border-radius: 7px; }

/* ----------------------------------------------------------- Quiz ---------- */
.q { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); padding: 24px 26px; }
.q legend { font-family: var(--font-ui); font-weight: 650; color: var(--navy); font-size: 16px; }
.question-group { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.question-group legend { max-inline-size: 100%; overflow-wrap: anywhere; }
.qn { background: var(--navy); border-radius: 7px; font-family: var(--font-mono); }
.opt { border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.opt:hover { border-color: var(--navy); background: var(--surface); }
.opt:has(input:checked) { border-color: var(--granate); background: rgba(125, 14, 15, .05); }
.opt-text { font-size: 15px; }

/* -------------------------------------------------------- Resultado -------- */
.card-result { max-width: 500px; }
.score { font-family: var(--font-mono); color: var(--navy); }

/* ------------------------------------------------------- Certificado ------- */
.cert { background: var(--surface); box-shadow: var(--shadow); }
.cert-inner { border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.cert-inner::before { content: ""; position: absolute; }
.cert-kicker { font-family: var(--font-mono); color: var(--granate); }
.cert-title { font-family: var(--font-display); font-weight: 600; color: var(--navy); letter-spacing: -.01em; }
.cert-name { font-family: var(--font-display); font-weight: 600; font-style: normal; color: var(--ink); }
.cert-awarded, .cf-item span { font-family: var(--font-mono); }
.cert-mark { margin-bottom: 22px; }
.cert-mark .brand-logo { filter: brightness(.38) saturate(.5); }

/* ---------------------------------------------------------- Reporte -------- */
.tbl th { font-family: var(--font-mono); font-weight: 500; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }

/* ----------------------------------------------------------- Footer -------- */
.footer { background: var(--navy-950); color: #9fb6cc; border-top: 0; padding: 28px clamp(20px, 4vw, 48px); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }

/* -------------------------------------------------------- Responsive ------- */
@media (min-width: 1500px) { .welcome-grid { padding: 72px 0; } .editorial-hero { max-height: 620px; } }
@media (max-width: 900px) {
  .topbar { padding: 14px 22px; } .topbar-right { gap: 14px; }
  .welcome-grid { gap: 30px; } .path-item { padding: 24px 18px; }
  .brand-product span { display: none; }
}
@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; gap: 12px; } .nav-training { display: none; }
  .brand-logo { width: 84px; } .brand-divider { height: 24px; }
  .learning-home { padding: 0 20px 48px; }
  .page-context span:last-child { display: none; }
  .welcome-grid { grid-template-columns: 1fr; padding: 24px 0 40px; gap: 30px; }
  .welcome-copy { order: 2; } .editorial-hero { order: 1; aspect-ratio: 16 / 12; }
  .welcome-copy h1 { font-size: clamp(36px, 9vw, 46px); }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .path-grid { grid-template-columns: 1fr; }
  .path-item, .path-item:nth-child(3n) { border-right: 0; }
  .lesson-intro { grid-template-columns: 1fr; } .lesson-intro > img { min-height: 200px; }
}

/* ------------------------------------------------- Admin ------------------- */
.admin-section-title { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: 20px; letter-spacing: -.01em; margin: 36px 0 14px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; }
.badge-invited { background: #fdf0e4; color: #b4530c; }
.badge-active { background: #e7eef6; color: #01325c; }
.badge-completed { background: #e7f5ee; color: #1a7f4b; }
.admin-manage { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 10px 0 6px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.admin-card .admin-section-title { margin-top: 0; }
.admin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-form input[type=email], .admin-form input[type=text], .admin-form select { flex: 1 1 150px; min-width: 130px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-family: var(--font-body); background: #fff; }
.admin-form .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex: 0 0 auto; }
.admin-form .btn { flex: 0 0 auto; padding: 11px 20px; }
.admin-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.admin-list form { margin: 0; }
.link-danger { background: none; border: 0; color: var(--granate); font-size: 12px; cursor: pointer; font-family: var(--font-ui); }
.muted-li { color: var(--muted); font-size: 13px; border: 0 !important; }
@media (max-width: 760px) { .admin-manage { grid-template-columns: 1fr; } }
.link { color: var(--navy); font-size: 13px; text-decoration: none; font-weight: 600; margin-right: 10px; }
.link:hover { color: var(--granate); }

/* ------------------------------------------------- Editor de contenido ----- */
.editor-form { display: grid; gap: 18px; margin-top: 8px; }
.editor-form .field { display: grid; gap: 6px; }
.editor-form .field > span { font-size: 12px; font-weight: 600; color: var(--navy); }
.editor-form input, .editor-form textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px; background: #fff; }
.editor-form textarea { resize: vertical; line-height: 1.55; }
.editor-form input:focus, .editor-form textarea:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(1, 50, 92, .1); }
.ed-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ed-row3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 680px) { .ed-row, .ed-row3 { grid-template-columns: 1fr; } }

/* ------------------------------------------------- Mi formación ------------ */
.course-list { display: grid; gap: 14px; }
.course-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--granate); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-sm); }
.course-card.is-done { border-left-color: #1a7f4b; }
.course-status { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--granate); margin-bottom: 8px; }
.is-done .course-status { color: #1a7f4b; }
.course-card h3 { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: 19px; margin: 0 0 6px; letter-spacing: -.01em; }
.course-card p { color: var(--muted); font-size: 14px; margin: 0; }
.course-action { flex: none; }
@media (max-width: 620px) { .course-card { flex-direction: column; align-items: flex-start; } .course-action .btn { width: 100%; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =============================================================================
   CAPA LMS — navegación por pestañas, dashboard, tarjetas de curso,
   lección con syllabus y acceso a pantalla dividida.
   ============================================================================= */

/* ------------------------------------------------------- Nav por pestañas --- */
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.nav-tab {
  font-family: var(--font-ui); font-weight: 600; font-size: 13px; letter-spacing: -.005em;
  color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 9px;
  border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s;
}
.nav-tab:hover { color: var(--navy); background: rgba(1, 50, 92, .06); }
.nav-tab.is-active { color: var(--navy); background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.who-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ Dashboard ----- */
.dash { padding-top: 0; }
.dash-hero {
  position: relative; overflow: hidden;
  margin: clamp(18px, 3vw, 30px) 0 0; border-radius: var(--radius);
  background:
    radial-gradient(700px 340px at 88% -20%, rgba(194, 53, 55, .5), transparent 62%),
    linear-gradient(120deg, var(--navy-950) 0%, var(--navy) 58%, var(--navy-700) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: clamp(30px, 4.5vw, 52px) clamp(24px, 4vw, 52px);
  box-shadow: var(--shadow);
}
.dash-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 90% at 70% 10%, #000 0%, transparent 75%);
}
.dash-hero-copy { position: relative; z-index: 1; max-width: 560px; }
.eyebrow.light { color: #e8b7b8; }
.dash-hero h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em;
  font-size: clamp(30px, 4vw, 48px); line-height: 1.05; margin: 14px 0 12px; color: #fff;
}
.dash-hero h1 span { color: #f3c4c5; }
.dash-lead { color: #b9cbdd; font-size: 16px; line-height: 1.6; margin: 0; max-width: 46ch; }

.dash-progress { position: relative; z-index: 1; flex: none; width: 150px; text-align: center; }
.ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: rgba(255, 255, 255, .16); }
.ring-fg {
  stroke: #f3c4c5; stroke-linecap: round;
  stroke-dasharray: 326.7; transition: stroke-dashoffset .8s cubic-bezier(.2, .7, .2, 1);
}
.dash-progress-num { margin-top: -88px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dash-progress-num strong { font-family: var(--font-display); font-weight: 600; font-size: 30px; letter-spacing: -.02em; }
.dash-progress-num span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #b9cbdd; }
.dash-progress-sub { margin: 26px 0 0; font-size: 12.5px; color: #b9cbdd; }
.catalog-count .dash-progress-num { margin-top: 0; height: auto; }
.catalog-count .dash-progress-num strong { font-size: 52px; }
.catalog-count .dash-progress-sub { margin-top: 6px; }

.dash-continue {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  margin-top: 22px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--granate); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 36px); box-shadow: var(--shadow-sm);
}
.dash-continue-copy { max-width: 620px; }
.dash-continue h2 { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: clamp(21px, 2.4vw, 28px); letter-spacing: -.01em; margin: 12px 0 8px; }
.dash-continue p:not(.eyebrow) { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }
.mod-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mod-meta span + span::before { content: "·"; margin-right: 16px; color: var(--line-strong); }

.dash-section { margin-top: clamp(38px, 5vw, 56px); }

/* ------------------------------------------------------- Tarjetas de curso -- */
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mod-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .22s ease;
}
.mod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.mod-thumb { position: relative; display: block; aspect-ratio: 16 / 8.2; overflow: hidden; background: var(--navy-950); }
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(.92); }
.mod-thumb::after { content: ""; position: absolute; inset: 0; background: var(--tone, var(--navy)); mix-blend-mode: color; opacity: .88; }
.mod-thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(185deg, rgba(7, 26, 48, 0) 45%, rgba(7, 20, 38, .55) 100%);
}
.tone-1 { --tone: #01325c; } .tone-2 { --tone: #7d0e0f; } .tone-3 { --tone: #0e5a4f; }
.tone-4 { --tone: #b06a1f; } .tone-5 { --tone: #44357a; } .tone-6 { --tone: #0a3f6e; }

.mod-thumb-badge {
  position: absolute; z-index: 2; top: 12px; left: 12px;
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 7px; color: #fff; background: rgba(7, 26, 48, .72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.mod-thumb-badge.is-done { background: #1a7f4b; }
.mod-thumb-badge.is-progress { background: var(--granate); }
.mod-thumb-time {
  position: absolute; z-index: 2; right: 12px; bottom: 12px;
  font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(7, 26, 48, .72); padding: 4px 10px; border-radius: 999px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

.mod-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.mod-body h3 { margin: 0; font-family: var(--font-ui); font-weight: 650; font-size: 16.5px; letter-spacing: -.01em; line-height: 1.3; }
.mod-body h3 a { color: var(--navy); text-decoration: none; }
.mod-body h3 a:hover { color: var(--granate); }
.mod-body > p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); flex: 1; }
.mod-progress { height: 6px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.mod-progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--navy), var(--navy-700)); transition: width .5s ease; }
.mod-progress span[style^="width:100"] { background: #1a7f4b; }
.mod-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.btn-sm { padding: 9px 18px; font-size: 13px; border-radius: 9px; }
.mod-best { font-size: 12px; color: var(--muted); font-weight: 600; }
.mod-best.is-done { color: #1a7f4b; }

/* ------------------------------------------------------------- Lección ------ */
.lesson { padding-top: 0; }
.lesson-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 0; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.lesson-crumb { color: var(--muted); text-decoration: none; font-weight: 600; }
.lesson-crumb:hover { color: var(--granate); }
.lesson-crumb-sep { color: var(--line-strong); }
.lesson-crumb-current { color: var(--navy); font-weight: 650; }
.lesson-bar-spacer { flex: 1; }

.lesson-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(26px, 4vw, 48px); padding-top: 34px; align-items: start; }
.lesson-side { position: sticky; top: 92px; display: grid; gap: 18px; }
.side-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px; box-shadow: var(--shadow-sm); }
.side-title { font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.syllabus { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.syllabus a {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 9px;
  text-decoration: none; transition: background .15s;
}
.syllabus a:hover { background: rgba(1, 50, 92, .05); }
.sy-num { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--granate); width: 24px; flex: none; }
.sy-label { flex: 1; font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; color: var(--navy); }
.sy-kind { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.path-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.path-list a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; text-decoration: none; transition: background .15s; }
.path-list a:hover { background: rgba(1, 50, 92, .05); }
.path-list .is-current a { background: rgba(125, 14, 15, .06); box-shadow: inset 2px 0 0 var(--granate); }
.path-dot {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); border-radius: 50%;
  font-size: 11px; font-weight: 700; color: var(--muted); background: #fff;
}
.path-list .is-current .path-dot { border-color: var(--granate); color: var(--granate); }
.path-list .is-done .path-dot { border-color: #1a7f4b; background: #1a7f4b; color: #fff; }
.path-name { font-size: 13px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.path-list .is-done .path-name { color: var(--muted); }

.lesson-main { min-width: 0; }
.lesson-main .module-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 24px; }
.quiz-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.quiz-pass-note { margin: 0; font-size: 12.5px; }
.lesson-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line);
}

/* --------------------------------------------------- Acceso a pantalla dividida */
.auth-split {
  flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: clamp(18px, 3vw, 30px) clamp(20px, 4vw, 48px) 60px;
  gap: clamp(20px, 3vw, 36px);
}
.auth-aside {
  position: relative; overflow: hidden; border-radius: var(--radius); min-height: 420px;
  box-shadow: var(--shadow); isolation: isolate; display: flex;
}
.auth-aside img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) contrast(1.05); }
.auth-aside::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(1, 50, 92, .18) 0%, rgba(7, 26, 48, .88) 78%),
    linear-gradient(0deg, rgba(125, 14, 15, .25), rgba(125, 14, 15, .25));
  mix-blend-mode: normal;
}
.auth-aside-copy { position: relative; z-index: 1; margin-top: auto; padding: clamp(26px, 3vw, 40px); color: #fff; }
.auth-aside-copy h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -.015em; margin: 14px 0 10px; color: #fff; }
.auth-aside-copy h2 span { color: #f3c4c5; }
.auth-aside-copy p:not(.eyebrow) { color: #c4d4e4; font-size: 14.5px; margin: 0; max-width: 38ch; }
.auth-panel { display: grid; place-items: center; }
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-card .btn { width: 100%; justify-content: center; }
.auth-foot { margin-top: 18px; font-size: 12.5px; text-align: center; }

/* -------------------------------------------------------- Responsive LMS ---- */
@media (max-width: 1020px) {
  .mod-grid { grid-template-columns: repeat(2, 1fr); }
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-side { position: static; order: 2; }
}
@media (max-width: 860px) {
  .main-nav { order: 3; flex-basis: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .dash-progress { display: flex; align-items: center; gap: 18px; width: auto; text-align: left; }
  .dash-progress-num { margin-top: -88px; }
  .catalog-count .dash-progress-num { margin-top: 0; }
  .dash-progress-sub { margin-top: 0; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { min-height: 260px; }
}
@media (max-width: 620px) {
  .mod-grid { grid-template-columns: 1fr; }
  .dash-continue { align-items: stretch; }
  .dash-continue .btn { width: 100%; justify-content: center; }
  .lesson-bar .btn-sm { padding: 8px 12px; }
  .who-name { display: none; }
}

/* =============================================================================
   v2 — SISTEMA SOBRIO (herramienta interna, no landing de marketing)
   - Geometría cuadrada: radios mínimos, botones planos sólidos
   - Fondo neutro frío, superficies blancas
   - Sin kickers/eyebrows promocionales; titulares funcionales
   ============================================================================= */

:root {
  --paper: #edeff3;          /* neutro frío, no crema */
  --paper-2: #e2e5eb;
  --surface: #ffffff;
  --line: #dde1e8;
  --line-strong: #c4cad4;

  --radius: 8px;
  --radius-sm: 5px;

  /* Titulares en la cara de UI: menos "editorial", más herramienta */
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ------------------------------------------------------------ Botones ------- */
.btn {
  border-radius: 4px;
  padding: 12px 20px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  box-shadow: none;
}
.btn-lg { padding: 13px 24px; font-size: 12.5px; }
.btn-sm { padding: 9px 16px; font-size: 11px; border-radius: 4px; }
.btn-primary { background: var(--granate); }
.btn-primary:hover { background: var(--granate-600); transform: none; box-shadow: none; }
.btn-primary:active { transform: scale(.98); }
.btn-ms { background: var(--navy); }
.btn-ms:hover { background: var(--navy-900); transform: none; }
.btn-ghost { border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); background: #fff; transform: none; }
.btn .arrow { font-weight: 400; }

/* ------------------------------------------------------------- Topbar ------- */
.topbar { background: rgba(255, 255, 255, .88); }
.brand-logo { filter: none; }
.nav-tab { border-radius: 4px; }
.nav-tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: none; }
.lang-toggle { border-radius: 4px; }
.avatar { border-radius: 4px; }

/* ------------------------------------------------------ Pantallas de tarjeta */
.hero { background: var(--paper); }
.card { border-radius: var(--radius); box-shadow: 0 2px 10px rgba(13, 39, 70, .08); }
.card::before { background: var(--granate); height: 3px; }
.auth-foot { margin-top: 18px; font-size: 12.5px; text-align: center; }
.pill-note { border-radius: 4px; }

/* ------------------------------------------------------------ Page head ----- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: clamp(22px, 3.5vw, 36px) 0 18px; margin-bottom: 26px;
  border-bottom: 1px solid var(--line-strong);
}
.page-head h1 {
  font-family: var(--font-ui); font-weight: 700; letter-spacing: -.015em;
  font-size: clamp(22px, 2.6vw, 30px); color: var(--navy); margin: 0;
}
.page-head .sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.count-chip {
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--navy); border: 1.5px solid var(--line-strong); border-radius: 4px;
  padding: 8px 14px; background: var(--surface);
}
.progress-line { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.progress-line .bar { flex: 1; height: 8px; background: var(--paper-2); border-radius: 3px; overflow: hidden; }
.progress-line .bar span { display: block; height: 100%; background: var(--navy); border-radius: 3px; transition: width .5s ease; }
.progress-line strong { font-size: 14px; color: var(--navy); }

/* ------------------------------------------------------------- Notice ------- */
.notice {
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--granate);
  border-radius: var(--radius); padding: clamp(26px, 4vw, 40px);
  margin-top: clamp(22px, 3.5vw, 36px);
}
.notice-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--granate); margin: 0 0 14px;
}
.notice h1 {
  font-family: var(--font-ui); font-weight: 700; letter-spacing: -.015em;
  font-size: clamp(24px, 3vw, 34px); color: var(--navy); margin: 0 0 12px; line-height: 1.15;
}
.notice .lead { margin-left: 0; font-size: 15.5px; color: #314558; max-width: 62ch; }
.fact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  margin: 22px 0;
}
.fact { background: #fff; padding: 14px 16px; display: grid; gap: 4px; }
.fact-k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact-v { font-size: 13.5px; font-weight: 600; color: var(--navy); line-height: 1.4; }
.notice-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.notice-note { font-size: 12.5px; color: var(--muted); margin: 18px 0 0; }

/* ---------------------------------------------------- Encabezados de sección */
.section-heading h2 {
  font-family: var(--font-ui); font-weight: 700; font-size: 18px; letter-spacing: -.01em;
  color: var(--navy); margin: 0;
}
.section-heading { margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dash-section { margin-top: 34px; }
.path-label { font-size: 11px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------- Tarjetas de curso -- */
.mod-card { border-radius: var(--radius); box-shadow: 0 1px 3px rgba(13, 39, 70, .07); }
.mod-card:hover { transform: none; box-shadow: 0 6px 18px -8px rgba(13, 39, 70, .25); }
.mod-thumb { aspect-ratio: 16 / 7.5; }
.mod-thumb-badge { border-radius: 4px; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 26, 48, .85); }
.mod-thumb-badge.is-done { background: #1a7f4b; }
.mod-thumb-badge.is-progress { background: var(--granate); }
.mod-thumb-time { border-radius: 4px; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 26, 48, .85); }
.mod-progress { border-radius: 3px; }
.mod-progress span { border-radius: 3px; background: var(--navy); }
.mod-progress span[style^="width:100"] { background: #1a7f4b; }
.mod-body h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------- Lección ------ */
.lesson-bar { font-size: 12.5px; }
.side-block, .video-card, .q, .kp-list li { border-radius: var(--radius); box-shadow: 0 1px 3px rgba(13, 39, 70, .06); }
.path-dot { border-radius: 4px; }
.module-head h1 { font-weight: 700; }
.quiz-pass-note { font-size: 12px; }
.opt { border-radius: 4px; }
.qn { border-radius: 4px; }
.kp-check { border-radius: 4px; }

/* ----------------------------------------------------------- Certificado ---- */
.cert { border-radius: var(--radius); }
.cert-seal { width: 84px; height: 84px; }

/* ----------------------------------------------------------- Responsive ----- */
@media (max-width: 680px) {
  .fact-grid { grid-template-columns: 1fr; }
  .progress-line { width: 100%; }
  .page-head { align-items: flex-start; flex-direction: column; }
}

/* --------------------------------------------- Miniaturas con arte propio --- */
.mod-thumb.has-art { background: #f4f1ea; }
.mod-thumb.has-art img { filter: none; object-fit: cover; }
.mod-thumb.has-art::after, .mod-thumb.has-art::before { display: none; }
.lesson-intro.has-art > img { object-fit: cover; object-position: 50% 50%; background: #f4f1ea; }

/* ------------------------------------------------- Asignación por invitación ------ */
.mod-card.is-locked { opacity: .68; }
.mod-card.is-locked .mod-thumb { cursor: default; }
.mod-card.is-locked .mod-thumb img { filter: grayscale(.55) contrast(.92); }
.mod-thumb-badge.is-locked { background: #5d6775; color: #fff; }
.mod-card.is-locked .mod-foot { min-height: 30px; align-items: center; }

/* Crédito del video embebido */
.video-credit { font-size: 12px; color: var(--muted); margin: 10px 2px 0; }
.video-quiz-note { font-size: 13px; margin: 4px 2px 0; }

/* Estado vacío (Mi formación sin asignaciones) */
.empty-state {
  border: 1px dashed var(--line-strong); border-radius: 4px;
  background: var(--surface); padding: 34px 30px; margin: 8px 0 4px;
}
.empty-state h2 { font-family: var(--font-ui); font-weight: 700; font-size: 19px; color: var(--navy); margin: 0 0 8px; }
.empty-state p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 60ch; }

/* Página de simulación: pasos siguientes */
.next-steps { margin: 26px 0 8px; text-align: left; }
.next-steps-title { font-family: var(--font-ui); font-weight: 700; font-size: 15px; letter-spacing: .01em; color: var(--navy); margin: 0 0 12px; }
.steps-list { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.steps-list li {
  counter-increment: step; position: relative;
  border: 1px solid var(--line); border-radius: 4px; background: #fff;
  padding: 14px 16px 14px 52px; text-align: left;
}
.steps-list li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px;
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-family: var(--font-mono); font-size: 11px; border-radius: 2px;
}
.steps-list strong { display: block; font-size: 14px; color: var(--navy); margin-bottom: 3px; }
.steps-list span { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.notice-signin { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }

/* ====================== v4 · layout fluido + optimizado para móvil ====================== */
/* El contenido usa el ancho disponible y queda alineado con el topbar */
.wrap { max-width: 1240px; padding-left: clamp(20px, 4vw, 48px); padding-right: clamp(20px, 4vw, 48px); }
.learning-home { max-width: 1240px; }

/* Tarjetas de curso: grid fluida — llena el ancho y se apila sola según el espacio */
.mod-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }

/* Stats del admin: crecen parejo en vez de quedar sueltos */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 14px; }
.stat { min-width: 0; }

/* Lección: sidebar flexible, el contenido nunca se comprime de más */
.lesson-grid { grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); }

/* Nav por pestañas: scroll horizontal si no cabe */
.main-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.main-nav::-webkit-scrollbar { display: none; }
@media (max-width: 900px) {
  .main-nav { order: 3; width: 100%; }
}

/* -------------------------------------------------------------- Móvil (≤ 640px) ------ */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .brand { gap: 10px; }
  .brand-logo { width: 84px; }
  .brand-product { font-size: 14px; }
  .who-name { display: none; }
  .topbar-right { gap: 12px; }
  .lang-toggle { padding: 5px 9px; }

  .wrap { padding: 20px 16px 48px; }
  .learning-home { padding-left: 16px; padding-right: 16px; }
  .page-head { padding-top: 18px; margin-bottom: 20px; }

  .notice { padding: 22px 18px; }
  .notice-actions { flex-direction: column; }
  .notice-actions .btn { width: 100%; text-align: center; }
  .steps-list li { padding: 12px 14px 12px 46px; }

  .quiz-actions { flex-direction: column; align-items: stretch; }
  .quiz-actions .btn-lg { width: 100%; }

  .lesson-bar { flex-wrap: wrap; row-gap: 8px; }
  .lesson-bar-spacer { display: none; }
  .lesson-foot { display: grid; gap: 10px; }
  .lesson-foot .btn { text-align: center; }

  .fact-grid { grid-template-columns: 1fr; }
  .empty-state { padding: 24px 18px; }
  .admin-form input, .admin-form select, .admin-form .btn { width: 100%; }
  .tbl { font-size: .8rem; }
  .video-credit, .video-quiz-note { margin-left: 0; margin-right: 0; }
  .mod-thumb { aspect-ratio: 16 / 8; }
}

/* ====================== v5 · header en dos bandas (estilo LMS) ====================== */
/* Las pestañas viven en su propia franja bajo el topbar: nunca se enciman */
.topbar-wrap { position: sticky; top: 0; z-index: 30; }
.topbar { position: static; flex-wrap: nowrap; border-bottom: 0; }
.main-nav {
  display: flex; align-items: center; gap: 6px;
  margin-left: 0; padding: 8px clamp(20px, 4vw, 48px);
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(1.3) blur(12px); backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav .nav-tab { flex: 0 0 auto; white-space: nowrap; }
.lesson-side { top: 118px; }

@media (max-width: 640px) {
  .main-nav { padding: 7px 16px; }
}
@media (max-width: 420px) {
  .brand-divider, .brand-product span { display: none; }
}
@media print {
  .topbar-wrap { display: none !important; }
}

/* ---------------------- fix: colapso de la lección en pantallas medianas ---------------------- */
/* La regla fluida de v4 ganaba a este breakpoint por cascada; se reafirma aquí. */
@media (max-width: 1020px) {
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-side { position: static; order: 2; }
}

/* ============== v6 · refinamiento visual (inspiración Apple / KnowBe4) ============== */
:root {
  --line-strong: #cbd2dc;   /* enfría el filete fuerte (antes marrón cálido) */
  --ink: #1c2733;
  --muted: #5f6b7a;
  --radius: 10px;
  --radius-sm: 6px;
  --focus: 0 0 0 3px rgba(1, 50, 92, .16);
}

/* Tipografía más fina */
h1, h2, h3, .module-head h1, .notice h1, .page-head h1 { letter-spacing: -.022em; }
.section-heading h2 { letter-spacing: -.01em; }

/* Foco accesible + controles nativos en navy */
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--navy); }

/* Micro-transiciones suaves en todo lo interactivo */
a, .btn, .nav-tab, .opt, .mod-thumb img { transition: all .16s ease; }

/* ---------------------------------------------------- Pestañas estilo underline ------ */
.main-nav { padding-top: 6px; padding-bottom: 0; gap: 2px; border-bottom: 1px solid var(--line); }
.nav-tab {
  border: 0; background: transparent; border-radius: 0; box-shadow: none;
  padding: 9px 3px 10px; margin-right: 22px;
  border-bottom: 2px solid transparent;
  color: var(--muted); font-weight: 600;
}
.nav-tab:last-child { margin-right: 0; }
.nav-tab:hover { background: transparent; color: var(--navy); }
.nav-tab.is-active {
  background: transparent; color: var(--navy);
  border-bottom-color: var(--navy); box-shadow: none;
}

/* ------------------------------------------------------------- Botones --------------- */
.btn { transition: background .15s ease, border-color .15s ease, transform .12s ease; }
.btn-primary:hover { background: #8f1113; }
.btn-primary:active { transform: translateY(1px); }
.btn-ms:active { transform: translateY(1px); }
.btn-ghost { background: #fff; }
.btn-ghost:hover { background: #f6f8fa; border-color: var(--navy); }

/* ---------------------------------- Tarjetas: blancas, filete fino, sombra suave ----- */
.mod-card, .q, .side-block, .admin-card, .notice, .empty-state, .stat,
.steps-list li, .kp-list li, .card, .video-card, .count-chip {
  border-color: rgba(13, 39, 70, .09);
  box-shadow: 0 1px 2px rgba(13, 39, 70, .04);
}
.mod-card { transition: transform .18s ease, box-shadow .22s ease; }
.mod-card:not(.is-locked):hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(13, 39, 70, .25); }
.mod-thumb { overflow: hidden; }
.mod-thumb img { transition: transform .4s ease; }
.mod-card:not(.is-locked):hover .mod-thumb img { transform: scale(1.035); }
.mod-thumb-badge, .mod-thumb-time { background: rgba(7, 26, 48, .78); font-weight: 600; letter-spacing: .04em; }
.mod-body h3 { letter-spacing: -.015em; }
.mod-progress { height: 5px; background: #e8ecf1; }
.progress-line .bar { background: #e8ecf1; }

/* ------------------------------------------------------------------ Video ------------ */
.video-card { padding: 8px; background: #fff; border-radius: 12px; box-shadow: 0 16px 36px -22px rgba(13, 39, 70, .3); }
.video-embed { border-radius: 8px; }

/* ------------------------------------------------------------------ Quiz ------------- */
.opt { border-width: 1px; border-color: #d7dde5; background: #fff; }
.opt:hover { border-color: var(--navy); background: #f7f9fb; }
.opt:has(input:checked) { border-color: var(--navy); background: rgba(1, 50, 92, .05); box-shadow: inset 0 0 0 1px var(--navy); }
.opt:has(input:checked) .opt-box { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 3px #fff; }
.qn { background: var(--navy); }
.kp-list li { border-left-color: var(--navy); }
.kp-check { background: rgba(1, 50, 92, .09); color: var(--navy); }

/* --------------------------------------------------------------- Formularios --------- */
.field input, .admin-form input[type="email"], .admin-form input[type="text"], .admin-form select {
  border-width: 1px; border-color: #cfd6df; border-radius: 6px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .admin-form input:focus, .admin-form select:focus {
  border-color: var(--navy); box-shadow: var(--focus); outline: none;
}

/* --------------------------------------------------------------- Detalles ------------ */
.card { border-radius: 12px; box-shadow: 0 12px 34px -20px rgba(13, 39, 70, .2); }
.stat strong { font-size: 26px; letter-spacing: -.02em; }
.tbl thead th { background: #f6f8fa; }
.tbl tbody tr:hover td { background: #f9fbfc; }
.fact { background: #fbfcfd; }
.steps-list li::before { border-radius: 4px; }
.dash-section { margin-top: 40px; }
.notice { border-radius: 12px; }
.empty-state { border-style: dashed; border-color: var(--line-strong); }

/* v6.1 · fondo de miniaturas en gris frío (antes beige cálido) */
.mod-thumb.has-art { background: #eef1f5; }
.lesson-intro.has-art > img { background: #eef1f5; }
