
#clLesson{
  --bg:#f3f6f8;
  --card:#fff;
  --soft:#eef3f5;
  --text:#142331;
  --muted:#617482;
  --line:#dce5e9;
  --green:#109c60;
  --tint:#e9f7ef;
  background:var(--bg);
  color:var(--text);
  font:16px/1.7 Inter,"Segoe UI",Arial,sans-serif;
  padding-bottom:30px;
}
#clLesson[data-theme="dark"]{
  --bg:#0b1017;
  --card:#14212d;
  --soft:#1d2d3c;
  --text:#edf4fa;
  --muted:#a8bdce;
  --line:#344b5d;
  --green:#a9ed69;
  --tint:#243c2c;
  color-scheme:dark;
}
#clLesson *{box-sizing:border-box}
#clLesson [hidden]{display:none!important}
#clLesson a{color:inherit;text-decoration:none!important}
#clLesson button{font:inherit;cursor:pointer;letter-spacing:normal;text-transform:none}
#clLesson h1,#clLesson h2,#clLesson h3{color:var(--text);text-transform:none}
#clLesson a:focus-visible,
#clLesson button:focus-visible,
#clLesson summary:focus-visible,
#clLesson input:focus-visible{
  outline:3px solid #329fd6;
  outline-offset:4px;
}
#clLesson .cl-wrap{width:calc(100% - 48px);max-width:1500px;margin:auto}
#clLesson .cl-heading{padding:25px 0;border-bottom:1px solid var(--line)}
#clLesson .cl-breadcrumb{display:flex;flex-wrap:wrap;gap:9px;font-size:12px;color:var(--muted);margin-bottom:14px}
#clLesson .cl-title-row{display:flex;justify-content:space-between;align-items:center;gap:28px}
#clLesson .cl-kicker{color:var(--green);font-size:10px;font-weight:900;letter-spacing:1px}
#clLesson h1{font-size:clamp(32px,3.6vw,48px);line-height:1.15;letter-spacing:-1.2px;margin:8px 0 14px;font-weight:900}
#clLesson h1 span{color:var(--green)}
#clLesson .cl-intro{max-width:740px;margin:0;color:var(--muted);font-size:15px}
#clLesson .cl-lesson-tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
#clLesson .cl-button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 15px;min-height:42px;border:1px solid var(--line);
  border-radius:10px;background:var(--card);color:var(--text);
  font-size:12px;font-weight:800;
}
#clLesson .cl-button:hover{border-color:var(--green)}
#clLesson .cl-primary{background:var(--green);border-color:var(--green);color:#fff}
#clLesson[data-theme="dark"] .cl-primary{color:#14210f}

#clLesson .cl-print-spot{flex:0 0 auto}
#clLesson .cl-print-main{
  display:flex;align-items:center;gap:13px;
  min-width:260px;min-height:78px;padding:16px 20px;
  border:2px solid var(--green);border-radius:14px;
  background:var(--card);color:var(--text);text-align:left;
}
#clLesson .cl-print-main:hover,
#clLesson .cl-print-main[aria-expanded="true"]{background:var(--tint)}
#clLesson .cl-print-symbol{
  display:grid;place-items:center;width:43px;height:43px;
  background:var(--tint);border-radius:10px;font-size:24px;
}
#clLesson .cl-print-main strong{display:block;font-size:17px;line-height:1.3}
#clLesson .cl-print-main small{display:block;color:var(--muted);font-size:11px;margin-top:5px}
#clLesson .cl-print-main>span:last-child{margin-left:auto;color:var(--green);font-size:22px}

#clLesson .cl-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:22px 0 20px}
#clLesson .cl-tab{
  display:flex;align-items:center;justify-content:center;gap:9px;
  min-height:60px;padding:16px 12px;
  background:var(--card);border:1px solid var(--line);border-radius:13px;
  color:var(--muted);font-size:14px;font-weight:800;
}
#clLesson .cl-tab:hover{background:var(--tint);border-color:var(--green)}
#clLesson .cl-tab[aria-selected="true"]{background:var(--green);color:#fff;border-color:var(--green)}
#clLesson[data-theme="dark"] .cl-tab[aria-selected="true"]{color:#14210f}
#clLesson .cl-tab.cl-is-done::after{
  content:"✓";display:grid;place-items:center;
  width:18px;height:18px;border-radius:50%;
  background:var(--green);color:var(--card);font-size:11px;
}
#clLesson .cl-tab.cl-is-done[aria-selected="true"]::after{background:var(--card);color:var(--green)}

