:root{--brick:#a83429;--ink:#23262b;--muted:#62676e;--line:#dfddd8;--bg:#f7f6f3;--paper:#fff;--control-border:#c9c6c0;--quiet:#f2f1ed;--sans:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);font:15px/1.55 var(--sans);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}a{color:var(--brick);text-underline-offset:3px}button,input,select,textarea{font:inherit}button,a,input,select,summary{ -webkit-tap-highlight-color:transparent}button,summary{cursor:pointer}[hidden]{display:none!important}:focus-visible{outline:2px solid var(--brick);outline-offset:3px}svg{flex:none}button{color:inherit}h1,h2,p{margin-top:0}h1{font-size:32px;font-weight:650;letter-spacing:-.03em;line-height:1.2}h2{font-size:20px;font-weight:600;line-height:1.3}p{color:var(--muted)}
.app-header{height:64px;flex:none;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;padding:0 28px;position:relative;z-index:20}.brand{color:var(--ink);display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-size:22px;font-weight:650;letter-spacing:-.7px;white-space:nowrap}.brand svg{width:30px;height:30px;color:var(--brick)}.brand-period{color:var(--brick)}.app-tagline{font-size:12px;color:var(--muted);padding-left:24px;border-left:1px solid var(--line)}.account{margin-left:auto;display:flex;align-items:center;gap:20px;font-size:13px}.account>a{color:var(--ink);text-decoration:none;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account button{border:0;background:none;color:var(--muted);padding:8px 0}.account button:hover{color:var(--brick)}
.button{display:inline-flex;align-items:center;justify-content:center;gap:12px;padding:10px 16px;min-height:42px;border:1px solid #cbc6be;border-radius:5px;text-decoration:none;font-size:14px;font-weight:600;color:var(--ink);background:white;line-height:1.4}.button svg{width:20px;height:20px}.button:hover{background:#efede8}.button.primary{background:var(--brick);border-color:var(--brick);color:white}.button.primary:hover{background:#8e2b22}.button:disabled{opacity:.5;cursor:wait}.new-document{width:100%;justify-content:flex-start;margin:0 0 20px}.new-document svg{width:18px;height:18px}.space-sidebar{font-family:var(--sans);padding:28px 16px}.sidebar-note{margin:32px 12px 0;font-size:12px;color:#6e5d54}.library-content{padding:40px clamp(24px,4vw,64px) 64px;max-width:1440px}.page-heading{display:flex;align-items:center;gap:24px;justify-content:space-between;margin-bottom:32px}.page-heading h1{margin:0 0 8px}.page-heading p{margin:0;max-width:65ch}.document-total{font-size:13px;white-space:nowrap;color:var(--muted)}
.library-tools{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:16px}.search-field{display:flex;align-items:center;gap:10px;width:min(380px,60%);border:1px solid #c9c6c0;background:white;padding:0 12px;border-radius:5px}.search-field svg{width:18px;height:18px;color:var(--muted)}.search-field input{width:100%;min-width:0;border:0;outline-offset:0;padding:10px 0;background:none;color:var(--ink)}input::placeholder{color:#71757a}.sort-label{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:8px}.sort-label select{border:0;background:transparent;padding:8px;color:var(--ink)}
.document-list{border-top:1px solid var(--line)}.list-heading,.document-row{display:grid;grid-template-columns:minmax(0,1fr) 180px 55px 36px;align-items:center;gap:20px}.list-heading{padding:10px 16px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line)}.document-row{padding:23px 16px;border-bottom:1px solid var(--line);position:relative;background:rgba(255,255,255,.45)}.document-row:hover{background:#fff}.document-icon{width:28px;height:36px;color:#ad9f95}.document-name{display:flex;align-items:center;gap:18px;min-width:0}.document-name>div{min-width:0}.document-name h2{font-size:16px;margin:0 0 4px;overflow-wrap:anywhere}.document-name a{color:var(--ink);text-decoration:none}.document-name a:hover{color:var(--brick);text-decoration:underline}.document-name span{font-size:12px;color:var(--muted)}.document-row time,.row-words{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.row-actions{position:relative}.row-actions summary{display:grid;place-items:center;list-style:none;height:36px;border-radius:4px}.row-actions summary::-webkit-details-marker{display:none}.row-actions summary svg{width:20px;height:20px;fill:var(--muted)}.row-actions summary:hover{background:#eee8e2}.row-actions[open]{z-index:5}.row-actions form{position:absolute;right:0;top:40px;z-index:10;background:white;border:1px solid var(--line);box-shadow:0 8px 24px #23262b18;border-radius:5px;width:180px;padding:5px}.row-actions :is(button,a){display:block;width:100%;border:0;background:none;padding:9px 12px;text-align:left;font-size:13px;text-decoration:none;color:var(--ink);border-radius:3px}.row-actions :is(button,a):hover{background:#f4f1ec}.no-matches{padding:32px 16px}
.empty-library{padding:52px 24px 56px;border:1px solid var(--line);border-radius:6px;background:#fcfbf9;text-align:center}.blank-page{width:62px;height:82px;margin:0 auto 28px;color:#b3a599}.blank-page svg{width:100%;height:100%}.empty-library h2{font-size:24px;letter-spacing:-.02em;margin-bottom:10px}.empty-library p{margin-bottom:25px}.text-button{background:none;border:0;color:var(--brick);padding:12px;font-size:13px}.text-button:hover{text-decoration:underline}.import-panel{margin-top:32px;padding-top:20px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}.import-panel summary{color:var(--ink);width:fit-content}.import-panel form{display:flex;flex-wrap:wrap;gap:16px;align-items:end;margin:20px 0}.import-panel label{display:grid;gap:6px}.import-panel p{max-width:75ch;margin:16px 0 0}.import-panel input{max-width:100%}
.stack-form{display:grid;gap:20px}.stack-form label{display:grid;gap:7px;font-weight:550;font-size:14px}.stack-form input:not([type=checkbox]){padding:11px 12px;min-width:0;width:100%;border:1px solid #c9c6c0;border-radius:5px;background:#fff;color:var(--ink)}.field-hint{font-size:12px;font-weight:400;color:var(--muted)}.notice{padding:12px 16px;border:1px solid var(--line);border-radius:5px;background:white;font-size:14px}.notice.error{color:#95291f;background:#fff7f5;border-color:#d8a79f}.notice.success{color:#24603b;background:#f2f8f1;border-color:#b6cebb}
.auth-body{min-height:100dvh;background:#f7f6f3}.auth-layout{max-width:1200px;margin:0 auto;min-height:calc(100dvh - 64px);display:grid;grid-template-columns:1.1fr 1fr;gap:100px;padding:64px 48px;align-items:center}.auth-intro h1{font-size:48px;line-height:1.08;letter-spacing:-.035em;margin-bottom:22px}.auth-intro>p{font-size:16px;line-height:1.7}.sample-paper{margin:32px 0 24px;background:white;border:1px solid #ddd8d0;border-radius:2px;padding:25px 30px 22px;max-width:400px;box-shadow:0 6px 24px #584d3910}.sample-rule{display:flex;justify-content:space-between;font-size:10px;color:#6b6660;border-bottom:1px solid #e9e4dc;padding-bottom:12px;margin-bottom:26px}.sample-paper h2{font-size:20px;font-family:Georgia,serif;font-weight:400}.sample-paper p{font:14px/1.7 Georgia,serif;color:#56514b}.sample-caret{display:block;width:1px;height:17px;background:var(--brick);margin-top:16px}.auth-intro .auth-footnote{font-size:12px;line-height:1.6}.auth-panel{background:white;padding:38px;border:1px solid var(--line);border-radius:7px}.auth-panel h2{font-size:24px;letter-spacing:-.02em;margin-bottom:8px}.auth-panel>p{font-size:14px}.auth-panel .stack-form{margin-top:30px}.auth-panel .button{margin-top:4px;justify-content:space-between}.auth-switch{margin:24px 0 0;font-size:13px!important}.preferences-form{max-width:650px}.preferences-form>.button{justify-self:start}.setting-section{border-top:1px solid var(--line);padding-top:24px;margin-top:4px}.setting-section h2{font-size:18px}.setting-section p{font-size:14px}.stack-form .checkbox-label{display:flex;align-items:center;gap:12px}.checkbox-label input{width:18px;height:18px;accent-color:var(--brick)}
.back-link{display:inline-block;margin-bottom:20px;font-size:13px}.history-note{font-size:14px;max-width:75ch}.history-layout{display:grid;grid-template-columns:230px minmax(0,1fr);border:1px solid var(--line);background:white;margin-top:24px}.version-list{list-style:none;padding:0;margin:0;border-right:1px solid var(--line);max-height:550px;overflow:auto}.version-list a{display:grid;gap:4px;padding:18px;text-decoration:none;color:var(--ink);font-size:13px;border-bottom:1px solid var(--line)}.version-list a[aria-current],.version-list a:hover{background:#f4eeea}.version-list time,.version-list span{font-size:11px;color:var(--muted)}.version-preview{padding:28px;min-width:0}.version-preview h2{font-size:18px}.version-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:15px/1.8 var(--sans);max-height:480px;overflow:auto}.preview-heading{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}.preview-heading h2{margin:0}.activity-values{display:grid;grid-template-columns:200px auto;max-width:360px;gap:8px}.activity-values dd{margin:0;font-variant-numeric:tabular-nums}.error-page{padding:64px 24px;max-width:750px;margin:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Extend the extracted editor's layout without changing document typography. */
.write-editor .app-header{z-index:20}.write-editor .document-title{font-size:18px;font-weight:600;letter-spacing:-.01em;border:1px solid transparent;background:transparent;border-radius:4px;padding:5px 7px;min-width:80px;max-width:600px;flex:1;color:var(--ink)}.document-title:hover,.document-title:focus{border-color:#c9c6c0;background:#fff}.write-editor .writing-toolbar .grow{flex:0}.title-feedback{font-size:12px;color:var(--brick);max-width:180px}.title-feedback:empty{display:none}.write-editor .app-tagline{display:none}.write-editor .export-quick{font-size:12px;padding:6px 12px;min-height:32px}.write-editor.is-focused .app-header{display:none}.write-editor .fhint{color:var(--muted)}.conflict-notice{flex:none;padding:10px 18px;background:#fff4e2;color:#714a12;font-size:13px;display:flex;align-items:center;gap:12px}.conflict-notice button{margin-left:auto;white-space:nowrap}.write-editor .shell{min-height:0}.write-editor .sidebar-note{font-size:12px}.write-editor .status.error{max-width:240px;white-space:normal}.write-editor .app-header :is(button,a){font-family:var(--sans)}
@media(max-width:1100px){.auth-layout{gap:48px;padding:40px}.library-content{padding:32px 24px}.list-heading,.document-row{grid-template-columns:minmax(0,1fr) 150px 36px}.list-heading>span:nth-child(3),.row-words{display:none}}
@media(max-width:900px){.space-sidebar{padding:0 24px}.new-document{width:auto;margin-bottom:8px}.sidebar-note{display:none}.app-header{padding:0 20px}.library-content{padding:32px 24px}.auth-layout{gap:28px;padding:36px 28px}.auth-intro h1{font-size:40px}.auth-panel{padding:28px}.app-tagline{display:none}.write-editor .writing-toolbar{flex-wrap:nowrap}.write-editor .status{font-size:11px}}
@media(max-width:650px){.app-header{height:56px;padding:0 16px}.brand{font-size:20px}.brand svg{width:27px;height:27px}.account{gap:16px;font-size:12px}.account>a{max-width:115px}.auth-layout{display:flex;flex-direction:column;align-items:stretch;gap:24px;padding:32px 20px}.auth-intro h1{font-size:36px;margin-bottom:12px}.auth-intro h1 br{display:none}.auth-intro>p{font-size:14px}.sample-paper,.auth-footnote{display:none}.auth-panel{padding:24px}.auth-panel h2{font-size:22px}.auth-panel .stack-form{margin-top:24px}.space-sidebar{padding:0 16px}.library-content{padding:28px 16px 48px}.page-heading{gap:12px;margin-bottom:24px;align-items:start}.page-heading h1{font-size:27px}.page-heading p{font-size:14px}.document-total{display:none}.library-tools{align-items:stretch;gap:12px;flex-direction:column}.search-field{width:100%}.sort-label{justify-content:flex-end}.list-heading{display:none}.document-row{grid-template-columns:minmax(0,1fr) 32px;gap:10px;padding:20px 10px}.document-row>time{display:none}.document-name{gap:13px}.document-name h2{font-size:15px}.empty-library{padding:40px 16px}.empty-library h2{font-size:22px}.empty-library p{font-size:14px}.history-layout{grid-template-columns:1fr}.version-list{max-height:190px;border-right:0;border-bottom:1px solid var(--line)}.version-preview{padding:22px}.write-editor .document-title{font-size:15px;width:100%;max-width:none}.write-editor .writing-toolbar{gap:4px;padding:8px}.write-editor .status{font-size:10px;padding:3px;max-width:85px;white-space:normal}.write-editor .export-quick{display:none}.write-editor .aibtn{padding:6px;margin-left:0}.conflict-notice{align-items:start;flex-direction:column}.conflict-notice button{margin-left:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}
@media print{.app-header,.conflict-notice{display:none!important}}

.write-editor .ql-editor p{color:inherit}
/* Faculty and student workflows extend the existing WriteNow workspace. */
.faculty-form,.workflow-form,.form-section{max-width:760px;width:100%}.stack-form textarea,.stack-form select,.review-version select{width:100%;border:1px solid #c6c4bf;border-radius:7px;background:#fff;color:var(--ink);font:inherit;padding:11px 12px}.stack-form textarea{resize:vertical;min-height:110px;line-height:1.6}.stack-form fieldset{border:0;border-top:1px solid var(--line);padding:22px 0 0;margin:12px 0}.stack-form legend{font-size:18px;font-weight:650;padding:0 12px 0 0}.stack-form .check-row{display:flex;align-items:flex-start;gap:12px;cursor:pointer;margin:12px 0;font-weight:600}.check-row input[type=checkbox]{width:18px;height:18px;margin:4px 0 0;flex-shrink:0;accent-color:var(--brick)}.check-row .field-hint{display:block;font-weight:400;line-height:1.6;margin-top:4px}.date-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.date-fields input{min-width:0;padding:9px 6px}.section-block{margin:30px 0;padding-top:22px;border-top:1px solid var(--line)}.section-heading,.portal-summary,.course-row,.assignment-row,.portal-assignment{display:flex;justify-content:space-between;align-items:center;gap:24px}.section-heading{margin-bottom:12px}.section-heading h2{margin:0}.portal-summary{padding:24px 0;border-block:1px solid var(--line)}.portal-summary h2{margin:0}.course-row,.assignment-row,.portal-assignment{padding:20px 0;border-bottom:1px solid var(--line)}.course-row h2,.course-row h3,.assignment-row h2,.assignment-row h3,.portal-assignment h3{font-size:18px;margin:0 0 5px}.course-row p,.assignment-row p{margin:0;font-size:13px}.course-row>div,.assignment-row>div,.portal-assignment>div{min-width:0}.faculty-row-actions,.portal-access{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.faculty-row-actions{flex-shrink:0}.state{font-size:13px;color:#266448}.setup-intro{padding:36px 0;max-width:620px}.setup-intro h2{font-size:28px;line-height:1.25}.setup-intro p,.access-help{max-width:65ch;line-height:1.7}.setup-intro .button{margin-top:10px}.policy-line{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:13px;color:var(--muted);margin:12px 0}.policy-line span+span{border-left:1px solid var(--line);padding-left:20px}.table-scroll{position:relative;max-width:100%;overflow:auto;overscroll-behavior-x:contain}.roster-table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}.roster-table th,.roster-table td{padding:15px 12px;border-bottom:1px solid var(--line);vertical-align:top}.roster-table thead{background:#f2f1ed}.roster-table tbody th{font-weight:600}.preserve-lines{white-space:pre-wrap;overflow-wrap:anywhere}.portal-welcome{padding:18px 0 24px;border-bottom:1px solid var(--line);margin-bottom:24px}.portal-welcome h1{font-size:clamp(30px,4vw,46px);line-height:1.15;max-width:22ch;margin:0 0 20px;text-wrap:balance}.portal-welcome p{max-width:65ch;line-height:1.7}.accent-forest{--brick:#27614d;--brick-hover:#194b3a}.accent-ocean{--brick:#285e83;--brick-hover:#194965}.portal-page a{color:var(--brick)}.portal-page .primary{background:var(--brick);color:white}.portal-page .primary:hover{background:var(--brick-hover,#8e2b22)}.review-version{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:24px 0}.review-version select{width:auto;max-width:100%}.review-paper{background:white;max-width:900px;border:1px solid var(--line);border-radius:4px;min-height:400px;padding:35px}.review-paper .ql-container{border:0!important;font-size:16px}.review-paper .ql-editor{padding:0;line-height:1.7;overflow-wrap:anywhere}.review-paper .ql-editor p{color:inherit}.review-paper .ql-editor img{max-width:100%}.event-list{max-height:320px;overflow:auto;list-style:none;padding:0}.event-list li{display:flex;justify-content:space-between;gap:20px;padding:8px 0;border-bottom:1px solid var(--line);font-size:13px}.coach-message{max-width:70ch;padding:12px 0;border-bottom:1px solid var(--line)}.coach-message h3{font-size:14px}.paste-feedback{color:#8a291f;font-weight:600}.button:disabled{opacity:.55;cursor:not-allowed}.stack-form[hidden]{display:none}.faculty-form input:read-only{background:#f2f1ed}.faculty-form input:focus-visible,.faculty-form textarea:focus-visible,.faculty-form select:focus-visible{outline:2px solid var(--brick);outline-offset:3px}
@media(max-width:760px){.section-heading,.portal-summary,.course-row,.assignment-row,.portal-assignment{align-items:flex-start;flex-direction:column;gap:14px}.section-heading{gap:12px}.date-fields{grid-template-columns:1fr}.faculty-row-actions{flex-wrap:wrap;gap:16px}.portal-access{gap:18px;font-size:14px}.portal-welcome{padding-top:6px}.review-paper{padding:20px 14px}.policy-line{gap:8px 12px}.policy-line span+span{padding-left:12px}.roster-table th,.roster-table td{padding:12px 10px;min-width:100px}}

.review-paper .ql-toolbar{display:none}

/* Compact document chrome: title/actions above the paper, save state below it. */
.write-editor .app-header{height:48px;min-height:48px;padding-inline:20px}
.write-editor .brand{font-size:20px}.write-editor .brand svg{width:26px;height:26px}
.write-editor .account{font-size:12px;gap:20px}
.write-editor .writing-toolbar{padding:4px 16px;gap:8px;min-height:42px;flex-wrap:nowrap}
.write-editor .document-title{font-size:16px;max-width:none;padding:4px 6px;min-width:0}
.write-editor .export-quick{display:inline-flex;gap:7px;min-height:30px;padding:5px 10px;flex:none;font-size:12px;white-space:nowrap}
.export-quick svg{width:15px;height:15px}
.write-editor .document-commands{padding:0 16px 3px 46px;gap:8px;min-height:30px}
.write-editor .document-commands .mbtn{padding:4px 9px}
.write-editor .editfoot{padding:3px 16px;min-height:34px;gap:14px;flex-wrap:wrap;position:relative;z-index:8}
.write-editor .editfoot .status{font-size:11px;padding:2px 0;margin:0;flex:none;max-width:min(100%,360px);white-space:normal}
.write-editor .editfoot .status.error{color:var(--brick);font-weight:600}
.document-reference{position:relative;flex:none;color:var(--muted)}
.document-reference summary{cursor:pointer;padding:5px 0;font-size:11px;white-space:nowrap}
.reference-popover{position:absolute;bottom:calc(100% + 10px);left:0;width:340px;max-width:calc(100vw - 32px);padding:16px;background:white;border:1px solid var(--line);border-radius:6px;box-shadow:0 8px 24px #23262b22;color:var(--ink);font-size:12px;line-height:1.5;z-index:30}
.reference-popover label{display:block;font-weight:600;margin-bottom:8px}
.reference-popover input{width:100%;font:11px ui-monospace,monospace;border:1px solid var(--line);border-radius:4px;padding:8px 6px;color:var(--ink);background:var(--background)}
.reference-popover p{margin:10px 0 0;font-size:12px}
.document-id-line{font-size:12px;margin:12px 0 20px;color:var(--muted)}
.document-id-line code{font-size:12px;overflow-wrap:anywhere;user-select:all;margin-left:6px;color:var(--ink)}
.write-editor .aipanel{bottom:34px}
.member-row{align-items:flex-start}.member-row .faculty-row-actions{flex-shrink:1;justify-content:flex-end;gap:10px 16px}.member-access{margin:0;gap:10px}
.section-block>p,.library-content>p{max-width:75ch;overflow-wrap:anywhere}
.event-list li>div{min-width:0}.event-list time{white-space:nowrap;color:var(--muted)}.event-list p{margin:3px 0}
.review-version select{min-width:0}
@media(max-width:900px){.write-editor .space-menu-toggle{min-height:36px;padding-block:5px}}
@media(max-width:650px){
 .write-editor .app-header{padding-inline:12px}.write-editor .account{gap:12px}
 .write-editor .writing-toolbar{padding:3px 8px;gap:4px;min-height:40px}
 .write-editor .document-title{font-size:15px}.write-editor .title-feedback{position:absolute;top:100%;left:16px;background:white;z-index:20}
 .write-editor .document-commands{padding:0 8px 3px;gap:0}.write-editor .document-commands .mbtn{padding:6px 8px}
 .write-editor .editfoot{padding:3px 10px;gap:4px 12px;min-height:36px}.write-editor .editfoot .status{font-size:11px;max-width:100%}
 .write-editor .editfoot .grow{display:none}.write-editor .editfoot .mobile-view-label{display:none}
 .document-reference{margin-left:auto;position:static}.reference-popover{left:auto;right:10px;bottom:calc(100% + 6px)}
 .member-row .faculty-row-actions{justify-content:flex-start;width:100%}.member-access{width:100%;flex-wrap:nowrap}.member-access select{flex:1;width:0}.member-access .button{flex:none}
 .event-list li{gap:8px;flex-wrap:wrap}.review-version{gap:8px}
}
@media print{.document-commands,.app-header{display:none!important}}
.review-field{display:flex;align-items:center;gap:8px;min-width:0}
@media(max-width:650px){
 .page-heading{flex-direction:column;align-items:flex-start}.page-heading>.button{align-self:flex-start}
 .activity-filters{align-items:flex-end}.activity-filters .review-field{flex-direction:column;align-items:flex-start}
 .write-editor #toolbar:not(.show-more) .mobile-extra{display:none}
 .write-editor #instructionsQuick{display:none}
}

/* Paste evidence belongs to instructor review, never to authored document styles. */
.paste-review-tools,.paste-entry-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.paste-toggle{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.paste-toggle input{width:18px;height:18px;accent-color:var(--brick)}
.review-paper .review-paste{background:#fbe5a5;color:#23262b;box-shadow:inset 0 -1px #92702d}
.review-paper .selected-paste{outline:2px solid var(--brick);outline-offset:1px}
.paste-list{list-style:none;padding:0;margin:0;max-width:900px}
.paste-list>li{padding:20px 0;border-bottom:1px solid var(--line)}
.paste-entry-heading strong{font-size:15px}.paste-entry-heading p{margin:4px 0}
.paste-original{margin-top:12px}.paste-original summary{font-size:14px;font-weight:600;cursor:pointer}
.paste-original pre{white-space:pre-wrap;overflow-wrap:anywhere;font:15px/1.65 var(--sans);padding:16px;background:var(--paper);border:1px solid var(--line);max-height:320px;overflow:auto;margin:12px 0}
.paste-explanation{max-width:75ch}
@media(max-width:650px){.paste-review-tools,.paste-entry-heading{align-items:flex-start;gap:12px}.paste-original pre{padding:12px}.paste-entry-heading .button{min-height:40px}}

/* Teaching workflows extend the existing form and document surfaces. */
.form-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-block:16px}
.settings-section{border-top:1px solid var(--line);padding-block:16px}.settings-section>summary{font-weight:600;font-size:17px;min-height:32px}.settings-section>summary>span{font-weight:400;font-size:13px;color:var(--muted);margin-left:12px}.settings-section>form,.settings-section>p{margin-top:20px}.settings-section label{margin-block:12px}.settings-section .stack-form label{margin:0}
.stack-form :is(textarea,select),.settings-section :is(textarea,select){font:inherit;color:var(--ink);background:#fff;border:1px solid #c9c6c0;border-radius:5px;padding:10px 12px;max-width:100%;width:100%;min-width:0}.stack-form textarea{resize:vertical}.stack-form fieldset{border:1px solid var(--line);padding:20px;min-width:0;border-radius:5px;display:grid;gap:16px}.stack-form legend{padding-inline:6px;font-weight:600}.stack-form>button{justify-self:start}
.score-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(100px,1fr);gap:16px}.rubric-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.rubric-builder-row+.rubric-builder-row{margin-top:20px}.rubric-guide{font-size:13px;margin-block:12px}.rubric-guide summary{min-height:30px}.rubric-guide dd{margin:4px 0 16px;color:var(--muted)}.rubric-guide dt{font-weight:600}.rubric-table td{min-width:150px;vertical-align:top}.rubric-table th:first-child{min-width:160px}.rubric-table td:nth-child(2){min-width:60px}.grade-total{font-size:24px;color:var(--ink)}.grade-total .field-hint{margin-left:12px}.peer-feedback{padding-block:20px;border-top:1px solid var(--line)}.peer-feedback>summary{font-weight:600;min-height:40px}.inline-score{display:flex;align-items:center;gap:8px}.inline-score input{width:70px;padding:8px;border:1px solid var(--line);border-radius:4px}.inline-score span{white-space:nowrap}
.review-with-comments{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);align-items:start;gap:20px}.review-with-comments .review-paper{margin-top:0;min-width:0;padding:24px}.review-with-comments .wc-rail{position:sticky;top:calc(var(--header) + 20px);max-height:calc(100dvh - var(--header) - 40px);overflow:auto}.review-with-comments:has(>.review-paper:only-child){grid-template-columns:minmax(0,1fr)}
.writer-comments{flex:0 0 300px;width:300px;background:var(--bg);border-left:1px solid var(--line);padding:12px;overflow:auto}.workarea{position:relative}.stage-notice{margin:0;background:#fff5e5;color:#67451d;font-size:12px;padding:8px 16px}.write-editor .document-commands{flex-wrap:wrap}.wc-acts button{min-height:32px}.wc-float{min-height:32px}.wc-card:focus-within{outline:1px solid var(--brick)}
.diff-paper{background:#fff;border:1px solid var(--line);padding:32px;max-width:900px;font:16px/1.85 Georgia,serif;overflow-wrap:anywhere}.diff-paper p{color:var(--ink);white-space:pre-wrap}.diff-paper ins,.diff-key ins{background:#def0df;color:#1c5a31;text-decoration:none;border-bottom:2px solid #36754b}.diff-paper del,.diff-key del{background:#fae4e0;color:#852c26}.diff-paper h1{font-size:26px}.diff-paper h2{font-size:22px}.diff-paper .li{padding-left:20px}.diff-key{font-size:13px}.diff-key ins,.diff-key del{padding:3px 5px}.wc-error{font-size:12px}
@media(max-width:1100px){.review-with-comments{grid-template-columns:minmax(0,1fr)}.review-with-comments .wc-rail{position:static;max-height:none}.writer-comments{position:absolute;right:0;top:0;bottom:0;z-index:10;box-shadow:-4px 0 16px #23262b18}}
@media(max-width:650px){.score-fields,.rubric-levels{grid-template-columns:1fr}.stack-form fieldset{padding:14px}.review-with-comments .review-paper{padding:16px 10px}.writer-comments{width:min(320px,100%)}.settings-section>summary>span{display:block;margin-left:18px}.diff-paper{padding:20px 16px}.form-actions .button{white-space:normal}}

/* Consistent controls and reading rhythm across teaching and account pages. */
.library-content :is(.page-heading,.section-heading,.course-row,.assignment-row,.portal-assignment)>*{min-width:0}
.library-content :is(h1,h2,h3){overflow-wrap:anywhere}
.page-heading h1{text-wrap:balance}.page-heading>.button{flex-shrink:0}
.section-heading p{margin:6px 0 0}.portal-summary p{margin:6px 0 0}
.portal-summary+.section-block{border-top:0;margin-top:24px;padding-top:0}
.course-row,.assignment-row,.portal-assignment{flex-wrap:wrap}
.course-row>div:first-child,.assignment-row>div:first-child,.portal-assignment>div:first-child{flex:1 1 240px}
.faculty-row-actions{flex-shrink:1}.course-row>form,.portal-assignment>form{flex-shrink:0}
.stack-form :is(input,textarea,select){font-weight:400}
.stack-form :is(input,textarea,select):disabled,.stack-form :is(input,textarea):read-only{color:var(--ink);background:var(--quiet);opacity:1}
.stack-form input[type=checkbox]:disabled{opacity:.55}
.stack-form+.access-help,.stack-form+p{margin-top:24px}
.settings-section>summary{padding-block:4px;min-height:36px}
.settings-section>label:not(.check-row){display:grid;gap:7px;font-size:14px;font-weight:550}
.settings-section>label:not(.check-row) :is(select,input,textarea){font-weight:400}
.settings-section>.check-row{margin-block:16px}
.stack-form>.settings-section{padding-block:14px}
.date-fields--pair,.equal-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.roster-table{font-variant-numeric:tabular-nums}
.roster-table tbody tr:hover{background:var(--paper)}
.roster-table :is(th,td)>.field-hint{display:block;margin-top:4px}
.roster-table input[type=checkbox]{width:18px;height:18px;margin:2px;accent-color:var(--brick)}
.table-scroll:focus-visible{outline-offset:3px}
.table-scroll+p,.grade-general{margin-top:18px}
.inline-score input{font:inherit;color:var(--ink);background:var(--paper);min-height:42px;border-color:var(--control-border)}
.inline-score .button{padding-inline:12px}
.review-version .review-field{flex-wrap:wrap}
.review-version .review-field select{flex:1;min-width:150px}
.section-block>summary{font-weight:600;min-height:36px;padding-block:4px}
.section-block>summary+*{margin-top:16px}
.rubric-builder-row>.text-button{justify-self:start}
.rubric-guide dl{margin-bottom:0}.rubric-guide dd:last-child{margin-bottom:0}
#write-content:focus{outline:none}
@media(max-width:760px){
 .course-row>div:first-child,.assignment-row>div:first-child,.portal-assignment>div:first-child{flex-basis:auto}
 .date-fields--pair{grid-template-columns:1fr}
 .review-version .review-field{width:100%;align-items:flex-start;flex-direction:column;gap:6px}
 .review-version .review-field select{width:100%}
 .table-scroll{scrollbar-gutter:stable}
}
@media(max-width:650px){
 .stack-form :is(input:not([type=checkbox]),select,textarea),.review-version select{font-size:16px}
 .library-content .button{min-height:44px}.library-content :is(.settings-section,.section-block)>summary{min-height:44px}
 .equal-fields{grid-template-columns:1fr}.activity-values{grid-template-columns:minmax(0,1fr) auto}
 .account>a{max-width:115px}.row-actions summary{min-height:44px}
 .library-content .row-actions :is(button,a){min-height:44px}
}
/* Test student view: a persistent strip with the way back to the faculty view. */
.preview-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;padding:8px 28px;background:#fff5e5;border-bottom:1px solid #ecd3a8;color:#67451d;font-size:13px}.preview-banner p{margin:0;color:inherit;max-width:80ch}.preview-banner .button{min-height:34px;padding:6px 12px;font-size:13px}.write-editor .preview-banner{flex:none;padding:6px 18px}
@media(max-width:650px){.preview-banner{padding:8px 16px}}

/* Editor header: row 1 holds identity and the panels that open beside the paper; row 2 holds the
   document menus on the left and the assignment's pages and PDF on the right. Assignment access
   lives in the status bar, next to Document ID. */
.write-editor .writing-toolbar.has-policy .document-title{flex:0 1 auto;width:auto;field-sizing:content;max-width:min(60ch,100%)}
.write-editor .writing-toolbar.has-policy .grow{flex:1}
.write-editor .doc-step{flex:none;color:#62676e;font-size:12px;white-space:nowrap;text-decoration:underline;text-decoration-color:#cbc6be;text-underline-offset:3px}
.write-editor .doc-step:hover{color:var(--brick);text-decoration-color:currentColor}
.write-editor .headbtn,.write-editor .writing-toolbar .aibtn{display:inline-flex;align-items:center;gap:6px;height:32px;margin:0;padding:0 12px;border:1px solid var(--line);border-radius:6px;background:#fff;font:600 12.5px var(--sans);white-space:nowrap;cursor:pointer;flex:none}
.write-editor .headbtn{color:#3f4349}
.write-editor .headbtn svg,.write-editor .viewlink svg{width:16px;height:16px;flex:none}
.write-editor .headbtn:hover{border-color:#cfcac3;background:#faf9f7}
.write-editor .headbtn[aria-expanded=true]{border-color:#e3c9c2;background:#f4ebe7;color:var(--brick)}
.write-editor .writing-toolbar .aibtn:hover{border-color:var(--brick);background:#fbf2f0}
.write-editor .writing-toolbar .aibtn[aria-pressed=true]{border-color:var(--brick);background:var(--brick);color:#fff}
.write-editor .document-views{margin-left:auto;gap:2px}
.write-editor .viewlink{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:5px;color:#51555b;font:500 12.5px var(--sans);text-decoration:none;white-space:nowrap}
.write-editor .viewlink:hover{background:#f4ebe7;color:var(--brick)}
.write-editor .document-views .export-quick{margin-left:6px}
.write-editor .paste-feedback{color:#67451d;font-weight:500}
.write-editor .access-popover .access-title{margin:0;font-weight:600}
@media(max-width:650px){
 .write-editor .doc-step{display:none}
 .write-editor .writing-toolbar.has-policy .document-title{flex:1 1 auto;max-width:none;text-overflow:ellipsis}
 .write-editor .headbtn,.write-editor .writing-toolbar .aibtn{width:34px;height:34px;padding:0;justify-content:center;min-height:0}
 .write-editor .headbtn span,.write-editor .writing-toolbar .aibtn span,.write-editor .viewlink span,.write-editor .document-views .export-quick span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .write-editor .document-commands{flex-wrap:nowrap;gap:4px}
 .write-editor .document-commands .menubar{flex-wrap:nowrap;min-width:0}
 .write-editor .document-commands .mbtn{padding:6px 6px}
 .write-editor .viewlink{width:32px;padding:0;justify-content:center}
 .write-editor .document-views{gap:0}
 .write-editor .document-views .export-quick{width:32px;min-height:30px;padding:0;justify-content:center;margin-left:2px}
 .write-editor .access-reference{margin-left:0}
}
/* The header stays at the top of every page; anything else that sticks sits below it, and links to a
   section land below it too. The editor scrolls inside its own panel, so this changes nothing there. */
:root{--header:64px}
@media(max-width:650px){:root{--header:56px}}
html{scroll-padding-top:calc(var(--header) + 16px)}
.app-header{position:sticky;top:0}
