:root{--bg:#f6f7f9;--surface:#fff;--text:#1c1f24;--muted:#5f6672;--border:#dde1e6;--accent:#1f5fbf;--accent-text:#fff;--user-bg:#1f5fbf;--error-bg:#fdecec;--error-text:#9b1c1c;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}@media (prefers-color-scheme:dark){:root{--bg:#15171b;--surface:#1f2228;--text:#e6e8eb;--muted:#9aa1ac;--border:#343841;--accent:#5b9bf0;--accent-text:#0d1117;--user-bg:#2f6fd0;--error-bg:#3a1d1d;--error-text:#f4b4b4}}*{box-sizing:border-box}body{background:var(--bg);margin:0}.app{flex-direction:column;max-width:820px;height:100dvh;margin:0 auto;display:flex}header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;display:flex}h1{margin:0;font-size:1.15rem}select,textarea,button{font:inherit;color:inherit}select{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px 8px}.messages{flex-direction:column;flex:1;gap:12px;padding:16px;display:flex;overflow-y:auto}.empty{text-align:center;color:var(--muted);margin:auto}.examples{flex-direction:column;gap:8px;margin-top:12px;display:flex}.examples button{background:var(--surface);border:1px solid var(--border);cursor:pointer;text-align:left;border-radius:8px;padding:8px 12px}.examples button:hover{border-color:var(--accent)}.msg{border-radius:12px;max-width:90%;padding:10px 14px;line-height:1.5}.msg p{white-space:pre-wrap;margin:0}.msg.user{background:var(--user-bg);color:#fff;align-self:flex-end}.msg.assistant{background:var(--surface);border:1px solid var(--border);align-self:flex-start}.msg.error{background:var(--error-bg);color:var(--error-text);align-self:flex-start}.typing{color:var(--muted);font-style:italic}.cite{text-align:center;vertical-align:super;background:var(--accent);min-width:1.3em;color:var(--accent-text);border-radius:4px;margin:0 1px;padding:0 4px;font-size:.75em;line-height:1.4;text-decoration:none;display:inline-block}.sources{margin-top:10px;font-size:.9rem}.sources summary{cursor:pointer;color:var(--muted)}.sources ol{flex-direction:column;gap:8px;margin:8px 0 0;padding:0;list-style:none;display:flex}.sources li{border-top:1px solid var(--border);padding-top:8px;scroll-margin-top:16px}.sources li:target{outline:2px solid var(--accent);outline-offset:4px;border-radius:4px}.src-head{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.src-n{color:var(--accent);font-weight:600}.src-title{font-weight:600}.src-page,.src-path{color:var(--muted);font-size:.85em}.src-snippet{color:var(--muted);margin-top:4px!important}.composer{border-top:1px solid var(--border);gap:8px;padding:12px 16px 16px;display:flex}.composer textarea{resize:none;border:1px solid var(--border);background:var(--surface);border-radius:8px;flex:1;min-height:42px;max-height:160px;padding:10px 12px}.composer button{background:var(--accent);color:var(--accent-text);cursor:pointer;border:none;border-radius:8px;padding:0 18px}.composer button:disabled{opacity:.5;cursor:default}
