:root{color-scheme:dark;--bg:#101215;--panel:#171a1f;--text:#f0f1f3;--muted:#a5abb5;--line:#30353d;--green:#68d99c;--focus:#9fc5ff;font:14px/1.4 system-ui,sans-serif}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--text)}button,input,textarea,select{font:inherit}button,input,textarea,select,a{touch-action:manipulation}a{color:var(--muted);text-underline-offset:3px}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.workspace{height:100vh;height:100dvh;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:0;padding:0 clamp(10px,2vw,28px);max-width:1800px;margin:auto;min-width:0}
.topbar{display:flex;align-items:center;gap:14px;min-height:56px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:8px;min-width:0}.mark{font-size:25px;color:#e2e6ed}h1{font-size:20px;letter-spacing:-.06em;margin:0;font-weight:650;white-space:nowrap}.dot{color:var(--muted)}.policy{margin-left:auto;color:var(--green);font-size:12px;white-space:nowrap}.upstream{font-size:11px;white-space:nowrap}
.connections{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.provider{min-width:0;display:flex;flex-direction:column;gap:4px}.provider-head{display:flex;align-items:baseline;justify-content:space-between;gap:4px;flex-wrap:wrap}.provider-head label{font-size:12px;font-weight:650}.state{font-size:10px;color:var(--muted);overflow-wrap:anywhere}.state[data-state=listed]{color:var(--green)}.state[data-state=unavailable]{color:#ffb7a4}
input:not([type=checkbox],[type=radio]),textarea,select{color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:7px 9px;width:100%;min-width:0}input::placeholder,textarea::placeholder{color:#939ba8}input[type=checkbox],input[type=radio]{accent-color:#c4d6ff;flex:none;margin:0;width:15px;height:15px}input[type=password]{font-size:13px}.check{display:flex;gap:6px;align-items:flex-start;color:var(--muted);font-size:11px;line-height:1.35}.check input{margin-top:1px}
.workarea{display:grid;grid-template-columns:minmax(270px, .85fr) minmax(0,1.65fr);grid-template-rows:auto minmax(0,1fr);min-height:0;gap:0 18px}.composer,.library,.output{min-width:0;min-height:0;margin:0;padding:10px 0;display:flex;flex-direction:column;gap:7px}.composer{grid-column:1;grid-row:1;max-height:100%;overflow:auto;scrollbar-width:thin}.library{grid-column:1;grid-row:2;border-top:1px solid var(--line);overflow:hidden}.output{grid-column:2;grid-row:1 / 3;border-left:1px solid var(--line);padding-left:18px;overflow:hidden}.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;flex:none}h2{font-size:13px;font-weight:650;margin:0}h3{font-size:13px;margin:0 0 6px;overflow-wrap:anywhere}.modes{display:flex;gap:2px;border:0;padding:0;margin:0;min-width:0}.modes label{display:flex;align-items:center;gap:5px;font-size:11px;padding:5px 6px;white-space:nowrap;border:1px solid transparent;border-radius:5px}.modes label:has(input:checked){background:var(--panel);border-color:var(--line);color:var(--text)}textarea{resize:vertical;min-height:60px;max-height:160px;font-size:15px}.action-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}button{border:1px solid transparent;border-radius:6px;background:#e7e9ee;color:#101215;cursor:pointer;font-weight:650;padding:7px 15px;min-height:34px}button:disabled{opacity:.45;cursor:default}button.quiet{background:transparent;color:var(--muted);border-color:var(--line);font-size:11px;padding:4px 8px;min-height:27px}p{margin:0 0 6px}.note{font-size:11px;color:var(--muted);overflow-wrap:anywhere}#review-settings{display:grid;gap:5px;font-size:11px}#catalog-status{flex:none;margin:0;max-height:3em;overflow:auto}.models{min-height:0;flex:1;overflow:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));align-content:start;gap:4px;scrollbar-width:thin}.models label{display:flex;align-items:flex-start;gap:7px;background:var(--panel);border:1px solid var(--line);border-radius:5px;padding:7px;font-size:12px;overflow-wrap:anywhere;cursor:pointer}.models label:has(input:checked){border-color:var(--focus)}.models label span{min-width:0}.output-body{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}.empty{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:var(--muted);text-align:center}.empty svg{width:155px;height:44px;color:#626d7c}.empty strong{font-size:14px;font-weight:500}.empty span{font-size:12px}.answers{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:9px}article{background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:10px;min-width:0;margin:8px 0}.answers article{margin:0}pre{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}summary{font-size:12px;cursor:pointer;color:var(--muted)}details{margin:8px 0}blockquote{margin:8px 0;padding-left:9px;border-left:2px solid var(--line);overflow-wrap:anywhere}#results>h2{margin:10px 0 5px}#results>h2:first-child{margin-top:0}
.bottom{border-top:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:10px;align-items:center;padding:7px 0;font-size:11px;color:var(--muted);min-width:0}.policy-notes{display:flex;flex-direction:column;gap:3px;max-height:55px;overflow:auto;scrollbar-width:thin}.policy-notes span{font-size:10px}.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}[hidden]{display:none!important}
@media(max-width:720px){.workspace{padding:0 10px}.topbar{min-height:44px;gap:7px}h1{font-size:18px}.mark{font-size:20px}.upstream{font-size:10px}.policy{font-size:10px}.connections{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px;padding:6px 0}.provider{gap:3px}.provider-head label{font-size:11px}.provider-head{gap:2px}.state{font-size:9px}input[type=password]{font-size:16px;padding:5px 7px;height:33px}.check{font-size:10px}.workarea{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,auto) minmax(72px,.75fr) minmax(66px,1.15fr);gap:0}.composer,.library,.output{grid-column:1;padding:5px 0;gap:4px}.composer{grid-row:1;max-height:250px}.library{grid-row:2}.output{grid-row:3;border-left:0;border-top:1px solid var(--line);padding-left:0}.section-head{min-height:24px}h2{font-size:12px}.modes label{padding:3px 5px}.models{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.models label{padding:5px;font-size:11px}textarea,input[type=search],#query,select{font-size:16px}textarea{min-height:54px;height:60px;resize:none}input[type=search]{height:32px;padding:4px 7px}.action-row button{min-height:32px;padding:4px 13px}.bottom{grid-template-columns:1fr;gap:3px;padding:4px 0;max-height:75px}.policy-notes{max-height:33px}.empty svg{width:108px;height:28px}.empty{gap:3px}.empty strong{font-size:12px}.empty span{font-size:10px}.answers{grid-template-columns:1fr}}
@media(max-height:650px) and (max-width:720px){.workarea{grid-template-rows:minmax(70px,1.5fr) minmax(60px,1fr) minmax(45px,.8fr)}.composer{max-height:none}.topbar{min-height:38px}.connections{gap:3px 8px;padding:4px 0}.provider-head label,.check{font-size:10px}.bottom{max-height:50px}.policy-notes{max-height:20px}.empty svg{display:none}}
@media(max-height:650px) and (min-width:721px){.workarea{grid-template-rows:minmax(0,1.2fr) minmax(0,1fr)}.composer{max-height:none}}
@media(max-width:360px){.upstream{display:none}.policy{font-size:10px}.provider-head{flex-wrap:nowrap}.state{font-size:8px}}

.workspace{grid-template-rows:auto auto auto minmax(0,1fr) auto}
.taskbar{border:0;border-bottom:1px solid var(--line);padding:5px 0;margin:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;min-width:0}
.taskbar label{display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:5px;padding:6px 2px;font-size:12px;color:var(--muted);cursor:pointer;white-space:nowrap}
.taskbar label:has(input:checked){background:var(--panel);border-color:var(--line);color:var(--text)}
.taskbar input{width:12px;height:12px}.target-row{display:grid;grid-template-columns:auto minmax(0,.8fr) minmax(0,1.2fr);gap:5px;align-items:center;font-size:11px}.target-row input,.target-row select{font-size:12px;padding:5px}.pipeline{display:flex;flex-wrap:wrap;gap:5px;margin:5px 0 10px}.pipeline span{padding:5px 7px;border:1px solid var(--line);border-radius:4px;font-size:11px;color:var(--muted)}.composer textarea{flex-shrink:0}.composer .action-row{position:sticky;bottom:0;background:var(--bg);padding:3px 0}
@media(max-width:720px){.taskbar{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;padding:3px 0}.taskbar label{padding:3px;font-size:11px}.target-row input,.target-row select{font-size:16px}.workarea{grid-template-rows:minmax(0,1.7fr) minmax(0,1fr) minmax(0,1fr)}.composer{max-height:none}.library{overflow:auto}.models{min-height:24px}.output .section-head{flex-wrap:wrap}}

.taskbar{grid-template-columns:repeat(7,minmax(0,1fr))}#workflow-settings{display:grid;gap:5px;font-size:11px}.workflow-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.workflow-options select,.workflow-stage select{font-size:12px;padding:4px;min-width:0}.workflow-stage{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1.5fr);gap:3px;align-items:center;border:1px solid var(--line);border-radius:5px;padding:4px;margin-bottom:4px}.workflow-stage select[multiple]{grid-column:2/4}.workflow-stage button{grid-column:3;justify-self:end}.workarea:has(#workflow-settings:not([hidden])){grid-template-rows:minmax(0,1.5fr) minmax(0,1fr)}@media(max-width:720px){.taskbar{grid-template-columns:repeat(4,minmax(0,1fr))}.workarea:has(#workflow-settings:not([hidden])){grid-template-rows:minmax(0,1.7fr) minmax(0,1fr) minmax(0,1fr)}.workflow-options select,.workflow-stage select{font-size:16px}}

.auth-row{display:flex;gap:4px;align-items:center;flex-wrap:wrap}.auth-row .connect{flex:1;min-height:30px;padding:4px 7px;font-size:12px;white-space:nowrap}.auth-row .quiet{padding:4px 6px;min-height:28px;white-space:nowrap}.provider-link,#openrouter-manage{font-size:10px;white-space:nowrap}#openrouter-manage{align-self:flex-start}@media(max-width:720px){.auth-row .connect{min-height:33px}.auth-row .quiet{font-size:10px}.provider-link{font-size:9px}.provider-head{flex-wrap:wrap}}

/* Keep consent and stage inputs in a real scrollport, not beneath an overlapping sticky action bar. */
.composer{overflow:hidden}.composer-scroll{display:flex;flex-direction:column;gap:7px;min-height:0;flex:1 1 auto;overflow:auto;scrollbar-width:thin;scroll-padding:4px}.composer-scroll>*{flex-shrink:0}.composer .action-row{position:static;flex:none}.composer>.section-head{flex:none}@media(max-width:720px){.composer-scroll{gap:4px}.composer .action-row{padding:2px 0}}

/* Workspace v2: one viewport, direct task actions and accessible dedicated pickers. */
:root{font-size:16px;--line:#515965;--muted:#b6bdc7;--focus:#a9ccff}
html,body{width:100%;height:100%;overflow:hidden}
.workspace{height:100dvh;max-width:1500px;display:grid;grid-template-rows:auto auto minmax(0,1fr);padding:0 clamp(10px,2vw,24px);gap:0}
.topbar{min-height:54px;gap:8px}.topbar h1{font-size:19px}.topbar .mark{font-size:20px}.policy{font-size:12px}.topbar button{margin-left:0}
button,button.quiet{min-height:44px;font-size:14px;padding:8px 12px}.taskbar{grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;padding:6px 0}.taskbar label{min-height:44px;font-size:13px;white-space:normal;line-height:1.2;justify-content:center;text-align:center;padding:6px 4px}.taskbar input{position:absolute;opacity:0;width:1px;height:1px}.taskbar label:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px}.taskbar label:has(input:checked){background:#26364b;border-color:var(--focus)}
.workarea,.workarea:has(#workflow-settings:not([hidden])){grid-template-columns:minmax(290px,1fr) minmax(0,1.4fr);grid-template-rows:minmax(0,1fr);gap:16px;min-height:0}.composer,.output{min-height:0;padding:10px 0;gap:7px}.composer{grid-column:1;grid-row:1;overflow:auto;max-height:none}.composer-scroll{display:flex;flex-direction:column;gap:7px;overflow:visible;flex:none;max-height:none}.output{grid-column:2;grid-row:1;min-height:0;overflow:hidden;padding-left:16px}.output-body{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1}.section-head{min-height:32px;gap:8px}.section-head h2{font-size:17px}.section-head button{flex:none}.composer textarea{min-height:100px;max-height:220px;font-size:16px;resize:vertical;flex:none}.model-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;text-align:left}.model-trigger span:nth-child(2){margin-left:auto;color:var(--muted);font-weight:400}.check{font-size:13px;line-height:1.35;min-height:44px;padding:4px 0;align-items:center}.check input,input[type=checkbox]{width:20px;height:20px;flex:none}.action-row{position:static;background:none;padding:0;flex:none;gap:8px}.action-row #progress{min-width:0;flex:1;font-size:12px;color:var(--muted);overflow-wrap:anywhere}.action-row button{min-height:44px;flex:none}.note{font-size:13px;line-height:1.4}.empty{min-height:100%;justify-content:center;gap:4px}.empty strong{font-size:15px;color:var(--text)}.empty span{font-size:13px}.answers{grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))}
dialog{padding:0;border:1px solid var(--line);border-radius:14px;background:var(--bg);color:var(--text);width:min(94vw,680px);max-width:94vw;max-height:90dvh;overflow:hidden}dialog::backdrop{background:#000b}.dialog-shell{display:flex;flex-direction:column;max-height:89dvh;min-height:0}.dialog-head,.dialog-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;flex:none;border-bottom:1px solid var(--line)}.dialog-foot{border-top:1px solid var(--line);border-bottom:0;padding-bottom:max(10px,env(safe-area-inset-bottom))}.dialog-head h2{font-size:19px;margin:0}.dialog-body{overflow:auto;overscroll-behavior:contain;padding:12px 16px;min-height:0;display:flex;flex-direction:column;gap:10px}.dialog-body .catalog-head{justify-content:flex-end}.dialog-body .models{display:grid;grid-template-columns:1fr;max-height:none;overflow:visible;flex:none;gap:5px}.models label{min-height:48px;padding:10px;gap:12px;font-size:15px;line-height:1.4;align-items:center}.models label:has(input:checked){background:#26364b}.dialog-body input:not([type=checkbox],[type=radio]),.dialog-body select{min-height:44px;font-size:16px}.dialog-body #catalog-status{max-height:none;overflow:visible}.dialog-body .connections{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0;border:0}.dialog-body .provider{border:1px solid var(--line);border-radius:7px;padding:10px;gap:7px}.dialog-body .provider-head label{font-size:15px}.dialog-body .state,.dialog-body .provider-link,.dialog-body #openrouter-manage{font-size:13px}.dialog-body .auth-row button{min-height:44px}.dialog-body .policy-notes{max-height:none;overflow:visible;font-size:14px}.dialog-body .policy-notes span{font-size:13px}.dialog-body .workflow-options,.dialog-body .workflow-stage{gap:8px}.dialog-body #workflow-settings,.dialog-body #review-settings,.dialog-body #engineering-settings{font-size:14px;gap:8px}.dialog-body .target-row{grid-template-columns:1fr}.dialog-body .target-row label{font-size:14px}
@media(max-width:720px){.workspace{padding:0 10px}.topbar{min-height:48px;gap:5px}.topbar h1{font-size:17px}.topbar .mark{display:none}.policy{font-size:10px}.topbar button{padding:6px 8px;font-size:12px}.taskbar{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.taskbar label{font-size:12px;min-height:44px}.workarea,.workarea:has(#workflow-settings:not([hidden])){grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:0}.composer{grid-column:1;grid-row:1;overflow:visible;max-height:none;padding:7px 0;gap:5px}.composer-scroll{gap:5px}.composer textarea{height:76px;min-height:76px;max-height:110px;resize:none}.output{grid-column:1;grid-row:2;padding:7px 0 0;border-left:0;border-top:1px solid var(--line);gap:4px}.section-head h2{font-size:16px}.section-head button{font-size:12px;min-height:44px;padding:6px 9px}.check{font-size:12px;min-height:44px}.empty{min-height:72px}.answers{grid-template-columns:1fr}dialog{width:100%;max-width:100%;max-height:96dvh;margin:auto 0 0;border-radius:14px 14px 0 0}.dialog-shell{max-height:95dvh}.dialog-body .connections{grid-template-columns:1fr}.dialog-body .workflow-options,.dialog-body .workflow-stage{grid-template-columns:1fr}.dialog-body .workflow-stage select[multiple],.dialog-body .workflow-stage button{grid-column:auto}}
@media(max-height:620px) and (max-width:720px){.composer textarea{height:60px;min-height:60px}.composer .section-head{min-height:28px}.empty{min-height:45px}.empty span{font-size:11px}}
@media(max-height:480px){html,body{height:auto;overflow:auto}.workspace{height:auto;min-height:100dvh}.workarea,.workarea:has(#workflow-settings:not([hidden])){grid-template-rows:auto auto}.output-body{min-height:120px}.composer{overflow:visible}}

/* Compact feedback action; never adds another workspace row. */
#bug-open{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;min-width:44px;min-height:44px}#bug-open svg{flex:none}.bug-body label:not(.check){font-size:14px;font-weight:600}.bug-body textarea{min-height:84px;max-height:180px;flex:none;font-size:16px}.bug-body #bug-preview{min-height:100px}.bug-actions{flex-wrap:wrap}.bug-submit{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;min-height:44px;background:#e7e9ee;color:#101215;border-radius:6px;font-weight:650;text-decoration:none;font-size:14px}.bug-submit[aria-disabled=true]{opacity:.5;pointer-events:none}@media(max-width:720px){#bug-open span{display:none}#bug-open{width:44px;padding:8px}.topbar{gap:4px}.topbar h1{font-size:16px}.topbar .policy{font-size:10px}.bug-actions{gap:8px}.bug-actions>*{flex:1;text-align:center;white-space:normal}}@media(max-width:360px){.topbar .policy{font-size:9px}.topbar h1{font-size:15px}.topbar #providers-open{padding:6px;font-size:11px}}

/* Primary workspace: account actions, task selection, composer and result header remain in viewport. Results and long optional pickers may scroll independently. */
.workspace{grid-template-rows:auto auto auto minmax(0,1fr);height:100dvh;min-height:0;overflow:hidden}
.account-strip{padding:5px 0;border-bottom:1px solid var(--line);min-width:0}.account-caption{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:var(--muted)}.account-caption strong{color:var(--text);font-size:13px}.account-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;margin:4px 0}.account-choice{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:0;padding:4px;border:1px solid var(--line);border-radius:6px;background:var(--panel);font-size:12px;font-weight:600;line-height:1.15;text-align:center;color:var(--text);text-decoration:none;overflow-wrap:anywhere}.account-choice.native-account{border-color:var(--focus);background:#26364b}.account-note{margin:0;font-size:11px;line-height:1.25;color:var(--muted)}
.composer{overflow:hidden}.composer-scroll{min-height:0}.composer textarea{resize:none}#selected-names{display:none!important}.output-body{min-height:0;overflow:auto}.action-row #progress{font-size:12px}#provider-picker .dialog-body{gap:8px}#provider-picker .provider{padding:0;border:0}#provider-picker .provider-head{font-size:13px}
@media(max-width:720px){.account-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.account-caption span{font-size:11px}.account-strip{padding:3px 0}.account-choice{font-size:11px}.taskbar{padding:3px 0;gap:2px}.taskbar label{font-size:11px}.topbar{min-height:44px}.composer{padding:3px 0;gap:3px}.composer-scroll{gap:3px}.composer .section-head{min-height:24px}.composer .section-head h2{font-size:14px}.composer textarea{height:66px;min-height:66px}.output{padding:3px 0 0;gap:0}.empty{min-height:0}.empty span{font-size:11px}.action-row{gap:4px}.action-row #progress{font-size:11px}.section-head button{font-size:11px}.model-trigger{font-size:12px!important}.check{font-size:12px}.account-note{font-size:10px}}
@media(max-width:720px) and (max-height:640px){.account-caption span{display:none}.account-caption strong{font-size:12px}.account-grid{margin:2px 0;gap:2px}.composer textarea{height:44px;min-height:44px}.composer .section-head h2{font-size:13px}.composer .section-head button{min-height:44px}.output .section-head h2{font-size:14px}.output .section-head{min-height:44px}.empty span{display:none}.account-strip{padding:2px 0}}
@media(min-width:721px) and (max-height:480px){html,body{height:100%;overflow:hidden}.workspace{height:100dvh;min-height:0}.workarea,.workarea:has(#workflow-settings:not([hidden])){grid-template-rows:minmax(0,1fr)}.composer{overflow:hidden;gap:3px;padding:3px 0}.composer-scroll{gap:3px}.composer textarea{height:48px;min-height:48px;max-height:48px}.topbar{min-height:44px}.account-strip{padding:2px 0}.account-grid{margin:2px 0}.taskbar{padding:2px 0}.output-body{min-height:0}}
/* Short portrait viewports (including keyboard and zoom) must not clip accessible controls. */
@media(max-width:720px) and (max-height:500px){html,body{height:auto;overflow:auto}.workspace{height:auto;min-height:100dvh;overflow:visible}.workarea,.workarea:has(#workflow-settings:not([hidden])){grid-template-rows:auto auto}.composer{overflow:visible}.output-body{min-height:60px}}

/* Keep optional recovery controls legible without changing the primary workspace. */
#code-controls{display:grid;gap:6px}#code-recovery summary{min-height:44px;display:flex;align-items:center}#code-recovery[open] summary{margin-bottom:4px}#code-status{margin:0}.account-choice[aria-pressed=true]{background:#153528;border-color:var(--green)}
@media(orientation:landscape) and (min-width:568px) and (max-height:500px){html,body{height:100%;overflow:hidden}.workspace{height:100dvh;min-height:0;overflow:hidden}.account-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;margin:2px 0}.account-caption{display:none}.account-strip{padding:2px 0}.account-note{font-size:10px}.account-choice{font-size:11px}.taskbar{grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;padding:2px 0}.taskbar label{font-size:11px}.workarea,.workarea:has(#workflow-settings:not([hidden])){grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:10px}.composer{grid-column:1;grid-row:1;overflow:hidden;gap:3px;padding:3px 0}.composer-scroll{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:4px;align-items:center}.composer textarea{grid-column:1/-1;height:44px;min-height:44px;max-height:44px}.composer .section-head{min-height:24px}.composer .section-head h2{font-size:13px}.composer .section-head button{font-size:11px}.model-trigger{font-size:11px!important;padding:4px 6px!important}.check{font-size:11px;line-height:1.2}.output{grid-column:2;grid-row:1;border-top:0;border-left:1px solid var(--line);padding:3px 0 0 10px;gap:3px}.output-body{min-height:0}.empty{min-height:0}.action-row #progress{font-size:11px}.action-row button{padding:5px 8px;font-size:12px}.topbar{min-height:44px}}

/* Reserve enough vertical room for the results action at 320 x 568. */
@media(max-width:720px) and (min-height:501px) and (max-height:640px){.account-caption{display:none}.account-strip{padding:0}.account-grid{margin:1px 0}.account-note{line-height:12px}.composer .section-head{gap:4px}.composer .section-head button{padding:4px 6px}.composer .action-row{padding:0}.taskbar{padding:1px 0}.output .section-head{flex-wrap:nowrap}}

.account-choice[data-model-family]{background:var(--panel)}.account-choice[aria-pressed=true]{background:#153528;border-color:var(--green)}.account-choice[aria-disabled=true]{color:var(--muted)}
@media(max-width:720px){.topbar .policy{display:none}.topbar .brand{margin-right:auto}}

/* Short landscape: reserve the action row, rather than clip it or shrink targets. */
@media(orientation:landscape) and (min-width:568px) and (max-height:420px){.workspace{padding:0 8px}.topbar{min-height:44px}.account-strip{padding:0}.account-grid{margin:1px 0}.account-note{line-height:12px}.taskbar{padding:1px 0}.workarea,.workarea:has(#workflow-settings:not([hidden])){grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px}.composer{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:2px;padding:0}.composer .section-head{min-height:24px}.composer .section-head button{min-height:44px}.composer-scroll{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);grid-template-rows:44px auto;align-content:start;align-items:center;gap:2px;min-height:0}.composer textarea{height:44px;min-height:44px;max-height:44px}.composer-scroll .check{padding:0;line-height:1.15;min-height:44px}.composer .action-row{padding:0;min-height:44px;align-self:end}.action-row #progress{line-height:1.2}.output{padding:0 0 0 8px}.output .section-head{flex-wrap:nowrap}.output .section-head button{padding:4px 6px}}

/* Issue 16: retain the compact monochrome workspace. Explicit fixed-height rows
 * avoid distributing surplus viewport height into the navigation. A provider's
 * secondary label identifies its access method, not a claimed connection. */
.workspace{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);align-content:start;gap:0}
.topbar{flex-wrap:nowrap;min-width:0}
.account-strip{min-height:0;align-self:start}
.account-grid{grid-auto-rows:44px;align-content:start;gap:4px}
.account-grid button.account-choice{height:44px;min-height:44px;max-height:44px;line-height:1.2;padding:3px 4px;font-size:11px;font-weight:600;border:1px solid var(--line);background:var(--panel);color:var(--muted);white-space:normal;overflow-wrap:normal}
.account-grid button.native-account{border-color:var(--focus);color:var(--text);background:#26364b}
.account-grid button[aria-pressed=true]{border-color:var(--green);background:#153528;color:var(--text)}
.account-caption{gap:8px;line-height:1.3}
.account-note{line-height:1.25}
.taskbar{align-content:start;grid-auto-rows:44px;align-self:start}
.taskbar label{min-height:44px;height:44px;max-height:44px;padding:3px 4px;line-height:1.15}
.taskbar label:has(input:checked){background:var(--panel);border-color:var(--focus);color:var(--text)}
.workarea,.workarea:has(#workflow-settings:not([hidden])){min-height:0;min-width:0}
.composer .action-row{position:static}
.output .empty svg{flex:none}
@media(max-width:720px){.account-grid{gap:3px}.account-grid button.account-choice{font-size:10px}.taskbar{gap:3px}.taskbar label{font-size:11px}.topbar #providers-open{white-space:nowrap}.empty svg{width:100px;height:26px}}
@media(max-width:720px) and (max-height:640px){.empty svg{display:none}.account-grid{gap:2px}.taskbar{gap:2px}}
@media(orientation:landscape) and (min-width:568px) and (max-height:500px){.account-grid{gap:2px}.taskbar{gap:2px}.account-grid button.account-choice{font-size:10px}.empty svg{display:none}}

/* Separate account authorization from API/SDK access without adding a workspace row. */
.account-grid.access-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:6px;align-items:stretch}.access-box{border:1px solid var(--line);border-radius:6px;padding:4px;min-width:0;display:flex;flex-direction:column;gap:3px}.access-box>strong{font-size:11px;line-height:1.2;color:var(--text)}.access-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.api-box{background:var(--panel)}.api-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:8px}.api-provider .provider-head{align-items:flex-start;gap:5px}.api-provider .state{font-size:11px}.api-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.api-actions a{font-size:13px}.api-actions button{min-height:44px}#direct-controls{display:grid;gap:6px}#direct-result{white-space:pre-wrap;overflow-wrap:anywhere}#direct-prompt{min-height:60px}.access-box button.account-choice{font-size:12px}@media(max-width:720px){.access-box{padding:3px;gap:2px}.access-box button.account-choice{font-size:10px}.account-grid.access-grid{gap:4px}.access-box>strong{font-size:10px}}@media(orientation:landscape) and (max-height:500px){.access-box{padding:1px 3px;gap:1px}.access-box>strong{font-size:10px}.account-grid.access-grid{gap:3px}}

/* Developer workspace: visible routing, planned stages and honest execution evidence.
   Preserve the existing viewport grid and 44px primary controls. */
:root{--bg:#10141a;--panel:#171e27;--line:#303a49;--focus:#a8c8ff;--text:#edf2fa;--muted:#aab6c7}
.topbar .mark{color:#a8c8ff}.topbar h1{letter-spacing:-.045em}.policy{color:var(--muted)}
.taskbar label{border-radius:6px}.taskbar label:has(input:checked){background:#24364f;border-color:#86aef5;color:#f1f6ff}
#search:not(:disabled){background:#b4cdfa;color:#111c2d}
.routing-inline{margin-left:auto;min-width:0;flex:0 1 112px}.routing-inline select{min-height:44px;padding:4px 6px;font-size:13px}
#routing-inline[hidden],#workflow-preview[hidden]{display:none!important}
.workflow-preview{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;max-width:100%;margin-top:4px}
.planned-stage{display:flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:6px;padding:5px 8px;font-size:12px;color:var(--text)}
.planned-stage b{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.evidence-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:8px 0}
.evidence-strip>div,.developer-pipeline>div{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:8px;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}
.evidence-strip small,.developer-pipeline span{font-size:11px;color:var(--muted)}.evidence-strip strong,.developer-pipeline strong{font-size:13px}
.developer-pipeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(125px,100%),1fr));gap:5px}
@media(max-width:720px){.routing-inline{flex-basis:96px}.routing-inline select{font-size:12px}.evidence-strip>div{padding:5px}.evidence-strip strong{font-size:12px}}
@media(max-height:500px){.workflow-preview{margin-top:0}.planned-stage{padding:3px 5px}}

/* Submission feedback and controls remain visible above the safe area. */
#bug-picker .dialog-shell{height:min(89dvh,740px);max-height:89dvh}
#bug-picker .dialog-body{flex:1;min-height:0}
#bug-picker .bug-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
#bug-picker .bug-actions>*{min-width:0;min-height:44px}
#bug-picker .bug-actions #bug-status{grid-column:1/-1;min-height:0;margin:0;overflow-wrap:anywhere;text-align:left;font-size:12px}
#bug-picker .bug-actions #bug-status:empty{display:none}
#bug-submit{background:#b4cdfa;color:#111c2d;white-space:normal}
#bug-submit:disabled{opacity:.55}
.task-error{padding:8px;border:1px solid #b8875d;border-radius:6px;background:var(--panel);overflow-wrap:anywhere}
.task-error h3{color:#ffd1a7;margin-bottom:4px}
.task-error button{min-height:44px;margin-top:6px}
@media(max-width:720px){#bug-picker .dialog-shell{height:min(95dvh,740px);max-height:95dvh}}

/* Unified sign-in: one access action, live model library, no provider directory. */
.account-grid.unified-access{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,.8fr);gap:8px;align-items:center;grid-auto-rows:auto;margin:4px 0}
.unified-copy{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px}.unified-copy strong{font-size:12px;line-height:1.2}.unified-copy .account-note{font-size:11px;margin:0}
.account-grid.unified-access .account-choice{font-size:12px}
@media(max-width:720px){.account-grid.unified-access{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,.8fr);gap:4px}.account-grid.unified-access .account-choice{font-size:11px}.unified-copy strong{font-size:11px}.unified-copy .account-note{font-size:10px}}

/* OpenRouter-inspired collections and compact selected-model tray. No extra workspace row. */
.model-marks{display:inline-flex;align-items:center;gap:3px;min-width:0;flex:none}
.model-mark{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none;border:1px solid var(--line);border-radius:6px;background:#202b3a;color:#dbe7fa;font-size:10px;font-weight:700;letter-spacing:-.03em}
#pick-models .model-marks:empty{display:none}
#pick-models #model-summary{margin-left:auto;font-size:12px}
#pick-models .model-marks{margin-left:auto}
#pick-models .model-marks:not(:empty)+#model-summary{margin-left:0}
.collections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;min-width:0;width:100%}
.collections[hidden]{display:none!important}
.collection-choice.quiet{display:flex;align-items:flex-start;flex-direction:column;justify-content:center;gap:4px;min-height:72px;text-align:left;padding:8px;min-width:0;background:var(--panel);color:var(--text)}
.collection-choice strong{font-size:13px;font-weight:600}.collection-choice small{font-size:11px;color:var(--muted)}
.collection-note{margin:4px 0 0}
#workspace-collections{max-width:520px;margin:6px auto 0}
.output .empty:has(#workspace-collections:not([hidden])){justify-content:flex-start;padding:10px 3px;min-height:0}
.picker-selected h3{margin-bottom:6px}.selected-tray{display:flex;flex-direction:column;gap:4px}
.selected-model{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:6px;padding:2px 6px;min-width:0}
.selected-model>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}
.selected-model button{min-height:44px;min-width:44px;font-size:20px}
.models label .model-mark{align-self:center}
@media(max-width:720px){#pick-models .model-mark{width:19px;height:19px;font-size:9px}.collection-choice.quiet{padding:6px;min-height:64px}.collection-choice strong{font-size:12px}}
@media(max-height:640px) and (max-width:720px){#workspace-collections{display:none!important}.output .empty:has(#workspace-collections:not([hidden])){padding:0;justify-content:center}}
@media(max-height:500px){#workspace-collections{display:none!important}}

/* Compact selection menu: local family marks and a separate full model library. */
.model-mark svg{width:16px;height:16px;fill:currentColor;flex:none}
.model-mark[data-family="google"]{color:#9abaff}.model-mark[data-family="deepseek"]{color:#6d8fff}.model-mark[data-family="anthropic"]{color:#f0c2ad}.model-mark[data-family="meta-llama"]{color:#60a5fa}.model-mark[data-family="mistralai"]{color:#ffb74e}
#quick-model-picker{width:min(360px,calc(100vw - 20px));max-width:calc(100vw - 20px);margin:auto;max-height:min(80dvh,520px);border-radius:12px}
#quick-model-picker .dialog-shell{max-height:min(79dvh,510px)}
#quick-model-picker .dialog-body{padding:8px 12px}
#quick-model-picker .dialog-head,#quick-model-picker .dialog-foot{padding:6px 12px}
#quick-model-picker .dialog-head h2{font-size:15px}
#quick-model-picker .dialog-foot button{width:100%;min-height:44px}
#quick-model-picker .selected-model{border:0;border-bottom:1px solid var(--line);border-radius:0}
#quick-model-picker .selected-model:last-child{border-bottom:0}
#workflow-preset{width:100%;min-height:44px}
@media(max-width:720px){#quick-model-picker{margin:auto;max-height:85dvh}#quick-model-picker .dialog-shell{max-height:84dvh}}

/* One model menu: complete inventory and selected models, no separate library button. */
.account-grid.unified-access{grid-template-columns:minmax(0,1.15fr) minmax(0,1.15fr) minmax(0,.65fr)}
.inventory-total{font-size:11px;text-align:right;color:var(--muted);overflow-wrap:anywhere}
#model-picker{width:min(480px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:90dvh}
#model-picker .dialog-shell{max-height:89dvh}
#model-picker .dialog-body{gap:8px}
.catalog-tools{display:flex;align-items:center;gap:6px}.catalog-tools input{flex:1;min-width:0}.catalog-tools button{min-width:44px;min-height:44px}
#models .catalog-model{display:flex;align-items:center;gap:8px;min-height:48px;padding:8px;border:1px solid var(--line);border-radius:6px;min-width:0}
#models .catalog-model[hidden]{display:none!important}.catalog-copy{display:flex;flex-direction:column;min-width:0;flex:1;gap:3px}.catalog-name{overflow-wrap:anywhere;font-size:13px}.catalog-copy small{font-size:11px}
.catalog-open{display:inline-flex;min-height:44px;align-items:center;justify-content:center;padding:4px 8px;flex:none;font-size:12px;color:var(--focus)}
#picker-collections .collection-choice[aria-pressed=true]{border-color:var(--focus)}
#model-picker .model-marks{flex-wrap:wrap}.collection-choice small{font-size:10px}
@media(max-width:720px){.account-grid.unified-access{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,.65fr)}#model-picker{max-height:94dvh}#model-picker .dialog-shell{max-height:93dvh}}
