:root{font:14px/1.5 system-ui,"Microsoft YaHei",sans-serif;color:#17252c;background:#f3f6f7}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}a{text-decoration:none;color:inherit}.shell{display:grid;grid-template-columns:205px minmax(390px,34%) minmax(0,1fr);min-height:100vh}.sidebar{background:#111b24;color:#d5e1e6;padding:28px 12px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{font:700 20px Georgia,serif;padding:0 9px 24px;color:#fff}.brand span{display:block;font-size:15px}.side-label{font-size:11px;letter-spacing:.1em;color:#7597a4;padding:14px 9px}.nav{padding:12px;border-radius:9px;color:#adc3cc}.nav:hover,.nav.active{background:#213746;color:#fff}.side-note{margin-top:auto;border-top:1px solid #2a3d4a;padding:15px 9px;font-size:11px;color:#91aab3}.chat{background:#fff;min-width:0;border-right:1px solid #dfe8eb;height:100vh;display:flex;flex-direction:column}.chat-head,.result-head{padding:21px 24px;border-bottom:1px solid #e1e9ec;display:flex;justify-content:space-between;gap:10px;align-items:center}.chat-head small,.result-head small{font-size:10px;color:#148f8b;letter-spacing:.13em;font-weight:700}.chat-head h1{font-size:23px;margin:3px 0}.chat-head p,.result-head p{color:#6d8088;margin:0;font-size:12px}.provider,.pill{white-space:nowrap;background:#e8f4f2;border:1px solid #c8e4df;border-radius:99px;padding:5px 8px;color:#207a74;font-size:11px}.conversation{padding:22px;overflow:auto;flex:1}.welcome{text-align:center;margin:10vh auto 0;max-width:450px}.spark{font-size:26px;color:#1aafa4}.welcome h2{font-size:20px;margin:6px 0}.welcome p{color:#71818a;font-size:13px}.suggestions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:25px}.suggestions button{text-align:left;background:#f7fafb;border:1px solid #dce7ea;border-radius:12px;padding:15px;color:#20343d}.suggestions button:hover{border-color:#43c9bc;background:#f1fbf9}.bubble{padding:11px 14px;margin:12px 0;border-radius:13px;max-width:92%;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.user{margin-left:auto;background:#d9f6f0}.bubble.assistant{background:#f0f4f6}.proposal{border-top:1px solid #deeaec;background:#f9fcfc;padding:16px 22px;max-height:48vh;overflow:auto}.proposal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.proposal-head small{display:block;color:#759099;font-size:11px}.proposal-head input{display:block;margin-top:4px;width:100%;font-weight:700;font-size:17px;background:transparent;border:0;border-bottom:1px solid #c6d7da;padding:3px 0}.proposal-head>div{min-width:0;flex:1}.formula{background:#eaf5f3;color:#116d68;border-radius:8px;padding:10px 12px;margin:12px 0;font:12px/1.5 Consolas,monospace;overflow-wrap:anywhere}.parameter-list{display:flex;flex-wrap:wrap;gap:8px}.parameter-list label{display:grid;gap:4px;color:#607985;font-size:11px}.parameter-list input{width:85px;border:1px solid #cadbdf;border-radius:6px;padding:5px}.proposal details{margin-top:12px}.proposal summary{cursor:pointer;font-size:12px;color:#386d75}.setup{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:10px}.setup label{font-size:11px;color:#687f86}.setup input,.setup select{width:100%;display:block;margin-top:4px;padding:6px;border:1px solid #cbd9dd;border-radius:6px;background:#fff}.product-head{display:flex;justify-content:space-between;align-items:center;margin:12px 0 5px;font-size:12px}.product-head button{border:0;background:transparent;color:#148f8b}.products{display:grid;grid-template-columns:1fr 1fr;max-height:160px;overflow:auto;gap:4px}.products label{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.products input{accent-color:#26bdaf}.hint{color:#7d9198;font-size:11px;margin-bottom:0}.proposal-actions{display:flex;gap:8px;align-items:center;margin-top:15px;flex-wrap:wrap}.proposal-actions span{color:#667e85;font-size:11px}button{border:1px solid #cbd9dd;background:#fff;color:#24414a;border-radius:8px;padding:8px 12px}button:hover{border-color:#2bbaaf}button.primary{background:#29c9b9;border-color:#29c9b9;color:#053732;font-weight:700}button:disabled{opacity:.55;cursor:not-allowed}.progress{height:5px;background:#e6eff0;border-radius:99px;margin-top:10px}.progress div{height:100%;width:0;background:#23b9aa;border-radius:99px;transition:width .2s}.composer{padding:15px 20px;background:#fff;border-top:1px solid #e4ebed}.composer textarea{width:100%;resize:vertical;min-height:65px;padding:11px;border:1px solid #d6e2e5;border-radius:12px;outline:none}.composer textarea:focus{border-color:#27c4b6}.composer-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#86989e;font-size:11px}.composer-foot div{display:flex;gap:7px}.result{min-width:0;background:#f5f8f8;height:100vh;display:flex;flex-direction:column}.result-head{background:#fff}.result-head h2{font-size:20px;margin:3px 0}.result-head a{white-space:nowrap;color:#159b92;font-size:12px}.result-placeholder{margin:auto;max-width:350px;text-align:center;color:#71878e}.result-placeholder h3{color:#293e47}.placeholder-icon{margin:auto;width:60px;height:60px;border:1px solid #b9ddd8;border-radius:18px;display:grid;place-items:center;color:#19a79c;font-size:30px}.result iframe{border:0;width:100%;flex:1;background:#fff}@media(max-width:1100px){.shell{grid-template-columns:175px 42% minmax(0,1fr)}}@media(max-width:820px){.shell{display:block}.sidebar{height:auto;position:static;display:block}.sidebar .brand{padding-bottom:6px}.side-note,.side-label{display:none}.nav{display:inline-block}.chat{height:auto;min-height:640px}.result{height:800px}.result iframe{min-height:700px}}
/* Keep the conversation and its one primary action readable at laptop widths. */
.shell{grid-template-columns:180px minmax(500px,1.1fr) minmax(360px,.9fr)}
.chat-head{flex-wrap:wrap}.chat-head p{font-size:13px}.conversation{padding:26px}
.composer{padding:18px 24px 20px}.composer-label{display:block;font-weight:700;color:#38535b;margin-bottom:9px}
.composer textarea{min-height:98px;line-height:1.6;padding:13px 15px}
.composer-foot{margin-top:11px;align-items:end;flex-wrap:wrap}
.composer-foot .model-control{display:grid;gap:5px;min-width:0;flex:1;color:#5d7780}
#modelSlot{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
#modelSlot select{max-width:100%;min-width:220px;width:min(100%,350px);height:38px;border:1px solid #cadbdf;border-radius:9px;background:#fff;color:#18323b;padding:0 9px}
#send{min-width:132px;height:40px;white-space:nowrap}
.secondary-tools{margin-top:9px;color:#779098;font-size:12px}.secondary-tools summary{cursor:pointer;width:max-content}
.secondary-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}.secondary-actions select{max-width:160px;border:1px solid #cadbdf;border-radius:8px;padding:7px;background:#fff}
@media(max-width:1250px){.shell{grid-template-columns:165px minmax(420px,1fr)}.result{grid-column:2;height:780px}.chat{height:min(800px,100vh)}}
@media(max-width:820px){.shell{display:block}.chat{height:auto;min-height:700px}.result{height:700px}.composer{padding:15px}.composer-foot{align-items:stretch}#send{width:100%}}
.composer-foot{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end}
.factor-activity[hidden],.data-diagnostics[hidden]{display:none}
.factor-activity{display:flex;align-items:center;gap:11px;margin:12px 22px 0;padding:12px 14px;border:1px solid #bfe7df;background:#f0fbf8;border-radius:12px;color:#195f59;flex-shrink:0}
.factor-activity>div{flex:1;min-width:0}.factor-activity strong{font-size:13px}.factor-activity p{font-size:12px;margin:3px 0 0;overflow-wrap:anywhere}.factor-activity>span:last-child{font-variant-numeric:tabular-nums;font-size:12px;white-space:nowrap}
.activity-dot{width:10px;height:10px;border-radius:50%;background:#18a895;flex-shrink:0}.factor-activity[data-state="working"] .activity-dot{animation:factor-pulse 1.1s ease-in-out infinite}
.factor-activity[data-state="failed"]{color:#963943;border-color:#efc4c9;background:#fff6f7}.factor-activity[data-state="failed"] .activity-dot{background:#c4515d}
.data-diagnostics{margin:10px 22px 0;padding:10px 13px;border:1px solid #efd5d8;border-radius:10px;background:#fff8f8;max-height:190px;overflow:auto;font-size:12px;flex-shrink:0}.data-diagnostics summary{cursor:pointer;font-weight:600}.data-diagnostics p{color:#7a6870}.diagnostic-row{padding:7px 0;border-top:1px solid #f0e0e3;overflow-wrap:anywhere}
.bubble.pending{color:#397c73;display:flex;align-items:center;gap:9px}.bubble.pending .activity-dot{animation:factor-pulse 1.1s ease-in-out infinite}
@keyframes factor-pulse{50%{opacity:.35;box-shadow:0 0 0 5px #26bdaf20}}@media(prefers-reduced-motion:reduce){.activity-dot{animation:none!important}}
#modelSlot{display:grid;grid-template-columns:minmax(130px,1fr) minmax(185px,1fr);gap:8px;align-items:center}
#modelSlot select{min-width:0;width:100%}
#modelSlot .aq99-model-choice{display:flex;min-width:0;margin:0;white-space:nowrap}
#modelSlot .aq99-model-choice select{min-width:0;width:100%}
@media(max-width:1050px){#modelSlot{grid-template-columns:1fr}.composer-foot{grid-template-columns:1fr}#send{width:100%}}
