/* Shared typography and editor styles extracted from Ripasso. */
.lesson-document{font-size:17px;line-height:1.85;overflow-wrap:anywhere;min-height:280px;max-width:900px;margin:auto}
.lesson-document h1,.lesson-document h2,.lesson-document h3,.lesson-document h4{line-height:1.4;margin:1.5em 0 .6em}
.lesson-document p{margin:0 0 1em}
.lesson-document ul,.lesson-document ol{padding-left:28px}
.lesson-document blockquote{border-left:3px solid #bacbe5;padding:8px 20px;margin:18px 0;background:#f7f9fc}
.lesson-document pre{white-space:pre-wrap}
.lesson-toolbar{display:flex;gap:6px;flex-wrap:wrap;position:sticky;top:0;z-index:2;background:#f5f7fb;padding:12px;border:1px solid #dde3ec;border-radius:10px 10px 0 0;margin-top:20px}
.lesson-toolbar select{width:auto;min-width:145px}
.lesson-toolbar [data-format=bold]{font-weight:800}
.lesson-toolbar [data-format=italic]{font-style:italic}
.lesson-toolbar [data-format=underline]{text-decoration:underline}
.lesson-editor{padding:28px;min-height:440px;border:1px solid #dde3ec;border-top:0;outline:none;max-width:none;background:white}
.lesson-editor:focus{box-shadow:inset 0 0 0 2px #d5e1f5}
.lesson-editor:empty:before{content:attr(data-placeholder);color:#88919f;pointer-events:none}
.lesson-document .empty{min-height:240px}
@media(max-width:700px){.lesson-document{padding:20px;font-size:16px}
.lesson-editor{padding:18px;min-height:380px}
.lesson-toolbar{position:static}}
@media print{.app-header,.page-heading .row,.back-link,.lesson-reader-actions,.lesson-toolbar,.lesson-edit-footer{display:none!important}
.lesson-document{border:0;box-shadow:none;max-width:none}}
html .lesson-editor{height:55vh;min-height:260px;max-height:620px;overflow-y:auto;overscroll-behavior:contain;scroll-behavior:auto;overflow-anchor:none;scroll-padding-bottom:28px}
html .lesson-toolbar{position:static}
@media screen{.lesson-document:not(.lesson-editor){padding:32px 38px;line-height:1.85}
.lesson-document h2,.lesson-document h3{line-height:1.35;margin-top:1.6em}
.lesson-document p{margin:0 0 1em}
.lesson-document li+li{margin-top:.3em}
.lesson-document blockquote{margin-left:0;padding-left:18px;border-left:3px solid #d8e0ff;color:#4b576c}
@media(max-width:600px){.lesson-document:not(.lesson-editor){padding:22px 20px}}}
.lesson-editor [data-note-image],.image-note-anchor{text-decoration:underline;text-decoration-color:#809bd3;text-decoration-style:dotted;text-underline-offset:5px;cursor:pointer;border-radius:3px}
.image-note-anchor:hover,.image-note-anchor:focus-visible,.image-note-active{background:#edf2ff;text-decoration-style:solid;color:#284da4}
.image-note-margin{position:fixed;z-index:30;background:#fff;border:1px solid #dfe5ef;border-radius:10px;padding:10px;box-sizing:border-box;box-shadow:0 8px 28px #1c304015}
.image-note-margin[hidden]{display:none}
.image-note-margin img{display:block;width:100%;max-height:235px;object-fit:contain;border-radius:5px;cursor:zoom-in}
.image-note-margin p{font-size:12px;line-height:1.5;color:#67768c;margin:8px 2px 0}
.image-note-close{position:absolute;right:5px;top:5px;display:grid;place-items:center;width:26px;height:26px;background:#ffffffed;border:1px solid #e2e7ef;border-radius:50%;color:#53647b;cursor:pointer}
.image-note-arrow{position:fixed;inset:0;width:100%;height:100%;z-index:29;pointer-events:none;overflow:visible}
.image-note-arrow path{fill:none;stroke:#8fa5c8;stroke-width:1.3}
.image-note-dialog{width:min(540px,calc(100% - 32px));max-height:85vh;box-sizing:border-box;overflow:auto;border:1px solid #dce3ed;border-radius:14px;padding:24px;color:#293747}
.image-note-dialog::backdrop{background:#15253d66}
.image-note-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px}
.image-note-dialog-head h2{font-size:19px;margin:0}
.image-note-dialog label{display:grid;gap:8px;margin:18px 0;font-size:14px}
.image-note-dialog input{width:100%;box-sizing:border-box}
.image-note-dialog .image-note-selection{font-size:14px;color:#65748a}
.image-note-preview{display:block;max-width:100%;max-height:220px;margin:16px auto;object-fit:contain}
.image-note-preview[hidden]{display:none}
.image-note-full{display:block;max-width:100%;max-height:60vh;object-fit:contain;margin:auto}
.image-note-dialog .row{gap:8px}
@media(max-width:700px){.image-note-dialog{padding:20px}
.image-note-dialog-head h2{font-size:17px}}
@media print{.image-note-margin,.image-note-arrow,.image-note-dialog{display:none!important}
.image-note-anchor{color:inherit;text-decoration:none}}
.text-note-input{width:100%;box-sizing:border-box;min-height:150px;max-height:55vh;resize:vertical;padding:12px;border:1px solid #cfd8e6;border-radius:7px;font:inherit;line-height:1.6}
.image-note-margin [hidden]{display:none!important}
.text-note-body,.text-note-full{white-space:pre-wrap;overflow-wrap:anywhere;color:#29374a;font-size:14px;line-height:1.65}
.text-note-body{max-height:min(48vh,380px);overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
.text-note-full{max-height:65vh;overflow:auto;font-size:16px;padding:4px 0 14px}
.image-note-margin.is-text-note>p{font-size:13px;font-weight:600;margin:4px 20px 10px 0;color:#536680}
.text-note-anchor{border-bottom-style:dotted!important}
.printed-text-notes{border-top:1px solid #ddd;margin-top:24px;padding-top:12px}
.printed-text-note{break-inside:avoid;font-size:12px}
.printed-text-note p{margin:5px 0 14px}
.video-note-player,.video-note-full{display:block;width:100%;max-height:60vh;border-radius:6px;background:#10151d}
.video-note-player{max-height:300px}
.rich-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px;padding:9px!important;background:#fafbfc!important;position:sticky;top:0;z-index:10;border:1px solid #e0e5ed;border-radius:8px;margin:0 0 16px}
.rich-group{display:flex;gap:2px;align-items:center;padding-right:8px;border-right:1px solid #e1e5ed}
.rich-group:last-child{border:0}
.rich-toolbar button.rich-icon{width:30px;height:30px;min-height:30px;padding:5px!important;border:0;background:transparent;color:#40516a;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;cursor:pointer}
.rich-toolbar button.rich-icon:hover,.rich-toolbar button.rich-icon:focus-visible{background:#e8edf8;color:#3451e5}
.rich-toolbar select{margin:0!important;height:31px!important;padding:4px 7px!important;font-size:12px!important;width:auto!important;max-width:140px;min-width:0!important;background:white;border:1px solid #dae1eb;border-radius:5px}
.rich-toolbar #rich-font{max-width:108px}
.rich-toolbar #rich-size{max-width:56px}
.rich-color{position:relative;display:flex;align-items:center;justify-content:center;width:30px;height:30px;margin:0!important;cursor:pointer;font-weight:600;font-size:16px}
.rich-color>input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;padding:0;cursor:pointer}
.rich-color>span{border-bottom:3px solid #526cd1;line-height:20px}
.rich-highlight>span{background:#fff2a8;border-color:#e2c94d}
.rich-more{position:relative}
.rich-more>summary{list-style:none;cursor:pointer;padding:0 8px;font-size:24px;line-height:30px}
.rich-more-panel{position:absolute;right:0;top:36px;background:#fff;border:1px solid #dce2ed;border-radius:8px;box-shadow:0 8px 24px #14243e20;padding:12px;width:230px;z-index:30}
.rich-more-panel>button{display:block!important;width:100%;font-size:12px;padding:8px;text-align:left;border:0;background:white;color:#34455c}
.rich-more-panel>button:hover{background:#f0f3f9}
.rich-more-panel>p{font-size:11px;color:#768399;margin:12px 0 5px}
.rich-more-panel label{font-size:12px;display:flex;align-items:center;justify-content:space-between}
.rich-more-panel .rich-group{border:0;margin-top:10px}
.rich-dialog{width:min(440px,calc(100vw - 32px));border:1px solid #dce2ed;border-radius:12px;padding:24px;color:#26374b}
.rich-dialog::backdrop{background:#14243e55}
.rich-dialog h2{font-size:20px;margin-bottom:20px}
.rich-dialog input:not([type=checkbox]){display:block;width:100%;margin:6px 0 15px;padding:9px;border:1px solid #d1daea;border-radius:6px}
.rich-dialog .row{margin-top:18px}
.lesson-document table{border-collapse:collapse;width:100%;table-layout:fixed;margin:18px 0;font-size:.95em}
.lesson-document th,.lesson-document td{border:1px solid #ced7e4;padding:9px 12px;text-align:inherit;min-width:40px;vertical-align:top;overflow-wrap:anywhere}
.lesson-document th{background:#f1f4f9;font-weight:600}
.lesson-document h1{font-size:2em}
.lesson-document h2{font-size:1.65em}
.lesson-document h3{font-size:1.4em}
.lesson-document h4{font-size:1.2em}
.lesson-document h5{font-size:1.05em}
.lesson-document h6{font-size:1em;color:#5d6b7f}
.lesson-document h5,.lesson-document h6{line-height:1.4;margin:1.5em 0 .6em}
@media(max-width:600px){.rich-toolbar{gap:5px;padding:6px!important}
.rich-group{padding-right:4px}
.rich-toolbar .rich-icon{width:32px!important;height:32px!important}
.rich-toolbar #rich-font{max-width:95px}
.rich-more-panel{position:fixed;right:16px;top:130px;max-height:60vh;overflow:auto}}
@media print{.video-note-player,.video-note-full,.rich-toolbar{display:none!important}}
.rich-toolbar button.rich-icon.is-active{background:#e8edff;color:#3451e5;box-shadow:inset 0 0 0 1px #cfd8ff}
.note-editor-header .rich-toolbar{position:static;top:auto;border:0;border-radius:0;background:transparent!important;margin:0!important;padding:0!important;gap:5px 8px}
.note-editor-paper .lesson-editor{max-width:900px;min-height:65vh;padding:20px 24px;outline-offset:3px}
.note-editor-header .rich-more-panel{z-index:60}
@media(max-width:600px){.note-editor-header .rich-toolbar{gap:4px}
.note-editor-paper .lesson-editor{padding:12px;min-height:65vh}
.note-editor-header .rich-group{padding-right:4px}
.note-editor-header .rich-more-panel{position:absolute;top:36px;right:0}}
.note-editor-paper .lesson-editor{max-height:none;overflow:visible;height:auto}
.lesson-document>.note-document-title{margin:0 0 24px;font-size:clamp(1.55rem,2.4vw,2rem);line-height:1.25;letter-spacing:-.025em;color:var(--text,#263445);overflow-wrap:anywhere}
.rich-more-panel .rich-autocap-option{display:flex;align-items:center;gap:8px}
.rich-autocap-option input{width:16px;height:16px;min-height:0}
@media print{.lesson-document span[style*="background-color"],.printed-note span[style*="background-color"]{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
.lesson-document.is-highlighting{cursor:crosshair}
.lesson-document.is-highlighting ::selection{background:#ffe681;color:inherit}
.lesson-document.is-highlighting::selection{background:#ffe681;color:inherit}
.lesson-document ol{list-style-type:decimal}
.lesson-document ol ol{list-style-type:lower-alpha}
.lesson-document ol ol ol{list-style-type:lower-roman}
.lesson-document ul{list-style-type:disc}
.lesson-document ul ul{list-style-type:circle}
.lesson-document ul ul ul{list-style-type:square}
.lesson-document :is(ol,ul){padding-inline-start:2em;list-style-position:outside}
.lesson-document :is(ol,ul) :is(ol,ul){margin-block:.25em .4em}
.lesson-document li{padding-inline-start:.15em}
#rich-size{min-width:86px}
#rich-font{max-width:170px}
.rich-color:not(.rich-highlight)>span{border-bottom:3px solid var(--rich-color,currentColor)}
.rich-toolbar #rich-author{width:auto!important;min-width:116px;gap:6px;padding:5px 8px!important;font-size:12px;white-space:nowrap}
.rich-toolbar #rich-author svg{flex-shrink:0}
.study-author-card{box-sizing:border-box;display:block;max-width:820px;margin:24px auto;border:1px solid #d6dfda;border-radius:16px;overflow:hidden;background:#fffaf0;color:#233c40;font:15px/1.55 Arial,sans-serif;box-shadow:0 4px 18px #153e4710;text-align:left;cursor:default;break-inside:avoid;page-break-inside:avoid}
.study-author-card *{box-sizing:border-box}
.study-author-card .author-head{display:flex;align-items:center;gap:22px;padding:22px 28px;background:#164d58;color:#fff}
.study-author-card .author-kicker{display:block;font:700 10px/1.4 Arial,sans-serif;letter-spacing:2px;color:#f3cda6;margin-bottom:7px}
.study-author-card .author-head h3{margin:0 0 6px!important;padding:0!important;border:0!important;font:700 29px/1.1 Georgia,serif!important;color:#fff!important}
.study-author-card .author-head p{margin:0!important;font-size:13px;color:#e3eff0}
.study-author-card .author-photo{display:block;flex:0 0 90px;width:90px;height:110px;object-fit:cover;object-position:center 25%;border-radius:9px;border:3px solid #ffffff66;margin:0!important}
.study-author-card .author-body{padding:20px 28px}
.study-author-card .author-section{margin:0 0 17px}
.study-author-card .author-section:last-child{margin-bottom:0}
.study-author-card h4{font:700 12px/1.4 Arial,sans-serif!important;letter-spacing:.65px;text-transform:uppercase;color:#164d58!important;border:0!important;margin:0 0 7px!important;padding:0!important}
.study-author-card p{margin:0!important;font-size:14px;line-height:1.6}
.study-author-card .author-style{border-left:3px solid #d99963;padding:10px 14px;background:#f9eedc;border-radius:0 8px 8px 0}
.study-author-card .author-importance{padding:13px 16px;background:#eaf1eb;border-radius:9px}
.study-author-card table.author-films{width:100%;border-collapse:collapse;table-layout:fixed;margin:0!important;font:13px/1.45 Arial,sans-serif;background:transparent}
.study-author-card .author-films th,.study-author-card .author-films td{border:0!important;border-bottom:1px solid #e5dfd0!important;padding:9px 10px!important;text-align:left;vertical-align:top;overflow-wrap:anywhere;color:#233c40;background:transparent!important}
.study-author-card .author-films thead th{background:#f1dfc8!important;color:#68472b;font-size:11px}
.study-author-card .author-films th:first-child{width:60px}
.study-author-card .author-films th:nth-child(2){width:25%}
.study-author-card .author-films tbody th{font-weight:700}
.study-author-card .author-films td:first-child{font-weight:700;color:#986039}
.study-author-card .author-credits{border-top:1px solid #e3dece;padding-top:10px;overflow-wrap:anywhere}
.study-author-card .author-credits p{font-size:10px;line-height:1.5;color:#64716c;margin-bottom:3px!important}
.lesson-editor .study-author-card:focus{outline:2px solid #d99963;outline-offset:3px}
.author-dialog{width:min(1220px,96vw)!important;max-width:1220px!important;padding:24px!important;max-height:94vh;overflow:auto}
.author-dialog::backdrop{background:#142d3977;backdrop-filter:blur(3px)}
.author-dialog-head{display:flex;justify-content:space-between;align-items:start;gap:20px}
.author-dialog-head h2{margin:0 0 5px}
.author-dialog-head p{margin:0;color:#6d7c86;font-size:13px}
.author-presets{display:flex;gap:10px;margin:18px 0}
.author-form-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}
.author-fields{min-width:0}
.author-fields label{display:flex;flex-direction:column;gap:5px;margin:0 0 13px;font-size:13px;font-weight:600}
.author-fields input,.author-fields textarea{width:100%;font:14px/1.45 Arial,sans-serif;min-width:0}
.author-fields textarea{resize:vertical}
.author-two{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:center}
.author-film-heading{display:flex;align-items:center;justify-content:space-between;margin:10px 0;font-size:13px}
.author-film-row{display:grid;grid-template-columns:64px 1fr 32px;gap:6px;margin:0 0 10px;padding:10px;background:#f6f8fa;border-radius:9px}
.author-film-row textarea{grid-column:1/3;grid-row:2;width:100%;resize:vertical;font:13px/1.4 Arial,sans-serif}
.author-film-row button{grid-column:3;grid-row:1/3;padding:0!important}
.author-preview{position:sticky;top:0;align-self:start;background:#edf1ef;padding:14px;border-radius:14px;max-height:76vh;overflow:auto}
.author-preview .study-author-card{margin:0}
.author-preview .author-head{padding:18px;gap:14px}
.author-preview .author-head h3{font-size:24px!important}
.author-preview .author-body{padding:18px}
.author-preview .author-photo{width:70px;flex-basis:70px;height:90px}
.author-dialog-actions{position:sticky;bottom:-24px;display:flex;gap:10px;align-items:center;padding:15px 0;background:#fff;border-top:1px solid #e1e6ea;z-index:2}
.author-dialog-actions span{margin-right:auto;font-size:12px;color:#657780}
.author-status{font-size:13px;color:#9b4b21;min-height:18px}
@media(max-width:850px){.author-form-grid{grid-template-columns:1fr}
.author-preview{position:static;max-height:none}
.author-dialog-actions span{display:none}
.author-dialog-actions{justify-content:flex-end}
.author-two{grid-template-columns:1fr}
.study-author-card .author-head{padding:18px;gap:14px}
.study-author-card .author-body{padding:18px}
.study-author-card .author-head h3{font-size:24px!important}
.study-author-card .author-photo{width:70px;flex-basis:70px;height:90px}
.study-author-card .author-films th:nth-child(2){width:28%}}
@media print{.study-author-card{-webkit-print-color-adjust:exact;print-color-adjust:exact;box-shadow:none;max-width:100%;font-size:11px;break-inside:avoid}
.study-author-card .author-head{padding:14px 20px}
.study-author-card .author-body{padding:14px 20px}
.study-author-card p{font-size:11px;line-height:1.4}
.study-author-card .author-section{margin-bottom:12px}
.study-author-card .author-films{font-size:10px!important}
.study-author-card .author-films td,.study-author-card .author-films th{padding:6px 8px!important}
.study-author-card .author-credits p{font-size:8px}
.author-dialog{display:none!important}}
@media print{.study-author-card{background:#fff!important;color:#222!important;border:1px solid #d8d8d8;border-radius:9px;box-shadow:none!important;-webkit-print-color-adjust:economy;print-color-adjust:economy}
.study-author-card .author-head{background:#fff!important;color:#222!important;border-bottom:1px solid #dedede}
.study-author-card .author-head h3{color:#222!important}
.study-author-card .author-head p,.study-author-card .author-kicker{color:#555!important}
.study-author-card .author-photo{border:1px solid #d5d5d5!important}
.study-author-card .author-body{background:#fff!important}
.study-author-card h4{color:#444!important}
.study-author-card .author-style,.study-author-card .author-importance{background:transparent!important}
.study-author-card .author-style{border-left:1px solid #ccc}
.study-author-card .author-films thead th{background:#f7f7f7!important;color:#333!important}
.study-author-card .author-films td,.study-author-card .author-films th{color:#333!important;border-bottom-color:#ddd!important}}
@media print{#notes-print .note-prose [style*="background"],#notes-print .note-prose mark,#notes-print [data-note-image]{background:transparent!important;box-shadow:none!important}}
@media print{.printed-text-notes,.image-note-margin,.image-note-arrow,.image-note-dialog,.text-note-full,.image-note-full,.video-note-player,.video-note-full{display:none!important}}
.rich-toolbar #rich-paragraph-styles{width:auto!important;min-width:52px;padding:5px 9px!important;font-size:12px;white-space:nowrap;color:#3451e5;border:1px solid #d9e0f3;border-radius:5px;background:#f4f6ff}
.ps-dialog{box-sizing:border-box;width:min(610px,calc(100vw - 28px));max-height:90dvh;overflow:auto;border:1px solid #dce2ed;border-radius:14px;padding:26px;color:#263445;background:#fff;box-shadow:0 18px 60px #13243e22}.ps-dialog::backdrop{background:#14243e66}.ps-dialog-heading{display:flex;gap:20px;justify-content:space-between;align-items:start}.ps-dialog h2{font-size:22px;margin:0 0 6px;letter-spacing:-.4px}.ps-dialog-heading p{font-size:13px;color:#68778e;margin:0}.ps-close{font-size:27px;line-height:1;width:32px;height:32px;border:0;background:none;color:#68778e;cursor:pointer}.ps-scope{font-size:13px;line-height:1.6;background:#f4f6ff;padding:12px 14px;border-radius:8px;color:#4b5c84;margin:20px 0}.ps-dialog label{display:grid;gap:7px;font-size:12px;font-weight:600}.ps-dialog input,.ps-dialog select{box-sizing:border-box;width:100%;min-width:0;min-height:38px;border:1px solid #ced7e5;border-radius:6px;background:#fff;color:#263445;font:14px system-ui;padding:8px 10px;margin:0}.ps-dialog input[type=color]{height:38px;padding:4px 7px}.ps-two{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:18px 0}.ps-preview{margin-top:20px;border:1px solid #dce2ed;border-radius:8px;padding:15px 18px;max-height:230px;overflow:auto;background:#fafbfe}.ps-preview>span{display:block;font-size:11px;color:#6f7d91;text-transform:uppercase;letter-spacing:.7px;margin-bottom:12px}.ps-preview #ps-sample{overflow-wrap:anywhere}.ps-help{font-size:12px;line-height:1.65;color:#68778e;margin:14px 0 20px}.ps-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;border-top:1px solid #e7ebf2;padding-top:18px}.ps-actions .button{font-size:12px;padding:9px 12px}.ps-actions #ps-reset{margin-right:auto}.ps-dialog #ps-error[hidden]{display:none}.ps-dialog .error-box{font-size:13px;margin:0 0 16px}.ps-dialog button:disabled{opacity:.5;cursor:default}
@media(max-width:540px){.ps-dialog{padding:20px 16px;width:calc(100vw - 20px);max-height:92dvh}.ps-two{gap:12px}.ps-dialog h2{font-size:20px}.ps-actions #ps-save{width:100%;order:3}.ps-actions #ps-reset{margin-right:auto}.ps-dialog .ps-selection{font-size:12px}.ps-dialog input,.ps-dialog select{font-size:16px}}
@media print{.ps-dialog{display:none!important}}
.ps-dialog{overflow:hidden}.ps-dialog>form{display:flex;flex-direction:column;max-height:calc(90dvh - 52px);margin:0}.ps-dialog-heading,.ps-actions{flex-shrink:0}.ps-dialog-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:5px}.ps-actions{margin-top:12px;background:white}
@media(max-width:540px){.ps-dialog>form{max-height:calc(92dvh - 40px)}}