#clLesson .cl-print-settings{
  padding:22px 25px;margin-bottom:18px;background:var(--card);
  border:1px solid var(--line);border-radius:13px;
}
#clLesson .cl-print-settings h2{font-size:19px;line-height:1.4;margin:0 0 8px}
#clLesson .cl-print-settings p{font-size:13px;color:var(--muted);margin:0;max-width:680px}
#clLesson .cl-print-settings fieldset{border:0;padding:0;margin:18px 0;display:flex;flex-wrap:wrap;gap:18px}
#clLesson .cl-print-settings legend{padding:0;font-size:12px;font-weight:800;margin-bottom:12px}
#clLesson .cl-print-settings label{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}
#clLesson .cl-print-settings input{accent-color:var(--green);width:16px;height:16px;margin:0}
#clLesson .cl-print-actions{display:flex;flex-wrap:wrap;gap:9px}

#clLesson .cl-layout{display:grid;grid-template-columns:minmax(0,1fr) 305px;gap:20px;align-items:start}
#clLesson .cl-panel{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:15px;background:var(--card)}
#clLesson .cl-panel-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:17px 30px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted);
}
#clLesson .cl-panel-head b{color:var(--text)}
#clLesson .cl-article{padding:28px 34px;font-size:17px;line-height:1.85;max-width:1050px;margin:auto}
#clLesson .cl-article>h2{
  font-size:28px;line-height:1.3;letter-spacing:-.5px;
  border-left:4px solid var(--green);padding-left:14px;
  margin:32px 0 23px;scroll-margin-top:25px;
}
#clLesson .cl-article>h2:first-child{margin-top:0}
#clLesson .cl-article p{margin:16px 0}
#clLesson .cl-article ul{padding-left:24px}
#clLesson .cl-article li{padding:3px 0}
#clLesson .chem-box{
  margin:25px 0;border:1px solid var(--line);
  border-left:4px solid #2686bd;border-radius:10px;overflow:hidden;background:var(--soft);
}
#clLesson .chem-box-rule{border-left-color:var(--green);background:var(--tint)}
#clLesson .chem-box .chem-box-title{
  margin:0;padding:12px 18px;border-bottom:1px solid var(--line);
  font-size:13px;font-weight:900;
}
#clLesson .chem-box p:not(.chem-box-title){padding:14px 18px;margin:0}
#clLesson .chem-box ul{margin:0;padding:0 20px 16px 40px}
#clLesson .chem-table{width:100%;border-collapse:collapse;margin:25px 0;font-size:15px}
#clLesson .chem-table caption{text-align:left;font-size:14px;font-weight:800;color:var(--muted);margin-bottom:10px}
#clLesson .chem-table th{background:var(--soft);text-align:left;font-size:12px}
#clLesson .chem-table th,#clLesson .chem-table td{padding:9px 20px;border-bottom:1px solid var(--line)}
#clLesson .chem-table td:nth-child(2){color:var(--green);font-size:18px;font-weight:900}
#clLesson .chem-table tbody tr:nth-child(even){background:var(--soft)}

#clLesson .cl-recap{padding:30px}
#clLesson .cl-review-heading{margin-bottom:22px}
#clLesson .cl-review-heading h2{font-size:28px;line-height:1.3;letter-spacing:-.6px;margin:10px 0 12px}
#clLesson .cl-review-heading p{font-size:14px;color:var(--muted);margin:0}
#clLesson .cl-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#clLesson .cl-recap-item{padding:19px;border:1px solid var(--line);border-radius:11px}
#clLesson .cl-recap-item>strong{display:block;font-size:33px;color:var(--green);line-height:1.2;margin-bottom:14px}
#clLesson .cl-recap-item>strong small{display:block;font-size:9px;color:var(--muted);letter-spacing:.6px;margin-top:9px;line-height:1.5}
#clLesson .cl-recap-item em{font-style:normal}
#clLesson .cl-recap-item sup{font-size:.55em}
#clLesson .cl-recap-item h3{font-size:16px;line-height:1.4;margin:0 0 9px}
#clLesson .cl-recap-item p{font-size:13px;color:var(--muted);margin:0;line-height:1.7}
#clLesson .cl-recap-label{font-size:10px;font-weight:900;letter-spacing:1px;color:var(--green);margin:28px 0 12px}
#clLesson details{border:1px solid var(--line);border-radius:11px;overflow:hidden;margin-top:12px}
#clLesson summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 18px;cursor:pointer;list-style:none;font-size:13px;font-weight:800}
#clLesson summary::-webkit-details-marker{display:none}
#clLesson summary::after{content:"+";color:var(--green);font-size:21px}
#clLesson details[open] summary{background:var(--tint);border-bottom:1px solid var(--line)}
#clLesson details[open] summary::after{content:"−"}
#clLesson details p{padding:16px 18px;margin:0;color:var(--muted);font-size:14px}

