/* Agreed teacher workflows: readable conversation, durable outputs, explicit records. */
:root{--workflow-gap:24px;--workflow-muted:#627086}
.page-header h2{font-size:24px;letter-spacing:0}.page-header p{font-size:14px;color:var(--workflow-muted)}
.daily-workbench,.teaching-page,.materials-page{max-width:1160px;margin:0 auto}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}.section-heading h3{font-size:17px;margin:0}.section-heading small{font-size:13px;font-weight:400;color:var(--muted);margin-left:6px}
.workbench-shortcuts{display:flex;flex-wrap:wrap;gap:6px 16px;padding:0 0 24px;border-bottom:1px solid var(--line);margin-bottom:26px}.workbench-shortcuts button{display:flex;align-items:center;gap:9px;padding:10px 12px;min-height:44px;background:transparent;color:var(--ink-2);border:0;border-radius:8px}.workbench-shortcuts button:hover{background:var(--accent-wash);color:var(--accent)}
.workbench-columns{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:32px}.workbench-section{min-width:0}.workbench-task{display:flex;align-items:center;border-bottom:1px solid var(--line-soft);padding:14px 0;gap:12px}.task-complete{border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--accent);width:40px;height:40px;font-size:22px;flex-shrink:0}.task-copy{display:grid;gap:6px;text-align:left;border:0;background:transparent;flex:1;padding:0;color:var(--ink)}.task-copy strong{font-size:15px;font-weight:550;overflow-wrap:anywhere}.task-copy small{font-size:13px;color:var(--muted)}.task-copy .is-overdue{color:#995b0a}.workbench-review{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line-soft)}.workbench-review>div{flex:1;min-width:0}.workbench-review p{font-size:13px;color:var(--muted);line-height:1.6;margin:6px 0 0}.workbench-empty-note{padding:18px 0}.workbench-running{width:100%;display:flex;gap:12px;align-items:center;padding:14px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}.workbench-running>span:last-child{display:grid;gap:5px}.workbench-running small{color:var(--muted)}
/* Teaching outputs: file identity, primary actions, and optional actions stay separate. */
.output-filters{display:flex;gap:12px;align-items:center;margin-bottom:20px}
.output-search{flex:1;min-width:180px}
.output-search input,.output-filters select{height:42px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:0 12px;font-size:14px;color:var(--ink)}
.output-search input{width:100%}
.output-group{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:20px;padding:20px 22px}
.output-group>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.output-group>header>div{min-width:0}
.output-group>header>.text-btn{flex:none;white-space:nowrap;padding:6px 8px}
.output-group h3{font-size:18px;line-height:1.5;margin:0 0 4px;overflow-wrap:anywhere}
.output-group small{font-size:13px;color:var(--workflow-muted)}
.output-targets{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:10px 0 14px}
.output-targets>span{padding:4px 9px;background:#f2f4f8;border-radius:5px;font-size:12px;color:var(--ink-2);overflow-wrap:anywhere}
.output-targets .text-btn{font-size:12px;min-height:32px;text-align:left;padding:6px 4px}
.output-files{border-top:1px solid var(--line-soft)}
.output-file{display:grid;grid-template-columns:40px minmax(0,1fr) auto 36px;align-items:center;gap:12px;padding:18px 0;border-bottom:1px solid var(--line-soft);min-width:0}
.output-file-icon{width:40px;height:44px;display:grid;place-items:center;color:var(--accent);background:var(--accent-wash);border-radius:9px;flex-shrink:0}
.output-file-copy{min-width:0;display:grid;gap:5px}
.output-file-copy strong{font-size:15px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.output-file-actions{display:flex;align-items:center;gap:8px;min-width:0}
.output-file-actions .btn{font-size:13px;min-height:36px;padding:7px 10px;white-space:nowrap;text-decoration:none}
.output-file-actions .output-preview{background:var(--accent-wash);border-color:transparent;color:var(--accent-ink)}
.output-file-actions .output-preview:hover{background:#e3e9ff}
.output-more-button{width:36px;height:36px;display:grid;place-items:center;padding:0;border:0;border-radius:8px;color:var(--ink-2);background:transparent}
.output-more-button:hover{background:var(--hover)}
.output-group footer{display:flex;justify-content:flex-end;padding-top:10px}
.output-group footer .text-btn{min-height:36px}
.output-options-file{display:flex;align-items:center;gap:12px;padding-bottom:18px}
.output-options-file>div{display:grid;gap:5px;min-width:0}
.output-options-file strong{font-size:16px;line-height:1.5;overflow-wrap:anywhere}
.output-options-file small{color:var(--muted);font-size:13px}
.output-option-list{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.output-option{display:flex;align-items:center;gap:12px;width:100%;padding:16px 4px;border:0;background:transparent;color:var(--ink-2);text-align:left}
.output-option+.output-option{border-top:1px solid var(--line-soft)}
.output-option:hover:not(:disabled){background:var(--hover)}
.output-option>svg{flex:none}
.output-option>span{display:grid;flex:1;min-width:0;gap:5px}
.output-option strong{font-size:15px;color:var(--ink);font-weight:550}
.output-option small{font-size:13px;color:var(--muted);line-height:1.5}
.output-option:disabled{cursor:default}
.output-history{margin-top:22px}
.output-history h3{font-size:13px;font-weight:550;color:var(--muted);margin:0 0 8px}
.output-history a{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:46px;padding:10px 4px;border-bottom:1px solid var(--line-soft);font-size:14px;color:var(--ink);text-decoration:none}
.output-history a:hover{background:var(--hover)}
.output-history a>span:first-child{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.output-history small{font-size:11px;background:var(--accent-wash);color:var(--accent-ink);border-radius:4px;padding:3px 6px}
.output-history-download{color:var(--accent-ink);font-size:13px;flex:none}
.target-options{display:flex;flex-wrap:wrap;gap:8px 16px;max-height:35vh;overflow:auto}
.target-options label{display:flex;align-items:center;gap:7px;min-height:40px}
.form-error{color:var(--red);font-size:14px;line-height:1.6}
.assistant-record-receipt{display:flex;justify-content:space-between;align-items:center;gap:12px;border-left:3px solid #557961;background:#f4f8f5;padding:10px 12px;font-size:14px;margin-top:12px}.assistant-record-receipt>span{min-width:0;overflow-wrap:anywhere}.assistant-record-receipt>.text-btn{flex:0 0 auto;white-space:nowrap;min-width:44px;min-height:44px}.composer-context{font-size:12px;color:var(--ink-2);padding-top:9px}.composer-queue-note{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:var(--muted);padding-top:8px}.composer-queue-note .text-btn{font-size:12px;min-height:32px}.assistant-pending [data-send-stage]{font-size:14px}.assistant-message-label time{font-size:11px;opacity:.85}.assistant-shell .assistant-message-text{font-size:16px;line-height:1.75}.assistant-shell .assistant-welcome h1{font-size:28px}.assistant-shell .assistant-welcome{max-width:650px}.assistant-shell .assistant-starters{margin-top:18px}.assistant-shell .assistant-composer:focus-within{outline:none;box-shadow:0 0 0 2px #3458cd14}.auth-card input{letter-spacing:normal}
.knowledge-job-status{grid-column:2/-1;min-width:0;flex-wrap:wrap;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;padding:10px 0;color:var(--muted)}.knowledge-job-status.failed{color:var(--red)}.knowledge-upload-note{font-size:14px;line-height:1.7;color:var(--muted)}.knowledge-files{display:grid;gap:8px;max-height:28vh;overflow:auto}.knowledge-file-row{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.knowledge-file-row small{color:var(--muted)}
@media(min-width:1100px){.assistant-main{max-width:100%;padding-left:28px;padding-right:28px}.assistant-conversation>.assistant-message,.assistant-conversation>.assistant-pending{max-width:820px}.assistant-shell .composer-area{max-width:820px}}
@media(max-width:767px){
 .page-header{gap:12px;margin-bottom:20px}.page-header h2{font-size:22px}.page-header p{font-size:13px;line-height:1.6}.page-header .btn{min-height:44px}
 .workbench-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 4px;padding-bottom:18px;margin-bottom:22px}.workbench-shortcuts button{flex-direction:column;gap:6px;padding:9px 2px;font-size:12px;min-height:60px}.workbench-columns{grid-template-columns:1fr;gap:28px}.workbench-task{padding:13px 0}.task-copy strong{font-size:16px}
 .output-filters{flex-wrap:wrap;gap:10px;margin-bottom:16px}.output-search{flex-basis:100%;min-width:0}.output-filters select{flex:1;min-width:0;height:44px}
 .output-group{padding:16px;margin-bottom:16px}.output-group h3{font-size:17px}.output-group>header>.text-btn{min-height:40px;font-size:13px}.output-targets{margin:8px 0 12px}.output-targets .text-btn{min-height:40px}
 .output-file{grid-template-columns:40px minmax(0,1fr) 40px;gap:12px 10px;padding:16px 0}.output-file-copy{grid-column:2;grid-row:1}.output-file-icon{grid-row:1}.output-more-button{grid-column:3;grid-row:1;width:40px;height:44px}.output-file-actions{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.output-file-actions .btn{min-height:44px;padding:8px 4px;font-size:13px;width:100%}
 .output-group footer{justify-content:flex-start;padding-top:8px}.output-group footer button{min-height:44px}.target-options{max-height:28vh}
 .assistant-shell .assistant-welcome h1{font-size:22px}.assistant-shell .welcome-mark{display:none}.assistant-shell .assistant-welcome .welcome-kicker{font-size:13px}.assistant-shell .assistant-welcome>p:not(.welcome-kicker){font-size:14px}.assistant-shell .assistant-conversation{gap:16px}.assistant-shell .assistant-message-text{font-size:16px;line-height:1.7}.conversation-toolbar{min-height:44px}.conversation-tools .text-btn{font-size:12px;min-height:40px}.conversation-toolbar strong{font-size:12px}.assistant-main{padding:0 16px}.send-button{width:44px;height:44px}.composer-attach,.composer-skill-button{min-height:40px;font-size:12px}.composer-queue-note{align-items:flex-start;line-height:1.5}.composer-queue-note .text-btn{text-align:right;padding-top:0}
 .keyboard-open .assistant-welcome{display:none}.keyboard-open .assistant-shell.is-empty .assistant-conversation{min-height:24px;flex:1}
}

@media(max-width:767px){body[data-page=ai-assistant] .mobile-topbar{grid-template-columns:44px minmax(0,1fr) 44px 44px}body[data-page=ai-assistant] .mobile-topbar .reminder-trigger{grid-column:4}#mobile-conversation-new{grid-column:3;grid-row:1;font-size:25px}body[data-page=ai-assistant] .mobile-page-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}body[data-page=ai-assistant] .conversation-toolbar{display:none}.assistant-shell{padding-top:8px!important}.assistant-threads.history-open{inset:56px 0 calc(62px + env(safe-area-inset-bottom))}}

.output-group footer .text-btn{display:inline-flex;align-items:center;gap:5px}.assistant-shell.is-empty:has(#assistant-input:not(:placeholder-shown)) .assistant-welcome{display:none}@media(max-width:767px){.assistant-composer textarea#assistant-input{resize:none}}

.assistant-alert.assistant-stopped{background:#f4f6f9;border-color:var(--line);color:var(--ink-2)}

.workbench-shortcuts .workbench-more-toggle{display:none}.workbench-more-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.workbench-more-list button{min-height:48px;display:flex;align-items:center;gap:8px}.daily-workbench .workspace-empty{padding:24px 0 28px;min-height:0;text-align:left}.daily-workbench .workspace-empty h3{font-size:16px}@media(max-width:767px){.workbench-shortcuts{grid-template-columns:repeat(5,minmax(0,1fr))}.workbench-shortcuts button:nth-child(n+5):not(.workbench-more-toggle){display:none}.workbench-shortcuts .workbench-more-toggle{display:flex}.workbench-columns{gap:20px}}

/* Knowledge reading, evidence and lifecycle share the desktop/mobile layout. */
.knowledge-workspace{max-width:1100px;margin:0 auto;min-width:0}.knowledge-search{display:flex;gap:10px;margin:18px 0 10px}.knowledge-search label{flex:1;min-width:0}.knowledge-search input{width:100%;min-height:42px}.knowledge-results{display:grid;gap:12px}.knowledge-result{padding:18px;border:1px solid var(--border,#dce2e8);border-radius:12px;background:var(--surface,#fff);min-width:0}.knowledge-result h3{margin:8px 0}.knowledge-result h3 button{font-size:inherit;font-weight:650;text-align:left}.knowledge-result p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;max-height:14em;overflow:auto}.knowledge-warning{padding:10px 12px;border-left:3px solid #bd8a31;background:#fff8e8;color:#765817;overflow-wrap:anywhere}.knowledge-original{white-space:pre-wrap;overflow-wrap:anywhere;max-height:48vh;overflow:auto;background:var(--bg,#f4f6f8);padding:14px;border-radius:8px;font:inherit;line-height:1.7}.knowledge-detail{min-width:0}.knowledge-detail section,.knowledge-detail details{margin:18px 0}.knowledge-detail summary{cursor:pointer;padding:8px 0;font-weight:600}.knowledge-detail textarea{width:100%;max-width:100%;box-sizing:border-box}.knowledge-detail select{max-width:100%}.knowledge-position{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.knowledge-position input{width:76px}.knowledge-version{display:flex;gap:8px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--border,#dce2e8)}.knowledge-version a{overflow-wrap:anywhere}.knowledge-job-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px;color:var(--text-secondary,#667085);font-size:13px}.knowledge-replace{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.knowledge-workspace .page-tabs{overflow-x:auto}.knowledge-workspace .material-row{min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:12px}.knowledge-workspace .material-row-main{min-width:0;flex:1}.knowledge-workspace .material-row-title strong{overflow-wrap:anywhere}.knowledge-workspace .material-meta{flex-wrap:wrap}.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}@media(max-width:640px){.knowledge-workspace .materials-header{align-items:flex-start;flex-direction:column;gap:12px}.knowledge-workspace .material-row{align-items:flex-start}.knowledge-workspace .material-row-main p{font-size:13px}.knowledge-workspace .material-meta{font-size:12px}.knowledge-workspace .material-row-title strong{font-size:15px}.knowledge-result{padding:14px}.knowledge-detail .form-actions{flex-wrap:wrap}.knowledge-detail .form-actions .btn{min-height:40px}.knowledge-workspace .toolbar-actions{flex-wrap:wrap}.knowledge-position{gap:6px}.knowledge-search{gap:6px}}
