:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#18202a;background:#f6f7f9;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,textarea,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.62}.loading,.login-screen{min-height:100vh;display:grid;place-items:center}.login-panel{width:min(420px,calc(100vw - 32px));border:1px solid #d9dee7;background:#fff;padding:28px;border-radius:8px}.login-panel h1{margin:16px 0 8px;font-size:24px}.login-panel p{color:#556171;line-height:1.5}.primary-button,.sidebar-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;border:0;border-radius:7px;background:#1473e6;color:#fff;padding:0 14px;font-weight:650}.full-width{width:100%}.app-shell{height:100vh;display:grid;grid-template-columns:220px minmax(0,1fr)}.sidebar{display:flex;flex-direction:column;min-width:0;border-right:1px solid #d9dee7;background:#fff;padding:16px}.brand{display:flex;align-items:center;gap:10px;font-weight:750;margin-bottom:16px}.shell-nav{display:flex;flex-direction:column;gap:6px}.nav-link,.file-link{width:100%;min-height:38px;display:flex;align-items:center;gap:8px;border:0;border-radius:6px;background:transparent;color:#26313f;text-align:left;padding:0 10px}.nav-link.active,.nav-link:hover,.file-link.active,.file-link:hover{background:#eef3f8}.thread-list{display:flex;flex-direction:column;gap:4px;margin-top:14px;overflow-y:auto}.thread-link{width:100%;min-height:36px;border:0;border-radius:6px;background:transparent;color:#26313f;text-align:left;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread-link.active,.thread-link:hover{background:#eef3f8}.workspace-grid,.expert-files-layout{min-height:0;flex:1;display:grid}.workspace-grid{grid-template-columns:260px minmax(0,1fr)}.expert-files-layout{grid-template-columns:220px minmax(360px,.95fr) minmax(380px,1.05fr)}.workspace-rail{min-width:0;min-height:0;overflow-y:auto;border-right:1px solid #d9dee7;background:#fff;padding:14px}.rail-heading{display:flex;align-items:center;gap:8px;min-height:34px;color:#556171;font-size:13px;font-weight:700}.file-list{display:flex;flex-direction:column;gap:4px;margin-top:8px}.file-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-main,.expert-chat-pane,.expert-preview-pane{min-width:0;min-height:0;display:flex;flex-direction:column}.workspace-header,.preview-toolbar{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #d9dee7;background:#fff;padding:0 18px}.workspace-header h2,.preview-title h2{margin:0;font-size:16px}.workspace-header span,.preview-title span{color:#667385;font-size:12px}.expert-chat-pane{border-right:1px solid #d9dee7;background:#f6f7f9}.expert-preview-pane{background:#fff}.preview-title{min-width:0}.preview-title h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.icon-text-button{min-height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #cfd7e2;border-radius:7px;background:#fff;color:#26313f;padding:0 10px;font-size:13px;font-weight:650;white-space:nowrap}.icon-text-button:hover{background:#eef3f8}.preview-body{min-height:0;flex:1;overflow-y:auto;padding:22px;line-height:1.55}.raw-preview{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:13px}.icon-button{width:36px;height:36px;display:grid;place-items:center;border:1px solid #cfd7e2;border-radius:7px;background:#fff;color:#26313f}.main-pane{min-width:0;height:100vh;display:flex;flex-direction:column}.topbar{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #d9dee7;background:#fff;padding:0 20px}.topbar h1{margin:0;font-size:17px}.topbar span,.user-chip{color:#667385;font-size:13px}.user-actions{display:flex;align-items:center;gap:10px;min-width:0}.user-chip{display:flex;align-items:center;gap:6px;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logout-button{min-height:34px;display:inline-flex;align-items:center;gap:7px;border:1px solid #cfd7e2;border-radius:7px;background:#fff;color:#26313f;padding:0 10px;font-size:13px;font-weight:650;white-space:nowrap}.logout-button:hover,.icon-button:hover{background:#eef3f8}.thread-root{min-height:0;flex:1;display:flex;flex-direction:column}.thread-viewport{min-height:0;flex:1;overflow-y:auto;padding:22px}.message{width:fit-content;max-width:min(760px,82%);margin:0 auto 14px 0;border:1px solid #d9dee7;border-radius:8px;background:#fff;padding:14px 16px;line-height:1.55;overflow-wrap:anywhere}.message-user{margin-right:0;margin-left:auto;border-color:#b8d4fb;background:#e8f2ff}.message-assistant,.message-tool{margin-left:0;margin-right:auto}.assistant-loading-message{width:fit-content;max-width:min(760px,82%);min-height:50px;display:flex;align-items:center;gap:5px;margin:0 auto 14px;border:1px solid #d9dee7;border-radius:8px;background:#fff;padding:14px 16px}.typing-dot{width:7px;height:7px;border-radius:999px;background:#667385;animation:typing-dot 1.1s ease-in-out infinite}.typing-dot:nth-child(2){animation-delay:.14s}.typing-dot:nth-child(3){animation-delay:.28s}@keyframes typing-dot{0%,80%,to{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}.markdown-body>:first-child{margin-top:0}.markdown-body>:last-child{margin-bottom:0}.markdown-body p,.markdown-body ul,.markdown-body ol,.markdown-body blockquote,.markdown-body pre,.markdown-body table{margin:0 0 12px}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4{margin:18px 0 8px;line-height:1.25;color:#111820}.markdown-body h1{font-size:22px}.markdown-body h2{font-size:19px}.markdown-body h3{font-size:16px}.markdown-body h4{font-size:14px}.markdown-body ul,.markdown-body ol{padding-left:24px}.markdown-body li+li{margin-top:4px}.markdown-body blockquote{border-left:3px solid #cfd7e2;color:#556171;padding-left:12px}.markdown-body code{border:1px solid #d9dee7;border-radius:5px;background:#f3f5f7;padding:1px 5px;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.92em}.markdown-body pre{overflow-x:auto;border:1px solid #d9dee7;border-radius:7px;background:#111820;padding:12px}.markdown-body pre code{border:0;background:transparent;color:#f6f7f9;padding:0;white-space:pre}.markdown-body a{color:#1473e6;text-decoration-thickness:1px;text-underline-offset:3px}.markdown-body table{display:block;width:100%;overflow-x:auto;border-collapse:collapse}.markdown-body th,.markdown-body td{border:1px solid #d9dee7;padding:6px 8px;text-align:left}.markdown-body th{background:#f3f5f7;font-weight:700}.composer-footer{position:sticky;bottom:0;background:linear-gradient(180deg,#f6f7f900,#f6f7f9 28%);padding:18px 22px 22px}.composer{max-width:900px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:8px}.composer-input{min-height:44px;max-height:160px;width:100%;resize:vertical;border:1px solid #cfd7e2;border-radius:7px;background:#fff;padding:11px 12px;color:#18202a}.error-banner,.error-text,.status-banner{color:#9b1c1c;background:#fff2f2;border:1px solid #f0caca;border-radius:7px;padding:10px 12px}.status-banner{color:#1f5e34;background:#effaf2;border-color:#c9ebd1}.empty-state{flex:1;display:grid;place-content:center;gap:12px;text-align:center}.empty-state h2{margin:0;font-size:20px}@media(max-width:760px){.app-shell{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.sidebar{height:auto;border-right:0;border-bottom:1px solid #d9dee7}.shell-nav{flex-direction:row}.thread-list{max-height:130px}.topbar{align-items:flex-start;flex-direction:column;padding:12px 16px}.workspace-grid,.expert-files-layout{grid-template-columns:1fr}.workspace-rail,.expert-chat-pane{border-right:0;border-bottom:1px solid #d9dee7}.workspace-rail{max-height:180px}.expert-chat-pane,.expert-preview-pane{min-height:520px}.preview-toolbar{align-items:flex-start;flex-direction:column;padding:12px 16px}}
