.kl-body{min-height:100vh;background:#f6f7fb}
.kl-app{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:100vh;transition:grid-template-columns .25s ease}
.kl-app.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
.kl-app.sidebar-collapsed .kl-sidebar{transform:translateX(-100%);opacity:0;pointer-events:none}

/* Sidebar */
.kl-sidebar{position:relative;display:flex;flex-direction:column;height:100vh;overflow:hidden;background:#fff;border-right:1px solid var(--line);transition:transform .25s ease,opacity .25s ease}
.kl-sidebar-head{flex:none;padding:20px 20px 16px;border-bottom:1px solid #eef1f7}
.kl-back{display:inline-flex;align-items:center;gap:5px;margin-bottom:16px;color:#6b7490;font-size:13px;font-weight:800;text-decoration:none}
.kl-back svg{width:17px;height:17px}
.kl-back:hover{color:var(--brand)}
.kl-sidebar-title .kl-level{display:block;margin-bottom:6px;color:var(--brand);font:800 10px var(--mono);letter-spacing:.1em;text-transform:uppercase}
.kl-sidebar-title h1{margin:0;color:var(--ink);font:800 22px/1.2 var(--serif);letter-spacing:-.02em}
.kl-progress{margin-top:16px}
.kl-progress-bar{height:7px;border-radius:999px;background:#e9edf6;overflow:hidden}
.kl-progress-bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--brand),var(--violet));transition:width .35s ease}
.kl-progress b{display:block;margin-top:7px;color:#69728c;font-size:11px;font-weight:800}
.kl-search{display:flex;align-items:center;gap:9px;margin-top:15px;height:44px;border:1px solid #e2e7f2;border-radius:12px;background:#f8f9fd;padding:0 13px;color:#8a91aa}
.kl-search svg{width:17px;height:17px;flex:none}
.kl-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--ink);font-size:13px;outline:0}
.kl-search:focus-within{border-color:#b5b0ff;box-shadow:0 0 0 4px rgba(79,70,229,.08)}

.kl-module-list{flex:1;overflow-y:auto;padding:10px 10px 20px}
.kl-module{margin-bottom:4px;border-radius:14px}
.kl-module-head{display:flex;align-items:center;gap:10px;width:100%;padding:12px 12px;border:0;background:transparent;color:var(--ink);font-size:13px;font-weight:800;text-align:left;cursor:pointer;border-radius:12px;transition:background .15s}
.kl-module-head:hover{background:#f3f5fb}
.kl-module-chevron{display:grid;place-items:center;width:20px;height:20px;color:#7b849e;transition:transform .2s}
.kl-module-chevron svg{width:16px;height:16px}
.kl-module.is-open .kl-module-chevron{transform:rotate(90deg)}
.kl-module-title{flex:1;min-width:0}
.kl-module-count{flex:none;border-radius:999px;background:#eef0f7;padding:3px 8px;color:#7b849e;font:800 9.5px var(--mono)}
.kl-module.is-current .kl-module-count{background:#eef0ff;color:var(--brand)}
.kl-module-check{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#dcfce7;color:#059669;font-size:12px;font-weight:900}
.kl-module-body{display:none;padding:2px 6px 8px}
.kl-module.is-open .kl-module-body{display:block}
.kl-module.is-current .kl-module-head{background:#f5f4ff}
.kl-module.is-current .kl-module-title{color:var(--brand)}
.kl-lesson{display:flex;align-items:flex-start;gap:10px;width:100%;padding:9px 10px;border:0;background:transparent;border-radius:11px;text-align:left;cursor:pointer;transition:background .15s}
.kl-lesson:hover{background:#f3f5fb}
.kl-lesson.is-active{background:#eef0ff}
.kl-lesson.is-locked{opacity:.55;cursor:not-allowed}
.kl-lesson-status{flex:none;display:grid;place-items:center;width:20px;height:20px;margin-top:1px}
.kl-lesson-status svg{width:18px;height:18px}
.kl-lesson-copy{flex:1;min-width:0}
.kl-lesson-copy b{display:block;color:var(--ink);font-size:12.5px;font-weight:700;line-height:1.35}
.kl-lesson.is-active .kl-lesson-copy b{color:var(--brand)}
.kl-lesson-copy small{display:block;margin-top:2px;color:#8a92aa;font-size:10.5px}

/* Content */
.kl-content{display:flex;flex-direction:column;min-width:0;height:100vh}
.kl-topbar{flex:none;display:flex;align-items:center;gap:14px;height:64px;padding:0 28px;border-bottom:1px solid #eef1f7;background:rgba(255,255,255,.9);backdrop-filter:blur(12px)}
.kl-toggle{display:none;place-items:center;width:38px;height:38px;border:1px solid #e2e7f2;border-radius:10px;background:#fff;color:var(--ink);cursor:pointer}
.kl-toggle svg{width:19px;height:19px}
.kl-topbar-context{flex:1;min-width:0}
.kl-topbar-context small{display:block;color:#8a92aa;font-size:10.5px;font-weight:700}
.kl-topbar-context b{display:block;color:var(--ink);font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kl-topbar-meta{flex:none;display:flex;align-items:center;gap:8px;color:#6b7490;font-size:12px;font-weight:700}
.kl-topbar-meta b{color:var(--brand)}

.kl-content-scroll{flex:1;overflow-y:auto}
.kl-lesson-wrap{max-width:760px;margin:0 auto;padding:40px 28px 120px}
.kl-lesson-head{margin-bottom:26px}
.kl-breadcrumb{display:block;margin-bottom:10px;color:var(--brand);font:800 10px var(--mono);letter-spacing:.08em;text-transform:uppercase}
.kl-lesson-head h2{margin:0;color:var(--ink);font:800 clamp(26px,3.4vw,38px)/1.15 var(--serif);letter-spacing:-.02em}

.kl-prose{color:var(--text)}
.kl-prose .lead{margin-bottom:22px;color:var(--ink);font:600 20px/1.6 var(--serif)}
.kl-prose p{margin:0 0 16px;font-size:15.5px;line-height:1.8}
.kl-prose h2{margin:28px 0 12px;color:var(--ink);font:700 22px/1.25 var(--serif)}
.kl-prose ul,.kl-prose ol{margin:0 0 18px;padding-left:22px;color:var(--text);font-size:15px;line-height:1.75}
.kl-prose li{margin-bottom:7px}
.kl-prose b{color:var(--ink)}
.kl-prose a{color:var(--brand);font-weight:700;text-decoration:none}
.kl-prose a:hover{text-decoration:underline}
.kl-prose code{display:inline-block;margin:0 2px;border-radius:6px;background:#eef0ff;padding:1px 6px;color:var(--brand);font:700 .9em var(--mono)}
.kl-prose pre{margin:18px 0 22px;overflow:auto;border-radius:14px;background:#101827;padding:18px;color:#e5e7eb;font:500 13px/1.6 var(--mono)}
.kl-prose pre code{display:block;margin:0;border-radius:0;background:transparent;padding:0;color:inherit}
.kl-note{display:grid;grid-template-columns:auto minmax(0,1fr);gap:11px;margin:22px 0;border-left:4px solid var(--brand);border-radius:0 13px 13px 0;background:#f3f5ff;padding:14px 16px}
.kl-note.green{border-left-color:var(--green);background:#ecfdf5}
.kl-note.orange{border-left-color:var(--orange);background:#fffbeb}
.kl-note b{display:block;color:var(--ink);font-size:13px}
.kl-note span{color:var(--text);font-size:13px;line-height:1.6}

/* Quiz */
.kl-quiz{display:grid;gap:18px}
.kl-quiz-item{border:1px solid var(--line);border-radius:16px;background:#fff;padding:20px}
.kl-quiz-item>p{display:flex;gap:8px;margin:0 0 14px;color:var(--ink);font-size:15px;font-weight:700}
.kl-quiz-item>p b{color:var(--brand)}
.kl-quiz-options{display:grid;gap:9px}
.kl-quiz-options button{width:100%;padding:12px 14px;border:1px solid #e2e7f2;border-radius:11px;background:#fbfcff;color:var(--text);font-size:13.5px;font-weight:600;text-align:left;cursor:pointer;transition:.15s}
.kl-quiz-options button:hover:not(:disabled){border-color:#b5b0ff;background:#f3f2ff}
.kl-quiz-options button.is-correct{border-color:transparent;background:#dcfce7;color:#047857}
.kl-quiz-options button.is-wrong{border-color:transparent;background:#fee2e2;color:#b91c1c}
.kl-quiz-feedback{margin-top:12px;border-radius:10px;padding:10px 13px;font-size:12.5px;line-height:1.55}
.kl-quiz-feedback.is-correct{background:#ecfdf5;color:#047857}
.kl-quiz-feedback.is-wrong{background:#fef2f2;color:#b91c1c}
.kl-quiz-summary{margin-top:4px;border-radius:13px;padding:14px 16px;font-size:13.5px;font-weight:800}
.kl-quiz-summary.is-pass{background:#dcfce7;color:#047857}
.kl-quiz-summary.is-fail{background:#fef3c7;color:#92400e}

/* Bottom nav */
.kl-bottom-nav{flex:none;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:86px;border-top:1px solid #e4e8f0;background:#fff;padding:16px clamp(24px,4vw,64px)}
.kl-nav-left,.kl-nav-right{display:flex;min-width:0}
.kl-nav-right{justify-content:flex-end}
.kl-nav-btn{display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;border:1px solid #dce2ec;border-radius:9px;background:#fff;padding:0 17px;color:#344054;font-size:13.5px;font-weight:800;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}
.kl-nav-btn:hover{border-color:#aeb8c8;background:#f8fafc;transform:translateY(-1px)}
.kl-nav-btn svg{flex:none;width:17px;height:17px}
.kl-nav-btn.is-next{border-color:#26374a;background:#26374a;color:#fff}
.kl-nav-btn.is-next:hover{border-color:#172536;background:#172536}
.kl-nav-btn.is-next.is-done{border-color:#d7e7de;background:#edf7f1;color:#16724a;cursor:default;transform:none}
.kl-nav-spacer{display:block}

.kl-overlay{display:none}
.kl-toast{position:fixed;z-index:50;left:50%;bottom:30px;transform:translate(-50%,16px);border-radius:999px;background:#11142f;padding:11px 20px;color:#fff;font-size:13px;font-weight:700;opacity:0;pointer-events:none;transition:.25s;box-shadow:0 14px 40px rgba(17,20,47,.28)}
.kl-toast.is-show{opacity:1;transform:translate(-50%,0)}

@media(max-width:1023px){
  .kl-app{grid-template-columns:1fr}
  .kl-sidebar{position:fixed;z-index:40;left:0;top:0;bottom:0;width:min(360px,88vw);transform:translateX(-102%);transition:transform .25s ease;box-shadow:0 20px 60px rgba(17,20,47,.24)}
  .kl-app.sidebar-open .kl-sidebar{transform:translateX(0)}
  .kl-toggle{display:grid}
  .kl-overlay{display:block;position:fixed;z-index:39;inset:0;background:rgba(17,20,47,.4);opacity:0;pointer-events:none;transition:opacity .25s}
  .kl-app.sidebar-open .kl-overlay{opacity:1;pointer-events:auto}
}

@media(max-width:640px){
  .kl-topbar{padding:0 16px}
  .kl-topbar-meta{display:none}
  .kl-lesson-wrap{padding:28px 18px 120px}
  .kl-prose p{font-size:15px}
  .kl-bottom-nav{min-height:74px;padding:12px 16px}
  .kl-nav-btn{min-height:42px;padding:0 13px;font-size:12.5px}
}

[data-theme=dark].kl-body,
[data-theme=dark] .kl-body{background:#0d1524}
[data-theme=dark] .kl-sidebar{background:#101827;border-color:#26334d}
[data-theme=dark] .kl-sidebar-head{border-color:#1c2942}
[data-theme=dark] .kl-back,[data-theme=dark] .kl-progress b,[data-theme=dark] .kl-topbar-context small,[data-theme=dark] .kl-lesson-copy small{color:#8b98b5}
[data-theme=dark] .kl-sidebar-title h1,[data-theme=dark] .kl-topbar-context b,[data-theme=dark] .kl-lesson-head h2,[data-theme=dark] .kl-prose h2,[data-theme=dark] .kl-lesson-copy b,[data-theme=dark] .kl-module-head,[data-theme=dark] .kl-quiz-item>p,[data-theme=dark] .kl-prose b,[data-theme=dark] .kl-note b{color:#f4f7ff}
[data-theme=dark] .kl-progress-bar,[data-theme=dark] .kl-search,[data-theme=dark] .kl-lesson:hover,[data-theme=dark] .kl-module-head:hover{background:#1a2740}
[data-theme=dark] .kl-search{border-color:#26334d;background:#101827}
[data-theme=dark] .kl-search input{color:#f4f7ff}
[data-theme=dark] .kl-lesson.is-active{background:#1d2450}
[data-theme=dark] .kl-lesson.is-active .kl-lesson-copy b{color:#a5b4ff}
[data-theme=dark] .kl-topbar,[data-theme=dark] .kl-bottom-nav{background:#101827;border-color:#1c2942}
[data-theme=dark] .kl-toggle{border-color:#26334d;background:#151f32;color:#f4f7ff}
[data-theme=dark] .kl-collapse-toggle{border-color:#26334d;background:#151f32;color:#8b98b5}
[data-theme=dark] .kl-collapse-toggle:hover{border-color:#4c4f87;color:#a5b4ff;background:#1a2740}
[data-theme=dark] .kl-module-count{background:#1a2740;color:#9aa7c4}
[data-theme=dark] .kl-module.is-current .kl-module-head{background:#1d2450}
[data-theme=dark] .kl-prose{color:#c8d1e5}
[data-theme=dark] .kl-prose .lead{color:#e6ecff}
[data-theme=dark] .kl-prose pre{background:#080d18}
[data-theme=dark] .kl-prose code{background:#1d2450;color:#a5b4ff}
[data-theme=dark] .kl-note{background:#18223a}
[data-theme=dark] .kl-note.green{background:#0e2a22}
[data-theme=dark] .kl-note.orange{background:#2a2212}
[data-theme=dark] .kl-note span{color:#c8d1e5}
[data-theme=dark] .kl-quiz-item,[data-theme=dark] .kl-nav-btn{background:#151f32;border-color:#26334d}
[data-theme=dark] .kl-nav-btn.is-next{border-color:#dbe5f2;background:#dbe5f2;color:#101827}
[data-theme=dark] .kl-nav-btn.is-next:hover{border-color:#fff;background:#fff}
[data-theme=dark] .kl-nav-btn.is-next.is-done{border-color:#25473b;background:#17372e;color:#6ee7b7}
[data-theme=dark] .kl-quiz-options button{border-color:#26334d;background:#101827;color:#c8d1e5}
[data-theme=dark] .kl-quiz-options button:hover:not(:disabled){border-color:#4c4f87;background:#1a2740}
[data-theme=dark] .kl-quiz-options button.is-correct{background:#0e2a22;color:#4ade80}
[data-theme=dark] .kl-quiz-options button.is-wrong{background:#3a1622;color:#f87171}
[data-theme=dark] .kl-nav-btn:hover{background:#1a2740;border-color:#4c4f87}
[data-theme=dark] .kl-toast{background:#f4f7ff;color:#11142f}

/* Lesson meta, resources, notebook/portfolio, certificate */
.kl-lesson-copy small svg{display:inline-block;width:11px;height:11px;vertical-align:-2px;margin-left:6px}
.kl-lesson-score{flex:none;margin-left:auto;border-radius:999px;background:#eef0ff;padding:3px 8px;color:var(--brand);font:800 10px var(--mono)}
.kl-lesson.is-done .kl-lesson-score{background:#dcfce7;color:#047857}
.kl-cert-btn{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;margin-top:15px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--brand),var(--violet));padding:12px;color:#fff;font-size:13px;font-weight:800;cursor:pointer;box-shadow:0 10px 24px rgba(79,70,229,.22);transition:.15s}
.kl-cert-btn:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(79,70,229,.3)}
.kl-cert-btn svg{width:18px;height:18px}

.kl-resources{margin-top:34px;border:1px solid var(--line);border-radius:16px;background:#fff;padding:20px 22px}
.kl-resources h3{margin:0 0 14px;color:var(--ink);font:700 17px/1.3 var(--serif)}
.kl-resource-list{display:grid;gap:10px}
.kl-resource{display:flex;align-items:center;gap:13px;border:1px solid #e7ebf5;border-radius:13px;background:#fbfcff;padding:13px 15px;text-decoration:none;transition:.15s}
.kl-resource:hover{border-color:#b5b0ff;background:#f6f5ff;transform:translateY(-1px)}
.kl-resource-icon{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#eef0ff;color:var(--brand)}
.kl-resource-icon svg{width:19px;height:19px}
.kl-resource-copy{flex:1;min-width:0}
.kl-resource-copy b{display:block;color:var(--ink);font-size:13.5px;font-weight:800}
.kl-resource-copy small{display:block;margin-top:3px;color:#7b849e;font-size:11.5px;line-height:1.4}
.kl-resource-tag{flex:none;border-radius:999px;background:#f1f0ff;padding:5px 10px;color:var(--brand);font:800 9px var(--mono);letter-spacing:.06em;text-transform:uppercase}

.kl-notebook-hero,.kl-portfolio-hero{margin:0 0 26px;border:1px solid #dcd6ff;border-radius:20px;background:radial-gradient(circle at 92% 6%,rgba(124,58,237,.16),transparent 32%),linear-gradient(135deg,#fff,#f7f5ff);padding:26px 28px}
.kl-notebook-icon,.kl-portfolio-icon{display:grid;place-items:center;width:54px;height:54px;margin-bottom:16px;border-radius:16px;background:linear-gradient(135deg,var(--brand),var(--violet));color:#fff;box-shadow:0 12px 26px rgba(79,70,229,.24)}
.kl-notebook-icon svg,.kl-portfolio-icon svg{width:26px;height:26px}
.kl-notebook-hero .lead,.kl-portfolio-hero .lead{margin-bottom:16px;color:var(--ink);font:600 19px/1.6 var(--serif)}
.kl-notebook-download,.kl-portfolio-btn{display:inline-flex;align-items:center;gap:9px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--brand),var(--violet));padding:12px 18px;color:#fff;font-size:13.5px;font-weight:800;text-decoration:none;cursor:pointer;box-shadow:0 10px 22px rgba(79,70,229,.2)}
.kl-notebook-download svg,.kl-portfolio-btn svg{width:18px;height:18px}
.kl-portfolio-actions{display:flex;flex-wrap:wrap;gap:11px}
.kl-portfolio-btn.is-ghost{border:1px solid #d8d3ff;background:#fff;color:var(--brand);box-shadow:none}
.kl-quiz-live-summary{margin-top:6px}

.kl-modal-overlay{position:fixed;z-index:60;inset:0;display:grid;place-items:center;background:rgba(17,20,47,.5);padding:20px;backdrop-filter:blur(4px)}
.kl-modal{position:relative;width:min(560px,100%);max-height:90vh;overflow:auto;border:1px solid #dfe3f3;border-radius:24px;background:#fff;padding:32px 34px;box-shadow:0 30px 90px rgba(17,20,47,.3)}
.kl-modal-close{position:absolute;right:18px;top:18px;display:grid;place-items:center;width:34px;height:34px;border:1px solid #e2e7f2;border-radius:10px;background:#fff;color:var(--ink);cursor:pointer}
.kl-modal-close svg{width:17px;height:17px}
.kl-modal-eyebrow{display:inline-block;border-radius:999px;background:#ecfdf5;padding:6px 11px;color:#047857;font:800 10px var(--mono);letter-spacing:.1em;text-transform:uppercase}
.kl-modal h2{margin:12px 0 6px;color:var(--ink);font:800 28px/1.15 var(--serif);letter-spacing:-.02em}
.kl-modal>p{margin:0;color:var(--text);font-size:13.5px;line-height:1.6}
.kl-recap{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}
.kl-recap>div{border:1px solid #e7ebf5;border-radius:16px;background:#fbfcff;padding:16px;text-align:center}
.kl-recap b{display:block;color:var(--brand);font:900 26px/1 var(--sans)}
.kl-recap span{display:block;margin-top:6px;color:#7b849e;font-size:10.5px;font-weight:700}
.kl-recap-modules{display:grid;gap:8px;margin-bottom:18px}
.kl-recap-modules div{display:flex;justify-content:space-between;gap:12px;border:1px solid #eef0f7;border-radius:11px;padding:10px 13px}
.kl-recap-modules b{color:var(--ink);font-size:12.5px}
.kl-recap-modules span{color:var(--brand);font:800 11px var(--mono)}
.kl-cert-name label{display:grid;gap:7px;color:#313752;font-size:11px;font-weight:900}
.kl-cert-name input{width:100%;min-height:48px;border:1px solid #dfe4ef;border-radius:12px;background:#fff;padding:0 13px;color:var(--ink);font-size:14px;outline:0}
.kl-cert-name input:focus{border-color:#918aff;box-shadow:0 0 0 4px rgba(79,70,229,.08)}
.kl-cert-actions{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:18px}
.kl-cert-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:13px;padding:13px;font-size:13px;font-weight:800;cursor:pointer;transition:.15s}
.kl-cert-actions svg{width:17px;height:17px}
.kl-cert-download{background:#fff;color:var(--brand);border:1px solid #d8d3ff!important}
.kl-cert-save{background:linear-gradient(135deg,var(--brand),var(--violet));color:#fff}
.kl-cert-save:disabled{opacity:.65;cursor:default}
.kl-cert-code{margin-top:16px;border:1px dashed #b9b3ff;border-radius:14px;background:#f6f4ff;padding:14px 16px}
.kl-cert-code span{display:block;color:#7b849e;font-size:10.5px;font-weight:800}
.kl-cert-code b{display:block;margin-top:5px;color:var(--brand);font:800 18px var(--mono);letter-spacing:.04em}
.kl-cert-code a{display:inline-block;margin-top:8px;color:var(--brand);font-size:12px;font-weight:800}

[data-theme=dark] .kl-resources,[data-theme=dark] .kl-resource,[data-theme=dark] .kl-modal{background:#151f32;border-color:#26334d}
[data-theme=dark] .kl-resource:hover{background:#1a2740;border-color:#4c4f87}
[data-theme=dark] .kl-resource-copy b,[data-theme=dark] .kl-resources h3,[data-theme=dark] .kl-modal h2,[data-theme=dark] .kl-recap-modules b{color:#f4f7ff}
[data-theme=dark] .kl-resource-copy small,[data-theme=dark] .kl-recap span,[data-theme=dark] .kl-modal>p,[data-theme=dark] .kl-cert-code span{color:#c8d1e5}
[data-theme=dark] .kl-resource-tag,[data-theme=dark] .kl-cert-code{background:#1d2450}
[data-theme=dark] .kl-notebook-hero,[data-theme=dark] .kl-portfolio-hero{background:radial-gradient(circle at 92% 6%,rgba(124,58,237,.24),transparent 32%),linear-gradient(135deg,#151f32,#101827);border-color:#303c56}
[data-theme=dark] .kl-notebook-hero .lead,[data-theme=dark] .kl-portfolio-hero .lead{color:#e6ecff}
[data-theme=dark] .kl-portfolio-btn.is-ghost{background:#151f32;color:#a5b4ff;border-color:#4c4f87}
[data-theme=dark] .kl-modal-close{border-color:#26334d;background:#151f32;color:#f4f7ff}
[data-theme=dark] .kl-recap>div,[data-theme=dark] .kl-recap-modules div{border-color:#26334d;background:#101827}
[data-theme=dark] .kl-cert-name input{background:#101827;border-color:#26334d;color:#f4f7ff}
[data-theme=dark] .kl-cert-download{background:#151f32;color:#a5b4ff;border-color:#4c4f87!important}

/* Sidebar collapse + professional polish */
.kl-sidebar-title-row{display:flex;align-items:center;gap:10px}
.kl-sidebar-title-row h1{flex:1;min-width:0}
.kl-collapse-toggle{display:grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #e2e7f2;border-radius:10px;background:#f8f9fd;color:#6b7490;cursor:pointer;transition:.15s}
.kl-collapse-toggle:hover{border-color:#b5b0ff;color:var(--brand);background:#f3f2ff}
.kl-collapse-toggle svg{width:17px;height:17px}
.kl-sidebar-head{position:relative}
.kl-module-list{scrollbar-width:thin}
.kl-module-list::-webkit-scrollbar{width:8px}
.kl-module-list::-webkit-scrollbar-thumb{background:#dfe5f2;border-radius:999px}
.kl-module-head{font-size:12.5px}
.kl-lesson-copy b{font-size:12px}
.kl-lesson-copy small{font-size:10px}
.kl-lesson-score.is-pass{background:#dcfce7;color:#047857}
.kl-lesson-score.is-fail{background:#fee2e2;color:#b91c1c}

/* Quiz as modal */
.kl-quiz-hero{display:flex;flex-direction:column;align-items:center;gap:6px;border:1px solid #dcd6ff;border-radius:20px;background:radial-gradient(circle at 50% 0,rgba(79,70,229,.12),transparent 55%),linear-gradient(180deg,#fff,#f8f7ff);padding:38px 28px;text-align:center}
.kl-quiz-icon{display:grid;place-items:center;width:58px;height:58px;margin-bottom:10px;border-radius:17px;background:linear-gradient(135deg,var(--brand),var(--violet));color:#fff;box-shadow:0 12px 26px rgba(79,70,229,.24)}
.kl-quiz-icon svg{width:28px;height:28px}
.kl-quiz-hero .lead{max-width:560px;margin:0 auto 6px;color:var(--ink);font:600 18px/1.6 var(--serif)}
.kl-quiz-result{display:flex;align-items:center;gap:10px;border-radius:999px;padding:9px 16px;margin-top:6px}
.kl-quiz-result b{font:900 20px var(--sans)}
.kl-quiz-result span{font-size:12px;font-weight:700}
.kl-quiz-result.is-pass{background:#dcfce7;color:#047857}
.kl-quiz-result.is-fail{background:#fef2f2;color:#b91c1c}
.kl-quiz-start{display:inline-flex;align-items:center;gap:12px;margin-top:16px;border:0;border-radius:14px;background:linear-gradient(135deg,var(--brand),var(--violet));padding:14px 22px;color:#fff;font-size:14px;font-weight:800;cursor:pointer;box-shadow:0 12px 26px rgba(79,70,229,.24)}
.kl-quiz-start span{border-radius:999px;background:rgba(255,255,255,.2);padding:4px 9px;font:800 10px var(--mono)}
.kl-quiz-locked{margin-top:14px;border-radius:12px;background:#fef3c7;padding:11px 16px;color:#92400e;font-size:13px;font-weight:700}
.kl-quiz-locked b{font:800 14px var(--mono)}
.kl-quiz-overlay{position:fixed;z-index:70;inset:0;display:grid;place-items:center;background:rgba(17,20,47,.55);padding:20px;backdrop-filter:blur(4px)}
.kl-quiz-modal{position:relative;width:min(560px,100%);max-height:86vh;overflow:auto;border:1px solid #dfe3f3;border-radius:22px;background:#fff;padding:28px 30px;box-shadow:0 30px 90px rgba(17,20,47,.32)}
.kl-quiz-close{position:absolute;right:16px;top:16px;display:grid;place-items:center;width:34px;height:34px;border:1px solid #e2e7f2;border-radius:10px;background:#fff;color:var(--ink);cursor:pointer}
.kl-quiz-close svg{width:17px;height:17px}
.kl-quiz-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:16px;border-bottom:1px solid #eef1f7}
.kl-quiz-modal-head>span{color:var(--ink);font:700 15px var(--serif)}
.kl-quiz-progress{color:#8a92aa;font:800 11px var(--mono)}
.kl-quiz-progress b{color:var(--brand);font-size:15px}
.kl-quiz-body{padding-top:22px}
.kl-quiz-q{margin:0 0 18px;color:var(--ink);font:700 20px/1.35 var(--serif)}
.kl-quiz-options{display:grid;gap:10px}
.kl-quiz-options button{width:100%;padding:14px 16px;border:1px solid #e2e7f2;border-radius:13px;background:#fbfcff;color:var(--text);font-size:14px;font-weight:600;text-align:left;cursor:pointer;transition:.15s}
.kl-quiz-options button:hover{border-color:#918aff;background:#f3f2ff}
.kl-quiz-final{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:10px 0}
.kl-quiz-final-badge{display:grid;place-items:center;width:66px;height:66px;border-radius:50%;margin-bottom:8px}
.kl-quiz-final-badge svg{width:32px;height:32px}
.kl-quiz-final.is-pass .kl-quiz-final-badge{background:#dcfce7;color:#059669}
.kl-quiz-final.is-fail .kl-quiz-final-badge{background:#fee2e2;color:#dc2626}
.kl-quiz-final h2{margin:0;color:var(--ink);font:800 26px var(--serif)}
.kl-quiz-final p{margin:0;color:var(--text);font-size:14px;line-height:1.6}
.kl-quiz-final p b{color:var(--ink)}
.kl-quiz-done{margin-top:16px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--brand),var(--violet));padding:12px 28px;color:#fff;font-size:14px;font-weight:800;cursor:pointer}

[data-theme=dark] .kl-quiz-hero{background:radial-gradient(circle at 50% 0,rgba(79,70,229,.22),transparent 55%),linear-gradient(180deg,#151f32,#101827);border-color:#303c56}
[data-theme=dark] .kl-quiz-hero .lead,[data-theme=dark] .kl-quiz-q,[data-theme=dark] .kl-quiz-modal-head>span,[data-theme=dark] .kl-quiz-final h2{color:#f4f7ff}
[data-theme=dark] .kl-quiz-modal{background:#151f32;border-color:#303c56}
[data-theme=dark] .kl-quiz-close{background:#151f32;border-color:#26334d;color:#f4f7ff}
[data-theme=dark] .kl-quiz-modal-head{border-color:#1c2942}
[data-theme=dark] .kl-quiz-options button{background:#101827;border-color:#26334d;color:#c8d1e5}
[data-theme=dark] .kl-quiz-options button:hover{background:#1a2740;border-color:#4c4f87}
[data-theme=dark] .kl-quiz-final p{color:#c8d1e5}
[data-theme=dark] .kl-quiz-locked{background:#2a2212;color:#fbbf24}

@media(max-width:1023px){
  .kl-collapse-toggle{display:none}
  .kl-app.sidebar-collapsed{grid-template-columns:1fr}
  .kl-app.sidebar-collapsed .kl-sidebar{transform:translateX(-102%);opacity:1}
}

/* Class overview / landing (Udemy-style) */
.ko-overview{min-height:100vh;background:#fff;color:#1c1d1f}
.ko-hero{background:#1b1d22;color:#fff;padding:110px 0 58px}
.ko-hero-inner,.ko-body{width:min(1180px,calc(100% - 48px));margin:0 auto}
.ko-hero-inner{position:relative;min-height:330px}
.ko-hero-copy{width:calc(100% - 410px);padding:0 0 24px}
.ko-crumbs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:18px;color:#8b9198;font-size:12px;font-weight:700}
.ko-crumbs a{color:#b9c0c7;text-decoration:none}
.ko-crumbs a:hover{color:#fff;text-decoration:underline}
.ko-badge{display:inline-block;margin-bottom:14px;border:1px solid #d9d6a5;border-radius:4px;background:#eceb98;padding:4px 10px;color:#3d3c0a;font-size:12px;font-weight:800}
.ko-hero h1{margin:0 0 12px;font:800 clamp(30px,3.6vw,44px)/1.08 var(--serif);letter-spacing:-.02em}
.ko-subtitle{margin:0 0 18px;color:#d1d7dc;font-size:18px;line-height:1.5}
.ko-rating{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px;font-size:13px}
.ko-rating b{color:#fff;font-size:15px}
.ko-stars{display:inline-flex;gap:1px;color:#f69c08}
.ko-stars span{width:15px;height:15px}
.ko-stars .is-off{color:#5c6166}
.ko-rating a{color:#aeb6fe;text-decoration:none}
.ko-rating a:hover{text-decoration:underline}
.ko-rating>span{color:#8b9198}
.ko-meta{display:flex;flex-wrap:wrap;gap:7px 6px;margin-bottom:16px;color:#d1d7dc;font-size:13px}
.ko-meta span{display:inline-block}
.ko-meta span+span::before{content:"•";margin-right:6px;color:#6f757c}
.ko-meta b{color:#fff}
.ko-lead{margin:0 0 14px;color:#b9c0c7;font-size:15px;line-height:1.65}
.ko-creator{margin:0;color:#8b9198;font-size:13px}
.ko-creator a{color:#c7cbff;font-weight:700;text-decoration:none}
.ko-creator a:hover{text-decoration:underline}
.ko-buy{position:absolute;z-index:3;top:44px;right:0;width:360px;border:1px solid #d1d7dc;border-radius:2px;background:#fff;color:#1c1d1f;padding:20px;box-shadow:0 12px 32px rgba(17,19,25,.22)}
.ko-cover-wrap{position:relative;display:block;margin-bottom:16px}
.ko-cover{display:block;width:100%;aspect-ratio:16/9;border-radius:4px;object-fit:cover;background:#eceff1}
.ko-play{position:absolute;inset:0;display:grid;place-items:center;border-radius:4px;background:rgba(28,29,31,.22);color:#fff}
.ko-play svg{width:44px;height:44px;padding:9px;border-radius:50%;background:rgba(28,29,31,.78)}
.ko-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 10px;margin-bottom:16px}
.ko-price b{font:800 34px/1 var(--sans)}
.ko-price del{color:#7a7f86;font-size:16px;font-weight:700}
.ko-price span{color:#0f7c5f;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
[data-direct-checkout-message]{margin:10px 0 0;color:#667085;font-size:12px;line-height:1.5;text-align:center}
[data-direct-checkout-message][data-state=error]{color:#b42318}
.ko-buy-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;margin-top:10px;border:1px solid #1c1d1f;border-radius:4px;background:#1c1d1f;padding:0 14px;color:#fff;font-size:14px;font-weight:800;text-decoration:none;cursor:pointer;transition:background .16s ease}
.ko-buy-btn:hover{background:#3a3d42}
.ko-buy-btn.is-disabled{border-color:#d1d7dc;background:#eef0f3;color:#6a6f73;cursor:not-allowed}
.ko-buy-btn.is-ghost{margin-top:8px;border-color:#1c1d1f;background:#fff;color:#1c1d1f}
.ko-buy-btn.is-ghost:hover{background:#f5f5f5}
.ko-buy-note{margin:12px 0 0;color:#6a6f73;font-size:12px;line-height:1.5;text-align:center}
.ko-buy h3{margin:22px 0 10px;font:700 15px var(--sans)}
.ko-includes{margin:0;padding:0;list-style:none}
.ko-includes li{position:relative;padding:5px 0 5px 24px;color:#3c3f42;font-size:13px;line-height:1.45}
.ko-includes li::before{content:"";position:absolute;left:2px;top:9px;width:13px;height:9px;border-left:2px solid #1c1d1f;border-bottom:2px solid #1c1d1f;transform:rotate(-45deg)}
.ko-buy-more{display:inline-block;margin-top:18px;color:#5624d0;font-size:13px;font-weight:700;text-decoration:underline}
.ko-body{padding-top:38px;padding-bottom:96px}
.ko-main{width:calc(100% - 410px);max-width:780px}
.ko-panel{margin-bottom:18px;border:1px solid #d1d7dc;border-radius:4px;background:#fff;padding:26px 28px}
.ko-panel h2{margin:0 0 16px;font:800 24px/1.2 var(--serif);letter-spacing:-.015em}
.ko-learn-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 24px;margin:0;padding:0;list-style:none}
.ko-learn-item{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start;padding:4px 0}
.ko-check{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#0f7c5f;color:#fff}
.ko-check svg{width:14px;height:14px}
.ko-learn-item b{display:block;color:#1c1d1f;font-size:14px}
.ko-learn-item p{margin:3px 0 0;color:#3c3f42;font-size:13px;line-height:1.5}
.ko-curriculum-head{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:baseline;margin-bottom:14px}
.ko-module-head.is-static{cursor:default}
.ko-curriculum-head h2{margin:0}
.ko-curriculum-meta{color:#6a6f73;font-size:12px}
.ko-expand{margin-left:auto;border:0;background:none;color:#5624d0;font-size:13px;font-weight:700;cursor:pointer}
.ko-modules{display:grid;gap:10px}
.ko-module{border:1px solid #d1d7dc;border-radius:4px;overflow:hidden}
.ko-module-head{display:flex;align-items:center;gap:14px;width:100%;border:0;background:#fff;padding:16px 18px;text-align:left;cursor:pointer}
.ko-module-head:hover{background:#fafbfc}
.ko-module-num{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#f0f2f5;color:#6a6f73;font:800 11px var(--mono)}
.ko-module-head h3{flex:1;min-width:0;margin:0;color:#1c1d1f;font:700 16px var(--sans)}
.ko-module-meta{flex:none;color:#6a6f73;font-size:12px}
.ko-chevron{flex:none;width:18px;height:18px;color:#6a6f73;transition:transform .18s ease}
.ko-module.is-open .ko-chevron{transform:rotate(90deg)}
.ko-module-body{display:none;border-top:1px solid #eceff1;background:#fbfcfc}
.ko-module.is-open .ko-module-body{display:block}
.ko-module-description{margin:0;padding:14px 18px 2px;color:#5d6268;font-size:13px;line-height:1.65}
.ko-module-body ol{margin:0;padding:8px 18px 14px;list-style:none}
.ko-module-body li{display:flex;align-items:center;gap:10px;padding:9px 0;color:#3c3f42;font-size:13px}
.ko-module-body li+li{border-top:1px solid #f0f2f3}
.ko-module-body li svg{flex:none;width:18px;height:18px;color:#8a8f94}
.ko-module-body li b{flex:1;min-width:0;font-weight:600}
.ko-module-body li span{flex:none;color:#8a8f94;font-size:12px}
.ko-requirements ul,.ko-audience ul{margin:0;padding:0 0 0 22px;color:#3c3f42;font-size:14px;line-height:1.7}
.ko-prose p{margin:0 0 12px;color:#3c3f42;font-size:14px;line-height:1.7}
.ko-prose p:last-child{margin-bottom:0}
.ko-instructor-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;align-items:start}
.ko-avatar{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;font:800 20px var(--sans)}
.ko-instructor-copy b{display:block;color:#1c1d1f;font-size:17px}
.ko-instructor-copy small{display:block;margin-top:2px;color:#6a6f73;font-size:13px}
.ko-instructor-copy p{margin:10px 0 0;color:#3c3f42;font-size:14px;line-height:1.65}
.ko-cta{margin:26px 0 0;border:1px solid #d1d7dc;border-radius:4px;background:linear-gradient(135deg,#fff,#f5f3ff);padding:34px 28px;text-align:center}
.ko-cta h2{margin:0;font:800 28px/1.15 var(--serif)}
.ko-cta p{margin:10px auto 18px;max-width:560px;color:#3c3f42;font-size:14px;line-height:1.7}
.ko-cta .ko-buy-btn{display:inline-flex;width:auto;min-width:240px}
.ko-sticky{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #d1d7dc;background:rgba(255,255,255,.96);padding:10px 20px;box-shadow:0 -8px 24px rgba(0,0,0,.1)}
.ko-sticky[hidden]{display:none}
.ko-sticky-price{display:flex;flex-direction:column;line-height:1.2}
.ko-sticky-price b{font-size:20px}
.ko-sticky-price span{color:#6a6f73;font-size:12px}
.ko-sticky .ko-buy-btn{display:inline-flex;width:auto;min-width:220px;margin:0}
#ko-instructor{scroll-margin-top:96px}
.kl-body[data-course-gated] .kl-app{visibility:hidden}
.kl-body[data-course-gated]::before{content:"Memeriksa akses kelas...";position:fixed;inset:0;display:grid;place-items:center;color:#667085;font-size:14px;font-weight:700}

[data-theme=dark] .ko-overview{background:#0e1220}
[data-theme=dark] .ko-hero{background:#151922;color:#f4f7ff}
[data-theme=dark] .ko-panel,[data-theme=dark] .ko-cta{background:#151b2c;border-color:#26304a}
[data-theme=dark] .ko-panel h2,[data-theme=dark] .ko-cta h2,[data-theme=dark] .ko-learn-item b,[data-theme=dark] .ko-module-head h3,[data-theme=dark] .ko-instructor-copy b{color:#f4f7ff}
[data-theme=dark] .ko-learn-item p,[data-theme=dark] .ko-requirements li,[data-theme=dark] .ko-audience li,[data-theme=dark] .ko-prose p,[data-theme=dark] .ko-instructor-copy p,[data-theme=dark] .ko-cta p,[data-theme=dark] .ko-module-body li{color:#c5cee0}
[data-theme=dark] .ko-module{border-color:#26304a}
[data-theme=dark] .ko-module-head{background:#151b2c}
[data-theme=dark] .ko-module-head:hover{background:#182036}
[data-theme=dark] .ko-module-body{background:#121828;border-color:#26304a}
[data-theme=dark] .ko-module-description{color:#aeb8cc}
[data-theme=dark] .ko-module-body li+li{border-color:#1d2740}
[data-theme=dark] .ko-module-num{background:#232d47;color:#9aa7c4}
[data-theme=dark] .ko-sticky{background:rgba(18,24,40,.96);border-color:#26304a}
[data-theme=dark] .ko-sticky-price b{color:#f4f7ff}

@media(max-width:960px){
  .ko-hero{padding-top:104px}
  .ko-hero-inner{min-height:0}
  .ko-hero-copy,.ko-main{width:auto;max-width:none}
  .ko-buy{position:relative;top:auto;right:auto;width:auto;max-width:620px;margin-top:30px}
}
@media(max-width:700px){
  .ko-hero{padding:96px 0 34px}
  .ko-hero-inner,.ko-body{width:calc(100% - 32px)}
  .ko-hero h1{font-size:30px}
  .ko-meta{font-size:12px}
  .ko-learn-grid{grid-template-columns:1fr}
  .ko-curriculum-head{display:grid;grid-template-columns:1fr auto}
  .ko-curriculum-head h2{grid-column:1/-1}
  .ko-curriculum-meta{font-size:11px}
  .ko-expand{margin-left:0}
  .ko-module-head{flex-wrap:wrap;gap:8px 12px}
  .ko-module-meta{flex-basis:100%;margin-left:46px}
  .ko-panel{padding:20px 18px}
  .ko-instructor-card{grid-template-columns:1fr}
}

/* Dicoding-style lesson content */
.kl-prose .table-responsive{overflow-x:auto;margin:0 0 20px}
.kl-prose table{width:100%;max-width:100%;border-collapse:collapse;margin:0 0 22px;border-radius:12px;overflow:hidden;font-size:14px;line-height:1.6}
.kl-prose table td,.kl-prose table th{border:1px solid #e2e7f2;padding:10px 13px;text-align:left;vertical-align:top;background:#fff}
.kl-prose table tr:first-child td{background:#f8f9fd;font-weight:700;color:var(--ink)}
.kl-prose img{max-width:100%;height:auto;border-radius:12px}
.kl-prose .zoomable-image-anchor{display:block;margin:20px 0}
.kl-prose .fr-img-caption{display:flex;flex-direction:column;align-items:center;gap:8px;margin:20px 0}
.kl-prose .fr-img-wrap{display:flex;flex-direction:column;align-items:center;gap:8px}
.kl-prose .fr-img-wrap img{width:100%;max-width:100%;margin:0}
.kl-prose .fr-inner{display:block;max-width:720px;color:#7b849e;font-size:12.5px;font-style:italic;text-align:center;line-height:1.55}
.kl-prose .interactive-glossary{border-bottom:1px dashed #aab3d0;cursor:help}
.kl-prose .text-xl{display:block;margin:18px 0;color:var(--ink);font-size:17px;font-weight:700;line-height:1.6}
.kl-prose .text-gray-700,.kl-prose .text-gray-500,.kl-prose .text-gray-600{color:inherit}
.kl-prose pre{white-space:pre-wrap}

[data-theme=dark] .kl-prose table td,[data-theme=dark] .kl-prose table th{border-color:#26304a;background:#151b2c}
[data-theme=dark] .kl-prose table tr:first-child td{background:#182036}
[data-theme=dark] .kl-prose .fr-inner{color:#9aa7c4}
