:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#272a30;background:#e2e6ee;font-size:14px;font-synthesis:none}*{box-sizing:border-box}body{margin:0}.topbar{height:48px;display:flex;align-items:center;gap:13px;padding:0 16px;background:#f5f8ff;color:#435887;font-weight:650}.brand-icon{background:#e6e9ef;border-radius:50%;width:27px;height:27px;display:grid;place-items:center;color:#4c525c;font-size:22px}main{max-width:652px;margin:16px auto 36px}.form-card,.result-card{background:#fff;border-radius:16px;box-shadow:0 1px 9px #303a5110;overflow:hidden}.hero{text-align:center;padding:22px 24px 18px;background:linear-gradient(145deg,#f2f9ff,#faf5ff)}.hero-icon{width:102px;height:102px;border-radius:50%;background:linear-gradient(160deg,#ffca66,#ff9700);display:grid;place-items:center;font-size:59px;margin:0 auto 17px}h1{font-size:15px;line-height:1.6;font-weight:450;margin:0}.tagline{text-align:center;font-size:13px;margin:11px 0 17px}fieldset{border:0;margin:0;padding:0 22px;min-width:0}.field{margin:0 0 24px}label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}i{color:#e35a65;font-style:normal}input:not([type=checkbox],[type=file]),select,textarea{font:inherit;width:100%;border:1px solid #d9dee8;border-radius:7px;color:#303540;background:#fff;padding:10px 12px;outline:none;transition:border-color .15s,box-shadow .15s}input:not([type=checkbox],[type=file]),select{height:39px}select:invalid{color:#9a9faa}input::placeholder,textarea::placeholder{color:#9a9faa}textarea{resize:vertical;min-height:124px;line-height:1.7}input:focus,select:focus,textarea:focus{border-color:#7895eb;box-shadow:0 0 0 3px #7895eb1c}button:focus-visible,.upload-button:focus-within{outline:3px solid #7895eb;outline-offset:3px}select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%239da6b5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center;padding-right:35px}.checks{display:flex;flex-wrap:wrap;gap:9px 15px;margin-top:12px}.checks label{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:400;margin:0;cursor:pointer}.checks input{accent-color:#536fbd;width:14px;height:14px;margin:0}.soft-panel{background:#f5f7fa;border-radius:11px;padding:13px 9px;margin-bottom:19px}.counter{display:block;text-align:right;color:#8b929f;font-size:11px;margin-top:4px}.upload-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.upload-button{display:inline-block;background:#080909;color:white;border-radius:6px;padding:9px 18px;cursor:pointer;margin:0;font-size:13px}.upload-panel{position:relative}.upload-panel input[type=file]{display:block;width:100%;margin-top:9px;font-size:12px;color:#7b8290}.upload-panel input::file-selector-button{display:none}.hint{font-size:12px;line-height:1.6;color:#858b97;font-weight:400}.upload-panel p{margin-bottom:0}#file-list{list-style:none;padding:0;margin:7px 0 0}#file-list li{display:flex;align-items:center;gap:8px;font-size:12px;padding:6px 0;overflow-wrap:anywhere}#file-list li span{flex:1;min-width:0}#file-list button{background:none;padding:3px 7px;font-size:12px;color:#7b8290}.notice{min-height:22px;line-height:1.7;font-size:13px;margin:10px 22px 22px;color:#657089}.notice.error{color:#bf4545}.actions{display:flex;align-items:center;gap:14px;border-top:1px solid #f0f1f4;padding:15px 14px;background:#fff}.actions button{border-radius:30px;height:42px}.actions .clear{padding:0 6px;font-size:13px;background:#fff;color:#4a4d53}.actions .example{color:#4275ff;background:#f5f6f8;flex:1;font-weight:600}.actions .submit{background:#050606;color:#fff;flex:1;font-weight:600}button{border:0;cursor:pointer;font:inherit;transition:opacity .15s;background:#f0f2f6;padding:10px 16px;border-radius:7px;color:#323847}button:hover,.upload-button:hover{opacity:.78}button:disabled{opacity:.45;cursor:not-allowed}.result-card{margin-top:20px;padding:26px}.result-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.eyebrow{font-size:11px;letter-spacing:1px;color:#6b83bd}h2{font-size:20px;margin:7px 0 0;font-weight:600}.result-status{font-size:13px;color:#6d778a;margin:20px 0;line-height:1.6}.result-status.error{color:#bf4545}.answer{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.95;color:#303643;min-height:90px}.result-actions{display:flex;gap:10px;border-top:1px solid #edf0f5;padding-top:20px;margin-top:25px}[hidden]{display:none!important}fieldset:disabled .upload-button{pointer-events:none;opacity:.45}@media(min-width:1500px){main{margin-top:16px}.notice{margin-bottom:85px}}@media(max-width:680px){main{margin:12px 12px 24px}.topbar{height:44px}.hero{padding:20px 15px 17px}.hero-icon{width:84px;height:84px;font-size:49px}h1{font-size:14px}fieldset{padding:0 18px}.field{margin-bottom:21px}.result-card{padding:21px 18px}.actions{gap:9px}.result-heading{align-items:flex-start}#stop{white-space:nowrap;font-size:12px}.checks{gap:10px 12px}.hint{font-size:12px}}
/* Conversation page */
.chat-mode main{max-width:710px;margin:0 auto;padding:32px 28px 145px}.chat-mode .topbar{display:none}.chat-nav{display:flex;justify-content:space-between;align-items:center;margin:-15px 0 22px;color:#858d9e;font-size:12px}.chat-nav button{background:transparent;padding:6px 0;font-size:12px;color:#667187}.messages{display:flex;flex-direction:column;gap:34px}.message{display:flex;gap:10px;align-items:flex-start;min-width:0}.avatar{width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:#ffaf23;display:grid;place-items:center;font-size:23px}.user .avatar{background:#b53224;font-size:22px}.bubble{background:#ffffffeb;border-radius:12px;padding:15px 20px;flex:1;min-width:0;font-size:14px;line-height:1.75;color:#50545b;overflow-wrap:anywhere;white-space:pre-wrap}.answer-content{white-space:normal}.answer-content h3{font-size:14px;font-weight:650;line-height:1.8;margin:24px 0 16px}.answer-content h3:first-child{margin-top:0}.answer-content p{margin:0 0 14px;white-space:pre-wrap}.answer-content pre{white-space:pre-wrap;background:#f1f3f7;padding:12px;border-radius:6px;overflow-wrap:anywhere;font-size:12px}.answer-content hr{border:0;border-top:1px solid #e8ebf0;margin:20px 0}.stream-status{font-size:12px;color:#9298a3;white-space:normal;margin:8px 0 0}.stream-status.error{color:#b94949}.composer-dock{position:fixed;z-index:10;bottom:0;left:50%;transform:translateX(-50%);width:min(710px,100%);padding:0 12px;background:linear-gradient(transparent,#e2e6ee 36%)}.composer{background:#fff;box-shadow:0 5px 24px #26304414;border-radius:12px;display:flex;align-items:flex-end;gap:12px;padding:12px 10px}.composer textarea{border:0;box-shadow:none!important;min-height:32px;max-height:160px;resize:none;padding:5px 0;font-size:14px;line-height:22px;border-radius:0}.composer button{background:#050606;color:#fff;width:35px;height:35px;border-radius:8px;padding:0;flex:0 0 35px;font-size:20px}.chat-tools{display:flex;justify-content:center;gap:8px;margin:0 0 7px}.chat-tools button{padding:5px 12px;font-size:11px;background:#ffffffeb;box-shadow:0 2px 4px #2630440b;border-radius:5px}.chat-disclaimer{text-align:center;color:#a9b0bd;font-size:11px;margin:7px 0 0;line-height:16px}@media(max-width:600px){.chat-mode main{padding:23px 12px 145px}.message{gap:8px}.avatar{width:29px;height:29px;flex-basis:29px;font-size:20px}.bubble{padding:13px 15px}.messages{gap:25px}.chat-nav{margin-top:-9px}.composer-dock{padding:0 10px}.chat-nav span{max-width:60%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}
.table-scroll{max-width:100%;overflow-x:auto;margin:12px 0 20px}.answer-content table{border-collapse:collapse;font-size:12px;min-width:100%;white-space:pre-wrap}.answer-content th,.answer-content td{padding:9px 11px;border:1px solid #dfe4ec;min-width:105px;vertical-align:top}.answer-content th{background:#f1f4f9;text-align:left;font-weight:600}.answer-content td{max-width:360px}

.answer-actions{display:flex;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid #edf0f4;white-space:normal}.answer-actions button{padding:5px 12px;font-size:12px;background:#f3f5f8;color:#647084;border-radius:6px}.chat-tools:has(#stop[hidden]){display:none}
.answer-actions button{background:#edf3ff;color:#4268b4}.answer-actions button:hover{background:#dfeaff;opacity:1}

.answer-content .align-left{text-align:left}.answer-content .align-center{text-align:center}.answer-content .align-right{text-align:right}
.answer-content .lesson-info-table{width:100%;table-layout:fixed}.answer-content .lesson-info-table th,.answer-content .lesson-info-table td{min-width:0;max-width:none}.answer-content .lesson-info-table th{font-size:14px}

.stream-status.loading{display:flex;gap:9px;align-items:center}.stream-status.loading::before{content:"";width:15px;height:15px;border:2px solid #ded9ed;border-top-color:#725cb4;border-radius:50%;animation:book-spin .8s linear infinite}@keyframes book-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.stream-status.loading::before{animation:none}}

.section-picker{border:1px solid #d9dee8;border-radius:7px;background:#fff}.section-picker>summary{cursor:pointer;padding:11px 12px;font-size:14px;overflow-wrap:anywhere}.section-picker #book-section{max-height:330px;overflow:auto;padding:0 12px 12px;border-top:1px solid #edf0f5}.section-heading{font-size:12px;color:#7b8290;margin:16px 0 10px}.section-picker label{display:flex;gap:9px;align-items:flex-start;font-weight:400;line-height:1.6;padding:6px 0;cursor:pointer}.section-picker input{flex:0 0 auto;margin:4px 0 0;accent-color:#536fbd}
