:is(.handout-bank,.handout-edit,.handout-modal,.handout-course-popover,.handout-guide-files,.handout-picker){--handout-accent:#a30b25;--handout-bg:#f5f5f6;--handout-surface:#fff;--handout-text:#202127;--handout-muted:#555964;--handout-border:#9ba0aa;--handout-soft:#fbeef1;--handout-error:#95112b;--handout-error-bg:#fff0f3;--handout-success:#185637;--handout-success-bg:#edf7f0;--handout-warning:#6a4500;--handout-warning-bg:#fff4da;color:var(--handout-text);color-scheme:light}:is(:root[data-theme=dark],.ws-app[data-theme=dark]) :is(.handout-bank,.handout-edit,.handout-modal,.handout-course-popover,.handout-guide-files,.handout-picker){--handout-accent:#b81735;--handout-bg:#15171c;--handout-surface:#20232b;--handout-text:#f5f5f7;--handout-muted:#c0c4ce;--handout-border:#737b8c;--handout-soft:#3b1c27;--handout-error:#ffc3cf;--handout-error-bg:#3e1e2a;--handout-success:#bee6cc;--handout-success-bg:#173329;--handout-warning:#ffe1a0;--handout-warning-bg:#392c16;color-scheme:dark}.handout-bank{box-sizing:border-box;background:var(--handout-bg);padding:20px 24px;height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;font-family:inherit}.handout-bank *,.handout-edit *,.handout-course-popover *{box-sizing:border-box}:is(.handout-bank,.handout-edit) button,.handout-actions a{font:inherit;cursor:pointer;min-height:44px;border:1px solid var(--handout-border,#9ba0aa);border-radius:10px;padding:9px 15px;background:var(--handout-surface,#fff);color:inherit;text-decoration:none;line-height:1.6}:is(.handout-bank,.handout-edit) button:disabled{cursor:default;opacity:.55}:is(.handout-bank,.handout-edit,.handout-course-popover) :focus-visible{outline:3px solid #ce3653;outline-offset:3px}.handout-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}.handout-bank-modal .handout-heading{display:none}.handout-tabs .handout-refresh{margin-inline-start:auto}.handout-heading h1{font-size:clamp(22px,3vw,30px);margin:4px 0}.handout-heading p{margin:0;color:var(--handout-muted);line-height:1.8}.handout-heading .handout-actions{flex-shrink:0}.handout-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.handout-actions p,.handout-actions small{flex-basis:100%;line-height:1.8;margin:0;overflow-wrap:anywhere}.handout-actions p{color:var(--handout-error,#95112b)}.handout-actions small{color:var(--handout-muted,#555964)}.handout-bank .handout-primary,.handout-edit .handout-primary{background:var(--handout-accent);border-color:var(--handout-accent);color:#fff}.handout-bank button:hover:not(:disabled),.handout-edit button:hover:not(:disabled){border-color:var(--handout-accent)}.handout-tabs{display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid var(--handout-border);padding-bottom:12px;margin-bottom:14px}.handout-tabs button[aria-current=page]{background:var(--handout-accent);border-color:var(--handout-accent);color:#fff;font-weight:700}.handout-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:12px;margin:12px 0}.handout-bank label,.handout-edit label{display:flex;flex-direction:column;gap:6px;font-size:14px;min-width:0}.handout-bank input:not([type=checkbox]),.handout-bank select,.handout-edit input,.handout-edit select,.handout-edit textarea{font:inherit;min-height:44px;border:1px solid var(--handout-border);border-radius:9px;padding:9px 12px;color:inherit;background:var(--handout-surface);min-width:0;width:100%;max-width:100%}.handout-bank input::placeholder,.handout-course-popover input::placeholder{color:var(--handout-muted);opacity:1}.handout-search{min-width:0;flex:1}.handout-file-toolbar{display:flex;align-items:end;gap:16px;margin:14px 0}.handout-file-toolbar .handout-search{max-width:650px}.handout-file-toolbar>button{margin-inline-start:auto;white-space:nowrap}.handout-catalog-count{display:block;color:var(--handout-muted);font-size:12px;line-height:1.8}.handout-list-summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:14px 0;color:var(--handout-muted)}.handout-list-summary strong{color:var(--handout-text)}.handout-course-select{display:grid;gap:6px;font-size:14px;min-width:0}.handout-course-select>button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:right}.handout-course-select>button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.handout-course-popover{position:fixed;z-index:1750;background:var(--handout-surface);border:1px solid var(--handout-border);border-radius:12px;padding:10px;box-shadow:0 12px 38px #0005;display:flex;flex-direction:column;gap:8px;direction:rtl;font:inherit;overflow:hidden}.handout-course-popover input{font:inherit;min-height:44px;width:100%;flex-shrink:0;padding:9px 12px;border:1px solid var(--handout-border);border-radius:8px;background:var(--handout-bg);color:var(--handout-text)}.handout-course-popover [role=listbox]{overflow:auto;min-height:0}.handout-course-popover button{font:inherit;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;width:100%;padding:8px 10px;border:0;border-bottom:1px solid var(--handout-border);background:var(--handout-surface);color:var(--handout-text);text-align:right;cursor:pointer}.handout-course-popover button:hover,.handout-course-popover button.is-selected{background:var(--handout-soft)}.handout-course-popover small{display:block;color:var(--handout-muted);margin-top:3px}.handout-course-popover strong{overflow-wrap:anywhere}.handout-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:14px;margin:14px 0}.handout-card,.handout-bank .handout-class{background:var(--handout-surface);border:1px solid var(--handout-border);border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:12px;overflow-wrap:anywhere;text-align:right}.handout-card-copy{flex:1}.handout-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.handout-card h3{margin:0 0 8px;font-size:18px;line-height:1.65}.handout-card p{line-height:1.8;margin:4px 0;white-space:pre-wrap}.handout-card .handout-meta{font-size:12px;color:var(--handout-muted)}.handout-filename{font-size:12px;color:var(--handout-muted);overflow-wrap:anywhere}.handout-file-mark{align-self:flex-start;background:var(--handout-soft);font:700 12px system-ui;padding:9px 11px;border:1px solid var(--handout-border);border-radius:9px;min-width:48px;text-align:center}.handout-state{display:inline-block;font-size:12px;background:var(--handout-bg);border:1px solid var(--handout-border);border-radius:7px;padding:4px 8px}.handout-state-published{background:var(--handout-success-bg);color:var(--handout-success)}.handout-state-draft{background:var(--handout-warning-bg);color:var(--handout-warning)}.handout-card .handout-edit-button{background:transparent}.handout-actions>button,.handout-native-link{white-space:nowrap;flex-shrink:0}.handout-card .handout-actions>button{flex:1;min-width:90px}.handout-upload{border:1px solid var(--handout-border);background:var(--handout-surface);padding:18px;border-radius:14px;margin:16px 0}.handout-upload h2{font-size:17px;margin-top:0;overflow-wrap:anywhere}.handout-upload p{color:var(--handout-muted);line-height:1.8}.handout-file-input{max-width:480px}.handout-upload-row{display:flex;gap:12px;align-items:center;margin:14px 0;padding-bottom:14px;border-bottom:1px solid var(--handout-border)}.handout-upload-row label{flex:1}.handout-upload-row small{color:var(--handout-muted);overflow-wrap:anywhere}.handout-upload-row.is-done>span{color:var(--handout-success)}.handout-field-error{color:var(--handout-error);font-size:13px;line-height:1.8}.handout-empty{text-align:center;padding:28px 16px;color:var(--handout-muted);grid-column:1/-1}.handout-empty h2{font-size:18px;color:var(--handout-text)}.handout-error,.handout-notice,.handout-warning,.handout-drafts{padding:12px 14px;border:1px solid currentColor;border-radius:10px;line-height:1.8;margin:14px 0}.handout-error{background:var(--handout-error-bg);color:var(--handout-error)}.handout-notice{background:var(--handout-success-bg);color:var(--handout-success)}.handout-warning,.handout-drafts{background:var(--handout-warning-bg);color:var(--handout-warning)}.handout-drafts{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.handout-drafts button{color:var(--handout-text)}.handout-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin:22px 0}.handout-bank .handout-share-row{flex-direction:row;align-items:center;background:var(--handout-surface);padding:14px;margin:10px 0;border:1px solid var(--handout-border);border-radius:10px;overflow-wrap:anywhere}.handout-share-row input,.handout-grant input,.handout-checkbox input{width:20px;height:20px;accent-color:var(--handout-accent);flex-shrink:0}.handout-share-row small{display:block;margin-top:6px;color:var(--handout-muted)}.handout-grant{display:flex;gap:14px;align-items:center;flex-wrap:wrap;background:var(--handout-surface);padding:16px;margin:12px 0;border:1px solid var(--handout-border);border-radius:12px}.handout-grant strong{min-width:140px}.handout-grant strong small{display:block;color:var(--handout-warning);font-size:12px}.handout-bank .handout-grant label,.handout-bank .handout-checkbox{flex-direction:row;align-items:center;line-height:1.8}.handout-grant.is-dirty{border-color:var(--handout-warning)}.handout-modal-overlay,.handout-edit-overlay{position:fixed;inset:0;z-index:1600;background:#0008;display:flex;align-items:center;justify-content:center;padding:14px;direction:rtl}.handout-modal{background:var(--handout-surface);width:100%;height:calc(100dvh - 28px);border:1px solid var(--handout-border);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 25px 75px #0006}.handout-modal>header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 24px;border-bottom:1px solid var(--handout-border);flex-shrink:0}.handout-modal>header h2{font-size:18px;margin:0}.handout-modal>header button{width:44px;height:44px;font-size:25px;border:1px solid var(--handout-border);background:var(--handout-surface);color:var(--handout-text);border-radius:10px;cursor:pointer}.handout-modal>.handout-bank{flex:1}.handout-edit-overlay{z-index:1700}.handout-edit{background:var(--handout-surface);padding:24px;border:1px solid var(--handout-border);border-radius:16px;width:min(600px,100%);max-height:calc(100dvh - 32px);overflow:auto;display:flex;flex-direction:column;gap:16px;box-shadow:0 25px 80px #0006}.handout-edit h2{margin:0;font-size:20px}.handout-edit textarea{min-height:100px}.handout-edit :is(.handout-error,.handout-warning){margin:0}.handout-edit small{color:var(--handout-muted);overflow-wrap:anywhere}.handout-native-link{font-weight:700}.handout-guide-files{margin:18px 0}.handout-guide-files h4{font-size:16px}.handout-picker{padding:14px;border:1px solid var(--handout-border);border-radius:14px;background:var(--handout-bg);display:grid;gap:12px}.handout-picker label{display:flex;align-items:center;gap:8px;padding:10px;background:var(--handout-surface);border-radius:8px}.handout-picker button{min-height:44px}.handout-picker-list{max-height:320px;overflow:auto}.handout-guide-files .handout-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr))}@media(max-width:700px){.handout-bank{padding:16px}.handout-heading{align-items:stretch;flex-direction:column;gap:10px}.handout-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.handout-course-select{grid-column:1/-1}.handout-modal-overlay{padding:0}.handout-modal{border-radius:0;height:100dvh;padding-bottom:env(safe-area-inset-bottom)}.handout-modal>header{padding:8px 16px}.handout-modal>header h2{font-size:16px}.handout-upload-row{align-items:stretch;flex-direction:column}.handout-grant{align-items:start;flex-direction:column}.handout-grant>button{width:100%}.handout-file-toolbar{flex-wrap:wrap;gap:10px}.handout-file-toolbar .handout-search{flex-basis:100%}.handout-file-toolbar>button{width:100%}.handout-edit{padding:18px}.handout-bank select{max-width:100%}.handout-tabs{gap:6px}.handout-tabs button{flex:1;padding-inline:10px}.handout-pagination{gap:12px}}@media(max-width:700px){.handout-tabs .handout-refresh{flex-basis:100%;padding:7px 12px}.handout-bank-modal .handout-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.handout-bank-modal .handout-tabs .handout-refresh{grid-column:1/-1;width:100%;margin:0}}@media(prefers-reduced-motion:reduce){.handout-bank *{scroll-behavior:auto!important}}.handout-list-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 14px;color:#586c66;font-size:14px}.handout-list-summary strong{color:#1c5146;font-size:19px;margin-inline-end:4px}.handout-class-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:22px;margin-bottom:24px}.handout-class-card{--class-accent:#2f806f;--class-action:color-mix(in srgb,var(--class-accent) 70%,#132822);position:relative;min-width:0;overflow:hidden;border:1px solid color-mix(in srgb,var(--class-accent) 32%,#cbd5d0);border-radius:22px;padding:24px;display:flex;flex-direction:column;gap:20px;color:#172620;background:radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--class-accent) 10%,transparent),transparent 38%),linear-gradient(152deg,#fff,#fbfdfc 58%,color-mix(in srgb,var(--class-accent) 5%,#fff));box-shadow:0 16px 38px #14342c12,0 2px 7px #14342c0a;transition:box-shadow .18s,border-color .18s}.handout-class-card.tone-2{--class-accent:#4a70b8}.handout-class-card.tone-3{--class-accent:#8a65ad}.handout-class-card.tone-4{--class-accent:#b06e46}.handout-class-card.tone-5{--class-accent:#447f91}.handout-class-card.tone-6{--class-accent:#7a7650}.handout-class-card:before{content:"";position:absolute;inset:0 0 auto;height:6px;background:linear-gradient(90deg,color-mix(in srgb,var(--class-accent) 35%,transparent),var(--class-action))}.handout-class-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;font-size:12px;line-height:1.8}.handout-class-term{display:flex;align-items:center;gap:6px;color:#596761;min-width:0;overflow-wrap:anywhere}.handout-class-term>svg,.handout-class-count>svg{flex-shrink:0}.handout-class-count{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;border:1px solid color-mix(in srgb,var(--class-accent) 30%,#d7e0dc);background:color-mix(in srgb,var(--class-accent) 9%,#fff);color:var(--class-action);border-radius:10px;padding:4px 9px;font-weight:800}.handout-class-heading{display:flex;align-items:center;gap:13px;flex:1}.handout-class-heading h2{font-size:19px;line-height:1.9;margin:0;overflow-wrap:anywhere}.handout-class-icon{display:grid;place-items:center;flex-shrink:0;width:52px;height:56px;border:1px solid color-mix(in srgb,var(--class-accent) 38%,#d7e0dc);background:color-mix(in srgb,var(--class-accent) 12%,#fff);color:var(--class-action);border-radius:16px;box-shadow:0 7px 18px color-mix(in srgb,var(--class-accent) 10%,transparent)}.handout-class-identifiers{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:14px;margin:0;background:#f5f8f6;border:1px solid #d7dfdc;border-radius:14px}.handout-class-identifiers>div{min-width:0}.handout-class-identifiers>div+div{border-inline-start:1px solid #d7dfdc;padding-inline-start:12px}.handout-class-identifiers dt{font-size:12px;color:#596761;margin-bottom:6px}.handout-class-identifiers dd{font-size:14px;font-weight:800;margin:0;line-height:1.8;overflow-wrap:anywhere}.handout-heading .handout-class-identifiers{margin-top:16px;max-width:540px}.handout-class-teacher{display:flex;align-items:center;gap:12px;padding:11px 13px;border:1px solid #d5ded9;border-radius:13px;background:#f8faf9}.handout-class-teacher>svg{color:var(--class-action);flex-shrink:0}.handout-class-teacher>div{min-width:0}.handout-class-teacher span{display:block;color:#596761;font-size:11px;margin-bottom:3px}.handout-class-teacher strong{display:block;font-size:14px;line-height:1.8;overflow-wrap:anywhere}.handout-class-card>footer{border-top:1px solid #d6dfdb;padding-top:16px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.handout-class-card>footer>span{font-size:11px;color:#596761}.handout-bank .handout-class-open{display:flex;align-items:center;justify-content:center;gap:9px;background:var(--class-action);border-color:var(--class-action);color:#fff;font-size:13px;font-weight:800;padding:11px 14px;box-shadow:0 6px 15px color-mix(in srgb,var(--class-action) 20%,transparent)}.handout-bank .handout-class-empty{padding:45px 20px;border:1px dashed #b8cac2;border-radius:20px;background:#fff}.handout-class-empty>svg{color:#2f806f}.handout-class-empty h2{font-size:18px;line-height:1.9}.handout-class-empty p{line-height:1.9}.handout-card{box-shadow:0 8px 24px #14342c0a}.handout-card>.handout-actions{border-top:1px solid var(--handout-border,#dce5e8);padding-top:14px}@media(hover:hover)and (pointer:fine){.handout-class-card:hover{border-color:var(--class-accent);box-shadow:0 22px 48px color-mix(in srgb,var(--class-accent) 17%,transparent)}}.handout-class-card:focus-within{border-color:var(--class-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--class-accent) 20%,transparent)}@media(max-width:650px){.handout-class-card{padding:20px;gap:17px}.handout-class-grid{gap:16px}.handout-class-card>footer>span{display:none}.handout-bank .handout-class-open{width:100%;font-size:14px}.handout-class-heading h2{font-size:18px}}@media(prefers-reduced-motion:reduce){.handout-class-card{transition:none}}:is(:root[data-theme=dark],.ws-app[data-theme=dark]) .handout-class-card{--class-action:color-mix(in srgb,var(--class-accent) 58%,#d8ebe5);background:radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--class-accent) 17%,transparent),transparent 35%),linear-gradient(152deg,#1b2723,#17211e 62%,#1d2925);color:#f3f8f5;border-color:color-mix(in srgb,var(--class-accent) 42%,#41534d)}:is(:root[data-theme=dark],.ws-app[data-theme=dark]) .handout-class-card :is(.handout-class-identifiers,.handout-class-teacher){background:#202e29;border-color:#3b4c46}:is(:root[data-theme=dark],.ws-app[data-theme=dark]) .handout-class-card :is(dt,.handout-class-term,.handout-class-teacher span,footer>span){color:#b2c0bb}:is(:root[data-theme=dark],.ws-app[data-theme=dark]) .handout-class-card :is(.handout-class-icon,.handout-class-count){background:color-mix(in srgb,var(--class-accent) 18%,#21302b);border-color:#40524b}:is(:root[data-theme=dark],.ws-app[data-theme=dark]) .handout-bank .handout-class-open{color:#15231e}.handout-bank .handout-list-summary{color:var(--handout-muted)}.handout-bank .handout-list-summary strong{color:var(--handout-text);font-size:14px}.handout-bank .handout-class-empty,.handout-heading .handout-class-identifiers{background:var(--handout-surface);border-color:var(--handout-border)}.handout-heading .handout-class-identifiers dt{color:var(--handout-muted)}@media(prefers-contrast:more){.handout-class-card,.handout-class-identifiers,.handout-class-teacher{border-width:2px}}
