@font-face{font-family:Public Sans;src:url(/static/fonts/PublicSans-Light.ttf)format("truetype");font-weight:300}@font-face{font-family:Public Sans;src:url(/static/fonts/PublicSans-Bold.ttf)format("truetype");font-weight:700}@font-face{font-family:Bricolage Grotesque;src:url(/static/fonts/BricolageGrotesque-ExtraBold.ttf)format("truetype");font-weight:800}:root{--background:#f5f0ea;--surface:#fff;--text:#000;--muted:#535353;--border:#bdbdbd;--yellow:#f1d962;--gold:#d5b83f;--green:#37917b;--red:#7c424c;color:var(--text);background:var(--background);font-family:Public Sans,system-ui,sans-serif;font-weight:300}*{box-sizing:border-box}body{background:var(--background);min-width:320px;min-height:100vh;margin:0}button,input,select,textarea{font:inherit}a{color:inherit}h1,h2{margin:0;font-family:Bricolage Grotesque,Public Sans,sans-serif;line-height:1.06}h1{font-size:38px}h2{font-size:26px}.app-shell{min-height:100vh}.topbar{justify-content:space-between;align-items:center;gap:28px;padding:22px 44px;display:flex}.brand{font-family:Bricolage Grotesque,sans-serif;font-size:24px;text-decoration:none}.topbar nav{gap:18px;margin-right:auto;display:flex}.topbar nav a{color:var(--muted);text-decoration:none}.topbar-actions{align-items:center;gap:10px;display:flex}.button{background:var(--yellow);color:var(--text);cursor:pointer;border:0;border-radius:26px;min-height:39px;padding:11px 22px;font-weight:700}.button:hover{background:var(--gold)}.button:disabled{cursor:wait;opacity:.6}.button-muted{background:var(--green);color:#fff}.button-history{background:var(--text);color:var(--surface)}.button-history:hover{background:#2d2925}.field{flex-direction:column;gap:8px;display:flex}.field span,.radio-group>span{color:var(--muted);font-size:14px;font-weight:700}input,select,textarea{background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:8px;width:100%;min-height:50px;padding:13px 16px}textarea{resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--text);outline:1px solid var(--text)}.error{color:var(--red);font-size:14px}.success{color:var(--green);font-size:14px}.login-page{justify-content:center;align-items:center;min-height:100vh;padding:72px clamp(24px,6vw,72px);display:flex}.login-container{grid-template-columns:minmax(280px,1fr) minmax(320px,520px);align-items:center;gap:48px;width:100%;max-width:1100px;display:grid}.login-copy p{max-width:640px;font-size:30px;line-height:1.14}.login-panel,.upload-panel,.side-panel,.chat-panel,.document-list{background:var(--surface);border-radius:10px;padding:32px}.login-panel{flex-direction:column;gap:20px;display:flex}.workspace,.documents-layout{grid-template-columns:340px minmax(0,1fr);gap:24px;padding:24px 44px 52px;display:grid}.chat-workspace{grid-template-columns:340px minmax(0,1fr);align-items:stretch;height:calc(100vh - 92px);min-height:0;overflow:hidden}.chat-workspace-history-open{grid-template-columns:340px minmax(0,1fr) minmax(280px,340px)}.chat-sidebar{flex-direction:column;gap:24px;height:100%;min-height:0;display:flex;overflow:hidden}.side-panel,.upload-panel{flex-direction:column;gap:18px;display:flex}.prompt-panel,.sources-panel{min-height:0;overflow:hidden}.prompt-panel{flex:none}.sources-panel{flex:auto;min-height:220px;max-height:100%;padding-right:20px}.panel-heading{justify-content:space-between;align-items:center;gap:14px;display:flex}.compact-button{white-space:nowrap;border-radius:20px;min-height:34px;padding:8px 14px}.radio-group{flex-direction:column;gap:10px;display:flex}.radio-group label{align-items:center;gap:10px;display:flex}.radio-group input{accent-color:var(--text);width:22px;min-height:auto}.chat-panel{flex-direction:column;gap:24px;min-height:70vh;display:flex}.chat-thread-panel{gap:16px;height:100%;min-height:0;overflow:hidden}.chat-thread-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:flex-start;gap:18px;padding-bottom:14px;display:flex}.chat-thread-header h2{-webkit-line-clamp:1;-webkit-box-orient:vertical;font-size:28px;display:-webkit-box;overflow:hidden}.chat-body{scroll-behavior:smooth;flex-direction:column;flex:1;gap:14px;min-height:0;padding-right:4px;display:flex;overflow-y:auto}.chat-empty,.empty-state{color:var(--muted);margin:0}.chat-empty{text-align:center;flex:1;justify-content:center;align-items:center;display:flex}.chat-message{display:flex}.chat-message-user{justify-content:flex-end}.chat-message-assistant{justify-content:flex-start}.message-bubble{border:1px solid var(--border);background:#f8f4ee;border-radius:8px;max-width:min(72ch,78%);padding:14px 16px}.chat-message-user .message-bubble{background:var(--yellow);border-color:var(--gold)}.chat-message-assistant.refusal .message-bubble{border-color:var(--red)}.message-label{color:var(--muted);text-transform:uppercase;margin-bottom:6px;font-size:12px;font-weight:700;display:block}.message-bubble p{white-space:pre-wrap;margin:0;line-height:1.45}.citation-link{color:var(--green);text-underline-offset:2px;font-weight:700;text-decoration:underline;text-decoration-thickness:1px;display:inline-block;position:relative}.citation-link:focus-visible{outline:2px solid var(--green);outline-offset:2px;border-radius:3px}.citation-popover{background:var(--text);color:var(--surface);white-space:normal;z-index:20;border-radius:8px;width:max-content;min-width:260px;max-width:min(360px,72vw);padding:12px 14px;font-weight:300;line-height:1.35;display:none;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);box-shadow:0 10px 24px #00000038}.citation-popover strong{color:var(--yellow);margin-bottom:6px;font-size:13px;display:block}.citation-popover span{color:var(--surface);-webkit-line-clamp:6;-webkit-box-orient:vertical;font-size:13px;display:-webkit-box;overflow:hidden}.citation-link:hover .citation-popover,.citation-link:focus-visible .citation-popover{display:block}.typing-bubble{align-items:center;gap:6px;min-height:48px;display:inline-flex}.typing-bubble span{background:var(--green);border-radius:50%;width:8px;height:8px;animation:1.2s ease-in-out infinite typing-dot;display:block}.typing-bubble span:nth-child(2){animation-delay:.16s}.typing-bubble span:nth-child(3){animation-delay:.32s}@keyframes typing-dot{0%,80%,to{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}.composer{gap:14px;display:grid}.chat-composer{grid-template-columns:minmax(0,1fr) auto;align-items:end}.chat-composer textarea{resize:none}.answer{border-top:1px solid var(--border);padding-top:24px}.answer-state{background:var(--green);color:#fff;border-radius:999px;margin-bottom:12px;padding:7px 12px;font-size:13px;font-weight:700;display:inline-flex}.answer-state.refusal{background:var(--red)}.source-list{gap:12px;display:grid}.source-list-compact{flex:1;align-content:start;padding-right:6px;overflow-y:auto}.source-mode-select{width:auto;min-height:36px;padding:7px 10px}.stance-options{flex-direction:column;gap:4px;padding-top:2px;display:flex}.stance-option{cursor:pointer;border-radius:8px;align-items:center;gap:12px;min-height:44px;padding:8px 10px;display:flex}.stance-option:hover{background:#37917b1f}.stance-option:has(input:focus-visible){background:#37917b1f}.stance-option input{opacity:0;width:1px;height:1px;margin:0;padding:0;position:absolute}.stance-check{border-radius:50%;flex:none;width:21px;height:21px;display:inline-block;position:relative}.stance-check:before{content:"";border:1.5px solid #878787;border-radius:50%;width:18px;height:18px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.stance-dot{background:var(--green);opacity:0;border-radius:50%;width:13.5px;height:13.5px;transition:opacity .14s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.stance-option:hover input:not(:checked)+.stance-check .stance-dot{opacity:.3}.stance-option:has(input:focus-visible) input:not(:checked)+.stance-check .stance-dot{opacity:.3}.stance-option input:checked+.stance-check .stance-dot{opacity:1}.stance-tick{border:2px solid #fff;border-width:0 2px 2px 0;width:4px;height:8px;display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-58%)rotate(45deg)}.stance-option:hover input:not(:checked)+.stance-check .stance-tick,.stance-option input:checked+.stance-check .stance-tick{display:block}.stance-option:has(input:focus-visible) input:not(:checked)+.stance-check .stance-tick{display:block}.source-card,.document-row{border:1px solid var(--border);border-radius:8px;gap:8px;padding:16px;text-decoration:none;display:grid}.source-card{background:var(--surface);cursor:pointer}.source-card summary{grid-template-columns:18px minmax(0,1fr);align-items:center;gap:10px;list-style:none;display:grid}.source-card summary::-webkit-details-marker{display:none}.source-toggle{border:solid var(--muted);border-width:0 2px 2px 0;justify-self:center;width:8px;height:8px;transition:transform .16s;display:inline-block;transform:rotate(-45deg)}.source-card[open] .source-toggle{transform:rotate(45deg)}.source-card strong{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.25;display:-webkit-box;overflow:hidden}.source-card span,.status{color:var(--muted);text-transform:uppercase;font-size:12px;font-weight:700}.source-card p,.document-row p{color:var(--muted);margin:0}.source-card p{line-height:1.35}.source-link{color:var(--green);font-size:14px;font-weight:700}.chat-history-panel{background:var(--surface);border-radius:10px;flex-direction:column;gap:16px;height:100%;min-height:0;padding:28px;display:flex;overflow:hidden}.chat-history-list{gap:12px;padding-right:4px;display:grid;overflow-y:auto}.chat-history-card{border:1px solid var(--border);background:#f8f4ee;border-radius:10px;gap:10px;padding:14px;display:grid}.chat-history-card.active{border-color:var(--green);box-shadow:inset 4px 0 0 var(--green)}.history-session-main{color:var(--text);cursor:pointer;text-align:left;background:0 0;border:0;gap:5px;width:100%;padding:0;display:grid}.history-session-main:disabled{cursor:wait;opacity:.65}.history-session-main strong{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.24;display:-webkit-box;overflow:hidden}.history-session-main span{color:var(--muted);text-transform:uppercase;font-size:12px;font-weight:700}.history-actions{flex-wrap:wrap;gap:12px;display:flex}.text-button{color:var(--green);cursor:pointer;text-underline-offset:3px;background:0 0;border:0;padding:0;font-size:13px;font-weight:700;text-decoration:underline}.muted-text-button{color:var(--muted)}.danger-text-button{color:var(--red)}.history-rename-form{gap:10px;display:grid}.history-rename-form input{min-height:42px;padding:10px 12px}.chunk-page{padding:24px 44px 52px}.chunk-shell{background:var(--surface);border-radius:10px;gap:22px;max-width:980px;margin:0 auto;padding:32px;display:grid}.chunk-header{justify-content:space-between;align-items:start;gap:20px;display:flex}.chunk-header .button{white-space:nowrap;text-decoration:none}.chunk-meta{flex-wrap:wrap;gap:8px;display:flex}.chunk-meta span{border:1px solid var(--border);color:var(--muted);background:#f8f4ee;border-radius:999px;padding:7px 10px;font-size:13px;font-weight:700}.chunk-text{border:1px solid var(--border);white-space:pre-wrap;background:#f8f4ee;border-radius:8px;padding:22px;line-height:1.6}.document-list{flex-direction:column;gap:16px;display:flex}.document-row{grid-template-columns:1fr auto;align-items:start}.document-badges{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.status.stance{color:var(--text)}.status.ready{color:var(--green)}.status.failed{color:var(--red)}@media (width<=860px){.topbar,.topbar nav{flex-direction:column;align-items:flex-start}.login-container{grid-template-columns:1fr}.login-page{padding:24px}.workspace,.documents-layout{grid-template-columns:1fr;padding:24px}.chat-workspace,.chat-sidebar{height:auto;overflow:visible}.sources-panel{max-height:45vh}.chat-thread-panel{height:68vh}.chat-history-panel{max-height:60vh}.chat-composer{grid-template-columns:1fr}.message-bubble{max-width:100%}.chunk-page{padding:24px}.chunk-header{flex-direction:column}.chunk-header .button{text-align:center;width:100%}}
