/* ---------------------------------------------------------------
   CTT Redes y Software · Cursos autoasistidos
   HTML/CSS/JS sin frameworks. Preparado para /cursoscttrys/.
   --------------------------------------------------------------- */
:root {
  --navy: #101b37;
  --navy-soft: #172746;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --mint: #53dfc6;
  --ink: #17243a;
  --muted: #68768b;
  --muted-light: #91a0b5;
  --line: #e4e9f1;
  --surface: #f6f8fc;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(25, 39, 66, .06);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid #68b7fc; outline-offset: 3px; }
::selection { background: #a7f0e2; color: #102c39; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute!important; overflow: hidden; clip: rect(0,0,0,0); width: 1px; height: 1px; white-space: nowrap; }
.skip-link { position: absolute; z-index: 100; top: -70px; left: 12px; background: #fff; color: #000; padding: 12px 16px; border-radius: 7px; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); position: relative; z-index: 20; }
.header-inner { min-height: 77px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; gap: 12px; align-items: center; min-width: 0; }
.brand-symbol { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(83,223,198,.11); color: var(--mint); border: 1px solid rgba(83,223,198,.2); font-weight: 800; letter-spacing: -.09em; font-size: 17px; padding-right: 2px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; gap: 5px; white-space: nowrap; }
.brand-copy strong { color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.3px; }
.brand-copy strong span { font-weight: 500; }
.brand-copy small { color: #b0bdd2; font-size: 11px; letter-spacing: .04em; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.nav-link { color: #bbc5d6; font-size: 13px; font-weight: 650; padding: 12px 0; transition: color .18s; }
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-back { padding: 10px 14px; display: inline-flex; align-items: center; gap: 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.22); color: #f4f7ff; font-size: 13px; font-weight: 650; transition: border .18s, background .18s; }
.nav-back:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }

/* Hero */
.hero { background: radial-gradient(ellipse at 95% 10%, #273b5b 0%, transparent 43%), linear-gradient(115deg, #101b37 0%, #14233d 60%, #101b37 100%); color: #fff; padding: 78px 0 87px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 73px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #9becd8; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(83,223,198,.12); }
.hero h1 { max-width: 640px; margin: 21px 0 24px; line-height: 1.08; font-size: clamp(45px, 4.65vw, 64px); font-weight: 800; letter-spacing: -.065em; }
.hero h1 span { display: block; color: var(--mint); }
.hero-lead { max-width: 555px; font-size: 16px; line-height: 1.9; color: #c2cddd; margin: 0 0 33px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { min-height: 43px; display: inline-flex; justify-content: center; align-items: center; gap: 13px; border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; font-size: 13px; line-height: 1.35; font-weight: 750; transition: background .2s, border .2s, transform .2s; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #37d5bc; color: #0f2837; border-color: #37d5bc; }
.btn-primary:hover { background: #69ebd4; border-color: #69ebd4; }
.btn-light { background: rgba(255,255,255,.05); color: #f1f6fc; border-color: rgba(255,255,255,.2); }
.btn-light:hover { background: rgba(255,255,255,.1); }
.btn-outline { background: #fff; border-color: #d6deeb; color: #314159; }
.btn-outline:hover { background: #f2f6fb; border-color: #b8c6da; }
.btn-subtle { background: #eaf3ff; border-color: #ddeaf9; color: #23569b; }
.btn-subtle:hover { background: #e0efff; }
.hero-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 42px; color: #aebdd0; font-size: 12px; }
.hero-facts strong { color: #fff; font-size: 16px; margin-right: 5px; }
.hero-facts i { display: block; width: 4px; height: 4px; background: #8494ad; border-radius: 100%; }
.hero-visual { position: relative; border: 1px solid rgba(170,203,244,.17); border-radius: 21px; background: linear-gradient(140deg, rgba(41,60,87,.81), rgba(23,42,69,.91)); padding: 28px 28px 21px; min-width: 0; box-shadow: 0 18px 70px rgba(0,0,0,.16); overflow: hidden; }
.hero-grid-overlay { position: absolute; inset: 0; opacity: .14; background-image: linear-gradient(rgba(210,225,243,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(210,225,243,.14) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; mask-image: linear-gradient(140deg, transparent 10%, black 100%); }
.path-topline { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 0 21px; border-bottom: 1px solid rgba(255,255,255,.12); }
.path-kicker { font-size: 11px; letter-spacing: .15em; font-weight: 800; color: #cbd6e8; }
.path-spark { font-size: 26px; color: var(--mint); line-height: 1; }
.path-timeline { position: relative; z-index: 1; margin: 9px 0 10px; }
.path-item { display: flex; align-items: center; gap: 15px; min-height: 74px; position: relative; }
.path-item:not(:last-child) .path-rail::after { content: ''; position: absolute; width: 1px; height: 48px; background: rgba(135,172,196,.35); top: 47px; left: 23px; }
.path-rail { position: relative; flex-shrink: 0; width: 46px; height: 46px; }
.path-rail > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; font-size: 14px; font-weight: 800; }
.path-item.current .path-rail > span { background: #3bd8bc; color: #12363d; }
.path-item.future .path-rail > span { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); color: #9badc5; }
.path-detail { flex: 1; min-width: 0; }
.path-detail strong { display: block; font-size: 14px; color: #fff; letter-spacing: -.01em; }
.path-detail small { display: block; color: #a3b4c8; font-size: 11px; line-height: 1.5; margin-top: 3px; }
.path-state { padding: 6px 9px; border-radius: 6px; background: rgba(70,214,180,.12); color: #8befd9; font-size: 10px; font-weight: 750; white-space: nowrap; }
.path-future-dot { height: 6px; width: 6px; background: #72819a; border-radius: 50%; margin-right: 17px; }
.path-footer { position: relative; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; font-size: 12px; color: #b9c8dc; display: flex; align-items: center; gap: 9px; }
.path-footer-icon { color: var(--mint); }

/* Intro statement */
.statement-section { scroll-margin-top: 35px; display: grid; grid-template-columns: 47px 1fr; gap: 19px; align-items: start; background: #effbf8; border: 1px solid #caeae1; margin-top: 46px; margin-bottom: 86px; border-radius: 15px; padding: 27px 30px; }
.statement-icon { background: #d0f4e9; color: #11735f; border: 1px solid #a6e5d4; border-radius: 12px; width: 40px; height: 40px; display: grid; place-items: center; font-weight: 800; font-size: 19px; font-family: Georgia, serif; font-style: italic; }
.statement-section h2 { font-size: 17px; font-weight: 800; letter-spacing: -.022em; margin: 0 0 7px; color: #11483e; }
.statement-section p { font-size: 13px; line-height: 1.9; color: #315d58; margin: 0; }
.statement-section .statement-note { margin-top: 8px; font-size: 12px; color: #4e746d; }

/* Catalog */
.catalog-section { padding-bottom: 80px; }
.section-overline, .group-overline { font-size: 10px; font-weight: 850; letter-spacing: .16em; color: #238a80; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 25px; }
.section-heading h2, .how-heading h2 { font-size: clamp(29px, 3.1vw, 39px); line-height: 1.2; letter-spacing: -.045em; font-weight: 830; margin: 8px 0 7px; color: #1a2940; }
.section-heading p { color: var(--muted); margin: 0; font-size: 14px; }
.collection-count { border: 1px solid #dce4f0; color: #4f6077; background: #fbfcff; white-space: nowrap; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.catalog-controls { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px; background: #f3f6fa; border: 1px solid #edf0f7; border-radius: 13px; margin-bottom: 41px; }
.filters { display: flex; gap: 3px; flex-wrap: wrap; }
.filter-button { border: none; background: transparent; border-radius: 8px; padding: 9px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; color: #596c85; transition: background .2s, color .2s; }
.filter-button:hover { background: #e5ecf5; }
.filter-button.active { background: #fff; box-shadow: 0 2px 7px rgba(33,49,81,.08); color: #1c3856; }
.search-wrap { display: flex; align-items: center; gap: 10px; border: 1px solid #e0e6ef; border-radius: 9px; padding: 0 12px; background: #fff; color: #8492a6; min-width: 250px; width: 275px; }
.search-wrap:focus-within { outline: 2px solid #85c6ff; }
.search-wrap input { border: 0; background: transparent; height: 40px; width: 100%; min-width: 0; font-size: 12px; outline: none; color: #17243a; }
.search-wrap input::placeholder { color: #8794a6; }
.catalog-group { margin-top: 43px; }
.catalog-group-heading { display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 17px; margin-bottom: 21px; gap: 15px; }
.catalog-group-heading h3 { margin: 4px 0 2px; font-size: 24px; letter-spacing: -.035em; line-height: 1.25; }
.catalog-group-heading p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.group-count { border: 1px solid #e0e6ef; border-radius: 7px; padding: 6px 10px; font-size: 11px; font-weight: 800; color: #67788d; white-space: nowrap; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.course-card { display: flex; flex-direction: column; border: 1px solid #e4e9f0; box-shadow: 0 3px 8px rgba(24,39,63,.018); background: #fff; border-radius: 14px; min-height: 313px; padding: 21px; color: #1b2c47; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 13px 37px rgba(21,41,72,.09); border-color: #cad6e6; }
.course-card:focus-visible { outline-offset: 2px; }
.course-top { display: flex; align-items: start; justify-content: space-between; margin-bottom: 17px; }
.course-icon { width: 45px; height: 45px; border-radius: 12px; background: var(--tone-bg); color: var(--tone-color); display: grid; place-items: center; letter-spacing: -.05em; font-weight: 850; font-size: 13px; }
.course-top-tag { background: #f5f7fa; color: #748198; font-weight: 750; font-size: 10px; border-radius: 6px; padding: 5px 8px; }
.course-body { flex: 1; }
.course-semester { color: #8090a3; font-size: 10px; font-weight: 850; letter-spacing: .12em; margin-bottom: 7px; }
.course-title { font-size: 17px; line-height: 1.4; font-weight: 800; letter-spacing: -.027em; margin: 0 0 9px; }
.course-description { color: #68778b; font-size: 12px; line-height: 1.7; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e9edf4; padding-top: 14px; gap: 9px; }
.course-modules { color: #5b6c83; font-size: 11px; font-weight: 680; }
.course-arrow { display: grid; place-items: center; border-radius: 7px; width: 29px; height: 29px; background: #f1f6fc; color: #356292; font-size: 16px; transition: background .2s, transform .2s; }
.course-card:hover .course-arrow { background: var(--tone-bg); transform: translate(2px, -2px); }
.course-progress-track, .sidebar-progress-track, .overview-progress-track { height: 5px; background: #edf1f7; border-radius: 10px; overflow: hidden; }
.course-progress-track { margin-top: 15px; }
.course-progress-track > span { display: block; height: 100%; background: var(--tone-color); border-radius: 10px; transition: width .25s; }
.course-progress-foot { margin-top: 6px; display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: #8894a5; }
.course-progress-percent { color: #597086; font-weight: 800; }
.tone-blue { --tone-bg: #e5eeff; --tone-color: #356de3; }
.tone-cyan { --tone-bg: #e1f8fb; --tone-color: #1288a0; }
.tone-indigo { --tone-bg: #e9e7ff; --tone-color: #6461d9; }
.tone-violet { --tone-bg: #f1e8ff; --tone-color: #8b51c8; }
.tone-rose { --tone-bg: #fff0f2; --tone-color: #e16a80; }
.tone-amber { --tone-bg: #fff2dc; --tone-color: #bb7923; }
.tone-green { --tone-bg: #dff8ed; --tone-color: #188b68; }
.tone-slate { --tone-bg: #e9edf4; --tone-color: #53647f; }
.empty-state { padding: 70px 20px; text-align: center; background: #f8fafc; border: 1px dashed #d5deeb; border-radius: 17px; }
.empty-state[hidden] { display: none; }
.empty-symbol { font-size: 46px; color: #8aa1b5; }
.empty-state h3 { margin: 0; font-size: 20px; }
.empty-state p { color: #738196; }
.empty-state .btn { margin-top: 8px; }

/* Coming soon / How */
.coming-section { padding-bottom: 86px; }
.coming-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.coming-card { display: flex; align-items: center; gap: 18px; background: #f7f9fc; border: 1px dashed #d6e0ec; padding: 27px; border-radius: 14px; }
.coming-number { flex-shrink: 0; display: grid; place-items: center; width: 51px; height: 51px; font-weight: 850; border-radius: 13px; background: #e9eef5; color: #8091a6; }
.coming-card > div { flex: 1; }
.coming-card h3 { font-size: 15px; margin: 0; }
.coming-card p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.coming-chip { font-size: 10px; font-weight: 750; white-space: nowrap; color: #8492a2; border: 1px solid #dbe2eb; padding: 7px 9px; border-radius: 7px; }
.how-section { background: #f5f8fb; border-top: 1px solid #e9edf4; padding: 73px 0 78px; }
.how-heading { max-width: 650px; margin-bottom: 27px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.how-item { background: #fff; border: 1px solid #e5eaf1; padding: 27px; border-radius: 13px; }
.how-n { display: block; color: #2e9a8a; font-size: 23px; letter-spacing: -.06em; font-weight: 850; margin-bottom: 23px; }
.how-item h3 { font-size: 16px; margin: 0 0 7px; }
.how-item p { margin: 0; color: #6a798e; font-size: 12px; line-height: 1.8; }
.privacy-note { margin: 22px 0 0; color: #7b899a; font-size: 11px; line-height: 1.8; }
.site-footer { background: #101b37; color: #b4c0d4; padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-inner strong { display: block; color: #fff; font-size: 14px; }
.footer-inner p { margin: 3px 0 0; font-size: 12px; }
.footer-inner > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; }
.footer-inner a { color: #94e8d9; font-size: 12px; }
.footer-inner a:hover { text-decoration: underline; }

/* Reader layout */
.reader-page { background: #f5f7fb; }
.reader-header .header-inner { min-height: 69px; }
.reader-header-actions { display: flex; align-items: center; gap: 23px; }
.reader-save-label { display: flex; align-items: center; gap: 9px; color: #aab7c9; font-size: 12px; white-space: nowrap; }
.save-dot { width: 7px; height: 7px; border-radius: 50%; background: #55e1c4; }
.reader-notice { background: #e9f6f2; color: #47736a; border-bottom: 1px solid #d6eae4; padding: 9px 0; font-size: 11px; }
.reader-notice strong { color: #2b6155; }
.reader-layout { display: grid; grid-template-columns: minmax(258px, 297px) minmax(0,1fr); gap: 25px; padding-top: 25px; padding-bottom: 72px; align-items: start; }
.course-sidebar { background: #fff; border: 1px solid #e4eaf2; box-shadow: 0 6px 32px rgba(40,54,77,.045); border-radius: 15px; overflow: hidden; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar-cover { background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--tone-color), transparent 70%), transparent 66%), #152341; padding: 21px; color: #fff; }
.sidebar-breadcrumb { font-size: 11px; color: #b9cbe5; display: inline-block; margin-bottom: 25px; }
.sidebar-breadcrumb:hover { color: #fff; }
.sidebar-course-icon { display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 11px; height: 44px; width: 44px; font-size: 14px; font-weight: 850; color: #b1fbec; }
.sidebar-eyebrow { font-size: 10px; letter-spacing: .14em; font-weight: 850; color: #a6b9cf; margin: 17px 0 5px; }
.sidebar-course-title { font-size: 16px; line-height: 1.36; margin: 0; letter-spacing: -.02em; }
.sidebar-progress { margin-top: 21px; }
.sidebar-progress-summary { display: flex; align-items: center; justify-content: space-between; font-size: 10px; gap: 8px; margin-bottom: 8px; }
.sidebar-progress-summary strong { color: #daf7ed; font-size: 11px; }
.sidebar-progress-summary span { color: #a9bad0; }
.sidebar-progress-track { background: rgba(255,255,255,.13); height: 6px; }
.sidebar-progress-track span { display: block; background: #4fe0c4; border-radius: 10px; height: 100%; }
.sidebar-index { padding: 8px 0 12px; }
.sidebar-index-header { padding: 13px 20px 12px; font-size: 10px; font-weight: 850; color: #8a98aa; letter-spacing: .14em; }
.stage-group { border-top: 1px solid #edf0f5; }
.stage-summary { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 15px 19px; cursor: pointer; list-style: none; }
.stage-summary::-webkit-details-marker { display: none; }
.stage-summary-txt { display: block; flex: 1; min-width: 0; }
.stage-summary-txt small { display: block; color: #3b978d; font-size: 10px; font-weight: 850; letter-spacing: .08em; margin-bottom: 3px; }
.stage-summary-txt strong { display: block; color: #273954; font-size: 12px; line-height: 1.35; }
.stage-chevron { font-size: 20px; color: #9bacbd; transition: transform .2s; }
.stage-group[open] .stage-chevron { transform: rotate(180deg); }
.stage-module-list { padding: 0 9px 14px; }
.module-nav-item { width: 100%; display: flex; align-items: start; gap: 11px; border-radius: 8px; border: none; background: transparent; color: #4c5d74; text-align: left; padding: 10px 8px; transition: background .2s; }
.module-nav-item:hover { background: #f5f8fc; }
.module-nav-item.active { background: #e9f2ff; }
.module-num { display: grid; place-items: center; flex-shrink: 0; width: 25px; height: 25px; border: 1px solid #d9e2ef; background: #fff; border-radius: 7px; font-size: 10px; font-weight: 850; color: #8393a7; }
.module-nav-item.active .module-num { background: #3b7ef2; color: #fff; border-color: #3b7ef2; }
.module-num.completed { border-color: #b6ead8; color: #147757; background: #ddf8ed; }
.module-nav-label strong { display: block; font-size: 11px; line-height: 1.4; font-weight: 720; padding-top: 1px; }
.module-nav-label small { display: block; font-size: 10px; margin-top: 3px; color: #92a0b1; }
.module-nav-item.active .module-nav-label strong { color: #2356a1; }
.sidebar-end { padding: 14px 17px 5px; border-top: 1px solid #edf0f4; margin-top: 5px; }
.reset-progress { border: none; background: transparent; color: #8a97a8; font-size: 11px; text-align: left; padding: 5px 0; }
.reset-progress:hover { color: #c04453; }
.reader-workspace { min-width: 0; }
.mobile-lesson-bar { display: none; }
.course-overview { background: #fff; border: 1px solid #e4eaf2; border-radius: 15px; padding: 27px 30px; box-shadow: 0 5px 22px rgba(27,48,76,.035); }
.overview-badge { display: inline-block; background: var(--tone-bg); color: var(--tone-color); padding: 5px 10px; border-radius: 6px; font-size: 10px; font-weight: 850; }
.overview-title { color: #1b2b46; font-size: clamp(23px, 2.6vw, 32px); letter-spacing: -.045em; line-height: 1.26; margin: 12px 0 9px; }
.overview-desc { font-size: 12px; line-height: 1.85; color: #6b7b8e; margin: 0; }
.overview-info { display: flex; gap: 17px; color: #67788d; font-weight: 700; font-size: 11px; margin-top: 16px; flex-wrap: wrap; }
.overview-info span:not(:first-child)::before { content: '•'; color: #b4c0d1; margin-right: 17px; }
.overview-progress { border-top: 1px solid #e9edf3; margin-top: 19px; padding-top: 17px; }
.overview-progress-heading { display: flex; justify-content: space-between; font-size: 11px; color: #697b91; margin-bottom: 9px; }
.overview-progress-heading strong { color: #238c79; }
.overview-progress-track { height: 7px; }
.overview-progress-track span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #3c7df0, #36c9b2); }
.reader-stepper { margin: 16px 0 0; padding: 15px 19px 15px; border-radius: 13px 13px 0 0; background: #fefefe; border: 1px solid #e4eaf2; border-bottom: 0; }
.stepper-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 11px; font-size: 10px; color: #8a98ad; letter-spacing: .07em; font-weight: 800; }
.stepper-header strong { color: #698095; font-weight: 750; letter-spacing: 0; }
.stepper-rail { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.step-chip { border: 1px solid #dce4ee; background: #f7f9fc; color: #64768c; min-width: 36px; height: 33px; font-size: 11px; border-radius: 8px; font-weight: 850; flex-shrink: 0; }
.step-chip:hover { background: #eaf2fd; }
.step-chip.active { background: #2b68d5; border-color: #2b68d5; color: #fff; }
.step-chip.done:not(.active) { background: #dff8eb; border-color: #b6ebd6; color: #19785b; }
.lesson-article { background: #fff; border: 1px solid #e4eaf2; border-top: 1px solid #edf0f5; border-radius: 0 0 15px 15px; min-height: 430px; padding: clamp(22px, 4vw, 42px); box-shadow: 0 7px 23px rgba(27,48,76,.035); overflow: hidden; }
.lesson-path { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #7e91a5; font-size: 11px; margin-bottom: 27px; }
.path-separator { color: #bdc7d4; }
.lesson-label { color: #28937e; font-size: 10px; font-weight: 850; letter-spacing: .16em; margin-bottom: 9px; }
.lesson-title { color: #152641; font-size: clamp(27px, 3.15vw, 38px); line-height: 1.25; font-weight: 830; letter-spacing: -.045em; margin: 0 0 11px; }
.lesson-summary { color: #6e8094; font-size: 14px; margin: 0 0 28px; line-height: 1.7; }
.completed-banner { color: #237b5d; background: #e9f8f1; border: 1px solid #c9efdf; font-size: 12px; padding: 12px 14px; border-radius: 9px; margin-bottom: 24px; }
.lesson-blocks { padding-top: 13px; border-top: 1px solid #eff2f6; }
.content-heading { font-size: 21px; line-height: 1.4; letter-spacing: -.025em; margin: 34px 0 13px; font-weight: 810; color: #1b2e4a; }
.lesson-blocks > .content-heading:first-child { margin-top: 14px; }
.content-description { font-size: 14px; line-height: 1.91; color: #465772; white-space: pre-line; margin: 11px 0 20px; overflow-wrap: anywhere; }
.content-description strong, .content-list strong, .content-table strong, .callout-body strong { color: #23334f; font-weight: 770; }
.content-muted { font-size: 12px; color: #8494a7; line-height: 1.75; margin: 18px 0; }
.rich-link { color: #2565ce; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.rich-link:hover { color: #164796; }
.inline-code { border-radius: 4px; color: #a2375c; background: #f4eff5; padding: 2px 5px; font: .9em/1.4 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; }
.content-list { color: #465772; font-size: 14px; line-height: 1.85; padding-left: 25px; margin: 15px 0 23px; }
.content-list li { padding-left: 3px; margin-bottom: 9px; white-space: pre-line; overflow-wrap: anywhere; }
.content-list li::marker { color: #4b9d92; }
.content-quote { margin: 24px 0; padding: 17px 22px; border-left: 4px solid #55bca7; color: #38566b; background: #f3f8f8; font-size: 16px; font-style: italic; white-space: pre-line; }
.content-callout { display: flex; align-items: start; gap: 13px; margin: 21px 0; padding: 16px 19px; border-radius: 10px; background: #f0f6fc; border: 1px solid #dceafa; color: #3e5976; }
.callout-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; font-size: 13px; font-weight: 850; flex-shrink: 0; color: #3768b6; background: #d9eafd; }
.callout-copy { min-width: 0; flex: 1; }
.callout-title { display: block; font-size: 13px; margin-bottom: 4px; color: #2b537e; }
.callout-body { font-size: 12px; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.callout-tip { background: #effaf5; border-color: #d2ede0; color: #456c58; }
.callout-tip .callout-icon { background: #d3f2e4; color: #21906e; }
.callout-tip .callout-title { color: #237050; }
.callout-success { background: #ebf9f2; border-color: #cceedd; color: #3f6855; }
.callout-success .callout-icon { background: #cceedd; color: #188258; }
.callout-success .callout-title { color: #207a55; }
.callout-warning { background: #fff8ea; border-color: #f3e3ba; color: #7f6532; }
.callout-warning .callout-icon { background: #f9e9bb; color: #a47520; }
.callout-warning .callout-title { color: #956b22; }
.callout-danger { background: #fff0f0; border-color: #f4d3d3; color: #874b4c; }
.callout-danger .callout-icon { background: #f9d8d8; color: #ba4646; }
.callout-danger .callout-title { color: #ab363f; }
.content-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid #e0e6ee; margin: 23px 0; border-radius: 10px; scrollbar-width: thin; }
.content-table { width: 100%; min-width: 410px; border-collapse: collapse; text-align: left; font-size: 12px; line-height: 1.7; }
.content-table th, .content-table td { padding: 11px 13px; border-bottom: 1px solid #e9eef4; vertical-align: top; overflow-wrap: anywhere; }
.content-table thead th { background: #f1f5fa; font-weight: 800; color: #344660; }
.content-table tbody td { color: #56667b; }
.content-table tbody tr:nth-child(even) { background: #fbfcff; }
.content-table tbody tr:last-child td { border-bottom: 0; }
.code-block { margin: 22px 0; border-radius: 11px; overflow: hidden; background: #142038; border: 1px solid #1e2d49; }
.code-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #1c2b46; color: #abbed5; padding: 10px 14px; }
.code-label { font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.copy-code { border: 1px solid #43536c; color: #d6e4f2; background: transparent; border-radius: 6px; font-size: 10px; padding: 5px 9px; white-space: nowrap; }
.copy-code:hover { background: #30425f; }
.code-block pre { margin: 0; padding: 17px 18px 19px; overflow-x: auto; line-height: 1.75; scrollbar-width: thin; }
.code-block code { font: 12px/1.75 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; color: #daecf8; tab-size: 4; white-space: pre; }
.reader-actions { margin: 20px 0 0; }
.lesson-navigation-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lesson-navigation-row .btn { min-height: 43px; }
.button-spacer { flex: 1; }
.reader-disclaimer { margin-top: 22px; border-top: 1px solid #e2e9f1; padding: 20px 5px; font-size: 11px; line-height: 1.7; color: #8795a7; }
.reader-disclaimer strong { color: #68798e; }
.course-completed-message { padding: 23px; border: 1px solid #bde9d7; background: #effaf4; border-radius: 12px; margin-top: 22px; }
.course-completed-message strong { color: #1a775c; }
.course-completed-message p { color: #5c796c; font-size: 12px; margin: 7px 0 13px; }
.toast { position: fixed; z-index: 60; bottom: 24px; right: 24px; background: #1b304a; border-radius: 10px; color: #fff; padding: 13px 17px; max-width: min(430px,calc(100vw - 48px)); box-shadow: 0 12px 30px rgba(11,22,37,.2); font-size: 12px; opacity: 0; visibility: hidden; transform: translateY(14px); transition: .2s; }
.toast.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.loading-placeholder { font-size: 13px; color: #718198; padding: 30px; }
.skeleton-line { display: block; background: #eef2f7; height: 16px; width: 64%; margin-bottom: 15px; border-radius: 8px; }
.skeleton-line.short { width: 38%; }
.reader-error { text-align: center; padding: 80px 15px; }
.reader-error h1 { font-size: 27px; }
.reader-error p { max-width: 520px; color: #6c7d91; margin: 0 auto 23px; line-height: 1.8; }
.reader-footer { padding: 23px 0; }
.reader-footer .footer-inner p { font-size: 11px; }
.sidebar-backdrop[hidden] { display: none; }

@media (min-width: 1450px) {
  .reader-layout { width: min(1280px,calc(100% - 60px)); grid-template-columns: 307px minmax(0,1fr); gap: 29px; }
}
@media (max-width: 1060px) {
  .hero-grid { gap: 35px; }
  .hero h1 { font-size: 48px; }
  .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reader-layout { grid-template-columns: minmax(225px,270px) minmax(0,1fr); gap: 16px; }
  .lesson-navigation-row .btn { padding-inline: 11px; }
}
@media (max-width: 760px) {
  .container { width: min(100% - 30px, 660px); }
  .site-header .header-inner { min-height: 68px; }
  .brand-symbol { width: 39px; height: 39px; }
  .main-nav { gap: 10px; }
  .main-nav .nav-link { display: none; }
  .nav-back { font-size: 12px; padding: 9px 11px; }
  .hero { padding: 54px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: clamp(39px, 9.5vw, 55px); }
  .hero-lead { font-size: 14px; line-height: 1.85; }
  .hero-facts { margin-top: 30px; gap: 10px; }
  .hero-visual { padding: 22px; }
  .statement-section { margin-top: 27px; margin-bottom: 61px; grid-template-columns: 1fr; padding: 22px; gap: 12px; }
  .section-heading { flex-wrap: wrap; align-items: start; gap: 13px; }
  .catalog-controls { flex-direction: column; align-items: stretch; }
  .filters { justify-content: space-around; }
  .filter-button { flex: 1; padding-inline: 7px; }
  .search-wrap { width: 100%; }
  .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .course-card { padding: 16px; min-height: 310px; }
  .course-title { font-size: 15px; }
  .course-description { font-size: 11px; }
  .coming-grid, .how-grid { grid-template-columns: 1fr; }
  .coming-card { padding: 19px; }
  .how-section { padding: 54px 0; }
  .how-item { padding: 22px; }
  .how-n { margin-bottom: 9px; }
  .footer-inner { align-items: start; }
  /* Reader: floating drawer for module index on small screens */
  .reader-layout { display: block; padding-top: 13px; }
  .reader-save-label { display: none; }
  .reader-header-actions { gap: 8px; }
  .reader-header .nav-back { font-size: 11px; }
  .reader-notice { line-height: 1.5; }
  .mobile-lesson-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
  .mobile-lesson-bar a { font-size: 12px; color: #506585; font-weight: 700; }
  .sidebar-toggle { border: 1px solid #d4dfec; border-radius: 9px; padding: 8px 11px; font-size: 12px; color: #334b6b; background: #fff; font-weight: 750; }
  .sidebar-toggle span { margin-right: 7px; }
  .course-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: min(345px, 88vw); max-height: 100dvh; border-radius: 0 15px 15px 0; z-index: 56; transform: translateX(-105%); transition: transform .24s; box-shadow: 20px 0 55px rgba(0,0,0,.18); }
  .course-sidebar.open { transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { display: block; position: fixed; z-index: 55; inset: 0; background: rgba(12,22,39,.58); }
  body.has-open-sidebar { overflow: hidden; }
  .course-overview { padding: 23px; }
  .lesson-article { padding: 22px; }
  .lesson-navigation-row { justify-content: center; }
  .lesson-navigation-row .btn { flex: 1; min-width: 145px; }
  .button-spacer { display: none; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 28px); }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 10px; }
  .brand { gap: 8px; }
  .main-nav .nav-back { font-size: 0; width: 35px; height: 35px; justify-content: center; padding: 0; }
  .main-nav .nav-back span { font-size: 16px; }
  .hero h1 { font-size: 41px; }
  .hero-facts { font-size: 11px; }
  .hero-facts i { display: none; }
  .path-item { gap: 10px; }
  .path-state { font-size: 9px; padding: 5px; }
  .path-detail strong { font-size: 12px; }
  .path-detail small { font-size: 10px; }
  .filters { display: grid; grid-template-columns: repeat(2,1fr); }
  .section-heading h2, .how-heading h2 { font-size: 29px; }
  .catalog-group-heading h3 { font-size: 21px; }
  .catalog-group-heading p { font-size: 11px; }
  .course-grid { grid-template-columns: 1fr; }
  .course-card { min-height: 270px; padding: 19px; }
  .course-description { -webkit-line-clamp: 2; }
  .course-title { font-size: 17px; }
  .coming-card { flex-wrap: wrap; }
  .coming-chip { margin-left: 68px; }
  .footer-inner { flex-direction: column; }
  .footer-inner > div:last-child { align-items: start; }
  .reader-header .brand-copy strong { font-size: 12px; }
  .reader-header .nav-back { font-size: 11px; }
  .reader-header .brand-symbol { display: none; }
  .lesson-article { padding: 19px; }
  .course-overview { padding: 19px; }
  .lesson-title { font-size: 27px; }
  .content-heading { font-size: 19px; }
  .content-description, .content-list { font-size: 13px; }
  .content-callout { padding: 14px; }
  .content-table { font-size: 11px; }
  .lesson-navigation-row { flex-direction: column; align-items: stretch; }
  .lesson-navigation-row .btn { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; animation-duration: .01ms!important; transition-duration: .01ms!important; }
}

/* Actualización semestres 3 y 4 */
.coming-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 850px; }
.path-item.partial .path-rail > span { background: rgba(59,216,188,.15); color: #a8ffeb; border: 1px solid rgba(59,216,188,.6); }
