:root{--primary:#5267ff;--primary-hover:#4358ec;--sidebar:#f6f8fc;--bubble:#f5f6ff;--selected:#e3e8ff;--text:#34374d;--body:#535f6d;--muted:#929bb1;--line:#e1e6f0;--danger:#d85464;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;display:flex;height:100dvh;min-height:480px;overflow:hidden;background:#fff}button,input,textarea{font:inherit}button{cursor:pointer}button,input,textarea{-webkit-tap-highlight-color:transparent}button{color:inherit}button:disabled{cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #aab7ff;outline-offset:3px}button{border:0;background:none}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button{display:inline-flex;align-items:center;justify-content:center;gap:8px}button{transition:background .16s,color .16s,box-shadow .16s}button:hover{color:var(--primary)}[hidden]{display:none!important}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.icon-button{width:34px;height:34px;border-radius:8px;color:#697383;flex-shrink:0}.icon-button:hover{background:#e9edf8}.sidebar{width:250px;flex-shrink:0;display:flex;flex-direction:column;background:var(--sidebar);border-right:1px solid var(--line);transition:margin-left .2s;z-index:20}.sidebar-top{height:57px;display:flex;align-items:center;justify-content:space-between;padding:10px 15px}.brand-avatar{width:35px;height:35px}.sidebar-top .icon-button{width:26px;height:26px}.sidebar-top svg{width:18px;height:18px}.new-chat{margin:22px auto 24px;padding:12px 24px;min-height:44px;border-radius:30px;background:var(--primary);color:white;font-size:16px;box-shadow:0 2px 3px #5267ff17}.new-chat:hover{background:var(--primary-hover);color:#fff}.new-chat svg{width:20px}.history{flex:1;overflow:auto;padding:0 11px 16px;scrollbar-width:thin;scrollbar-color:#e2e6ef transparent}.history-group{margin:5px 0 15px}.history-heading{color:#929bb3;font-size:13px;padding:0 0 8px;line-height:22px;font-weight:400;margin:0}.history-row{display:flex;align-items:center;position:relative;border-radius:9px;min-height:41px;margin:3px 0}.history-row:hover{background:#edf0fa}.history-row.active{background:var(--selected)}.history-item{padding:11px 9px;width:100%;font-size:14px;justify-content:flex-start;min-width:0;text-align:left;color:#353940}.history-item span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history-row:hover .history-item,.history-row.active .history-item{padding-right:32px}.history-delete{display:none;position:absolute;right:4px;top:7px;width:28px;height:28px;border-radius:6px;color:#7c85a0}.history-delete svg{width:16px;height:16px}.history-delete:hover{background:#d4ddfd}.history-row:hover .history-delete,.history-row:focus-within .history-delete,.history-row.active .history-delete{display:flex}.account-area{position:relative;border-top:1px solid var(--line);padding:6px 10px;flex-shrink:0}.account{width:100%;min-height:46px;justify-content:flex-start;border-radius:8px;padding:6px 8px;font-size:15px;color:#525e78;gap:11px}.account:hover,.account[aria-expanded=true]{background:#eaf0ff}.account-avatar{width:27px;height:30px;color:#9baaff;display:grid;place-items:center}.account-avatar svg{width:27px;height:27px;stroke-width:1.8}.account-dots{margin-left:auto;width:18px;opacity:.55}.account-menu{position:absolute;bottom:calc(100% + 8px);left:10px;right:10px;background:white;border:1px solid var(--line);box-shadow:0 8px 35px #28366317;border-radius:12px;padding:12px 8px;z-index:30;animation:rise .15s ease-out}.account-menu:after{content:"";height:20px;position:absolute;bottom:-19px;left:0;right:0}.menu-caption{font-size:11px;color:#a0a7b7;letter-spacing:.06em;padding:0 9px 8px}.account-menu button{width:100%;padding:11px 9px;border-radius:7px;justify-content:flex-start;font-size:14px}.account-menu button:hover{background:#f1f4ff}.account-menu button>svg:first-child{color:var(--primary);width:18px}.menu-chevron{margin-left:auto;width:14px;height:14px;color:#adb4c4}.menu-note{font-size:11px;color:#a1a8b8;padding:8px 9px 1px}.main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;position:relative}.topbar{height:54px;flex-shrink:0;display:flex;align-items:center;justify-content:center;position:relative}.topbar h1{font-size:16px;line-height:24px;margin:0;font-weight:600}#expand-sidebar{display:none;position:absolute;left:16px}.greeting{padding:6px 25px 14px;text-align:center;flex-shrink:0}.greeting-title{display:flex;justify-content:center;align-items:center;gap:20px}.greeting-title img{width:54px;height:54px}.greeting h2{font-size:29px;letter-spacing:1px;margin:0;font-weight:600}.notice{color:#96979c;margin:18px auto 0;font-size:13px;line-height:1.8;max-width:1080px}.conversation{flex:1;overflow:auto;scrollbar-width:thin;scrollbar-color:#e9ecf4 transparent;min-height:0;padding:4px 32px 22px;outline:none}.messages{max-width:1100px;margin:auto}.message{margin:0 0 20px;animation:rise .2s ease-out}.user-message{display:flex;justify-content:flex-end;padding:0 1px 0 60px}.user-bubble{border-radius:14px 14px 4px 14px;background:var(--bubble);padding:15px 19px;font-size:16px;line-height:1.65;max-width:85%;white-space:pre-wrap;overflow-wrap:anywhere}.assistant-message{display:flex;align-items:flex-start;gap:22px;padding-top:2px}.message-avatar{width:36px;height:36px;flex-shrink:0;margin-top:1px}.assistant-content{min-width:0;flex:1;max-width:960px}.steps{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:4px 0 10px}.step{border:1px solid var(--line);background:#f8f9fd;border-radius:20px;padding:5px 10px 5px 8px;font-size:13px;color:#505769;gap:5px;line-height:19px}.step svg{width:16px;height:16px}.step svg:last-child{width:13px;height:13px;margin-left:3px;color:#81889c}.step[aria-expanded=true]{background:#eef1ff;border-color:#d0d9ff}.step-detail{font-size:12px;line-height:1.7;background:#f7f9fc;border-left:2px solid #c6d0ff;padding:9px 13px;border-radius:0 6px 6px 0;max-width:600px;white-space:pre-wrap}.answer{font-size:15px;line-height:1.85;color:var(--body);overflow-wrap:anywhere}.answer p{margin:3px 0 9px}.answer strong{font-weight:600;color:#4c5867}.answer ul{padding-left:26px;margin:8px 0 11px}.answer li{margin:6px 0}.answer table{border-collapse:collapse;font-size:14px;min-width:370px;width:min(100%,590px);margin:10px 0 12px;text-align:left;font-variant-numeric:tabular-nums}.table-wrap{overflow:auto}.answer th{color:#5b657b;font-weight:500;background:#f6f8fc}.answer th,.answer td{border-bottom:1px solid #e9edf3;padding:7px 16px}.answer th:last-child,.answer td:last-child{text-align:right}.answer .data-note{font-size:12px;color:#9ba3b4;margin-top:12px}.answer-tools{display:flex;align-items:center;gap:12px;margin-top:6px;color:#a8afbd;font-size:11px}.copy-button{width:27px;height:27px;border-radius:5px;color:#a1a9ba}.copy-button svg{width:15px;height:15px}.copy-button:hover{background:#f1f4fc}.composer-wrap{padding:0 32px;flex-shrink:0;background:#fff}.composer{position:relative;max-width:1100px;margin:0 auto;background:var(--sidebar);border:1.5px solid var(--line);border-radius:17px;padding:17px 22px 16px;transition:border-color .15s,box-shadow .15s}.composer:focus-within{border-color:#c1caff;box-shadow:0 0 0 3px #5267ff06}.composer textarea{width:100%;border:0;outline:none;background:none;resize:none;font-size:15px;line-height:1.6;color:var(--text);height:48px;min-height:48px;max-height:100px;display:block;padding:0}.composer textarea:focus-visible{outline:none}.composer textarea::placeholder{color:#b7bbc5}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:13px}.scope-control{position:relative}.scope-button{background:#fff;border:1px solid #d9dce5;border-radius:20px;padding:6px 10px;font-size:12px;gap:5px;color:#50535c;box-shadow:0 1px 2px #00000009}.scope-button svg{width:15px;height:15px}.scope-menu{position:absolute;bottom:44px;left:0;width:236px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 24px #24346b1c;border-radius:12px;padding:8px;z-index:10}.scope-menu p{font-size:11px;color:var(--muted);padding:3px 7px;margin:2px 0 7px}.scope-menu button{display:flex;align-items:flex-start;flex-direction:column;width:100%;padding:9px;border-radius:8px;font-size:13px;gap:5px}.scope-menu button span{font-size:11px;color:var(--muted)}.scope-menu button:hover,.scope-menu button.selected{background:#f0f3ff}.composer-actions{display:flex;align-items:center;gap:16px}.composer-tip{font-size:11px;color:#b0b6c4}.send-button{border-radius:50%;width:34px;height:34px;background:var(--primary);color:white}.send-button:hover{background:var(--primary-hover);color:#fff}.send-button:disabled{color:#9aa4bb;background:#e4e8f1}.send-button svg{width:20px;height:20px}.disclaimer{font-size:11px;color:#afb7cb;text-align:center;margin:11px 0 9px;letter-spacing:.3px}.suggestions{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0}.suggestion{font-size:13px;border:1px solid var(--line);border-radius:8px;padding:9px 13px;color:#647088;text-align:left;line-height:1.6;justify-content:flex-start}.suggestion:hover{background:#f6f8ff;border-color:#c6d0ff}.empty-chat{max-width:680px;margin:50px auto;text-align:center}.empty-chat h3{font-size:18px;font-weight:500;margin:0 0 12px}.empty-chat p{font-size:13px;color:var(--muted)}.empty-chat .suggestions{display:grid;grid-template-columns:1fr 1fr;margin-top:25px}.empty-chat .suggestion{padding:16px;background:#fafbff}.collapsed .sidebar{margin-left:-250px}.collapsed #expand-sidebar{display:flex}.sidebar-backdrop{display:none}
/* QA workspace */
dialog{padding:0;color:var(--text);border:1px solid #e1e6f0;box-shadow:0 22px 90px #1c29542b}dialog::backdrop{background:#2830444d;backdrop-filter:blur(3px)}.qa-dialog{width:min(1050px,calc(100vw - 64px));height:min(770px,calc(100dvh - 70px));border-radius:20px;overflow:hidden}.qa-dialog[open]{display:flex;flex-direction:column;animation:rise .2s ease-out}.manager-header{display:flex;align-items:flex-start;justify-content:space-between;padding:26px 30px 24px;border-bottom:1px solid var(--line);flex-shrink:0}.eyebrow{font-size:11px;color:var(--primary);letter-spacing:1px;margin-bottom:8px}.manager-header h2{margin:0;font-size:23px;font-weight:600;display:flex;align-items:center;gap:12px}.manager-header h2 span{background:#f0f3ff;color:#7c8bcb;border-radius:7px;font-size:12px;padding:3px 8px;font-weight:400}.manager-header p{font-size:12px;color:var(--muted);margin:10px 0 0}.manager-body{display:grid;grid-template-columns:40% 60%;min-height:0;flex:1}.qa-list-pane{background:#fafbfe;border-right:1px solid var(--line);padding:22px 18px 0;display:flex;flex-direction:column;min-height:0}.list-toolbar{display:flex;gap:9px}.search-box{display:flex;align-items:center;gap:8px;padding:0 10px;background:#fff;border:1px solid var(--line);border-radius:8px;min-width:0;flex:1}.search-box svg{width:16px;height:16px;color:#9ba4b8}.search-box input{border:0;outline:none;min-width:0;width:100%;font-size:12px;padding:10px 0;background:none}.search-box:focus-within{border-color:#9facf9}.list-summary{font-size:11px;color:#a0a8b9;padding:17px 2px 10px}.qa-list{overflow:auto;flex:1;scrollbar-width:thin}.qa-card{display:block;text-align:left;width:100%;padding:16px;border:1px solid #e7eaf1;border-radius:10px;margin-bottom:9px;background:#fff;position:relative}.qa-card:hover{border-color:#bdc8ff;background:#fcfcff}.qa-card.selected{background:#f0f3ff;border-color:#bec9ff}.qa-card h4{font-size:13px;line-height:1.7;color:#49516b;font-weight:500;margin:0 0 6px}.qa-card p{font-size:11px;line-height:1.7;color:#969eaf;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0}.qa-card-bottom{display:flex;justify-content:space-between;margin-top:12px;font-size:10px;color:#929bb2}.qa-card-tag{background:#f4f6fa;padding:3px 6px;border-radius:4px}.qa-card.selected .qa-card-tag{background:#e5eaff;color:#7180c5}.local-note{font-size:11px;display:flex;align-items:center;gap:7px;color:#9ca5b6;padding:15px 0;border-top:1px solid #e9edf5;flex-shrink:0;margin-top:8px}.status-dot{width:5px;height:5px;border-radius:50%;background:#94b6a6}.qa-editor{padding:25px 28px;overflow:auto}.editor-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.editor-heading h3{margin:0;font-size:16px;font-weight:600}.editor-tag{color:#929bb0;background:#f5f7fa;border-radius:5px;padding:4px 8px;font-size:10px}.qa-editor label{display:block;font-size:12px;color:#566077;margin:17px 0 9px}.required{color:#8493da}.optional{font-size:10px;color:#a3aabc;margin-left:5px}.qa-editor input,.qa-editor textarea{border:1px solid #dde3ee;border-radius:8px;padding:11px 12px;width:100%;font-size:13px;line-height:1.7;color:#50596e;background:#fff;resize:vertical}.qa-editor textarea{display:block;min-height:72px}.qa-editor .answer-input{height:205px;min-height:110px}.qa-editor input::placeholder,.qa-editor textarea::placeholder{color:#b5bbca}.qa-editor input:focus,.qa-editor textarea:focus{border-color:#a0afff;outline:none;box-shadow:0 0 0 3px #5267ff08}.field-hint{font-size:10px;color:#a0a8b8;line-height:1.7;margin:7px 0 0}.editor-footer{display:flex;justify-content:space-between;align-items:center;margin-top:21px;padding-top:19px;border-top:1px solid #e9edf3;gap:8px}.editor-footer>div{display:flex;gap:8px}.primary-button{background:var(--primary);color:white;border:1px solid var(--primary);border-radius:8px;padding:9px 14px;font-size:12px;white-space:nowrap;min-height:36px}.primary-button svg{width:15px;height:15px}.primary-button:hover{background:var(--primary-hover);color:#fff}.small{padding:8px 11px}.secondary-button{border:1px solid var(--line);border-radius:8px;padding:9px 15px;background:#fff;font-size:12px;min-height:36px;white-space:nowrap}.secondary-button:hover{background:#f5f7ff;border-color:#c9d2fb}.text-button{font-size:12px;padding:7px 0}.text-button svg{width:14px;height:14px}.danger{color:#c77a83}.danger:hover{color:#d33f55}.form-error{font-size:12px;color:#cf4e60;line-height:1.6;min-height:0;margin-top:10px}.form-error:empty{display:none}.list-empty{color:#9aa3b6;font-size:13px;text-align:center;padding:65px 15px;line-height:1.8}.confirm-dialog{border-radius:17px;padding:28px;width:390px;max-width:calc(100vw - 32px)}.confirm-icon{width:38px;height:38px;background:#f2f4ff;border-radius:50%;color:#7a8af0;display:grid;place-items:center}.confirm-dialog h2{font-size:19px;margin:20px 0 10px}.confirm-dialog p{font-size:13px;line-height:1.8;color:#939bad;overflow-wrap:anywhere}.confirm-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:26px}.toast{position:fixed;bottom:32px;left:50%;transform:translateX(-50%);z-index:100;background:#343c52;color:#fff;font-size:13px;border-radius:10px;padding:12px 19px;box-shadow:0 6px 30px #0002;max-width:calc(100vw - 40px);line-height:1.6;pointer-events:none}.toast.popover-toast{inset:auto auto 32px 50%;margin:0;border:0;overflow:visible}.toast::backdrop{display:none}@keyframes rise{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1650px){.greeting{padding-top:10px;padding-bottom:18px}.greeting-title img{width:60px;height:60px}.greeting h2{font-size:31px}.notice{font-size:14px}.conversation{padding-top:7px}.messages,.composer{max-width:1160px}.answer{font-size:16px}.step{font-size:14px}.user-bubble{font-size:17px}.history-row{min-height:43px}.history-item{font-size:15px}.message{margin-bottom:23px}.composer textarea{height:50px}}
@media(max-width:1100px){.sidebar{width:225px}.collapsed .sidebar{margin-left:-225px}.greeting h2{font-size:25px}.greeting-title{gap:13px}.notice{font-size:12px}.conversation{padding-left:25px;padding-right:25px}.composer-wrap{padding:0 25px}.assistant-message{gap:13px}.qa-dialog{width:calc(100vw - 36px)}.qa-editor{padding:22px}.manager-body{grid-template-columns:39% 61%}.qa-list-pane{padding:20px 12px 0}}
@media(max-width:760px){.sidebar{position:fixed;left:0;top:0;bottom:0;width:250px;margin-left:-250px;box-shadow:8px 0 30px #23376212}.collapsed .sidebar{margin-left:-250px}.mobile-open .sidebar{margin-left:0}.mobile-open .sidebar-backdrop{display:block;position:fixed;inset:0;background:#252c4940;z-index:19}.topbar{height:52px}#expand-sidebar,.collapsed #expand-sidebar{display:flex}.greeting{padding:14px 19px 18px}.greeting-title{gap:8px}.greeting h2{font-size:22px;letter-spacing:0}.greeting-title img{width:43px;height:43px}.notice{font-size:11px;margin-top:12px;max-width:460px}.conversation{padding:0 16px 12px}.user-message{padding-left:25px}.user-bubble{font-size:14px;max-width:95%;padding:12px 15px}.assistant-message{gap:10px}.message-avatar{width:29px;height:29px}.answer{font-size:14px}.answer table{min-width:250px;font-size:12px}.answer th,.answer td{padding:8px 10px}.step{font-size:11px;padding:4px 8px}.composer-wrap{padding:0 14px}.composer{padding:14px 15px 12px;border-radius:14px}.composer textarea{font-size:13px;height:44px}.composer-tip{display:none}.composer-bottom{margin-top:9px}.disclaimer{font-size:10px}.empty-chat{margin:30px auto}.empty-chat .suggestions{grid-template-columns:1fr}.qa-dialog{width:calc(100vw - 20px);height:calc(100dvh - 28px);max-height:none;border-radius:15px}.manager-header{padding:20px}.manager-header h2{font-size:21px}.manager-header p{font-size:11px;line-height:1.7}.manager-body{display:flex;flex-direction:column;overflow:auto}.qa-list-pane{border-right:0;border-bottom:1px solid var(--line);padding:14px;min-height:240px;max-height:270px;flex-shrink:0}.list-summary{padding:10px 2px 8px}.qa-list{min-height:100px;display:flex;gap:9px;overflow-x:auto}.qa-card{flex:0 0 220px;margin:0;padding:12px;height:125px}.qa-card h4{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;line-height:1.5}.qa-card p{-webkit-line-clamp:1}.qa-card-bottom{margin-top:7px}.local-note{display:none}.qa-editor{overflow:visible;padding:20px}.editor-heading{margin-bottom:18px}.qa-editor .answer-input{height:160px}.editor-footer{flex-wrap:wrap}.list-empty{padding:20px}.history-delete{display:flex}.account-menu{bottom:calc(100% + 6px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Preserve the uploaded robot image proportions in all avatar sizes. */
.brand-avatar,.greeting-title img,.message-avatar{object-fit:contain}

/* Per-answer data provenance and source documents. */
.source-note{font-size:12px;line-height:1.8;color:#8e98ad;overflow-wrap:anywhere;margin:16px 0 10px;padding-left:11px;border-left:2px solid #d7def5}.source-note p{margin:4px 0}.source-note strong{font-weight:600;color:#68748b}.source-note ul{padding-left:20px;margin:6px 0}.source-note li{margin:2px 0}.source-note table{font-size:11px;margin:6px 0}.source-note th,.source-note td{padding:4px 8px}
.source-files{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 14px}.source-file{display:flex;gap:11px;align-items:center;text-align:left;padding:12px 14px;border:1px solid #e2e7f1;border-radius:10px;background:#fafbfe;min-width:225px;max-width:330px;justify-content:flex-start}.source-file:hover{background:#f1f4ff;border-color:#c4cefb}.file-type{display:grid;place-items:center;width:35px;height:39px;border-radius:7px;background:#edf0ff;color:#6c7fda;font-size:9px;letter-spacing:.2px;flex-shrink:0}.file-type.pdf{background:#fff0f0;color:#ce8084}.file-info{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}.file-name{font-size:12px;color:#526079;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%}.file-size{font-size:10px;color:#9ba5b9}.source-file>svg{width:14px;height:14px;color:#a2aec6}.source-section{border-top:1px solid #e9edf4;margin-top:22px;padding-top:3px}.qa-editor #qa-source-note{height:73px;min-height:73px;font-size:12px}.attachment-label{display:flex;align-items:center;justify-content:space-between}.attachment-label>span{font-size:10px;color:#99a3b8}.upload-zone{width:100%;border:1px dashed #cbd4ef;background:#f8faff;border-radius:9px;justify-content:flex-start;padding:14px;gap:12px;text-align:left}.upload-zone>svg{color:#7b8ee4;width:22px;height:22px}.upload-zone>span{display:flex;flex-direction:column;gap:6px}.upload-zone strong{font-size:12px;font-weight:500;color:#697aa9}.upload-zone small{font-size:10px;color:#9ba6bf;line-height:1.6}.upload-zone:hover{background:#f0f4ff;border-color:#aab9ef}.upload-zone:disabled{opacity:.65}.upload-status{font-size:11px;color:#8996b7;line-height:1.8;white-space:pre-wrap;margin-top:7px}.upload-status.error{color:#c75c6d}.editor-attachments{display:flex;flex-direction:column;gap:8px;margin-top:10px}.editor-attachment{display:flex;align-items:center;border:1px solid #e4e9f3;border-radius:8px;padding:9px 10px;gap:8px}.editor-attachment .file-type{width:30px;height:34px;font-size:8px}.editor-attachment .attachment-open{display:flex;text-align:left;flex:1;min-width:0;justify-content:flex-start;gap:10px;padding:0}.editor-attachment .icon-button{width:26px;height:26px}.editor-attachment .icon-button svg{width:15px;height:15px}.attachment-open:hover .file-name{color:var(--primary)}.editor-footer{position:sticky;bottom:-25px;background:#fff;z-index:1;margin-bottom:-25px;padding-bottom:18px;box-shadow:0 -8px 12px #ffffffed}.qa-editor{scroll-padding-bottom:75px}.preview-dialog{width:min(1120px,calc(100vw - 40px));height:calc(100dvh - 48px);max-height:1000px;border-radius:17px;overflow:hidden}.preview-dialog[open]{display:flex;flex-direction:column}.preview-header{display:flex;align-items:center;gap:14px;padding:18px 22px;border-bottom:1px solid var(--line);flex-shrink:0}.preview-file-icon{width:39px;height:43px;background:#eef2ff;border-radius:9px;display:grid;place-items:center;color:#8092dd}.preview-heading{min-width:0;flex:1}.preview-heading h2{font-size:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0;font-weight:600}.preview-heading p{font-size:11px;color:#98a3b8;margin:6px 0 0}.preview-header a{text-decoration:none;display:flex;align-items:center;justify-content:center}.preview-toolbar{display:flex;justify-content:center;align-items:center;gap:30px;padding:7px;background:#fcfdff;border-bottom:1px solid var(--line);flex-shrink:0}.preview-toolbar>div{display:flex;align-items:center;gap:12px}.preview-toolbar span{font-size:12px;color:#74819a;min-width:45px;text-align:center;font-variant-numeric:tabular-nums}.preview-toolbar button{font-size:22px}.preview-toolbar button:disabled{opacity:.35}.preview-stage{flex:1;min-height:0;overflow:auto;background:#eef1f6;padding:24px 20px;text-align:center}.preview-pages{display:flex;flex-direction:column;align-items:center;gap:18px}.pdf-page-slot{position:relative;flex:none;background:#fff;box-shadow:0 3px 17px #303e551f;max-width:100%;overflow:hidden}.pdf-page-canvas{display:block;width:100%;height:100%;background:white}.page-error{color:#bb5b68;font-size:13px;position:sticky;top:20px}.preview-status{color:#8b97ad;font-size:13px;line-height:1.8;margin:80px auto;max-width:400px;padding:0 15px}.qa-editor #qa-form[inert]{opacity:.7}.topbar h1{max-width:calc(100% - 110px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
@media(max-width:760px){.source-file{width:100%;min-width:0;max-width:100%}.source-note{font-size:11px}.editor-footer{bottom:-20px;margin-bottom:-20px;padding-bottom:16px}.preview-dialog{width:calc(100vw - 16px);height:calc(100dvh - 20px);border-radius:13px}.preview-header{padding:14px 12px;gap:8px}.preview-file-icon{display:none}.preview-heading h2{font-size:13px}.preview-heading p{font-size:10px}.preview-header a{font-size:10px;padding:7px 8px}.preview-toolbar{gap:17px}.preview-toolbar>div{gap:5px}.preview-stage{padding:18px 20px}}

/* Per-answer prompt configuration */
.prompt-section{border-top:1px solid #e9edf4;margin-top:22px;padding-top:18px;min-width:0}
.prompt-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.prompt-heading h4{margin:0;font-size:13px;font-weight:600;color:#566077}
.prompt-heading .text-button{color:var(--primary)}
.prompt-item{min-width:0;margin:16px 0 0;padding:0 14px 14px;border:1px solid #e3e8f2;border-radius:9px;background:#fafbfe}
.prompt-item legend{font-size:11px;color:#8290ac;padding:0 5px}
.prompt-item label{margin-top:12px}
.prompt-item textarea{min-height:68px}
.step{max-width:100%;text-align:left}
.step>span{min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}
.step>svg{flex-shrink:0}
.step-static{display:flex;align-items:center;cursor:default}
.step-static>svg:last-child{width:16px;height:16px;margin-left:0}
.step-detail{overflow-wrap:anywhere;max-width:min(100%,600px)}

.prompt-count{font-size:11px;color:#929bb0;font-weight:400;margin-left:6px}
.prompt-item-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.prompt-item-heading label{flex:1}
.prompt-item-heading button{flex-shrink:0;font-size:11px}
.prompt-empty{padding:17px 14px;background:#fafbfe;border:1px dashed #dce3f0;border-radius:9px;color:#929bb0;font-size:12px;line-height:1.8}
.add-prompt{margin-top:14px;width:100%;gap:6px}
.add-prompt svg{width:15px;height:15px}

/* Thinking and incremental answer rendering. */
.step[data-status=loading]{color:var(--primary);border-color:#d0d9ff;background:#f2f5ff}
.step[data-status=loading]>svg:first-child{animation:thinking-spin .8s linear infinite;transform-origin:center}
.step[data-status=pending]{color:#a2aabd}
.answer-output[hidden],.answer-output>[hidden],.answer-footer[hidden],.stream-pending{display:none!important}
.answer-output>.answer{min-height:1.85em}
.stream-cursor::after{content:'';display:inline-block;width:2px;height:1em;margin-left:3px;vertical-align:-.12em;background:var(--primary);animation:typing-blink .8s steps(2,start) infinite}
@keyframes thinking-spin{to{transform:rotate(360deg)}}
@keyframes typing-blink{50%{opacity:0}}
@media(prefers-reduced-motion:reduce){.step[data-status=loading]>svg:first-child{animation-duration:2s}.stream-cursor::after{animation:none}}

.recommendation-section{border-top:1px solid #e9edf4;margin-top:22px;padding-top:18px}
.recommendation-section textarea{min-height:96px;line-height:1.6}
.recommendations{margin:18px 0 10px}
.recommendations-title{font-size:12px;color:#8b96aa;margin-bottom:8px}
.recommendations .suggestions{margin:0}
.recommendations .suggestion{max-width:100%;overflow-wrap:anywhere}
