:root{--bg:#fff;--text:#17231f;--muted:#68716e;--line:#dce1df;--soft:#f6f8f7;--accent:#204b3d;--accent-hover:#173c30;--selected:#e9f0ed;--error:#963c32;--radius:8px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg);font-synthesis:none}
.system-status{background:var(--soft);border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;margin-bottom:18px;font-size:14px}.system-status p+p{margin-top:4px}.system-status .muted{font-size:12px}
*{box-sizing:border-box}body{margin:0;font-size:16px;line-height:1.5}button,input,textarea,select{font:inherit}button,a,select{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}a{color:var(--accent);text-underline-offset:3px}h1,h2,h3,p{margin:0}h1{color:var(--accent);font-size:32px;line-height:1.2;letter-spacing:-.7px;font-weight:650}h2{font-size:17px;font-weight:600}h3{font-size:14px;font-weight:600}.muted{color:var(--muted)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:absolute;left:16px;top:-50px;background:white;z-index:10;padding:10px}.skip-link:focus{top:8px}:focus-visible{outline:3px solid #73a590;outline-offset:3px}
.wordmark{font-size:28px;font-weight:700;letter-spacing:-1px;text-decoration:none;line-height:1.3}.app-header{height:72px;display:flex;align-items:center;gap:45px;padding:0 32px;border-bottom:1px solid var(--line)}.app-header nav{align-self:stretch;display:flex;gap:6px}.nav-item{border:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted);padding:0 15px;font-size:15px}.nav-item.active{border-bottom-color:var(--accent);color:var(--accent);font-weight:600}.nav-item:hover{color:var(--accent);background:var(--soft)}.account{margin-left:auto;display:flex;gap:18px;align-items:center;font-size:14px}.text-button{border:0;background:transparent;color:var(--muted);padding:10px 0 10px 18px;border-left:1px solid var(--line)}.text-button:hover{color:var(--accent)}
main{padding:20px;max-width:1920px;margin:0 auto}.workspace{display:grid;grid-template-columns:minmax(0,1.58fr) minmax(340px,1fr);gap:16px;min-height:calc(100dvh - 112px)}.panel{border:1px solid var(--line);border-radius:var(--radius);background:white;padding:24px;min-width:0}.panel-heading{margin-bottom:18px}.panel-heading p{margin-top:4px;font-size:16px}.chat-panel{display:flex;flex-direction:column;min-height:650px;max-height:calc(100dvh - 112px)}.conversation{flex:1;min-height:200px;overflow-y:auto;overscroll-behavior:contain;padding:6px 0 20px;scrollbar-gutter:stable}.empty{color:var(--muted);font-size:15px;line-height:1.65;padding:24px 0;max-width:470px}.message{max-width:91%;margin:0 0 24px;overflow-wrap:anywhere}.message.user{margin-left:auto;max-width:86%}.message-label{font-size:12px;color:var(--muted);margin-bottom:6px}.message.user .message-label{text-align:right}.message-content{white-space:pre-wrap;line-height:1.65;background:var(--soft);border-radius:12px;padding:14px 18px;color:#1d2521}.message.user .message-content{background:#eef0ef}.message.assistant .message-content{background:#f6f8f7}.message .sources{margin:10px 2px 0;color:var(--muted);font-size:12px}.source{padding:5px 0;overflow-wrap:anywhere}.source a{font-weight:500}.timing{font-size:12px;color:var(--muted);margin-top:8px}.composer{display:flex;gap:12px;align-items:stretch;margin-top:12px}.composer textarea{flex:1;resize:vertical;min-height:58px;max-height:240px;padding:14px 16px;border:1px solid #cdd5d1;border-radius:var(--radius);line-height:1.45}.composer button{min-width:110px;align-self:stretch}.primary,.secondary{border-radius:6px;border:1px solid var(--accent);font-size:15px;font-weight:600;min-height:44px;padding:10px 18px}.primary{background:var(--accent);color:white}.primary:hover:not(:disabled){background:var(--accent-hover)}.secondary{background:white;border-color:#cdd5d1;color:var(--text)}.secondary:hover:not(:disabled){background:var(--soft)}.job-status,.global-status{padding:10px 14px;background:var(--soft);border-left:3px solid var(--accent);font-size:14px}.global-status{margin-bottom:16px}.job-status{margin-top:12px}.error{color:var(--error);font-size:14px;white-space:pre-wrap}.error:empty{display:none}
.files-panel{display:flex;flex-direction:column;max-height:calc(100dvh - 112px);overflow:auto}.files-panel select{width:100%;min-height:44px;padding:8px 12px;color:var(--text);border:1px solid #cdd5d1;background:white;border-radius:var(--radius)}.breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:13px;margin:12px 0;color:var(--muted);overflow-wrap:anywhere}.breadcrumbs button{font-size:13px;color:var(--muted);background:none;border:0;padding:3px 1px}.breadcrumbs button:hover{color:var(--accent);text-decoration:underline}.file-list{border:1px solid var(--line);border-radius:var(--radius);overflow:auto;max-height:240px;min-height:48px}.file-row{display:flex;width:100%;gap:12px;align-items:center;text-align:left;border:0;border-bottom:1px solid var(--line);background:white;padding:11px 14px;color:var(--text);font-size:14px;overflow-wrap:anywhere}.file-row:last-child{border-bottom:0}.file-row:hover{background:var(--soft)}.file-row.selected{background:var(--selected)}.file-row .kind{color:var(--muted);font-size:12px;margin-left:auto;flex-shrink:0}.file-row .file-icon{width:18px;height:18px;flex:0 0 18px;color:#466052}.file-list .empty{padding:14px;font-size:14px}.file-editor{margin-top:20px;min-height:250px;display:flex;flex-direction:column;flex:1}.editor-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:10px 14px;background:var(--soft);border:1px solid var(--line);border-bottom:0;border-radius:var(--radius) var(--radius) 0 0}.editor-heading h2{overflow-wrap:anywhere;font-size:14px}.editor-heading span{font-size:12px;flex-shrink:0}.file-path{font-size:12px;color:var(--muted);overflow-wrap:anywhere;padding:7px 14px;border:1px solid var(--line);border-bottom:0}.file-text{width:100%;flex:1;min-height:220px;border:1px solid var(--line);border-radius:0 0 var(--radius) var(--radius);padding:14px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.7;resize:vertical;background:white;color:var(--text);tab-size:2}.file-text:read-only{background:#fcfdfc}.editor-actions{display:flex;gap:8px;margin-top:12px}.editor-actions .primary{flex:1}.editor-actions .secondary{font-size:13px;padding:8px 12px}.file-status{font-size:13px;overflow-wrap:anywhere;margin-top:12px;white-space:pre-wrap}.file-status:empty{display:none}.files-only{grid-template-columns:1fr;max-width:1140px;margin:0 auto}.files-only .files-panel{max-height:none;min-height:calc(100dvh - 112px)}.files-only .file-list{max-height:260px}.files-only .file-text{min-height:360px}
.single-panel{max-width:1140px;margin:0 auto;min-height:calc(100dvh - 112px)}.section-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:28px}.section-heading p{margin-top:8px;font-size:15px}.memory-entry,.job-entry{padding:22px 0;border-bottom:1px solid var(--line)}.memory-entry:first-child,.job-entry:first-child{padding-top:0}.memory-entry:last-child,.job-entry:last-child{border-bottom:0}.entry-header{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:8px}.entry-header h2{font-size:16px;overflow-wrap:anywhere}.entry-meta{font-size:12px;color:var(--muted);margin-top:10px;overflow-wrap:anywhere}.entry-content{white-space:pre-wrap;line-height:1.65;overflow-wrap:anywhere}.job-entry .secondary{font-size:13px;min-height:36px;margin-top:12px;padding:6px 12px}.job-result{padding:18px;background:var(--soft);border-radius:var(--radius);margin-top:14px}.job-state{font-size:13px;color:var(--accent);white-space:nowrap}
.login-view{min-height:100dvh;display:grid;place-items:center;padding:28px}.login-form{width:100%;max-width:380px}.login-form .wordmark{display:block;margin-bottom:42px}.login-form h1{margin-bottom:8px}.login-form .muted{margin-bottom:28px;font-size:15px}.login-form label{display:block;font-size:14px;font-weight:550;margin:18px 0 7px}.login-form input{width:100%;height:46px;border:1px solid #cdd5d1;border-radius:6px;padding:9px 12px}.login-form .primary{width:100%;margin-top:26px}.login-form .error{margin-top:16px}
.file-context-action{align-self:flex-start;margin-top:9px;font-size:13px;min-height:38px;padding:7px 12px}.chat-file-context{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding:8px 12px;background:var(--selected);border-radius:6px;font-size:13px;overflow-wrap:anywhere}.chat-file-context button{flex-shrink:0;border:0;background:none;color:var(--accent);text-decoration:underline;text-underline-offset:3px;font-size:12px;padding:5px}.chat-file-context span{min-width:0}
dialog{padding:26px;border:1px solid var(--line);border-radius:12px;width:min(1000px,calc(100vw - 32px));max-height:calc(100dvh - 40px);color:var(--text);box-shadow:0 20px 80px #162a2026}dialog::backdrop{background:#10271c55}dialog h2{font-size:24px;color:var(--accent);margin-bottom:12px}dialog .file-path{padding:0;border:0;margin-bottom:8px}dialog .muted{font-size:14px}.comparison{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0}.comparison h3{margin-bottom:8px}.comparison pre{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:45dvh;overflow:auto;background:var(--soft);border:1px solid var(--line);padding:14px;margin:0;min-height:120px;border-radius:6px}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}
@media(min-width:1600px){main{padding:24px}.workspace{min-height:calc(100dvh - 120px)}.chat-panel,.files-panel{max-height:calc(100dvh - 120px)}.panel{padding:28px}}
@media(max-width:1000px){.app-header{padding:0 20px;gap:20px}.account{gap:8px}.nav-item{padding:0 10px}.workspace{grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr)}.panel{padding:20px}h1{font-size:28px}.composer{gap:8px}.composer button{min-width:90px;padding:10px}.message{max-width:96%}}
@media(max-width:760px){.app-header{height:auto;min-height:64px;flex-wrap:wrap;padding:15px 18px 0;gap:0}.wordmark{font-size:25px}.account{font-size:13px}.app-header nav{order:3;flex-basis:100%;height:49px;justify-content:space-between;margin-top:10px;gap:0}.nav-item{font-size:14px;padding:0 8px}main{padding:12px}.workspace{grid-template-columns:1fr;gap:12px;min-height:0}.panel{padding:20px}.chat-panel{height:calc(100dvh - 154px);min-height:460px;max-height:none}.files-panel{min-height:400px;max-height:none}.panel-heading{margin-bottom:14px}.conversation{min-height:160px}.composer textarea{font-size:16px;min-height:64px}.composer button{min-width:82px}.message{margin-bottom:20px}.message-content{padding:12px 14px;font-size:15px}.file-list{max-height:220px}.file-text{min-height:260px;font-size:13px}.files-only .files-panel{min-height:calc(100dvh - 154px)}.single-panel{min-height:calc(100dvh - 154px)}.section-heading{flex-direction:column;gap:14px}.section-heading h1{font-size:28px}.entry-header{align-items:flex-start;flex-direction:column;gap:4px}.comparison{grid-template-columns:1fr}.comparison pre{max-height:25dvh}dialog{padding:20px}.dialog-actions{flex-wrap:wrap}.dialog-actions button{flex:1}}
@media(prefers-reduced-motion:no-preference){button{transition:background-color .12s,border-color .12s,color .12s}.message{animation:appear .16s ease-out}@keyframes appear{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}}
.upload-controls{display:flex;gap:12px;align-items:center;margin-top:12px;flex-wrap:wrap;font-size:12px}.upload-button{display:inline-flex;align-items:center;cursor:pointer;font-size:13px;min-height:36px;padding:6px 12px}.upload-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.upload-entry{display:flex;align-items:center;gap:8px;background:var(--selected);border-radius:6px;padding:4px 10px;font-size:12px;max-width:100%;overflow-wrap:anywhere}.upload-entry .text-button{border:0;padding:5px;font-size:12px}.entry-actions,.download-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.entry-actions button,.entry-actions select,.download-link{font-size:13px;min-height:36px;padding:6px 12px}.download-link{display:inline-flex;align-items:center;text-decoration:none;overflow-wrap:anywhere}.search-form{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}.search-form>input{flex:1;min-width:180px;border:1px solid var(--line);border-radius:6px;padding:11px 13px}.inline-check{display:flex;gap:7px;align-items:center;font-size:13px;color:var(--muted)}.knowledge-entry{padding:20px 0;border-bottom:1px solid var(--line)}.knowledge-entry h2{margin-bottom:8px}.knowledge-entry>button{margin-top:12px;margin-right:8px;font-size:13px;min-height:36px;padding:6px 12px}.source-preview,.order-detail,.ingress-section{border-top:1px solid var(--line);margin-top:28px;padding-top:26px}.source-preview .section-heading{margin-bottom:10px}.source-preview pre,.request-preview{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.65;background:var(--soft);padding:18px;border-radius:var(--radius);max-height:60dvh;overflow:auto}.order-select{border:0;background:transparent;display:flex;flex-wrap:wrap;gap:10px 20px;text-align:left;color:var(--text);padding:0;width:100%;align-items:baseline}.order-select strong{color:var(--accent)}.order-select>.entry-meta{flex-basis:100%;margin:0}.order-select:hover strong{text-decoration:underline}.order-prompt{margin-top:14px}.order-followup{display:flex;flex-direction:column;gap:10px;margin-top:22px}.order-followup label{font-size:14px;font-weight:600}.order-followup textarea,#memory-content{width:100%;padding:12px;border:1px solid var(--line);border-radius:6px;font:inherit;resize:vertical}.order-followup button{align-self:flex-start}.priority-select{border:1px solid var(--line);border-radius:6px;background:white;color:var(--text)}.event-history{margin-top:20px}.event-history summary{cursor:pointer;font-size:13px;color:var(--muted)}#memory-dialog{max-width:680px}#memory-dialog label{display:block;font-size:14px;margin:16px 0 6px}#memory-scope{width:100%;padding:10px;border:1px solid var(--line);border-radius:6px}#memory-error{margin-top:12px}
.order-title{flex-basis:100%;font-size:14px;overflow-wrap:anywhere}
@media(max-width:760px){.app-header nav{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap}.nav-item{flex-shrink:0;padding:0 8px}.search-form>input{min-width:100%;width:100%}.search-form button{flex:1}.upload-controls{gap:8px}.upload-controls .muted{max-width:100%}.entry-actions{gap:6px}.entry-actions button{flex:1}.source-preview .section-heading{flex-direction:row}.order-followup button{width:100%;align-self:stretch}.order-select{gap:5px 12px}}
