:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#213331;background:#f7f9f8;font-synthesis:none;--green:#176e5d;--muted:#7c8b88;--line:#e0e7e4}
*{box-sizing:border-box}body{margin:0}button,textarea,select{font:inherit}button{cursor:pointer;transition:background .15s,transform .15s}button:disabled{opacity:.5;cursor:not-allowed}button:not(:disabled):active{transform:translateY(1px)}button:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #40a68b;outline-offset:3px}[hidden]{display:none!important}.topbar{height:84px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 38px}.brand{display:flex;gap:12px;align-items:center}.brand-icon{height:39px;width:39px;display:grid;place-items:center;background:#176e5d;color:#fff;border-radius:11px;font-weight:700;font-size:23px}.brand strong{font-size:18px;letter-spacing:-.6px}.subtitle{display:block;font-size:9px;color:var(--muted);letter-spacing:1.6px;margin-top:4px}.top-actions{display:flex;gap:22px;align-items:center}.local-badge{font-size:12px;color:var(--green);display:flex;align-items:center;gap:7px}.local-badge i{height:6px;width:6px;background:#39a184;border-radius:50%}.secondary{background:#fff;border:1px solid var(--line);padding:9px 15px;border-radius:7px;color:#41524c;font-size:12px}main{max-width:1600px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;min-height:calc(100vh - 84px)}.chat-pane{padding:38px 38px 20px;display:flex;flex-direction:column;min-width:0}.eyebrow{font-size:10px;font-weight:600;letter-spacing:1.8px;color:var(--muted)}h1{font-size:27px;letter-spacing:-.8px;margin:13px 0 20px;line-height:1.4}.model-line{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;font-size:11px;color:var(--muted)}#model{background:#e8f0ed;border-radius:5px;padding:5px 8px;color:#477066;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.messages{flex:1;min-height:270px;height:calc(100vh - 415px);overflow:auto;margin:25px 0 18px;padding-right:6px;scrollbar-width:thin}.welcome{max-width:390px;margin:45px auto 30px}.welcome-mark{height:44px;width:44px;border:1px solid #d2e3db;border-radius:13px;display:grid;place-items:center;color:var(--green);font-size:27px;background:#edf4f0}.welcome h2{font-size:20px;margin:20px 0 10px}.welcome p{font-size:13px;line-height:1.9;color:var(--muted);margin-bottom:26px}.suggestion{width:100%;display:flex;justify-content:space-between;gap:12px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:8px;padding:13px 14px;margin-top:10px;font-size:12px;color:#536961}.suggestion:hover{background:#eef5f1}.suggestion span{color:var(--green)}.message{margin:0 0 22px;animation:appear .2s ease}.message-label{font-size:10px;color:var(--muted);font-weight:700;letter-spacing:.8px;margin-bottom:8px;display:flex;justify-content:space-between}.message-text{font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;padding:13px 15px;border-radius:9px;border:1px solid var(--line);background:#fff}.message.user .message-text{background:#ecf3ef;border-color:#e0eae3}.message.error .message-text{background:#fff4f0;color:#995b41;border-color:#f0dbcf}.trace-link{border:0;background:none;color:var(--green);font-size:10px;padding:0}.composer{background:#fff;border:1px solid #ccdcd4;border-radius:12px;padding:14px;box-shadow:0 4px 18px #1f4d3810}.composer:focus-within{border-color:#4b9780}.composer textarea{width:100%;resize:vertical;max-height:170px;min-height:55px;border:0;outline:none!important;background:none;color:#263e33;font-size:13px;line-height:1.7}.composer textarea::placeholder{color:#98a49d}.composer-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:7px;gap:8px}.composer-bottom>span{font-size:10px;color:var(--muted)}#send{background:var(--green);border:0;color:#fff;border-radius:7px;padding:9px 14px;font-size:12px;min-width:76px}#send span{margin-left:10px}.footnote{font-size:10px;color:#95a29c;text-align:center;margin:12px 0 0}.notice{background:#fff3df;color:#936526;border-radius:7px;padding:10px 12px;font-size:12px;margin-bottom:12px;line-height:1.6}.trace-pane{background:#fff;border-left:1px solid var(--line);padding:38px 32px 24px;min-width:0;display:flex;flex-direction:column}.trace-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.trace-heading h2{margin:12px 0 0;font-size:22px;display:flex;align-items:center;gap:10px}.debug-tag{font-size:9px;letter-spacing:1px;border:1px solid #dccab3;background:#fbf6ed;padding:4px 6px;border-radius:4px;color:#9f7b46}.status-pill{font-size:10px;color:var(--muted);padding:6px 10px;background:#f3f5f4;border-radius:20px}.status-pill.ok{background:#e7f3ec;color:#257556}.status-pill.error{background:#fff0e8;color:#a45d3c}.status-pill.busy{background:#fff5df;color:#9a762c}.trace-intro{font-size:12px;color:var(--muted);line-height:1.8;margin:22px 0}.trace-toolbar{display:flex;align-items:center;gap:12px;border-top:1px solid var(--line);padding-top:18px}.trace-toolbar label{font-size:11px;color:var(--muted);flex-shrink:0}#turns{min-width:0;width:100%;border:1px solid var(--line);border-radius:6px;padding:8px;color:#476052;background:#f8faf9;font-size:11px}.trace-meta{font-size:10px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#91a096;margin:12px 0 18px;overflow-wrap:anywhere}.trace-list{flex:1;min-height:280px;max-height:calc(100vh - 435px);overflow:auto;scrollbar-width:thin;padding-right:4px}.trace-empty{max-width:320px;margin:55px auto;text-align:center}.trace-empty>span{font-size:35px;color:#b1c4b9}.trace-empty h3{font-size:16px;font-weight:500;margin:15px 0 10px}.trace-empty p{font-size:12px;line-height:1.9;color:var(--muted)}.empty-flow{color:#90a096;background:#f6f8f6;border-radius:8px;padding:15px;font-size:11px;line-height:2;margin-top:25px}.trace-step{border:1px solid var(--line);border-radius:9px;margin-bottom:10px;overflow:hidden}.trace-step.error{border-color:#eecfb9}.trace-step summary{padding:13px;display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none}.trace-step summary::-webkit-details-marker{display:none}.step-num{width:25px;height:25px;display:grid;place-items:center;flex-shrink:0;border-radius:7px;background:#edf5ef;color:#377d5c;font-size:10px;font-family:ui-monospace,monospace}.trace-step.error .step-num{background:#fff0e7;color:#a86a40}.step-title{flex:1;font-size:12px;font-weight:500}.step-time{color:var(--muted);font-size:10px;font-family:ui-monospace,monospace}.step-chevron{color:#96a59d;font-size:13px;transition:transform .15s}.trace-step[open] .step-chevron{transform:rotate(90deg)}.step-body{padding:0 13px 13px;border-top:1px solid #edf0ec}.data-label{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1px;color:#798d80;font-weight:600;margin:13px 0 7px}.copy{padding:0;background:none;border:0;color:#54816b;font-size:10px;letter-spacing:0}.step-body pre{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;line-height:1.7;color:#425849;background:#f5f8f5;border:1px solid #e9eee8;border-radius:6px;padding:11px;margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.safety-note{display:flex;gap:10px;border-top:1px solid var(--line);margin-top:22px;padding-top:16px;color:#98a797}.safety-note>span{font-size:19px}.safety-note p{font-size:10px;line-height:1.7;margin:0}.safety-note strong{color:#647d69;font-weight:500}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}@keyframes appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(min-width:1500px){.chat-pane{padding-left:56px;padding-right:56px}.trace-pane{padding-left:42px;padding-right:42px}}@media(max-width:850px){.topbar{padding:0 20px;height:72px}.subtitle{font-size:8px}.top-actions{gap:12px}.local-badge{display:none}main{grid-template-columns:1fr}.chat-pane{padding:27px 20px 20px}.trace-pane{border-left:0;border-top:1px solid var(--line);padding:27px 20px}.messages{height:380px;flex:auto;max-height:55vh;min-height:250px}.welcome{margin-top:25px}h1{font-size:23px}.trace-list{max-height:700px;min-height:250px}.composer-bottom>span{font-size:9px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.login-panel{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(100%,420px);padding:36px;background:white;border:1px solid var(--line);border-radius:16px;box-shadow:0 16px 50px #2133310a}.login-card h1{font-size:24px;line-height:1.5;margin:16px 0}.login-card p{font-size:13px;color:var(--muted);line-height:1.7}.login-card label{display:block;font-size:13px;margin:24px 0 8px}.login-card input{display:block;width:100%;font:inherit;border:1px solid var(--line);border-radius:8px;padding:12px;background:#f8faf9}.login-card input:focus-visible{outline:2px solid #40a68b;outline-offset:3px}.login-card button{width:100%;margin-top:20px;border:0;border-radius:8px;padding:12px;background:var(--green);color:white;font:inherit}

