:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17304e;background:#f4f6fa;font-synthesis:none;line-height:1.55;--blue:#175bcc;--muted:#63768d;--border:#dfe6ef;--soft:#edf3fd;--sidebar:248px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid var(--border);border-radius:8px;padding:10px 14px;background:#fff;color:#21436d;font-size:13px;font-weight:650;line-height:1.4}button:hover{border-color:#9bb9e8;background:#f3f7ff}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,.attachment-button:focus-within{outline:3px solid #4383e6;outline-offset:3px}a{color:var(--blue);text-underline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:24px;letter-spacing:-.6px;margin:0;line-height:1.25}h2{font-size:24px;line-height:1.35;letter-spacing:-.6px}h3{font-size:14px}p:last-child{margin-bottom:0}[hidden]{display:none!important}.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}.skip-link{position:fixed;top:-70px;left:16px;z-index:50;background:#fff;padding:12px;border-radius:8px}.skip-link:focus{top:12px}.shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:100vh}#sidebar{position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;gap:22px;background:#fff;border-right:1px solid var(--border);padding:27px 20px;overflow:auto}.brand{font-size:30px;font-weight:800;letter-spacing:-1.4px;color:#183b6c;text-decoration:none;line-height:1}.brand span{display:block;font-size:10px;letter-spacing:1.8px;font-weight:700;text-transform:uppercase;margin-top:9px;color:#718199}.project-label{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:650;margin-top:5px}.project-label small{display:block;font-size:10px;color:var(--muted);font-weight:400}.project-icon{background:var(--soft);color:var(--blue);border:1px solid #d5e3fa;font-size:16px;border-radius:9px;width:35px;height:35px;display:grid;place-items:center}.primary{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 2px 4px #14478e10}.primary:hover{background:#124ba9;color:#fff;border-color:#124ba9}#new{width:100%;text-align:left}#views{display:flex;flex-direction:column;gap:4px}#views button{display:flex;gap:12px;align-items:center;text-align:left;border:0;background:transparent;font-size:13px;padding:10px 12px;color:#526c89}#views button span{width:16px;font-size:17px;text-align:center}#views button.selected{color:#124da8;background:#eaf2ff}#history{border-top:1px solid var(--border);padding-top:20px;min-height:120px;flex:1}.section-label{font-size:10px;letter-spacing:1.25px;font-weight:750;color:#6d7f95;margin-bottom:13px}#history-search{width:100%;font-size:11px;padding:9px 10px;background:#f8faff;border-color:#e3e9f2}input,textarea,select{border:1px solid #c2cfe0;border-radius:8px;color:#17304e;background:#fff;padding:11px;min-width:0}input[type=search]::-webkit-search-cancel-button{cursor:pointer}.history-filters{display:flex;gap:3px;margin:9px 0}.history-filters button{font-size:10px;padding:6px 9px;border:0;color:var(--muted);background:transparent}.history-filters button[aria-pressed=true]{background:#eef2f8;color:#213d60}#conversations{display:flex;flex-direction:column;gap:4px}#conversations button{text-align:left;background:transparent;border:0;font-size:12px;font-weight:500;padding:9px 10px;overflow-wrap:anywhere}#conversations button.selected{background:var(--soft);color:var(--blue)}.history-title{display:block}.history-meta{display:block;font-size:10px;color:var(--muted);margin-top:3px}.boundary{font-size:11px;font-weight:650;margin-top:auto;border-top:1px solid var(--border);padding-top:18px}.boundary p{font-size:10px;font-weight:400;color:var(--muted);margin:8px 0 0}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2c8163;margin-right:6px}.quiet{background:transparent;color:#526d8e;font-size:12px}.small,small{font-size:11px}.muted{color:var(--muted)}main{padding:0 32px 20px;min-width:0;max-width:1680px;width:100%;margin:0 auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:27px 0 23px;border-bottom:1px solid var(--border)}.header-title{display:flex;gap:15px;align-items:center}.eyebrow{font-size:10px;letter-spacing:1.2px;color:#708099;font-weight:700;margin:0 0 5px}.badge{font-size:10px;color:#32664f;background:#e8f3ed;border:1px solid #d0e5d9;border-radius:30px;padding:6px 10px;white-space:nowrap}.badge.warning{color:#805b1b;background:#fff6df;border-color:#ecdcb6}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:24px 0;gap:14px}.stats>div{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--border);border-radius:10px;background:#fff;padding:17px 18px;gap:10px}.stats span{font-size:11px;color:#667b93}.stats strong{font-size:24px;line-height:1.1;font-weight:700;letter-spacing:-1px}.workspace-grid{display:grid;grid-template-columns:minmax(0,1fr) 306px;gap:22px;align-items:start}.conversation-pane{border:1px solid var(--border);background:#fff;border-radius:13px;min-width:0;overflow:hidden}.pane-heading{padding:23px 24px 18px;border-bottom:1px solid #e9edf3;display:flex;justify-content:space-between;gap:15px;align-items:flex-start}.pane-heading h2{font-size:18px;letter-spacing:-.25px;margin:0;overflow-wrap:anywhere}.pane-heading .small{margin:5px 0 0}.compact-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;flex-shrink:0;max-width:190px}.compact-actions button{font-size:10px;padding:6px 8px}.herbie-mark{display:grid;place-items:center;width:46px;height:46px;border-radius:13px;background:#175bcc;color:#fff;font-size:25px;font-weight:750;box-shadow:0 4px 14px #1b5aa025}#empty{padding:42px 30px 32px}#empty h2{font-size:25px;margin:21px 0 10px;max-width:400px}#empty p{color:#61768f;font-size:13px;max-width:480px}.suggestions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}.suggestions button{font-size:11px;font-weight:550;text-align:left;padding:14px;background:#f9fbff;border-color:#e2eaf5;display:flex;justify-content:space-between;gap:8px}.suggestions button span{color:var(--blue)}#messages{padding:22px 24px 4px;display:flex;flex-direction:column;gap:18px}#messages:empty{padding:0}.message{border:1px solid #e5eaf2;border-radius:12px;background:#f8faff;padding:15px 17px}.message.user{background:#edf3ff;border-color:#dce7f9;margin-left:26px}.message h3{font-size:10px;color:#4271a9;text-transform:uppercase;letter-spacing:.6px;margin-bottom:8px}.message p{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.message-images{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.message-images img{width:100px;max-height:90px;object-fit:contain;border:1px solid var(--border);border-radius:7px;background:#fff}.message time{display:block;color:#8291a5;font-size:9px;margin-top:9px}#chat-form{padding:22px 24px;display:flex;flex-direction:column;gap:10px;border-top:1px solid #edf0f5;margin-top:20px}#chat-form>label{font-size:11px;font-weight:650}textarea{resize:vertical;min-height:105px;font-size:12px;line-height:1.6;padding:13px}textarea::placeholder{color:#8292a7}.compose-footer{display:flex;align-items:center;justify-content:space-between;gap:10px}.compose-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.attachment-button{font-size:10px;font-weight:600;color:#527093;cursor:pointer;padding:7px 0}.attachment-button span{font-size:16px;vertical-align:-1px}.task-options{position:relative;font-size:10px;color:#637891}.task-options summary{cursor:pointer;padding:7px 0}.task-options[open]{width:100%}.task-options select{font-size:11px;margin:7px 0 0 8px;padding:7px}.task-options label{display:inline-block}#send{font-size:11px;padding:11px 15px;white-space:nowrap}#attachment-help{color:#8390a1;font-size:9px;line-height:1.6}.attachments{display:flex;flex-wrap:wrap;gap:10px}.attachment{position:relative;display:flex;align-items:center;gap:9px;border:1px solid var(--border);border-radius:9px;background:#f8faff;padding:8px;max-width:100%}.attachment img{width:50px;height:44px;object-fit:cover;border-radius:5px;background:#fff}.attachment-name{font-size:10px;max-width:150px;overflow-wrap:anywhere}.attachment-status{font-size:9px;color:#70829a}.attachment button{font-size:10px;padding:4px 7px}.work-panel{display:flex;flex-direction:column;gap:18px;min-width:0}.panel-section{border:1px solid var(--border);border-radius:12px;background:#fff;padding:20px}.preview-empty{border:1px dashed #d5e0ee;background:#f8faff;border-radius:9px;min-height:155px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px}.preview-icon{font-size:28px;color:#8fabd0;line-height:1;margin-bottom:13px}.preview-empty h3{font-size:12px;margin-bottom:7px}.preview-empty p{font-size:10px;color:#74869d}.preview-ready{background:#f2f8ff;border:1px solid #d8e7fa;border-radius:9px;padding:18px}.preview-ready h3{font-size:14px;margin:6px 0}.preview-ready p{font-size:11px;color:#5f7897}.preview-link{display:block;font-size:12px;font-weight:650;margin-top:15px}.preview-state{display:inline-block;font-size:9px;color:#33705a;background:#e4f2eb;padding:3px 7px;border-radius:20px}.job{border-left:2px solid #dbe5f2;padding-left:14px;margin:0 0 19px;position:relative}.job:before{content:"";width:8px;height:8px;border-radius:50%;background:#5487d2;position:absolute;left:-5px;top:5px;box-shadow:0 0 0 4px #fff}.job:last-child{margin-bottom:0}.job.failure:before{background:#bb7225}.job strong{font-size:11px;line-height:1.4;display:block}.job p{font-size:10px;color:#6b7d94;margin:6px 0;overflow-wrap:anywhere}.job button{font-size:10px;padding:8px 10px;margin-top:7px;text-align:left;width:100%}.job small{display:block;color:#8593a5;font-size:9px;margin-top:8px}.job details{font-size:10px;margin:7px 0;color:#6b7d94}.job details summary{cursor:pointer}.timeline{padding-left:16px;margin:8px 0;display:flex;flex-direction:column;gap:8px}.timeline li{font-size:10px;color:#6b7d94}.timeline time{display:block;font-size:9px}.agent{display:flex;gap:10px;align-items:center;margin-bottom:13px}.agent:last-child{margin:0}.agent-mark{background:#ecf3ff;border-radius:9px;width:30px;height:30px;display:grid;place-items:center;color:#3568a9;font-size:12px;font-weight:700;flex-shrink:0}.agent h3{font-size:11px;margin:0}.agent p{font-size:10px;color:#7a8ba0;margin:2px 0 0}.notice{background:#fff8e8;border:1px solid #efdfbb;border-radius:9px;color:#806127;padding:13px 16px;font-size:12px;margin:18px 0}#request-readonly{margin:18px 24px}.loading{color:#617891;font-size:13px;padding:28px 0}.view-heading{display:flex;justify-content:space-between;gap:25px;align-items:flex-start;margin:30px 0 22px}.view-heading h2{margin-bottom:8px;font-size:23px}.view-heading p{font-size:12px;max-width:650px}.repository-list{display:grid;gap:12px}.repository-item{border:1px solid var(--border);background:#fff;border-radius:11px;padding:19px 22px;display:flex;justify-content:space-between;align-items:center;gap:20px}.repository-item h3{font-size:14px;margin:7px 0;color:#23466e}.repository-item p{font-size:11px;color:#7b8b9f;margin:0}.repository-item button{text-align:left;border:0;padding:0;background:transparent;color:inherit;font-size:inherit;font-weight:inherit}.repository-item button:hover{text-decoration:underline}.item-number{font-size:10px;color:#74879e}.item-label{display:inline-block;font-size:9px;padding:2px 7px;background:#edf3fc;color:#426592;border-radius:5px;margin:3px 5px 0 0}.item-state{font-size:10px;color:#466887;border:1px solid #dae4ef;background:#f7faff;padding:5px 9px;border-radius:20px;white-space:nowrap}.empty-state{border:1px dashed #d7e1ed;border-radius:12px;padding:40px 25px;text-align:center;color:#778aa2;font-size:13px;background:#fafcff}.activity-list{display:flex;flex-direction:column;gap:12px}.activity-item{padding:18px 22px;border:1px solid var(--border);border-radius:10px;background:#fff}.activity-item h3{margin-bottom:6px;font-size:13px}.activity-item p{font-size:12px;color:#657d96}.activity-item time{font-size:10px;color:#8896a8}#error,#item-error{background:#fff1ed;color:#963b28;border:1px solid #efcfc5;border-radius:9px;padding:12px 16px;font-size:12px;margin:18px 0}#login{max-width:470px;margin:65px auto 90px;padding:30px;background:#fff;border:1px solid var(--border);border-radius:15px}#login>.herbie-mark{margin-bottom:24px}#login h2{font-size:30px;letter-spacing:-1px;margin-top:12px}#login>p:not(.eyebrow){font-size:13px;color:var(--muted)}#login-form{display:flex;flex-direction:column;gap:10px;margin-top:28px}#login-form label{font-size:12px;font-weight:650}#login-form input,#login-form select{font-size:13px}#login-form button{margin-top:12px}footer{font-size:9px;color:#92a0b2;display:flex;justify-content:center;gap:9px;padding-top:26px;margin-top:18px}#menu-toggle{display:none}dialog{max-width:730px;width:calc(100% - 32px);max-height:90dvh;overflow:auto;border:1px solid var(--border);border-radius:16px;padding:26px 30px;color:#17304e;box-shadow:0 20px 80px #19385b30}dialog::backdrop{background:#16375b55}.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.dialog-top button{font-size:11px}.dialog-top .eyebrow{margin:0}#item-title{font-size:24px;margin-bottom:10px}.item-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;margin:22px 0;color:#526d8a;max-height:360px;overflow:auto}#item-files,#item-checks{font-size:12px;margin:20px 0}#item-files ul,#item-checks ul{padding-left:19px;overflow-wrap:anywhere}#item-files li,#item-checks li{margin-bottom:6px}.dialog-actions{display:flex;flex-wrap:wrap;gap:10px;padding-top:17px;border-top:1px solid var(--border)}.dialog-actions a{font-size:12px;padding:10px 0;margin-left:auto}.action-note{font-size:11px;color:#7a8da3;margin-top:12px}.busy{opacity:.6;pointer-events:none}@media(min-width:1500px){.workspace-grid{grid-template-columns:minmax(0,1fr) 340px}.conversation-pane{min-height:640px}#empty{padding:55px 40px 40px}#empty h2{font-size:29px}#messages{padding:28px 30px 4px}#chat-form{padding:25px 30px}.pane-heading{padding:25px 30px}}@media(max-width:1170px){:root{--sidebar:220px}main{padding:0 24px 20px}.workspace-grid{grid-template-columns:minmax(0,1fr) 260px;gap:15px}.pane-heading{flex-direction:column}.compact-actions{max-width:none}.stats>div{padding:15px 12px;flex-direction:column;align-items:flex-start;gap:7px}.stats strong{font-size:23px}.panel-section{padding:17px}.compose-footer{flex-wrap:wrap}.compose-tools{flex:1}.suggestions{grid-template-columns:1fr}#empty{padding:30px 23px}.message.user{margin-left:12px}}@media(max-width:960px){.workspace-grid{grid-template-columns:minmax(0,1fr)}.work-panel{display:grid;grid-template-columns:1fr 1fr}.work-panel .panel-section:last-child{grid-column:1/-1}#agents{display:flex;justify-content:space-between;gap:15px}.agent{margin:0}.pane-heading{flex-direction:row}.suggestions{grid-template-columns:1fr 1fr}.compose-footer{flex-wrap:nowrap}.stats{gap:9px}.stats span{font-size:10px}}@media(max-width:700px){:root{--sidebar:270px}.shell{display:block}#sidebar{position:fixed;z-index:30;left:0;top:0;width:min(var(--sidebar),85vw);height:100dvh;transform:translateX(-100%);transition:transform .18s ease;box-shadow:8px 0 35px #17385320}body.nav-open #sidebar{transform:translateX(0)}#nav-scrim{position:fixed;inset:0;z-index:25;border:0;border-radius:0;background:#19385955}#menu-toggle{display:block;line-height:1;font-size:18px;padding:8px 10px}main{padding:0 16px 20px}.topbar{padding:20px 0 18px;gap:12px}.header-title{gap:10px}h1{font-size:21px}.eyebrow{font-size:8px;letter-spacing:1px}.badge{font-size:8px;padding:6px 8px;max-width:100px;white-space:normal;text-align:center}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:17px 0}.stats>div{padding:13px 14px;flex-direction:row;align-items:center}.stats strong{font-size:21px}.stats span{font-size:10px}.pane-heading{padding:18px;flex-direction:column;gap:12px}.pane-heading h2{font-size:17px}.compact-actions{justify-content:flex-start}#empty{padding:28px 20px}#empty h2{font-size:24px}#empty p{font-size:12px}.suggestions{grid-template-columns:1fr;gap:8px;margin-top:20px}.suggestions button{padding:12px}.herbie-mark{width:40px;height:40px;font-size:22px;border-radius:11px}#messages{padding:20px 17px 0;gap:14px}.message{padding:13px 14px}.message.user{margin-left:8px}.message p{font-size:12px}#chat-form{padding:18px;gap:9px;margin-top:16px}textarea{font-size:13px;min-height:112px}.compose-footer{flex-wrap:wrap;align-items:flex-start}.compose-tools{flex-basis:100%;justify-content:space-between}#send{width:100%;font-size:12px}.attachment-button,.task-options{font-size:11px}.attachment-name{max-width:130px}.work-panel{display:flex}.panel-section{padding:19px}.preview-empty{min-height:125px}#agents{display:flex;flex-direction:column;gap:16px}.view-heading{margin-top:23px;gap:14px}.view-heading h2{font-size:22px}.view-heading p{font-size:12px}.view-heading>button{font-size:11px;padding:8px 10px}.repository-item{padding:17px;gap:12px;align-items:flex-start}.repository-item h3{font-size:13px}.item-state{font-size:9px}.repository-item p{font-size:10px}.activity-item{padding:17px}.notice{font-size:11px}#login{margin:30px auto;padding:24px}#login h2{font-size:27px}dialog{padding:20px;max-height:92dvh}#item-title{font-size:22px}.dialog-actions a{margin-left:0}.dialog-actions button{flex:1}.boundary{font-size:11px}.boundary p{font-size:10px}footer{font-size:8px;gap:6px;flex-wrap:wrap}body.nav-open{overflow:hidden}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.repository-search{font-size:12px;max-width:500px;width:100%;margin-bottom:18px;background:#fff}

