/* Stavor 2.0 demo specification; local styles and real application state. */
@font-face{font-family:Inter;src:url("/vendor/inter-400.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:Inter;src:url("/vendor/inter-500.ttf") format("truetype");font-weight:500;font-display:swap}
@font-face{font-family:Inter;src:url("/vendor/inter-600.ttf") format("truetype");font-weight:600;font-display:swap}
@font-face{font-family:Inter;src:url("/vendor/inter-700.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("/vendor/jetbrains-mono-400.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("/vendor/jetbrains-mono-500.ttf") format("truetype");font-weight:500;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("/vendor/jetbrains-mono-600.ttf") format("truetype");font-weight:600;font-display:swap}
:root{--green:#059669;--green-hover:#047857;--ink:#1e293b;--muted:#64748b;--line:#e2e8f0;--soft:#f8fafc;--nav:#fff;--mono:"JetBrains Mono",Menlo,Monaco,"Courier New",monospace}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:#f8fafc;-webkit-font-smoothing:antialiased}
.workspace,.workspace *{scrollbar-width:none}.workspace ::-webkit-scrollbar{display:none}.workspace ::selection{background:#10b98133;color:#047857}
.workspace{display:grid;grid-template-columns:240px minmax(0,1fr);grid-template-rows:48px minmax(0,1fr);height:100dvh;min-height:0;overflow:hidden}
.workspace button{line-height:16px}
.ui-icon,[data-icon]{width:16px;height:16px;display:inline-flex;flex:none;align-items:center;justify-content:center}
.ui-icon{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.global-header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 16px;background:#fffffff2;border-bottom:1px solid #e2e8f0e6;z-index:10;min-width:0;font-size:12px;line-height:16px}
.global-left,.global-right,.global-brand{display:flex;align-items:center;min-width:0}.global-left{gap:12px}.global-right{gap:14px;flex:none}
.global-brand{gap:7px;color:#0f172a;font-size:14px;font-weight:700;letter-spacing:-.35px;text-decoration:none}
.brand-mark{width:24px;height:24px;border-radius:6px;background:linear-gradient(to top right,#059669,#14b8a6);display:grid;place-items:center;color:white;font-size:12px;letter-spacing:0}
.status-dot{width:6px;height:6px;border-radius:50%;background:#10b981}.divider{color:#cbd5e1;font-size:16px}
#workspace-name{color:#64748b;font-weight:500;white-space:nowrap;max-width:180px;overflow:hidden;text-overflow:ellipsis}
#global-view{font-weight:600;color:#334155;white-space:nowrap}
#task-badge{font:10px/16px var(--mono);padding:2px 6px;border-radius:4px;background:#fffbeb;color:#b45309;border:1px solid #fde68acc;white-space:nowrap;margin-left:-6px}
.global-header button{padding:4px 10px;font-size:12px;font-weight:500;display:inline-flex;align-items:center;gap:6px;color:#475569;white-space:nowrap;border-radius:8px}
.global-header .icon-button{padding:6px;border:0;background:transparent;color:#64748b}
.icon-button>svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.global-header button [data-icon],.global-header button .ui-icon{width:14px;height:14px}
.metric{display:flex;align-items:center;gap:6px;border:1px solid #e2e8f0e6;border-radius:999px;padding:4px 10px;color:#475569;white-space:nowrap;font-size:12px;line-height:16px}
#cache-status{background:#f1f5f9e6}#cache-status:before{content:"";width:8px;height:8px;background:#10b981;border-radius:50%;flex:none}
.metric strong{font:600 11px/16px var(--mono);color:#059669}
#quota-v2{gap:8px;padding:4px 12px;font-size:11px;color:#94a3b8}#quota-v2>.ui-icon{width:14px;height:14px;color:#059669}
.quota-value{font:500 11px/16px var(--mono);color:#334155}.quota-limit{font:400 11px/16px var(--mono);color:#94a3b8}
.quota-bar{width:56px;height:6px;flex:none;accent-color:#10b981;border:1px solid #e2e8f080;border-radius:999px;overflow:hidden;background:#f1f5f9}
.quota-bar::-webkit-progress-bar{background:#f1f5f9}.quota-bar::-webkit-progress-value{background:linear-gradient(to right,#10b981,#14b8a6);border-radius:999px}
.header-separator{height:16px;width:1px;background:var(--line)}
.sidebar{grid-row:2;display:flex;flex-direction:column;min-height:0;padding:0;background:white;color:var(--ink);border-right:1px solid #e2e8f0e6;overflow:hidden}
.sidebar>.brand{display:none}.new-task-wrap{padding:12px;border-bottom:1px solid #f1f5f9}
.new-task{width:100%;height:40px;margin:0;padding:8px 12px;border:1px solid #a7f3d0cc;border-radius:8px;background:#ecfdf5;color:#047857;font-size:12px;font-weight:500;display:flex;align-items:center;gap:8px}
.new-task:hover{background:#d1fae5b3}.new-task .ui-icon{color:#059669}.new-task kbd{margin-left:auto;font:10px/16px var(--mono);padding:0 4px;border-radius:4px;border:1px solid #a7f3d0;background:white;color:#047857cc}
.sidebar nav{padding:12px;display:flex;flex-direction:column;gap:4px}
.nav-item{width:100%;display:flex;align-items:center;gap:10px;border:1px solid transparent;border-radius:8px;margin:0;padding:8px 12px;font-size:12px;font-weight:500;color:#475569;background:none;white-space:nowrap}
.nav-item [data-icon]{color:#94a3b8}.nav-item:hover{background:#f8fafc;color:#0f172a}.nav-item.active{background:#f1f5f9;border-color:#e2e8f0b3;color:#0f172a;font-weight:600}
.nav-item.active [data-icon]{color:#059669}.nav-item.active:after{content:"";width:6px;height:6px;border-radius:50%;background:#10b981;margin-left:auto}
.nav-count{margin-left:auto;font:10px/16px var(--mono);color:#94a3b8}
.sidebar-label{display:flex;align-items:center;justify-content:space-between;margin:2px 20px 8px;color:#94a3b8;font-size:11px;font-weight:600;letter-spacing:.55px;line-height:16px}
.sidebar-label button{padding:2px;color:#94a3b8;background:none;border:0}.sidebar-label .ui-icon,.sidebar-label [data-icon]{width:14px;height:14px}
.task-list{flex:1;min-height:0;padding:0 12px 8px;overflow:auto;display:block;max-height:none}
.task-item{display:block;text-align:left;position:relative;width:100%;max-width:none;margin:0 0 6px;border:1px solid transparent;border-radius:8px;padding:10px 10px 10px 26px;font-size:12px;line-height:16px!important;color:#475569;background:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.task-item:before{content:"";position:absolute;top:16px;left:10px;width:7px;height:7px;border-radius:50%;background:#94a3b8}.task-item[data-state=waiting_approval]:before{background:#f59e0b}
.task-item[data-state=succeeded]:before,.task-item[data-state=waiting_user]:before{background:#10b981}.task-item[data-state=failed]:before,.task-item[data-state=needs_review]:before{background:#f43f5e}
.task-item:hover{background:#f8fafc;color:#0f172a}.task-item.selected{background:#fffbeb99;border-color:#fde68acc;color:#1e293b;font-weight:600}.task-item small{display:block;margin-top:4px;font-size:10px;line-height:16px;font-weight:400;color:#94a3b8}
.sidebar-bottom{display:flex;align-items:center;gap:10px;margin:0;padding:12px;border-top:1px solid #f1f5f9;background:#f8fafcb3;min-height:53px}
.workspace .account-avatar{width:28px;height:28px;padding:0;flex:none;display:grid;place-items:center;border:0;border-radius:50%;background:#1e293b;color:white}
.account-info{flex:1;min-width:0}.user-name{font-size:12px;line-height:16px;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tenant-name{margin:0;font-size:10px;line-height:14px;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workspace .logout-button{padding:6px;background:none;border:0;color:#94a3b8}.logout-button:hover{color:#e11d48;background:#e2e8f099}
.main{grid-row:2;grid-column:2;min-height:0;min-width:0;background:white}.main>.topbar{display:none}
.chat-layout{display:grid;grid-template-columns:minmax(0,1fr) 410px;overflow:hidden;min-height:0}
.conversation{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:white}
.task-top{padding:12px 24px;border-bottom:1px solid #f1f5f9;background:white;display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}
.task-info{min-width:0;flex:1}.task-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.task-top h2{font-size:16px;line-height:24px;font-weight:700;letter-spacing:-.4px;margin:0;color:#0f172a;overflow-wrap:anywhere}
.task-status{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:16px;font-weight:500;padding:2px 8px;border:1px solid #fde68a;border-radius:999px;color:#92400e;background:#fffbeb;white-space:nowrap}
.task-status:before{content:"";height:6px;width:6px;border-radius:50%;background:#f59e0b}.task-status[data-state=succeeded],.task-status[data-state=waiting_user]{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
.task-status[data-state=succeeded]:before,.task-status[data-state=waiting_user]:before{background:#10b981}.task-status[data-state=failed],.task-status[data-state=needs_review]{background:#fff1f2;color:#be123c;border-color:#fecdd3}.task-status[data-state=waiting_auth]{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}.task-status[data-state=waiting_auth]:before{background:#3b82f6}
.task-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin-top:4px;font-size:11px;line-height:16px;color:#64748b;min-height:16px}
.task-meta strong{color:#1e293b;font-weight:500}.task-meta .meta-dot{color:#cbd5e1}.task-meta code{font:10px/16px var(--mono);background:#ecfdf5;color:#047857;border-radius:4px;padding:0 4px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-top #cancel-task{display:flex;align-items:center;gap:6px;align-self:center;padding:6px 12px;font-size:12px;font-weight:600;white-space:nowrap;border:1px solid #fecdd3;border-radius:8px;background:#fff1f2;color:#e11d48}
#cancel-task .ui-icon,#cancel-task [data-icon]{width:14px;height:14px}
.messages{flex:1;min-height:0;max-height:none;overflow:auto;padding:24px;background:#f8fafc66}
.bubble{max-width:768px;margin:0 0 24px;position:relative;font-size:12px;line-height:1.625}
.bubble.assistant{padding:0 0 0 40px}
.bubble.assistant:before,.pipeline:before{content:"AI";position:absolute;left:0;top:0;display:grid;place-items:center;width:28px;height:28px;border-radius:8px;color:white;background:#059669;font-size:12px;font-weight:700;line-height:16px}
.bubble .speaker{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;letter-spacing:0;color:#1e293b;font-weight:600;margin:0 0 12px}.message-time{font-size:10px;font-weight:400;color:#94a3b8}
.bubble.assistant .markdown-body{border:1px solid #e2e8f0cc;border-radius:12px;padding:14px;font-size:12px;line-height:1.625;color:#475569;background:white}
.bubble.user{padding:0 40px 0 0;margin-left:auto;max-width:90%;width:fit-content;background:none;border-radius:0;color:#1e293b;white-space:normal}
.bubble.user:after{content:"你";position:absolute;right:0;top:0;display:grid;place-items:center;width:28px;height:28px;background:#e2e8f0;color:#334155;border:1px solid #cbd5e1;border-radius:8px;font-size:12px;font-weight:700}
.bubble.user .speaker{justify-content:flex-end;font-weight:500;color:#334155;margin-bottom:6px}
.user-content{padding:10px 16px;border-radius:16px 2px 16px 16px;background:#0f172a;color:white;font-size:12px;line-height:16px;white-space:pre-wrap;overflow-wrap:anywhere}
.pipeline{position:relative;margin:0 0 24px 40px;padding:0;max-width:728px;border:1px solid #e2e8f0;border-radius:12px;background:white}.pipeline:before{left:-41px;top:-1px}
.pipeline>summary{display:flex;align-items:center;gap:6px;padding:10px 14px;font-size:12px;line-height:16px;font-weight:600;color:#1e293b;list-style:none;cursor:pointer;border-radius:12px;background:#f8fafc80;min-height:39px}
.pipeline>summary::-webkit-details-marker{display:none}.pipeline[open]>summary{border-bottom:1px solid #f1f5f9;border-radius:12px 12px 0 0}
.pipeline-status{width:16px;height:16px;border-radius:50%;border:1px solid #a7f3d0;display:grid;place-items:center;color:#059669;background:#ecfdf5}.pipeline-status .ui-icon{width:10px;height:10px}
.pipeline-count{font:500 10px/16px var(--mono);padding:2px 6px;background:#ecfdf5;color:#047857;border:1px solid #a7f3d099;border-radius:4px}
.pipeline-toggle{display:flex;align-items:center;gap:4px;margin-left:auto;font-size:10px;font-weight:400;color:#64748b}.pipeline-toggle:before{content:"展开日志"}.pipeline[open] .pipeline-toggle:before{content:"收起日志"}
.pipeline-toggle .ui-icon{width:14px;height:14px;transform:rotate(-90deg)}.pipeline[open] .pipeline-toggle .ui-icon{transform:none}
.pipeline-body{padding:8px 14px 12px}
.event{display:block;position:relative;padding:0 0 0 14px;margin:10px 0 0;font-size:12px;line-height:18px;color:#475569;overflow-wrap:anywhere}.event:before{content:"";position:absolute;left:0;top:6px;width:6px;height:6px;border-radius:50%;background:#10b981}
.event.warning{color:#b45309}.event.warning:before{background:#f59e0b}.event-detail{display:block;font:10px/16px var(--mono);color:#94a3b8;margin-top:2px;white-space:pre-wrap}
.composer{display:flex;flex-direction:column;flex:none;gap:0;margin:0 24px 12px;padding:14px;background:#f8fafccc;border:1px solid #e2e8f0cc;border-radius:12px;box-shadow:none}
.composer:focus-within{border-color:#94a3b8;background:#fff}
.composer textarea{width:100%;min-height:50px;height:50px;max-height:180px;resize:none;border:0;border-radius:0;background:transparent;padding:0 4px;margin:0 0 6px;font-size:12px;line-height:20px;outline:0}.composer textarea::placeholder{color:#94a3b8}
.compose-bottom span{font-size:inherit;color:inherit}
.compose-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0}.compose-tools{display:flex;align-items:center;gap:6px;min-width:0}
.compose-tools>*{order:0!important}
.compose-site{display:flex;align-items:center;gap:4px;margin:0;padding:2px 6px;border:1px solid #e2e8f0;border-radius:6px;background:white;min-width:0;color:#94a3b8}.compose-site [data-icon],.compose-site .ui-icon{width:12px;height:12px}
.compose-site select{width:auto;min-width:0;max-width:150px;border:0;background:none;border-radius:0;padding:0;font-size:11px;line-height:16px;color:#64748b}.compose-site select:disabled{opacity:1;-webkit-text-fill-color:#64748b}
.workspace #approval-picker{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;font-size:11px;line-height:16px;white-space:nowrap;color:#78350f;border:1px solid #fde68acc;border-radius:6px;background:#fffbebe6;opacity:1}
.workspace #approval-picker.full-access{color:#064e3b;background:#ecfdf5;border-color:#a7f3d0}.workspace #approval-picker:disabled{cursor:default}
.mode-dot{width:6px;height:6px;display:inline-block;flex:none;background:#f59e0b;border-radius:50%}.full-access .mode-dot{background:#10b981}
#approval-picker [data-icon],#approval-picker .ui-icon{width:10px;height:10px;color:#94a3b8}
.workspace #attach-image{padding:4px;border:0;background:none;color:#94a3b8}.workspace #attach-image:hover{color:#475569;background:#e2e8f0}#attach-image .ui-icon,#attach-image [data-icon]{width:14px;height:14px}
.workspace #send{display:flex;align-items:center;gap:4px;padding:4px 10px;font-size:12px;line-height:16px;font-weight:600;border:0;border-radius:8px;background:#0f172a;color:white;white-space:nowrap}#send .ui-icon,#send [data-icon]{width:14px;height:14px}
.review-panel{display:flex;flex-direction:column;min-width:0;min-height:0;padding:0;background:white;border-left:1px solid #e2e8f0e6;overflow:hidden}
.review-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:47px;flex:none;padding:10px 16px;background:#f8fafccc;border-bottom:1px solid #e2e8f0;margin:0}
.review-heading h3{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:700;margin:0;color:#0f172a;white-space:nowrap}
.review-heading h3>[data-icon]{width:20px;height:20px;color:#059669;background:#ecfdf5;border-radius:4px}.review-heading h3 .ui-icon{width:14px;height:14px}
#document-count{font-size:10px;font-weight:400;padding:0 4px;color:#475569;background:#e2e8f0b3;border-radius:4px}
.review-tabs{display:flex;align-items:center;padding:3px;background:#e2e8f0b3;border-radius:8px;white-space:nowrap}
.review-tabs .active{padding:2px 8px;background:white;border-radius:6px;font-size:12px;line-height:16px;font-weight:600;color:#0f172a;box-shadow:0 1px 2px #0000000d}
.review-tabs button{border:0;background:none;padding:2px 8px;font-size:12px;line-height:16px;color:#64748b;font-weight:500}.review-tabs button:disabled{opacity:1;cursor:not-allowed}
.review-tabs button.active{background:#fff;color:#0f172a;font-weight:600;box-shadow:0 1px 2px #0000000d}.review-tabs button:disabled{opacity:.45}
.workspace #approve:hover,.workspace #send:hover{background:#1e293b}.workspace #reject:hover{background:#f1f5f9}
.review-explainer{display:flex;align-items:center;gap:6px;flex:none;margin:0;padding:8px 16px;border:0;border-bottom:1px solid #f1f5f9;background:#fff;color:#64748b;font-size:11px;line-height:16px}
.review-explainer .ui-icon,.review-explainer [data-icon]{height:12px;width:12px;color:#059669}
.review-scroll{padding:16px;min-height:0;flex:1;overflow:auto}
#documents{container-type:inline-size}
.workspace #documents>details.document{margin:0;padding:0;border:0;border-bottom:1px solid #eef2f7;border-radius:0;background:transparent;color:#475569;overflow-wrap:anywhere}
.document-summary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;list-style:none;cursor:pointer;padding:12px 9px;border-radius:8px}
.document-summary::-webkit-details-marker{display:none}
.document-summary:hover{background:#f8fafc}.document-summary:focus-visible{outline:2px solid #10b981;outline-offset:-2px}
.document-heading{display:flex;align-items:center;gap:7px;min-width:0}
.document-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;color:#334155}
.document-summary:hover .document-title{color:#047857}
.document-summary .mode-label{flex:none;margin:0;white-space:nowrap}
.document-summary .document-meta{display:inline;font-size:10px;line-height:16px;color:#94a3b8;white-space:nowrap;margin:0}
.document-trigger{display:inline-flex;align-items:center;gap:5px;color:#64748b;font-size:11px;white-space:nowrap}
.document-trigger:after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .16s}
.document[open] .document-trigger:after{transform:translateY(2px) rotate(225deg)}
.document[open] .document-trigger{color:#047857}
@container (max-width:530px){.document-summary{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}.document-heading{grid-column:1;flex-wrap:wrap;gap:4px 7px}.document-summary .document-meta{grid-column:1;grid-row:2}.document-trigger{grid-column:2;grid-row:1/span 2}}
.document-detail{min-width:0;margin-top:12px;padding:12px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc}
.document-note{margin:0 0 8px;font-size:11px;line-height:1.6;color:#64748b;overflow-wrap:anywhere}
.document-detail .diff-legend{justify-content:flex-end;margin:0 0 7px}
.workspace #documents .document-diff{display:block;width:100%;max-width:100%;max-height:460px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent;border:1px solid #e2e8f0;border-radius:6px}
.workspace #documents .document-diff .diff-line{width:max-content;min-width:100%}
.workspace #documents .document-diff::-webkit-scrollbar{display:block;width:6px;height:6px}.workspace #documents .document-diff::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:6px}
.document-more{margin-top:9px;padding:5px 8px;border:1px solid #d1e9dc;border-radius:6px;background:#fff;color:#047857;font-size:11px}
.document-more:disabled{opacity:.6}.document-error{color:#b91c1c;font-size:11px;line-height:1.6}
.mode-label{display:inline-block;margin:5px 0;padding:1px 5px;border-radius:4px;background:#ecfdf5;color:#047857;font-size:10px;border:1px solid #a7f3d099}
.has-approval #documents{display:none}
#approval{margin:0;padding:0;border:0;background:none}
.approval-summary-card{padding:14px;background:#f8fafce6;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:14px}
.approval-card-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
#approval h4{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:700;color:#1e293b;margin:0}
#approval-revision{font:10px/16px var(--mono);color:#94a3b8}#approval-summary{font-size:12px;line-height:22px;color:#475569;margin:0;overflow-wrap:anywhere}
#approval-stats{display:flex;justify-content:space-between;gap:6px;margin-top:8px;color:#94a3b8;font:10px/16px var(--mono)}.diff-stats{white-space:nowrap}.diff-stats .added{color:#059669}.diff-stats .removed{color:#f43f5e}
#diffs details{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;margin:0 0 14px;padding:0;background:#fff}
#diffs summary{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;padding:6px 12px;border-bottom:1px solid #e2e8f0;background:#f8fafccc;cursor:pointer;font:10px/16px var(--mono);color:#0f172a}
#diffs summary::-webkit-details-marker{display:none}.diff-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.diff-legend{display:flex;gap:8px;white-space:nowrap;font:10px/16px var(--mono)}.diff-legend .removed{color:#f43f5e}.diff-legend .added{color:#059669}
.diff{margin:0;padding:4px 0 8px;background:white;border:0;border-radius:0;font:11px/21px var(--mono);overflow:auto;max-height:none;white-space:pre}
.workspace #diffs .diff{display:block;width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.workspace #diffs .diff::-webkit-scrollbar{display:block;height:6px}.workspace #diffs .diff::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:6px}
.workspace #diffs .diff-line{width:max-content;min-width:100%}
.diff-line{display:flex;min-width:max-content;min-height:21px;white-space:pre;padding:0;border-left:3px solid transparent;color:#475569}
.diff-line.add{background:#f0fdf4;border-left-color:#10b981;color:#166534}.diff-line.remove{background:#fef2f2;border-left-color:#ef4444;color:#991b1b}.diff-line.hunk{font-size:10px;color:#94a3b8;background:#f8fafc;margin-bottom:2px}
.diff-number{width:32px;flex:none;user-select:none;color:#cbd5e1;text-align:right;padding-right:10px;font-size:10px}.diff-code{padding:0 12px 0 3px}
.preview-view{min-height:0;flex:1;display:flex;flex-direction:column;gap:8px;padding:14px;background:#fff}
.preview-view[hidden]{display:none}.preview-view label{font-size:11px;color:#475569;font-weight:600}
.preview-view select{width:100%;padding:8px;font-size:12px;border:1px solid #e2e8f0;border-radius:8px}
.preview-note{font-size:11px;line-height:1.6;color:#64748b;margin:0}
.preview-view iframe{width:100%;min-height:220px;flex:1;border:1px solid #e2e8f0;border-radius:10px;background:white}
.approval-footer{flex:none;padding:12px 14px 14px;border-top:1px solid #e2e8f0;background:#f8fafce6}
.approval-hint{display:flex;justify-content:space-between;gap:6px;padding:0 2px;margin-bottom:8px;font-size:10px;line-height:16px;color:#64748b}.approval-actions{display:flex;gap:8px;margin:0;padding:0;background:none}
.workspace #approve{display:flex;align-items:center;justify-content:center;gap:6px;flex:1;padding:8px 12px;font-size:12px;line-height:16px;font-weight:700;border:0;border-radius:8px;background:#0f172a;color:white}#approve [data-icon],#approve .ui-icon{width:14px;height:14px;color:#34d399}
.workspace #reject{padding:8px 12px;font-size:12px;line-height:16px;font-weight:500;border:1px solid #cbd5e1;border-radius:8px;color:#475569;background:white}
.review-bottom{flex:none;margin:0;padding:16px;border-top:1px solid #f1f5f9;color:#94a3b8;font-size:10px;line-height:16px}.has-approval .review-bottom{display:none}
.markdown-body strong{color:#1e293b;font-weight:600}.markdown-body code{font:11px/1.7 var(--mono);background:#ecfdf5;color:#047857;border:1px solid #a7f3d099;padding:1px 5px;border-radius:4px}
.markdown-code{border-color:#e2e8f0;background:#f8fafc}.markdown-code pre code{border:0;color:#475569}
.markdown-body h1{font-size:18px}.markdown-body h2{font-size:16px}.markdown-body h3{font-size:14px}.markdown-body h4{font-size:12px}
.markdown-table{border-color:#e2e8f0;margin:12px 0;border-radius:10px}.markdown-table table{font-size:12px}.markdown-table th{background:#f8fafccc;color:#334155;font-size:12px}.markdown-table th,.markdown-table td{padding:8px 12px;border-right:0;border-color:#f1f5f9}.markdown-table tbody tr:nth-child(even){background:white}.markdown-table tbody tr:hover{background:#f8fafc}
.qr-card{margin-left:40px}.welcome{padding:clamp(24px,6vh,60px) 12px;max-width:700px}.welcome h1{font-size:28px;color:#0f172a}.welcome p{font-size:13px}.welcome-symbol{background:#ecfdf5;color:#059669}.suggestions button{background:white;font-size:12px;border-color:#e2e8f0;color:#475569}
.settings-page{background:#f8fafc}.settings-form{background:white}
.workspace.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}.sidebar-collapsed>.sidebar{visibility:hidden;overflow:hidden;border:0}
.workspace.review-collapsed .chat-layout{grid-template-columns:minmax(0,1fr)}.review-collapsed .review-panel{display:none}
@media(max-width:1250px){#workspace-name{max-width:130px}#task-badge{display:none}.global-right{gap:8px}.quota-bar{display:none}.metric{font-size:10px}.task-meta{gap:4px 8px}}
@media(max-width:1100px){.chat-layout{grid-template-columns:minmax(0,1fr) 350px}#quota-v2{display:none}.review-heading{padding:10px 12px}.review-tabs .active,.review-tabs button{padding:2px 5px;font-size:11px}.compose-site select{max-width:115px}.review-heading h3{gap:4px}.task-title-row{gap:4px}}
@media(max-width:900px){.workspace{grid-template-columns:210px minmax(0,1fr)}.chat-layout{display:grid;grid-template-columns:minmax(0,1fr);overflow:hidden}.review-panel{position:absolute;right:0;top:48px;bottom:0;width:min(410px,94vw);z-index:9;box-shadow:-10px 0 30px #0f172a12}.global-left #workspace-name,.global-left>.divider,#task-badge{display:none}#cache-status{display:none}.task-top{padding:12px 16px}.task-top h2{font-size:14px;line-height:20px}.messages{padding:20px 16px}.composer{margin:0 16px 12px}.review-explainer,.review-bottom{display:flex}}
@media(max-width:600px){.workspace{display:grid;grid-template-columns:0 minmax(0,1fr);grid-template-rows:48px minmax(0,1fr);height:100dvh;min-height:0;overflow:hidden}.sidebar{position:absolute;top:48px;bottom:0;left:0;width:240px;z-index:12;box-shadow:10px 0 30px #0f172a15}.sidebar-collapsed>.sidebar{width:0}.sidebar nav{margin:0;overflow:visible}.new-task{position:static}.sidebar-bottom{display:flex}.main{min-height:0}.global-header{padding:0 10px;gap:8px}.global-left{gap:8px}.global-right{gap:0}.global-header .header-separator{display:none}.global-header button{font-size:11px;padding:4px 8px}.global-brand{font-size:13px}#global-view{font-size:11px}.task-top{gap:8px}.task-top #cancel-task{padding:5px 8px;font-size:11px}.task-top #cancel-task [data-icon]{display:none}.task-status{font-size:10px;padding:1px 6px}.task-meta code{max-width:170px}.messages{min-height:0;max-height:none;padding:16px 12px}.bubble{margin-bottom:20px}.bubble.assistant{padding-left:34px}.bubble.assistant:before,.pipeline:before{width:24px;height:24px;font-size:10px;border-radius:7px}.bubble.assistant .markdown-body{padding:12px}.bubble .speaker{font-size:11px}.bubble.user{max-width:95%;padding-right:34px}.bubble.user:after{width:24px;height:24px;font-size:10px}.pipeline{margin:0 0 20px 34px}.pipeline:before{left:-35px}.pipeline>summary{padding:10px;flex-wrap:wrap;font-size:11px}.pipeline-count{font-size:9px;padding:0 4px}.pipeline-toggle{font-size:9px}.pipeline-body{padding:4px 10px 12px}.event{font-size:11px}.composer{margin:0 10px 10px;padding:12px}.compose-tools{gap:4px}.compose-site select{max-width:110px}.workspace #approval-picker{padding:2px 5px;font-size:10px}.compose-site{padding:2px 4px}.compose-site select{font-size:10px}.workspace #send{padding:5px 8px}.workspace #attach-image{padding:3px}.review-explainer{display:flex}.review-bottom{display:block}.welcome h1{font-size:23px}.settings-page{overflow:auto;padding:20px 16px}.qr-card{margin-left:34px}}
@media(max-width:600px){.global-left{flex:1}.global-left .global-brand,.global-left>.divider,#workspace-name{display:none}.global-header.has-mobile-task-title #global-view{display:none}.global-left>.task-title-row{flex:1;min-width:0;flex-wrap:nowrap;gap:6px}.global-left>.task-title-row h2{display:block;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:18px;letter-spacing:0}.global-left>.task-title-row .task-status{flex:none}.global-right{flex:none}.global-header .global-right #review-toggle{padding:4px 7px}.workspace.mobile-chat .topbar{display:none}.workspace.mobile-chat .task-meta{display:none}.workspace.mobile-chat .task-top:has(#cancel-task[hidden]){display:none}.workspace.mobile-chat .task-top{padding:6px 10px;justify-content:flex-end}}
/* Mobile navigation overlays the full-width conversation. Reset its grid area:
   otherwise grid-row:2 adds the header height again to the absolute top offset. */
@media(max-width:600px){
  #workspace.workspace{grid-template-columns:0 minmax(0,1fr)}
  .workspace>.sidebar{grid-area:auto;top:48px;bottom:0;padding:0}
  .workspace>.sidebar>.new-task-wrap{padding:12px;margin:0;flex-shrink:0}
}
@media(prefers-reduced-motion:reduce){.workspace *{scroll-behavior:auto!important;transition:none!important}}