.workspace-tabs{display:flex;gap:8px;padding:14px 38px;border-bottom:1px solid var(--line);background:#fff}
.workspace-tabs button{border:0;border-radius:8px;background:transparent;color:#73877c;padding:10px 16px;font-size:13px}
.workspace-tabs button[aria-selected=true]{background:#e7f2ed;color:var(--green);font-weight:600}
.workspace-tabs span{font-size:10px;margin-left:10px;font-weight:400}
main{min-height:calc(100vh - 150px)}
.tool-intro,.tool-hint{font-size:12px;line-height:1.8;color:var(--muted);margin:0 0 20px}
.tool-identity{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #d7e7de;border-radius:10px;background:#ecf4ef;padding:16px;margin:0 0 24px}
.tool-identity strong{display:block;font-size:13px;margin-top:7px;overflow-wrap:anywhere}
#tool-form label{display:block;font-size:12px;font-weight:600;margin:0 0 9px}
#tool-form input,#tool-form select,#tool-form textarea{width:100%;font:inherit;font-size:13px;padding:11px 12px;background:white;border:1px solid #cddbd3;border-radius:8px;color:#304b3d}
#tool-form input:focus-visible{outline:2px solid #40a68b;outline-offset:3px}
#tool-description{margin:10px 0 20px}
.tool-examples{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 20px}
.tool-examples button{font-size:11px;padding:7px 10px}
.tool-advanced{margin:18px 0;color:#688171;font-size:11px}
.tool-advanced summary{cursor:pointer;line-height:1.8}
#tool-arguments{margin:10px 0;resize:vertical;font-family:ui-monospace,monospace}
.primary{border:0;border-radius:8px;background:var(--green);color:white;padding:12px 20px;font-size:13px}
#tool-run{width:100%}
.tool-checklist{padding:17px;border:1px dashed #ccdbd1;border-radius:9px;margin-top:24px;font-size:12px;color:#5a7564}
.tool-checklist p{line-height:1.9;margin:9px 0 0}
.tool-summary{margin-top:22px;font-size:13px;line-height:1.8;overflow-wrap:anywhere}
.tool-summary>.secondary{display:block;margin-top:10px}
.order-choice{display:block;width:100%;text-align:left;background:white;border:1px solid var(--line);border-radius:8px;padding:12px;margin-top:10px;color:var(--green);font-size:12px}
.tool-output{flex:1;min-height:350px;overflow-wrap:anywhere}
.tool-output>.step-body{border:0;padding:0 0 16px}
.tool-output pre{max-height:560px}
#tool-records{width:100%;min-width:0;border:1px solid var(--line);border-radius:6px;padding:8px;background:#f8faf9;color:#476052;font-size:11px}
.contract-panel{border:1px solid #cbded3;border-radius:9px;background:#f0f7f3;padding:14px;margin:0 0 22px;font-size:12px}
.contract-panel>summary{cursor:pointer;color:var(--green);font-weight:600;line-height:1.8}
.contract-panel>summary span{font-size:10px;font-weight:400;margin-left:8px}
.contract-panel>.tool-hint{margin:12px 0}
.contract-samples{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}
.contract-samples .secondary{padding:7px 9px;font-size:11px}
#contract-value{font-family:ui-monospace,monospace!important;resize:vertical;line-height:1.65}
#contract-validate{margin:12px 0}
.contract-result{line-height:1.8;overflow-wrap:anywhere}
.contract-result>.step-body{padding:0;border:0}
.contract-pass{color:#176e5d}.contract-fail{color:#a3412d}
.contract-errors{color:#8a4b37;padding-left:20px}
.contract-schema{margin-top:14px;font-size:11px}
.contract-schema>summary{cursor:pointer;color:#5d7668}
@media(max-width:850px){.workspace-tabs{padding:12px 20px}.workspace-tabs button{padding:9px 12px}.workspace-tabs span{margin-left:6px}.tool-identity{padding:12px}.tool-identity .secondary{flex-shrink:0;padding:9px}.tool-output{min-height:250px}}

.confirmation-card { border: 1px solid #c5802c; border-radius: 12px; padding: 14px; margin: 12px 0; }
.confirmation-card pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; font-size: 12px; }
.confirmation-card button { margin: 4px 8px 4px 0; }
