*{box-sizing:border-box}body{margin:0;background:#f6f8fc;color:#18233b;font:16px/1.55 system-ui,-apple-system,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer;border:1px solid #dce3ef;background:#fff;border-radius:9px;padding:9px 13px;color:#263550}button:hover{background:#eef2ff}button:disabled{opacity:.5;cursor:wait}a{color:#294cce}input,textarea{border:1px solid #d6deea;border-radius:9px;padding:11px;background:white;color:inherit;min-width:0}button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #a6b5ff;outline-offset:2px}.primary{background:#2544d9;border-color:#2544d9;color:#fff}.primary:hover{background:#1936b8}.wide{width:100%}.mark{background:#2544d9;color:#fff;border-radius:12px;width:64px;height:64px;display:grid;place-items:center;font-size:20px;letter-spacing:2px}.mark.small{width:37px;height:37px;font-size:13px;border-radius:9px}.brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.brand strong{font-size:17px;letter-spacing:-.4px}.eyebrow{font-size:12px;letter-spacing:1.6px;color:#72809a;font-weight:600}#login-view{min-height:100dvh;display:grid;place-items:center;background:linear-gradient(140deg,#edf2ff,#fff 60%)}.login-card{width:min(480px,calc(100% - 40px));padding:36px}.login-card h1{font-size:44px;letter-spacing:-2px;line-height:1.13;margin:20px 0}.login-card>p{color:#69778e}.login-card form{display:grid;gap:10px;margin-top:30px}.login-card label{font-size:14px}#login-error{color:#ad2929}#app{display:grid;grid-template-columns:260px minmax(400px,1fr) 260px;height:100dvh}.sidebar{padding:25px 18px;background:#eef2f9;border-right:1px solid #dfe5ef;display:flex;flex-direction:column;min-height:0}.section-label{font-size:12px;letter-spacing:1.2px;color:#738098;display:flex;align-items:center;justify-content:space-between;margin:26px 0 12px;font-weight:600}.section-label button{font-size:20px;padding:0 7px;border:0;background:transparent}#projects{max-height:25vh;overflow:auto}#projects button,#chats button{display:block;text-align:left;width:100%;border:0;background:transparent;padding:10px 12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}#projects button.selected,#chats button.selected{background:#dce5ff;color:#1937b4;font-weight:600}#search{font-size:14px;width:100%;padding:9px 11px;margin-bottom:10px;background:#f9fbff}#chats{overflow:auto;flex:1}.sidebar-bottom{padding-top:20px;border-top:1px solid #dce3ef;margin-top:20px;display:grid;gap:7px}.sidebar-bottom button,.sidebar-bottom a{background:transparent;border:0;text-align:left;font-size:13px;color:#526480;padding:5px;text-decoration:none}main{background:white;display:flex;flex-direction:column;min-width:0;min-height:0}header{padding:23px 30px;border-bottom:1px solid #edf0f6;display:flex;align-items:center;gap:16px;justify-content:space-between}header h1{font-size:20px;font-weight:600;margin:3px 0 0;letter-spacing:-.5px;overflow-wrap:anywhere}.head-actions{display:flex;gap:8px;align-items:center}.head-actions button{font-size:13px;padding:7px 10px}#connection{font-size:12px;white-space:nowrap;color:#577363}#messages{flex:1;overflow:auto;padding:30px max(24px,calc((100% - 800px)/2));scroll-behavior:smooth}.welcome{padding:40px 0;max-width:580px}.welcome h2{font-size:32px;line-height:1.25;letter-spacing:-1px}.welcome p{color:#708098}.message{margin:0 0 30px;overflow-wrap:anywhere}.message.user{background:#f1f4fc;padding:18px 22px;border-radius:15px;margin-left:35px}.message .role{font-size:13px;font-weight:600;color:#687793;margin-bottom:9px}.message pre{white-space:pre-wrap;font:inherit;margin:0}.message pre.code{font:13px/1.6 ui-monospace,monospace;background:#17223b;color:#e3e9fc;padding:18px;border-radius:10px;overflow:auto;white-space:pre;margin:14px 0}.file-link{display:inline-block;border:1px solid #dce4f1;border-radius:9px;padding:9px 12px;margin:12px 8px 0 0;text-decoration:none;font-size:14px;background:#fafbff}.message img{display:block;max-width:100%;max-height:240px;border-radius:10px;margin-top:12px}.job{color:#556d99;border-left:3px solid #2544d9;padding:12px 18px;margin-bottom:24px;background:#f5f7fd}.composer{padding:15px 28px 12px;border-top:1px solid #edf0f6}.composer form{border:1px solid #cfd9ea;border-radius:14px;padding:12px}.composer textarea{width:100%;border:0;resize:vertical;max-height:250px;min-height:75px;padding:6px}.composer-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.composer-actions button{font-size:14px}.mode{font-size:13px;color:#526480;display:flex;gap:6px;align-items:center;margin-right:auto}.mode input{accent-color:#2544d9}.caption{font-size:12px;color:#7c899f;line-height:1.5}#attachments{display:flex;gap:8px;flex-wrap:wrap}#attachments button{font-size:13px;margin-bottom:10px}.files-panel{padding:0 20px 24px;border-left:1px solid #e0e6f0;overflow:auto}.file-row{border:1px solid #dfe5ef;background:white;border-radius:10px;padding:12px;margin-bottom:10px}.file-row a{display:block;font-size:14px;overflow-wrap:anywhere;text-decoration:none}.file-row small{color:#7b899e;font-size:12px}.file-row button{font-size:12px;padding:3px 8px;margin-top:8px}.scope{font-size:13px;color:#7a879c;border-top:1px solid #dfe5ef;margin-top:30px;padding-top:20px}.scope b{color:#52617a}.scope p{line-height:1.65}#error{background:#fff0ed;color:#a13322;padding:12px 24px;font-size:14px}dialog{border:1px solid #d9e1ee;border-radius:18px;padding:26px;width:min(570px,90vw);color:#18233b}dialog::backdrop{background:#15233b70}dialog form{display:grid;gap:12px}dialog label{font-size:14px}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{margin:0 0 14px}.dialog-head button{border:0;font-size:24px}dialog textarea{resize:vertical}dialog .primary{justify-self:end}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}@media(max-width:1200px){#app{grid-template-columns:230px minmax(380px,1fr)}.files-panel{display:none}.head-actions{flex-wrap:wrap}header{padding:20px}#connection{width:100%;text-align:right}}@media(max-width:720px){#app{height:auto;min-height:100dvh;display:flex;flex-direction:column}.sidebar{padding:14px 16px}.brand{margin-bottom:12px}.sidebar .section-label{margin:12px 0 5px}#projects{display:flex;max-height:110px;flex-wrap:wrap}#projects button{width:auto}#chats{max-height:120px}.sidebar-bottom{display:flex;margin-top:10px;padding-top:10px;flex-wrap:wrap}#search{margin-top:8px}main{min-height:70dvh}#messages{min-height:250px;max-height:60dvh;padding:24px 18px}.composer{padding:12px}.head-actions button{font-size:12px}header{align-items:flex-start}header h1{font-size:18px}.composer-actions{gap:8px}.mode{font-size:12px}.welcome h2{font-size:28px}}

:root{color-scheme:dark}body{background:#10131a;color:#e4e8f2}button{background:#202633;border-color:#343e52;color:#e2e8f6}button:hover{background:#2b354a}input,textarea{background:#141923;border-color:#384259;color:#eef2fa}a{color:#9eb4ff}.primary,.mark{background:#526ff0;border-color:#526ff0;color:#fff}.primary:hover{background:#657fff}.eyebrow,.section-label{color:#99a8c3}.sidebar{background:#151a24;border-color:#2c3445}main{background:#191f2b}header,.composer{border-color:#30394a}#login-view{background:radial-gradient(ellipse at 20% 20%,#202e57 0,transparent 50%),#10151f}.login-card>p{color:#b2bed3}.sidebar-bottom{border-color:#343e52}.sidebar-bottom button,.sidebar-bottom a{color:#afbdd5}#search{background:#1d2534}#projects button.selected,#chats button.selected{background:#303f66;color:#d7e1ff}#projects button:hover,#chats button:hover{background:#263149}.head-actions button{background:#252e40}.message.user{background:#27324a}.message .role{color:#a4b5d3}.message pre.code{background:#0d1320;color:#dbe7ff}.file-link{background:#202b41;border-color:#405375;color:#b8caff}.file-row{background:#1c2433;border-color:#344157}.file-row small,.caption{color:#a1afc5}.scope{color:#a4b1c9;border-color:#344157}.scope b{color:#d1dcef}.composer form{background:#202838;border-color:#43506a}.composer textarea{background:transparent}.mode{color:#b9c6db}.welcome p{color:#b3bfd4}.files-panel{background:#151c28;border-color:#30394a}.job{background:#233451;color:#c2d6ff;border-color:#7d9cff}#error{background:#42282e;color:#ffc0bb}dialog{background:#202838;border-color:#465471;color:#eef2fa}dialog::backdrop{background:#050810c9}#connection{color:#9bcdbd;max-width:260px;white-space:normal}.login-card h1{color:#f0f4ff}#login-error{color:#ffb5af}
#memory-dialog{width:min(720px,92vw);max-height:85dvh;overflow:auto}#memory-dialog>label{display:block;margin:16px 0 8px}#memory-dialog>textarea,#memory-dialog>input{width:100%}#memory-dialog>button{margin-top:12px}#memory-dialog hr{border:0;border-top:1px solid #465471;margin-top:24px}#memory-results details{border:1px solid #465471;border-radius:10px;margin:12px 0;padding:12px}#memory-results summary{cursor:pointer;overflow-wrap:anywhere}#memory-results pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}#otp-code{letter-spacing:.3em;font-size:22px}#memory-security{color:#ffcba3}
:root{--sidebar-width:260px}.sidebar{position:relative}#sidebar-toggle{align-self:flex-end;font-size:14px;margin-bottom:12px;padding:6px 10px}#sidebar-resize{position:absolute;right:-5px;top:0;bottom:0;width:10px;cursor:col-resize;touch-action:none;z-index:4}#sidebar-resize:hover,#sidebar-resize:focus-visible{background:#7798ff55;outline:none}.sidebar-resizing{cursor:col-resize;user-select:none}#app.sidebar-collapsed .sidebar>:not(#sidebar-toggle){display:none}#app.sidebar-collapsed .sidebar{padding:16px 8px}#app.sidebar-collapsed #sidebar-toggle{align-self:center;font-size:22px}#settings-dialog{max-height:85dvh;overflow:auto}#settings-dialog>label{display:block;margin:18px 0 8px}#settings-dialog .settings-check{display:flex;gap:8px;align-items:center}#settings-dialog input[type=checkbox]{width:18px;height:18px;accent-color:#7798ff}#settings-dialog input[type=range]{display:block;width:100%;padding:0;accent-color:#7798ff}#settings-dialog select{width:100%;font:inherit;padding:10px;border:1px solid #465471;border-radius:9px;background:#141923;color:#eef2fa}#settings-dialog>button{margin-top:20px}#settings-dialog output{display:block;text-align:right;color:#b9c6db}#settings-dialog .caption{font-size:14px}
@media(min-width:1201px){#app{grid-template-columns:var(--sidebar-width) minmax(0,1fr) 260px}#app.sidebar-collapsed{grid-template-columns:64px minmax(0,1fr) 260px}}
@media(min-width:721px) and (max-width:1200px){#app{grid-template-columns:min(var(--sidebar-width),40vw) minmax(0,1fr)}#app.sidebar-collapsed{grid-template-columns:64px minmax(0,1fr)}}
@media(max-width:720px){#sidebar-resize{display:none}#sidebar-toggle{margin-bottom:4px}#app.sidebar-collapsed .sidebar{padding:8px 16px;align-items:flex-start}#app.sidebar-collapsed #sidebar-toggle{align-self:flex-start;margin:0}}
.login-mark{width:auto;display:inline-flex;padding:0 18px;letter-spacing:-.5px;font-weight:650}
.project-nav-row{display:flex;align-items:center;gap:4px;min-width:0}#projects .project-select{flex:1;min-width:0;width:auto}#projects .project-edit{flex:0 0 34px;width:34px;text-align:center;padding:8px 4px;font-size:18px;color:#b8caff}#projects .project-edit:hover{background:#303f66}@media(max-width:720px){.project-nav-row{max-width:100%}}

/* Keep chat navigation visible when projects and account controls fill the sidebar. */
.sidebar{overflow-y:auto}#chats{flex:1 0 120px;min-height:120px}#projects{flex-shrink:0}.sidebar-bottom{flex-shrink:0}@media(max-width:720px){#chats{flex:0 0 auto;min-height:80px}}

