.ws-launch{display:flex;align-items:center;gap:8px;margin:10px 0;padding:11px 14px;border-radius:12px;border:1px solid var(--ws-border,#d8e6ee);background:var(--ws-soft,#edf7fd);color:inherit;font:inherit;cursor:pointer;width:100%;text-align:left}
.ws{--ws-accent:#386c87;--ws-soft:#edf7fc;--ws-bg:#f7fbfe;--ws-border:#dbe8ee;--ws-text:#193746;position:fixed;inset:0;z-index:1000;background:var(--ws-bg);color:var(--ws-text);font:15px/1.5 system-ui,sans-serif;display:grid;grid-template-rows:auto 1fr}
.ws[data-brand=nexus]{--ws-accent:#8159bd;--ws-soft:#f0eafa;--ws-bg:#faf8ff;--ws-border:#e4d9f2;--ws-text:#2d2540}
.ws *{box-sizing:border-box}.ws[hidden]{display:none}.ws button,.ws input,.ws textarea,.ws select{font:inherit;color:inherit}.ws button{border:1px solid var(--ws-border);background:white;border-radius:10px;padding:8px 12px;cursor:pointer}.ws button:hover{border-color:var(--ws-accent);background:var(--ws-soft)}.ws button:disabled{opacity:.5;cursor:wait}.ws button.primary{background:var(--ws-accent);color:white;border-color:var(--ws-accent)}.ws button.danger{color:#a22}.ws input,.ws textarea,.ws select{border:1px solid var(--ws-border);border-radius:9px;background:white;padding:9px 11px;min-width:0}.ws textarea{resize:vertical;min-height:80px}.ws input[type=checkbox],.ws input[type=radio]{width:auto;accent-color:var(--ws-accent)}.ws :focus-visible{outline:3px solid var(--ws-accent);outline-offset:2px}
.ws-head{display:flex;align-items:center;gap:12px;padding:14px 24px;border-bottom:1px solid var(--ws-border);background:white}.ws-head strong{font-size:20px;letter-spacing:-.6px}.ws-head input{max-width:550px;flex:1}.ws-layout{display:grid;grid-template-columns:285px minmax(0,1fr);min-height:0}.ws-side{padding:18px;overflow:auto;border-right:1px solid var(--ws-border)}.ws-side .ws-actions{margin-bottom:16px}.ws-main{min-width:0;overflow:auto;padding:26px max(24px,calc((100% - 1000px)/2)) 30px}.ws-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.ws-title{font-size:30px;letter-spacing:-1px;margin:10px 0}.ws-muted{font-size:13px;color:#6e7b89}.ws[data-brand=nexus] .ws-muted{color:#83738f}.ws-tree{list-style:none;padding:0;margin:0}.ws-tree .ws-tree{margin-left:14px;border-left:1px solid var(--ws-border);padding-left:7px}.ws-tree-row{display:flex;gap:4px;margin:4px 0}.ws-tree-row button{background:transparent;border-color:transparent;padding:6px;white-space:normal;overflow-wrap:anywhere;text-align:left}.ws-tree-row .ws-node{flex:1}.ws-tree-row .active{background:var(--ws-soft);border-color:var(--ws-border)}.ws-card{background:white;border:1px solid var(--ws-border);border-radius:18px;padding:20px;margin:14px 0;overflow-wrap:anywhere}.ws-card h3{margin:0 0 10px;font-size:17px}.ws-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:14px}.ws-grid .ws-card{margin:0}.ws-message{border:1px solid var(--ws-border);border-radius:17px;padding:20px;margin:18px 0;background:white}.ws-message.user{background:var(--ws-soft);margin-left:7%}.ws-message pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;margin:8px 0 16px}.ws-message .ws-actions button{font-size:12px;padding:5px 9px}.ws-message:target{outline:3px solid var(--ws-accent)}.ws-composer{position:sticky;bottom:-30px;background:var(--ws-bg);padding:14px 0 20px}.ws-composer textarea{width:100%;background:white;min-height:105px;border-radius:16px;padding:16px;margin:8px 0}.ws-composer .ws-actions{justify-content:space-between}.ws-spacer{flex:1}.ws-empty{padding:45px 15px;text-align:center}.ws-empty h2{font-size:32px;font-weight:500;margin:10px}.ws-empty p{max-width:530px;margin:14px auto;color:#73818c}.ws-pill{padding:4px 8px;background:var(--ws-soft);border-radius:20px;font-size:12px}.ws-breadcrumb{display:flex;gap:7px;flex-wrap:wrap;font-size:12px}.ws-breadcrumb button{padding:3px 8px}.ws-label{display:flex;flex-direction:column;gap:6px;margin:12px 0}.ws-toggle{display:flex;align-items:center;gap:9px;padding:9px 0}.ws-toggle small{display:block;color:#778}.ws-modal{max-width:720px;width:calc(100% - 30px);max-height:88vh;border:1px solid var(--ws-border);border-radius:20px;padding:26px;color:var(--ws-text);box-shadow:0 25px 90px #192d4833}.ws-modal::backdrop{background:#14203566}.ws-modal>h2{margin-top:0}.ws-modal textarea,.ws-modal select,.ws-modal input:not([type=checkbox]):not([type=radio]){width:100%}.ws-modal input[type=checkbox]{width:auto}.ws-modal pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;background:var(--ws-soft);padding:14px;border-radius:12px;font:12px/1.5 monospace}.ws-notice{padding:12px 16px;border-radius:12px;background:var(--ws-soft);border:1px solid var(--ws-border);margin:10px 0}.ws-toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:1200;max-width:90vw;padding:12px 20px;border-radius:12px;background:#243544;color:white;box-shadow:0 8px 30px #0002}.ws-chart{max-width:100%;height:auto}.ws-field{margin:12px 0}.ws-field label{display:block;margin:5px 0}.ws-field input[type=text],.ws-field textarea,.ws-field select{width:100%}.ws-compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}.ws-compare pre{white-space:pre-wrap;font:inherit}.ws-preview{width:100%;height:65vh;background:white;border:1px solid var(--ws-border);border-radius:12px}.ws-spinner{width:16px;height:16px;border:2px solid var(--ws-border);border-top-color:var(--ws-accent);border-radius:50%;display:inline-block;animation:ws-spin 1s linear infinite}@keyframes ws-spin{to{transform:rotate(360deg)}}.ws-flag{background:#fff2c9;padding:10px 15px;border-radius:10px;color:#684e11}
@media(max-width:760px){.ws-head{padding:12px;flex-wrap:wrap}.ws-head strong{font-size:18px}.ws-head input{order:5;flex-basis:100%;max-width:none}.ws-layout{grid-template-columns:1fr}.ws-side{display:none}.ws.side-open .ws-side{display:block;position:absolute;top:110px;bottom:0;left:0;width:285px;z-index:3;background:var(--ws-bg);box-shadow:10px 0 30px #0002}.ws-main{padding:16px 14px 30px}.ws-title{font-size:25px}.ws-message{padding:14px}.ws-modal{padding:18px}.ws-compare{grid-template-columns:1fr}}
.ws-entry{margin:10px 12px;width:calc(100% - 24px);font-size:14px;flex-shrink:0}body>.ws-entry{position:fixed;right:16px;top:100px;z-index:900;width:auto;box-shadow:0 8px 28px #0001}.ws svg{display:block;max-width:100%;width:100%;max-height:1000px}.ws table{width:100%;border-collapse:collapse}.ws td{padding:8px;border-bottom:1px solid var(--ws-border)}.ws details{padding:12px 0;border-bottom:1px solid var(--ws-border)}.ws summary{cursor:pointer;font-weight:600}.ws-comparison{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}.ws pre{white-space:pre-wrap;overflow-wrap:anywhere}.ws-label{display:block;margin:12px 0}.ws-label>input:not([type=checkbox]),.ws-label>textarea,.ws-label>select{display:block;width:100%;margin-top:6px}.ws-modal>textarea{width:100%}
/* Integrated workspace 2.0: one shell, persistent sidebar and native chat. */
body.nexus-integrated{--ws-accent:#8159bd;--ws-soft:#f2edf9;--ws-bg:#faf8ff;--ws-border:#e4d9f2;--ws-text:#2d2540}
.nexus-integrated .ws{position:relative;inset:auto;z-index:auto;display:flex;flex:1;min-height:0;background:transparent;font:inherit}
.nexus-integrated #page-chat{min-height:0;overflow:hidden}.nexus-integrated #ws-main{display:flex;flex-direction:column;flex:1;min-height:0;padding:18px 28px 0;overflow:auto}
.nexus-integrated #ws-content{display:flex;flex-direction:column;flex:1;min-height:0}.nexus-integrated #native-chat{display:flex;flex-direction:column;flex:1;min-height:0}.nexus-integrated #conversation{flex:1;min-height:100px;overflow:auto}
.nexus-integrated .ws-title{font:600 22px/1.25 inherit;margin:6px 0}.nexus-integrated .ws-main>.ws-muted{margin:2px 0 8px;font-size:12px}.nexus-integrated .ws-main>.ws-actions{margin-bottom:8px}
.nexus-integrated .ws-breadcrumb{font-size:11px;gap:2px}.nexus-integrated .ws-breadcrumb button{padding:2px 5px;background:none;border-color:transparent}.nexus-integrated #ws-node-actions>button{padding:5px 9px;font-size:12px}
.nexus-integrated .chat-toolbar{flex-wrap:wrap;gap:6px;padding:8px 0}.nexus-integrated .chat-toolbar #model-note{display:none}.nexus-integrated .chat-toolbar select{font-size:12px;max-width:210px}.nexus-integrated .chat-toolbar button{font-size:12px;padding:5px 8px}.nexus-integrated .chat-toolbar #edit-chat{display:none}
.nexus-integrated .composer-wrap{padding:12px 0 8px}.nexus-integrated #composer{padding:14px}.nexus-integrated #send{padding:0;width:36px;height:36px;flex-shrink:0;background:var(--ws-accent);color:white}.nexus-integrated #prompt{border:0;padding:0;resize:none;min-height:55px}
.nexus-integrated .history-heading,.nexus-integrated #chat-list{display:none}.nexus-integrated .ws-side{display:block;padding:12px 0;border:0;overflow:visible;min-width:0}.ws-side button,.ws-modal button,.ws-settings-entry button{font:inherit;color:inherit;border:1px solid var(--ws-border);border-radius:9px;padding:7px 9px;background:white;cursor:pointer}.ws-side .ws-side-title{display:flex;justify-content:space-between;align-items:center}.ws-side .ws-side-title button{border:0;background:none;font-weight:600}.ws-side-shortcuts{display:flex;gap:5px;margin:9px 0}.ws-side-shortcuts button,.ws-temporary{font-size:12px!important}.ws-temporary{width:100%;text-align:left;margin-bottom:9px;background:transparent!important}.ws-side .ws-tree-row button{font-size:12px;background:none;border-color:transparent}.ws-side .ws-tree-row .active{background:var(--ws-soft);border-color:var(--ws-border)}
.ws-global-search{position:relative;flex:1;max-width:560px;min-width:100px}.ws-global-search input{width:100%;height:36px;padding:8px 32px 8px 13px;border:1px solid var(--ws-border);border-radius:11px;background:#faf8fd;font:inherit;font-size:13px;color:var(--ws-text)}.ws-global-search button{position:absolute;right:5px;top:7px;background:none;border:0;color:var(--ws-text)}.nexus-integrated .topbar .breadcrumb{display:none}
.ws-more{position:relative;padding:0!important;border:0!important}.ws-more>summary{list-style:none;font-size:12px;font-weight:500;padding:5px 10px;border:1px solid var(--ws-border);border-radius:8px;cursor:pointer}.ws-more>summary::-webkit-details-marker{display:none}.ws-more[open]{z-index:30}.ws-menu-items{position:absolute;right:0;top:100%;width:220px;background:white;border:1px solid var(--ws-border);border-radius:12px;box-shadow:0 10px 30px #30204422;padding:6px;display:flex;flex-direction:column;gap:3px;max-height:290px;overflow:auto}.ws-menu-items button{text-align:left;background:none!important;border-color:transparent!important}.ws-menu-items button:hover{background:var(--ws-soft)!important}.ws-message-tools{margin-top:12px}.ws-message-tools>.ws-actions{gap:5px}.ws-message-tools button{font-size:11px!important;padding:4px 7px!important;background:transparent!important}.ws-message-tools .ws-more{margin-left:auto}.ws-message-tools .ws-menu-items{top:auto;bottom:100%}.nexus-integrated #ws-node-actions>.ws-more{margin-left:auto}
.ws-dialog-nav{display:flex;justify-content:space-between;gap:10px;position:sticky;top:-26px;background:white;padding:10px 0;z-index:2;border-bottom:1px solid var(--ws-border);margin-bottom:16px}.ws-dialog-nav button:last-child{margin-left:auto}.ws-modal{font:14px/1.5 system-ui,sans-serif}.ws-modal button.primary{background:var(--ws-accent);color:white}.ws-modal input,.ws-modal textarea,.ws-modal select{font:inherit;padding:10px;border:1px solid var(--ws-border);border-radius:9px}.ws-modal :focus-visible,.ws-side :focus-visible{outline:2px solid var(--ws-accent);outline-offset:2px}.ws-modal h2{font-size:22px}.ws-settings-entry{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.ws-view-back{align-self:flex-start;margin-bottom:14px}.ws-empty .ws-actions{justify-content:center}.ws-empty h1{font-size:36px;letter-spacing:-1px;max-width:500px;margin:15px auto}.ws-eyebrow{color:var(--ws-accent);font-size:11px;letter-spacing:3px}.ws-empty{padding:50px 15px 30px}.ws-empty p{font-size:14px}.ws-main>h1{font-size:24px}.ws-main>.ws-muted{line-height:1.4}
@media(max-width:760px){.nexus-integrated #ws-main{padding:12px 14px 0}.nexus-integrated .topbar{gap:8px;padding:10px 14px;flex-wrap:wrap;height:auto;min-height:66px}.nexus-integrated .ws-global-search{order:10;flex-basis:100%;max-width:none}.nexus-integrated #top-balance{margin-left:auto}.nexus-integrated .ws-title{font-size:20px}.nexus-integrated .ws-main>.ws-muted{display:none}.nexus-integrated .chat-toolbar #model-select{flex:1;max-width:55%}.nexus-integrated .chat-toolbar #ws-mode{max-width:42%}.nexus-integrated .ws-model-about,.nexus-integrated .ws-compare-button{padding:2px 7px!important}.nexus-integrated #conversation{min-height:80px}.nexus-integrated #welcome h1{font-size:28px}.nexus-integrated #welcome{padding:14px 8px}.nexus-integrated #welcome .suggestions{display:none}.nexus-integrated .composer-wrap{padding-top:7px}.nexus-integrated #composer{padding:10px}.ws-modal{padding:18px}.ws-dialog-nav{top:-18px}.ws-empty{padding:35px 5px}.ws-empty h1{font-size:30px}}

.ws-sidebar-close{display:none}#back-to-chat{font-size:12px;white-space:nowrap}@media(max-width:760px){.ws-sidebar-close{display:block;align-self:flex-end;margin-bottom:12px}.nexus-integrated #conversation{padding:10px 0 20px}.nexus-integrated #welcome .prompt-grid{display:none}}

.nexus-integrated .new-chat kbd{display:none}.nexus-integrated .nav{margin:16px 0 18px}.nexus-integrated .ws-title{font-size:22px;font-weight:600;line-height:1.25}.ws-menu-items button{min-height:32px}.ws-side .ws-tree-row>button:first-child{flex-shrink:0;width:22px}
@media(max-width:760px){.nexus-integrated .chat-toolbar #model-select{flex:0 0 calc(55% - 3px);min-width:calc(55% - 3px);max-width:calc(55% - 3px)}.nexus-integrated .chat-toolbar #ws-mode{flex:0 0 calc(45% - 3px);min-width:calc(45% - 3px);max-width:calc(45% - 3px)}.nexus-integrated .chat-toolbar{row-gap:7px}}
