:root{--background:#fafafa;--foreground:#09090b;--card:#fff;--border:#e4e4e7;--input:#e4e4e7;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#8fd01b;--accent-foreground:#102000;--accent-muted:#8fd01b24;--accent-border:#8fd01b6b;--accent-ring:#8fd01b47;--accent-hover:#8fd01b38;--accent-active:#8fd01b4d;--destructive:#dc2626;--destructive-muted:#fef2f2;--topbar-height:72px;--radius:8px;--shadow-sm:0 1px 2px #09090b0a}*{box-sizing:border-box}html{background:var(--background)}body{color:var(--foreground);background:var(--background);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,textarea{font-family:inherit}.chat-shell{min-height:100vh;padding:calc(var(--topbar-height) + 24px) 24px 24px;color:var(--foreground);background:var(--background);place-items:center;display:grid}.app-topbar{z-index:20;min-height:var(--topbar-height);background:#151515;border-bottom:1px solid #ffffff14;align-items:center;display:flex;position:fixed;top:0;bottom:auto;left:0;right:0}.app-topbar-inner{grid-template-columns:180px 1fr;align-items:center;gap:32px;width:min(100%,1320px);margin:0 auto;padding:0 32px;display:grid}.app-logo{width:110px;height:auto;display:block}.app-topbar p{color:#ffffffad;text-align:center;margin:0;font-size:15px;font-weight:500;line-height:1.4}.app-topbar strong{color:#ffffffe6;font-weight:700}.chat-panel{width:min(100%,880px);height:min(820px, calc(100vh - var(--topbar-height) - 48px));border:1px solid var(--border);border-radius:calc(var(--radius) + 2px);background:var(--card);min-height:600px;box-shadow:var(--shadow-sm);grid-template-rows:auto auto 1fr auto auto auto;display:grid;overflow:hidden}.chat-header{border-bottom:1px solid var(--accent-border);background:var(--card);justify-content:space-between;align-items:center;gap:16px;padding:18px 20px;display:flex}.eyebrow{color:#5f8f08;margin:0 0 4px;font-size:12px;font-weight:500;line-height:1.2}h1{letter-spacing:0;margin:0;font-size:22px;font-weight:600;line-height:1.2}.logout-button{border:1px solid var(--border);border-radius:var(--radius);color:var(--muted-foreground);background:var(--card);cursor:pointer;flex:none;padding:7px 10px;font-size:12px;font-weight:600}.logout-button:hover{color:var(--foreground);border-color:var(--accent-border);background:var(--accent-muted)}.logout-button:focus-visible{color:var(--foreground);border-color:var(--accent-border);background:var(--accent-muted)}.logout-button:focus-visible{outline:2px solid var(--accent-ring);outline-offset:2px}.auth-shell{align-content:center}.login-panel{border:1px solid var(--border);border-radius:calc(var(--radius) + 2px);background:var(--card);width:min(100%,440px);box-shadow:var(--shadow-sm);padding:28px}.login-copy{color:var(--muted-foreground);margin:12px 0 22px;font-size:14px;line-height:1.55}.login-form{gap:10px;display:grid}.login-form label{color:var(--foreground);font-size:13px;font-weight:600}.login-form input{border:1px solid var(--input);border-radius:var(--radius);width:100%;height:40px;color:var(--foreground);background:var(--card);box-shadow:var(--shadow-sm);padding:8px 11px;font-size:14px;line-height:1.45}.login-form input:focus{outline:2px solid var(--accent-ring);outline-offset:2px;border-color:var(--accent)}.login-form button{border:1px solid var(--accent-border);border-radius:var(--radius);min-height:40px;color:var(--accent-foreground);background:var(--accent-muted);cursor:pointer;justify-content:center;align-items:center;margin-top:6px;font-size:14px;font-weight:700;display:inline-flex}.login-form button:disabled{cursor:wait;opacity:.72}.login-form button:focus-visible{outline:2px solid var(--accent-ring);outline-offset:2px}.login-error{margin:4px 0 0}.knowledge-sources{border-bottom:1px solid var(--border);color:var(--muted-foreground);background:var(--muted);align-items:center;gap:10px;padding:10px 20px;font-size:12px;line-height:1.4;display:flex}.knowledge-source-links{flex-wrap:wrap;gap:6px;display:flex}.knowledge-source-links a{border:1px solid var(--accent-border);color:var(--accent-foreground);background:var(--accent-muted);white-space:nowrap;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:500;text-decoration:none}.knowledge-source-links a:hover{background:var(--accent-muted)}.knowledge-source-links a:focus-visible{background:var(--accent-muted)}.knowledge-source-links a:focus-visible{outline:2px solid var(--accent-ring);outline-offset:2px}.messages{scroll-behavior:smooth;flex-direction:column;gap:12px;min-height:0;padding:20px;display:flex;overflow-y:auto}.message{border:1px solid var(--border);border-radius:var(--radius);background:var(--card);width:min(80%,660px);padding:12px 14px}.message-user{color:var(--accent-foreground);border-color:var(--accent-border);background:var(--accent-muted);align-self:flex-end}.message-assistant{background:#fcfcfd;border-color:#d8d8de;align-self:flex-start}.message-label{color:var(--muted-foreground);margin-bottom:6px;font-size:11px;font-weight:500;line-height:1.2}.message p{white-space:pre-wrap;margin:0;font-size:14px;line-height:1.55}.sources{color:var(--muted-foreground);flex-wrap:wrap;align-items:center;gap:6px;margin-top:12px;font-size:12px;display:flex}.source-chip{border:1px solid var(--accent-border);background:var(--accent-muted);color:var(--accent-foreground);border-radius:999px;padding:2px 8px;font-size:12px}.loading-message{min-height:64px}.typing{align-items:center;gap:6px;display:flex}.typing span{background:var(--accent);border-radius:999px;width:6px;height:6px;animation:1s ease-in-out infinite pulse}.typing span:nth-child(2){animation-delay:.14s}.typing span:nth-child(3){animation-delay:.28s}.error-banner{border-radius:var(--radius);background:var(--destructive-muted);color:var(--destructive);border:1px solid #dc26263d;margin:0 20px 12px;padding:10px 12px;font-size:14px;font-weight:500}.composer{border-top:1px solid var(--accent-border);background:var(--card);grid-template-columns:1fr auto;gap:10px;padding:12px 20px 8px;display:grid}.composer textarea{resize:vertical;border:1px solid var(--input);border-radius:var(--radius);width:100%;min-height:38px;max-height:96px;color:var(--foreground);background:var(--card);font:inherit;box-shadow:var(--shadow-sm);padding:8px 11px;font-size:14px;line-height:1.45}.composer textarea::placeholder{color:var(--muted-foreground)}.composer textarea:focus{outline:2px solid var(--accent-ring);outline-offset:2px;border-color:var(--accent)}.composer button{border:1px solid var(--accent-border);border-radius:var(--radius);width:82px;min-height:38px;color:var(--accent-foreground);background:var(--accent-muted);font:inherit;white-space:nowrap;cursor:pointer;justify-content:center;align-items:center;font-size:14px;font-weight:600;line-height:1;transition:background-color .15s,border-color .15s,box-shadow .15s,transform .15s;display:inline-flex;box-shadow:0 1px 1px #10200014,inset 0 1px #ffffff57}.composer button:hover:not(:disabled){background:var(--accent-hover);border-color:#8fd01b94;transform:translateY(-1px);box-shadow:0 2px 5px #1020001f,inset 0 1px #ffffff47}.composer button:active:not(:disabled){background:var(--accent-active);transform:translateY(0);box-shadow:inset 0 1px 2px #1020002e}.composer button:focus-visible{outline:2px solid var(--accent-ring);outline-offset:2px}.composer button:disabled{cursor:not-allowed;color:var(--muted-foreground);background:var(--muted);border-color:var(--border);box-shadow:none;opacity:.72}.composer-status{color:var(--muted-foreground);justify-content:space-between;gap:16px;padding:0 20px 16px;font-size:12px;display:flex}.counter{color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex:none}.counter-alert{color:var(--destructive)}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@keyframes pulse{0%,80%,to{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media (max-width:700px){:root{--topbar-height:92px}.chat-shell{padding:var(--topbar-height) 0 0;place-items:stretch stretch}.app-topbar-inner{grid-template-columns:1fr;justify-items:center;gap:8px;padding:12px 16px}.app-logo{width:92px}.app-topbar p{max-width:340px;font-size:12px}.chat-panel{width:100%;height:calc(100vh - var(--topbar-height));border:0;border-radius:0;min-height:0}.chat-header,.knowledge-sources,.messages,.composer,.composer-status{padding-left:16px;padding-right:16px}.chat-header{flex-direction:column;align-items:flex-start}.logout-button{width:100%}.login-panel{width:calc(100% - 32px);margin:16px;padding:22px}.knowledge-sources{flex-direction:column;align-items:flex-start}.message{width:92%}.composer{grid-template-columns:1fr}.composer button{width:100%}}