#clLesson .cl-audio,#clLesson .cl-test-view{text-align:center;padding:45px 30px;min-height:380px}
#clLesson .cl-audio-icon,#clLesson .cl-test-symbol{
  display:grid;place-items:center;width:64px;height:64px;
  margin:0 auto 18px;background:var(--tint);color:var(--green);
  border-radius:16px;font-size:30px;
}
#clLesson .cl-audio h2,#clLesson .cl-test-view h2{font-size:29px;margin:10px 0 16px;line-height:1.3}
#clLesson .cl-audio p,#clLesson .cl-test-view p{max-width:540px;margin:0 auto 22px;font-size:15px;color:var(--muted)}
#clLesson audio{display:block;width:100%;max-width:650px;margin:20px auto}
#clLesson .cl-status{font-size:12px;padding:6px 12px;background:var(--soft);border-radius:20px;color:var(--muted)}
#clLesson .cl-test-view .cl-primary{padding:13px 26px;font-size:14px}
#clLesson .cl-test-view .cl-test-hint{font-size:12px;margin:15px auto 20px}

#clLesson .cl-completion{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 28px;border-top:1px solid var(--line)}
#clLesson .cl-completion-copy{display:flex;flex-direction:column;gap:5px;flex:1;min-width:190px}
#clLesson .cl-completion-copy strong{font-size:14px}
#clLesson .cl-completion-copy>span{font-size:11px;color:var(--muted);max-width:420px}
#clLesson .cl-complete-button{
  display:flex;align-items:center;justify-content:center;gap:9px;
  min-height:44px;padding:11px 16px;border:1px solid var(--green);
  border-radius:10px;background:var(--card);color:var(--green);font-size:12px;font-weight:800;
}
#clLesson .cl-complete-button:not(.cl-done-button):not(:disabled)::before{
  content:"";width:15px;height:15px;border:1.5px solid currentColor;border-radius:4px;flex-shrink:0;
}
#clLesson .cl-complete-button:hover,
#clLesson .cl-complete-button.cl-done-button{background:var(--tint)}
#clLesson .cl-complete-button:disabled{cursor:default;background:var(--soft);border-color:var(--line);color:var(--muted)}
#clLesson .cl-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:19px 28px;background:var(--soft);border-top:1px solid var(--line)}
#clLesson .cl-bottom b{font-size:16px}
#clLesson .cl-bottom p{margin:4px 0 0;color:var(--muted);font-size:12px}

