/* CourseHub LMS Design System — inspired by the original /curso/ experience.
   All frontend selectors scoped to .chl-wrap/.chl-template-main to avoid theme conflicts. */
.chl-wrap,.chl-template-main{--chl-primary:#345d57;--chl-primary-hover:#254b45;--chl-primary-light:#e8f0eb;--chl-ink:#263a36;--chl-muted:#64766e;--chl-paper:#fff;--chl-canvas:#f7f8f4;--chl-border:#e0e9e3;--chl-success:#20775b;--chl-warn:#93692b;--chl-radius:18px;--chl-shadow:0 10px 34px rgba(28,53,46,.055);color:var(--chl-ink);font:400 16px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;}
.chl-wrap{max-width:1200px;margin:0 auto;padding:24px 18px 60px;}
.chl-template-main{min-height:65vh;background:var(--chl-canvas);padding:18px 12px 48px;}
.chl-wrap *,.chl-template-main *{box-sizing:border-box}
.chl-wrap :is(h1,h2,h3,h4),.chl-template-main :is(h1,h2,h3,h4){color:var(--chl-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;line-height:1.18;letter-spacing:-.035em;font-weight:700;margin-top:0}
.chl-wrap h1,.chl-template-main h1{font-size:clamp(2rem,3.4vw,3rem)}
.chl-wrap h2,.chl-template-main h2{font-size:clamp(1.45rem,2.6vw,2rem)}
.chl-wrap h3,.chl-template-main h3{font-size:1.35rem}
.chl-wrap a,.chl-template-main a{color:var(--chl-primary);text-decoration:none}
.chl-wrap a:hover,.chl-template-main a:hover{text-decoration:underline}
.chl-wrap :is(a,button,input,select,textarea):focus-visible,.chl-template-main :is(a,button,input):focus-visible{outline:3px solid #95bba7;outline-offset:3px}
.chl-eyebrow{font:700 .74rem/1.5 Arial,Helvetica,sans-serif;letter-spacing:.14em;text-transform:uppercase;color:var(--chl-primary);margin:0 0 10px}
.chl-muted,.chl-description{color:var(--chl-muted)}
.chl-lead{font-size:1.05rem;line-height:1.75;max-width:75ch;color:#4e625a}
.chl-btn,.chl-wrap a.chl-btn,.chl-template-main a.chl-btn{display:inline-flex;gap:9px;align-items:center;justify-content:center;min-height:44px;border:1px solid var(--chl-primary);border-radius:10px;padding:11px 19px;background:var(--chl-primary);color:#fff!important;text-decoration:none!important;font:700 .9rem/1.35 Arial,Helvetica,sans-serif;cursor:pointer;transition:background .18s,transform .18s,border-color .18s}
.chl-btn:hover,.chl-wrap a.chl-btn:hover{background:var(--chl-primary-hover);border-color:var(--chl-primary-hover);transform:translateY(-1px)}
.chl-btn--outline,.chl-wrap a.chl-btn--outline{background:#fff;color:var(--chl-primary)!important}
.chl-btn--outline:hover,.chl-wrap a.chl-btn--outline:hover{background:var(--chl-primary-light);color:var(--chl-primary-hover)!important}
.chl-btn[disabled]{opacity:.65;cursor:wait;transform:none}
.chl-badge{display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border:1px solid #cedfd3;border-radius:50px;background:#eef6ef;color:var(--chl-primary);font:700 .74rem/1.2 Arial,Helvetica,sans-serif;white-space:nowrap}
.chl-badge--neutral{background:#f3f5f1;border-color:var(--chl-border);color:#64766e}
.chl-hero{padding:42px clamp(22px,4vw,48px);background:linear-gradient(135deg,#e9f1e9,#f9fbf6 70%);border:1px solid var(--chl-border);border-radius:24px;box-shadow:var(--chl-shadow);margin:0 0 28px}
.chl-hero h1{margin:0 0 14px}
.chl-hero p:last-child{margin-bottom:0}
.chl-hero__top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.chl-section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:30px 0 14px;flex-wrap:wrap}
.chl-section-head h2{margin:0}
.chl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));gap:18px;margin:18px 0 30px}
.chl-card,.chl-module,.chl-resources,.chl-empty{background:var(--chl-paper);border:1px solid var(--chl-border);border-radius:var(--chl-radius);box-shadow:var(--chl-shadow);padding:24px;margin-bottom:17px}
.chl-card{display:flex;flex-direction:column;min-width:0;overflow:hidden}
.chl-card h3{font-size:1.48rem;margin:13px 0 8px}
.chl-card .chl-cover{width:100%;height:185px;object-fit:cover;border-radius:12px;background:var(--chl-primary-light)}
.chl-card .chl-card__fallback{display:flex;align-items:end;background:linear-gradient(145deg,#345d57,#729b84);height:185px;border-radius:12px;padding:21px;color:#fff;font:bold 2.4rem -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.chl-card__body{flex:1}
.chl-card__foot{margin-top:18px}
.chl-card__foot .chl-btn{width:100%}
.chl-progress{height:9px;border-radius:99px;background:#e4ebe5;overflow:hidden;margin:12px 0 7px}
.chl-progress>div{height:100%;border-radius:99px;background:var(--chl-primary);transition:width .35s}
.chl-progress-text{display:flex;justify-content:space-between;gap:12px;color:var(--chl-muted);font-size:.84rem}
.chl-module h3{margin:0}
.chl-module summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;padding:3px 0}
.chl-module summary::-webkit-details-marker{display:none}
.chl-module summary::after{content:'⌄';font:700 24px Arial,sans-serif;color:var(--chl-primary);transition:transform .2s}
.chl-module[open] summary::after{transform:rotate(180deg)}
.chl-module__content{margin:18px 0 0;border-top:1px solid var(--chl-border);padding-top:10px}
.chl-lesson-list{list-style:none;padding:0;margin:0}
.chl-lesson-list li{display:flex;align-items:center;gap:12px;padding:13px 5px;border-bottom:1px solid #edf1ed}
.chl-lesson-list li:last-child{border:0}
.chl-lesson-icon{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;background:var(--chl-primary-light);color:var(--chl-primary);border-radius:9px;font-weight:bold}
.chl-lesson-list .chl-locked{color:var(--chl-muted)}
.chl-lesson-list .chl-lesson-isdone .chl-lesson-icon{background:#e6f4ec;color:var(--chl-success)}
.chl-lesson-list__title{min-width:0;flex:1}
.chl-notice,.chl-empty{background:#f0f5f0;border-color:#d9e7dd;padding:19px 21px}
.chl-shell{display:grid;grid-template-columns:260px minmax(0,1fr);gap:28px;align-items:start}
.chl-shell__side{background:var(--chl-paper);border:1px solid var(--chl-border);padding:21px;border-radius:var(--chl-radius);position:sticky;top:40px;box-shadow:var(--chl-shadow);max-height:calc(100vh - 75px);overflow:auto}
.chl-shell__side h2{font-size:1.3rem;margin:5px 0 16px}
.chl-side-link{display:block;padding:10px 12px;border-radius:9px;color:var(--chl-muted)!important;margin:2px 0;font-size:.88rem;line-height:1.35}
.chl-side-link:hover,.chl-side-link[aria-current='page']{color:var(--chl-primary)!important;background:var(--chl-primary-light);text-decoration:none!important}
.chl-side-heading{font-size:.73rem;letter-spacing:.12em;text-transform:uppercase;color:var(--chl-muted);margin:21px 0 7px;font-weight:700}
.chl-shell__main{min-width:0}
.chl-breadcrumbs{font-size:.83rem;color:var(--chl-muted);margin:0 0 13px}
.chl-breadcrumbs a{color:var(--chl-muted)}
.chl-lesson__head{margin-bottom:20px}.chl-lesson__head h1{margin:6px 0 14px}
.chl-video{aspect-ratio:16/9;width:100%;border-radius:var(--chl-radius);overflow:hidden;background:#14251f;margin:20px 0 26px}
.chl-video iframe{width:100%;height:100%;border:0}
.chl-body{line-height:1.78;overflow-wrap:anywhere}
.chl-body :is(pre,table){max-width:100%;overflow:auto}
.chl-body p{margin:0 0 1.15em}
.chl-body :is(h2,h3){margin:1.4em 0 .6em}
.chl-resources h3{margin:0 0 12px}
.chl-resources ul{list-style:none;margin:0;padding:0}
.chl-resources li{padding:9px 0;border-bottom:1px solid var(--chl-border)}
.chl-resources li:last-child{border:0}
.chl-lesson__finish{padding:24px;margin:24px 0;border:1px solid var(--chl-border);border-radius:var(--chl-radius);background:var(--chl-primary-light)}
.chl-lesson__finish h3{margin:0 0 9px}
.chl-feedback{min-height:18px;color:var(--chl-muted);font-size:.86rem;margin:12px 0 0}
.chl-nav{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:25px 0}
.chl-nav a{border:1px solid var(--chl-border);border-radius:12px;background:#fff;padding:12px 17px;font-weight:700;text-decoration:none!important}
.chl-nav a:hover{background:var(--chl-primary-light)}
.chl-mobile-menu{display:none;width:100%;justify-content:space-between;align-items:center;min-height:44px;border:1px solid var(--chl-border);border-radius:10px;padding:10px 14px;background:#fff;color:var(--chl-ink);font:700 .9rem Arial,sans-serif;cursor:pointer}
.chl-mobile-menu::after{content:'☰';font-size:1.25rem;line-height:1}
.chl-mobile-menu[aria-expanded='true']::after{content:'×';font-size:1.55rem}
.chl-admin-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:15px;margin:25px 0}
.chl-admin-card{background:#fff;border:1px solid #dbe5df;border-radius:15px;padding:23px;display:flex;flex-direction:column;gap:6px;box-shadow:0 4px 18px rgba(28,53,46,.04)}
.chl-admin-card strong{font:400 2rem -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#263a36}
.chl-admin-card span{font-size:.85rem;color:#64766e}
@media(max-width:850px){.chl-shell{grid-template-columns:1fr;gap:15px}.chl-mobile-menu{display:flex}.chl-shell__side{position:static;max-height:none;display:none}.chl-shell__side.is-open{display:block}.chl-template-main{padding:12px 0 30px}}
@media(max-width:600px){.chl-wrap{padding:17px 14px 40px}.chl-hero{padding:26px 21px;border-radius:18px}.chl-grid{grid-template-columns:1fr}.chl-card,.chl-module,.chl-resources,.chl-lesson__finish{padding:19px}.chl-section-head{align-items:start}.chl-nav a{flex:1;text-align:center}.chl-card .chl-cover,.chl-card__fallback{height:150px}}
@media(prefers-reduced-motion:reduce){.chl-wrap *, .chl-template-main *{scroll-behavior:auto!important;transition:none!important}}

/* v0.4.1 — course page template */
.chl-course-page{max-width:1180px}
.chl-course-breadcrumb{display:flex;align-items:center;gap:10px;font-size:.82rem;margin:0 0 18px;color:var(--chl-muted)}
.chl-course-breadcrumb a{color:var(--chl-muted)}
.chl-course-hero{padding:clamp(28px,5vw,58px)}
.chl-course-hero .chl-lead{max-width:66ch;margin-bottom:22px}
.chl-course-progress{margin:26px 0 15px;max-width:460px}
.chl-course-caption{font-size:.83rem;font-weight:700;margin:0;color:var(--chl-ink)}
.chl-course-start{margin-top:12px}
.chl-course-access{margin-top:23px;max-width:620px;background:#fff}
.chl-course-access p{margin:5px 0 15px}
.chl-course-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:28px;align-items:start}
.chl-course-content{min-width:0}
.chl-course-aside{position:sticky;top:28px;margin-top:28px}
.chl-course-info{background:#fff;border:1px solid var(--chl-border);border-radius:18px;padding:26px;box-shadow:var(--chl-shadow)}
.chl-course-info h2{font-size:1.45rem}
.chl-course-info>p:not(.chl-eyebrow){color:var(--chl-muted);font-size:.9rem}
.chl-course-stat{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-top:1px solid var(--chl-border);font-size:.86rem}
.chl-course-stat span{color:var(--chl-muted)}
.chl-course-stat strong{color:var(--chl-ink)}
.chl-admin-only{color:var(--chl-muted);font-size:.88rem}
@media(max-width:900px){.chl-course-layout{grid-template-columns:1fr}.chl-course-aside{position:static;margin-top:0}.chl-course-info{padding:20px}}
@media(max-width:600px){.chl-course-hero{padding:26px 21px}.chl-course-hero h1{overflow-wrap:anywhere}.chl-course-hero .chl-hero__top{align-items:flex-start}.chl-course-breadcrumb{margin:0 0 12px}.chl-course-access .chl-btn{width:100%}}

/* v0.4.4 — Independent LMS shell (no theme header/footer). */
body.chl-lms-body{margin:0!important;background:#f7f8f4!important;min-width:320px;font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;color:#263a36}
body.chl-lms-body .chl-platform,body.chl-lms-body .chl-platform *{box-sizing:border-box}
.chl-platform{--chl-primary:#345d57;--chl-primary-light:#e8f0eb;--chl-ink:#263a36;--chl-muted:#64766e;--chl-border:#e0e9e3;display:grid;grid-template-columns:282px minmax(0,1fr);min-height:100vh;background:#f7f8f4;color:#263a36;font:400 15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.chl-platform :is(a,button):focus-visible{outline:3px solid #86b29b;outline-offset:3px}
.chl-platform-side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;min-width:0;background:#eaf1ec;border-right:1px solid #d8e5dc;padding:20px 12px 14px;overflow:hidden;z-index:110}
.chl-platform-side-head{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 8px 21px}
.chl-platform-logo{display:flex;align-items:center;gap:12px;color:#263a36!important;text-decoration:none!important;line-height:1.1}
.chl-platform-mark{height:42px;width:42px;display:grid;place-items:center;background:#345d57;color:#fff;border-radius:13px;font-size:26px}
.chl-platform-logo small,.chl-platform-current small{display:block;color:#64766e;font-size:10px;letter-spacing:.14em;font-weight:bold;margin-bottom:6px}
.chl-platform-logo strong{font:700 22px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.chl-platform-close{display:none;align-items:center;justify-content:center;background:#fff;color:#263a36;border:1px solid #cfddd3;border-radius:9px;width:38px;height:38px;font-size:27px;cursor:pointer}
.chl-platform-nav{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 5px 18px 0;scrollbar-width:thin;scrollbar-color:#b2c8b9 transparent}
.chl-platform-nav-label{margin:18px 12px 10px;color:#6b8275;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.13em}
.chl-platform-navlink{display:flex;align-items:center;gap:12px;padding:12px 13px;margin:3px 0;border-radius:11px;color:#364f44!important;text-decoration:none!important;font-size:14px;font-weight:600}
.chl-platform-navlink span{font-size:19px;width:22px;text-align:center}
.chl-platform-navlink:is(:hover,.is-active){background:#fff;color:#345d57!important}
.chl-platform-module{display:block;margin:10px 0 16px;border-radius:12px;min-width:0}
.chl-platform-module-title{display:flex;gap:10px;align-items:flex-start;margin:0;padding:9px 6px;color:#263a36;font-weight:650;font-size:13px;line-height:1.45;cursor:pointer;list-style:none;border-radius:9px;min-width:0}.chl-platform-module-title::-webkit-details-marker{display:none}.chl-platform-module-title:hover{background:#dfece2}.chl-platform-module-title:focus-visible{outline:3px solid #86b29b;outline-offset:2px}.chl-platform-module-name{flex:1;min-width:0;overflow-wrap:anywhere}.chl-platform-module-name small{display:block;font-size:11px;color:#637b6e;font-weight:500;margin-top:2px}.chl-platform-module-chevron{flex:none;font-size:20px;line-height:1;transition:transform .2s}.chl-platform-module[open] .chl-platform-module-chevron{transform:rotate(180deg)}.chl-platform-module-lessons{padding:0 0 4px}
.chl-platform-module-index{flex:none;display:grid;place-items:center;border-radius:8px;background:#d7e5da;color:#345d57;height:25px;width:25px;font-size:12px}
.chl-platform-lessonlink{display:block;padding:9px 10px 9px 40px;color:#526c60!important;text-decoration:none!important;font-size:12.5px;line-height:1.45;border-radius:9px;overflow-wrap:anywhere}
.chl-platform-lessonlink:is(:hover,.is-active){background:#fff;color:#345d57!important}
.chl-platform-lessonlink.is-active{font-weight:700}
.chl-platform-lessonlink.is-locked{opacity:.8}
.chl-platform-empty-module{display:block;padding:7px 12px 7px 38px;color:#657b70;font-size:12px}
.chl-platform-side-foot{flex-shrink:0;background:#eaf1ec;border-top:1px solid #d1e0d5;padding:18px 10px 0;color:#516c60}
.chl-platform-side-foot p{font:600 14px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;margin:0 0 4px}
.chl-platform-side-foot small{font-size:12px}
.chl-platform-main{min-width:0;display:flex;flex-direction:column}
.chl-platform-topbar{height:75px;flex:none;background:#fff;border-bottom:1px solid #e0e9e3;display:flex;align-items:center;justify-content:space-between;padding:13px clamp(18px,3vw,45px);gap:18px}
.chl-platform-topbar-start{display:flex;align-items:center;min-width:0;gap:18px}
.chl-platform-current{min-width:0;line-height:1.25}
.chl-platform-current span{display:block;font-weight:700;color:#263a36;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:min(56vw,650px)}
.chl-platform-topbar-end{font-size:13px;font-weight:600;color:#345d57;white-space:nowrap}
.chl-platform-topbar-end a{color:#345d57}
.chl-platform-toggle{display:none;align-items:center;gap:8px;background:#eaf1ec;border:1px solid #cfddd3;border-radius:10px;padding:9px 12px;color:#345d57;font-weight:700;cursor:pointer}
.chl-platform-content.chl-template-main{flex:1;min-height:calc(100vh - 140px);width:100%;background:transparent;padding:24px clamp(10px,2vw,30px) 55px}
.chl-platform-content .chl-wrap{width:100%;max-width:1180px;margin-inline:auto;padding-left:clamp(12px,2vw,26px);padding-right:clamp(12px,2vw,26px)}
.chl-platform-content .chl-hero{background:linear-gradient(116deg,#eaf2eb,#fafbf6)}
.chl-platform-content .chl-course-breadcrumb a{font-size:13px}
.chl-platform-bottom{display:flex;justify-content:space-between;gap:10px;padding:18px 34px;border-top:1px solid #e0e9e3;color:#64766e;font-size:12px}
.chl-platform-bottom a{color:#345d57;text-decoration:none}
.chl-platform-overlay[hidden]{display:none!important}
/* The global shell is the only navigation: suppress old lesson-local duplicate. */
.chl-platform .chl-shell{display:block}
.chl-platform .chl-shell__side,.chl-platform .chl-mobile-menu{display:none!important}
.chl-platform .chl-shell__main{width:100%}
.chl-platform .chl-lesson{max-width:1050px}
body.admin-bar .chl-platform-side{top:32px;height:calc(100vh - 32px)}
@media(max-width:980px){
 .chl-platform{grid-template-columns:minmax(0,1fr)}
 .chl-platform-side{position:fixed;top:0!important;left:0;width:min(330px,88vw);height:100dvh!important;max-height:none;box-shadow:10px 0 35px rgba(25,51,40,.18);transform:translateX(-105%);transition:transform .22s ease;visibility:hidden}
 .chl-platform.is-menu-open .chl-platform-side{transform:translateX(0);visibility:visible}
 .chl-platform.is-menu-open .chl-platform-overlay{display:block!important;position:fixed;inset:0;background:rgba(20,42,33,.42);z-index:100}
 .chl-platform-close,.chl-platform-toggle{display:inline-flex}
 .chl-platform-topbar{height:66px;padding:11px 18px}
 .chl-platform-current span{max-width:50vw}
 .chl-platform-content.chl-template-main{padding:18px 5px 30px}
 body.admin-bar .chl-platform-side{top:0!important}
}
@media(max-width:600px){
 .chl-platform-topbar{padding:9px 12px;gap:10px}
 .chl-platform-topbar-start{gap:11px}
 .chl-platform-current span{max-width:46vw;font-size:12.5px}
 .chl-platform-username{font-size:11px;max-width:75px;overflow:hidden;text-overflow:ellipsis;display:block}
 .chl-platform-toggle{padding:8px;font-size:12px}
 .chl-platform-content .chl-wrap{padding:15px 14px 35px}
 .chl-platform-content .chl-hero{padding:25px 20px}
 .chl-platform-bottom{padding:15px 18px}
}
@media(prefers-reduced-motion:reduce){.chl-platform-side{transition:none}}

/* CourseHub prompt card: reusable, high-contrast and responsive */
.chl-prompt-card{margin:22px 0 30px;border:1px solid #cbdcd2;border-radius:16px;background:#f2f6f2;box-shadow:0 6px 18px rgba(28,61,47,.045);overflow:hidden}
.chl-prompt-card__top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #dce7dd;background:#eaf2eb}
.chl-prompt-card__label{font-size:12px;font-weight:750;letter-spacing:.035em;color:#345d57}
.chl-prompt-copy{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;padding:9px 14px;border:1px solid #345d57!important;border-radius:9px;background:#345d57!important;color:white!important;font:650 13px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;cursor:pointer;min-height:39px}
.chl-prompt-copy:hover{background:#254942!important}
.chl-prompt-copy.is-copied{background:#245d3a!important}
.chl-prompt-copy:focus-visible{outline:3px solid #98b8a2;outline-offset:3px}
.chl-prompt-copy:disabled{opacity:.7;cursor:wait}
.chl-prompt-card__text{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;margin:0!important;padding:20px 22px!important;border:none!important;background:transparent!important;color:#263a36!important;font:400 15px/1.75 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;max-height:none;overflow:visible}
.chl-prompt-card__feedback{margin:0!important;padding:0 18px!important;min-height:0;font-size:12px;color:#345d57}
.chl-prompt-card__feedback:not(:empty){padding:0 18px 14px!important}
@media(max-width:600px){.chl-prompt-card__top{padding:12px;flex-wrap:wrap}.chl-prompt-card__text{padding:15px!important;font-size:14px!important}.chl-prompt-copy{width:100%}}
