.kp-shell .lesson-word-editor{border:1px solid #ccd7e1;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 2px 8px #193b3008}
.kp-shell .lesson-word-ribbon{display:flex;flex-wrap:wrap;gap:8px;padding:10px;background:#f4f7fa;border-bottom:1px solid #d8e1e8}
.kp-shell .lesson-word-group{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:0 10px 0 0;border-right:1px solid #d9e1e8;min-width:0}
.kp-shell .lesson-word-group:last-child{border:0}.lesson-word-group>small{flex-basis:100%;font-size:10px;letter-spacing:.04em;color:#617487;text-transform:uppercase}
.kp-shell .lesson-word-ribbon button{background:white;color:#344d62;border:1px solid #d5dfe7;border-radius:5px;min-height:34px;padding:6px 9px;font-size:12px;line-height:1.3;margin:0}
.kp-shell .lesson-word-ribbon button:hover{background:#e6eef5;border-color:#aabfce}.kp-shell .lesson-word-ribbon button:disabled{opacity:.5;cursor:default}
.kp-shell .lesson-word-ribbon select{width:auto;max-width:155px;min-height:34px;padding:4px 7px;margin:0;font-size:12px}
.kp-shell .lesson-word-editor .lesson-rich-page,.lesson-material-preview{min-height:400px;max-height:70dvh;overflow:auto;padding:30px clamp(18px,4vw,52px);font:400 16px/1.8 system-ui,sans-serif;color:#263c4b;background:white;overflow-wrap:anywhere}
.lesson-word-editor [hidden]{display:none!important}.kp-shell .lesson-word-editor .lesson-rich-page:focus-visible{outline:2px solid #95b5d0;outline-offset:-2px}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) :is(h2,h3,h4){line-height:1.3;margin:22px 0 12px;color:#263d4d}.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) p{font-weight:400;margin:0 0 16px;line-height:1.8;color:inherit}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) img{display:block;max-width:100%;height:auto;margin:16px 0;border-radius:5px}.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;margin:18px 0}.lesson-word-editor :is(td,th){border:1px solid #cbd6df;padding:10px;overflow-wrap:anywhere}
.kp-shell .lesson-word-status{font-size:12px;font-weight:400;margin:0!important;padding:10px 14px;border-top:1px solid #e0e6ec;background:#f8fafc;color:#5c7282}
.kp-shell dialog.lesson-insert-dialog{position:fixed;inset:0;margin:auto;width:min(580px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:90dvh;padding:0;border:1px solid #d3dfe6;border-radius:12px;overflow:auto;color:#294251;background:#fff;box-shadow:0 14px 60px #122c3c40;box-sizing:border-box}
.lesson-insert-dialog::backdrop{background:#10263880}.lesson-insert-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border-bottom:1px solid #e0e6ec}.kp-shell .lesson-insert-header h2{font-size:19px;margin:0}.lesson-insert-body{padding:20px}.lesson-insert-body label{display:block;font-size:13px;margin-bottom:16px}.kp-shell .lesson-insert-body input{display:block;width:100%;margin-top:7px;max-width:100%;box-sizing:border-box}.lesson-insert-body p{font-size:13px;line-height:1.6}.lesson-insert-body details button{display:block;margin:8px 0;max-width:100%;overflow-wrap:anywhere;white-space:normal}.lesson-insert-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;border-top:1px solid #e0e6ec}.lesson-insert-error{color:#a33f26!important;font-size:13px;overflow-wrap:anywhere}
.lesson-video-frame{display:block;width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:8px;margin:20px 0}.lesson-document-frame{display:block;width:100%;height:520px;max-height:70dvh;border:1px solid #d3dfe6;border-radius:8px;margin:20px 0}.lesson-material-preview a,.lesson-rich-page a{color:#176489;text-decoration:underline;text-underline-offset:3px}
@media(max-width:650px){.kp-shell .lesson-word-ribbon{gap:10px;padding:8px}.kp-shell .lesson-word-group{padding:0;border:0;flex-basis:100%}.kp-shell .lesson-word-ribbon button{min-height:40px;padding:8px 10px}.kp-shell .lesson-word-editor .lesson-rich-page,.lesson-material-preview{padding:20px 16px;min-height:320px}.lesson-insert-body{padding:16px}.kp-shell .lesson-insert-body input{font-size:16px}.lesson-document-frame{height:400px}}
.kp-shell .lesson-insert-dialog input[type=file]{opacity:1!important;position:static!important;visibility:visible!important;clip:auto!important;clip-path:none!important;pointer-events:auto!important;transform:none!important;height:auto!important}.kp-shell .lesson-insert-dialog input[type=file]::file-selector-button{background:#315c4a;color:white;border:0;border-radius:5px;padding:9px 12px;margin-right:10px}

.kp-shell label.lesson-editor-label{margin-bottom:6px}.kp-shell .lesson-word-editor{margin-top:0}

/* Shared document typography for authoring and its sanitized preview. */
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview){font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px;font-weight:400;line-height:1.8;text-align:left}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) h2{font-size:26px!important;font-weight:700!important;line-height:1.3;margin:28px 0 14px;color:#214e3c;padding-bottom:9px;border-bottom:1px solid #e1e9de}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) h3{font-size:21px!important;font-weight:650!important;line-height:1.4;margin:24px 0 10px;color:#2b5542}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) h4{font-size:18px!important;font-weight:650!important;line-height:1.45;margin:20px 0 8px;color:#344f40}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview)>:first-child{margin-top:0}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) :is(strong,b){font-weight:700!important;color:#244b39}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) :is(em,i){font-style:italic!important}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) u{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) :is(ul,ol){display:block;list-style-position:outside;padding-left:26px;margin:12px 0 20px}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) ul{list-style-type:disc}.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) ol{list-style-type:decimal}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) li{display:list-item;margin:7px 0;padding-left:4px;font-size:16px;font-weight:400;line-height:1.8}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) li::marker{color:#3e7151;font-weight:600}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) blockquote{border:0;border-left:4px solid #abc77e;background:#f3f7ee;padding:16px 20px;margin:20px 0;color:#395143}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) blockquote p:last-child{margin-bottom:0}
@media(max-width:650px){.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) h2{font-size:23px!important}.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) h3{font-size:20px!important}}
.lesson-word-editor :is(.lesson-rich-page,.lesson-material-preview) p:not([style*="font-size"]){font-size:16px!important;font-weight:400;line-height:1.8}

/* Protected workbook links keep their original destination and become one accessible resource card. */
body a.lesson-workbook-card{display:grid!important;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:18px;width:100%;box-sizing:border-box;padding:20px 22px!important;margin:16px 0 22px!important;border:1px solid #d8e2cc;border-left:4px solid #af8b4d;border-radius:12px;background:linear-gradient(110deg,#f8f5ea,#f2f7ed);color:#234c38!important;font:650 16px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif!important;text-decoration:none!important;overflow-wrap:anywhere;box-shadow:0 4px 14px #193b3007;transition:border-color .18s,box-shadow .18s}
body a.lesson-workbook-card::before{content:'PDF';display:grid;place-items:end center;width:52px;height:62px;padding-bottom:6px;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6b38' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v5h4M9 12h6m-6 3h6'/%3E%3C/svg%3E") center 5px/29px 29px no-repeat;border:1px solid #e1dac7;border-radius:7px;color:#8a6b38;font-size:10px;font-weight:800;letter-spacing:.08em}
body a.lesson-workbook-card::after{content:'Download PDF ↓';display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 15px;box-sizing:border-box;border-radius:7px;background:#24503a;color:#fff;font-size:12px;font-weight:700;white-space:nowrap;line-height:1.4}
body a.lesson-workbook-card:hover{border-color:#9eb58a;box-shadow:0 7px 20px #193b3010;text-decoration:none!important}body a.lesson-workbook-card:focus-visible{outline:3px solid #9d7f43;outline-offset:4px}
@media(max-width:600px){body a.lesson-workbook-card{grid-template-columns:43px minmax(0,1fr);gap:12px;padding:16px!important;font-size:15px!important}body a.lesson-workbook-card::before{width:42px;height:54px}body a.lesson-workbook-card::after{grid-column:1/-1;width:100%;min-height:44px}}
@media(prefers-reduced-motion:reduce){body a.lesson-workbook-card{transition:none}}@media print{body a.lesson-workbook-card{box-shadow:none;background:#fff}body a.lesson-workbook-card::after{background:#fff;color:#193b30;border:1px solid #ccd6c1}}

body a.lesson-workbook-card::after{position:static!important;inset:auto!important;width:auto!important;height:auto!important;opacity:1!important;transform:none!important;transition:none!important;pointer-events:none}body a.lesson-workbook-card::before{position:static!important;opacity:1!important;transform:none!important}

.lesson-example-audio{display:flex;align-items:center;flex-wrap:wrap;gap:9px 14px;margin:8px 0 20px}.lesson-example-audio button{border:1px solid #cbd8c0;border-radius:7px;padding:9px 13px;min-height:40px;background:#193b30;color:#fff;font-size:13px;font-weight:400}.lesson-example-audio small{font-size:11px;color:#61705e}

.lesson-example-audio button:hover,.lesson-example-audio button[aria-pressed="true"]{background:#285440;color:#fff}.lesson-example-audio button:focus-visible{outline:3px solid #aa8841;outline-offset:3px;color:#fff}

/* Compact, readable authoring workspace with explicit visual/source modes. */
.kp-shell .lesson-word-editor{border-radius:12px;border-color:#d5e2dd;box-shadow:0 4px 18px #193b3008}
.kp-shell .lesson-word-ribbon{gap:10px;padding:12px;background:#f7faf8;border-color:#dce6e0}
.kp-shell .lesson-word-group{gap:4px;padding-right:10px;border-color:#dce6e0}
.kp-shell .lesson-word-group>small{font:600 10px/1.2 system-ui;letter-spacing:.07em;color:#64796c;margin-bottom:3px}
.kp-shell .lesson-word-ribbon button{font:500 12px/1.3 system-ui;border-color:#dce5df;color:#264e3d;border-radius:6px;min-height:32px;padding:6px 9px;box-shadow:none}
.kp-shell .lesson-word-ribbon button:hover{background:#e9f1ec;border-color:#a5bcad}.kp-shell .lesson-word-ribbon button[aria-pressed=true]{background:#193b30;color:#fff}
.kp-shell .lesson-word-ribbon select{border-radius:6px;color:#264e3d;min-height:32px;background:#fff}
.kp-shell .lesson-word-ribbon .lesson-colour-control{display:inline-flex;align-items:center;gap:4px;margin:0;font:500 11px system-ui;color:#526c5d}
.kp-shell .lesson-word-ribbon input[type=color]{width:28px!important;min-width:28px;min-height:28px;height:28px;padding:2px!important;margin:0;border:1px solid #cad8cf;border-radius:5px}
.kp-shell .lesson-word-editor .lesson-rich-page{min-height:440px;max-height:65dvh;padding:32px clamp(20px,4vw,56px);font:400 16px/1.8 Arial,sans-serif;background:#fff}
.kp-shell .lesson-word-editor .lesson-html-source{display:block;width:100%;min-height:440px;max-height:65dvh;resize:vertical;border:0;border-radius:0;padding:24px;margin:0;background:#152a24;color:#dbeee3;font:14px/1.7 Consolas,monospace;tab-size:2;white-space:pre;overflow:auto;box-sizing:border-box}
.kp-shell .lesson-word-editor .lesson-html-source[hidden]{display:none!important}
.kp-shell .lesson-word-editor.lesson-editor-expanded{position:fixed;inset:14px;z-index:1100;margin:0;display:flex;flex-direction:column;box-shadow:0 0 0 100vmax #142b2699}
.kp-shell .lesson-editor-expanded :is(.lesson-rich-page,.lesson-html-source,.lesson-material-preview){flex:1;min-height:0;max-height:none}
.kp-shell .lesson-word-status{font:12px/1.5 system-ui;color:#536d5d;background:#f7faf8}
@media(max-width:700px){.kp-shell .lesson-word-ribbon{gap:8px;padding:8px}.kp-shell .lesson-word-group{border-right:0;padding-right:0}.kp-shell .lesson-word-editor .lesson-rich-page{padding:20px;min-height:320px}.kp-shell .lesson-word-editor.lesson-editor-expanded{inset:4px}}

.kp-shell .lesson-uses-jodit .lesson-word-ribbon{padding:8px 12px;border-bottom:1px solid #dce6e0;background:#f7faf8}
.kp-shell .lesson-uses-jodit .lesson-word-group>small{flex-basis:auto;margin:0 8px 0 0}.kp-shell .lesson-uses-jodit .lesson-word-group{border:0;padding:0}
.kp-shell .lesson-uses-jodit .jodit-container{border:0!important;border-radius:0!important;font-family:Arial,sans-serif}
.kp-shell .lesson-uses-jodit .jodit-toolbar__box{background:#f7faf8;border-color:#dce6e0}.kp-shell .lesson-uses-jodit .jodit-workplace{background:white}
.kp-shell .lesson-uses-jodit .jodit-wysiwyg{padding:28px clamp(18px,3vw,44px)!important;min-height:340px!important;line-height:1.8!important}
.kp-shell .lesson-uses-jodit .jodit-toolbar-button__button{min-width:28px;min-height:30px;padding:4px!important;margin:0!important;background:transparent!important;color:#264e3d!important;box-shadow:none!important;border:0!important}
.kp-shell .lesson-uses-jodit .jodit-source__mirror{font:14px/1.7 Consolas,monospace}.kp-shell .lesson-uses-jodit .jodit-status-bar{font:11px/1.5 system-ui;background:#f7faf8}
.jodit-popup,.jodit-dialog__panel{z-index:1201!important}

.kp-shell .lesson-uses-jodit .jodit-wysiwyg :is(p,li){font-size:inherit;line-height:1.8;color:inherit;font-weight:400}
.kp-shell .lesson-uses-jodit .jodit-wysiwyg h2{font-size:26px;line-height:1.3;margin:20px 0 12px}.kp-shell .lesson-uses-jodit .jodit-wysiwyg h3{font-size:22px;line-height:1.4}.kp-shell .lesson-uses-jodit .jodit-wysiwyg h4{font-size:18px;line-height:1.4}
