.teacher-documents{color:var(--ink);font-family:"DM Sans",sans-serif}
.teacher-document-types,.teacher-document-actions,.teacher-book-list{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.teacher-document-types [aria-pressed=true],.teacher-document-client[aria-pressed=true]{background:var(--ink);color:#fff}
#teacher-document-form{max-width:740px;padding:24px;border:1px solid #d8dfd4;border-radius:18px;background:#fffdf7}
.teacher-document-brand{display:flex;gap:14px;align-items:center;margin-bottom:20px;color:var(--ink)}
.teacher-document-brand img{width:54px;height:54px;object-fit:contain}
.teacher-document-brand strong,.teacher-document-brand span{display:block}.teacher-document-brand strong{font-size:22px}.teacher-document-brand span{font-size:12px;margin-top:4px}
#teacher-document-fields{display:grid;grid-template-columns:1fr;gap:14px}#teacher-document-fields label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600}
#teacher-document-fields input,#teacher-document-fields textarea{width:100%;box-sizing:border-box;font:inherit;color:var(--ink);padding:12px;border:1px solid #cbd6ca;border-radius:10px;background:#fff}
.teacher-document-dialog{width:min(760px,calc(100% - 32px));box-sizing:border-box;color:var(--ink);font-family:"DM Sans",sans-serif}
#teacher-document-clients{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}.teacher-document-client{white-space:normal;text-align:left}.teacher-document-client strong,.teacher-document-client span{display:block;overflow-wrap:anywhere}.teacher-document-client span{font-size:12px;margin-top:5px}
#teacher-document-preview-content{padding:24px;border:1px solid #d8dfd4;border-radius:14px;background:#fffdf7;margin-bottom:20px}#teacher-document-preview-content h4{margin:22px 0 6px;font-size:14px}#teacher-document-preview-content p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:15px;margin-top:0}.teacher-document-recipient{font-weight:600}
@media(max-width:540px){#teacher-document-clients{grid-template-columns:1fr}#teacher-document-form,#teacher-document-preview-content{padding:16px}.teacher-document-actions .button{flex:1 1 auto}}
.teacher-document-types{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.teacher-template-folder{text-align:left;padding:20px!important;white-space:normal}.teacher-template-folder strong,.teacher-template-folder span{display:block}.teacher-template-folder span{font-size:12px;margin-top:8px}
.teacher-pdf-editor,.teacher-pdf-preview-dialog{width:min(1100px,calc(100vw - 24px));box-sizing:border-box;font-family:"DM Sans",sans-serif;color:var(--ink)}
.teacher-pdf-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0}.teacher-pdf-tools label{display:flex;align-items:center;gap:8px}.teacher-pdf-tools select{padding:8px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--cream)}
.teacher-pdf-pages{overflow:auto;max-width:100%;background:#e8ece5;padding:12px;display:grid;gap:16px}.teacher-pdf-page{position:relative;flex:none;background:#fff;box-shadow:0 3px 14px #193c3220}.teacher-pdf-page canvas{display:block}.teacher-pdf-overlay{position:absolute;box-sizing:border-box;color:#193c32;background:#fffdf8e8;border:1px solid #819f8955;border-radius:0;padding:1px 3px;font-family:Arial,sans-serif;resize:none;min-width:0;line-height:1.1}.teacher-pdf-overlay:focus{outline:2px solid #193c32;z-index:3}
.teacher-pdf-fields fieldset{border:1px solid var(--line);border-radius:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0;padding:18px}.teacher-pdf-fields legend{font-weight:700}.teacher-pdf-fields label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600}.teacher-pdf-fields input,.teacher-pdf-fields textarea{font:inherit;font-size:16px;padding:10px;border:1px solid #bccdbf;background:#fffdf8;border-radius:8px;min-width:0;width:100%;box-sizing:border-box;color:var(--ink)}
.teacher-pdf-preview-dialog canvas{max-width:100%;height:auto;background:white}.teacher-saved-documents .button{margin:5px}.teacher-document-actions{position:sticky;bottom:-30px;background:var(--cream);padding:12px 0;margin-bottom:0;border-top:1px solid var(--line)}
@media(max-width:680px){.teacher-document-types{grid-template-columns:1fr}.teacher-pdf-editor,.teacher-pdf-preview-dialog{padding:20px 14px;max-height:calc(100dvh - 24px)}.teacher-pdf-fields fieldset{grid-template-columns:1fr;padding:12px}.teacher-document-actions{bottom:-20px;gap:8px}.teacher-document-actions .button{font-size:12px;padding:10px}.teacher-pdf-editor h2{font-size:22px;padding-right:24px}}
.teacher-pdf-editor,.teacher-pdf-preview-dialog{max-width:min(1100px,calc(100vw - 24px))}

.teacher-report-page{position:relative;inset:auto;display:block;width:100%;max-width:100%;max-height:none;margin:0;padding:0;border:0;background:var(--cream);overflow:visible}.teacher-report-page:not([open]){display:none}.teacher-report-page>.popup-close{position:absolute;top:0;right:0;border:1px solid var(--line);border-radius:999px;padding:8px 12px;font:inherit;font-size:13px;color:var(--ink);background:var(--cream);cursor:pointer}.teacher-report-page>h2{padding-right:100px}.teacher-report-page .teacher-document-actions{bottom:0}.teacher-report-page .teacher-pdf-pages{max-height:none}@media(max-width:680px){.teacher-report-page{padding:0;max-height:none;max-width:100%;width:100%}.teacher-report-page>h2{font-size:22px;padding-right:90px}}

/* PDF fields must retain the size of their printed rectangles. */
.teacher-pdf-page>.teacher-pdf-overlay{min-height:0!important;max-height:none!important;margin:0!important;padding:1px 2px!important;line-height:1.2!important;letter-spacing:normal!important;box-sizing:border-box!important;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:hidden;pointer-events:auto;touch-action:auto}.teacher-pdf-pages{justify-items:center}.teacher-pdf-fields textarea{white-space:pre-wrap;overflow-wrap:anywhere;resize:vertical;min-height:100px}

/* Shared report workspace: controls have their own surface, separate from the PDF. */
body:has(.teacher-report-page[open]){overflow:auto!important}
#teacher-pdf-editor.teacher-report-page{padding:0!important;border:1px solid #cbd6ca!important;border-radius:14px!important;box-shadow:none!important;background:#f5f6ef!important;overflow:visible!important}
#teacher-pdf-editor .teacher-report-header{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:20px;background:#edf0e6;border-bottom:1px solid #cbd6ca;border-radius:14px 14px 0 0;box-sizing:border-box}
#teacher-pdf-editor .teacher-report-header h2{margin:0!important;padding:0!important;font-size:24px!important;line-height:1.35;overflow-wrap:anywhere}
#teacher-pdf-editor .teacher-report-header>.popup-close{position:static!important;float:none!important;align-self:start;border:1px solid #b9cbb6!important;border-radius:8px!important;background:#faf9f4!important;padding:10px 14px!important;font:500 14px/1.4 'DM Sans',sans-serif!important;min-height:40px;color:#193c32;white-space:nowrap}
#teacher-pdf-editor .teacher-report-header .teacher-pdf-tools{grid-column:1/-1;margin:0!important;gap:12px}
#teacher-pdf-editor .teacher-report-header .teacher-pdf-tools .button{font-size:13px;min-height:40px;padding:9px 14px}
#teacher-pdf-editor .teacher-pdf-pages{padding:12px!important;background:#dfe5dc;box-sizing:border-box;width:100%;max-width:100%;align-items:start;justify-items:center}
#teacher-pdf-editor .teacher-pdf-fields{padding:0 20px}
#teacher-pdf-editor .teacher-document-actions{position:sticky!important;bottom:0!important;z-index:5;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:10px;width:100%;padding:14px 20px!important;margin:0!important;background:#edf0e6!important;border-top:1px solid #b9cbb6;border-radius:0 0 14px 14px;box-shadow:0 -4px 14px #193c320a}
#teacher-pdf-editor .teacher-document-actions .button{box-sizing:border-box;min-height:42px;font-size:13px;line-height:1.4;padding:10px 14px;white-space:normal;margin:0}
#teacher-pdf-editor #teacher-pdf-status{padding:0 20px;overflow-wrap:anywhere}
@media(max-width:680px){#teacher-pdf-editor .teacher-report-header{padding:14px;gap:12px}#teacher-pdf-editor .teacher-report-header h2{font-size:20px!important}#teacher-pdf-editor .teacher-document-actions{padding:12px!important;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#teacher-pdf-editor .teacher-document-actions .button{width:100%;font-size:12px;padding:9px 8px}#teacher-pdf-editor .teacher-pdf-fields{padding:0 12px}}

#teacher-pdf-editor .teacher-report-header{height:auto!important;min-height:0!important;width:100%;max-width:none;margin:0}#teacher-pdf-editor .teacher-report-header .teacher-document-actions{grid-column:1/-1;position:static!important;padding:14px 0 0!important;box-shadow:none;border-radius:0;background:transparent!important}#teacher-pdf-editor .teacher-report-header .button{display:inline-flex!important}

/* Report tabs scroll as documents, rather than nested popup viewports. */
html.report-editor-document{height:auto!important;min-height:100%;overflow-y:scroll!important;overflow-x:auto;scroll-behavior:auto}html.report-editor-document body{height:auto!important;min-height:100dvh;max-height:none!important;overflow:visible!important}html.report-editor-document #teacher-pdf-editor.teacher-report-page{height:auto!important;max-height:none!important;overflow:visible!important}html.report-editor-document #teacher-pdf-pages{height:auto!important;max-height:none!important;overflow-x:auto!important;overflow-y:visible!important;touch-action:pan-x pan-y pinch-zoom;overscroll-behavior-y:auto}html.report-editor-document .teacher-pdf-page,html.report-editor-document .teacher-pdf-page canvas{touch-action:pan-x pan-y pinch-zoom}html.report-editor-document:has(dialog:modal){overflow:hidden!important}

#teacher-pdf-editor .teacher-pdf-page>.teacher-pdf-overlay{color:#faf9f4!important;background:#244a3d!important;border-color:#94b39c!important;caret-color:#d5ed98}#teacher-pdf-editor .teacher-pdf-page>.teacher-pdf-overlay:focus{outline-color:#d5ed98}

/* Match the restrained, centered text in the emailed report. */
.teacher-pdf-overlay{text-align:center}
.teacher-pdf-fields input,.teacher-pdf-fields textarea{font-family:Arial,sans-serif;font-size:13px;font-weight:400;text-align:center}
