:root{--color-background:226 240 228;--color-surface:244 250 244;--color-foreground:22 42 30;--color-primary:28 110 64;--color-primary-hover:22 88 52;--color-primary-foreground:240 248 240;--color-secondary:110 168 118;--color-accent:18 84 52;--color-muted:196 220 198;--color-muted-foreground:68 96 76;--color-border:156 188 160;--color-error:140 48 42;color:rgb(var(--color-foreground));background:rgb(var(--color-background));font-family:"Source Sans 3",ui-sans-serif,system-ui,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0;overflow:hidden}body{background:rgb(var(--color-background))}.network-bg{pointer-events:none;z-index:0;opacity:.9;width:100%;height:100%;position:absolute;inset:0}.page{flex-direction:column;height:100%;min-height:0;display:flex;position:relative;overflow:hidden}.page-inner{z-index:1;flex-direction:column;width:min(760px,100% - 32px);height:100%;min-height:0;margin:0 auto;transition:width .2s;display:flex;position:relative}.page-inner:has(.workspace.has-pdf){width:min(1480px,100% - 32px)}.workspace{flex:1;align-items:stretch;gap:16px;width:100%;min-height:0;display:flex}.workspace.has-pdf .chat-shell{flex:0 640px;width:min(640px,100%)}.login-card,.chat-shell{background:rgb(var(--color-surface) / .88);border:1px solid rgb(var(--color-border) / .55);border-radius:22px;margin:auto 0}.login-card{width:min(420px,100%);margin:auto;padding:32px 28px}.login-card h1,.chat-header h1{letter-spacing:-.04em;margin:0 0 8px;font-size:28px}.login-card p,.hint,.status{color:rgb(var(--color-muted-foreground));line-height:1.45}form{gap:12px;margin-top:18px;display:grid}label{color:rgb(var(--color-muted-foreground));font-size:13px;font-weight:700}input,textarea{border:1px solid rgb(var(--color-border));width:100%;font:inherit;background:rgb(var(--color-surface));color:rgb(var(--color-foreground));border-radius:14px;padding:12px 14px}button{font:inherit;cursor:pointer;background:rgb(var(--color-primary));color:rgb(var(--color-primary-foreground));border:0;border-radius:999px;padding:12px 16px;font-weight:700}button:hover:not(:disabled){background:rgb(var(--color-primary-hover))}button:disabled{opacity:.55;cursor:default}button.ghost{color:rgb(var(--color-accent));border:1px solid rgb(var(--color-border));background:0 0}.error{color:rgb(var(--color-error));font-size:14px}.chat-shell{flex-direction:column;flex:1;height:calc(100vh - 48px);min-height:0;max-height:calc(100vh - 48px);margin:24px 0;display:flex;overflow:hidden}.floating-actions{z-index:20;gap:8px;display:grid;position:fixed;top:20px;left:20px}.floating-actions button.ghost{background:rgb(var(--color-surface) / .94);box-shadow:0 6px 18px #162a1e1f}.chat-header{padding:20px 22px 12px}.chat-header p{color:rgb(var(--color-muted-foreground));margin:0}.messages{flex:1;align-content:start;gap:14px;padding:8px 22px 16px;display:grid;overflow:auto}.bubble{border-radius:16px;max-width:92%;padding:12px 14px;line-height:1.5}.bubble.user{background:rgb(var(--color-primary));color:rgb(var(--color-primary-foreground));white-space:pre-wrap;justify-self:end}.bubble.assistant{background:rgb(var(--color-muted) / .45);justify-self:start;max-width:100%}.bubble.assistant>*{margin:0}.bubble.assistant>*+*{margin-top:.7em}.bubble.assistant ul,.bubble.assistant ol{padding-left:1.25em}.bubble.assistant li+li{margin-top:.25em}.bubble.assistant a{color:rgb(var(--color-accent))}.bubble.assistant h1,.bubble.assistant h2,.bubble.assistant h3,.bubble.assistant h4{letter-spacing:-.02em;font-size:1em}.bubble.assistant code{background:rgb(var(--color-muted) / .7);border-radius:6px;padding:.1em .35em;font-size:.92em}.bubble.assistant pre{background:rgb(var(--color-muted) / .7);border-radius:10px;padding:10px 12px;overflow:auto}.bubble.assistant pre code{background:0 0;padding:0}.md-table-wrap{max-width:100%;overflow-x:auto}.bubble.assistant table{border-collapse:collapse;width:max-content;max-width:100%;font-size:.92em}.bubble.assistant th,.bubble.assistant td{border-bottom:1px solid rgb(var(--color-border) / .4);text-align:left;vertical-align:top;padding:.4em 1.1em .4em 0}.bubble.assistant th{white-space:nowrap;font-weight:700}.bubble.assistant th[align=right],.bubble.assistant td[align=right]{text-align:right;white-space:nowrap}.examples{flex-wrap:wrap;gap:8px;padding:0 22px 12px;display:flex}.examples button{background:rgb(var(--color-surface));color:rgb(var(--color-accent));border:1px solid rgb(var(--color-border));padding:8px 12px;font-size:13px;font-weight:600}.composer{border-top:1px solid rgb(var(--color-border) / .5);grid-template-columns:1fr auto;gap:10px;padding:16px 22px 20px;display:grid}.composer textarea{resize:none;min-height:52px}.status{padding:0 22px;font-size:13px}.bubble.assistant button.pdf-ref{color:rgb(var(--color-accent));font:inherit;text-underline-offset:2px;cursor:pointer;background:0 0;border:0;border-radius:0;margin:0;padding:0;font-weight:700;text-decoration:underline;display:inline}.bubble.assistant button.pdf-ref:hover{color:rgb(var(--color-primary-hover));background:0 0}.pdf-panel{background:rgb(var(--color-surface) / .88);border:1px solid rgb(var(--color-border) / .55);border-radius:22px;flex-direction:column;flex:auto;min-width:0;height:calc(100vh - 48px);min-height:0;margin:24px 0;display:flex;position:relative;overflow:hidden}.pdf-close{z-index:2;background:rgb(var(--color-surface) / .94);color:rgb(var(--color-accent));border:1px solid rgb(var(--color-border));padding:8px 14px;position:absolute;top:12px;right:12px}.pdf-close:hover:not(:disabled){background:rgb(var(--color-muted) / .8);color:rgb(var(--color-accent))}.pdf-scroll{flex:1;min-height:0;padding:20px 16px 28px;overflow:auto}.pdf-status{color:rgb(var(--color-muted-foreground));margin:48px 16px 0}.pdf-page{aspect-ratio:210/297;background:#fff;margin:0 auto 16px;box-shadow:0 8px 24px #162a1e1f}.pdf-page canvas{width:100%;height:auto;display:block}.pdf-page.is-target{outline-offset:5px;outline:6px solid #2563eb;box-shadow:0 0 0 3px #2563eb47,0 8px 24px #162a1e1f}.stream-caret{width:.55em;color:rgb(var(--color-accent));margin-left:1px;animation:1s step-end infinite stream-caret;display:inline-block}.stream-caret:before{content:"▍"}@keyframes stream-caret{50%{opacity:0}}@media (width<=900px){.workspace.has-pdf{flex-direction:column}.workspace.has-pdf .chat-shell{flex:none;width:100%;height:45vh;min-height:0;max-height:45vh;margin-bottom:0}.pdf-panel{height:calc(55vh - 24px);min-height:0;max-height:calc(55vh - 24px);margin-top:0}}