#clLesson .cl-sidebar{position:sticky;top:18px;border:1px solid var(--line);border-radius:15px;background:var(--card)}
#clLesson .cl-side-head{padding:21px 20px 16px;border-bottom:1px solid var(--line)}
#clLesson .cl-side-head h2{font-size:19px;line-height:1.3;margin:7px 0 8px}
#clLesson .cl-side-head p{font-size:12px;color:var(--muted);margin:0}
#clLesson .cl-completion-count{font-size:11px;color:var(--muted);margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
#clLesson .cl-progress-track{height:5px;background:var(--soft);border-radius:5px;margin-top:9px;overflow:hidden}
#clLesson .cl-progress-track>span{display:block;height:100%;width:0;background:var(--green);border-radius:5px;transition:width .2s}
#clLesson .cl-course-list{padding:0 12px 12px}
#clLesson .cl-course-active{margin:11px 0 14px;border:1px solid var(--line);border-radius:10px;overflow:hidden}
#clLesson .cl-course-link{display:flex;align-items:center;gap:10px;padding:10px 5px;font-size:12px;font-weight:800;line-height:1.4}
#clLesson .cl-course-link>span{flex:1}
#clLesson .cl-course-link>b{color:var(--green);font-size:19px}
#clLesson .cl-course-link i{display:grid;place-items:center;width:27px;height:27px;flex:0 0 27px;font-style:normal;font-size:10px;border:1px solid var(--line);border-radius:50%}
#clLesson .cl-course-link small{display:block;color:var(--green);font-size:9px;margin-top:4px;letter-spacing:.5px}
#clLesson .cl-course-active>.cl-course-link{padding:13px 12px;background:var(--soft);color:var(--green)}
#clLesson .cl-course-active .cl-course-link i{background:var(--green);border-color:var(--green);color:var(--card)}
#clLesson .cl-course-link.cl-is-done small::after{content:" · ЗАВЪРШЕНО ✓"}
#clLesson .cl-course-parts{display:grid;gap:3px;padding:7px}
#clLesson .cl-part{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px 10px;border-left:3px solid transparent;border-radius:7px;font-size:12px;color:var(--muted)}
#clLesson .cl-part:hover{background:var(--soft)}
#clLesson .cl-part.cl-current{background:var(--tint);color:var(--green);border-left-color:var(--green);font-weight:800}
#clLesson .cl-part small{font-size:9px;border:1px solid var(--line);padding:0 5px;border-radius:4px}
#clLesson .cl-part.cl-is-done::after{content:"✓";color:var(--green);font-weight:900;margin-left:auto}
#clLesson .cl-upcoming-label{font-size:9px;letter-spacing:1px;color:var(--muted);font-weight:900;padding:2px 6px 8px}
#clLesson .cl-side-section{padding:6px 20px 16px;font-size:12px}
#clLesson .cl-next-preview{margin:0 12px 12px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}
#clLesson .cl-next-preview h3{font-size:9px;color:var(--muted);letter-spacing:.7px;margin:0 0 12px}
#clLesson .cl-next-preview p{font-size:11px;color:var(--muted);margin:8px 0 0}
#clLesson .cl-prev-next{display:flex;justify-content:space-between;gap:16px;margin-top:20px;font-size:12px;color:var(--muted)}

@media(max-width:1100px){
  #clLesson .cl-layout{grid-template-columns:minmax(0,1fr) 270px;gap:16px}
}
@media(max-width:780px){
  #clLesson .cl-wrap{width:calc(100% - 24px)}
  #clLesson .cl-title-row{display:block}
  #clLesson .cl-print-spot{margin-top:19px}
  #clLesson .cl-print-main{width:100%;min-height:71px;padding:13px 17px}
  #clLesson .cl-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:18px 0}
  #clLesson .cl-tab{min-height:53px;font-size:13px;padding:13px 10px}
  #clLesson .cl-layout{grid-template-columns:1fr}
  #clLesson .cl-sidebar{position:static}
  #clLesson .cl-article,#clLesson .cl-recap{padding:23px 18px}
  #clLesson .cl-article{font-size:16px}
  #clLesson .cl-article>h2{font-size:24px}
  #clLesson .cl-panel-head{padding:14px 18px;flex-wrap:wrap;gap:4px}
  #clLesson .cl-review-heading h2{font-size:25px}
  #clLesson .cl-completion{padding:18px;flex-direction:column;align-items:stretch}
  #clLesson .cl-complete-button{width:100%}
  #clLesson .cl-bottom{padding:18px;flex-wrap:wrap}
  #clLesson .cl-bottom .cl-button{width:100%}
  #clLesson .cl-print-settings{padding:18px}
}
@media(max-width:460px){
  #clLesson .cl-review-grid{grid-template-columns:1fr}
  #clLesson .cl-recap-item{display:grid;grid-template-columns:85px minmax(0,1fr);gap:14px;align-items:center;padding:16px}
  #clLesson .cl-recap-item>strong{font-size:28px;margin:0}
  #clLesson .cl-recap-item>strong small{font-size:8px;letter-spacing:0}
}
@media(prefers-reduced-motion:reduce){
  #clLesson .cl-progress-track>span{transition:none}
}
@media print{
  @page{size:A4;margin:12mm}
  #clLesson{
    --bg:white;--card:white;--soft:#f4f4f4;--text:black;
    --muted:#444;--line:#ccc;--green:#176b42;--tint:#f1f5f1;
    background:white!important;color:black!important;
  }
  #clLesson .cl-tabs,
  #clLesson .cl-sidebar,
  #clLesson .cl-lesson-tools,
  #clLesson .cl-print-spot,
  #clLesson .cl-print-settings,
  #clLesson .cl-completion,
  #clLesson .cl-bottom,
  #clLesson .cl-prev-next,
  #clLesson .cl-breadcrumb,
  #clLesson .cl-intro,
  #clLesson .cl-panel-head{display:none!important}
  #clLesson .cl-wrap{width:100%;max-width:none}
  #clLesson .cl-layout{display:block}
  #clLesson .cl-panel{border:0;background:white!important}
  #clLesson .cl-heading{padding:0 0 12px}
  #clLesson h1,#clLesson h2,#clLesson h3{color:black!important}
  #clLesson .cl-article,#clLesson .cl-recap{padding:0}
  #clLesson .cl-article>h2{break-after:avoid}
  #clLesson .chem-box,#clLesson tr,#clLesson .cl-recap-item{break-inside:avoid}
  #clLesson .cl-review-grid{display:block}
  #clLesson .cl-recap-item{margin-bottom:12px}
  #clLesson .cl-recap details{border:0}
  #clLesson .cl-recap details p{display:block!important;padding:5px 0}
  #clLesson .cl-recap summary{padding:0}
  #clLesson .cl-recap summary::after{display:none}
}

