:root{--pk-violet:#7c3aed;--pk-violet-strong:#6d28d9;--pk-violet-soft:#f4f1ff;--pk-orange:#f97316;--pk-ink:#18181b;--pk-text:#3f3f46;--pk-muted:#71717a;--pk-subtle:#a1a1aa;--pk-line:#e7e7ec;--pk-line-strong:#d9d9e1;--pk-panel:#f8f8fa;--pk-white:#fff;color-scheme:light}
html,body{background:var(--pk-white)}body{min-width:320px;color:var(--pk-ink);font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;line-height:1.5}button,input,textarea,select{font-family:inherit}button,a,input,textarea,select{transition:color 140ms ease,background-color 140ms ease,border-color 140ms ease,box-shadow 140ms ease}:where(button,a,input,textarea,select):focus-visible{outline:2px solid #a78bfa;outline-offset:2px}
.peaklearn-shell{--ti-violet:var(--pk-violet);--ti-orange:var(--pk-orange);--ti-ink:var(--pk-ink);--ti-muted:var(--pk-muted);--ti-line:var(--pk-line);--ti-panel:var(--pk-panel);background:#fff;color:var(--pk-ink)}
.peaklearn-global-nav{width:220px;padding:18px 12px;border-right:1px solid var(--pk-line);background:#f8f8fa;scrollbar-color:#d4d4dc transparent;scrollbar-width:thin}.peaklearn-logo{min-height:38px;padding:0 7px 20px;gap:9px}.peaklearn-logo>span{width:27px;height:27px;border-radius:8px;background:var(--pk-orange)}.peaklearn-logo>span .icon{width:17px;height:17px}.peaklearn-logo strong{color:var(--pk-ink);font-size:20px;font-weight:780;letter-spacing:-.85px}.peaklearn-logo>button{width:28px;height:28px;color:#8b8b94}.peaklearn-logo>button:hover{background:#ededf1;color:var(--pk-ink)}
.peaklearn-nav-section{padding:16px 0 13px}.peaklearn-nav-section>div{min-height:28px;padding:0 9px;color:#8b8b94;font-size:10px;letter-spacing:.85px}.peaklearn-nav-section nav{gap:3px;margin-top:6px}.peaklearn-course-item,.peaklearn-library-nav button{min-height:39px;padding:8px 9px;border-radius:8px;color:#52525b;font-size:13px}.peaklearn-course-item:hover,.peaklearn-library-nav button:hover{background:#eeeef2;color:var(--pk-ink)}.peaklearn-course-item.is-active{background:#ede9fe;color:#4c1d95;font-weight:720}.peaklearn-course-item.is-active:before{left:-2px;width:3px;height:20px;background:var(--pk-orange)}.peaklearn-course-color{width:4px;height:16px;flex-basis:4px}.peaklearn-library-nav{gap:3px;padding-top:8px;border-top-color:var(--pk-line)}
.peaklearn-course-page,.peaklearn-editor-page{margin-left:220px;background:#fff}.peaklearn-course-inner,.peaklearn-editor-inner{width:min(1480px,calc(100% - 36px));margin:0;padding:25px 0 64px 30px}.peaklearn-course-header,.peaklearn-editor-header{min-height:70px;padding-bottom:18px;border-bottom:1px solid var(--pk-line)}.peaklearn-course-header>p,.peaklearn-editor-heading>p{color:#8b8b94;font-size:10px;font-weight:750;letter-spacing:1.05px}.peaklearn-course-title-row h1,.peaklearn-editor-heading h1{color:var(--pk-ink);font-size:30px;font-weight:760;letter-spacing:-.85px}
.peaklearn-shell .button{min-height:36px;padding:7px 12px;border-radius:8px;font-size:12px;font-weight:680}.peaklearn-shell .button.primary{border-color:var(--pk-violet);background:var(--pk-violet);color:#fff}.peaklearn-shell .button.primary:hover{border-color:var(--pk-violet-strong);background:var(--pk-violet-strong)}.peaklearn-shell .button.secondary{border-color:var(--pk-line-strong);background:#fff;color:#52525b}.peaklearn-shell .button.secondary:hover{border-color:#c4b5fd;background:var(--pk-violet-soft);color:#5b21b6}.peaklearn-shell .icon-button{border-radius:7px;color:var(--pk-muted)}.peaklearn-shell .icon-button:hover{background:#eeeef2;color:var(--pk-ink)}
/* interface-unification-part-1 */
.peaklearn-tabs{gap:25px;margin-top:20px}.peaklearn-tab{min-height:39px;color:var(--pk-muted);font-size:13px}.peaklearn-tab.is-active{color:var(--pk-violet)}.peaklearn-course-layout{grid-template-columns:244px minmax(0,1fr);gap:30px;padding-top:28px}.peaklearn-folder-panel,.peaklearn-editor-page .document-outline{padding:12px;border:1px solid var(--pk-line);border-radius:10px;background:#fafafd;box-shadow:none}.peaklearn-panel-label,.peaklearn-editor-page .document-outline>span{color:#8b8b94;font-size:10px;font-weight:760;letter-spacing:.85px}.peaklearn-folder-item,.peaklearn-editor-page .outline-item{min-height:39px;border-radius:7px;color:#52525b;font-size:13px}.peaklearn-folder-item:hover,.peaklearn-editor-page .outline-item:hover,.peaklearn-editor-page .outline-item:focus-visible{background:#f0edf9;color:#5b21b6}.peaklearn-folder-item.is-active{background:#ede9fe;color:#5b21b6}
.peaklearn-material-header{min-height:40px}.peaklearn-material-header h2{color:var(--pk-ink);font-size:21px;font-weight:740}.peaklearn-search{height:36px;border-radius:8px}.peaklearn-search:focus-within{width:190px;border-color:#c4b5fd;box-shadow:0 0 0 3px #ede9fe}.peaklearn-ai-bar{min-height:42px;margin:18px 0 15px;padding:4px;border-color:#c4b5fd;border-radius:10px;background:#fdfcff}.peaklearn-ai-bar button{min-height:30px;padding:5px 9px;border-radius:7px;font-size:11px}.peaklearn-ai-bar button:hover{background:#f0edff}.peaklearn-material-list{border-top-color:var(--pk-line)}.peaklearn-material-row{min-height:68px;gap:8px;border-bottom-color:var(--pk-line)}.peaklearn-material-row:hover{background:#fafafd}.peaklearn-material-open{gap:14px;padding:10px 4px 10px 0}.peaklearn-material-icon{width:36px;height:36px;flex-basis:36px;border-color:#fed7aa;border-radius:8px;background:#fff7ed;color:var(--pk-orange)}.peaklearn-material-copy strong{color:var(--pk-ink);font-size:14px;font-weight:680}.peaklearn-material-copy small{color:var(--pk-muted);font-size:11px}.peaklearn-material-copy em,.peaklearn-student-status{color:var(--pk-violet)}
.peaklearn-editor-header{align-items:flex-end}.peaklearn-editor-actions{padding-right:52px}.peaklearn-editor-back{min-height:34px;padding:6px 9px;border:1px solid var(--pk-line);border-radius:8px;color:#52525b}.peaklearn-editor-back:hover{border-color:#c4b5fd;background:var(--pk-violet-soft);color:#5b21b6}.peaklearn-editor-page .save-status{color:var(--pk-muted);font-size:11px}.peaklearn-editor-page .editor-main{margin-top:20px}.peaklearn-editor-page .editor-view-toolbar{top:12px;min-height:54px;margin-bottom:20px;padding:8px 10px 8px 15px;border:1px solid var(--pk-line);border-radius:10px;background:#fffffff5;box-shadow:0 5px 20px #18181b0e;backdrop-filter:blur(12px)}.peaklearn-editor-page .editor-context strong{color:var(--pk-ink);font-size:14px}.peaklearn-editor-page .editor-context span{color:var(--pk-muted);font-size:11px}
.peaklearn-editor-page .view-switch{gap:2px;padding:3px;border:1px solid var(--pk-line);border-radius:8px;background:#f4f4f6}.peaklearn-editor-page .view-switch button{min-height:31px;padding:5px 12px;border-radius:6px;color:#62626c;font-size:12px}.peaklearn-editor-page .view-switch button:hover{background:#fff;color:#5b21b6}.peaklearn-editor-page .view-switch button.active,.peaklearn-editor-page .view-switch button[aria-pressed=true]{background:#fff;color:#5b21b6;box-shadow:0 1px 4px #18181b1f}.peaklearn-editor-page .json-file-actions .button.quiet{min-height:34px;padding:6px 10px;border:1px solid #ddd6fe;border-radius:7px;color:#6d28d9}
/* interface-unification-part-2 */
.peaklearn-editor-page .mode-document>.editor-layout{grid-template-columns:224px minmax(0,1fr);gap:28px}.peaklearn-editor-page .document-outline{top:86px;max-height:calc(100dvh - 108px)}.peaklearn-editor-page .document-outline nav{gap:3px}.peaklearn-editor-page .outline-item{padding:8px}.peaklearn-editor-page .outline-item>span{color:#8b5cf6;font-variant-numeric:tabular-nums}.peaklearn-editor-page .document-pane{min-width:0}.peaklearn-editor-page .paper{width:100%;min-height:720px;padding:42px clamp(42px,5vw,76px) 38px;border:1px solid var(--pk-line);border-radius:12px;background:#fff;box-shadow:0 4px 18px #18181b09}.peaklearn-editor-page .document-heading{margin-bottom:10px;padding:0 4px 24px;border-bottom-color:var(--pk-line)}.peaklearn-editor-page .document-label{margin-bottom:12px;color:#8b8b94;font-size:9px;font-weight:760;letter-spacing:1.35px}.peaklearn-editor-page .document-heading textarea{color:#09090b;font-size:clamp(32px,3vw,43px);font-weight:790;line-height:1.18;letter-spacing:-1.15px}.peaklearn-editor-page .document-heading textarea::placeholder{color:#b7b7c0}
.peaklearn-editor-page .block{padding:9px 11px;border-radius:9px}.peaklearn-editor-page .block:hover{border-color:#e4e4e7;background:#fdfdfe}.peaklearn-editor-page .block.selected,.peaklearn-editor-page .block.selected:focus-within{border-color:#c4b5fd;background:#faf9ff;box-shadow:0 0 0 2px #f0edff}.peaklearn-editor-page .block-input{color:#18181b;font-size:16px;line-height:1.72}.peaklearn-editor-page .heading-line{align-items:baseline}.peaklearn-editor-page .heading-input,.peaklearn-editor-page .heading-line .heading-number{color:#09090b;font-weight:760}.peaklearn-editor-page .heading-level-button{border-color:var(--pk-line);background:#fff;color:var(--pk-muted)}.peaklearn-editor-page .heading-level-button:hover,.peaklearn-editor-page .heading-level-button.is-active{border-color:#c4b5fd;background:var(--pk-violet-soft);color:#5b21b6}.peaklearn-editor-page .drag-handle{color:#a1a1aa}.peaklearn-editor-page .drag-handle:hover{background:var(--pk-violet-soft);color:var(--pk-violet)}.peaklearn-editor-page .block-tools{padding:3px;border-color:var(--pk-line);border-radius:8px;background:#fff;box-shadow:0 6px 18px #18181b17}.peaklearn-editor-page .insert-gap{height:22px}.peaklearn-editor-page .insert-plus{border-color:#d8ccff;color:var(--pk-violet)}.peaklearn-editor-page .insert-gap:hover:before{background:#c4b5fd}
.peaklearn-editor-page .insert-menu,.peaklearn-editor-page .more-block-menu,.peaklearn-editor-page .text-color-palette,.peaklearn-editor-page .callout-icon-palette{border-color:var(--pk-line);background:#fff;box-shadow:0 12px 34px #18181b24}.peaklearn-editor-page .text-format-toolbar{border-color:var(--pk-line);background:#fff;box-shadow:0 5px 16px #18181b17}.peaklearn-editor-page .text-format-toolbar button:hover{background:var(--pk-violet-soft);color:#5b21b6}
.peaklearn-editor-page .question-block,.peaklearn-editor-page .media-editor,.peaklearn-editor-page .file-editor,.peaklearn-editor-page .formula-editor,.peaklearn-editor-page .table-editor{border:1px solid var(--pk-line);border-radius:10px;background:#fafafd}.peaklearn-editor-page .question-block{padding:16px}.peaklearn-editor-page .question-topline>span,.peaklearn-editor-page .media-editor-label,.peaklearn-editor-page .file-editor-label,.peaklearn-editor-page .formula-editor-label,.peaklearn-editor-page .table-editor-top>span{color:var(--pk-violet);font-weight:760}.peaklearn-editor-page .question-input{color:var(--pk-ink)}.peaklearn-editor-page .choice-option>input:not([type=radio]):not([type=checkbox]),.peaklearn-editor-page .solution-details textarea,.peaklearn-editor-page .media-editor input,.peaklearn-editor-page .formula-input,.peaklearn-editor-page .table-cell-input{border-color:var(--pk-line-strong);background:#fff;color:var(--pk-ink)}.peaklearn-editor-page input[type=radio],.peaklearn-editor-page input[type=checkbox]{accent-color:var(--pk-violet)}.peaklearn-editor-page .answer-placeholder{border-color:#ddd6fe;background:#fff;color:#8b8b94}.peaklearn-editor-page .callout-editor{border-color:#f2d585;border-radius:10px;background:#fff8d9}
/* interface-unification-part-3 */
.peaklearn-editor-page .code-editor{overflow:hidden;border:1px solid #303039;border-radius:10px;background:#18181b}.peaklearn-editor-page .code-editor-top{border-bottom-color:#303039;color:#d4d4d8}.peaklearn-editor-page .code-input{color:#f4f4f5;background:#18181b}.peaklearn-editor-page .image-placeholder{border-color:#d8ccff;background:#faf9ff;color:#6d28d9}.peaklearn-editor-page .image-placeholder:hover{background:#f4f1ff}.peaklearn-editor-page .image-resize-handle{background:var(--pk-violet)}
.peaklearn-editor-page .add-block-footer{margin:16px -12px -8px;padding:18px 12px 10px;border-top:1px solid var(--pk-line);background:#fafafd;border-radius:0 0 9px 9px}.peaklearn-editor-page .add-block-footer>span{color:#62626c;font-size:11px;font-weight:700}.peaklearn-editor-page .block-type-buttons{gap:7px}.peaklearn-editor-page .type-button{min-height:36px;padding:7px 11px;border-color:var(--pk-line);border-radius:7px;background:#fff;color:#52525b}.peaklearn-editor-page .type-button>.icon{color:var(--pk-violet)}.peaklearn-editor-page .type-button:hover{border-color:#c4b5fd;background:var(--pk-violet-soft);color:#5b21b6}.peaklearn-editor-page .editor-bottom-note{padding:13px 4px;color:#8b8b94}
.peaklearn-editor-shell~.version-floating{top:22px;right:20px;width:40px;height:40px;border:1px solid #ddd6fe;border-radius:10px;background:#fff;color:var(--pk-violet);box-shadow:0 5px 18px #18181b17}.peaklearn-editor-shell~.version-floating:hover{border-color:#c4b5fd;background:var(--pk-violet-soft);color:#5b21b6}.peaklearn-editor-page .inline-preview-pane{min-height:720px;padding:clamp(24px,3vw,46px);border:1px solid var(--pk-line);border-radius:12px;background:#f5f5f7}.peaklearn-editor-page .inline-preview-toolbar,.peaklearn-editor-page .inline-preview-paper{width:min(100%,1120px)}.peaklearn-editor-page .inline-preview-paper{border-color:#dfdfe5;border-radius:12px;box-shadow:0 8px 30px #18181b0f}.peaklearn-editor-page .inline-preview-title{border-bottom-color:#18181b}.peaklearn-editor-page .inline-preview-paper,.peaklearn-editor-page .inline-preview-paper .document-text,.peaklearn-editor-page .inline-preview-paper .student-heading{color:#111}
dialog:not(.presentation-dialog){border:1px solid var(--pk-line);border-radius:14px;color:var(--pk-ink);background:#fff;box-shadow:0 24px 80px #18181b3d}dialog:not(.presentation-dialog)::backdrop{background:#18181b7a;backdrop-filter:blur(3px)}dialog:not(.presentation-dialog) .dialog-header{padding:20px 22px;border-bottom:1px solid var(--pk-line);background:#fffffff9}dialog:not(.presentation-dialog) .dialog-header h2{color:var(--pk-ink);font-size:20px;font-weight:760;letter-spacing:-.4px}dialog:not(.presentation-dialog) .dialog-content{padding:22px}dialog:not(.presentation-dialog) .dialog-content>p{color:var(--pk-muted);font-size:13px;line-height:1.65}dialog:not(.presentation-dialog) .button{min-height:36px;border-radius:8px;font-size:12px;font-weight:680}dialog:not(.presentation-dialog) .button.primary{border-color:var(--pk-violet);background:var(--pk-violet);color:#fff}dialog:not(.presentation-dialog) .button.primary:hover{background:var(--pk-violet-strong)}dialog:not(.presentation-dialog) .button.secondary{border-color:var(--pk-line-strong);background:#fff;color:#52525b}dialog:not(.presentation-dialog) .button.secondary:hover{border-color:#c4b5fd;background:var(--pk-violet-soft);color:#5b21b6}dialog:not(.presentation-dialog) :where(input,textarea,select){border-color:var(--pk-line-strong);border-radius:8px;background:#fff;color:var(--pk-ink)}dialog:not(.presentation-dialog) :where(input,textarea,select):focus{border-color:#a78bfa;box-shadow:0 0 0 3px #ede9fe}
.visibility-dialog,.course-share-dialog{border-radius:16px}.visibility-dialog .dialog-header,.course-share-dialog .dialog-header{padding:24px;border-bottom:0}.visibility-dialog .dialog-header h2,.course-share-dialog .dialog-header h2{font-size:25px}.visibility-global-card,.course-publication-card,.student-visibility-list,.course-share-student-list{border-color:var(--pk-line)}.visibility-global-card,.course-publication-card{background:#fafafd}.visibility-info-banner{border-color:#ddd6fe;background:#f5f3ff;color:#6d28d9}.visibility-info-banner p{color:#6d28d9}.visibility-switch[aria-pressed=true]{background:var(--pk-violet)}
/* interface-unification-part-4 */
.course-form,.course-folder-form,.course-student-form{display:grid;gap:15px}.course-form label,.course-folder-form label,.course-student-form label{color:#52525b;font-size:12px;font-weight:680}.course-form :where(input,textarea,select),.course-folder-form input,.course-student-form input{width:100%;margin-top:6px;padding:10px 11px}
.app-header{height:70px;padding:0 28px;border-bottom:1px solid var(--pk-line);background:#fff}.app-header .brand{color:var(--pk-ink);font-size:22px;font-weight:780}.app-header .brand>.icon{color:var(--pk-orange)}.header-section{border-left-color:var(--pk-line);color:var(--pk-muted)}.join-main,.student-material-main{background:#f7f7f9}.join-card,.student-course-card,.student-material-paper{border:1px solid var(--pk-line);border-radius:14px;background:#fff;box-shadow:0 8px 30px #18181b0e}.join-card h1,.student-course-card h1,.student-material-paper h1{color:var(--pk-ink);font-weight:780}.join-card>p,.student-course-card>p{color:var(--pk-muted)}.join-card input{border-color:var(--pk-line-strong);border-radius:8px;color:var(--pk-ink)}.join-card input:focus{border-color:#a78bfa;box-shadow:0 0 0 3px #ede9fe}.join-card .button.primary{border-color:var(--pk-violet);background:var(--pk-violet);color:#fff}.student-material-list button{border-color:var(--pk-line);border-radius:9px;background:#fff}.student-material-list button:hover{border-color:#c4b5fd;background:var(--pk-violet-soft)}.student-material-list strong{color:var(--pk-ink)}.student-content .student-question,.student-content .cloze-exercise{border-color:var(--pk-line);border-radius:10px;background:#fafafd}.student-content .student-option:hover{border-color:#c4b5fd;background:var(--pk-violet-soft)}
.library-main,.courses-main{color:var(--pk-ink)}.library-heading h1,.courses-heading h1{color:var(--pk-ink);font-weight:780}.material-card,.course-card{border-color:var(--pk-line);border-radius:11px;box-shadow:none}.material-card:hover,.course-card:hover{border-color:#d8ccff;box-shadow:0 8px 24px #18181b12}.new-material-card,.course-card-new{border-color:#c4b5fd;background:#faf9ff;color:#6d28d9}.new-material-card:hover,.course-card-new:hover{background:#f4f1ff}#toasts{right:24px;bottom:24px;z-index:100}.toast{border:0;border-radius:10px;background:#27272a;color:#fff;box-shadow:0 12px 35px #18181b3d}
@media(max-width:1100px){.peaklearn-course-layout{grid-template-columns:210px minmax(0,1fr);gap:22px}.peaklearn-editor-page .mode-document>.editor-layout{grid-template-columns:190px minmax(0,1fr);gap:20px}.peaklearn-editor-page .paper{padding-inline:38px}}
@media(max-width:900px){.peaklearn-global-nav{width:68px;padding-inline:8px}.peaklearn-course-page,.peaklearn-editor-page{margin-left:68px}.peaklearn-course-inner,.peaklearn-editor-inner{width:calc(100% - 24px);padding:20px 0 52px 20px}.peaklearn-course-layout{grid-template-columns:190px minmax(0,1fr);gap:18px}.peaklearn-editor-page .mode-document>.editor-layout{grid-template-columns:170px minmax(0,1fr);gap:16px}.peaklearn-editor-page .paper{padding-inline:30px}}
@media(max-width:720px){.peaklearn-course-inner,.peaklearn-editor-inner{width:calc(100% - 16px);padding:15px 0 44px 14px}.peaklearn-course-title-row,.peaklearn-editor-header{align-items:flex-start;flex-direction:column}.peaklearn-editor-actions{width:100%;padding-right:48px}.peaklearn-editor-page .editor-view-toolbar{top:6px;gap:7px;padding:7px}.peaklearn-editor-page .editor-context{order:3;flex-basis:100%;padding:2px 4px}.peaklearn-editor-page .mode-document>.editor-layout{display:block}.peaklearn-editor-page .document-outline{display:none}.peaklearn-editor-page .paper{min-height:600px;padding:28px 20px}.peaklearn-editor-page .document-heading textarea{font-size:30px}.peaklearn-course-layout{grid-template-columns:1fr}.peaklearn-folder-panel nav{display:flex;overflow-x:auto}.peaklearn-folder-row{flex:0 0 auto}.peaklearn-material-actions{width:100%;flex-wrap:wrap}}
/* interface-unification-part-5 */
@media(max-width:520px){.peaklearn-global-nav{width:58px;padding-inline:6px}.peaklearn-course-page,.peaklearn-editor-page{margin-left:58px}.peaklearn-course-inner,.peaklearn-editor-inner{width:calc(100% - 10px);padding-left:10px}.peaklearn-course-title-row h1,.peaklearn-editor-heading h1{font-size:25px}.peaklearn-tabs{gap:15px;overflow-x:auto}.peaklearn-tab{flex:0 0 auto;font-size:11px}.peaklearn-editor-page .view-switch button{padding-inline:8px;font-size:11px}.peaklearn-editor-page .paper{padding:24px 14px;border-radius:9px}.peaklearn-editor-page .block{padding-inline:7px}.peaklearn-editor-page .block-input{font-size:15px}.peaklearn-editor-page .add-block-footer{margin-inline:-5px;padding-inline:7px}.peaklearn-editor-page .inline-preview-pane{padding:10px}dialog:not(.presentation-dialog) .dialog-header,dialog:not(.presentation-dialog) .dialog-content{padding:17px}}
@media(prefers-reduced-motion:reduce){button,a,input,textarea,select{transition:none}}

/* interface-unification-part-6 */

/* Text blocks also carry document hierarchy; headings are formatting, not block types. */
.text-style-buttons{display:flex;align-items:center;gap:2px}
.text-format-toolbar .text-style-button{min-width:31px;padding:0 5px;color:#62626c;font-size:11px}
.text-format-toolbar .text-style-button strong{font-weight:760}
.text-format-toolbar .text-style-button.is-active{background:#ede9fe;color:#5b21b6;box-shadow:inset 0 0 0 1px #d8ccff}
.text-heading-line{display:flex;align-items:baseline;gap:10px;min-width:0}
.text-heading-line .heading-number{flex:0 0 auto;color:#09090b;font-weight:780;line-height:1.25;font-variant-numeric:tabular-nums}
.text-heading-line .text-heading-input{min-width:0;flex:1;min-height:0;color:#09090b;font-weight:780;line-height:1.25;letter-spacing:-.45px}
.text-heading-line .text-heading-input p{margin:0}
.text-style-h1 .heading-number,.text-style-h1 .text-heading-input{font-size:30px}
.text-style-h2 .heading-number,.text-style-h2 .text-heading-input{font-size:25px}
.text-style-h3 .heading-number,.text-style-h3 .text-heading-input{font-size:21px}
@media(max-width:520px){.text-format-toolbar{max-width:calc(100vw - 105px);overflow-x:auto}.text-style-h1 .heading-number,.text-style-h1 .text-heading-input{font-size:26px}.text-style-h2 .heading-number,.text-style-h2 .text-heading-input{font-size:22px}.text-style-h3 .heading-number,.text-style-h3 .text-heading-input{font-size:19px}}

/* Die Vorschau ist eine eigene, weisse Vollbildseite im App-Fenster. */
body:has(.is-preview-workspace){overflow-y:auto;background:#fff}
.is-preview-workspace .peaklearn-global-nav,
.is-preview-workspace .peaklearn-editor-header{display:none}
.is-preview-workspace~.version-floating{display:none}
.is-preview-workspace .peaklearn-editor-page{min-height:100dvh;margin-left:0;background:#fff}
.is-preview-workspace .peaklearn-editor-inner{width:100%;max-width:none;margin:0;padding:0}
.is-preview-workspace .editor-main.mode-preview{width:100%;max-width:none;min-height:100dvh;margin:0;padding:0;background:#fff}
.is-preview-workspace .editor-view-toolbar{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:1fr auto 1fr;min-height:58px;margin:0;padding:8px clamp(18px,3vw,42px);border:0;border-bottom:1px solid var(--pk-line);border-radius:0;background:rgba(255,255,255,.97);box-shadow:none;backdrop-filter:blur(10px)}
.is-preview-workspace .editor-context{min-width:0}
.is-preview-workspace .view-switch{grid-column:2;justify-self:center}
.is-preview-workspace .json-file-actions{display:none}
.is-preview-workspace .editor-layout{display:block}
.is-preview-workspace .inline-preview-pane{min-height:calc(100dvh - 58px);padding:36px clamp(24px,6vw,96px) 80px;border:0;border-radius:0;background:#fff}
.is-preview-workspace .inline-preview-toolbar,
.is-preview-workspace .inline-preview-paper{width:min(100%,1180px)}
.is-preview-workspace .inline-preview-toolbar{margin:0 auto 24px}
.is-preview-workspace .inline-preview-paper{min-height:0;margin:0 auto;padding:clamp(32px,5vw,72px) clamp(24px,7vw,96px);border:0;border-radius:0;background:#fff;box-shadow:none}
.is-preview-workspace .inline-preview-paper .student-block{margin:4px 0;padding:4px 0}
.is-preview-workspace .editor-bottom-note{display:none}

@media(max-width:720px){
  .is-preview-workspace .editor-view-toolbar{padding:7px 10px}
  .is-preview-workspace .editor-context{display:none}
  .is-preview-workspace .inline-preview-pane{padding:22px 14px 56px}
  .is-preview-workspace .inline-preview-toolbar{padding:0 6px}
  .is-preview-workspace .inline-preview-paper{padding:28px 10px}
}

/* Die Präsentation ersetzt die App-Ansicht vollständig und verwendet kein Overlay. */
body:has(.presentation-page){overflow:hidden;background:#fff}
.presentation-page{width:100%;height:100dvh;min-height:100dvh;overflow:hidden;color:#111;background:#fff}
.presentation-page .presentation-shell,
.presentation-page .presentation-shell:fullscreen{display:flex;width:100%;max-width:none;height:100dvh;max-height:none;flex-direction:column;overflow:hidden;border:0;border-radius:0;background:#fff;box-shadow:none}
.presentation-page .presentation-meta{display:flex;width:100%;max-width:none;min-height:64px;margin:0;padding:10px clamp(18px,3vw,42px);align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--pk-line);background:#fff;color:var(--pk-muted)}
.presentation-title{display:flex;min-width:0;align-items:center;gap:14px}
.presentation-title strong{overflow:hidden;color:#18181b;font-size:14px;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
.presentation-title span{flex:0 0 auto;color:#71717a;font-size:11px}
.presentation-page-actions{display:flex;flex:0 0 auto;align-items:center;gap:7px}
.presentation-page .presentation-meta .button{min-height:34px;padding:6px 11px;border:1px solid var(--pk-line);border-radius:7px;background:#fff;color:#52525b;font-size:11px}
.presentation-page .presentation-meta .button:hover{border-color:#c4b5fd;background:var(--pk-violet-soft);color:#5b21b6}
.presentation-page .presentation-stage{display:block;width:100%;min-height:0;flex:1;overflow-y:auto;padding:0 clamp(24px,5vw,72px);background:#fff;scroll-padding-top:20px;scrollbar-gutter:stable}
.presentation-outline{position:absolute;z-index:3;top:82px;left:18px;width:190px;max-height:calc(100dvh - 170px);overflow:auto;padding:10px 8px;border:1px solid #e4e4e7;border-radius:9px;background:#fff;box-shadow:0 6px 20px #18181b0d}.presentation-outline>strong{display:block;padding:3px 7px 7px;color:#a1a1aa;font-size:9px;letter-spacing:1px}.presentation-outline nav{display:grid;gap:2px}.presentation-outline-item{display:flex;min-width:0;padding:7px;border:0;border-radius:6px;align-items:baseline;gap:6px;text-align:left;color:#52525b;background:transparent;font:11px/1.35 inherit;cursor:pointer}.presentation-outline-item:hover,.presentation-outline-item:focus-visible{background:#f0edf9;color:#5b21b6}.presentation-outline-item.is-subheading{padding-left:18px}.presentation-outline-item span{flex:0 0 auto;color:#8b5cf6;font-variant-numeric:tabular-nums}.presentation-outline-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.presentation-outline-empty{display:block;padding:7px;color:#a1a1aa;font-size:10px}
.presentation-page .presentation-stage{padding-left:clamp(230px,20vw,300px)}
.presentation-page .presentation-step{width:min(100%,1280px);min-height:0;margin:0 auto;padding:clamp(14px,2.2vh,26px) 0;border-bottom:1px solid #e8e8ed}
.presentation-page .presentation-step:last-child{border-bottom:0}
.presentation-page .presentation-controls{display:flex;width:100%;min-height:70px;padding:12px clamp(18px,3vw,42px);align-items:center;justify-content:space-between;gap:18px;border-top:1px solid var(--pk-line);background:#fff}
.presentation-page .presentation-controls>.button{min-width:108px;min-height:42px;border-radius:8px}
.presentation-page .presentation-controls>.button.primary{border-color:var(--pk-violet);background:var(--pk-violet);color:#fff}
.presentation-page .presentation-controls>.button.primary:hover{background:var(--pk-violet-strong)}
.presentation-page .presentation-hint{color:#71717a;font-size:11px}

@media(max-width:600px){
  .presentation-page .presentation-meta{min-height:56px;padding:8px 12px}
  .presentation-title{gap:8px}
  .presentation-title strong{max-width:42vw;font-size:12px}
  .presentation-title span{font-size:9px}
  .presentation-page-actions .button{min-height:32px;padding:5px 8px;font-size:10px}
  .presentation-page .presentation-stage{padding-inline:16px}
  .presentation-page .presentation-step{padding:14px 0}
  .presentation-page .presentation-controls{min-height:62px;padding:10px 12px}
  .presentation-page .presentation-controls>.button{min-width:88px;min-height:38px}
}
@media(max-width:900px){.presentation-outline{display:none}.presentation-page .presentation-stage{padding-left:16px}}
/* Shared compact interface. This replaces the accumulated per-feature overrides. */
:root{--ui-font:"Segoe UI",Inter,system-ui,sans-serif;--ui-mono:Consolas,monospace;--ui-sidebar:200px}
body{font:14px/1.5 var(--ui-font);color:#18181b}
button,input,textarea,select,.button,[contenteditable]{font-family:var(--ui-font)}
[hidden]{display:none!important}
button:disabled{cursor:default;opacity:.5}
:where(button,a,input,textarea,select,[contenteditable]):focus-visible{outline:2px solid #7c3aed;outline-offset:3px}
:where(input,textarea,select){max-width:100%;accent-color:#7c3aed}
.button,.peaklearn-shell .button,dialog:not(.presentation-dialog) .button{min-height:34px;padding:7px 11px;border-radius:7px;font:600 13px/1.35 var(--ui-font);box-shadow:none}
.button.primary{background:#7c3aed;border-color:#7c3aed;color:#fff}.button.primary:hover{background:#6d28d9}
.button.secondary{background:#fff;border-color:#d9d9e1;color:#3f3f46}
.icon-button{width:32px;height:32px;flex-shrink:0}.icon{width:17px;height:17px;flex-shrink:0}
.field-error{color:#b42318;font-size:12px}[aria-invalid=true]{border-color:#b42318!important}
h1,h2,h3,h4,strong{overflow-wrap:anywhere}

/* Course shell and lists. */
.peaklearn-global-nav{width:var(--ui-sidebar);padding:18px 10px;background:#f7f7f9}
.peaklearn-course-item,.peaklearn-library-nav button{min-height:38px;font:500 13px/1.4 var(--ui-font)}
.peaklearn-course-item span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
.peaklearn-course-page,.peaklearn-editor-page{margin-left:var(--ui-sidebar);min-width:0}
.peaklearn-course-inner,.peaklearn-editor-inner{width:100%;max-width:1660px;margin:0;padding:24px 28px 48px}
.peaklearn-course-title-row h1{font-size:26px;line-height:1.25}
.peaklearn-course-header{padding-bottom:0;min-height:0}
.peaklearn-tabs{margin-top:14px;gap:20px}.peaklearn-tab{font:600 13px/1.4 var(--ui-font);min-height:39px}
.peaklearn-course-layout{grid-template-columns:205px minmax(0,1fr);gap:24px;padding-top:22px;min-width:0}
.peaklearn-folder-panel{min-width:0;padding:10px;background:#fafafb}
.peaklearn-folder-item{font:500 12px/1.4 var(--ui-font);min-height:36px;gap:8px}
.peaklearn-folder-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.peaklearn-material-area,.peaklearn-material-copy{min-width:0}
.peaklearn-material-header{gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.peaklearn-material-header h2{font-size:18px;line-height:1.3}
.peaklearn-material-actions{gap:8px;flex-wrap:wrap;min-width:0}
.peaklearn-search,.peaklearn-search:focus-within{width:150px;height:34px;border:1px solid #e7e7ec;background:#fff}
.peaklearn-search input{width:100%;min-width:0;opacity:1;font-size:12px}
.peaklearn-material-row{min-height:64px;gap:6px}
.peaklearn-material-open{min-width:0;padding:10px 0;gap:12px}
.peaklearn-material-copy strong{font-size:14px;line-height:1.35;white-space:normal}
.peaklearn-material-copy em{font-size:10px;line-height:1.3}
.peaklearn-material-drag{display:flex;width:16px;flex-shrink:0;color:#a1a1aa;cursor:grab;opacity:0}
.peaklearn-material-row:hover .peaklearn-material-drag,.peaklearn-material-row:focus-within .peaklearn-material-drag{opacity:1}
.peaklearn-draft-status{font-size:11px;white-space:nowrap;color:#71717a}
.peaklearn-material-row.is-material-dragging{opacity:.4}
.peaklearn-material-row.is-material-row-drop-target{background:#f5f3ff;box-shadow:inset 0 2px #7c3aed}
.peaklearn-folder-item.is-material-drop-target{background:#ede9fe;color:#5b21b6;outline:2px solid #7c3aed}
.peaklearn-shell.is-collapsed{--ui-sidebar:64px}
.peaklearn-shell.is-collapsed .peaklearn-logo strong,.peaklearn-shell.is-collapsed .peaklearn-nav-section>div>span,.peaklearn-shell.is-collapsed .peaklearn-course-item>span:last-child,.peaklearn-shell.is-collapsed .peaklearn-library-nav span{display:none}
.peaklearn-shell.is-collapsed .peaklearn-logo{flex-wrap:wrap;justify-content:center;padding-inline:0}
.peaklearn-shell.is-collapsed .peaklearn-logo>button{display:flex}

/* Editor and contextual tools. */
.peaklearn-editor-header{min-height:0;align-items:center;gap:20px;padding-bottom:16px}
.peaklearn-editor-heading{min-width:0;flex:1}.peaklearn-editor-heading h1{font-size:20px;line-height:1.35}
.peaklearn-editor-actions{gap:10px;padding-right:38px;flex-wrap:wrap}
.peaklearn-editor-page .editor-main{width:100%;max-width:none;margin:16px 0 0}
.peaklearn-editor-page .editor-view-toolbar{min-height:48px;top:8px;padding:6px 10px;margin-bottom:18px;box-shadow:0 2px 10px #18181b06;border-radius:8px;gap:12px}
.peaklearn-editor-page .editor-context strong{font-size:12px}
.peaklearn-editor-page .mode-document>.editor-layout{display:grid;grid-template-columns:170px minmax(0,1fr);gap:18px;align-items:start}
.peaklearn-editor-page .document-outline{display:block;position:sticky;top:74px;padding:10px 8px;border:0;border-right:1px solid #e7e7ec;background:#fff;border-radius:0;max-height:calc(100dvh - 96px)}
.peaklearn-editor-page .outline-item{font:500 12px/1.45 var(--ui-font);min-height:32px;white-space:normal;align-items:baseline;padding:6px;gap:6px;text-align:left;overflow-wrap:anywhere}
.peaklearn-editor-page .outline-item>span{flex-shrink:0}
.peaklearn-editor-page .paper{width:100%;min-height:calc(100dvh - 200px);padding:24px 36px 20px;box-shadow:none;border-radius:9px}
.peaklearn-editor-page .document-heading{padding:0 2px 14px;margin-bottom:8px}
.peaklearn-editor-page .document-label{font-size:9px;margin-bottom:8px;color:#71717a}
.peaklearn-editor-page .document-heading textarea{font:700 30px/1.25 var(--ui-font);letter-spacing:-.6px;padding:0}
.peaklearn-editor-page .block{padding:6px 8px;border-radius:7px;scroll-margin-top:90px}
.peaklearn-editor-page .block-input,.peaklearn-editor-page .rich-text-editor{font-size:14px;line-height:1.55;font-weight:400;min-height:24px}
.rich-text-editor.formatted-text p{margin:0 0 6px}
.peaklearn-editor-page .text-heading-line{display:flex;align-items:baseline;gap:8px}
.peaklearn-editor-page .text-heading-line .heading-number,.peaklearn-editor-page .text-heading-line .text-heading-input{font:700 var(--heading-size,24px)/1.3 var(--ui-font);letter-spacing:-.3px}
.peaklearn-editor-page .text-heading-line .text-heading-input :where(p,span){font-size:inherit;line-height:inherit}
.text-style-h1{--heading-size:24px}.text-style-h2{--heading-size:20px}.text-style-h3{--heading-size:17px}
.peaklearn-editor-page .insert-gap{height:12px}
.peaklearn-editor-page .paste-block-button{position:relative;z-index:1;display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid #c4b5fd;border-radius:999px;background:#faf9ff;color:#6d28d9;font-size:10px;line-height:1.2}
.peaklearn-editor-page .paste-block-button:hover{background:#f0edff}
.peaklearn-editor-page .paste-block-button .icon{width:13px;height:13px}
.peaklearn-editor-page .insert-plus{width:22px;height:22px;opacity:0}
.peaklearn-editor-page .insert-gap:hover .insert-plus,.peaklearn-editor-page .insert-gap:focus-within .insert-plus,.peaklearn-editor-page .last-gap .insert-plus{opacity:1}
.peaklearn-editor-page .block.selected{background:#faf8ff;border-color:#d8ccff;box-shadow:none}
.peaklearn-editor-page .block-tools{padding:2px;top:-27px;right:4px}
.peaklearn-editor-page .block-tools .icon-button{width:27px;height:27px}
.peaklearn-editor-page .text-format-toolbar{max-width:calc(100vw - 50px);flex-wrap:wrap;gap:2px;padding:3px}
.peaklearn-editor-page .question-block,.peaklearn-editor-page .media-editor,.peaklearn-editor-page .formula-editor,.peaklearn-editor-page .table-editor,.peaklearn-editor-page .file-editor{padding:12px;border-radius:8px;background:#fafafb;box-shadow:none}
.question-topline{margin-bottom:8px}.question-topline select{font-size:12px;min-height:30px}
.peaklearn-editor-page .question-input{font-size:15px;font-weight:600;line-height:1.45}
.peaklearn-editor-page .choice-option>input:not([type=radio]):not([type=checkbox]){padding:7px 9px;font-size:13px}
.peaklearn-editor-page .callout-editor{padding:10px 12px;gap:10px;border-radius:8px;background:#fffbeb;border-color:#f5d98b}
.peaklearn-editor-page .add-block-footer{padding:12px 8px 4px;margin:12px -8px -4px;background:#fff}
.peaklearn-editor-page .type-button{padding:6px 9px;font-size:12px;min-height:33px}
.peaklearn-editor-shell~.version-floating{width:34px;height:34px;right:22px;top:24px;box-shadow:none;border-radius:8px}

/* Single light code surface, exactly aligned editing overlays. */
.peaklearn-editor-page .code-editor,.student-code,.student-code-exercise{border:1px solid #dedee5;border-radius:8px;background:#f6f7f9;color:#27272a;box-shadow:none;overflow:hidden}
.peaklearn-editor-page .code-editor-top{padding:8px 12px;background:#f0f1f4;color:#52525b;border-bottom:1px solid #dedee5;font-size:11px}
.code-editor-top select{padding:3px 7px;font-size:12px;background:#fff;color:#27272a}
.peaklearn-editor-page .code-editor-input,.student-code-editor{position:relative;min-height:150px;background:#f6f7f9;overflow:hidden}
.peaklearn-editor-page .code-editor-highlight,.peaklearn-editor-page .code-editor-input .code-input,.student-code-highlight,.student-code-input{box-sizing:border-box;width:100%;min-height:150px;margin:0;padding:12px 14px;border:0;border-radius:0;font:13px/1.6 var(--ui-mono);font-variant-ligatures:none;letter-spacing:normal;tab-size:4;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;color:#27272a;background:transparent}
.peaklearn-editor-page .code-editor-highlight,.student-code-highlight{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.peaklearn-editor-page .code-editor-highlight code,.student-code-highlight code{font:inherit;white-space:inherit;color:inherit}
.peaklearn-editor-page .code-editor-input .code-input,.student-code-input{display:block;position:relative;z-index:1;height:150px;max-height:480px;resize:none;color:transparent!important;background:transparent!important;caret-color:#18181b;outline:none}
.code-input::selection,.student-code-input::selection{background:#c4b5fd80;color:transparent}
.code-editor-input:focus-within,.student-code-editor:focus-within{box-shadow:inset 0 0 0 2px #c4b5fd}
:where(.code-editor,.student-code,.student-code-exercise) .code-keyword{color:#6d28d9}
:where(.code-editor,.student-code,.student-code-exercise) .code-property{color:#075e92}
:where(.code-editor,.student-code,.student-code-exercise) .code-string{color:#087443}
:where(.code-editor,.student-code,.student-code-exercise) .code-comment{color:#626873;font-style:italic}
:where(.code-editor,.student-code,.student-code-exercise) .code-number{color:#b54708}
:where(.code-editor,.student-code,.student-code-exercise) .code-directive,:where(.code-editor,.student-code,.student-code-exercise) .code-tag{color:#075e92}
.peaklearn-editor-page .code-execute-toggle{display:flex;align-items:center;gap:7px;margin:0;padding:9px 12px;font-size:12px;color:#52525b}
.peaklearn-editor-page .code-stdin-label{display:block;margin:8px 12px;color:#52525b;font-size:12px}
.peaklearn-editor-page .code-stdin,.peaklearn-editor-page .code-solution,.peaklearn-editor-page .code-tests,.student-code-stdin{display:block;width:100%;min-height:60px;padding:10px;margin-top:6px;border:1px solid #d4d4dc;border-radius:6px;background:#fff;color:#27272a;font:13px/1.5 var(--ui-mono)}
.code-solution-disclosure,.student-code-stdin-disclosure{margin:0 12px 10px;border:1px solid #e7e7ec;border-radius:6px;background:#fff}
.code-solution-disclosure summary,.student-code-stdin-disclosure summary{padding:8px 10px;cursor:pointer;color:#52525b;font-size:12px}
.code-solution-disclosure p,.code-execute-note{padding:0 12px;font-size:11px;color:#71717a}
.student-code-stdin{width:calc(100% - 20px);margin:0 10px 10px}
.student-code-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:0 12px 12px}
.student-code-status{font-size:12px;color:#52525b}
.student-code-output{padding:12px;margin:0;border-top:1px solid #e7e7ec;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.5 var(--ui-mono);background:#fff;color:#27272a}
.student-code-output.is-error{background:#fff5f5;color:#b42318}.student-code-output.is-success{background:#f0fdf4;color:#166534}
.student-code pre{margin:0;padding:12px 14px;background:#f6f7f9;color:#27272a;font:13px/1.6 var(--ui-mono);max-height:480px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.student-code code{font:inherit;color:inherit}.student-code .code-language{padding:6px 12px;background:#f0f1f4;color:#52525b;font:600 11px/1.4 var(--ui-font)}

/* Independently sized image slots. */
.peaklearn-editor-page .image-editor-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--image-gap,16px);align-items:start}
.peaklearn-editor-page .has-side-image .image-editor-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.peaklearn-editor-page .image-editor .image-block{position:relative;width:var(--figure-width,100%);max-width:100%;min-width:0;margin:0;justify-self:center}
.image-editor[data-align=left] .image-block{justify-self:start}.image-editor[data-align=right] .image-block{justify-self:end}
.image-frame{position:relative;width:100%;line-height:0}.image-frame img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;border-radius:6px}
.peaklearn-editor-page .image-resize-handle{display:block;position:absolute;right:-4px;bottom:-4px;width:22px;height:22px;border:3px solid #fff;border-radius:6px;background:#7c3aed;cursor:nwse-resize;touch-action:none;user-select:none;opacity:1;z-index:3;box-shadow:0 1px 4px #18181b35}
body.is-resizing-image,body.is-resizing-image *{cursor:nwse-resize!important;user-select:none!important}
.peaklearn-editor-page .image-controls{top:6px;left:6px;right:6px;bottom:auto;gap:4px;flex-wrap:wrap}
.peaklearn-editor-page .image-replace{min-height:26px;padding:4px 6px;font-size:10px;background:#fff;color:#3f3f46}
.peaklearn-editor-page .image-side-placeholder{position:static;grid-column:1/-1;width:auto;max-width:100%;min-height:30px;justify-self:center;display:flex;align-items:center;gap:6px;margin:4px 0 0;padding:5px 9px;border:1px dashed #d4d4dc;border-radius:6px;background:#fafafb;color:#71717a;font-size:11px;opacity:1}
.image-side-placeholder strong{font-size:11px}.image-side-placeholder span{display:none}
.peaklearn-editor-page .caption-input{width:100%;padding:5px 2px;font-size:12px;text-align:center;border:0;background:transparent;color:#52525b}
.image-align-control,.image-gap-control{display:inline-flex;align-items:center;gap:7px;margin:8px 12px 0 0;color:#71717a;font-size:11px}
.image-align-control select{padding:3px 5px;font-size:11px;border:1px solid #e4e4e7;border-radius:5px;background:#fff}
.image-gap-control input{width:90px}.image-gap-control output{min-width:32px}
.student-image-single{width:100%;margin:0}.student-image-single .student-image-figure{width:var(--figure-width,100%);max-width:100%;margin:0 auto}
.student-image-single[data-align=left] .student-image-figure{margin-left:0}.student-image-single[data-align=right] .student-image-figure{margin-right:0}
.student-image-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:var(--image-gap,16px);width:100%;margin:0}
.student-image-pair .student-image-figure{width:var(--figure-width,100%);max-width:100%;margin:0;justify-self:center}
.student-image-pair[data-align=left] .student-image-figure{justify-self:start}.student-image-pair[data-align=right] .student-image-figure{justify-self:end}
.student-image-figure img{display:block;width:100%;height:auto;max-height:none;border-radius:6px}
.student-image-figure figcaption{font-size:12px;line-height:1.4;margin-top:6px;color:#71717a;text-align:center}

/* Shared reading rhythm for actual student-block roots, including presentation. */
.student-content,.presentation-stage{font-size:15px;line-height:1.6;color:#18181b}
.student-content>.student-block{margin:0;padding:8px 0}
.student-block .document-text{font-size:15px;line-height:1.6;font-weight:400}
.student-block .document-text p{margin:0 0 8px}.student-block .document-text p:last-child{margin-bottom:0}
.student-block .student-heading{font:700 26px/1.3 var(--ui-font);letter-spacing:-.4px;margin:8px 0 3px;padding:0;border:0}
.student-block h3.student-heading{font-size:21px}.student-block h4.student-heading{font-size:17px}
.student-block .student-callout{margin:0;display:flex;align-items:flex-start;gap:12px;padding:12px 14px;background:#fffbeb;border:1px solid #f5d98b;border-radius:8px}
.student-block .student-callout-icon{width:28px;height:28px;flex:0 0 28px}.student-block .student-callout-icon svg{width:20px;height:20px}
.student-block .student-question{margin:0;padding:14px 16px;border:1px solid #e7e7ec;border-radius:8px;background:#fafafb}
.student-block .student-question h3{font:650 16px/1.45 var(--ui-font);margin:0 0 8px}
.student-block .activity-instruction{font:400 12px/1.5 var(--ui-font);margin:0 0 8px;color:#71717a}
.student-block .student-options{gap:6px;margin:0}
.student-block .student-option{min-height:36px;padding:8px 10px;font-size:14px;line-height:1.4;border:1px solid #e7e7ec;border-radius:6px;background:#fff}
.student-block .student-option:has(input:checked){background:#f5f3ff;border-color:#c4b5fd}
.student-block .student-option input{width:16px;height:16px;accent-color:#7c3aed}
.student-block .student-answer{font:14px/1.55 var(--ui-font);padding:10px;min-height:78px;border:1px solid #d4d4dc;background:#fff;color:#18181b}
.student-block .activity-actions{gap:8px;margin:10px 0 0;flex-wrap:wrap}
.student-block .activity-actions:empty,.student-block .activity-result:empty{display:none}
.student-block .activity-feedback{padding:8px 10px;font-size:13px;line-height:1.5;margin:10px 0 0}
.student-block .activity-solution{margin:10px 0 0;padding:10px;font-size:13px}
.student-block .cloze-word-bank{padding:8px;gap:6px;margin:6px 0}.student-block .cloze-word-card{font-size:13px;padding:5px 9px;min-height:30px}
.student-block .cloze-exercise{font-size:15px;line-height:2.3;padding:10px;background:#fff}
.student-block .cloze-drop{font-size:14px;min-width:72px;min-height:30px;padding:3px 8px}
.student-block .cloze-tap-hint{font-size:11px;margin:7px 0 0;color:#71717a}
.student-block .student-formula{padding:8px 0;margin:0;font-size:22px}
.student-block .student-table-wrap{margin:0;max-width:100%;overflow:auto}.student-block .student-table{margin:0;font-size:14px}.student-block .student-table :is(th,td){padding:8px 12px}
.student-block .student-file-card,.student-block .student-link-card{padding:12px;gap:12px;margin:0;border:1px solid #e7e7ec;border-radius:8px;background:#fafafb;font-size:14px}
.student-block .student-file-card strong,.student-block .student-link-card strong{font-size:14px}
.student-block .file-card-icon{width:34px;height:34px;font-size:24px}
.student-link-card>span:nth-child(2){min-width:0}.student-link-card small{overflow-wrap:anywhere;white-space:normal}
.student-block .student-video{margin:0;max-width:800px}.student-block .student-video h3{font-size:16px;margin:0 0 8px}

/* Full-window reading modes. */
.is-preview-workspace .peaklearn-global-nav,.is-preview-workspace .peaklearn-editor-header,.is-preview-workspace~.version-floating{display:none}
.is-preview-workspace .peaklearn-editor-page{margin:0}.is-preview-workspace .peaklearn-editor-inner{width:100%;max-width:none;padding:0}.is-preview-workspace .editor-main{margin:0}
.is-preview-workspace .editor-view-toolbar{top:0;margin:0;min-height:52px;border:0;border-bottom:1px solid #e7e7ec;border-radius:0;padding:7px 24px;box-shadow:none}
.is-preview-workspace .inline-preview-pane{min-height:calc(100dvh - 52px);padding:24px 36px 48px;border:0;background:#fff}
.is-preview-workspace .inline-preview-toolbar{display:none}
.is-preview-workspace .inline-preview-paper{width:100%;max-width:1120px;margin:0 auto;padding:0;border:0;background:#fff;box-shadow:none}
.is-preview-workspace .inline-preview-title{padding:0 0 16px;margin:0 0 10px;border-bottom:1px solid #e7e7ec}
.is-preview-workspace .inline-preview-title h1{font:700 30px/1.3 var(--ui-font);margin:5px 0 0}
.is-preview-workspace .inline-preview-title>span{font-size:10px;color:#71717a}
.presentation-page .presentation-meta{min-height:56px;padding:8px 22px}
.presentation-page .presentation-stage{padding:16px 32px 24px 238px;scroll-padding-top:16px}
.presentation-page .presentation-step{min-height:0;margin:0 auto;padding:7px 0;border:0;animation:none}
.presentation-page .presentation-step>.student-block{margin:0;padding:0}
.presentation-page .presentation-step .student-heading{margin:6px 0 2px;padding:0;font-size:26px}
.presentation-page .presentation-step h3.student-heading{font-size:21px}.presentation-page .presentation-step h4.student-heading{font-size:17px}
.presentation-page .presentation-step .student-question,.presentation-page .presentation-step .student-code-exercise,.presentation-page .presentation-step .student-callout{margin:0}
.presentation-page .presentation-controls{min-height:56px;padding:8px 22px;gap:12px}
.presentation-page .presentation-controls>.button{min-height:36px;min-width:96px;font-size:13px}
.presentation-outline{top:76px;left:20px;width:192px;padding:10px 8px;box-shadow:none;max-height:calc(100dvh - 155px)}
.presentation-outline-item{font:500 12px/1.45 var(--ui-font);white-space:normal;overflow-wrap:anywhere;min-height:32px}
.presentation-outline-item[aria-current=true]{background:#f3efff;color:#5b21b6}

/* Keep the reading area a little narrower in all three material views. */
.peaklearn-editor-page .mode-document>.editor-layout{width:90%;margin-inline:auto}
.is-preview-workspace .inline-preview-paper{width:90%}
.presentation-page .presentation-step{width:90%}

/* Reference-style reading workspace: cool, quiet background and violet active state. */
.is-preview-workspace,
.presentation-page{background:#f4f7fb;color:#111827}
.is-preview-workspace .peaklearn-editor-page,
.presentation-page .presentation-shell{background:#fff}
.is-preview-workspace .editor-view-toolbar,
.presentation-page .presentation-meta,
.presentation-page .presentation-controls{background:#fff;border-color:#e5e7eb}
.is-preview-workspace .view-switch{background:transparent;border:0;border-radius:0;gap:0}
.is-preview-workspace .view-switch>button{min-height:52px;padding:8px 30px;border-radius:0;color:#6b7280;font-weight:650}
.is-preview-workspace .view-switch>button.active{color:#7c3aed;background:#fff;box-shadow:inset 0 -2px #7c3aed}
.is-preview-workspace .inline-preview-pane{background:#f4f7fb}
.is-preview-workspace .inline-preview-paper{background:#fff;color:#111827}
.is-preview-workspace .inline-preview-title{border-color:#e5e7eb}
.is-preview-workspace .inline-preview-paper .document-text,
.is-preview-workspace .inline-preview-paper .student-heading{color:#111827}
.presentation-page .presentation-stage{background:#fff}
.presentation-page .presentation-step{border-color:#eef0f4}
.presentation-page .presentation-step .student-heading,
.presentation-page .presentation-step .document-text{color:#111827}
.presentation-page .presentation-outline-item[aria-current=true]{background:#f3e8ff;color:#6d28d9}
.peaklearn-editor-page{background:#f4f7fb}
.peaklearn-editor-page .paper{background:#fff;border-color:#e5e7eb;box-shadow:0 8px 24px #1f29370d}

/* Tables follow the reference: flat grid, light header row, restrained spacing. */
.student-table-wrap{border:1px solid #d9dce1;border-radius:0;background:#fff}
.student-table{border-collapse:collapse;color:#111827;font-size:14px;line-height:1.5}
.student-table th,.student-table td{padding:8px 10px;border-right:1px solid #d9dce1;border-bottom:1px solid #d9dce1;text-align:left;vertical-align:top}
.student-table th{background:#f4f4f5;color:#111827;font-weight:700}
.student-table th:last-child,.student-table td:last-child{border-right:0}
.student-table tbody tr:last-child td{border-bottom:0}
.presentation-page .student-table{font-size:14px;line-height:1.5}
.presentation-page .student-table th,.presentation-page .student-table td{padding:8px 10px}
.student-html-block{display:block;width:100%;min-height:220px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.html-editor .html-input{width:100%;min-height:220px;padding:14px;border:1px solid #e5e7eb;border-radius:8px;background:#111827;color:#e5e7eb;font:13px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;resize:vertical}

/* Tighter heading rhythm across editor, preview and presentation. */
.peaklearn-editor-page .document-heading{padding-bottom:10px;margin-bottom:6px}
.student-content .student-heading,
.is-preview-workspace .inline-preview-paper .student-heading,
.presentation-page .presentation-step .student-heading{margin-top:10px;margin-bottom:3px}
.student-content .student-heading + .document-text,
.student-content .student-heading + .student-block,
.presentation-page .presentation-step .student-heading + .document-text{margin-top:0}
.is-preview-workspace .inline-preview-title{padding-bottom:12px;margin-bottom:8px}

/* Student pages, overview and dialogs. */
.app-header{height:60px;min-height:60px;padding:0 24px;gap:16px;box-shadow:none}
.app-header .brand{font-size:21px}.header-section{font-size:12px}
.join-main{width:100%;max-width:none;margin:0;min-height:calc(100dvh - 60px);padding:40px 20px;background:#fafafb;align-items:start;justify-items:center}.join-main:has(.join-card){align-items:center}
.join-card{width:100%;max-width:450px;padding:28px;border:1px solid #e7e7ec;border-radius:10px;box-shadow:none}
.join-card h1{font-size:26px;line-height:1.3;margin:8px 0 12px}
.join-card>p{font-size:14px;line-height:1.6}.join-card .eyebrow{font-size:10px}
.join-card label{font-size:13px}.join-card input{font-size:14px;padding:10px 12px;min-height:40px}
.join-card .button{width:100%;margin-top:12px;min-height:38px}.join-card .join-note{font-size:12px;margin-top:12px}
.returning-student{margin-top:20px;border-top:1px solid #e7e7ec;padding-top:16px}
.returning-student summary{cursor:pointer;color:#6d28d9;font-size:13px}.returning-student label{display:block;margin-top:14px}
.student-course-card{width:100%;max-width:1000px;padding:26px;border:1px solid #e7e7ec;border-radius:10px;box-shadow:none}
.student-course-card h1{font-size:28px;margin:8px 0 10px}.student-course-card>p{font-size:14px}
.student-material-list{margin-top:22px;gap:0;display:grid;border-top:1px solid #e7e7ec}
.student-material-list button{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:12px 4px;border:0;border-bottom:1px solid #e7e7ec;border-radius:0;text-align:left;background:#fff}
.student-material-list button>span:not(.peaklearn-material-icon){display:grid;gap:3px;min-width:0}
.student-material-list strong{font-size:14px;font-weight:650}.student-material-list small{font-size:12px;color:#71717a}
.student-material-main{min-height:calc(100dvh - 60px);padding:24px;background:#fafafb}
.student-material-paper{width:100%;max-width:1100px;margin:0 auto;padding:26px 36px;border-radius:10px;box-shadow:none}
.student-material-paper>h1{font:700 28px/1.3 var(--ui-font);padding:0 0 16px;margin:0 0 10px;border-bottom:1px solid #e7e7ec}
.empty-state{padding:28px 12px;text-align:center;color:#71717a;font-size:13px}
.courses-main,.library-main{width:100%;max-width:1400px;padding:24px 28px 48px;margin:0 auto}
.library-heading,.courses-heading{margin-bottom:24px;gap:16px}
.library-heading h1,.courses-heading h1{font-size:28px;line-height:1.3;margin:6px 0 8px}
.library-heading p,.courses-heading p{font-size:13px}
.material-grid,.course-grid{gap:16px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.material-cover{height:144px}.material-description{padding:14px}.material-description h2{font-size:15px}
.course-card{min-height:145px}.course-card-open{padding:22px}.course-card-open strong{font-size:19px}
dialog:not(.presentation-dialog){max-height:calc(100dvh - 40px);max-width:calc(100vw - 32px);padding:0;overflow:auto;border-radius:12px}
dialog:not(.presentation-dialog) .dialog-header{padding:16px 20px;position:sticky;top:0;z-index:4;background:#fff}
dialog:not(.presentation-dialog) .dialog-header h2{font-size:21px;line-height:1.3}
dialog:not(.presentation-dialog) .dialog-content{padding:20px}
dialog:not(.presentation-dialog) .dialog-buttons{gap:8px;margin-top:18px;flex-wrap:wrap}
.course-form,.course-folder-form,.course-student-form{gap:12px}
.course-form :where(input,textarea,select),.course-folder-form input,.course-student-form input{padding:8px 10px;font-size:13px}
.visibility-global-card,.course-publication-card{padding:12px;gap:12px}
.visibility-global-actions{gap:7px;flex-wrap:wrap}
.student-visibility-row{min-height:48px;padding:10px 12px;gap:10px}
.visibility-global-card strong,.student-visibility-row>strong{font-size:13px}
.visibility-info-banner{padding:12px;margin:16px 0}.visibility-info-banner p{font-size:12px}
.course-share-section{padding:16px 0}.course-share-section h3{font-size:16px}.course-share-section p{font-size:13px;line-height:1.55}
.student-access-code{font:12px/1.4 var(--ui-mono)}
#toasts{max-width:calc(100vw - 32px);right:16px;bottom:16px}.toast{font-size:13px;padding:12px 16px;border-radius:8px}

/* Responsive: wrapping controls and local overflow for tables. */
@media(max-width:1180px){
 .peaklearn-editor-page .mode-document>.editor-layout{grid-template-columns:145px minmax(0,1fr);gap:12px}
 .peaklearn-editor-page .paper{padding:22px 26px}
 .peaklearn-course-layout{grid-template-columns:180px minmax(0,1fr);gap:18px}
 .peaklearn-material-header h2{width:100%}
}
@media(max-width:900px){
 :root{--ui-sidebar:64px}
 .peaklearn-logo{flex-wrap:wrap;justify-content:center;padding-inline:0}
 .peaklearn-logo strong,.peaklearn-nav-section>div>span,.peaklearn-course-item>span:last-child,.peaklearn-library-nav span{display:none}
 .peaklearn-logo>button{display:flex}
 .peaklearn-course-item,.peaklearn-library-nav button{justify-content:center}
 .peaklearn-global-nav{padding-inline:8px}
 .peaklearn-course-inner,.peaklearn-editor-inner{padding:20px}
 .peaklearn-course-layout{grid-template-columns:1fr;padding-top:16px}
 .peaklearn-folder-panel nav{display:flex;flex-wrap:wrap;gap:4px;overflow:visible}
 .peaklearn-folder-panel{padding:8px;max-width:100%}
 .peaklearn-folder-row{min-width:0;max-width:100%;flex:0 1 auto}
 .peaklearn-folder-item{max-width:100%;min-width:0}
 .peaklearn-material-header h2{width:auto}
 .peaklearn-editor-page .mode-document>.editor-layout{display:block}
 .peaklearn-editor-page .document-outline{position:static;display:block;max-height:150px;margin-bottom:14px;border:1px solid #e7e7ec;border-radius:8px}
 .peaklearn-editor-page .document-outline nav{display:flex;flex-wrap:wrap}
 .peaklearn-editor-page .outline-item{max-width:100%;padding:6px 8px}
 .peaklearn-editor-header{flex-direction:column;align-items:stretch;gap:10px}
 .peaklearn-editor-actions{padding-right:0}.peaklearn-editor-heading{padding-right:32px}
 .presentation-page .presentation-stage{padding-inline:20px}.presentation-outline{display:none}
 .peaklearn-shell.is-collapsed .peaklearn-global-nav{width:220px;z-index:40;box-shadow:8px 0 30px #18181b20}
 .peaklearn-shell.is-collapsed .peaklearn-logo strong,.peaklearn-shell.is-collapsed .peaklearn-nav-section>div>span,.peaklearn-shell.is-collapsed .peaklearn-course-item>span:last-child,.peaklearn-shell.is-collapsed .peaklearn-library-nav span{display:block}
 .peaklearn-shell.is-collapsed .peaklearn-course-item,.peaklearn-shell.is-collapsed .peaklearn-library-nav button{justify-content:flex-start}
 .peaklearn-shell.is-collapsed .peaklearn-logo{flex-wrap:nowrap}
}
@media(max-width:600px){
 .peaklearn-course-inner,.peaklearn-editor-inner{padding:16px 12px 32px}
 .peaklearn-course-title-row{align-items:flex-start;gap:10px}.peaklearn-course-title-row h1{font-size:23px}
 .peaklearn-course-title-row>div{flex-wrap:wrap;gap:6px}
 .peaklearn-material-header{display:block}.peaklearn-material-actions{width:100%;margin-top:10px}
 .peaklearn-search,.peaklearn-search:focus-within{width:100%}
 .peaklearn-material-row{gap:3px;flex-wrap:wrap}.peaklearn-material-open{flex:1;min-width:130px;gap:8px}
 .peaklearn-material-copy strong{font-size:13px}.peaklearn-material-icon{width:28px;height:32px;flex-basis:28px}
 .peaklearn-material-drag,.peaklearn-draft-status{display:none}
 .peaklearn-editor-page .paper{padding:18px 18px 16px}.peaklearn-editor-page .document-heading textarea{font-size:25px}
 .peaklearn-editor-page .editor-context{display:none}
 .peaklearn-editor-page .editor-view-toolbar{gap:4px;padding:5px;flex-wrap:wrap}
 .peaklearn-editor-page .view-switch button{font-size:11px;padding:5px 8px}
 .peaklearn-editor-page .json-file-actions .button{font-size:11px;padding:5px}
 .peaklearn-editor-page .json-file-actions .icon{display:none}
 .peaklearn-editor-shell~.version-floating{right:12px;top:18px}
 .peaklearn-editor-page .block{padding:6px 3px}.text-style-h1{--heading-size:22px}.text-style-h2{--heading-size:19px}
 .question-topline{flex-wrap:wrap;gap:6px}
 .is-preview-workspace .inline-preview-pane{padding:20px 16px 40px}
 .is-preview-workspace .inline-preview-title h1{font-size:26px}
 .is-preview-workspace .editor-view-toolbar{display:flex;justify-content:center}
 .presentation-page .presentation-meta{padding:8px 12px;gap:8px}.presentation-title{display:grid;gap:2px}.presentation-title strong{max-width:42vw}
 .presentation-page .presentation-controls{padding:8px 12px}.presentation-hint{display:none}
 .presentation-page .presentation-stage{padding:12px 16px 20px}
 .app-header{height:auto;min-height:56px;padding:10px 16px;flex-wrap:wrap;gap:10px}
 .app-header .brand{font-size:19px}.app-header .header-section{font-size:11px}.app-header .header-right{margin-left:auto;gap:4px}
 .join-main{padding:20px 14px;min-height:calc(100dvh - 56px)}.join-card,.student-course-card{padding:22px 18px}
 .student-material-main{padding:0;background:#fff}.student-material-paper{padding:22px 16px;border:0;border-radius:0}.student-material-paper>h1{font-size:25px}
 .student-block .student-heading{font-size:23px}.student-block .student-question{padding:12px}
 .student-block .student-file-card,.student-block .student-link-card{gap:8px;font-size:12px}.student-link-card>span:last-child{display:none}
 .courses-main,.library-main{padding:20px 16px}.library-heading{flex-direction:column;align-items:stretch}.library-search{width:100%}.material-grid,.course-grid{grid-template-columns:1fr}
 dialog:not(.presentation-dialog){max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px)}
 dialog:not(.presentation-dialog) .dialog-header{padding:14px 16px}dialog:not(.presentation-dialog) .dialog-header h2{font-size:19px}
 dialog:not(.presentation-dialog) .dialog-content{padding:16px}
 .visibility-global-card{grid-template-columns:24px minmax(0,1fr)}.visibility-global-actions{grid-column:1/-1;justify-content:flex-end}
 .student-visibility-row{flex-wrap:wrap;display:flex}.student-visibility-actions{margin-left:auto;max-width:100%}
 .course-share-student{flex-wrap:wrap}.course-form-row{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media(forced-colors:active){.code-editor-highlight,.student-code-highlight{display:none}.peaklearn-editor-page .code-editor-input .code-input,.student-code-input{color:CanvasText!important;caret-color:CanvasText}}


/* Formatting appears only while text is selected; keyboard focus remains visible. */
.peaklearn-editor-page .block-text .text-format-toolbar{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(3px)}
.peaklearn-editor-page .block-text.show-format-toolbar .text-format-toolbar,.peaklearn-editor-page .text-format-toolbar:focus-within{opacity:1;visibility:visible;pointer-events:auto;transform:none}
.peaklearn-editor-page .image-editor[data-align=left] .image-block{justify-self:start}.peaklearn-editor-page .image-editor[data-align=right] .image-block{justify-self:end}
 .calculation-editor{display:grid;gap:10px;padding:14px;border:1px solid #ddd6fe;border-radius:10px;background:#faf9ff}.calculation-editor label{display:grid;gap:5px;color:#52525b;font-size:11px;font-weight:650}.calculation-editor .block-input{padding:8px 10px;border:1px solid var(--pk-line-strong);border-radius:7px;background:#fff;font-size:14px}.calculation-label{display:flex;align-items:center;gap:6px;color:var(--pk-violet);font-size:10px;font-weight:760;letter-spacing:.5px}.calculation-label .icon{width:15px;height:15px}.calculation-question h3{font-weight:650;letter-spacing:.2px}.calculation-answer{display:block;min-height:44px;padding:10px 12px;border:1px solid var(--pk-line-strong);border-radius:7px;background:#fff;color:var(--pk-ink)}
.matching-editor{display:grid;gap:10px;padding:14px;border:1px solid #ddd6fe;border-radius:10px;background:#faf9ff}.matching-help{color:var(--pk-muted);font-size:11px}.matching-edit-list{display:grid;gap:7px}.matching-edit-row{display:grid;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr) auto;align-items:center;gap:7px}.matching-edit-row .block-input{padding:8px 10px;border:1px solid var(--pk-line-strong);border-radius:7px;background:#fff;font-size:13px}.matching-edit-row>span{text-align:center;color:var(--pk-violet)}
