:root{--ink:#243b38;--muted:#788581;--green:#28695e;--green-dark:#195246;--line:#e4e9e5;--paper:#fff;--canvas:#f7f9f7;--soft:#eaf2ed;--orange:#a27532;--red:#aa4b43;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--canvas);font-synthesis:none}*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.6}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #85b8a6;outline-offset:3px}button{color:inherit}h1,h2,h3,h4,p{margin:0}button{border:0;background:none}input,select,textarea{color:var(--ink)}.app-shell{display:flex;min-height:100vh}.sidebar{width:226px;flex-shrink:0;background:#f0f3ef;border-right:1px solid var(--line);padding:32px 17px 20px;position:fixed;top:0;bottom:0;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;margin:0 15px 40px;font-size:25px;font-weight:650;letter-spacing:3px}.brand-symbol{width:42px;height:44px;display:grid;place-items:center;background:var(--green);color:#fff;font-family:serif;font-size:25px;border-radius:12px 12px 12px 3px;letter-spacing:0}.brand small{display:block;font-size:9px;letter-spacing:4px;font-weight:500;margin-top:-5px;color:#7c8f84}.workspace-label{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#86938b;margin:0 15px 14px}.workspace-label span{font-size:9px;letter-spacing:1px}.nav-item{display:flex;align-items:center;width:100%;gap:12px;padding:12px 15px;margin:3px 0;border-radius:7px;text-align:left;color:#697b72;font-size:13px}.nav-item:hover{background:#e8eee7}.nav-item.active{background:#dfeae1;color:#225e50;font-weight:600}.nav-icon{font-size:22px;width:22px;line-height:1;opacity:.85}.count{margin-left:auto;background:#d1e1d4;border-radius:4px;font-size:11px;min-width:22px;text-align:center}.nav-separator{border-top:1px solid #dfe6df;margin:20px 13px}.sidebar-bottom{margin:auto 14px 0;padding-top:24px}.privacy-mark{font-size:27px;color:#72957f;margin-bottom:12px}.sidebar-bottom strong{font-size:11px;font-weight:550}.sidebar-bottom p{font-size:11px;line-height:1.85;color:#819087;margin:8px 0 24px}.version{border-top:1px solid #dce4dc;padding-top:15px;display:flex;justify-content:space-between;letter-spacing:1px;font-size:8px;color:#8b988e}.workspace{margin-left:226px;flex:1;min-width:0}.topbar{height:72px;border-bottom:1px solid var(--line);padding:0 42px;display:flex;justify-content:space-between;align-items:center;background:#ffffffa3}.breadcrumb{font-size:12px;color:#8b9690;display:flex;gap:16px;align-items:center}.breadcrumb strong{font-weight:500;color:#475f55}.top-actions{display:flex;gap:18px;font-size:11px;align-items:center}.local-state,.model-state{display:flex;gap:7px;align-items:center}.local-state{color:#6f8478}.local-state i{background:#65947b}.local-state i,.model-state i{width:6px;height:6px;border-radius:50%;display:block}.model-state{padding:7px 10px;border:1px solid var(--line);border-radius:5px;background:white;color:#7e8980}.model-state i{background:#d3aa62}.model-state.connected i{background:#65947b}main{max-width:1400px;margin:auto;padding:43px 44px 24px;min-height:calc(100vh - 128px)}.page{display:none}.page.active{display:block}.page-heading{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:30px}.eyebrow{font-size:9px;letter-spacing:2.1px;color:#82948a;font-weight:600;margin-bottom:10px}h1{font-size:28px;line-height:1.4;font-weight:600;letter-spacing:1px}.subtitle{font-size:12px;color:#819086;margin-top:12px}.button{display:inline-flex;justify-content:center;align-items:center;gap:12px;border:1px solid transparent;padding:9px 16px;border-radius:6px;font-size:12px;font-weight:500;white-space:nowrap;min-height:39px;transition:background .15s,transform .15s}.button:hover:not(:disabled){transform:translateY(-1px)}.button.primary{background:var(--green);color:white;box-shadow:0 3px 7px #204a3512}.button.primary:hover{background:var(--green-dark)}.button.secondary{background:white;border-color:#dbe3dc}.button.secondary:hover{background:#f0f5f0}.button.destructive{background:#ad5047;color:white}.button span{font-size:19px;font-weight:400}.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:9px;background:white;padding:22px 0;margin-bottom:22px}.stats>div{padding:0 28px;border-right:1px solid var(--line)}.stats>div:last-child{border-right:0}.stats div>span{font-size:11px;color:#869187;display:block;margin-bottom:8px}.stats strong{font-size:27px;font-weight:550;line-height:1.2;font-variant-numeric:tabular-nums}.stats small{font-size:11px;font-weight:400;color:#9aa39c;margin-left:10px}.upload-zone{width:100%;min-height:110px;display:flex;align-items:center;gap:19px;border:1px dashed #c6d7c8;border-radius:9px;padding:23px 27px;background:#f0f5ef;text-align:left;transition:background .15s;margin-bottom:34px}.upload-zone:hover,.upload-zone.dragging{background:#e5f0e4;border-color:#6b9c7d}.upload-art{width:49px;height:49px;border-radius:12px;background:#e2ece0;display:grid;place-items:center;color:#61876b;flex-shrink:0}.upload-art svg{width:28px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.upload-zone strong{display:block;font-weight:500;font-size:13px;margin-bottom:6px}.upload-zone small{display:block;font-size:11px;color:#91a08f}.upload-hint{margin-left:auto;color:#91a18f;font-size:10px;white-space:nowrap}.section-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}.section-title{font-size:14px;font-weight:600;display:flex;align-items:center;gap:9px}.section-title>span{font-weight:400;font-size:10px;background:#e9eee8;padding:0 6px;border-radius:4px;color:#7a8c7c}.filters{display:flex;gap:10px}.search-field{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:6px;background:white;padding:6px 12px;color:#86938c}.search-field span{font-size:21px;line-height:1}.search-field input{border:0;background:transparent;width:160px;font-size:11px;outline:none}.search-field input::placeholder{color:#a0aaa3}select{border:1px solid var(--line);border-radius:6px;padding:7px 26px 7px 10px;background:white;font-size:11px}.document-table{background:white;border:1px solid var(--line);border-radius:9px;overflow:hidden}.table-heading,.document-row{display:grid;grid-template-columns:minmax(210px,1fr) 86px 112px 115px 108px;gap:10px;align-items:center;padding:13px 20px}.table-heading{background:#fafbf9;font-size:10px;color:#8c9a8f;border-bottom:1px solid var(--line)}.document-row{border-bottom:1px solid #eef1ec;padding-top:19px;padding-bottom:19px;font-size:11px}.document-row:last-child{border-bottom:0}.document-name{display:flex;align-items:center;gap:12px;min-width:0}.file-icon{display:grid;place-items:center;border:1px solid #dbe5f0;color:#547ba2;background:#f0f5f9;border-radius:6px;width:32px;height:38px;flex-shrink:0;font-size:10px;font-weight:600}.file-icon.md{border-color:#e0e6dc;color:#7b8c6c;background:#f2f5ef}.document-name strong{display:block;font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px}.document-name small{display:block;font-size:10px;color:#9aa49d;margin-top:4px}.badge{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;background:#f6f0e4;color:#9a7a3f;border-radius:4px;white-space:nowrap;font-size:10px;width:max-content}.badge:before{content:'';width:4px;height:4px;background:currentColor;border-radius:50%}.badge.ready{color:#558366;background:#eaf3ec}.badge.disabled{color:#929b95;background:#f0f2f0}.permission{color:#93a092;font-size:10px}.permission.allowed{color:#447962}.numbers{font-variant-numeric:tabular-nums;color:#849287;font-size:10px}.row-actions{display:flex;align-items:center;gap:4px}.row-actions button{font-size:11px;padding:5px 7px;border-radius:4px;color:#527361}.row-actions button:hover{background:#edf4ed}.row-actions .delete{font-size:18px;color:#a6aea7}.empty-library{text-align:center;padding:45px 20px 35px;border:1px solid var(--line);border-top:0;background:white;border-radius:0 0 9px 9px;margin-top:-7px}.empty-library h2{font-size:17px;font-weight:500;margin-bottom:10px}.empty-library p{font-size:12px;color:#91a08f;margin-bottom:22px}.empty-library>small{display:block;font-size:10px;color:#a0aca1;margin-top:13px}.empty-books{height:65px;margin-bottom:20px;display:flex;align-items:end;justify-content:center;gap:4px}.empty-books span{display:block;width:16px;height:41px;border:1px solid #b9cfb7;border-radius:4px;background:#eaf1e7;position:relative}.empty-books span:after{position:absolute;content:'';height:1px;left:3px;right:3px;bottom:8px;background:#b9cfb7}.empty-books span:nth-child(2){height:52px;background:#d8e6d6}.empty-books span:nth-child(3){height:45px;transform:rotate(14deg);margin-left:4px;transform-origin:bottom}.library-footer{display:flex;justify-content:space-between;align-items:center;margin-top:22px;font-size:10px;color:#8e9d90}.text-button{font-size:12px;color:var(--green);padding:5px 0}.text-button span{margin-left:8px}.text-button:hover{text-decoration:underline}.danger{color:var(--red)}.app-footer{max-width:1400px;margin:auto;padding:18px 44px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:9px;color:#a0aaa1;letter-spacing:.3px}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.query-layout{display:grid;grid-template-columns:minmax(0,1fr) 224px;gap:24px}.chat-panel{background:white;border:1px solid var(--line);border-radius:10px;overflow:hidden;display:flex;flex-direction:column;min-height:590px}.query-controls{display:flex;justify-content:space-between;gap:12px;padding:18px 20px 12px;align-items:center}.segmented{display:flex;background:#f1f4ef;padding:3px;border-radius:6px;flex-shrink:0}.segmented button{padding:6px 12px;font-size:11px;color:#8a988d;border-radius:4px}.segmented button.selected{background:white;color:var(--green);box-shadow:0 1px 4px #2742320e}.query-controls select{max-width:220px;min-width:100px}.mode-description{padding:0 23px 13px;color:#91a08f;font-size:10px;border-bottom:1px solid #eff2ed}.conversation{flex:1;padding:24px;max-height:650px;overflow:auto}.chat-welcome{padding:36px 15px 16px;text-align:center}.welcome-icon{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 18px;background:#edf4e9;color:#64916c;border-radius:17px;font-size:35px}.chat-welcome h2{font-size:19px;font-weight:500}.chat-welcome p{font-size:11px;color:#94a08f;margin:11px 0 25px}.suggestions{display:flex;flex-direction:column;gap:8px;max-width:350px;margin:auto;text-align:left}.suggestions button{display:flex;justify-content:space-between;gap:10px;padding:10px 13px;border:1px solid var(--line);border-radius:6px;font-size:11px;color:#758772}.suggestions button:hover{background:#f4f8f1;border-color:#abc4aa}.composer{margin:10px 20px 20px;border:1px solid #d9e3d7;border-radius:8px;box-shadow:0 2px 5px #1a4a2a03}.composer:focus-within{border-color:#8eaf95}.composer textarea{border:0;background:none;resize:vertical;width:100%;padding:14px;font-size:12px;outline:none;min-height:70px;max-height:180px}.composer textarea::placeholder{color:#a2aca0}.composer-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 10px 10px}.composer-footer>span{font-size:9px;color:#9da79b;padding-left:5px}.composer-footer .button{padding:5px 13px;min-height:32px}.query-guide{padding:20px 4px}.guide-symbol{font-size:30px;color:#6c9178;margin-bottom:15px}.query-guide h3{font-size:13px;font-weight:550;margin-bottom:10px}.query-guide h4{font-size:11px;font-weight:500;margin-bottom:8px}.query-guide p{font-size:11px;color:#80917e;line-height:1.9}.query-guide small{display:block;font-size:10px;color:#99a594;line-height:1.9;margin-top:7px}.guide-line{border-top:1px solid #e3e9de;margin:23px 0}.query-guide .guide-disclaimer{font-size:10px;color:#a0aa99}.message-user{background:#edf3eb;border-radius:8px 8px 2px 8px;padding:12px 15px;margin:0 0 20px auto;width:fit-content;max-width:90%;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.answer{margin-bottom:25px}.answer-heading{display:flex;gap:8px;align-items:center;font-size:11px;font-weight:600;margin-bottom:12px}.answer-heading>span:first-child{display:grid;place-items:center;width:23px;height:23px;background:var(--green);color:white;border-radius:7px;font-size:13px}.answer-heading small{font-weight:400;color:#9baa96;margin-left:auto;font-size:9px}.answer p{font-size:12px;line-height:1.9;margin:8px 0;color:#536b58;white-space:pre-wrap;overflow-wrap:anywhere}.answer .result-notice{font-size:11px;color:#869881;margin-bottom:15px}.answer .error-notice{color:#a06c4a}.answer details{border:1px solid var(--line);border-radius:6px;padding:10px 13px;margin-top:8px;background:#fbfcfa}.answer summary{cursor:pointer;font-size:11px;color:#6b8269;overflow-wrap:anywhere}.answer summary small{font-size:9px;color:#9aa994;margin-left:7px}.source-quote{padding:8px 12px;border-left:2px solid #9dbc9b;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;color:#6a8066;background:#f2f6ef;margin-top:10px;line-height:1.9}.source-meta{font-size:9px;color:#97a18f;margin:8px 0}.retrieval-tags{display:flex;gap:6px;flex-wrap:wrap}.retrieval-tags span{font-size:9px;padding:1px 5px;background:#eaf0e5;border-radius:3px;color:#869679}.answer .missing{font-size:11px;color:#98743f}.pending{color:#89a285;font-size:12px;padding:16px 0;display:flex;gap:9px;align-items:center}.pending:before{content:'';width:7px;height:7px;border-radius:50%;background:#7d9b79;animation:pulse 1s infinite alternate}@keyframes pulse{to{opacity:.25}}.settings-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:26px;max-width:1000px}.settings-card,.usage-card{padding:28px;border:1px solid var(--line);border-radius:9px;background:white}.settings-card h2,.usage-card h2{font-size:15px;font-weight:550;margin-bottom:24px}.settings-card label{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#697d67;margin-bottom:17px}.settings-card input,.settings-card select{border:1px solid #dce5d8;border-radius:5px;background:#fcfdfb;padding:9px 12px;min-width:0;width:100%;font-size:12px}.field-help{font-size:10px;color:#92a08c;line-height:1.85;margin:-5px 0 20px}.settings-divider{border-top:1px solid var(--line);margin:26px 0}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.settings-actions{display:flex;align-items:center;gap:24px}.usage-card>strong{display:block;font-size:35px;font-weight:500;color:#2b6555;letter-spacing:-1px}.usage-caption{font-size:11px;color:#91a088}.usage-row{display:flex;justify-content:space-between;font-size:11px;padding-top:18px;color:#92a18a}.usage-row b{color:#5d7658;font-size:11px;font-weight:500}.usage-card .field-help{margin:18px 0 0}.notice{background:#eff4eb;border:1px solid #e1e9da;border-radius:7px;padding:20px;margin-top:20px;max-width:1000px}.notice strong{font-size:12px;font-weight:550;color:#627c5d}.notice p{font-size:11px;line-height:1.9;color:#899a7f;margin-top:8px}.export-card{display:grid;grid-template-columns:190px 1fr;gap:35px;align-items:center;border:1px solid var(--line);border-radius:10px;background:white;padding:42px;max-width:1000px}.package-art{font-size:120px;text-align:center;line-height:1;color:#b0c5a2;position:relative}.package-art span{font-size:35px;background:#e6eedf;border:5px solid white;border-radius:50%;width:55px;height:55px;display:grid;place-items:center;position:absolute;right:10px;bottom:-2px;color:#4f7748}.pill{display:inline-block;color:#7e946e;font-size:10px;background:#eff4e9;padding:4px 9px;border-radius:4px}.export-card h2{font-size:23px;font-weight:550;margin:15px 0}.export-card p{font-size:12px;color:#8b9a80;line-height:1.9;max-width:500px}.export-summary{font-size:12px;display:flex;gap:25px;margin:24px 0;color:#668059}.export-summary strong{font-size:19px;font-weight:500;margin-right:5px}dialog{padding:0;border:1px solid #dbe4d7;border-radius:12px;box-shadow:0 20px 100px #1a352433;color:var(--ink);width:min(790px,95vw);max-height:90vh}dialog::backdrop{background:#243b385c;backdrop-filter:blur(3px)}dialog[open]{display:flex;flex-direction:column}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:24px 28px 14px;gap:20px}.dialog-header h2{font-size:18px;font-weight:550;overflow-wrap:anywhere}.dialog-header .eyebrow{font-size:8px}.icon-button{font-size:25px;color:#83957c;width:32px;height:32px;flex-shrink:0}.preview-meta{font-size:10px;color:#95a18c;padding:0 28px 15px;border-bottom:1px solid var(--line)}.preview-warnings{padding:0 28px;color:#a07b42;font-size:11px;background:#fbf8f1}.preview-warnings p{padding:6px 0}.preview-body{padding:20px 28px;overflow:auto;min-height:160px;max-height:50vh}.preview-block{padding:13px 0;border-bottom:1px solid #edf1e9}.preview-block:last-child{border:0}.preview-block .block-path{font-size:10px;color:#99a58e;display:flex;justify-content:space-between;gap:16px}.preview-block p{font-size:13px;color:#54704b;line-height:1.9;margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}.preview-block.kind-heading p{font-size:16px;font-weight:550}.preview-block table{width:100%;border-collapse:collapse;font-size:11px;margin:10px 0;table-layout:fixed;overflow-wrap:anywhere}.preview-block th,.preview-block td{padding:8px;border:1px solid #e1e8dc;text-align:left;white-space:pre-wrap}.preview-block th{background:#f1f5ec;font-weight:500}.dialog-footer{border-top:1px solid var(--line);padding:20px 28px;background:#fbfcf9}.cloud-check{display:grid;grid-template-columns:16px 1fr;column-gap:8px;font-size:12px;align-items:center}.cloud-check input{accent-color:var(--green);margin:0}.cloud-check span{grid-column:2;font-size:10px;color:#98a18d;margin:3px 0 14px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;align-items:center}.confirm-dialog{max-width:440px;padding:25px}.confirm-dialog h2{font-size:19px;font-weight:550}.confirm-dialog p{font-size:12px;color:#86977e;margin:17px 0 24px;overflow-wrap:anywhere}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%) translateY(80px);opacity:0;transition:.2s;z-index:1000;background:#264b3e;color:white;border:1px solid #ffffff33;border-radius:8px;box-shadow:0 5px 25px #23483530;padding:12px 20px;font-size:12px;max-width:90vw;pointer-events:none}#toast.show{transform:translateX(-50%) translateY(0);opacity:1}#toast.error{background:#915744}.no-matches{text-align:center;padding:30px;font-size:12px;color:#97a18b}
@media(min-width:1450px){main{padding-top:52px}.page-heading{margin-bottom:36px}.document-row{padding-top:23px;padding-bottom:23px}.empty-library{padding-top:55px;padding-bottom:48px}}
@media(max-width:1180px){.sidebar{width:196px}.workspace{margin-left:196px}main{padding:32px 28px}.topbar{padding:0 28px}.table-heading,.document-row{grid-template-columns:minmax(165px,1fr) 75px 93px 90px 90px;padding-left:15px;padding-right:15px;gap:6px}.document-name strong{max-width:220px}.upload-hint{display:none}.query-layout{grid-template-columns:minmax(0,1fr) 190px;gap:18px}.stats>div{padding:0 20px}.settings-grid{grid-template-columns:minmax(0,1fr) 250px}.query-controls{flex-wrap:wrap}.export-card{grid-template-columns:140px 1fr;padding:32px}}
@media(max-width:950px){.sidebar{width:176px;padding-left:10px;padding-right:10px}.workspace{margin-left:176px}.brand{margin-left:13px}.workspace-label{font-size:10px}.query-layout{grid-template-columns:1fr}.query-guide{display:none}.table-heading,.document-row{grid-template-columns:minmax(160px,1fr) 75px 100px 86px}.table-heading>span:nth-child(4),.document-row>.numbers{display:none}.settings-grid{grid-template-columns:1fr}.settings-grid>div{display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-grid>div .notice{margin:0}.document-name strong{max-width:195px}.top-actions{gap:10px}.local-state{display:none}.stats strong{font-size:23px}.stats small{margin-left:5px;font-size:9px}.upload-zone{padding:20px}.page-heading{align-items:flex-start}h1{font-size:25px}.filters .search-field input{width:120px}.section-toolbar{gap:8px}}
@media(max-width:700px){.sidebar{position:static;width:100%;padding:13px 18px;border-right:0;border-bottom:1px solid var(--line);display:block}.app-shell{display:block}.brand{margin:0;font-size:21px;gap:9px}.brand-symbol{width:32px;height:34px;font-size:20px;border-radius:9px}.brand small{display:none}.workspace-label,.sidebar-bottom,.nav-separator,.count{display:none}.sidebar nav{display:flex;margin-top:13px;gap:5px}.nav-item{justify-content:center;padding:9px 5px;gap:5px;font-size:11px;margin:0}.nav-icon{font-size:17px;width:17px}.workspace{margin:0}.topbar{height:49px;padding:0 19px}.breadcrumb{font-size:10px;gap:10px}.model-state{font-size:10px;padding:4px 7px}main{padding:26px 18px;min-height:60vh}.page-heading{gap:15px;flex-wrap:wrap;margin-bottom:22px}.page-heading>.button{min-height:34px;padding:6px 12px}h1{font-size:24px}.subtitle{font-size:11px;line-height:1.9;margin-top:8px}.eyebrow{font-size:8px}.stats{padding:16px 0}.stats>div{padding:0 12px}.stats strong{font-size:22px}.stats strong small{display:block;margin:5px 0 0;font-size:9px}.stats div>span{font-size:10px;margin-bottom:6px}.upload-zone{padding:17px;gap:12px;margin-bottom:25px}.upload-art{width:37px;height:41px}.upload-zone strong{font-size:12px}.upload-zone small{font-size:9px;line-height:1.9}.section-toolbar{flex-wrap:wrap}.filters{width:100%;justify-content:space-between}.search-field{flex:1}.search-field input{width:100%!important}.table-heading{display:none}.document-row{grid-template-columns:1fr 82px;gap:8px;padding:16px 12px}.document-name strong{max-width:210px;font-size:11px}.document-name{grid-column:1;grid-row:1/3;gap:8px}.document-row>.badge{grid-column:2;grid-row:1;justify-self:end}.document-row>.permission{grid-column:1;grid-row:3;padding-left:40px;font-size:9px}.document-row>.row-actions{grid-column:2;grid-row:2/4;justify-self:end}.empty-library{padding:30px 18px}.empty-library h2{font-size:16px}.empty-library p{font-size:11px}.app-footer{padding:15px 18px;font-size:8px}.app-footer>span:last-child{display:none}.library-footer{font-size:9px}.query-controls{padding:13px;gap:10px}.query-controls select{width:100%;max-width:none}.query-controls .segmented{width:100%}.segmented button{flex:1}.mode-description{padding:0 14px 12px}.conversation{padding:16px;max-height:600px}.chat-welcome{padding:25px 0}.chat-welcome h2{font-size:16px}.composer{margin:10px 12px 12px}.composer-footer>span{font-size:8px}.composer textarea{font-size:16px}.query-controls select,input[type=number],input[type=password]{font-size:16px}.settings-card,.usage-card{padding:22px}.settings-grid>div{display:block}.settings-grid>div .notice{margin-top:20px}.two-fields{gap:10px}.export-card{grid-template-columns:1fr;text-align:left;padding:25px}.package-art{font-size:80px;width:120px;margin:5px auto}.package-art span{font-size:25px;width:42px;height:42px;right:0}.export-card h2{font-size:21px}.export-summary{gap:18px;font-size:10px}.export-summary strong{font-size:17px}.dialog-header{padding:20px 18px 12px}.dialog-header h2{font-size:16px}.preview-meta{padding-left:18px;padding-right:18px}.preview-body{padding:12px 18px;max-height:45vh}.preview-warnings{padding:0 18px}.dialog-footer{padding:16px 18px}.cloud-check{font-size:11px}.dialog-actions{flex-wrap:wrap}.library-footer .text-button{font-size:11px}.stats{border-radius:7px}.chat-panel{min-height:550px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Keep conversational answers continuous; citations and diagnostics expand on demand. */
.answer-prose p{font-size:14px;line-height:1.95;margin:0 0 15px;color:#344f45;white-space:pre-wrap}
.answer-prose p:last-child{margin-bottom:6px}
.paragraph-sources{display:inline;white-space:normal;margin-left:4px}
.source-link{display:inline;padding:2px 3px;font-size:10px;line-height:1;vertical-align:super;color:#688b78;border-radius:3px}
.source-link:hover{background:#e8f1e8;color:#28695e}
.answer details.answer-sources{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:12px 0 0;margin-top:16px}
.answer details.answer-process{background:transparent;border:0;padding:5px 0;margin-top:9px}
.answer-process>summary{font-size:10px;color:#91a08b}
.answer-process>p{font-size:11px;color:#81917b}
.answer .citation-entry{scroll-margin:12px}
.prompt-card{max-width:1000px;margin-top:26px}.prompt-heading{display:flex;align-items:start;justify-content:space-between;gap:18px}.prompt-heading h2{margin-bottom:12px}.prompt-heading .field-help{margin:0 0 16px}.prompt-heading>span{font-size:11px;color:#7f9378;flex-shrink:0}.prompt-card fieldset{border:0;padding:0;margin:0;min-width:0}.prompt-editor label{font-size:13px;margin:16px 0 10px}.prompt-editor label small{font-size:11px;color:#87967f;font-weight:400}.prompt-editor textarea{width:100%;min-height:150px;max-height:650px;resize:vertical;border:1px solid #dce5d8;border-radius:6px;background:#fcfdfb;padding:14px;font-size:13px;line-height:1.85;tab-size:2}.prompt-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:5px 0 16px;font-size:10px;color:#91a088}.prompt-extra{border-top:1px solid var(--line);padding:15px 0}.prompt-extra>summary{cursor:pointer;font-size:12px;color:#527361}.prompt-rules p{font-size:11px;color:#87967f;margin-top:12px}.prompt-rules pre{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.85 inherit;color:#87967f}.prompt-actions{margin-top:20px;flex-wrap:wrap}.prompt-actions>span{font-size:10px;color:#91a088}@media(max-width:700px){.prompt-heading{flex-direction:column;gap:0}.prompt-heading>span{margin-bottom:15px}.prompt-editor textarea{font-size:16px}.prompt-editor-footer .text-button{font-size:11px}}

.settings-card label.supplement-setting{display:flex;flex-direction:row;align-items:flex-start;gap:12px;font-size:13px}.supplement-setting input[type=checkbox]{width:18px;min-width:18px;height:18px;margin:3px 0;accent-color:var(--green)}.supplement-setting small{display:block;font-size:11px;line-height:1.9;color:#8b9982;margin-top:7px}.supplement-block{border:1px solid #e4ddc9;background:#fbfaf4;border-radius:7px;padding:15px 17px;margin:17px 0}.supplement-block>strong{font-size:12px;color:#8c763c}.answer .supplement-block p{font-size:13px;line-height:1.9}.answer .supplement-block .supplement-note{font-size:10px;color:#9c9278;margin:5px 0 11px}

.supplement-marker{color:var(--muted);font-size:10px;margin-left:2px;cursor:help}.answer>.supplement-note{color:var(--muted);font-size:11px;line-height:1.6;margin:6px 0 14px}
.activity-filters{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.activity-filters input,.activity-filters select{padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font:inherit}.activity-filters input{flex:1;min-width:180px}.activity-list{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:white}.activity-row{padding:20px 24px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.activity-row:last-child{border-bottom:0}.activity-row-top,.activity-row-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px}.activity-row-bottom{margin-top:12px}.history-question{display:block;background:none;border:0;text-align:left;color:var(--ink);font:inherit;font-weight:600;line-height:1.7;padding:10px 0;cursor:pointer;overflow-wrap:anywhere}.history-question:hover{color:var(--green)}.activity-badge{padding:4px 8px;border-radius:5px;background:var(--soft);white-space:nowrap}.activity-badge.warning{background:#fff3df;color:#966324}.activity-badge.error{background:#fff0ed;color:var(--red)}.activity-row pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;color:var(--muted);margin:8px 0}.activity-empty{padding:48px;text-align:center;color:var(--muted)}.activity-pager{display:flex;align-items:center;justify-content:center;gap:20px;margin:20px 0;font-size:13px;color:var(--muted)}.activity-detail{padding:0 24px 24px;overflow-wrap:anywhere}#history-dialog{width:min(850px,94vw)}#history-answer .answer{padding:16px 0}#history-question{line-height:1.7}.activity-filters .danger{margin-left:auto}

.library-switcher{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 42px;border-bottom:1px solid var(--line);background:#fff}.library-switcher label{font-size:12px;color:var(--muted)}.library-switcher select{max-width:300px;min-width:170px;padding:8px 12px;border:1px solid var(--line);border-radius:6px;background:#fff}.library-switcher>span{font-size:11px;color:var(--muted)}.library-welcome{padding:60px 42px}.library-welcome h1{font-size:26px;margin-bottom:12px}.library-welcome p{color:var(--muted)}.query-library-target{padding:14px 22px 0;color:var(--muted);font-size:12px}.query-library-target strong{color:var(--green)}#library-form label{display:block;margin:15px 0 7px}#library-name{box-sizing:border-box;width:100%;border:1px solid var(--line);border-radius:6px;padding:10px}#library-form-error{color:var(--red);margin:10px 0}#library-form .dialog-actions{margin-top:18px}@media(max-width:680px){.library-switcher{padding:14px 18px;gap:8px}.library-switcher>span{width:100%}.library-switcher select{min-width:130px;max-width:200px}.library-welcome{padding:35px 18px}}
.history-field{margin-top:16px}.history-label{font-size:12px;font-weight:600;color:var(--green);line-height:1.8}.history-label span{display:inline-block;font-weight:400;color:#687567;margin-left:8px}.history-field .history-question{padding:4px 0}.history-text{margin:4px 0 0;white-space:pre-wrap;line-height:1.8;font-size:14px;overflow-wrap:anywhere}.history-processed{color:#526c60}.history-actions{display:flex;gap:16px;flex-wrap:wrap;justify-content:flex-end}

.query-user-form{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 20px;margin-bottom:20px;background:var(--paper);border:1px solid var(--line);border-radius:10px}.query-user-form label{font-size:13px;font-weight:600}.query-user-form input{flex:1;min-width:150px;max-width:300px;padding:9px 12px;border:1px solid var(--line);border-radius:6px}.query-user-form>span{color:var(--green);overflow-wrap:anywhere;max-width:100%}.query-user-form>p{width:100%;color:var(--muted);font-size:12px}.restored-context{padding:12px 20px;color:var(--muted);font-size:12px}.restored-answer{white-space:pre-wrap}

/* Local administrator access */
.login-panel { display: none; min-height: 100vh; padding: 48px 20px; place-items: center; background: #f4f6f2; }
.auth-locked .app-shell { display: none; }
.auth-locked .login-panel { display: grid; }
.login-card { width: min(100%, 450px); padding: 38px; border: 1px solid #e2e7df; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px #23453b08; }
.login-card h1 { font-size: 26px; margin: 16px 0; }
.login-card p { line-height: 1.7; color: #75837d; }
.login-card label, .admin-editor > label, #password-form > label { display: block; margin: 18px 0 8px; }
.login-card input, .admin-editor > input, .admin-editor > select, #password-form > input { width: 100%; padding: 12px; border: 1px solid #dce3dc; border-radius: 8px; font: inherit; background: white; }
.login-card .button { width: 100%; margin-top: 12px; }
.form-error { color: #a54d32 !important; min-height: 1.3em; }
.normal-admin [data-super-only] { display: none !important; }
.admins-dialog { width: min(760px, 94vw); padding: 28px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e3e8e2; padding: 16px 0; gap: 16px; }
.admin-row span { display: block; color: #75837d; font-size: 13px; margin-top: 6px; }
.admin-editor { margin-top: 24px; border-top: 1px solid #e3e8e2; padding-top: 20px; }
.admin-editor fieldset { border: 1px solid #dce3dc; border-radius: 8px; margin: 20px 0; padding: 16px; }
.admin-grant { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.admin-enabled input { margin-right: 8px; }
#admin-new { margin-top: 20px; }
#account-button { max-width: 260px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .login-card { padding: 26px; } .top-actions { flex-wrap: wrap; } }

.query-http-help { margin: 0 22px 16px; padding: 12px 16px; background: #f3f6f2; border-radius: 8px; color: #63796d; font-size: 12px; }
.query-http-help summary { cursor: pointer; }
.query-http-help p { margin-top: 8px; }
.query-http-help pre { white-space: pre-wrap; overflow-wrap: anywhere; color: #243b38; }
.library-identity{display:flex;align-items:center;gap:8px;max-width:100%;min-width:0}.library-identity label{white-space:nowrap}.library-identity input{width:34ch;min-width:0;max-width:100%;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:#f6f8f4;color:var(--ink);font:12px ui-monospace,SFMono-Regular,Consolas,monospace}.library-identity button{white-space:nowrap;flex-shrink:0}@media(max-width:680px){.library-identity{width:100%}.library-identity input{flex:1;width:0}}


/* Library-scoped usage statistics, rendered without external chart libraries. */
.statistics-note{padding:14px 18px;background:var(--soft);border-radius:8px;color:var(--muted);font-size:12px;line-height:1.8;margin-bottom:20px}
.statistics-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}
.statistics-card,.statistics-panel{background:white;border:1px solid var(--line);border-radius:12px;padding:24px}
.statistics-card>span{font-size:13px;color:var(--muted)}.statistics-card>strong{display:block;font-size:30px;color:var(--green);margin:12px 0;font-weight:600}.statistics-card>small{display:block;font-size:11px;line-height:1.7;color:var(--muted)}
.statistics-panels{display:grid;grid-template-columns:3fr 2fr;gap:20px;margin-bottom:20px}.statistics-panel h2{font-size:16px;margin-bottom:12px}
.statistics-status{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px}.statistics-status>b{font-weight:500}.statistics-status:last-child{border:0}
@media(max-width:1100px){.statistics-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.statistics-panels{grid-template-columns:1fr}}
@media(max-width:600px){.statistics-cards{grid-template-columns:1fr 1fr;gap:10px}.statistics-card,.statistics-panel{padding:16px}.statistics-card>strong{font-size:24px}}

.statistics-panel{min-width:0}.statistics-chart{overflow-x:auto;margin-top:16px}.trend-chart{display:block;width:100%;min-width:460px;height:auto}.trend-grid{stroke:var(--line);stroke-width:1}.trend-axis{fill:var(--muted);font-size:13px}.trend-line{fill:none;stroke:var(--green);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.trend-dot{fill:white;stroke:var(--green);stroke-width:2;vector-effect:non-scaling-stroke}.trend-hit{fill:transparent}.trend-point{cursor:pointer;outline:none}.trend-point:hover .trend-dot,.trend-point:focus .trend-dot,.trend-point.selected .trend-dot{fill:var(--green);stroke-width:4}.trend-value{fill:var(--ink);font-size:13px;font-weight:600;pointer-events:none}.trend-readout{font-size:12px;color:var(--muted);min-height:24px;margin-top:8px}

button.statistics-status{width:100%;text-align:left;border-radius:4px;color:var(--ink)}button.statistics-status:hover{background:var(--soft);color:var(--green)}button.statistics-status b>span{margin-left:8px;color:var(--muted)}#history-statistics-scope{display:flex;align-items:center;gap:16px;flex-wrap:wrap}#history-statistics-scope.hidden{display:none}#history-statistics-label{flex:1;min-width:220px}

.batch-body{overflow:auto;padding:0 28px;min-height:80px;max-height:45vh}.batch-document{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line)}.batch-document>div{min-width:0}.batch-document strong{display:block;overflow-wrap:anywhere;font-size:14px}.batch-document small{display:block;color:var(--muted);margin-top:6px;font-size:12px}.batch-document button{flex-shrink:0}.batch-warning,#batch-results{font-size:12px;line-height:1.7;color:#996a39;overflow-wrap:anywhere}#batch-results p{margin:14px 0}#batch-error{margin:0 0 12px;overflow-wrap:anywhere}@media(max-width:700px){.batch-body{padding:0 18px}.batch-document{gap:10px}.batch-document strong{font-size:12px}}

.import-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0}
#paste-text-dialog{width:min(820px,94vw)}
.paste-text-body{padding:0 28px;max-height:65vh;overflow-y:auto}
.paste-text-body label{display:block;margin:18px 0 8px;font-weight:600}
.paste-text-body input,.paste-text-body textarea{width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit}
.paste-text-body textarea{resize:vertical;min-height:180px;line-height:1.7}
@media(max-width:600px){.import-actions{width:100%}.paste-text-body{padding:0 16px}}