.mobile-status{display:none}@media(max-width:700px){.mobile-status{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:13px 15px;margin-bottom:14px;border:1px solid #cddff7;background:#eaf2ff;border-radius:10px}.mobile-status strong{font-size:11px}.mobile-status p{font-size:10px;color:#5f7897;margin:3px 0 0}.mobile-status a{font-size:11px;font-weight:650;white-space:nowrap}}

.agent-report{font-size:10px;color:#567294;margin-top:5px}.agent-report summary{cursor:pointer}.agent-report p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;padding-top:8px}.agent>div{min-width:0}
/* Keep long request histories inside their own scroll area, clear of account controls. */
#history{display:flex;flex-direction:column;min-height:180px;overflow:hidden}#history>.section-label,#history-search,.history-filters{flex-shrink:0}#conversations{flex:1;min-height:0;overflow-y:auto;padding-bottom:3px}#conversations button{flex-shrink:0}

.history-paging{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-shrink:0;padding-top:8px;border-top:1px solid #e9edf4;margin-top:6px}.history-paging button{font-size:11px;padding:5px 9px}.history-paging span{font-size:9px;color:#7c8da1}#history{min-height:205px}

.attachment-button.disabled{opacity:.6;cursor:not-allowed}

.attempt-label{display:block;font-size:9px;font-weight:650;color:#7890ab;margin-bottom:5px}.current-attempt{margin-bottom:0}.attempt-history{border-top:1px solid #e7edf5;margin-top:15px;padding-top:12px}.attempt-history>summary{font-size:11px;font-weight:600;color:#516f93;cursor:pointer}.attempt-history[open]>summary{margin-bottom:17px}.attempt-history .job{margin-left:4px}.job-report{max-height:260px;overflow:auto;white-space:pre-wrap;padding-right:5px}.previous-attempt .attempt-label{font-weight:400}

/* Account controls keep the same simple forms on desktop and narrow screens. */
.account-view{max-width:1180px}.account-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:24px;align-items:start}.account-card{background:#fff;border:1px solid var(--line,#dce4ee);border-radius:14px;padding:26px;min-width:0}.account-card h3{margin:0 0 12px;font-size:1.2rem}.account-card p{line-height:1.6}.account-form{display:grid;gap:10px;margin-top:24px}.account-form label{font-weight:600;margin-top:6px}.account-form input{width:100%;min-width:0}.account-form small{color:#526178;line-height:1.5}.account-form button{margin-top:10px;justify-self:start}.account-form [role=alert]{color:#a52031}.account-form [role=status]{color:#146343}.user-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 0;border-bottom:1px solid #e5ebf3}.user-row:last-child{border-bottom:0}.user-row strong,.user-row small{display:block;overflow-wrap:anywhere}.user-row small{color:#526178;margin-top:5px}.user-row .badge{flex-shrink:0}.account-card .view-heading{align-items:center;gap:12px}.account-card .view-heading h3{margin:0}#account-identity{overflow-wrap:anywhere}
@media(max-width:900px){.account-grid{grid-template-columns:1fr}.account-card{padding:22px}}@media(max-width:700px){.account-card{padding:20px}.account-form button{width:100%}.account-card .view-heading{flex-wrap:wrap}}

/* The composer stays at the viewport edge; only the transcript and progress scroll. */
body.chat-view .shell{height:min(100dvh,var(--app-height,100dvh));min-height:0}
body.chat-view main{height:100%;min-height:0;display:flex;flex-direction:column;padding-bottom:max(12px,env(safe-area-inset-bottom))}
body.chat-view .topbar,body.chat-view main>#error,body.chat-view #retry-state,body.chat-view #setup,body.chat-view .stats{flex-shrink:0}
body.chat-view .topbar{padding:18px 0}
body.chat-view .stats{margin:16px 0}
body.chat-view .stats>div{padding:12px 14px}
body.chat-view #workspace,body.chat-view #workspace-view{display:flex;flex-direction:column;flex:1;min-height:0}
body.chat-view .workspace-grid{flex:1;min-height:0;align-items:stretch;position:relative}
body.chat-view .conversation-pane{display:flex;flex-direction:column;min-height:0;height:100%}
body.chat-view .pane-heading{flex-shrink:0;padding:16px 22px}
body.chat-view .pane-heading h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.chat-view #chat-form{flex-shrink:0;margin:0;padding:14px 22px;max-height:50%;overflow-y:auto}
body.chat-view #message{resize:vertical;min-height:64px;max-height:160px;height:76px;flex-shrink:0}
body.chat-view #request-readonly{flex-shrink:0}
body.chat-view footer{display:none}
.transcript{position:relative;flex:1;min-height:0;display:flex}
#conversation-scroll{flex:1;min-width:0;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable}
#conversation-scroll:focus-visible{outline:2px solid #4383e6;outline-offset:-3px}
#messages{padding-bottom:22px}
.message-images img{height:90px}
#latest-message{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);box-shadow:0 3px 14px #17304e25;border-color:#b7cdec;white-space:nowrap;font-size:12px}
body.chat-view .work-panel{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.work-panel>.panel-section{flex-shrink:0}
.workspace-tools{display:none}
@media(max-width:960px){
  .workspace-tools{display:flex;justify-content:flex-end;margin-bottom:8px;flex-shrink:0}
  #toggle-progress{font-size:11px;padding:7px 11px}
  body.chat-view .work-panel{display:none;position:absolute;inset:0;background:#f4f6fa}
  body.chat-view .progress-open .work-panel{display:flex}
  .progress-open .conversation-pane{visibility:hidden}
}
@media(max-width:700px){
  body.chat-view main{padding:0 10px max(8px,env(safe-area-inset-bottom))}
  body.chat-view .topbar{padding:6px 0}
  body.chat-view .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:8px 0}
  body.chat-view .stats>div{padding:7px 6px;flex-direction:column;align-items:center;gap:3px}
  body.chat-view .stats span{font-size:9px;white-space:nowrap}
  body.chat-view .stats strong{font-size:18px}
  body.chat-view .pane-heading{padding:10px 14px;gap:6px}
  body.chat-view .pane-heading .eyebrow{display:none}
  body.chat-view .pane-heading h2{font-size:15px;-webkit-line-clamp:1}
  body.chat-view .pane-heading .small{font-size:10px}
  .compact-actions button{padding:4px 7px}
  body.chat-view #chat-form{padding:10px 14px;gap:6px}
  body.chat-view #message{height:64px;min-height:54px;font-size:16px;padding:9px 11px}
  body.chat-view .compose-footer{flex-wrap:nowrap;align-items:center;gap:8px}
  body.chat-view .compose-tools{flex-basis:auto;gap:4px}
  body.chat-view #send{width:auto;max-width:140px;padding:9px 11px;white-space:normal}
  body.chat-view #attachment-help{font-size:10px;line-height:1.4}
  body.chat-view .mobile-status{flex-shrink:0;padding:8px 12px;margin-bottom:8px}
  body.chat-view #messages{padding:14px 12px 20px}
}

  body.chat-view.compact-chat .stats,body.chat-view.compact-chat #mobile-status,body.chat-view.compact-chat .pane-heading .eyebrow,body.chat-view.compact-chat #conversation-meta{display:none}
  body.chat-view.compact-chat .topbar{padding:7px 0}
  body.chat-view.compact-chat .pane-heading{padding:5px 12px}
  body.chat-view.compact-chat .workspace-tools{margin:5px 0}
  body.chat-view.compact-chat #chat-form{padding:8px 14px;gap:5px}
  body.chat-view.compact-chat #message{height:54px;min-height:44px}

/* Saved PRs stay reachable before a preview has finished its checks. */
.pane-heading>div:first-child{min-width:0}.conversation-pr{font-size:11px;margin:7px 0 0;line-height:1.5}.conversation-pr>span{display:block;color:var(--muted);font-size:10px}.pull-request-link{display:block;font-size:11px;line-height:1.5;overflow-wrap:anywhere;margin-top:7px}.conversation-pr .pull-request-link{margin-top:1px}.job>.pull-request-link{margin-bottom:7px}

/* The verified Azure URL stays beside the saved PR, including on phones. */
.preview-url{display:block;font-size:11px;line-height:1.5;overflow-wrap:anywhere;margin-top:1px}
body.compact-chat .conversation-pr{margin-top:3px}
body.compact-chat .conversation-pr>span{display:inline;margin-right:5px}
body.compact-chat .conversation-pr a{display:inline;margin-top:0}
body.chat-view.compact-chat .pane-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;align-items:center}
body.compact-chat .pane-heading>div:first-child{display:contents}
body.compact-chat .pane-heading h2{grid-column:1;grid-row:1}
body.compact-chat .compact-actions{grid-column:2;grid-row:1}
body.compact-chat .conversation-pr{grid-column:1/-1}
body.chat-view.compact-chat .topbar .eyebrow{display:none}
body.chat-view.compact-chat .topbar h1{font-size:18px}

/* Feature 4: keep the request, current status, and composer together. */
.workspace-grid{display:block;flex:1;min-width:0;min-height:0}
.workspace-grid.has-result{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(360px,1fr);gap:14px;align-items:stretch}
.conversation-pane{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;overflow:hidden}
.pane-heading{flex-shrink:0}
.pane-heading>div:first-child{min-width:0}
#conversation-title,#conversation-meta,#conversation-pr,#conversation-preview{overflow-wrap:anywhere}
#workspace-stage:not([hidden]){flex-shrink:0;margin:0 22px 10px}
.workspace-stage-root{min-width:0}
.workspace-stage-content{min-width:0}
.workspace-stage-stepper,.workspace-stage-notice{border:1px solid #d7e5f7;border-radius:10px;background:#f4f8ff;padding:11px 14px}
.workspace-stage-heading,.workspace-stage-notice>strong{display:block;color:#214c82;font-size:12px;font-weight:700}
.workspace-stage-message,.workspace-stage-next{font-size:11px;color:#5c718b;line-height:1.45;margin:5px 0 0;overflow-wrap:anywhere}
.workspace-stage-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;list-style:none;padding:0;margin:9px 0 0}
.workspace-stage-steps li{display:flex;min-width:0;flex-direction:column;gap:2px;border-top:2px solid #dbe5f1;padding-top:5px;color:#70829a}
.workspace-stage-steps li.complete{border-color:#638ab9;color:#385b84}
.workspace-stage-steps li.current{border-color:#175bcc;color:#124da8}
.workspace-stage-label{font-size:11px;font-weight:650;overflow-wrap:anywhere}
.workspace-stage-state{font-size:9px;color:#71839a}
.workspace-stage-steps li.current .workspace-stage-state{color:#1754a8;font-weight:650}
.workspace-stage-notice.attention{border-color:#ead8b8;background:#fff9ed}
.workspace-stage-notice.attention>strong{color:#795718}
.workspace-stage-notice.guidance{border-color:#c9dbf5;background:#eef5ff}
.workspace-stage-notice.neutral{border-color:#d8e0e9;background:#f8fafc}
.workspace-stage-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.workspace-stage-action{font-size:11px;padding:7px 10px;background:#fff;border-color:#bfd0e5;color:#174b8d}
.workspace-stage-action:focus-visible{outline:2px solid #4383e6;outline-offset:2px}
.workspace-details{flex-shrink:0;margin:0 22px 10px;border:1px solid #e1e8f1;border-radius:9px;background:#fbfcfe}
.workspace-details>summary{padding:8px 11px;color:#526d8e;font-size:11px;font-weight:650;cursor:pointer}
.workspace-details-content{max-height:min(34vh,300px);overflow:auto;padding:0 12px 12px;overscroll-behavior:contain}
.workspace-details .stats{margin:7px 0 13px;gap:8px}
.workspace-details .stats>div{padding:9px 11px}
.workspace-details .stats strong{font-size:18px}
.details-section{border-top:1px solid #e8edf4;padding-top:10px;margin-top:10px}
.details-section h3{font-size:10px;color:#71839a;letter-spacing:.6px;text-transform:uppercase;margin:0 0 10px}
.workspace-tabs{display:none}
.workspace-content{display:block;flex:1;min-height:0;min-width:0;overflow:hidden}
.workspace-chat-panel{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;overflow:hidden}
.result-panel{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--border);border-radius:11px;background:#fff;padding:16px}
.result-panel[hidden],.workspace-chat-panel[hidden]{display:none!important}
#workspace-grid.result-unconfirmed #preview-module{display:none}
.result-refresh-state{padding:16px;border:1px solid #d8e0e9;border-radius:9px;background:#f8fafc;color:#214c82;font-size:12px}
.result-refresh-state strong{display:block}
.result-refresh-state p{margin:6px 0 0;color:#5c718b;font-size:11px;line-height:1.5}
#preview-module{min-width:0;max-width:100%}
body.chat-view #workspace-view{flex:1;min-height:0}
body.chat-view .workspace-grid,body.chat-view .conversation-pane{height:100%;min-height:0}
body.chat-view .workspace-details-content{max-height:min(27vh,240px)}
body.chat-view #workspace-stage:not([hidden]){margin:0 18px 8px}
body.chat-view .workspace-details{margin:0 18px 8px}
body.chat-view .workspace-content{flex:1;min-height:0}
body.chat-view #workspace-chat-panel{min-height:0}
body.chat-view #chat-form{flex-shrink:0;margin:0;max-height:42%;overflow-y:auto}
body.chat-view #request-readonly{flex-shrink:0;margin:0 18px 8px}
body.chat-view #guided-ui{flex-shrink:0;max-height:min(26vh,220px);overflow-y:auto;overscroll-behavior:contain}
body.chat-view #message{resize:vertical;min-height:54px;max-height:160px;height:72px;flex-shrink:0}
body.chat-view footer{display:none}
@media(max-width:960px){
  body.chat-view .workspace-grid.has-result{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto;gap:0}
  body.chat-view .workspace-grid.has-result>.conversation-pane{display:contents}
  body.chat-view .workspace-grid.has-result>.conversation-pane>.pane-heading{grid-column:1;grid-row:1}
  body.chat-view .workspace-grid.has-result>.conversation-pane>#workspace-stage{grid-column:1;grid-row:2}
  body.chat-view .workspace-grid.has-result>.conversation-pane>#workspace-details{grid-column:1;grid-row:3}
  body.chat-view .workspace-grid.has-result>.conversation-pane>#workspace-tabs{grid-column:1;grid-row:4}
  body.chat-view .workspace-grid.has-result>.conversation-pane>#workspace-content{grid-column:1;grid-row:5}
  body.chat-view .workspace-grid.has-result>.conversation-pane>#request-readonly{grid-column:1;grid-row:6}
  body.chat-view .workspace-grid.has-result>.conversation-pane>#chat-form{grid-column:1;grid-row:7}
  body.chat-view .workspace-grid.has-result>#result-panel{grid-column:1;grid-row:5;height:auto;min-height:0}
  body.chat-view .workspace-tabs:not([hidden]){display:flex;flex-shrink:0;gap:4px;margin:0 16px 7px;border-bottom:1px solid #e7edf4}
  .workspace-tabs button{flex:1;border:0;border-radius:8px 8px 0 0;background:transparent;color:#62758d;font-size:11px;padding:8px 10px}
  .workspace-tabs button[aria-selected="true"]{background:#edf4ff;color:#174f9a;box-shadow:inset 0 -2px #175bcc;font-weight:700}
  body.chat-view .result-panel{height:100%;padding:12px}
  body.chat-view .workspace-stage-steps{gap:4px}
  body.chat-view .workspace-stage-label{font-size:10px}
  body.chat-view .workspace-stage-stepper,body.chat-view .workspace-stage-notice{padding:8px 10px}
  body.chat-view #workspace-stage:not([hidden]){margin:0 12px 5px}
  body.chat-view .workspace-details{margin:0 12px 5px}
}
@media(max-width:700px){
  body.chat-view main{padding:0 10px max(8px,env(safe-area-inset-bottom))}
  body.chat-view .topbar{padding:4px 0}
  body.chat-view .pane-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:5px 12px;gap:3px 8px}
  body.chat-view .pane-heading>div:first-child{display:contents}
  body.chat-view .pane-heading .eyebrow{display:none}
  body.chat-view .pane-heading h2{grid-column:1;grid-row:1;font-size:15px;-webkit-line-clamp:2}
  body.chat-view .pane-heading .small{font-size:10px}
  body.chat-view .compact-actions{grid-column:2;grid-row:1}
  body.chat-view .conversation-pr{grid-column:1/-1;margin:0;line-height:1.35}
  body.chat-view .conversation-pr>span{display:inline;margin-right:4px;font-size:10px}
  body.chat-view .conversation-pr a{display:inline;margin:0;font-size:10px;line-height:1.35}
  body.chat-view #conversation-preview>span{font-size:10px}
  body.chat-view .preview-url{display:inline;font-size:10px;line-height:1.35;margin:0}
  body.chat-view .workspace-stage-stepper{padding:3px 8px}
  body.chat-view .workspace-stage-stepper .workspace-stage-message{display:none}
  body.chat-view .workspace-stage-steps{margin-top:4px}
  body.chat-view .workspace-details-content{max-height:22vh}
  body.chat-view .workspace-details>summary{padding:2px 8px}
  body.chat-view .workspace-tabs:not([hidden]){margin:0 12px 2px}
  body.chat-view .workspace-tabs button{padding-top:3px;padding-bottom:3px}
  body.chat-view .workspace-content{min-height:0}
  body.chat-view .transcript{min-height:0}
  body.chat-view #messages{padding:12px 12px 20px}
  body.chat-view #chat-form{padding:6px 10px;gap:4px;max-height:min(32dvh,280px)}
  body.chat-view #message{height:52px;min-height:48px;font-size:16px;padding:7px 9px}
  body.chat-view .compose-footer{flex-wrap:nowrap;align-items:center;gap:7px}
  body.chat-view .compose-tools{flex-basis:auto;flex-wrap:nowrap;gap:3px}
  body.chat-view .attachment-button,body.chat-view .task-options summary{font-size:10px;white-space:nowrap}
  body.chat-view #send{width:auto;min-height:38px;max-width:110px;padding:6px 8px;font-size:11px;line-height:1.25;white-space:normal}
  body.chat-view #attachment-help{font-size:10px;line-height:1.35}
  body.chat-view #guided-ui{max-height:min(24vh,180px)}
  body.chat-view .workspace-stage-label{font-size:10px}
  body.chat-view .workspace-stage-state{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  body.chat-view .workspace-stage-message{font-size:10px}
  body.chat-view .workspace-stage-action{font-size:10px;padding:6px 8px}
}

/* Short screens scroll the shared workspace while keeping tabs and composer reachable. */
@media(max-height:600px) and (max-width:960px){
  body.chat-view .workspace-grid.has-result{overflow-y:auto;overscroll-behavior:contain;grid-template-rows:auto auto auto auto minmax(300px,1fr) auto 0;padding-bottom:0}
  body.chat-view .workspace-tabs:not([hidden]){position:sticky;top:0;z-index:4;background:#fff;scroll-margin-top:0}
  body.chat-view #workspace-stage:not([hidden]){margin-bottom:3px}
  body.chat-view .workspace-stage-heading{font-size:11px}
  body.chat-view .workspace-stage-stepper .workspace-stage-message{display:none}
  body.chat-view #workspace-stage .workspace-stage-steps{margin-top:3px}
  body.chat-view .workspace-details{margin-bottom:3px}
  body.chat-view .workspace-details>summary{padding-top:3px;padding-bottom:3px}
  body.chat-view .workspace-tabs button{padding-top:4px;padding-bottom:4px}
  body.chat-view #workspace-content,body.chat-view #result-panel{scroll-margin-top:30px}
  body.chat-view #chat-form{position:fixed;left:calc(var(--sidebar) + 24px);right:24px;bottom:0;z-index:8;background:#fff;max-height:min(38dvh,190px);overflow-y:auto;box-shadow:0 -8px 18px #17304e12;scroll-margin-bottom:0}
  body.chat-view #latest-message{position:fixed;left:50%;bottom:calc(min(38dvh,190px) + 12px);z-index:9;transform:translateX(-50%)}
  body.chat-view #result-panel{padding-bottom:calc(12px + min(38dvh,190px));scroll-padding-bottom:min(38dvh,190px)}
  body.chat-view #chat-form>label,body.chat-view #attachment-help{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  body.chat-view #message{min-height:42px;height:46px;max-height:64px}
}
@media(max-height:600px) and (min-width:701px) and (max-width:960px){
  body.chat-view #chat-form{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;padding:5px 8px;gap:4px}
  body.chat-view #message{grid-column:1;grid-row:1;min-height:44px;height:44px;max-height:44px}
  body.chat-view #attachments{grid-column:1/-1;grid-row:2}
  body.chat-view .compose-footer{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:flex-end;gap:3px}
  body.chat-view .compose-tools{flex-wrap:nowrap;justify-content:flex-end;gap:5px}
  body.chat-view .attachment-button,body.chat-view .task-options summary{font-size:10px}
  body.chat-view #send{font-size:10px;padding:6px 8px}
}
@media(max-height:600px) and (max-width:700px){body.chat-view #chat-form{left:10px;right:10px;bottom:env(safe-area-inset-bottom,0px)}}
@media(max-width:350px){
  body.chat-view .pane-heading{padding-left:10px;padding-right:10px}
  body.chat-view .compact-actions{max-width:120px}
  body.chat-view .compact-actions button{font-size:10px;padding:4px 5px}
  body.chat-view #chat-form{padding-left:9px;padding-right:9px}
  body.chat-view .compose-tools{gap:2px}
  body.chat-view .attachment-button,body.chat-view .task-options{font-size:10px}
}

/* Repository deployment links stay separate from request approval/status. */
.repository-item>div{min-width:0}
.repository-links{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-top:12px}
a.azure-preview-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 14px;border:1px solid #1d5cda;border-radius:8px;background:#1d5cda;color:#fff;font-size:12px;font-weight:650;line-height:1.4;text-decoration:none}
a.azure-preview-link:hover{background:#174bb5;border-color:#174bb5}
a.azure-preview-link:focus-visible{outline:3px solid #8ab6ff;outline-offset:3px}
.dialog-actions a.azure-preview-link{margin-left:0;padding:9px 14px}
