:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#253c31;background:#f4f6f3;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{background:white;color:#285441;border:1px solid #d7dfd8;border-radius:7px;padding:10px 14px;cursor:pointer}button:hover{background:#edf2ed}button:disabled{opacity:.5;cursor:wait}input,textarea{border:1px solid #d7dfd8;border-radius:6px;padding:10px}header{height:70px;display:flex;align-items:center;gap:24px;padding:0 32px;background:white;border-bottom:1px solid #dde4dd}#home{font-size:22px;font-weight:bold;border:0}small{display:block;font-size:10px;letter-spacing:1.3px;color:#788a80}#nav{display:flex;flex:1;min-width:0}#nav button{border:0;border-left:1px solid #dde4dd;border-radius:0;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}main{padding:22px 32px;max-width:1600px;margin:auto}h1{font-size:28px;margin:8px 0 25px}h2{font-size:15px;margin:0}#notice{margin:16px 32px 0;color:#963d30;white-space:pre-wrap}.muted{color:#7b877f;line-height:1.7}.panel{border:1px solid #dce3db;border-radius:10px;background:white;overflow:hidden}.bar{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid #e6ebe5;gap:10px}.create{display:flex;gap:10px;margin-bottom:20px}.create input{width:330px}table{width:100%;border-collapse:collapse;table-layout:fixed}td,th{padding:16px 20px;text-align:left;border-bottom:1px solid #edf0eb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}td button{border:0;padding:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}th{font-size:11px;color:#7c897f;background:#fafbf8}.empty{padding:28px;color:#7b877f}.task{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:20px;height:calc(100vh - 190px);min-height:520px}.document{display:flex;flex-direction:column;min-width:0}#editor{width:100%;flex:1;resize:none;border:0;border-radius:0;line-height:1.8;padding:26px;font-family:ui-monospace,monospace}#preview{overflow:auto;padding:26px;line-height:1.8;overflow-wrap:anywhere;flex:1}#preview h1{font-size:24px}#preview pre{white-space:pre-wrap;background:#f4f6f3;padding:12px}.side{display:grid;grid-template-rows:1fr 1fr;gap:20px;min-height:0}.manager{display:flex;flex-direction:column;min-height:0}#messages{overflow:auto;flex:1;padding:14px;min-height:90px}.message{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:#f4f6f2;border-radius:8px;margin-bottom:10px;line-height:1.6}.message.user{background:#edf4ee}.message.error{border:1px solid #e7b7b1}#sendForm{display:flex;padding:12px;border-top:1px solid #e6ebe5;gap:8px}#prompt{width:100%;resize:vertical;max-height:170px;min-height:60px}#saveState,#sessionState{font-size:11px;color:#79877c}dialog{border:1px solid #dbe3db;border-radius:12px;max-width:440px;padding:28px}dialog::backdrop{background:#182b2844}dialog input{width:100%;margin:15px 0}#loginError{color:#963d30}[hidden]{display:none!important}@media(max-width:900px){header{padding:0 12px;gap:8px}main{padding:20px 14px}#nav button{max-width:100px;padding:8px}.task{grid-template-columns:1fr;height:auto}.document{min-height:520px}.side{grid-template-rows:160px 420px}}
/* Scope workspaces */
.scope-rest{margin-top:26px}.memory-panel{min-height:390px}.memory-split{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:340px}.memory-list{border-right:1px solid #e6ebe5;padding:10px;max-height:580px;overflow:auto}.memory-list button{display:block;width:100%;text-align:left;border:0;padding:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.memory-list button strong{display:block;overflow:hidden;text-overflow:ellipsis}.memory-list button small{margin-top:5px;overflow:hidden;text-overflow:ellipsis}.memory-list button.selected{background:#edf4ee}.memory-body{min-width:0}.memory-fields{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;padding:18px 20px 0}.field span{display:block;font-size:11px;color:#79877c;margin-bottom:5px}.field input{width:100%;min-width:0}.metadata{padding:0 20px;font-size:11px;color:#7b877f}.memory-editor{display:block;width:100%;min-height:245px;resize:vertical;border:0;border-radius:0;line-height:1.8;padding:16px 20px;font-family:ui-monospace,monospace}.memory-preview{padding:16px 20px;min-height:245px;line-height:1.8;overflow-wrap:anywhere}.memory-preview h1{font-size:24px}.floating-manager{position:fixed;right:24px;bottom:24px;width:370px;height:440px;z-index:20;box-shadow:0 12px 45px #173b2925}.manager-circle{position:fixed;right:26px;bottom:26px;width:55px;height:55px;border-radius:50%;background:#285441;color:white;font-size:22px;z-index:20;box-shadow:0 8px 24px #173b2925}.manager-messages{overflow:auto;flex:1;padding:14px;min-height:90px}.manager-state{font-size:10px;color:#79877c}.manager-send{display:flex;padding:12px;gap:8px;border-top:1px solid #e6ebe5}.manager-send textarea{width:100%;min-height:60px;max-height:140px;resize:vertical}.cells-panel{margin-top:26px}.inline-form{display:flex;gap:8px;min-width:0}.inline-form input{min-width:0;width:190px}.cells-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:14px}.cells-list button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.cell-detail:not(:empty){border-top:1px solid #e6ebe5}.cell-note{font-size:12px;color:#7b877f;padding:0 20px}.cell-graph{padding:24px;display:flex;flex-wrap:wrap;align-items:center;gap:20px;background:#fafbf9;min-height:160px}.cell-box{border:1px solid #bacdbe;background:white;padding:15px;border-radius:8px;min-width:150px;max-width:250px;overflow-wrap:anywhere;position:relative}.cell-box small{margin-top:6px}.child-cell{background:#edf4ee}.node-icon{border:0;padding:0 8px 0 0;vertical-align:middle}.cell-forms{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:20px}.cell-forms form{display:flex;flex-direction:column;gap:10px}.cell-forms textarea{min-height:90px;resize:vertical}.cell-forms select{padding:10px;border:1px solid #d7dfd8;border-radius:6px;background:white}.node-content{border-top:1px solid #e6ebe5;padding:20px}.node-content pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.8}
@media(max-width:900px){.memory-split{grid-template-columns:170px minmax(0,1fr)}.memory-fields{grid-template-columns:1fr}.floating-manager{right:14px;bottom:14px;width:min(370px,calc(100vw - 28px))}.cell-forms{grid-template-columns:1fr}.cells-panel>.bar{flex-wrap:wrap}.inline-form{width:100%}.inline-form input{flex:1}}
@media(max-width:560px){.memory-split{grid-template-columns:1fr}.memory-list{border-right:0;border-bottom:1px solid #e6ebe5;max-height:160px}.cells-list{grid-template-columns:1fr}}

.task-doc-stack{display:flex;flex-direction:column;min-width:0;min-height:0}.task-doc-stack>.document{flex:1;min-height:0}.memory-tab .memory-editor{flex:1;resize:none}.task-cell-controls{display:flex;padding:10px;gap:6px}.task-cell-controls select{min-width:0;flex:1;padding:8px;border:1px solid #d7dfd8;border-radius:6px;background:white}.task-cell-view{overflow:auto;min-height:0}.side>section:first-child{display:flex;flex-direction:column;min-height:0}.task-graph{padding:10px;gap:8px;min-height:70px}.task-graph h3{width:100%;margin:2px 0}.task-graph .cell-box{min-width:110px;max-width:100%;padding:9px}.task-graph .cell-box button{display:block;margin-top:8px;font-size:11px;padding:5px}.task-cell-view .cells-list{padding:8px}