/* Изолиране на панелите от размери и отстояния на WordPress темата. */
#clLesson .cl-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,305px);
  gap:24px!important;
  align-items:start;
  isolation:isolate;
}
#clLesson .cl-layout > .cl-panel,
#clLesson .cl-layout > .cl-sidebar{
  float:none!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  clear:none!important;
  transform:none;
}
#clLesson .cl-sidebar{overflow:hidden;right:auto;left:auto}
#clLesson .cl-course-link > span{min-width:0;overflow-wrap:anywhere}
#clLesson .cl-course-parts .cl-part{min-width:0;flex-wrap:wrap}
#clLesson .cl-part small{flex-shrink:0}
#clLesson .cl-prev-next{justify-content:flex-end}
@media(max-width:1100px){
  #clLesson .cl-layout{grid-template-columns:minmax(0,1fr) minmax(0,270px);gap:20px!important}
}
@media(max-width:900px){
  #clLesson .cl-layout{grid-template-columns:minmax(0,1fr)}
  #clLesson .cl-layout > .cl-sidebar{position:static}
}
@media print{
  #clLesson .cl-layout{display:block!important}
}


#clLesson .cl-coming{font-size:10px;padding:3px 7px;border:1px solid currentColor;border-radius:6px;margin-left:5px;line-height:1.3}
#clLesson #clPrint:disabled{cursor:default;opacity:.7}
#clLesson #clCompleted:disabled{cursor:default;opacity:1}


#clLesson .cl-quiz-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:24px auto 14px;max-width:600px;text-align:left}
#clLesson .cl-quiz-facts>div{padding:14px 16px;border:1px solid var(--line);border-radius:11px;background:var(--soft);min-width:0}
#clLesson .cl-quiz-facts strong{display:block;color:var(--text);font-size:20px;line-height:1.4;overflow-wrap:anywhere}#clLesson .cl-quiz-facts span{display:block;color:var(--muted);font-size:11px;margin-top:5px}
#clLesson .cl-quiz-earned{display:flex;justify-content:space-between;gap:12px;align-items:center;max-width:600px;margin:0 auto 14px;padding:15px 18px;border:1px solid var(--line);background:var(--tint);border-radius:12px;color:var(--text)}
#clLesson .cl-quiz-earned span{font-size:12px}#clLesson .cl-quiz-earned strong{font-size:17px}#clLesson #clTestMetaStatus,#clLesson .cl-quiz-rule{font-size:12px;line-height:1.7}
@media(max-width:480px){#clLesson .cl-quiz-facts strong{font-size:17px}#clLesson .cl-quiz-earned{align-items:flex-start;flex-direction:column}}

/* A completion check does not select a tab. Override legacy inline styles. */
html body #clLesson #clTheme{display:none!important}
html body #clLesson .cl-tabs .cl-tab[role="tab"][aria-selected="false"]{
  background:var(--card)!important;color:var(--text)!important;border-color:var(--line)!important
}
html body #clLesson .cl-tabs .cl-tab[role="tab"][aria-selected="true"]{
  background:var(--green)!important;color:#fff!important;border-color:var(--green)!important
}
html body #clLesson .cl-tabs .cl-tab[aria-selected="false"].cl-is-done::after{
  background:var(--green);color:#fff
}

#clLesson .cl-tabs{scroll-margin-top:110px}
