
:root{color-scheme:dark;--bg:#090b10;--side:#0d1017;--surface:#11151e;--surface2:#161b26;--surface3:#1d2432;--hair:#242b38;--text:#f3f5fb;--muted:#8994a9;--soft:#bac2d0;--blue:#98aaff;--violet:#a7a3ef;--good:#6bd8ae;--warn:#eac282;--radius:17px;--ring:0 0 0 3px rgba(144,160,255,.13)}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--text);font:14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--blue);outline-offset:2px}svg{width:19px;height:19px;display:block;flex-shrink:0;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none}a{color:var(--blue)}.hide{display:none!important}
.app{display:grid;grid-template-columns:250px minmax(0,1fr) 290px;grid-template-rows:minmax(0,1fr);height:100vh;height:100dvh;min-height:0;overflow:hidden}
.sidebar{background:var(--side);border-right:1px solid var(--hair);display:flex;flex-direction:column;min-height:0;padding:25px 15px 16px;gap:0}.brand{display:flex;align-items:center;gap:11px;padding:0 9px 25px}.brand-mark{width:35px;height:35px;display:grid;place-items:center;background:linear-gradient(145deg,#d5d9ff,#7b85d9 61%,#5061bd);box-shadow:0 7px 24px rgba(109,125,243,.22);border-radius:11px;color:#11152f;font-weight:820;font-size:20px;line-height:1;font-style:italic;letter-spacing:-.11em;padding-right:3px}.brand-name{font-weight:750;letter-spacing:-.035em;font-size:16px;line-height:1.2}.brand-kicker{font-size:10px;text-transform:uppercase;letter-spacing:.18em;color:var(--muted);margin-top:3px}.small-label{font-size:10px;font-weight:700;color:#778298;letter-spacing:.14em;text-transform:uppercase;padding:18px 12px 9px}.sidebar-btn{display:flex;align-items:center;gap:11px;padding:11px 12px;width:100%;border:1px solid transparent;border-radius:11px;background:transparent;color:#a2aec1;font-weight:540;text-align:left;transition:background .12s,color .12s}.sidebar-btn svg{width:17px;height:17px}.sidebar-btn:hover{background:#171e2b;color:#fff}.sidebar-btn.active{background:linear-gradient(95deg,#242b44,#1b2334);border-color:#303958;color:#eff0ff}.sidebar-btn.active svg{color:#acb7ff}.new-btn{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:41px;border-radius:11px;color:#f1f3ff;font-weight:620;background:#262d41;border:1px solid #3a435c;transition:background .12s;margin-bottom:16px}.new-btn:hover{background:#343d58}.new-btn svg{width:16px;height:16px}.project-list{overflow:auto;min-height:70px;max-height:40vh;padding:0 1px;scrollbar-color:#343a4b transparent;scrollbar-width:thin}.project-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;background:transparent;border:1px solid transparent;border-radius:10px;text-align:left;color:#a1aec1}.project-item:hover{background:#171e2b;color:#fff}.project-item.active{background:#1b2234;border-color:#313c5b;color:#ecf0ff}.project-item svg{width:16px;height:16px}.project-item span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.project-empty{padding:12px;color:var(--muted);font-size:12px;line-height:1.6}.sidebar-spacer{flex:1;min-height:15px}.device-card{background:#141a24;border:1px solid #28303d;border-radius:15px;padding:14px 13px;margin:4px 1px 11px}.device-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:670;font-size:12px}.device-status{font-size:11px;color:var(--soft);padding-top:6px;line-height:1.6}.pulse{width:7px;height:7px;border-radius:50%;background:var(--good);display:inline-block;box-shadow:0 0 0 4px rgba(110,216,174,.1)}.pulse.offline{background:#ee9e91;box-shadow:none}.device-bottom{display:flex;align-items:center;gap:8px;color:#8893a9;font-size:11px;padding-top:12px}.device-bottom svg{width:14px;height:14px}.sidebar-foot{display:flex;align-items:center;justify-content:space-between;padding:7px 11px;color:#737d91;font-size:11px;border-top:1px solid #242b38;margin-top:6px}
.main{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;position:relative;background:radial-gradient(ellipse 70% 55% at 55% -36%,rgba(118,126,231,.12),transparent),#0b0e14}.topbar{height:76px;min-height:76px;border-bottom:1px solid var(--hair);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 33px}.breadcrumb{display:flex;align-items:center;gap:12px;min-width:0}.breadcrumb .muted-icon{color:#68778b}.breadcrumb svg{width:17px;height:17px}.bar-title{font-size:15px;font-weight:650;letter-spacing:-.02em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crumb-meta{font-size:11px;color:var(--muted);margin-top:2px}.top-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}.pill{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:630;color:#9aebc2;background:#15261f;border:1px solid #234936;border-radius:50px;padding:5px 10px}.pill svg{width:13px;height:13px}.pill.offline{color:#e5a39b;background:#291a1b;border-color:#4c292d}.btn-icon{background:transparent;border:1px solid #303748;border-radius:10px;height:35px;width:35px;display:grid;place-items:center;color:#a9b4c5}.btn-icon:hover{background:#222b3c;color:white}.btn-icon svg{width:16px;height:16px}
.stage{min-height:0;min-width:0;flex:1;display:flex;flex-direction:column}.viewport{flex:1;min-height:0;overscroll-behavior:contain;overflow:auto;scrollbar-color:#30394a transparent;scrollbar-width:thin;position:relative}.messages{max-width:860px;margin:0 auto;padding:35px 40px 30px;display:flex;flex-direction:column;gap:27px}.message{display:flex;gap:13px;align-items:flex-start}.avatar{width:29px;height:29px;display:grid;place-items:center;flex-shrink:0;border-radius:10px;font-size:13px;font-weight:760}.avatar.ai{background:linear-gradient(135deg,#c8d0ff,#8a90e0);color:#11132d;box-shadow:0 5px 12px rgba(93,109,211,.13)}.avatar.me{background:#232b3b;border:1px solid #3b4458;color:#bac5db}.message-body{min-width:0;max-width:100%;flex:1}.message-title{font-weight:680;font-size:12px;color:#d8e0f2;margin:1px 0 9px}.message-copy{white-space:normal;overflow-wrap:anywhere;color:#d7deec;line-height:1.85;font-size:14px}.message.me .message-copy{color:#eceffa}.loading-dots{color:#8d9cf8}.error-text{color:#f0b5aa}
.welcome{max-width:790px;margin:auto;padding:40px 42px 35px;width:100%}.welcome-orb{width:72px;height:72px;border-radius:23px;margin-bottom:30px;background:radial-gradient(circle at 28% 22%,#e0e0ff,transparent 47%),linear-gradient(145deg,#a5b4fb,#686cc0 56%,#2d3762);box-shadow:0 12px 50px rgba(116,131,253,.24),inset 0 1px rgba(255,255,255,.4);display:grid;place-items:center;color:#151936;font-style:italic;font-size:40px;font-weight:800;letter-spacing:-.13em;padding-right:9px}.welcome-eyebrow{color:#a8b4df;font-weight:700;letter-spacing:.17em;text-transform:uppercase;font-size:11px;margin-bottom:14px}.welcome h1{font-size:clamp(30px,3.25vw,47px);line-height:1.16;font-weight:730;letter-spacing:-.053em;margin:0 0 15px}.gradient-text{background:linear-gradient(100deg,#f3f5fd,#a8b8ff 75%,#d1baff);color:transparent;background-clip:text}.welcome-sub{color:#939fb4;max-width:570px;font-size:15px;line-height:1.8;margin:0 0 30px}.suggestions{display:grid;grid-template-columns:1fr 1fr;gap:11px;max-width:680px}.suggestion{border:1px solid #2b3243;background:linear-gradient(140deg,rgba(29,35,49,.93),rgba(19,24,33,.8));border-radius:15px;padding:16px;min-height:118px;text-align:left;transition:background .12s,border-color .12s,transform .12s}.suggestion:hover{background:#222a3a;border-color:#4e5c88;transform:translateY(-1px)}.suggestion svg{width:18px;height:18px;color:#a7b8ff;margin-bottom:13px}.suggestion .s-name{font-weight:680;font-size:13px}.suggestion .s-desc{font-size:11px;color:#98a4b7;line-height:1.6;margin-top:5px}.suggestion:focus-visible{outline-offset:3px}
.composer-wrap{flex:0 0 auto;position:relative;z-index:1;padding:16px 34px 21px;background:linear-gradient(180deg,transparent,rgba(10,13,19,.97) 22%)}.composer-inner{max-width:870px;margin:0 auto}.composer{border:1px solid #353c4e;background:#171d29;border-radius:19px;box-shadow:0 10px 32px rgba(0,0,0,.16);padding:14px 14px 11px;transition:border-color .12s}.composer:focus-within{border-color:#62719e;box-shadow:var(--ring)}.composer textarea{display:block;width:100%;background:transparent;resize:none;min-height:49px;max-height:166px;padding:2px 4px;color:#f2f4fd;border:0;outline:none;line-height:1.6;font-size:14px}.composer textarea::placeholder{color:#77859c}.composer textarea:focus-visible{outline:none}.compose-controls{display:flex;align-items:center;justify-content:space-between;gap:8px}.compose-left,.compose-right{display:flex;align-items:center;gap:7px}.toolbtn{height:33px;display:flex;align-items:center;gap:6px;background:transparent;border:1px solid transparent;border-radius:9px;color:#a2afc2;padding:0 9px;font-size:12px;white-space:nowrap}.toolbtn:hover{background:#263044;color:#f8faff}.toolbtn.on{background:#293353;color:#cad3ff;border-color:#48547f}.toolbtn svg{width:16px;height:16px}.send{height:35px;min-width:88px;display:flex;align-items:center;justify-content:center;gap:8px;background:#bac4ff;color:#171b33;border:1px solid #d0d7ff;border-radius:10px;font-weight:750;font-size:12px;transition:filter .12s}.send:hover{filter:brightness(1.08)}.send svg{width:15px;height:15px}.compose-hint{text-align:center;color:#657287;font-size:10px;margin-top:11px;line-height:1.5}.mic-state{font-size:10px;color:#a1b2e3;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inspector{background:var(--side);border-left:1px solid var(--hair);padding:24px 19px 18px;overflow:auto;min-width:0;scrollbar-color:#343a4b transparent;scrollbar-width:thin}.inspector-heading{display:flex;align-items:center;justify-content:space-between}.inspector-heading h2{margin:0;font-size:13px;font-weight:710}.inspector-sub{font-size:11px;color:var(--muted);margin:5px 0 23px}.info-card{border:1px solid #293241;background:linear-gradient(145deg,#181f2c,#111720);border-radius:16px;padding:17px;margin-bottom:13px}.info-card .label-top{font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:#7f8ba2;font-weight:760}.info-card .big-title{font-size:15px;font-weight:700;margin:9px 0 4px;line-height:1.4}.info-card .small-copy{font-size:11px;color:#9facbe;line-height:1.7}.info-line{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:16px;padding-top:12px;border-top:1px solid #2b3443;font-size:11px;color:var(--soft)}.small-indicator{color:#98e1bc;font-size:10px}.inspector-section-title{margin:26px 2px 13px;display:flex;justify-content:space-between;align-items:center;color:#aeb9cb;font-size:12px;font-weight:720}.tiny-note{color:#6f7d91;font-size:10px;font-weight:500}.module-list{display:flex;flex-direction:column;gap:9px}.module-row{display:flex;align-items:flex-start;gap:10px;padding:9px 4px}.module-symbol{height:31px;width:31px;border:1px solid #323c51;background:#1d2635;border-radius:9px;display:grid;place-items:center;color:#98abef;flex-shrink:0}.module-symbol svg{width:15px;height:15px}.module-row .module-title{font-size:12px;font-weight:600;color:#dce3f0;line-height:1.3}.module-row .module-sub{font-size:10px;color:#8592a8;line-height:1.6;margin-top:4px}.planned-chip{margin-left:auto;flex-shrink:0;font-size:9px;color:#8e9ab2;border:1px solid #394252;border-radius:5px;padding:2px 5px}.planned-chip.ready{color:#90d6b3;border-color:#355749}.inspector-note{margin-top:28px;border-top:1px solid var(--hair);padding:16px 4px 0;font-size:11px;line-height:1.75;color:#7f8ba0}
.page{padding:38px clamp(24px,5vw,68px) 65px;overflow:auto}.page-inner{max-width:900px;margin:0 auto}.page-kicker{font-size:11px;text-transform:uppercase;font-weight:750;letter-spacing:.14em;color:#a4aff7;display:flex;gap:8px;align-items:center}.page-kicker svg{width:15px;height:15px}.page h1{font-size:clamp(28px,3.2vw,42px);letter-spacing:-.05em;line-height:1.2;margin:13px 0 10px}.page-lead{font-size:14px;max-width:680px;color:#9daabe;line-height:1.85;margin-bottom:31px}.field-label{display:block;font-weight:660;font-size:12px;color:#dbe2f3;margin-bottom:9px}.field{width:100%;border:1px solid #364154;border-radius:11px;background:#161d29;color:#f1f4ff;padding:12px 13px;outline:none}.field:focus{border-color:#8297de;box-shadow:var(--ring)}textarea.field{resize:vertical;min-height:130px;line-height:1.6}.field::placeholder{color:#718097}.panel{border:1px solid #303748;background:linear-gradient(155deg,#171d28,#10151e);padding:23px;border-radius:18px;margin-bottom:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-grid.three{grid-template-columns:1fr 1fr 1fr}.primary-action{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 18px;border-radius:11px;background:#b9c5ff;color:#171c37;border:1px solid #d1d9ff;font-weight:760}.primary-action:hover{filter:brightness(1.08)}.primary-action svg{width:16px;height:16px}.result{padding:17px 20px;border:1px solid #35445b;border-radius:14px;background:#151d2a;color:#cbd7ea;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.75;margin-top:17px}.result:empty{display:none}.disclaimer{color:#8c9bad;font-size:11px;line-height:1.7;margin-top:15px}.model-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.model-card{padding:15px;background:#19212e;border:1px solid #2c3848;border-radius:13px}.model-card strong{font-size:12px}.model-card span{display:block;color:#91a0b4;font-size:11px;margin-top:6px}.capabilities-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.cap-card{border:1px solid #2c3445;background:#161d29;border-radius:13px;padding:15px}.cap-card-title{font-size:12px;font-weight:650}.cap-card-note{font-size:11px;color:#8f9aab;line-height:1.7;margin-top:7px}.cap-state{font-size:10px;color:#b7bdee;margin-top:9px}.section-subtitle{font-size:16px;margin:32px 0 14px}
.modal-back{position:fixed;inset:0;z-index:30;background:rgba(2,4,9,.76);display:flex;justify-content:center;align-items:center;padding:18px;backdrop-filter:blur(5px)}.modal{width:100%;max-width:450px;background:#181e2a;border:1px solid #36425a;border-radius:20px;padding:27px;box-shadow:0 24px 90px #0008}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.modal h2{margin:0;font-size:21px;letter-spacing:-.035em}.modal p{color:#9ba8bc;font-size:13px;line-height:1.7;margin:10px 0 23px}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.secondary-action{padding:10px 17px;border-radius:10px;border:1px solid #444e61;background:#222b3a;color:#d4dced}.toast{position:fixed;z-index:50;bottom:25px;left:50%;transform:translateX(-50%);padding:11px 17px;background:#252e40;border:1px solid #55617c;border-radius:11px;color:#f4f5fe;font-size:12px;max-width:90vw;box-shadow:0 12px 36px #0007}
/* Narrow screens keep access to all sections; desktop uses the main sidebar. */
.mobile-nav{display:none}
@media(max-width:1250px){.app{grid-template-columns:228px minmax(0,1fr) 253px}.sidebar{padding-left:12px;padding-right:12px}.inspector{padding:22px 13px}.topbar{padding:0 23px}.composer-wrap{padding-left:25px;padding-right:25px}}
@media(max-width:1040px){.app{grid-template-columns:232px minmax(0,1fr)}.inspector{display:none}.welcome{max-width:720px}.topbar{padding:0 25px}}
@media(max-width:650px){.app{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) auto}.sidebar{padding:8px 13px;display:flex;flex-direction:row;align-items:center;border-right:0;border-bottom:1px solid var(--hair);gap:9px;overflow:visible}.brand{padding:0;margin-right:auto}.brand-mark{width:31px;height:31px}.brand-kicker{display:none}.brand-name{font-size:14px}.sidebar-btn,.sidebar .small-label,.project-list,.device-card,.sidebar-spacer,.sidebar-foot{display:none}.new-btn{margin:0;width:39px;height:36px;font-size:0;border-radius:10px}.new-btn svg{width:17px;height:17px}.topbar{height:58px;min-height:58px;padding:0 16px}.top-actions .pill{display:none}.bar-title{font-size:13px}.crumb-meta{font-size:10px}.welcome{padding:26px 20px}.welcome-orb{width:54px;height:54px;border-radius:17px;margin-bottom:23px;font-size:30px}.welcome-sub{font-size:13px}.suggestions{gap:8px}.suggestion{min-height:106px;padding:13px}.suggestion .s-name{font-size:12px}.suggestion .s-desc{font-size:10px}.messages{padding:24px 16px;gap:23px}.composer-wrap{padding:11px 12px 15px}.toolbtn span{display:none}.composer{padding:11px 10px 8px}.toolbtn{padding:0 7px}.send{min-width:70px}.page{padding:26px 17px 50px}.panel{padding:17px}.form-grid,.form-grid.three,.capabilities-grid,.model-list{grid-template-columns:1fr}.mic-state{max-width:90px}}
@media(max-width:650px){.mobile-nav{display:flex;grid-row:3;background:#0d1017;border-top:1px solid var(--hair);gap:4px;justify-content:space-evenly;padding:6px 8px max(7px,env(safe-area-inset-bottom))}.mobile-nav button{display:flex;flex:1;min-width:0;gap:4px;flex-direction:column;align-items:center;justify-content:center;background:transparent;border:1px solid transparent;color:#97a5bd;font-size:10px;border-radius:10px;min-height:47px}.mobile-nav button svg{width:17px;height:17px}.mobile-nav button.active{background:#202a41;color:#e4e9ff;border-color:#343e5f}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}

/* v0.3.1 — The composer stays visible; ONLY the conversation viewport scrolls. */
.message-copy p{margin:0 0 12px;line-height:1.76}
.message-copy p:last-child{margin-bottom:0}
.message-copy h2{font-size:18px;font-weight:750;line-height:1.35;margin:19px 0 9px;color:#eff2ff}
.message-copy h3{font-size:15px;font-weight:710;line-height:1.4;margin:16px 0 8px;color:#e9efff}
.message-copy h4{font-size:14px;font-weight:700;margin:12px 0 7px;color:#e9efff}
.message-copy ul,.message-copy ol{margin:6px 0 16px;padding-left:24px}
.message-copy li{margin:5px 0;line-height:1.7}
.message-copy strong{color:#f4f5ff;font-weight:710}
.message-copy blockquote{border-left:2px solid #7083d5;background:rgba(108,129,217,.07);padding:8px 14px;color:#bdc9e4;margin:12px 0}
.message-copy code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em;color:#dce4ff;background:#242d42;padding:2px 5px;border-radius:5px;overflow-wrap:anywhere}
.message-copy .code-panel{background:#0b101a;border:1px solid #343e55;border-radius:12px;margin:12px 0 18px;overflow:hidden}
.message-copy .code-bar{display:flex;align-items:center;justify-content:space-between;padding:7px 11px;background:#171e2c;color:#94a6c1;font-size:11px}
.message-copy .code-copy{border:1px solid #35435c;border-radius:7px;background:#222d41;padding:4px 9px;font-size:11px;color:#dbe4f7}
.message-copy pre{margin:0;padding:14px;overflow:auto;white-space:pre;max-width:100%;font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;color:#d6e2f8}
.message-copy pre code{padding:0;background:none;color:inherit;font-size:inherit;overflow-wrap:normal}
.message-copy hr{height:1px;border:0;background:#2e394e;margin:15px 0}
.message-copy .plain-line{white-space:pre-wrap}
@media(max-height:650px){.composer-wrap{padding-top:6px;padding-bottom:7px}.composer{padding:8px 11px 7px}.composer textarea{min-height:30px;max-height:85px}.compose-hint{display:none}}
.research-sources{display:grid;gap:10px}.research-source{border:1px solid #303c51;background:#151d2a;border-radius:12px;padding:15px}.research-source a{color:#b9c8ff;font-size:13px;font-weight:650;overflow-wrap:anywhere}.research-source .research-note{color:#899cb4;font-size:11px;line-height:1.6;margin:5px 0 0}.research-source p{margin:9px 0 0}
.model-select{max-width:135px!important;width:135px!important;font-size:11px;padding:7px 5px;background:#202838;border-color:#3c475d}.mode-select{max-width:117px!important;width:117px!important;font-size:11px;padding:7px 5px;background:#202838;border-color:#3c475d}.model-chip{color:#8595b8;font-size:11px;font-weight:500}.analysis-panel{margin-top:13px;border:1px solid #354365;border-radius:12px;background:#121b2a;overflow:hidden}.analysis-panel>summary{cursor:pointer;padding:12px 14px;color:#b9caff;font-size:12px;font-weight:650;list-style:none}.analysis-panel>summary:after{content:' ▾';float:right}.analysis-panel[open]>summary:after{content:' ▴'}.analysis-content{padding:0 14px 13px;border-top:1px solid #2c3d57}.analysis-caption{font-size:11px;color:#92a3be;margin:12px 0}.analysis-original{margin-top:14px;font-size:11px;color:#aab6ca}.analysis-original summary{cursor:pointer;padding:7px}.analysis-original pre{max-height:220px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:7px;background:#080d14;padding:10px;color:#9baac4}.compose-right{flex-wrap:wrap;justify-content:flex-end}.analysis-panel .message-copy{font-size:12px;color:#d6deed}
@media(max-width:760px){.model-select{max-width:108px!important;width:108px!important}.mode-select{max-width:104px!important;width:104px!important}.composer-wrap{padding-left:9px;padding-right:9px}.compose-controls{flex-wrap:wrap}}

/* Cortex v0.6 — Obsidian / Electric Purple design system & motion */
:root{--bg:#08060e;--side:#090610;--surface:#110b1a;--surface2:#1a1029;--surface3:#25183a;--hair:#2b1b43;--text:#f7f2ff;--muted:#ada1c6;--soft:#d6c7ec;--blue:#a970ff;--violet:#a449ff;--good:#7ce7c1;--ring:0 0 0 3px rgba(157,72,255,.2)}
body{background:#08060d;color:var(--text)}
.sidebar{background:linear-gradient(165deg,#0b0812,#0a0612 68%,#120920);border-right-color:#321c4b}
.brand-mark,.welcome-orb{background:radial-gradient(circle at 24% 18%,#ddb5ff 0%,#8a39ff 39%,#4b14a7 90%);box-shadow:0 10px 30px rgba(111,34,255,.36),inset 0 1px 1px #ffffff55;color:#fff}
.brand-name span{color:#c28bff!important}
.sidebar-btn{color:#b9a9d0;transition:background .24s,color .24s,transform .24s,border-color .24s}
.sidebar-btn:hover{background:#211234;color:white;transform:translateX(3px)}
.sidebar-btn.active{background:linear-gradient(100deg,rgba(110,38,221,.36),rgba(44,21,80,.55));border-color:#6332a4;color:#fff;box-shadow:inset 3px 0 #a560ff,0 6px 20px #3a10762c}
.sidebar-btn.active svg{color:#c792ff}.new-btn,.primary-action,.send{background:linear-gradient(120deg,#6124d6,#8f38ff 63%,#a359fc);color:white;border:1px solid #ac6bff;box-shadow:0 8px 25px rgba(102,35,213,.22);transition:transform .22s,box-shadow .22s,filter .22s}
.new-btn:hover,.primary-action:hover,.send:hover{filter:brightness(1.13);transform:translateY(-2px);box-shadow:0 12px 35px rgba(144,45,255,.3)}
.main{background:radial-gradient(ellipse 72% 50% at 55% -21%,rgba(126,38,255,.19),transparent 76%),radial-gradient(ellipse 46% 46% at 103% 91%,rgba(97,28,205,.07),transparent),#090610}
.main:before{content:'';position:absolute;right:11%;top:-16%;width:290px;height:290px;background:radial-gradient(circle,rgba(138,51,245,.08),transparent 70%);pointer-events:none;animation:ambient-glow 10s ease-in-out infinite alternate}
.topbar{background:#0d0915dc;backdrop-filter:blur(16px);border-color:#301d45;position:relative;z-index:1}
.pill{background:#11231f;border-color:#315747}.device-card,.info-card,.panel,.model-card,.cap-card,.suggestion{background:linear-gradient(155deg,#1b1028,#110b1c 85%);border-color:#342149;box-shadow:0 10px 38px rgba(0,0,0,.1)}
.device-card{border-color:#382453}.sidebar-foot{border-color:#382453}
.page-kicker{color:#be8bff}.page-lead{color:#b7a8ce}
.page h1,.welcome h1{color:#f8f2ff}.gradient-text{background:linear-gradient(110deg,#fff,#bd87ff 68%,#e3b7ff);background-clip:text}
.field,.composer,.research-follow-composer{background:#170f22;border-color:#4d2b70;color:#f9f4ff}
.field:focus,.composer:focus-within,.research-follow-composer:focus-within{border-color:#a757ff;box-shadow:var(--ring)}
.field::placeholder,.composer textarea::placeholder{color:#927eab}
.model-select,.mode-select,#provider{background:#211330!important;border-color:#573374!important;color:#e9dafa!important}
.research-source{background:#181020;border-color:#41265c;transition:transform .2s,border-color .2s,box-shadow .2s}
.research-source:hover{border-color:#7942c4;transform:translateY(-2px);box-shadow:0 12px 35px #0005}
.research-source a,a{color:#cf9dff}
.message-title{color:#e5d9f2}.avatar.ai{background:linear-gradient(145deg,#b569ff,#6625d8);color:white}.avatar.me{background:#2b173d;border-color:#633391;color:#eedcfa}
.message-copy{color:#e7dbef}.message.me .message-copy{color:#f6edff}.message-copy strong{color:#fff}
.message-copy h2,.message-copy h3,.message-copy h4{color:#f2e1ff}.message-copy code{color:#dec1ff;background:#29173e}
.message-copy .code-panel{background:#0e0915;border-color:#442662}.message-copy .code-bar{background:#21132f}.message-copy pre{color:#ead8fc}
.analysis-panel{border-color:#663a9d;background:#180d27}.analysis-panel>summary{color:#d8b2ff}.analysis-content{border-color:#472d69}
.composer-wrap{background:linear-gradient(180deg,transparent,#0b0715f8 30%)}.compose-hint{color:#9480aa}
.suggestion{transition:transform .25s,box-shadow .25s,border-color .25s,background .25s}.suggestion:hover,.model-card:hover,.cap-card:hover{border-color:#7541b8;box-shadow:0 14px 40px rgba(70,20,130,.22)}
.suggestion:hover{background:#221333;transform:translateY(-4px)}
.inspector{background:linear-gradient(175deg,#100a1a,#090711);border-left-color:#302040}
.message,.panel,.info-card,.model-card,.cap-card{animation:rise-in .38s ease both}
.stage:not(.hide) .page-inner>*{animation:rise-in .42s ease both}
.stage:not(.hide) .page-inner>*:nth-child(2){animation-delay:.055s}.stage:not(.hide) .page-inner>*:nth-child(3){animation-delay:.11s}.stage:not(.hide) .page-inner>*:nth-child(4){animation-delay:.155s}
.stage:not(.hide){animation:tab-in .28s ease both}
.welcome-orb{animation:orb-float 7s ease-in-out infinite}
.pulse:not(.offline){animation:beacon 2.4s ease-in-out infinite}
.btn-icon,.toolbtn,.secondary-action,.project-item,.code-copy{transition:background .2s,transform .2s,border-color .2s}
.btn-icon:hover,.toolbtn:hover,.secondary-action:hover,.project-item:hover{transform:translateY(-1px);background:#271638;color:white}
.toast{background:#20122f;border-color:#7a41b9}.modal{background:#160e21;border-color:#653691}
.mobile-nav{background:#100a19!important;border-top-color:#3b2354!important}.mobile-nav button.active{background:#36184e!important;color:#f7eaff!important;border-color:#8450ae!important}
.research-history{display:flex;align-items:end;gap:10px;margin-bottom:20px}.research-history .history-field{flex:1;min-width:0}
.research-report-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.research-secondary{padding:9px 14px;border:1px solid #5c347d;background:#251436;color:#ddc2ff;border-radius:11px;font-weight:650;font-size:12px}
.research-secondary:hover{background:#3a1d58}
.research-thread{display:flex;flex-direction:column;gap:16px;margin:16px 0 2px}
.research-turn{border-radius:13px;padding:13px 15px;line-height:1.7;border:1px solid #452a64;background:#1b112a}
.research-turn.user{margin-left:9%;background:#302045;border-color:#67448c}
.research-turn-title{font-size:11px;font-weight:760;color:#c7a0ee;margin-bottom:7px}
.research-follow-wrap{flex:0 0 auto;background:linear-gradient(180deg,transparent,#10091adf 17%);padding:12px clamp(18px,5vw,60px) 18px;border-top:1px solid #341f49}
.research-follow-inner{max-width:900px;margin:auto}.research-follow-composer{display:flex;align-items:flex-end;gap:12px;border:1px solid #583376;border-radius:15px;padding:10px 12px;background:#190f27;box-shadow:0 6px 30px #0004}
.research-follow-composer textarea{flex:1;min-width:0;resize:vertical;max-height:130px;min-height:44px;border:0;outline:none;background:none;color:white;font:inherit;line-height:1.6;padding:8px}
.research-follow-composer textarea::placeholder{color:#aa93c5}.research-follow-composer textarea:focus-visible{outline:none}
.research-follow-note{color:#a18ab9;font-size:11px;margin-top:7px}
.research-panel-small{border:1px solid #4b286a;background:#170e23;border-radius:15px;padding:17px;margin-top:22px}
@keyframes rise-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes tab-in{from{opacity:.55;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes orb-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes ambient-glow{from{transform:translate(-10px,-10px)}to{transform:translate(30px,22px)}}
@keyframes beacon{0%,100%{box-shadow:0 0 0 3px rgba(124,231,193,.06)}50%{box-shadow:0 0 0 7px rgba(124,231,193,.12)}}
@media(max-width:760px){.research-history{flex-direction:column;align-items:stretch}.research-follow-wrap{padding:10px}.research-follow-composer{flex-wrap:wrap}.research-follow-composer .primary-action{width:100%}.research-turn.user{margin-left:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Simeon Research Chat v0.6.1 — same conversation-first structure as Cortex */
.research-chat-stage{background:radial-gradient(ellipse 70% 43% at 45% -35%,#6323a932,transparent),#0a0611}
.research-chat-top{min-height:67px;padding:10px clamp(16px,3vw,34px);border-bottom:1px solid #2b1841;display:flex;justify-content:space-between;align-items:center;gap:14px;position:relative;z-index:2;background:#100919b3;backdrop-filter:blur(12px)}
.research-chat-heading{display:flex;align-items:center;gap:11px;min-width:0}.research-chat-heading strong{font-size:13px;font-weight:720;display:block}.research-chat-heading small{display:block;color:#a997bf;font-size:11px;margin-top:2px}
.research-chat-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid #67359a;border-radius:12px;background:#28113e;color:#c990ff}.research-chat-icon svg{width:18px;height:18px}
.research-top-actions{display:flex;align-items:center;gap:8px;min-width:0}.research-saved-select{border:1px solid #513076;border-radius:10px;background:#1b0f2a;color:#e9d9ff;font-size:12px;max-width:210px;min-width:105px;height:35px;padding:0 8px}.research-top-button,.research-new-button{white-space:nowrap;border:1px solid #59347d;border-radius:10px;background:#20112f;color:#edddff;height:35px;padding:0 12px;font-size:12px;font-weight:650}.research-new-button{background:linear-gradient(115deg,#50209c,#8132d9);border-color:#9250ee;display:flex;gap:6px;align-items:center}.research-new-button svg{width:15px;height:15px}.research-top-button:hover,.research-new-button:hover{filter:brightness(1.18)}
.research-chat-scroll{scrollbar-color:#583574 transparent}.research-conversation{max-width:930px;padding:30px clamp(18px,4vw,42px) 28px;margin:0 auto;min-height:100%;display:flex;flex-direction:column;gap:24px}
.research-chat-welcome{margin:auto;text-align:center;padding:36px 8px 32px;max-width:730px;animation:rise-in .45s ease both}.research-glow-mark{height:70px;width:70px;margin:0 auto 22px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(135deg,#af65ff,#5222b5 65%,#2d0b61);box-shadow:0 0 70px #7730eb4d,0 15px 45px #0008;animation:orb-float 7s ease-in-out infinite}.research-glow-mark svg{height:28px;width:28px;color:white}.research-welcome-kicker{font-size:10px;letter-spacing:.22em;color:#ad7ae3;font-weight:800}.research-chat-welcome h1{font-size:clamp(28px,3.5vw,43px);letter-spacing:-.05em;margin:12px 0 9px;line-height:1.16}.research-chat-welcome h1 span{color:#bd82ff}.research-chat-welcome p{line-height:1.75;color:#b0a0c4;font-size:14px;max-width:535px;margin:0 auto 29px}.research-prompt-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.research-prompt-cards button{text-align:left;min-height:84px;border:1px solid #38214f;border-radius:14px;background:#1b1026cc;padding:15px;color:#e9d8ff;font-size:12px;line-height:1.4;font-weight:650;transition:transform .2s,border-color .2s,background .2s}.research-prompt-cards button svg{color:#b780ff;width:18px;height:18px;margin-bottom:10px}.research-prompt-cards button:hover{transform:translateY(-3px);border-color:#9a5bef;background:#28143c}
.research-chat-entry{display:flex;align-items:flex-start;gap:14px;animation:rise-in .3s ease both}.research-chat-entry>.avatar{margin-top:2px}.research-entry-body{flex:1;min-width:0}.research-entry-name{font-weight:760;font-size:12px;margin-bottom:10px;color:#f1e5ff}.research-entry-name span{font-weight:500;color:#a68abc}.research-user-text{font-size:14px;white-space:pre-wrap;line-height:1.8;overflow-wrap:anywhere;color:#f0e5fa}.research-chat-entry.assistant .message-copy{font-size:14px;line-height:1.85}
.research-thread{display:flex;flex-direction:column;gap:27px;margin:0}.research-thread .research-chat-entry{padding:0;background:none;border:none}.research-chat-entry .research-sources-details{margin:25px 0 12px;border:1px solid #452565;border-radius:14px;background:#160e20;overflow:hidden}.research-sources-details summary{display:flex;gap:9px;align-items:center;padding:13px 16px;color:#d6b6f8;cursor:pointer;font-size:12px;font-weight:720;list-style:none}.research-sources-details summary::-webkit-details-marker{display:none}.research-sources-details summary svg{width:16px;height:16px}.source-chevron{margin-left:auto}.research-sources-details[open] .source-chevron{transform:rotate(180deg)}.research-sources{padding:0 14px 14px}.research-source{padding:12px!important;margin-top:8px}.research-link-chat{background:none;color:#b88bec;border:0;font-size:12px;padding:8px 0;font-weight:660}.research-link-chat:hover{color:#e7cbff}.research-link-chat span{margin-left:4px}
.research-compose-wrap{position:relative;z-index:2;flex:0 0 auto;padding:12px clamp(16px,3vw,34px) 14px;background:linear-gradient(180deg,transparent,#0b0612f7 21%)}.research-compose-inner{max-width:890px;margin:auto}.research-compose-card{border:1px solid #59357c;background:#1b1027;border-radius:21px;padding:12px 14px 10px;box-shadow:0 12px 55px #0008,0 0 30px #61249f1a}.research-compose-card:focus-within{border-color:#a257f0;box-shadow:0 0 0 3px #893bf923,0 12px 55px #0008}.research-compose-card textarea{display:block;width:100%;max-height:125px;min-height:55px;border:0;outline:none;background:transparent;color:white;resize:vertical;padding:4px;font:inherit;font-size:14px;line-height:1.65}.research-compose-card textarea::placeholder{color:#a290b9}.research-compose-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.research-compose-settings{display:flex;gap:9px;align-items:center}.research-web-chip{display:flex;align-items:center;gap:5px;border-radius:100px;background:#281439;color:#cfacfb;font-weight:690;font-size:11px;padding:7px 10px}.research-web-chip svg{width:14px;height:14px}.research-compose-tools select{background:#241233;color:#dbbafc;border:1px solid #4c2d65;border-radius:9px;font-size:11px;padding:7px 9px}.research-send{background:#8b38ea;color:#fff;border:1px solid #b26aff;border-radius:10px;font-size:12px;font-weight:780;display:flex;align-items:center;gap:9px;height:36px;padding:0 14px;transition:transform .2s,background .2s}.research-send svg{width:15px;height:15px}.research-send:hover{background:#a14aff;transform:translateY(-1px)}.research-send:disabled{opacity:.62}.research-helper{text-align:center;font-size:11px;color:#8c759f;margin:8px auto 0;line-height:1.4}.research-error{border:1px solid #b15d75;border-radius:12px;background:#2a1425;color:#ffc8d5;padding:14px 17px;font-size:13px;line-height:1.7;margin-left:40px}.research-error strong{display:block;margin-bottom:3px;color:#ffe8ee}
@media(max-width:980px){.research-chat-heading small{display:none}.research-saved-select{max-width:155px}}
@media(max-width:710px){.research-chat-top{flex-wrap:wrap}.research-top-actions{width:100%}.research-saved-select{flex:1;max-width:none}.research-top-button{display:none}.research-prompt-cards{grid-template-columns:1fr}.research-prompt-cards button{min-height:58px}.research-glow-mark{width:56px;height:56px;border-radius:17px}.research-compose-wrap{padding:8px 11px 10px}.research-conversation{padding:20px 15px 32px}.research-chat-entry{gap:10px}.research-chat-welcome{padding:14px 0}.research-chat-welcome p{font-size:13px}.research-new-button span{font-size:11px}}
@media(prefers-reduced-motion:reduce){.research-chat-welcome,.research-chat-entry,.research-glow-mark,.research-prompt-cards button{animation:none!important;transition:none!important}}

/* SIMEON COSMOS 0.7 — UI presentation; no backend or network calls. */
:root{--cosmic-accent:#8c3cff;--cosmic-border:rgba(165,108,255,.32);--cosmic-glow:rgba(119,51,255,.23);--cosmic-glass:rgba(12,8,24,.83)}
body[data-cosmos-theme="dark"]{color-scheme:dark;--bg:#06040d;--side:#080610;--surface:#110d20;--surface2:#18102c;--surface3:#21143a;--hair:#302044;--text:#f9f6ff;--muted:#aaa0be;--soft:#d5c6eb;--blue:#bf86ff;--violet:#a94cff;--ring:0 0 0 3px rgba(170,87,255,.2)}
body[data-cosmos-theme="light"]{color-scheme:light;--bg:#f6f4ff;--side:#faf9ff;--surface:#fff;--surface2:#f4f1ff;--surface3:#eae5fb;--hair:#e6dff2;--text:#201537;--muted:#645d7b;--soft:#4d4168;--blue:#6c24e7;--violet:#7d35e9;--good:#008568;--ring:0 0 0 3px rgba(117,53,221,.2);--cosmic-glass:rgba(255,255,255,.8);--cosmic-border:rgba(119,61,234,.22);--cosmic-glow:rgba(150,97,255,.13)}
body{background:var(--bg);color:var(--text);transition:background .35s ease,color .35s ease}
.app{background:var(--bg)}
.sidebar,.inspector{background:var(--side);border-color:var(--hair)}
body[data-cosmos-theme="dark"] .sidebar,body[data-cosmos-theme="dark"] .inspector{background:#07050e}
body[data-cosmos-theme="dark"] .sidebar-btn.active,body[data-cosmos-theme="dark"] .project-item.active,body[data-cosmos-theme="dark"] .mobile-nav button.active{background:linear-gradient(95deg,#5420ac,#271342);border-color:#9954ff;color:#fff;box-shadow:0 0 20px #772bf038}
body[data-cosmos-theme="dark"] .new-btn,body[data-cosmos-theme="dark"] .primary-action,body[data-cosmos-theme="dark"] .send{background:linear-gradient(120deg,#6d20e9,#aa40f4);border-color:#ab5cff;color:white;box-shadow:0 6px 23px rgba(119,29,245,.28)}
body[data-cosmos-theme="dark"] .brand-mark,body[data-cosmos-theme="dark"] .avatar.ai{background:linear-gradient(135deg,#debeff,#943efa 63%,#5a1abc);color:#fff}
.main{isolation:isolate;background:var(--bg)!important}
.main>.cosmos-scene{position:absolute;z-index:0;inset:0;overflow:hidden;pointer-events:none;contain:layout paint}
.main>:not(.cosmos-scene){position:relative;z-index:1}
.cosmos-scene .cosmos-starfield{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:.83}
.cosmos-galaxy{position:absolute;right:-9%;top:8%;width:min(61vw,680px);aspect-ratio:1;border-radius:50%;opacity:.67;transform:rotate(-18deg);background:radial-gradient(ellipse at 52% 49%,rgba(255,255,255,.75) 0%,rgba(205,177,255,.88) 1.1%,rgba(132,49,255,.58) 2.2%,transparent 6%),repeating-conic-gradient(from 10deg at 50% 50%,transparent 0deg 16deg,rgba(151,73,255,.14) 22deg 25deg,transparent 35deg 54deg),radial-gradient(ellipse 56% 24% at 50% 50%,rgba(173,97,255,.31),rgba(40,13,91,.22) 59%,transparent 100%);filter:drop-shadow(0 0 35px rgba(119,52,255,.19));animation:cosmos-galaxy-drift 100s ease-in-out infinite alternate}
.cosmos-aurora{position:absolute;inset:-10%;background:radial-gradient(ellipse 45% 37% at 25% 25%,rgba(122,56,225,.16),transparent 82%),radial-gradient(ellipse 37% 52% at 77% 64%,rgba(89,31,173,.17),transparent 79%),linear-gradient(110deg,rgba(4,4,9,.04),transparent 75%);animation:cosmos-aurora-breathe 28s ease-in-out infinite alternate}
.cosmos-orbit{position:absolute;right:-14%;top:5%;width:min(65vw,760px);aspect-ratio:1;border:1px solid rgba(187,112,255,.17);border-radius:50%;transform:rotate(-23deg) scaleY(.42);box-shadow:0 0 25px rgba(141,62,234,.05),inset 0 0 30px rgba(182,124,248,.09);animation:cosmos-orbit-float 48s linear infinite}
.cosmos-planet{position:absolute;bottom:-170px;left:-165px;width:370px;height:370px;border-radius:50%;background:radial-gradient(circle at 28% 25%,rgba(192,142,255,.4),transparent 42%),radial-gradient(circle at 60% 50%,#1b1642,#100821 62%,#08040f 85%);box-shadow:0 0 0 2px rgba(186,100,255,.31),0 0 45px rgba(135,79,251,.32),inset -60px -30px 80px rgba(0,0,0,.65);opacity:.72;animation:cosmos-planet-drift 52s ease-in-out infinite alternate}
.cosmos-ship{position:absolute;right:9%;top:130px;width:118px;height:76px;filter:drop-shadow(0 0 12px rgba(185,115,255,.5));transform-origin:center;animation:cosmos-ship-cruise 10s ease-in-out infinite alternate}
.cosmos-ship svg{height:100%;width:100%;overflow:visible}.cosmos-ship .engine{animation:cosmos-flame 1s ease-in-out infinite alternate;transform-origin:20% 50%}
.cosmos-ship-trail{position:absolute;width:95px;height:4px;top:52%;left:-79px;transform:rotate(12deg);transform-origin:right;background:linear-gradient(90deg,transparent,#7b46ebaa,#d09fff);filter:blur(2px);border-radius:100%;animation:cosmos-trail 1.4s ease-in-out infinite alternate}
.cosmos-activity{position:absolute;z-index:4;top:86px;right:24px;display:flex;align-items:center;gap:9px;max-width:min(340px,65vw);padding:9px 13px;border:1px solid var(--cosmic-border);border-radius:999px;color:var(--text);background:var(--cosmic-glass);box-shadow:0 7px 24px rgba(0,0,0,.17),0 0 21px var(--cosmic-glow);backdrop-filter:blur(12px);font-size:11px;letter-spacing:.01em;opacity:0;transform:translateY(-8px);transition:opacity .24s,transform .24s;pointer-events:none}
.cosmos-activity.visible{opacity:1;transform:translateY(0)}.cosmos-activity-dot{width:7px;height:7px;border-radius:50%;background:#ab56ff;box-shadow:0 0 10px #aa42f5;animation:cosmos-twinkle 1.9s ease-in-out infinite}.cosmos-activity.finished .cosmos-activity-dot{background:#46d8a9;box-shadow:0 0 12px #3edf91}
.cosmos-scene.working .cosmos-ship{animation:cosmos-ship-working 3.1s ease-in-out infinite alternate;filter:drop-shadow(0 0 21px rgba(197,114,255,.95))}.cosmos-scene.working .cosmos-ship-trail{width:190px;left:-175px;opacity:.95}.cosmos-scene.complete .cosmos-ship{animation:cosmos-ship-complete .9s ease-out both}
.topbar{background:var(--cosmic-glass);backdrop-filter:blur(18px);border-color:var(--hair);min-height:66px;height:66px}
.cosmos-controls{display:flex;align-items:center;gap:7px;flex-shrink:0}.cosmos-btn{background:var(--cosmic-glass);border:1px solid var(--cosmic-border);height:35px;display:flex;align-items:center;gap:7px;padding:0 10px;border-radius:11px;color:var(--text);font-size:11px;font-weight:640;box-shadow:0 0 15px var(--cosmic-glow)}.cosmos-btn:hover{border-color:#ad70ff}.cosmos-btn svg{height:17px;width:17px}.cosmos-btn .tiny{font-size:12px}.cosmos-theme-label{font-size:11px}
body[data-cosmos-theme="dark"] .brand-kicker,body[data-cosmos-theme="dark"] .welcome-eyebrow,body[data-cosmos-theme="dark"] .page-kicker{color:#c9a1ff}
body[data-cosmos-theme="dark"] .device-card,body[data-cosmos-theme="dark"] .info-card,body[data-cosmos-theme="dark"] .panel{background:rgba(16,11,29,.87);border-color:#372150}
body[data-cosmos-theme="dark"] .composer,body[data-cosmos-theme="dark"] .research-compose-card{background:rgba(21,10,36,.94);border-color:#7237bd;box-shadow:0 0 29px rgba(132,53,252,.12)}
body[data-cosmos-theme="dark"] .composer-wrap,body[data-cosmos-theme="dark"] .research-compose-wrap{background:linear-gradient(180deg,transparent,#08040cf7 32%)}
body[data-cosmos-theme="dark"] .research-chat-stage{background:transparent}
body[data-cosmos-theme="dark"] .research-chat-top{background:rgba(10,6,22,.87);border-color:#42255c}
body[data-cosmos-theme="dark"] .research-sources-details,body[data-cosmos-theme="dark"] .research-source{background:rgba(16,10,30,.93)}
body[data-cosmos-theme="dark"] .research-chat-welcome h1 span{color:#c490ff}
body[data-cosmos-theme="dark"] .welcome-orb{box-shadow:0 0 50px rgba(132,40,247,.27)}
/* Separate cosmic daylight: white surfaces retain high contrast, galaxies are decorative only. */
body[data-cosmos-theme="light"] .main{background:#f9f8ff!important}
body[data-cosmos-theme="light"] .cosmos-scene .cosmos-starfield{opacity:.48}
body[data-cosmos-theme="light"] .cosmos-galaxy{opacity:.35;filter:saturate(.85) blur(.4px)}
body[data-cosmos-theme="light"] .cosmos-aurora{background:radial-gradient(ellipse 40% 38% at 29% 22%,rgba(192,164,255,.35),transparent 80%),radial-gradient(ellipse 55% 40% at 75% 67%,rgba(203,175,255,.4),transparent 90%)}
body[data-cosmos-theme="light"] .cosmos-orbit{border-color:rgba(111,55,213,.21)}
body[data-cosmos-theme="light"] .cosmos-planet{opacity:.19;filter:saturate(.72)}
body[data-cosmos-theme="light"] .sidebar,body[data-cosmos-theme="light"] .inspector,body[data-cosmos-theme="light"] .mobile-nav{background:rgba(255,255,255,.91)!important;border-color:#dfd8ec}
body[data-cosmos-theme="light"] .topbar,body[data-cosmos-theme="light"] .research-chat-top{background:rgba(255,255,255,.83)!important;border-color:#e6def2;color:#2c2040}
body[data-cosmos-theme="light"] .bar-title,body[data-cosmos-theme="light"] .inspector-heading,body[data-cosmos-theme="light"] .message-title,body[data-cosmos-theme="light"] .research-entry-name,body[data-cosmos-theme="light"] .welcome h1,body[data-cosmos-theme="light"] .research-chat-heading strong,body[data-cosmos-theme="light"] .page h1{color:#251638}
body[data-cosmos-theme="light"] .message-copy,body[data-cosmos-theme="light"] .message.me .message-copy,body[data-cosmos-theme="light"] .research-user-text,body[data-cosmos-theme="light"] .research-chat-entry.assistant .message-copy{color:#2b2141}
body[data-cosmos-theme="light"] .welcome-sub,body[data-cosmos-theme="light"] .research-chat-welcome p,body[data-cosmos-theme="light"] .small-copy,body[data-cosmos-theme="light"] .page-lead,body[data-cosmos-theme="light"] .device-status{color:#625475}
body[data-cosmos-theme="light"] .gradient-text{background:linear-gradient(105deg,#38205a,#8b4dec);background-clip:text;color:transparent}
body[data-cosmos-theme="light"] .sidebar-btn,body[data-cosmos-theme="light"] .project-item,body[data-cosmos-theme="light"] .toolbtn{color:#625779}
body[data-cosmos-theme="light"] .sidebar-btn:hover,body[data-cosmos-theme="light"] .project-item:hover,body[data-cosmos-theme="light"] .toolbtn:hover{background:#eee8fa;color:#3e196f}
body[data-cosmos-theme="light"] .sidebar-btn.active,body[data-cosmos-theme="light"] .project-item.active,body[data-cosmos-theme="light"] .mobile-nav button.active{background:#ece3ff!important;border-color:#ae85f8!important;color:#4d1b9a!important;box-shadow:0 0 16px #a97bfc19}
body[data-cosmos-theme="light"] .new-btn,body[data-cosmos-theme="light"] .primary-action,body[data-cosmos-theme="light"] .send{background:linear-gradient(110deg,#7020dc,#a53afa);color:#fff;border-color:#8b42e1}
body[data-cosmos-theme="light"] .brand-mark,body[data-cosmos-theme="light"] .avatar.ai{background:linear-gradient(135deg,#ddc5ff,#8c34dc);color:#fff}
body[data-cosmos-theme="light"] .info-card,body[data-cosmos-theme="light"] .panel,body[data-cosmos-theme="light"] .device-card,body[data-cosmos-theme="light"] .suggestion,body[data-cosmos-theme="light"] .research-prompt-cards button{background:rgba(255,255,255,.85)!important;border-color:#e0d5f0!important;color:#2a1d44}
body[data-cosmos-theme="light"] .info-card .big-title,body[data-cosmos-theme="light"] .suggestion .s-name,body[data-cosmos-theme="light"] .panel h2{color:#2b1b45}
body[data-cosmos-theme="light"] .composer-wrap,body[data-cosmos-theme="light"] .research-compose-wrap{background:linear-gradient(180deg,transparent,rgba(250,248,255,.97) 24%)}
body[data-cosmos-theme="light"] .composer,body[data-cosmos-theme="light"] .research-compose-card{background:rgba(255,255,255,.94)!important;border-color:#ba99ee!important;box-shadow:0 8px 30px #4b297012}
body[data-cosmos-theme="light"] .composer textarea,body[data-cosmos-theme="light"] .research-compose-card textarea,body[data-cosmos-theme="light"] .field{color:#221639!important;background:rgba(255,255,255,.94)!important;border-color:#ddd1ef!important}
body[data-cosmos-theme="light"] .composer textarea::placeholder,body[data-cosmos-theme="light"] .research-compose-card textarea::placeholder{color:#887c9e}
body[data-cosmos-theme="light"] .field,body[data-cosmos-theme="light"] .research-compose-tools select,body[data-cosmos-theme="light"] .research-saved-select,body[data-cosmos-theme="light"] .research-top-button{background:#fff!important;color:#332449!important;border-color:#d6c8eb!important}
body[data-cosmos-theme="light"] .research-chat-stage{background:transparent}
body[data-cosmos-theme="light"] .research-user-text,body[data-cosmos-theme="light"] .research-chat-entry.user .research-entry-body{color:#28193e}
body[data-cosmos-theme="light"] .research-sources-details,body[data-cosmos-theme="light"] .research-source,body[data-cosmos-theme="light"] .research-user-text,body[data-cosmos-theme="light"] .research-answer-card{background:rgba(255,255,255,.85)!important;border-color:#e5d9f2!important}
body[data-cosmos-theme="light"] .research-sources-details summary{color:#6726be}
body[data-cosmos-theme="light"] .research-source a{color:#5522a7}
body[data-cosmos-theme="light"] .research-source p,body[data-cosmos-theme="light"] .research-source .research-note{color:#5d506e}
body[data-cosmos-theme="light"] .research-web-chip{background:#f0e5ff;color:#651ebc}
body[data-cosmos-theme="light"] .research-chat-welcome h1{color:#29163f}
body[data-cosmos-theme="light"] .research-chat-welcome h1 span{color:#6724d6}
body[data-cosmos-theme="light"] .research-helper,body[data-cosmos-theme="light"] .compose-hint{color:#73668a}
body[data-cosmos-theme="light"] .research-entry-name span,body[data-cosmos-theme="light"] .research-chat-heading small{color:#776b89}
body[data-cosmos-theme="light"] .research-new-button,body[data-cosmos-theme="light"] .research-send{background:linear-gradient(120deg,#7c27e0,#a444f4);color:#fff;border-color:#a363fa}
body[data-cosmos-theme="light"] .btn-icon,body[data-cosmos-theme="light"] .toolbtn.on{background:#f3eaff;color:#57239a;border-color:#d8bffb}
body[data-cosmos-theme="light"] .model-chip,body[data-cosmos-theme="light"] .badge{color:#6129ad}
body[data-cosmos-theme="light"] .sidebar-foot,body[data-cosmos-theme="light"] .device-bottom{color:#73678b;border-color:#e4dff0}
body[data-cosmos-theme="light"] .small-label{color:#6c6181}
body[data-cosmos-theme="light"] .research-link-chat{color:#6525c1}
body[data-cosmos-theme="light"] .research-error{background:#fff0f2;color:#7d143b;border-color:#eb9fba}
body[data-cosmos-theme="light"] .research-error strong{color:#6e0c30}
body[data-cosmos-theme="light"] .toast{background:#fff;color:#2b1644;border-color:#ddcbef}
body[data-cosmos-theme="light"] .module-list{color:#2c2140}
body[data-cosmos-theme="light"] .modal,body[data-cosmos-theme="light"] .modal-back .modal{background:#fff;color:#24163c}
/* Make motion responsive and explicitly switchable. */
@keyframes cosmos-galaxy-drift{from{transform:rotate(-18deg) scale(1)}to{transform:rotate(8deg) scale(1.05)}}
@keyframes cosmos-aurora-breathe{from{opacity:.8;transform:translate3d(-1%,0,0)}to{opacity:1;transform:translate3d(1.5%,1%,0)}}
@keyframes cosmos-orbit-float{from{transform:rotate(-23deg) scaleY(.42)}to{transform:rotate(337deg) scaleY(.42)}}
@keyframes cosmos-planet-drift{from{transform:translate3d(0,0,0)}to{transform:translate3d(22px,-24px,0)}}
@keyframes cosmos-ship-cruise{from{transform:translate3d(0,0,0) rotate(-9deg)}to{transform:translate3d(19px,-13px,0) rotate(-3deg)}}
@keyframes cosmos-ship-working{from{transform:translate3d(-13px,12px,0) rotate(-12deg)}to{transform:translate3d(30px,-19px,0) rotate(2deg)}}
@keyframes cosmos-ship-complete{from{transform:translate3d(-13px,0,0) rotate(-4deg)}to{transform:translate3d(56px,-37px,0) rotate(-12deg)}}
@keyframes cosmos-trail{from{opacity:.24;transform:scaleX(.75) rotate(12deg)}to{opacity:.9;transform:scaleX(1.1) rotate(12deg)}}
@keyframes cosmos-flame{from{transform:scaleX(.8)}to{transform:scaleX(1.14)}}
@keyframes cosmos-twinkle{50%{opacity:.3;box-shadow:0 0 4px #b64ef8}}
@media(max-width:920px){.cosmos-controls .cosmos-theme-label{display:none}.cosmos-galaxy{width:530px;right:-150px}.cosmos-ship{right:6%;width:95px}.cosmos-activity{top:69px;right:10px}}
@media(max-width:650px){.cosmos-controls{gap:4px}.cosmos-btn{width:33px;padding:0;justify-content:center}.cosmos-controls .cosmos-theme-label{display:none}.cosmos-ship{top:92px;width:75px;right:8%}.cosmos-galaxy{top:5%;right:-215px;width:460px}.cosmos-planet{width:280px;height:280px;bottom:-150px;left:-150px}.cosmos-activity{top:65px;right:10px;font-size:10px}.topbar{height:54px;min-height:54px}.top-actions{gap:6px}}
body[data-cosmos-motion="off"] .cosmos-scene *,body[data-cosmos-motion="off"] .cosmos-activity-dot{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.cosmos-scene *, .cosmos-activity-dot{animation:none!important;transition:none!important}}


.cosmos-lotus{padding:4px!important;border-radius:12px!important;background:linear-gradient(130deg,#7028e8,#31134e)!important;box-shadow:0 0 22px rgba(155,61,255,.4)!important}
.cosmos-lotus svg{width:32px!important;height:32px!important;fill:none;stroke:#f7ecff;stroke-width:2.6;filter:drop-shadow(0 0 3px #dfabff)}
body[data-cosmos-theme="light"] .cosmos-lotus{background:linear-gradient(130deg,#eadbff,#8b4bec)!important}
.cosmos-research-kicker{font-size:10px;letter-spacing:.16em;text-transform:uppercase;font-weight:750;color:var(--violet);display:flex;gap:7px;align-items:center;white-space:nowrap}
.cosmos-research-kicker .cosmos-research-spark{color:#b260ef}

/* Baked once at build time: low-resource nebula texture, no external downloads. */
.cosmos-galaxy{background-image:url("/assets/nebula.webp");background-size:contain;background-position:center;background-repeat:no-repeat;filter:drop-shadow(0 0 22px #a65cff44)}
body[data-cosmos-theme="light"] .cosmos-galaxy{opacity:.39;filter:saturate(.65)}

/* Above the UI, but pointer-events remain disabled so chat buttons still work. */
.main>.cosmos-activity{position:absolute;z-index:9;top:84px;right:24px}
body:has(#researchStage:not(.hide)) .main>.cosmos-activity{top:149px}
.welcome-orb.cosmos-lotus svg{width:52px!important;height:52px!important;stroke-width:2.2}
body[data-cosmos-theme="light"] .cosmos-planet{opacity:.09}

/* Diagnóstico y selección de modelos en Investigación v0.8.1 */
.research-compose-settings{flex-wrap:wrap}#researchModel{max-width:180px}#researchReasoning{max-width:122px}
.diagnostic-output{white-space:pre-wrap;word-break:break-word;font:12px/1.55 Consolas,monospace;overflow:auto;max-height:320px}

/* v0.9.1: separate retained-source followups from new web searches. */
.research-new-topic{background:transparent;color:#e2c4ff;border:1px solid #a778db;border-radius:10px;min-height:36px;padding:7px 12px;font-size:12px;font-weight:730;cursor:pointer;transition:background .2s,transform .2s}
.research-new-topic:hover{background:rgba(132,53,252,.17);transform:translateY(-1px)}
.research-new-topic:disabled{opacity:.5;cursor:not-allowed}
body[data-cosmos-theme="light"] .research-new-topic{color:#50218b;border-color:#ac7ee5;background:rgba(242,234,255,.85)}
body[data-cosmos-theme="light"] .research-new-topic:hover{background:#eadcff}

.response-metadata{font-size:11px;color:var(--muted);margin:10px 0;display:flex;align-items:center;flex-wrap:wrap;gap:10px}#responseStatus{font-size:11px;color:var(--muted)}
