:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;color-scheme:dark;--bg:#151517;--sidebar:#111113;--surface:#1c1c1f;--surface2:#232326;--hover:#28282d;--line:#2c2c32;--line-soft:#242429;--text:#ececf0;--muted:#96969f;--faint:#85858f;--accent:#b6a4f8;--accent-bg:#a48ae51b;--lime:#c2dd8a;--danger:#e9a09c;--danger-bg:#e67d7412;--shadow:#0003;--composer:#1c1c20;--user:#23212c;--focus:#bcacf7;--scrollbar:#39393f}
:root[data-theme="light"]{color-scheme:light;--bg:#faf9f7;--sidebar:#f1f0ed;--surface:#fff;--surface2:#f3f1ef;--hover:#eae7e5;--line:#dedbd7;--line-soft:#e8e5e1;--text:#25232a;--muted:#6f6875;--faint:#77707d;--accent:#7757ba;--accent-bg:#7757ba12;--lime:#568136;--danger:#a84c48;--danger-bg:#c45b4e0d;--shadow:#2d222608;--composer:#fff;--user:#f0ecf6;--focus:#8660c7;--scrollbar:#d4ced8}
*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);color:var(--text)}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.45}button,a{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--focus);outline-offset:3px}a{color:inherit}button svg{pointer-events:none}.icon-library{position:absolute;width:0;height:0;overflow:hidden}.icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}.workspace{height:100dvh;min-height:420px;display:grid;grid-template-columns:264px minmax(0,1fr)}.sidebar{background:var(--sidebar);border-right:1px solid var(--line-soft);padding:27px 16px 16px;display:flex;flex-direction:column;min-height:0}.brand-row{display:flex;align-items:center;justify-content:space-between;padding:0 10px}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-size:22px;font-weight:650;letter-spacing:-.7px}.brand-mark{display:flex;align-items:center;justify-content:center;width:35px;height:35px;border:1px solid #b8a1f034;border-radius:11px;background:linear-gradient(135deg,#a38cda1d,#9987c208);color:var(--accent);font-size:27px;letter-spacing:-4px;padding-right:5px;line-height:1}.brand-mark span{font-weight:350}.brand-tag{display:block;font-size:8px;line-height:1.3;font-weight:500;letter-spacing:2.1px;color:var(--faint);margin-top:5px}.project-section{margin-top:35px}.section-heading{display:flex;align-items:center;justify-content:space-between;padding:0 10px 10px}.section-heading label{font-size:9px;font-weight:600;letter-spacing:1.4px;color:var(--faint)}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;background:transparent;border-radius:8px;color:var(--muted);padding:0;flex:0 0 auto;transition:background .15s,color .15s}.icon-button:hover:not(:disabled){background:var(--hover);color:var(--text)}.icon-button.small{width:25px;height:25px}.icon-button.small .icon{width:15px;height:15px}.project-select-wrap{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding-left:12px;color:var(--accent)}.project-select-wrap select{appearance:auto;min-width:0;width:100%;height:43px;border:0;border-radius:9px;padding:0 9px 0 0;background:transparent;color:var(--text);font-size:12px;font-weight:550}.project-select-wrap select option{background:var(--surface);color:var(--text)}.new-task{display:flex;align-items:center;gap:9px;width:100%;border:1px solid var(--line);background:transparent;border-radius:8px;padding:11px 12px;font-size:12px;margin:14px 0 27px;transition:background .15s,border-color .15s}.new-task:hover:not(:disabled){background:var(--surface2);border-color:var(--faint)}.new-task .icon{width:16px;height:16px;color:var(--muted)}.key-hint{margin-left:auto;font-size:10px;color:var(--faint)}.task-heading{display:flex;align-items:center;gap:7px;padding:0 10px}.task-heading h1{font-size:11px;font-weight:550;color:var(--muted);margin:0}.task-heading>.icon-button{margin-left:auto}.count{font-size:9px;color:var(--faint);background:var(--surface2);border:1px solid var(--line-soft);border-radius:4px;min-width:17px;text-align:center;padding:2px 4px}.thread-list{list-style:none;padding:0;margin:11px -2px 18px;overflow-y:auto;flex:1;min-height:70px}.thread-list li{margin:3px 0}.thread-button{position:relative;display:flex;gap:10px;align-items:flex-start;width:100%;text-align:left;border:1px solid transparent;border-radius:8px;background:transparent;padding:12px 11px;color:var(--muted)}.thread-button:hover{background:var(--surface)}.thread-button[aria-current="true"]{background:var(--accent-bg);border-color:#a992df24;color:var(--text)}.thread-button[aria-current="true"]:before{position:absolute;content:"";left:-1px;top:15px;bottom:15px;width:2px;background:var(--accent);border-radius:2px}.thread-icon{margin-top:1px;color:var(--faint);width:15px;height:15px}.thread-button[aria-current="true"] .thread-icon{color:var(--accent)}.thread-text{min-width:0;flex:1}.thread-title{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;line-height:1.4;font-weight:450}.thread-status{display:flex;gap:5px;align-items:center;font-size:9px;color:var(--faint);margin-top:6px;line-height:1.3}.thread-status[data-running="true"]{color:var(--lime)}.thread-status[data-error="true"]{color:var(--danger)}.thread-status .status-dot{width:4px;height:4px}.list-state{font-size:11px;line-height:1.7;color:var(--faint);padding:0 10px}.sidebar-bottom{margin-top:auto}.parallel-note{display:flex;gap:10px;margin:0 9px 22px;align-items:flex-start}.parallel-glyph{font-size:17px;color:var(--faint);margin-top:1px}.parallel-note p{font-size:10px;color:var(--muted);margin:0;line-height:1.6}.parallel-note p span{display:block;color:var(--faint)}.host-card{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--surface)}.host-icon{display:flex;align-items:center;justify-content:center;width:31px;height:31px;border-radius:7px;background:var(--surface2);color:var(--muted)}.host-icon .icon{width:17px;height:17px}.host-card strong{display:block;font-size:11px;font-weight:550}.host-card div>span{display:block;font-size:9px;color:var(--faint);margin-top:4px}.host-card>.status-dot{margin-left:auto}.status-dot{display:inline-block;width:6px;height:6px;background:var(--faint);border-radius:50%;flex:0 0 auto}.status-dot[data-connected="true"],.connection[data-connected="true"] .status-dot{background:var(--lime)}.main{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--bg)}.topbar{height:66px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 34px;border-bottom:1px solid var(--line-soft)}.breadcrumbs{display:flex;gap:11px;align-items:center;font-size:11px;min-width:0;white-space:nowrap}.breadcrumbs>.icon{width:15px;height:15px;color:var(--faint)}#project-name{max-width:240px;overflow:hidden;text-overflow:ellipsis;font-weight:500}.breadcrumb-separator{color:var(--faint);margin:0 3px}.muted{color:var(--muted)}.topbar-actions{display:flex;align-items:center;gap:5px;flex:0 0 auto}.connection{display:flex;align-items:center;gap:7px;margin-right:8px;font-size:10px;color:var(--muted);white-space:nowrap}.connection[data-connected="true"]{color:var(--lime)}.connection[data-connected="false"]{color:var(--danger)}.connection[data-connected="false"] .status-dot{background:var(--danger)}.running-count{font-size:9px;color:var(--lime);border:1px solid #c2dd8a24;background:#c2dd8a08;padding:5px 7px;border-radius:6px;margin-right:12px;white-space:nowrap}.chat-header{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:30px 40px 24px;flex:0 0 auto}.eyebrow{font-size:8px;letter-spacing:1.7px;color:var(--faint);font-weight:550}.mini-mark{color:var(--accent);font-size:13px;margin-right:5px;vertical-align:-1px}.chat-header h2{font-size:20px;line-height:1.4;letter-spacing:-.5px;margin:12px 0 7px;font-weight:550;overflow-wrap:anywhere}.chat-context{font:10px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--faint);margin:0;overflow-wrap:anywhere}.task-badge{font-size:9px;white-space:nowrap;color:var(--muted);border:1px solid var(--line);border-radius:20px;padding:7px 10px}.task-badge[data-running="true"]{color:var(--lime);border-color:#c2dd8a30;background:#c2dd8a08}.task-badge[data-error="true"]{color:var(--danger)}.error-banner{font-size:12px;line-height:1.65;color:var(--danger);border:1px solid #e9a09c30;background:var(--danger-bg);border-radius:9px;margin:0 40px 12px;padding:11px 14px;overflow-wrap:anywhere}.history{flex:1;min-height:0;overflow-y:auto;padding:20px max(40px,calc((100% - 780px)/2)) 28px;overscroll-behavior:contain}.empty-state{text-align:center;margin:9vh auto 0;max-width:430px}.empty-symbol{width:61px;height:61px;display:grid;place-items:center;margin:0 auto 26px;border:1px solid #b5a0ec24;border-radius:20px;background:linear-gradient(135deg,#ac98e312,#ac98e304);font-size:29px;color:var(--accent);box-shadow:0 0 80px #a58ad607}.empty-state h3{font-size:27px;font-weight:450;letter-spacing:-1px;margin:12px 0}.empty-state p{font-size:12px;line-height:1.9;color:var(--muted);margin:0}.message{margin-bottom:32px;display:flex;gap:13px}.message-avatar{width:27px;height:27px;border:1px solid var(--line);background:var(--surface);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:13px;color:var(--accent);flex:0 0 auto}.message-content{flex:1;min-width:0;padding-top:1px}.message-label{font-size:10px;font-weight:550;color:var(--muted);margin-bottom:10px}.message-text{font-size:13px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;tab-size:2}.message[data-role="user"]{background:var(--user);border:1px solid #b2a1d214;border-radius:12px;padding:17px 19px;margin-left:39px}.message[data-role="user"] .message-avatar{display:none}.message[data-role="user"] .message-label{color:var(--accent)}.message[data-role="system"]{font:11px/1.7 ui-monospace,SFMono-Regular,monospace;color:var(--muted);border-left:2px solid var(--line);padding:0 0 0 14px;margin-left:39px}.message[data-role="system"] .message-avatar{display:none}.message[data-role="system"] .message-text{font-size:11px}.composer-area{padding:0 max(40px,calc((100% - 780px)/2)) 19px;flex:0 0 auto}.composer-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:27px;padding:0 3px 8px}.activity{font-size:10px;line-height:1.5;color:var(--muted)}.activity[data-running="true"]{color:var(--lime)}.activity[data-running="true"]:before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--lime);margin-right:7px;animation:breathe 1.7s infinite}.message-count{font-size:9px;white-space:nowrap;color:var(--faint)}.composer{background:var(--composer);border:1px solid #77708052;border-radius:15px;padding:17px 16px 12px;box-shadow:0 7px 28px var(--shadow);transition:border-color .15s}.composer:focus-within{border-color:#b4a0e499}.composer textarea{display:block;width:100%;resize:vertical;min-height:71px;max-height:220px;border:0;outline:0;background:transparent;color:var(--text);font-size:13px;line-height:1.7;padding:0 3px}.composer textarea:focus-visible{outline:0}.composer textarea::placeholder{color:var(--faint)}.composer-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px}.composer-tools,.send-controls{display:flex;align-items:center;gap:7px}.attach-button{width:29px;height:29px}.attach-button .icon{width:16px;height:16px}.composer-model{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:6px}.model-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.composer-on-mac{color:var(--faint);margin-left:-4px}.keyboard-hint{font-size:9px;color:var(--faint);margin-right:6px}.send-button,.stop-button{display:flex;align-items:center;gap:9px;border:1px solid #bdabed;background:var(--accent);color:#201a2e;border-radius:8px;font-size:10px;font-weight:600;padding:8px 11px;min-height:33px}.send-button:hover:not(:disabled){filter:brightness(1.08)}.send-button:disabled{color:var(--faint);background:var(--surface2);border-color:var(--line);opacity:1}.send-button .icon{width:16px;height:16px}.stop-button{background:var(--surface2);border-color:var(--line);color:var(--text)}.stop-button .icon{width:13px;height:13px;fill:currentColor;stroke:none}.composer-notes{display:flex;justify-content:space-between;gap:8px;font-size:8px;line-height:1.6;color:var(--faint);margin:10px 3px 0}.attachments{display:flex;gap:8px;overflow-x:auto;padding:0 0 13px;margin:0 0 10px;border-bottom:1px solid var(--line-soft)}.attachment{display:flex;align-items:center;gap:8px;flex:0 0 auto;max-width:220px;border:1px solid var(--line);border-radius:9px;padding:6px;background:var(--surface2);position:relative}.attachment-preview{width:34px;height:34px;border-radius:5px;background:var(--surface);object-fit:cover}.attachment-file-icon{display:grid;place-items:center;width:34px;height:34px;color:var(--accent);background:var(--surface);border-radius:5px}.attachment-info{min-width:0}.attachment-name{display:block;font-size:10px;max-width:132px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-size{display:block;font-size:8px;color:var(--faint);margin-top:4px}.attachment[data-uploading="true"] .attachment-size{color:var(--accent)}.attachment .icon-button{width:22px;height:26px}.attachment .icon-button .icon{width:13px;height:13px}.create-dialog{width:min(420px,calc(100% - 32px));border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text);padding:26px;box-shadow:0 20px 80px #0005}.create-dialog::backdrop{background:#07070bc9;backdrop-filter:blur(5px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:21px}.dialog-icon,.login-lock{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--accent-bg);color:var(--accent);border:1px solid #ad93e627}.create-dialog h2{font-size:22px;font-weight:500;letter-spacing:-.5px;margin:0 0 10px}.create-dialog p{font-size:12px;line-height:1.7;color:var(--muted);margin-bottom:23px}.create-dialog label,.login-card label{display:block;font-size:11px;margin:18px 0 8px;color:var(--muted)}.create-dialog input,.login-card input{width:100%;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:8px;font-size:13px;padding:12px;min-height:43px}.primary-button{width:100%;background:var(--accent);color:#201a2e;border:1px solid #bdabed;border-radius:8px;min-height:42px;padding:11px;font-size:12px;font-weight:600;margin-top:23px}.primary-button:hover:not(:disabled){filter:brightness(1.08)}.field-error{font-size:11px!important;line-height:1.7;color:var(--danger)!important;margin:12px 0 0!important}.auth-overlay{position:fixed;inset:0;z-index:30;display:grid;place-items:center;overflow-y:auto;background:var(--bg);padding:28px 18px}.login-card{width:min(360px,100%)}.login-card>.brand{justify-content:center;margin-bottom:40px}.login-lock{margin:0 auto 24px;width:45px;height:45px}.login-card h1{font-size:23px;font-weight:500;letter-spacing:-.7px;text-align:center;margin:0 0 12px}.login-card>p{font-size:12px;line-height:1.7;color:var(--muted);text-align:center;margin-bottom:30px}.login-card #totp{letter-spacing:5px;font-family:ui-monospace,monospace}.login-note{font-size:9px!important;color:var(--faint)!important;margin-top:18px!important}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:50;padding:12px 18px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);color:var(--text);font-size:12px;box-shadow:0 6px 25px #0003;max-width:calc(100% - 30px);text-align:center}.mobile-only{display:none}.sidebar-backdrop{display:none}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}[hidden]{display:none!important}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-thumb{background:var(--scrollbar);border-radius:5px}::-webkit-scrollbar-track{background:transparent}@keyframes breathe{50%{opacity:.4}}
@media(min-width:1600px){.workspace{grid-template-columns:282px minmax(0,1fr)}.chat-header{padding-top:38px}}@media(max-width:1050px){.workspace{grid-template-columns:235px minmax(0,1fr)}.sidebar{padding-right:12px;padding-left:12px}.topbar{padding:0 24px}.chat-header{padding:25px 26px 20px}.history{padding-right:26px;padding-left:26px}.composer-area{padding-right:26px;padding-left:26px}.error-banner{margin-right:26px;margin-left:26px}.connection{font-size:9px;margin-right:3px}.topbar-actions{gap:2px}.topbar-actions>.icon-button{width:29px}.running-count{margin-right:4px;font-size:8px}}
@media(max-width:760px){.workspace{grid-template-columns:minmax(0,1fr)}.mobile-only{display:inline-flex}.desktop-only{display:none}.sidebar{position:fixed;z-index:21;left:0;top:0;bottom:0;width:min(300px,85vw);transform:translateX(-100%);transition:transform .2s;box-shadow:15px 0 60px #0005}.workspace[data-sidebar="open"] .sidebar{transform:translateX(0)}.sidebar-backdrop{position:fixed;z-index:20;inset:0;background:#08080ab3;border:0;display:block}.topbar{height:58px;padding:0 16px;gap:8px}.breadcrumbs{gap:7px;font-size:10px}.breadcrumbs>.icon-button{margin-left:-6px}.breadcrumb-separator,.breadcrumbs>.muted{display:none}#project-name{max-width:145px}.topbar-actions{gap:0}.topbar-actions>.icon-button{width:29px}.connection{font-size:8px;margin-right:4px;gap:5px}.connection .status-dot{width:5px;height:5px}.running-count{display:none}.chat-header{padding:24px 20px 19px;gap:12px}.chat-header h2{font-size:18px;letter-spacing:-.4px;margin-top:10px}.eyebrow{font-size:7px;letter-spacing:1.2px}.chat-context{font-size:8px;max-height:25px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.task-badge{font-size:8px;padding:6px 8px;align-self:center}.history{padding:16px 20px 22px}.empty-state{margin-top:7vh}.empty-state h3{font-size:24px}.empty-state p{font-size:11px}.empty-symbol{width:53px;height:53px;font-size:26px;margin-bottom:24px}.message{gap:10px;margin-bottom:26px}.message-text{font-size:13px;line-height:1.8}.message-avatar{width:24px;height:24px;font-size:12px;border-radius:7px}.message[data-role="user"]{margin-left:25px;padding:14px 15px}.message[data-role="system"]{margin-left:25px}.composer-area{padding:0 14px max(13px,env(safe-area-inset-bottom))}.composer{padding:14px 12px 10px;border-radius:13px}.composer textarea{font-size:16px;min-height:64px}.composer-meta{padding-left:4px;min-height:27px}.activity{font-size:9px}.message-count{font-size:8px}.keyboard-hint{display:none}.composer-model{font-size:9px}.composer-notes{font-size:7px;margin:9px 3px 0}.composer-on-mac{display:none}.send-button,.stop-button{font-size:10px;padding:8px 9px;gap:7px}.error-banner{margin:0 16px 10px;font-size:11px}.attachment-name{max-width:115px}.attachment{max-width:200px}.auth-overlay{padding-top:35px;padding-bottom:35px}.login-card>.brand{margin-bottom:28px}}
@media(max-width:390px){.connection #connection-label{max-width:75px;overflow:hidden;text-overflow:ellipsis}#project-name{max-width:100px}.chat-header{padding-right:16px;padding-left:16px}.task-badge{max-width:76px;text-overflow:ellipsis;overflow:hidden}.composer-notes #shared-note{max-width:145px;text-align:right}.topbar-actions>.icon-button{width:26px}.message-count{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

:root[data-theme="light"] .primary-button,:root[data-theme="light"] .send-button:not(:disabled){color:#fff}
@media(max-width:760px){.topbar-actions>.icon-button{width:34px;height:38px}.sidebar .icon-button{min-width:34px;min-height:34px}.attach-button{width:36px;height:36px}}

/* Compound fields own one continuous focus ring, including their leading icon. */
:root{--focus-width:2px;--focus-offset:3px;--radius-field:9px;--target-size:44px;--warning:#e5c17d;--warning-bg:#e5c17d12}
:root[data-theme="light"]{--warning:#805715;--warning-bg:#8057150d}
.project-select-wrap{min-height:var(--target-size);transition:border-color .15s,background .15s}
.project-select-wrap:hover{border-color:var(--muted)}
.project-select-wrap:focus-within{outline:var(--focus-width) solid var(--focus);outline-offset:var(--focus-offset);border-color:var(--focus)}
.project-select-wrap select:focus-visible{outline:none}
.project-select-wrap:has(select:disabled){opacity:.55}
.composer:focus-within{outline:var(--focus-width) solid var(--focus);outline-offset:var(--focus-offset);border-color:var(--focus)}
.composer:has(textarea[aria-invalid="true"]){border-color:var(--danger)}
.composer[aria-busy="true"]{border-color:var(--accent)}
.composer textarea:disabled{opacity:.65;cursor:not-allowed}
.create-dialog input:hover:not(:disabled),.login-card input:hover:not(:disabled){border-color:var(--muted)}
input[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:var(--danger)}
input:disabled{opacity:.6;cursor:not-allowed}
.icon-button:active:not(:disabled),.new-task:active:not(:disabled),.thread-button:active:not(:disabled),.secondary-button:active:not(:disabled){background:var(--hover);transform:translateY(1px)}
.send-button:active:not(:disabled),.primary-button:active:not(:disabled){filter:brightness(.94)}
.thread-button:focus-visible{outline-offset:-3px}
.thread-list{padding:3px;margin-top:8px}
.attachments{padding-top:5px;padding-right:5px;padding-left:5px}
.attachment:focus-within{border-color:var(--focus)}
.delivery-status{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;line-height:1.6;padding:11px 13px;margin-bottom:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);overflow-wrap:anywhere}
.delivery-status>span{min-width:0}
.delivery-status[data-state="unknown"],.delivery-status[data-state="sending"]{border-color:var(--warning);background:var(--warning-bg)}
.delivery-status[data-state="unknown"]{color:var(--warning)}
.delivery-status[data-state="rejected"],.delivery-status[data-state="failed"]{border-color:var(--danger);color:var(--danger);background:var(--danger-bg)}
.delivery-status[data-state="completed"],.delivery-status[data-state="accepted"]{border-color:var(--lime)}
.delivery-status[data-state="running"],.delivery-status[data-state="stopped"]{border-color:var(--lime)}
.delivery-status[data-state="accepted-delayed"]{border-color:var(--warning);background:var(--warning-bg);color:var(--warning)}
.secondary-button{font:inherit;color:var(--text);background:var(--surface2);border:1px solid var(--line);border-radius:8px;padding:8px 11px;min-height:var(--target-size);flex:0 0 auto}
.secondary-button:hover:not(:disabled){background:var(--hover);border-color:var(--muted)}
.send-button,.stop-button,.primary-button{min-height:var(--target-size)}
.icon-button{min-width:34px;min-height:34px}
.error-banner,.field-error{white-space:pre-line}
.toast{pointer-events:none}
@media(max-width:760px){
  .sidebar{box-shadow:none}
  .workspace[data-sidebar="open"] .sidebar{box-shadow:15px 0 60px #0005}
  .topbar-actions>.icon-button,.breadcrumbs>.icon-button,.sidebar .icon-button,.attach-button{min-width:44px;min-height:44px}
  .attachment .icon-button{min-width:44px;min-height:44px}
  .topbar{padding-right:8px;padding-left:12px}
  .topbar-actions{gap:0}
  .breadcrumbs{flex:1;overflow:hidden}
  #project-name{max-width:100%;min-width:0}
  .connection #connection-label{max-width:70px;overflow:hidden;text-overflow:ellipsis}
  .delivery-status{align-items:flex-start;flex-direction:column;font-size:11px;gap:8px}
  .delivery-status .secondary-button{width:100%}
  .composer-footer{flex-wrap:wrap}
  .composer-notes{font-size:9px;flex-wrap:wrap}
  .create-dialog{max-height:calc(100dvh - 32px);overflow-y:auto}
}
@media(max-height:600px){.chat-header{padding-top:12px;padding-bottom:12px}.chat-context,.chat-header .eyebrow{display:none}.empty-state{margin-top:0}.empty-symbol{margin-bottom:10px}.composer textarea{min-height:48px;max-height:110px}.composer-meta{padding-bottom:4px}.delivery-status{padding-top:6px;padding-bottom:6px}}
@media(forced-colors:active){.project-select-wrap:focus-within,.composer:focus-within{outline-color:Highlight}.delivery-status{border-color:CanvasText}.status-dot,.model-dot{background:CanvasText}}

/* Source metadata stays readable and inspectable; paths are plain text only. */
.file-citation{margin:10px 0;border:1px solid var(--line);border-radius:8px;background:var(--surface);white-space:normal}
.file-citation>summary{min-height:44px;padding:10px 12px;color:var(--accent);font-size:12px;line-height:1.8;cursor:pointer;overflow-wrap:anywhere}
.file-citation>summary:hover{background:var(--hover);border-radius:8px}
.file-citation>summary:focus-visible{outline:var(--focus-width) solid var(--focus);outline-offset:2px;border-radius:8px}
.file-citation[open]>summary{border-bottom:1px solid var(--line)}
.file-citation-path,.file-citation-original{padding:10px 12px;margin:0;font:11px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted)}
.file-citation-original{border-top:1px solid var(--line-soft)}

/* Controls share a 44px target in both themes and at every breakpoint. */
.brand{min-height:var(--target-size);border-radius:var(--radius-field);transition:color .15s,background .15s}
.brand:hover{color:var(--accent)}.brand:active{background:var(--accent-bg)}
.icon-button,.icon-button.small,.topbar-actions>.icon-button,.breadcrumbs>.icon-button,.sidebar .icon-button,.attach-button,.attachment .icon-button{width:var(--target-size);height:var(--target-size);min-width:var(--target-size);min-height:var(--target-size);border-radius:var(--radius-field)}
.new-task,.thread-button,.send-button,.stop-button,.primary-button,.secondary-button{min-height:var(--target-size);border-radius:var(--radius-field)}
.thread-list{padding:6px}.thread-button:focus-visible{outline-offset:var(--focus-offset)}
.file-citation>summary:focus-visible{outline-offset:var(--focus-offset)}
.new-task{align-items:center;padding-top:12px;padding-bottom:12px}
.section-heading{padding-bottom:8px}.section-heading,.task-heading{padding-right:0}
.attachment{max-width:248px}.attachment-info{flex:1}.attachment .icon-button{margin-left:2px}
.create-dialog input,.login-card input{min-height:var(--target-size);border-radius:var(--radius-field)}
.stop-button:hover:not(:disabled){background:var(--hover);border-color:var(--muted)}
.stop-button:active:not(:disabled){background:var(--hover);transform:translateY(1px)}
.icon-button[aria-busy="true"]{color:var(--accent);background:var(--accent-bg)}
.sidebar{overflow-y:auto;overflow-x:hidden}
.create-dialog{max-height:calc(100dvh - 32px);overflow-y:auto}

/* The select remains a hidden backing control; the complete field is branded. */
.project-select-wrap{position:relative;display:block;padding:0;border:0;border-radius:var(--radius-field);background:transparent;min-width:0;color:var(--text)}
.project-select-wrap:has(select:disabled){opacity:1}
.project-trigger{display:flex;align-items:center;gap:10px;width:100%;height:var(--target-size);min-height:var(--target-size);padding:0 16px 0 12px;border:1px solid var(--line);border-radius:var(--radius-field);background:var(--surface);color:var(--text);font-size:12px;font-weight:550;text-align:left;transition:border-color .15s,background .15s}
.project-trigger:hover:not(:disabled){border-color:var(--muted);background:var(--surface2)}
.project-trigger:active:not(:disabled){background:var(--hover)}
.project-trigger:focus-visible{outline:none}
.project-select-wrap:focus-within .project-trigger{border-color:var(--focus)}
.project-trigger[aria-expanded="true"]{border-color:var(--accent);background:var(--surface2)}
.project-trigger[aria-invalid="true"]{border-color:var(--danger)}
.project-trigger:disabled{opacity:.55}
.project-folder{color:var(--accent)}
#project-label{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.project-chevron{width:16px;height:16px;color:var(--muted);transition:transform .15s}
.project-trigger[aria-expanded="true"] .project-chevron{transform:rotate(180deg);color:var(--accent)}
.project-options{position:absolute;z-index:25;top:calc(100% + 8px);left:0;width:100%;max-height:min(288px,40dvh);overflow-y:auto;overscroll-behavior:contain;padding:5px;border:1px solid var(--line);border-radius:11px;background:var(--surface);box-shadow:0 12px 32px var(--shadow),0 3px 8px var(--shadow)}
.project-option{display:flex;align-items:center;gap:10px;min-height:var(--target-size);padding:10px;border:1px solid transparent;border-radius:7px;font-size:12px;line-height:1.5;color:var(--text);cursor:pointer;overflow-wrap:anywhere}
.project-option>span{min-width:0;flex:1}
.project-check{width:16px;height:16px;color:var(--accent)}
.project-option[aria-selected="true"]{color:var(--accent);background:var(--accent-bg)}
.project-option:hover{background:var(--hover)}
.project-option[data-active="true"]{border-color:var(--focus);background:var(--accent-bg)}
.project-option:active{background:var(--hover)}
:root{--success-text:var(--lime)}:root[data-theme="light"]{--success-text:#4f7630}
.connection[data-connected="true"],.thread-status[data-running="true"],.running-count,.task-badge[data-running="true"],.activity[data-running="true"]{color:var(--success-text)}
/* A resized prompt and long status messages must fit the remaining flex space.
   The composer scrolls when needed; the main pane is the short-screen fallback. */
.main{overflow-y:auto}
.composer-area{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior-y:contain}
.composer textarea{max-height:min(220px,30dvh)}
@media(max-width:760px){.sidebar{width:min(320px,85vw)}.topbar-actions{min-width:0}.connection{flex:0 1 auto;min-width:0}.connection #connection-label{min-width:0}.attachment{max-width:240px}}
@media(max-height:600px){.composer textarea{max-height:min(110px,25dvh)}}
@media(forced-colors:active){.project-trigger,.project-options{border-color:ButtonText}.project-option[data-active="true"]{outline:1px solid Highlight;border-color:Highlight}.project-option[aria-selected="true"]{color:Highlight}.project-check{color:Highlight}.project-trigger:disabled{color:GrayText;opacity:1}}

/* One compact input row; content grows, focus never changes its geometry. */
.composer{padding:8px;border:1px solid var(--line);border-radius:var(--radius-composer,15px);box-shadow:0 7px 28px var(--shadow)}
.composer:hover{border-color:var(--muted)}
.composer:focus-within{outline:none;border-color:var(--focus);box-shadow:inset 0 0 0 1px var(--focus),0 7px 28px var(--shadow)}
.composer-input-row{display:flex;align-items:flex-end;gap:8px;min-width:0}
.composer textarea{flex:1;align-self:center;display:block;min-width:0;width:0;height:24px;min-height:24px;max-height:min(220px,30dvh);resize:none;overflow-y:auto;border:0;outline:none;padding:0;background:transparent;font-size:16px;line-height:24px;scrollbar-gutter:auto}
.composer textarea:focus-visible{outline:none}
.composer .attach-button{width:44px;height:44px;min-width:44px;min-height:44px;align-self:flex-end;border-radius:50%}
.composer .attach-button .icon{width:19px;height:19px}
.composer .send-controls{flex:0 0 44px;width:44px;height:44px;gap:0}
.composer .send-button,.composer .stop-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;gap:0;border-radius:50%;font-size:0}
.composer .send-button .icon{width:18px;height:18px}
.composer .stop-button .icon{width:14px;height:14px}
.composer .attachments{margin:0 0 8px;padding:0 0 8px}
.composer-context-strip{display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;min-width:0;padding:0 3px 8px;color:var(--muted);font-size:11px;line-height:1.5}
.composer-context-strip .composer-model,.composer-context-strip .composer-context{min-width:0;font-size:11px;overflow-wrap:anywhere}
.composer-context-strip .composer-context{color:var(--faint)}
.composer-notes .keyboard-hint{margin:0;white-space:nowrap}
.chat-project{margin:7px 0 0;font-size:12px;line-height:1.5;color:var(--accent);overflow-wrap:anywhere}
.chat-project[data-assignment="none"],.chat-project[data-assignment="unknown"]{color:var(--muted)}
.thread-membership{display:block;margin-top:5px;font-size:10px;line-height:1.5;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.thread-membership[data-assignment="assigned"]{color:var(--accent)}
.thread-membership[data-assignment="unknown"]{color:var(--faint)}
.composer-context-strip .composer-model{display:block;color:var(--muted)}
.chat-header>div{min-width:0}
@media(max-height:600px){.composer textarea{min-height:24px;max-height:min(110px,25dvh)}}
@media(forced-colors:active){.composer{border-color:ButtonText}.composer:focus-within{border-color:Highlight;outline:2px solid Highlight;outline-offset:-2px;box-shadow:none}}
