:root{font-family:Manrope,Inter,Roboto,Helvetica Neue,sans-serif;line-height:1.5;font-weight:400;color-scheme:light;background-color:#fff;color:#191512;--sidebar-bg: oklch(.995 .002 70);--input-bg: oklch(.96 .005 70);--surface-2: oklch(.965 .005 70);--border-color: oklch(.92 .006 70);--border-strong: oklch(.85 .008 70);--text-muted: oklch(.55 .012 65);--ink: oklch(.18 .01 60);--ink-soft: oklch(.3 .01 60);--brand: oklch(.7 .17 55);--brand-strong: oklch(.62 .19 50);--brand-soft: oklch(.97 .035 65);--brand-border: oklch(.88 .08 55);--brand-ink: oklch(.42 .14 50);--semantic-positive: oklch(.56 .1 155);--semantic-positive-soft: oklch(.97 .025 155);--semantic-warn: oklch(.68 .13 55);--semantic-warn-soft: oklch(.97 .04 65);--accent-black: oklch(.18 .01 60);--accent-blue: oklch(.55 .16 245)}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}*{box-sizing:border-box;margin:0;padding:0}body{margin:0;display:flex;min-width:320px;min-height:100vh}#root{display:flex;flex:1;width:100%}button{border:none;background:none;font-family:inherit;cursor:pointer;transition:opacity .2s ease,background-color .2s ease}button:hover{opacity:.8}input,textarea{font-family:inherit;border:none;outline:none;background:transparent}a{color:var(--accent-blue);text-decoration:none}a:hover{text-decoration:underline}.app{display:flex;width:100vw;height:100vh;overflow:hidden}.sidebar{width:264px;background-color:var(--sidebar-bg);border-right:1px solid oklch(.945 .004 70);display:flex;flex-direction:column;padding:16px;transition:width .2s ease,padding .2s ease,border-color .2s ease;overflow:hidden}.sidebar.collapsed{width:0;padding-left:0;padding-right:0;border-right-color:transparent}.collapsed-rail{position:fixed;top:0;left:0;bottom:0;width:60px;display:flex;flex-direction:column;align-items:center;padding:10px 0;gap:4px;background:var(--sidebar-bg);border-right:1px solid oklch(.945 .004 70);z-index:40}.rail-btn{width:36px;height:36px;border-radius:8px;color:var(--ink-soft);display:inline-flex;align-items:center;justify-content:center}.rail-btn:hover{background:#e8e4e0}.rail-btn.active{background:#e3dfda;color:var(--ink)}.rail-divider{width:24px;height:1px;background:var(--border-color);margin:6px 0}.sidebar-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.sidebar-logo{font-weight:600;font-size:.9rem;display:flex;align-items:center;gap:6px;color:#111}.new-chat-btn{display:flex;align-items:center;justify-content:center;gap:8px;background-color:#fff;color:#111;padding:10px 16px;border-radius:999px;border:1px solid var(--border-color);font-weight:500;font-size:.85rem;margin-bottom:24px;box-shadow:0 1px 2px #00000005}.new-chat-btn:hover{background-color:#f7f7f7}.new-item-btn{display:flex;align-items:center;gap:10px;width:100%;padding:4px 10px;border-radius:8px;font-size:13px;font-weight:400;color:var(--ink-soft);background:transparent;text-align:left;margin-bottom:8px}.new-item-btn:hover{background-color:#e8e4e0;color:var(--ink)}.new-item-btn-icon{width:20px;height:20px;color:var(--ink-soft);display:flex;align-items:center;justify-content:center;flex-shrink:0}.list-group{display:flex;flex-direction:column;gap:2px}.list-group-header{font-size:10px;font-weight:600;text-transform:uppercase;color:var(--text-muted);letter-spacing:.08em;padding:14px 4px 8px}.list-group:first-child .list-group-header{padding-top:4px}.chat-list{flex:1;overflow-y:auto;scrollbar-gutter:stable;display:flex;flex-direction:column;gap:2px}.chat-item{color:var(--ink-soft);padding:4px 10px;border-radius:8px;font-size:13px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:8px}.chat-item:hover{background-color:#e8e4e0;color:var(--ink)}.chat-item.active{background-color:#e3dfda;color:var(--ink);font-weight:500}.chat-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.delete-btn{opacity:0;transition:opacity .15s;color:var(--text-muted);display:flex;align-items:center;padding:4px;border-radius:4px}.chat-item:hover .delete-btn{opacity:1}.delete-btn:hover{color:#d32f2f;background:#d32f2f14}.sidebar-footer{margin-top:auto;padding:5px 0 2px;position:relative;border-top:1px solid oklch(.945 .004 70)}.user-profile-btn{display:flex;align-items:center;gap:10px;width:100%;padding:6px 10px;border-radius:10px;cursor:pointer;transition:background .12s}.user-profile-btn:hover{background:#e8e4e0}.user-avatar{width:28px;height:28px;border-radius:50%;background:#d97451;color:#fff;font-size:.72rem;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;letter-spacing:.03em}.user-info{display:flex;flex-direction:column;min-width:0}.user-name{font-size:.85rem;font-weight:400;color:#111;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-menu-popup{position:absolute;bottom:calc(100% - 4px);left:0;right:0;background:#fff;border:1px solid #e8e8e8;border-radius:10px;box-shadow:0 4px 16px #00000014;padding:4px;z-index:50}.user-menu-item{display:flex;align-items:center;gap:8px;width:100%;padding:9px 12px;border-radius:7px;font-size:.85rem;color:#222;cursor:pointer;transition:background .1s}.user-menu-item:hover{background:#f5f5f5}.icon-btn{color:var(--text-muted);display:flex;align-items:center;justify-content:center;padding:6px;border-radius:50%}.icon-btn:hover{background-color:#e8e4e0;color:var(--ink)}.main{flex:1;display:flex;flex-direction:column;background-color:#fffefd;min-width:0;position:relative}.chat-header{height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:none;flex-shrink:0}.chat-header-title{font-size:13px;font-weight:500;color:var(--ink);letter-spacing:-.005em;line-height:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;margin-right:12px}.chat-top-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}.chat-top-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:28px;padding:0 12px;border-radius:8px;border:1px solid var(--border-color);background:#fff;color:var(--ink);font-size:12px;font-weight:500;cursor:pointer;transition:background .12s,border-color .12s}.chat-top-btn:hover{border-color:var(--border-strong);background:var(--surface-2)}.chat-top-btn.icon-only{width:28px;padding:0;color:var(--ink-soft)}.chat-top-btn.icon-only:hover{color:var(--ink)}body:has(.sidebar.collapsed) .chat-header,body:has(.sidebar.collapsed) .chat-hero{padding-left:84px}body:has(.sidebar.collapsed) .messages,body:has(.sidebar.collapsed) .input-area{padding-left:84px}.chat-hero{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px}.chat-hero-title{font-size:1.5rem;font-weight:400;color:#111;margin-bottom:28px;text-align:center}.chat-hero-box{width:100%;max-width:720px;background:#fff;border:1px solid var(--border-color);border-radius:20px;padding:14px 16px;box-shadow:0 2px 8px #0000000a}.chat-hero-input{width:100%;border:none;outline:none;font-size:.95rem;line-height:1.6;color:#111;resize:none;font-family:inherit;background:transparent}.chat-hero-toolbar{display:flex;justify-content:space-between;align-items:center;margin-top:8px}.chat-hero-tools{display:flex;gap:2px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:12px;color:var(--text-muted)}.empty-state h2{color:#555;font-size:1.4rem;font-weight:500}.empty-state p{font-size:.9rem}.primary-btn{display:flex;align-items:center;gap:8px;background-color:#fff;color:#111;padding:10px 20px;border-radius:999px;border:1px solid var(--border-color);font-weight:500;font-size:.85rem;box-shadow:0 1px 2px #00000005}.primary-btn:hover{background-color:#f7f7f7}.messages{flex:1;overflow-y:auto;padding:24px 24px 40px;display:flex;flex-direction:column;align-items:center}.messages-inner{width:100%;max-width:800px;display:flex;flex-direction:column;gap:24px}.message{display:flex;gap:16px;max-width:800px;width:100%}.message.user{flex-direction:row-reverse;scroll-margin-top:64px}.message-bubble-wrapper{max-width:85%}.message-bubble{font-size:.95rem;line-height:1.5;padding:12px 16px;border-radius:12px;white-space:pre-wrap;overflow-wrap:break-word}.message.user .message-bubble{background-color:#ece9e5;color:var(--ink);border:none;padding:8px 14px;border-radius:16px}.message.ai .message-bubble{background-color:transparent;color:#111;padding:12px 0;white-space:normal}.message-bubble.loading{color:#666;font-style:italic}.status-text{color:var(--text-muted);font-style:italic}.message-actions{display:flex;gap:2px;margin-top:4px}.message-action{position:relative;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;color:#999;background:transparent;cursor:pointer;transition:color .12s,background .12s}.message-action:hover{color:#333;background:#f0f0f0}.message-action:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 4px);left:50%;transform:translate(-50%);padding:3px 8px;background:#333;color:#fff;font-size:11px;border-radius:5px;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .12s}.message-action:hover:after{opacity:1}.messages-loading{display:flex;justify-content:center;align-items:center;padding:48px 0}.thinking-dots{display:inline-flex;gap:3px;margin-left:4px;vertical-align:middle}.thinking-dot{display:inline-block;width:4px;height:4px;border-radius:50%;background:var(--text-muted);animation:thinking-bounce 1.2s ease-in-out infinite}.thinking-dot:nth-child(2){animation-delay:.15s}.thinking-dot:nth-child(3){animation-delay:.3s}@keyframes thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-5px);opacity:1}}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:.75em;margin-bottom:.25em;font-weight:600;line-height:1.35}.markdown-body h1{font-size:1.2em}.markdown-body h2{font-size:1.1em}.markdown-body h3{font-size:1em}.markdown-body h4,.markdown-body h5,.markdown-body h6{font-size:.95em}.markdown-body>:first-child{margin-top:0}.markdown-body p{margin:.6em 0}.markdown-body p:first-child{margin-top:0}.markdown-body p:last-child{margin-bottom:0}.markdown-body ul,.markdown-body ol{margin:.5em 0;padding-left:1.4em}.markdown-body li{margin:0;line-height:1.5;padding:0}.markdown-body li>p,.markdown-body li>p:first-child,.markdown-body li>p:last-child{margin:0!important;padding:0}.markdown-body li+li{margin-top:.3em}.markdown-body li>ul,.markdown-body li>ol{margin:.1em 0 0}.markdown-body strong{font-weight:600}.markdown-body em{font-style:italic}.markdown-body code{background:#0000000d;padding:2px 5px;border-radius:4px;font-size:.88em;font-family:SF Mono,Fira Code,monospace}.markdown-body pre{background:#f5f5f5;border-radius:8px;padding:12px 16px;overflow-x:auto;margin:.5em 0}.markdown-body pre code{background:none;padding:0;font-size:.85em}.markdown-body blockquote{border-left:3px solid #ddd;padding-left:12px;color:#555;margin:.35em 0}.markdown-body a{color:var(--brand-ink)}.markdown-body a:hover{color:var(--brand);text-decoration:underline}.markdown-body hr{border:none;border-top:1px solid var(--border-color);margin:.5em 0}.markdown-body h2+p,.markdown-body h3+p,.markdown-body h2+ul,.markdown-body h3+ul,.markdown-body h2+ol,.markdown-body h3+ol{margin-top:.15em}.markdown-body p+ul,.markdown-body p+ol{margin-top:.3em}.markdown-body ul+p,.markdown-body ol+p{margin-top:.5em}.research-card{border:1px solid #e6e6e6;border-radius:14px;background:#fafafa;padding:16px}.research-label{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.05em;margin-bottom:10px}.research-content{font-size:.95rem;line-height:1.6;white-space:pre-wrap;overflow-wrap:break-word;margin-bottom:12px}.sources-card{margin-top:14px;padding:12px 14px;border:1px solid #e6e6e6;border-radius:14px;background:#fafafa}.sources-label{font-size:11px;font-weight:600;color:#888;text-transform:uppercase;margin-bottom:8px}.sources-list{display:flex;flex-direction:column;gap:6px}.source-link{font-size:.85rem;color:var(--accent-blue);display:flex;align-items:center;gap:6px}.source-link:hover{text-decoration:underline}.confidence{font-size:10px;padding:1px 6px;border-radius:3px;font-weight:500}.confidence.high{background:#d4edda;color:#155724}.confidence.medium{background:#fff3cd;color:#856404}.confidence.low{background:#f8d7da;color:#721c24}.clarify-card{width:100%;max-width:800px;background:#fff;border:1px solid var(--border-color);border-radius:14px;padding:14px 18px;margin-bottom:8px}.clarify-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.clarify-card-title{font-size:11px;font-weight:600;text-transform:uppercase;color:#888;letter-spacing:.05em}.clarify-question{font-size:.9rem;font-weight:500;color:#111;line-height:1.5}.clarify-progress{font-size:11px;color:var(--text-muted)}.error-text{color:#a12626;font-size:.85rem;text-align:center;padding:12px 16px;background-color:#faf2f2;border:1px solid #ead2d2;border-radius:12px;max-width:800px;width:100%}.input-area{padding:0 24px 16px;display:flex;flex-direction:column;align-items:center}.input-box{width:100%;max-width:720px;background-color:#fff;border-radius:20px;padding:8px 12px;display:flex;flex-direction:row;align-items:flex-end;gap:4px;border:1px solid var(--border-color);transition:border-color .2s ease}.input-box:focus-within{border-color:var(--border-strong)}.input-toolbar-left{display:flex;align-items:center;gap:2px;flex-shrink:0}.tool-toggle{position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;color:var(--text-muted);transition:all .15s}.tool-toggle:hover{background:#e8e4e0;color:var(--ink)}.tool-toggle.active{background:var(--ink);color:#fff}.tool-toggle:disabled{opacity:.4;cursor:not-allowed}.tool-toggle:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);padding:4px 10px;background:#333;color:#fff;font-size:12px;border-radius:6px;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s}.tool-toggle:hover:after{opacity:1}.chat-input{flex:1;min-width:0;height:32px;min-height:32px;max-height:200px;overflow-y:auto;resize:none;font-size:.95rem;line-height:24px;color:#111;padding:4px 6px}.send-btn{background-color:var(--ink);color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;opacity:.5;cursor:not-allowed;flex-shrink:0}.send-btn.active{opacity:1;cursor:pointer}.send-btn.active:hover{opacity:.8}.stop-btn{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f3f3f3;color:#111;border:1px solid #dddddd;flex-shrink:0}.stop-btn:hover{background:#ebebeb}.pending-attachment{display:flex;align-items:center;gap:8px;width:100%;max-width:720px;padding:8px 12px;background:#f7f7f7;border:1px solid var(--border-color);border-radius:12px;margin-bottom:6px;font-size:.85rem;color:#333}.pending-attachment-thumb{width:32px;height:32px;object-fit:cover;border-radius:6px;flex-shrink:0}.pending-attachment-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pending-attachment-remove{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;color:#999;flex-shrink:0}.pending-attachment-remove:hover{background:#0000000f;color:#333}.pending-attachment.hero{max-width:none;margin-bottom:8px}.attachment-badges{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}.attachment-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;background:#f0f0f0;border:1px solid #e4e4e4;border-radius:8px;font-size:.8rem;color:#555}.attachment-badge-name{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-disclaimer{font-size:11px;color:#9a9a9a;text-align:center;margin-top:8px}.auth-page{display:flex;align-items:center;justify-content:center;min-height:100vh;width:100%;background:#fff}.auth-card{width:380px;padding:32px}.auth-logo{display:flex;align-items:center;gap:8px;font-weight:600;font-size:1rem;color:#111;margin-bottom:24px}.auth-card h1{font-size:1.2rem;font-weight:600;margin-bottom:4px}.auth-copy{font-size:.85rem;color:var(--text-muted);margin-bottom:24px}.auth-field{margin-bottom:14px}.auth-field label{display:block;font-size:.8rem;font-weight:500;margin-bottom:4px;color:#444}.auth-field input{width:100%;padding:10px 14px;border:1px solid var(--border-color)!important;border-radius:10px;font-size:.9rem;background:#fff}.auth-field input:focus{border-color:#ccc!important}.auth-error{color:#d32f2f;font-size:.8rem;margin-bottom:10px}.auth-btn{width:100%;padding:10px;background:var(--ink);color:#fff;border-radius:10px;font-size:.9rem;font-weight:500;margin-top:4px}.auth-btn:hover{background:#090503}.auth-btn:disabled{opacity:.6;cursor:not-allowed}.sidebar-header-actions{display:flex;align-items:center;gap:4px}@keyframes suggestion-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes suggestion-modal-in{0%{opacity:0;transform:scale(.96) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}.suggestion-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000040;display:flex;align-items:center;justify-content:center;z-index:200;animation:suggestion-overlay-in .18s ease-out}.suggestion-modal{background:#fff;border-radius:16px;width:90%;max-width:480px;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 4px 24px #0000001a;animation:suggestion-modal-in .2s ease-out}.suggestion-modal-header{display:flex;justify-content:space-between;align-items:center;padding:18px 20px 14px}.suggestion-modal-header h2{font-size:15px;font-weight:600;margin:0;color:#111}.suggestion-modal-body{padding:0 20px 20px;overflow-y:auto;flex:1}.suggestion-form{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.suggestion-input{padding:10px 14px;border:1px solid var(--border-color, #e5e5e5);border-radius:10px;font-size:13px;outline:none;font-family:inherit;background:var(--sidebar-bg, #fafafa);transition:border-color .15s ease}.suggestion-input:focus{border-color:#bbb}.suggestion-textarea{padding:10px 14px;border:1px solid var(--border-color, #e5e5e5);border-radius:10px;font-size:13px;resize:vertical;min-height:80px;outline:none;font-family:inherit;background:var(--sidebar-bg, #fafafa);transition:border-color .15s ease}.suggestion-textarea:focus{border-color:#bbb}.suggestion-submit-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 20px;background:#fff;color:#111;border:1px solid var(--border-color, #e5e5e5);border-radius:999px;font-size:13px;font-weight:500;font-family:inherit;cursor:pointer;transition:background-color .15s ease,opacity .15s ease;align-self:flex-end}.suggestion-submit-btn:hover:not(:disabled){background-color:#f5f5f5}.suggestion-submit-btn:disabled{opacity:.4;cursor:not-allowed}.suggestion-history{border-top:1px solid var(--border-color, #e8e8e8);padding-top:16px}.suggestion-history-title{font-size:11px;font-weight:600;color:#999;text-transform:uppercase;letter-spacing:.04em;margin-bottom:10px}.suggestion-history-item{padding:10px 12px;border:1px solid var(--border-color, #e8e8e8);border-radius:10px;margin-bottom:8px}.suggestion-history-name{font-size:13px;font-weight:500;color:#222;margin-bottom:4px}.suggestion-history-body{font-size:12px;color:#666;line-height:1.5}
