.teacher-preparation{width:100%;max-width:1500px;margin:0 auto;min-width:0;color:var(--ui-text)}
.tprep-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 22px}
.tprep-eyebrow{display:block;color:var(--ui-primary);font-size:11px;letter-spacing:.05em;margin-bottom:8px}
.teacher-workspace .tprep-heading h1{font-size:27px;line-height:1.35;letter-spacing:-.5px;margin:0}
.tprep-heading p{font-size:12px;line-height:1.8;color:var(--ui-muted);margin:9px 0 0}
.tprep-history{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.tprep-history label{font-size:11px;color:var(--ui-muted)}
.tprep-history select{width:210px;min-width:0;max-width:100%;font-size:12px;height:35px;padding:7px 25px 7px 10px}
.tprep-history .button{white-space:nowrap}
.tprep-flow{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0 0 22px;padding:0;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface);overflow:hidden}
.tprep-flow li{display:flex;align-items:center;gap:12px;padding:16px 22px;color:var(--ui-muted);font-size:12px;border-right:1px solid var(--ui-line)}
.tprep-flow li:last-child{border:0}.tprep-flow b{font-size:11px;letter-spacing:.04em;font-weight:600;opacity:.65}.tprep-flow .is-active{color:var(--ui-primary);background:var(--ui-soft)}
.tprep-planning-grid{display:grid;grid-template-columns:minmax(300px,.82fr) minmax(0,1.55fr);gap:22px;align-items:start;min-width:0}
.tprep-selection,.tprep-editor,.tprep-materials{background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:12px;min-width:0;padding:22px}
.tprep-section-title{display:flex;align-items:flex-start;gap:11px;margin-bottom:22px;min-width:0}
.tprep-number{display:grid;place-items:center;flex:none;width:27px;height:27px;border-radius:8px;background:var(--ui-soft);color:var(--ui-primary);font-size:12px;font-variant-numeric:tabular-nums}
.teacher-workspace .tprep-section-title h2{font-size:16px;font-weight:650;line-height:1.7;margin:0}
.tprep-section-title p{font-size:11px;line-height:1.7;color:var(--ui-muted);margin:4px 0 0}
.tprep-save-state{font-size:10px;margin-left:auto;padding-top:5px;white-space:nowrap;color:var(--ui-muted)}
.tprep-option-tabs{display:flex;gap:4px;padding:4px;background:var(--ui-bg);border-radius:8px;margin-bottom:20px}
.tprep-option-tabs button{flex:1;border:0;background:transparent;color:var(--ui-muted);font:inherit;font-size:12px;padding:8px 10px;border-radius:6px;cursor:pointer}
.tprep-option-tabs button[aria-pressed=true]{background:var(--ui-surface);color:var(--ui-primary);box-shadow:0 1px 5px #0818200b;font-weight:650}
.tprep-selection-scroll{max-height:600px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:6px;margin-right:-6px}
.tprep-choice{border:0;margin:0 0 23px;padding:0;min-width:0}.tprep-choice:last-child{margin-bottom:8px}
.tprep-choice legend{padding:0;margin:0 0 10px;font-size:12px;font-weight:650;line-height:1.5;color:var(--ui-text)}
.tprep-options{display:flex;gap:7px;flex-wrap:wrap}
.tprep-options button{font:inherit;font-size:11px;line-height:1.5;color:var(--ui-muted);background:var(--ui-surface);border:1px solid var(--ui-line);padding:7px 10px;min-height:32px;max-width:100%;border-radius:7px;cursor:pointer;text-align:left}
.tprep-options button[aria-pressed=true]{border-color:var(--ui-primary);background:var(--ui-soft);color:var(--ui-primary);font-weight:550}
.tprep-options button:hover{color:var(--ui-primary);border-color:var(--ui-primary)}
.tprep-options button:disabled{cursor:default;opacity:.65}.tprep-options button[aria-pressed=true]:disabled{opacity:1}
.tprep-choice-detail{font-size:10px;line-height:1.8;color:var(--ui-muted);margin:9px 0 0;overflow-wrap:anywhere}
.tprep-compose{width:100%;justify-content:center;margin-top:18px}
.tprep-note{font-size:10px;line-height:1.85;color:var(--ui-muted);margin:10px 0 0}.tprep-note a{color:var(--ui-primary);text-underline-offset:3px}
.tprep-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tprep-editor textarea{display:block;width:100%;resize:vertical;min-height:480px;max-height:1300px;border:1px solid var(--ui-line);border-radius:9px;padding:18px 20px;background:var(--ui-bg);color:var(--ui-text);font:inherit;font-size:12px;line-height:1.95;overflow-wrap:anywhere;tab-size:2}
.tprep-editor textarea:read-only{background:var(--ui-bg)}
.tprep-draft-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:520px;text-align:center;border:1px dashed var(--ui-line);border-radius:10px;background:var(--ui-bg);padding:35px 15px}
.tprep-nine-grid{display:grid;grid-template-columns:repeat(3,39px);gap:6px;margin:0 0 27px;transform:rotate(-5deg)}
.tprep-nine-grid span{display:grid;place-items:center;height:39px;border:1px solid var(--ui-line);border-radius:7px;color:var(--ui-primary);background:var(--ui-surface);font-size:10px;font-variant-numeric:tabular-nums}.tprep-nine-grid span:nth-child(2n){background:var(--ui-soft)}
.teacher-workspace .tprep-draft-empty h3{font-size:16px;font-weight:650;line-height:1.7;margin:0 0 10px}
.tprep-draft-empty p{font-size:12px;line-height:1.95;color:var(--ui-muted);margin:0}.tprep-draft-empty>span{font-size:10px;color:var(--ui-muted);margin-top:25px}
.tprep-draft-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.tprep-confirm{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:15px;margin:22px 0 0;padding-top:20px;border-top:1px solid var(--ui-line)}
.tprep-model{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;font-size:11px;color:var(--ui-muted)}
.tprep-model select{width:100%;min-width:0;height:36px;font-size:12px;padding:7px 25px 7px 10px}
.tprep-confirm .button{white-space:nowrap;height:36px;min-height:36px;padding:8px 12px;font-size:11px}
.tprep-confirm>p{grid-column:1/-1;font-size:10px;line-height:1.8;color:var(--ui-muted);margin:0}
.tprep-message,.tprep-inline-warning{background:var(--ui-soft);border:1px solid var(--ui-line);border-radius:8px;color:var(--ui-text);font-size:12px;line-height:1.85;padding:12px 16px;margin:0 0 18px;overflow-wrap:anywhere}
.tprep-message.is-error,.tprep-inline-warning{border-left:3px solid var(--ui-primary)}
.tprep-inline-warning .button{margin-left:12px}
.tprep-materials{margin-top:23px;padding:22px}
.tprep-materials-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:19px}.tprep-materials-heading .tprep-section-title{margin:0}
.tprep-material-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.tprep-material-actions .button{white-space:nowrap}
.tprep-material-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;min-width:0}
.tprep-material{border:1px solid var(--ui-line);border-radius:9px;overflow:hidden;min-width:0;background:var(--ui-surface)}
.tprep-material-preview{aspect-ratio:16/9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:var(--ui-bg);border-bottom:1px solid var(--ui-line);overflow:hidden}
.tprep-material-preview>span{display:block;width:28px;height:28px;color:var(--ui-muted);opacity:.7}.tprep-material-preview svg{width:100%;height:100%}
.tprep-material-preview>small{font-size:10px;color:var(--ui-muted)}.tprep-material-preview img{width:100%;height:100%;display:block;object-fit:cover}
.tprep-material-body{padding:13px 12px}.tprep-material-title{display:flex;align-items:flex-start;gap:7px}.tprep-material-title>span{font-size:9px;color:var(--ui-muted);line-height:1.8;font-variant-numeric:tabular-nums;flex:none}
.teacher-workspace .tprep-material-title h3{font-size:12px;line-height:1.6;font-weight:650;overflow-wrap:anywhere;margin:0}
.tprep-material-state{font-size:10px;color:var(--ui-muted);line-height:1.6;margin:8px 0 0}.tprep-material-state.is-complete{color:var(--ui-primary)}
.tprep-material-error{font-size:10px;line-height:1.8;color:var(--ui-muted);overflow-wrap:anywhere;margin:8px 0}
.tprep-prompt{margin:12px 0 0;padding-top:9px;border-top:1px solid var(--ui-line)}.tprep-prompt summary{font-size:10px;line-height:1.8;color:var(--ui-muted);cursor:pointer}.tprep-prompt textarea{width:100%;min-width:0;font:inherit;font-size:10px;line-height:1.8;color:var(--ui-text);background:var(--ui-bg);padding:9px;border:1px solid var(--ui-line);border-radius:6px;resize:vertical;margin:9px 0 0;min-height:125px}
.tprep-material-body>a.button{width:100%;justify-content:center;font-size:10px;padding:7px 9px;min-height:31px;margin-top:12px;text-decoration:none}
.teacher-preparation :is(button,select,textarea,a):focus-visible{outline:2px solid var(--ui-primary);outline-offset:3px}
.tprep-context{display:grid;grid-template-columns:minmax(190px,1fr) minmax(150px,.7fr) minmax(220px,1.1fr);gap:18px;align-items:end;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:12px;padding:20px 22px;margin-bottom:22px}
.teacher-workspace .tprep-context h2{font-size:15px;margin:0 0 7px}.tprep-context p{font-size:11px;line-height:1.8;color:var(--ui-muted);margin:0}.tprep-context label,.tprep-ai label{display:grid;gap:8px;font-size:11px;color:var(--ui-muted);min-width:0}.tprep-context select,.tprep-ai select{width:100%;font:inherit;font-size:12px;min-width:0;padding:9px;border:1px solid var(--ui-line);border-radius:7px;background:var(--ui-bg);color:var(--ui-text)}
.tprep-draft-actions{justify-content:flex-start;flex-wrap:wrap}.tprep-upload{position:relative;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;font-size:11px;line-height:1.6;padding:8px 12px;border:1px solid var(--ui-line);border-radius:7px;color:var(--ui-primary);background:var(--ui-soft);cursor:pointer;min-height:35px;margin:0}.tprep-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.tprep-upload:focus-within{outline:2px solid var(--ui-primary);outline-offset:3px}.tprep-upload.is-disabled{opacity:.55;cursor:default}.tprep-upload.is-disabled input{cursor:default}
.tprep-ai,.tprep-revisions{border-top:1px solid var(--ui-line);margin-top:20px;padding-top:16px}.tprep-ai>summary,.tprep-revisions>summary{cursor:pointer;font-size:12px;color:var(--ui-primary);line-height:1.8}.tprep-ai label{margin-top:14px}.tprep-ai textarea{min-height:130px;font-size:12px;padding:12px;max-height:450px}.tprep-ai>.button{margin-top:13px}.tprep-ai pre,.tprep-revisions pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px;line-height:1.9;background:var(--ui-bg);padding:14px;border-radius:7px;max-height:400px;overflow:auto}.tprep-revisions>details{padding-top:12px;font-size:11px;color:var(--ui-muted)}
.tprep-materials .tprep-confirm{margin-top:0;padding-top:0;border-top:0;padding-bottom:20px}.tprep-files{margin-top:24px;padding-top:20px;border-top:1px solid var(--ui-line)}.teacher-workspace .tprep-files h3{font-size:13px;margin:0 0 12px}.tprep-files ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}.tprep-files li{display:flex;gap:20px;align-items:center;justify-content:space-between;background:var(--ui-bg);padding:12px 14px;border-radius:7px;font-size:12px;min-width:0}.tprep-files li>span{min-width:0;overflow-wrap:anywhere}.tprep-files small{display:block;font-size:10px;color:var(--ui-muted);margin-top:4px}.tprep-files a{flex:none;color:var(--ui-primary)}.tprep-classroom{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px;padding-top:20px;border-top:1px solid var(--ui-line)}.tprep-classroom a{text-decoration:none}
@media(max-width:880px){.tprep-context{grid-template-columns:1fr 1fr}.tprep-context>div{grid-column:1/-1}.tprep-flow{grid-template-columns:repeat(2,minmax(0,1fr))}.tprep-flow li:nth-child(2){border-right:0}.tprep-flow li:nth-child(-n+2){border-bottom:1px solid var(--ui-line)}}
@media(max-width:560px){.tprep-context{grid-template-columns:1fr;padding:16px;gap:14px}.tprep-context>div{grid-column:auto}.tprep-classroom{flex-direction:column}.tprep-classroom a{justify-content:center}.tprep-draft-actions>.button,.tprep-draft-actions>.tprep-upload{flex:1;white-space:nowrap}}
@media(max-width:1200px){.tprep-planning-grid{grid-template-columns:minmax(285px,.85fr) minmax(0,1.4fr);gap:16px}.tprep-selection,.tprep-editor,.tprep-materials{padding:18px}.tprep-confirm{grid-template-columns:1fr}.tprep-confirm .button{width:100%;justify-content:center}.tprep-material-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tprep-heading{align-items:flex-start}.tprep-history{max-width:260px}.tprep-history label{display:none}}
@media(max-width:880px){.tprep-planning-grid{grid-template-columns:1fr}.tprep-selection-scroll{max-height:460px}.tprep-editor textarea{min-height:420px}.tprep-draft-empty{min-height:300px}.tprep-material-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tprep-history{max-width:240px}.tprep-flow li{padding:13px 14px;gap:8px;font-size:11px}.tprep-section-title{margin-bottom:17px}}
@media(max-width:560px){.tprep-heading{flex-direction:column;gap:18px}.teacher-workspace .tprep-heading h1{font-size:24px}.tprep-history{max-width:100%;width:100%;justify-content:flex-start}.tprep-history select{flex:1;width:150px}.tprep-flow li{flex-direction:column;gap:5px;align-items:flex-start;padding:12px}.tprep-selection,.tprep-editor,.tprep-materials{padding:16px}.tprep-editor textarea{padding:14px;font-size:12px}.tprep-materials-heading{flex-direction:column}.tprep-material-grid{gap:10px}.tprep-material-body{padding:11px 9px}.tprep-material-title>span{display:none}}

/* Course-specific defaults stay compact and editable. */
.tprep-course-modules{display:flex;gap:6px;flex-wrap:wrap}.tprep-course-modules button{border:1px solid var(--border,#dce4f3);border-radius:9px;background:var(--surface,#fff);padding:8px 12px;color:inherit;cursor:pointer}.tprep-course-modules button[aria-pressed="true"]{background:var(--primary-soft,#edf1ff);border-color:var(--primary,#4c63e7);color:var(--primary,#4c63e7)}.tprep-course-section{margin-bottom:18px}.tprep-course-section h3{font-size:13px;margin:0 0 7px}.tprep-course-section p{font-size:13px;line-height:1.8;margin:0;white-space:pre-wrap}.tprep-course-activities{font-size:13px;line-height:1.8;padding-left:22px}.tprep-optional-lesson{min-width:0}.tprep-optional-lesson summary{font-size:12px;cursor:pointer;color:var(--muted,#6b7890)}
