:root{--side-width:280px;--muted:#A4AABB;--sidebar:#13141A}
html[data-theme=light]{--sidebar:#E5ECF6;--muted:#555A69}
body{font-size:15px;line-height:1.5}
.btn{min-height:42px;font-size:14px}
.btn.compact{min-height:38px;font-size:13px}
.icon-btn{width:38px;height:38px}
.field input,.field textarea,.field select{font-size:15px;min-height:46px}
.field label{font-size:14px}
.field small{font-size:13px}
.pill{font-size:12px;padding:6px 9px}
.eyebrow{font-size:12px;letter-spacing:1.4px}
.sidebar{padding:24px 16px 16px;overflow:hidden;gap:0}
.sidebar .brand{padding:0 12px;height:38px;width:auto;overflow:visible;flex-shrink:0}
.brand-long{display:flex;align-items:center}
.brand-short{display:none;position:relative;width:48px;height:38px;overflow:hidden;flex-shrink:0}
.brand-short img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:94px!important;max-width:none!important;height:94px!important}
.brand .brand-dark{display:block}
.brand .brand-light{display:none}
.sidebar .brand img{visibility:visible}
.sidebar .brand:before{content:none}
.sidebar-product{display:block;padding:9px 12px 25px;font-size:11px;letter-spacing:2px}
.sidebar .nav-text{display:inline}
.sidebar .new-chat{margin-top:0;margin-bottom:20px;min-height:45px;justify-content:flex-start;font-size:14px;border-radius:9px}
.sidebar .nav-item{justify-content:flex-start;min-height:47px;padding:12px 14px;font-size:14px;border-radius:10px;color:var(--secondary);gap:12px}
.sidebar .nav-item.active{background:var(--surface-3);color:var(--text)}
.sidebar .nav-item.active:before{content:none}
.sidebar .nav-count{display:block;font-size:12px;padding:2px 7px}
.sidebar .nav-item:hover{background:var(--surface-2)}
html[data-theme=light] .sidebar .nav-item.active{background:#C9D0E2;color:#1E202B}
html[data-theme=light] .sidebar .nav-item.active .icon{color:#B44706}
.workspace-label{display:flex;gap:11px;align-items:center;margin:28px 12px;color:var(--secondary)}
.workspace-label strong{font-size:13px;font-weight:500;display:block}
.workspace-label small{font-size:12px;color:var(--muted)}
.sidebar-bottom{margin-top:auto;flex-shrink:0}.profile{width:100%;text-align:left;cursor:pointer;border-radius:10px;transition:background .15s}.profile:hover{background:var(--surface-2)}.profile-menu{position:fixed;z-index:90;min-width:196px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow)}.profile-menu-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border-radius:7px;font-size:14px;color:var(--secondary);text-align:left;white-space:nowrap}.profile-menu-item:hover{background:var(--surface-2);color:var(--text)}.profile-menu-item.active{color:var(--orange-light)}.profile-menu-item .icon{width:16px;height:16px;flex-shrink:0}
.sidebar .sidebar-bottom .nav-item span{display:inline}
.sidebar .profile-text,.sidebar .profile .icon-btn{display:block}
.sidebar .profile .icon-btn{display:flex;margin-left:auto}
.profile{padding:16px 4px 0;gap:10px}
.initial-avatar{width:35px;height:35px;font-size:12px}
.profile-name{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.profile-role{font-size:12px;margin-top:1px}
.token-meter{padding:15px 12px;margin:14px 0 16px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.token-heading{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);gap:8px;margin-bottom:12px}
.token-heading>span:first-child{display:flex;align-items:center;gap:6px;color:var(--secondary)}
.token-heading .icon{color:var(--orange-light);width:14px;height:14px}
.token-bar{height:5px;background:var(--surface-3);border-radius:6px;overflow:hidden}
.token-bar>span{height:100%;background:var(--orange);display:block;border-radius:6px;transition:width .25s}
.token-numbers{display:flex;justify-content:space-between;gap:7px;font-size:11px;color:var(--muted);margin-top:9px;white-space:nowrap}
.token-numbers strong{font-weight:500;color:var(--secondary)}
.token-numbers strong>span{font-weight:400;color:var(--muted)}
.chat-sidebar-title{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:18px 12px}
.chat-sidebar-title h2{font-family:Inter,Arial,sans-serif!important;text-transform:none!important;letter-spacing:0;font-size:16px;font-weight:600}
.chat-sidebar-title>span{font-size:12px;background:var(--surface-3);padding:1px 7px;border-radius:6px;color:var(--muted)}
.sidebar .back-navigation{font-size:13px;color:var(--muted);margin-bottom:0}
.back-arrow{transform:rotate(180deg)}
.sidebar .chat-history{display:block;flex:1;min-height:0;margin-top:4px;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.chat-history .sidebar-label{font-size:11px;letter-spacing:1.2px;padding:12px}
.chat-history .history-item{padding:12px;gap:10px;align-items:flex-start;border-radius:9px;min-height:64px;font-size:13px}
.chat-history .history-item>.icon{color:var(--muted);margin-top:2px}
.chat-history .history-item>span{min-width:0;flex:1}
.chat-history .history-name{max-width:none;font-size:13px;color:var(--secondary)}
.chat-history .history-item small{font-size:11px;margin-top:3px}
.chat-history .history-item.current{background:var(--surface-3)}
.chat-history .history-item.current>.icon{color:var(--orange-light)}
.history-empty{padding:12px;color:var(--muted);font-size:13px}
.chat-navigation .sidebar-bottom{margin-top:12px}
.topbar{height:72px;padding:0 30px;gap:16px}
.top-actions{gap:14px}


.theme-switch{padding:3px;gap:3px;background:var(--bg);border-radius:9px}
.theme-mode{padding:0;width:32px;height:32px;min-height:32px;border-radius:6px}
.theme-mode .icon{width:17px;height:17px}
.theme-mode.active{color:var(--orange-light)}
.page{padding:32px 36px}
.hero p{font-size:15px;line-height:1.75}
.hero-foot{font-size:12px;flex-wrap:wrap}
.agent-card>p{font-size:14px;line-height:1.75;min-height:74px}
.agent-card h3{font-size:18px;line-height:1.4}
.connector-card>p{font-size:14px;line-height:1.75;min-height:74px}
.connector-card h3{font-size:16px}
.connector-card-footer{gap:10px;flex-wrap:wrap}
.connector-card-footer span,.connector-category,.agent-card-footer span{font-size:12px}
.connector-card-footer .btn{font-size:13px}
.control-strip{font-size:13px;line-height:1.7}
.message-text,.user-bubble{font-size:15px;line-height:1.8}
.message-identity{font-size:13px;gap:9px}
.message-identity .time,.message-identity .ai-indicator{font-size:12px}
.alert-explanation,.action-detail>p,.manual-action p,.follow-up{font-size:14px;line-height:1.8}
.datum-label{font-size:12px}
.datum-value{font-size:13px;overflow-wrap:anywhere}
.approval-header h3{font-size:15px}
.approval-footer{gap:12px;flex-wrap:wrap}
.approval-footer small{font-size:12px}
.authority-line{font-size:12px;line-height:1.6}
.agent-subtitle{font-size:12px;line-height:1.7}
.chat-head{padding:18px 30px}
.chat-head>.row{min-width:0}
.chat-stream{padding-left:30px;padding-right:30px}
.chat-stream .conversation{max-width:850px}
.composer-area{padding:12px 30px 15px}
.composer-wrap{max-width:850px}
.composer{border-radius:12px;padding:12px 15px}
.composer textarea{font-size:15px;min-height:64px;line-height:1.65;padding:6px 2px}
.composer-toolbar{padding-top:6px;align-items:center}
.composer-tools{gap:5px;min-width:0;flex-wrap:wrap}
.composer-note{font-size:11px;gap:10px;line-height:1.6}
.send-button{width:35px;height:35px;flex-shrink:0}
.suggestion strong{font-size:15px;line-height:1.5}
.suggestion small{font-size:12px;line-height:1.7}
.welcome-intro p{font-size:15px;line-height:1.8}
.welcome-intro h1{font-size:31px}
.settings-page{max-width:1520px}
.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}
.settings-heading h1{font-size:34px;margin:11px 0 12px;letter-spacing:-.8px}
.settings-heading p{font-size:15px;color:var(--muted)}
.settings-heading>.btn{flex-shrink:0}
.settings-grid{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(0,1.6fr);gap:24px;align-items:start}
.settings-account-column{display:grid;gap:22px}
.settings-card{padding:26px;background:var(--surface);border:1px solid var(--line);border-radius:13px;min-width:0}
.settings-card h2{font-size:20px;letter-spacing:-.3px;display:flex;align-items:center;gap:11px;margin-bottom:24px}
.settings-card h2>.icon{color:var(--orange);width:21px;height:21px}
.account-identity{display:flex;align-items:center;gap:14px;margin:0 0 28px}
.account-identity .initial-avatar{width:52px;height:52px;font-size:18px;background:var(--surface-3)}
.account-identity strong{font-size:15px;font-weight:500}
.account-identity p{font-size:13px;color:var(--muted);margin-top:3px}
.account-card .field{margin-bottom:20px}
.account-card .field input{background:var(--bg)}
.account-managed{display:flex;align-items:flex-start;gap:9px;font-size:12px;color:var(--muted);line-height:1.8}
.account-managed>.icon{width:17px;height:17px;margin-top:2px}
.signout-card{background:transparent}
.signout-card h2{font-size:18px;margin-bottom:16px}
.signout-card>p{font-size:14px;color:var(--muted);margin-bottom:18px}
.permission-card{background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:17px;margin:0 0 12px}
.permission-card strong{font-size:14px;font-weight:500}
.permission-card p{font-size:13px;color:var(--muted);margin:14px 0 13px;line-height:1.8}
.permission-card>.row{flex-wrap:wrap}
.permission-actions{flex-wrap:wrap}
.permission-actions .btn{font-size:12px;padding:9px 11px}
.preference-row{padding:24px 0;display:flex;align-items:center;justify-content:space-between;gap:22px;border-bottom:1px solid var(--line-soft)}
.preference-row strong{font-size:14px;font-weight:500;line-height:1.6}
.preference-row p{font-size:13px;color:var(--muted);line-height:1.8;margin-top:5px}
.toggle{width:39px;height:23px;flex-shrink:0}
.toggle:after{width:17px;height:17px;top:3px;background:var(--secondary)}
.toggle.on:after{left:19px;background:#13141A}
.response-preview{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px;margin-top:22px;border:1px solid var(--line-soft);border-radius:8px;background:var(--bg)}
.response-preview>div{display:flex;align-items:center;gap:12px;min-width:0;flex:1;color:var(--orange-light)}
.response-preview>div>div{flex:1}
.response-preview span{font-size:12px;line-height:1.6}
.response-progress{display:flex;gap:5px;margin-top:7px}
.response-progress i{height:3px;border-radius:3px;flex:1;background:var(--orange)}
.response-progress .empty-step{background:var(--surface-3)}
.settings-footnote{font-size:12px;line-height:1.8;color:var(--muted);margin-top:16px}
.settings-footer{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;color:var(--muted);font-size:11px;margin:28px 0 0}
.large-token-meter{border:0;padding:0;background:transparent;margin:0}
.large-token-meter .token-heading{font-size:14px}
.large-token-meter .token-bar{height:8px}
.large-token-meter .token-numbers{font-size:13px;margin-top:12px;flex-wrap:wrap}
.usage-limit{display:flex;flex-direction:column;margin-top:25px;gap:3px}
.usage-limit strong{font-size:32px;font-family:Tomorrow,Arial,sans-serif;font-weight:500}
.usage-limit span{font-size:13px;color:var(--muted)}
.settings-card h3{font-size:16px;margin-top:22px}

.settings-card .theme-switch{margin-bottom:8px}
.login{height:auto;min-height:100dvh;max-width:none;grid-template-columns:1fr 1fr;overflow:auto}
.login-art{background:radial-gradient(ellipse at 50% 45%,#FE640915,transparent 65%),var(--sidebar);position:relative;padding:45px;min-height:800px;border-right:1px solid var(--line-soft)}
.login-art-brand{position:absolute;top:37px;left:40px}
.login-art-center{display:flex;flex-direction:column;align-items:center;justify-content:center}
.login-art-center>img{height:310px;width:310px;object-fit:contain;margin-bottom:26px;filter:drop-shadow(0 16px 38px #0002)}
.login-art-center h1{font-size:36px;line-height:1.35;margin:14px 0 16px;letter-spacing:-.8px}
.login-art-center>p{font-size:16px;text-align:center;color:var(--muted)}
.login-art-center .eyebrow{font-size:11px;text-align:center}
.login-art-foot{position:absolute;bottom:30px;display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted)}
.login-art-foot .icon{width:16px;height:16px;color:var(--orange-light)}
.login-form-side{border:0;padding:76px max(38px,5vw) 44px;position:relative;min-height:800px;background:var(--bg)}
.login-theme{position:absolute;right:32px;top:24px}
.login-access{background:var(--surface-3);color:var(--orange-light);display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:7px 11px;border-radius:7px;margin-bottom:22px;font-size:12px;letter-spacing:.8px}
.login-form-side h2{font-size:35px;line-height:1.2;letter-spacing:-.5px;margin:0 0 16px}
.login-form-side>p{font-size:16px;line-height:1.6;color:var(--muted);margin-bottom:30px}
.sso-button{min-height:48px;font-size:15px;background:var(--surface)}
.sso-button .icon{color:var(--orange-light)}
.login-divider{display:flex;align-items:center;gap:14px;margin:24px 0;font-size:13px;color:var(--muted)}
.login-divider:before,.login-divider:after{content:'';height:1px;background:var(--line);flex:1}
.login-form-side .field{margin-bottom:21px;gap:9px}
.login-form-side .field input{min-height:48px;padding:13px 14px;background:var(--surface);font-size:15px}
.password-label{display:flex;justify-content:space-between;gap:12px;align-items:center}
.password-label .text-link{font-size:13px}
.password-control{position:relative}
.password-control>input{padding-right:48px!important;width:100%}
.password-control>.icon-btn{position:absolute;right:6px;top:6px;width:36px;height:36px}
.remember-me{display:flex;gap:11px;align-items:center;font-size:14px;color:var(--secondary);margin:7px 0 25px;cursor:pointer}
.remember-me input{width:17px;height:17px;accent-color:var(--orange);flex-shrink:0;margin:0}
.sign-in-button{min-height:48px;font-size:15px}
.login-policy{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:var(--muted);line-height:1.8;margin-top:23px}
.login-policy .icon{width:18px;height:18px;margin-top:2px}
.login-prototype-note{font-size:11px;line-height:1.8;color:var(--muted);margin-top:25px;max-width:440px}
.back-signin{font-size:14px;margin-top:25px;align-self:flex-start}
.nav-scrim{display:none}
.drawer{width:500px}
.drawer-head h2{font-size:20px}
.drawer-content p,.setup-note,.scope-row{font-size:14px}
.setup-step{font-size:12px;gap:6px}
.scope-row small,.setup-step b{font-size:12px}
.drawer-head p,.notification-item p{font-size:13px}
html[data-reduced-motion=true] *,html[data-reduced-motion=true] *:before,html[data-reduced-motion=true] *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(min-width:1600px){.page{padding:40px 48px}.settings-card{padding:28px}.hero h1{font-size:42px}.agent-card>p{font-size:15px}}
@media(max-width:1250px){.settings-grid{grid-template-columns:1fr}.settings-account-column{grid-template-columns:1fr 1fr;align-items:start}.page{padding:28px}.hero-copy{padding:28px}.hero h1{font-size:30px}.top-actions{gap:9px}.topbar{padding:0 22px}.agent-card{padding:20px}.agent-card h3{font-size:16px}.permission-actions .btn{font-size:13px}}
@media(max-width:1050px){.agent-grid,.connector-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-account-column{grid-template-columns:1fr}.settings-heading{align-items:flex-start}.settings-heading h1{font-size:30px}.welcome-intro h1{font-size:26px}.welcome-intro p{font-size:14px}.welcome-agent{width:145px;height:180px}.chat-head{padding:15px 22px;gap:12px}.suggestion-grid{grid-template-columns:1fr}.suggestion{display:grid;grid-template-columns:23px 1fr;gap:2px 12px;padding:14px 17px}.suggestion>.icon{grid-row:span 2;margin:2px 0 0}.suggestion small{margin-top:3px}.login-art{padding:32px}.login-art-center>img{height:260px;width:260px}.login-art-center h1{font-size:29px}.login-form-side{padding-left:32px;padding-right:32px}.login-form-side h2{font-size:30px}}
@media(max-width:950px){.sidebar{padding:24px 16px 16px}.sidebar-product{display:block}.sidebar .nav-text,.sidebar .sidebar-bottom .nav-item span{display:inline}.sidebar .profile-text{display:block}.sidebar .profile .icon-btn{display:flex}.sidebar .sidebar-section{display:block}.sidebar .new-chat{margin-top:0;justify-content:flex-start}.sidebar .nav-item{justify-content:flex-start}.sidebar .brand{width:auto;padding:0 12px}.sidebar .brand img{visibility:visible}.sidebar .brand:before{content:none}.hero{grid-template-columns:1fr}.hero-copy{padding:30px}.hero-foot{margin-top:20px}.hero p{font-size:14px}.hero h1{font-size:30px}.agent-grid,.connector-grid{grid-template-columns:1fr}.agent-card>p,.connector-card>p{min-height:0}.chat-head>.row:last-child{gap:0}.composer-note>span:last-child{display:none}.chat-stream,.composer-area{padding-left:22px;padding-right:22px}.settings-heading{flex-direction:column;gap:18px}.settings-heading>.btn{align-self:flex-start}.settings-card{padding:22px}.notifications-card h2{font-size:18px}.welcome-intro{flex-direction:column;align-items:flex-start}.welcome-agent{align-self:center}.welcome-intro h1{font-size:28px}}
.app-shell.collapsed{--side-width:80px}
.collapsed .sidebar{padding:24px 13px 16px}
.collapsed .sidebar .brand{padding:0;width:52px;height:38px}
.collapsed .brand-long{display:none}
.collapsed .brand-short{display:block;width:52px}
.collapsed .sidebar .brand img{visibility:visible}
.collapsed .sidebar .brand:before{content:none}
.collapsed .sidebar-product,.collapsed .sidebar .nav-text,.collapsed .sidebar .nav-count,.collapsed .sidebar .sidebar-section,.collapsed .workspace-label,.collapsed .chat-sidebar-title,.collapsed .sidebar .profile-text,.collapsed .sidebar .sidebar-bottom .nav-item span{display:none}
.collapsed .sidebar .new-chat{margin-top:25px;padding:12px;justify-content:center;margin-bottom:20px}
.collapsed .sidebar .nav-item{justify-content:center;padding:12px}
.collapsed .chat-navigation .back-navigation{margin-top:25px}
.collapsed .chat-navigation .new-chat{margin-top:12px}
.collapsed .token-meter{padding:14px 5px;margin-top:14px;border:0;background:none}
.collapsed .token-heading,.collapsed .token-numbers{display:none}
.collapsed .token-bar{height:5px}
.collapsed .profile{justify-content:center;padding:16px 0 0}
@media(max-width:700px){.app-shell{grid-template-columns:80px minmax(0,1fr)}.app-shell:not(.collapsed) .sidebar{position:fixed;top:0;bottom:0;left:0;width:280px;z-index:81;box-shadow:var(--shadow)}.app-shell:not(.collapsed) .nav-scrim{display:block;position:fixed;inset:0;background:transparent;z-index:80}.app-shell:not(.collapsed) .workspace{grid-column:2}.topbar{height:62px;padding:0 14px;gap:6px}.top-actions{gap:5px}.theme-mode{width:29px;height:29px;min-height:29px}.theme-mode .icon{width:15px;height:15px}.page{padding:24px 18px}.hero-copy{padding:25px 22px}.hero h1{font-size:27px}.hero .eyebrow{font-size:11px}.hero p{font-size:14px}.section-head .tabs .tab{font-size:12px}.section-head{gap:16px}.agent-card{padding:22px}.agent-card h3{font-size:18px}.agent-card>p{font-size:14px}.agent-card .btn{font-size:13px}.chat-head{padding:14px;gap:5px}.chat-head .icon-btn{width:30px;height:32px}.chat-stream{padding:20px 14px}.composer-area{padding:9px 12px 12px}.composer{padding:9px 10px}.composer textarea{font-size:14px}.composer-note{font-size:10px}.composer-tools>.icon-btn{width:30px;height:30px}.send-button{width:32px;height:32px}.welcome-intro h1{font-size:25px}.welcome-intro p{font-size:14px}.welcome-agent{height:145px;width:130px}.suggestion strong{font-size:14px}.suggestion small{font-size:12px}.alert-meta{grid-template-columns:1fr}.approval-header{gap:10px;flex-wrap:wrap}.approval-footer .row{flex-wrap:wrap}.approval-footer .btn{font-size:13px}.action-target{flex-direction:column;gap:12px}.alert-card h3{font-size:16px}.user-bubble{font-size:14px}.message-text{font-size:14px}.settings-heading h1{font-size:29px}.settings-heading .eyebrow{font-size:10px}.settings-heading p{font-size:14px}.settings-card{padding:19px}.settings-card h2{font-size:18px}.settings-card h2>.icon{width:18px;height:18px}.permission-card{padding:14px}.permission-card strong{font-size:13px}.permission-actions{gap:8px}.permission-actions .btn{font-size:12px}.preference-row{gap:15px;padding:22px 0}.preference-row strong{font-size:14px}.preference-row p{font-size:12px}.response-preview{padding:12px;gap:10px}.response-preview>div>.icon{display:none}.response-preview .btn{font-size:11px;padding:7px}.response-preview span{font-size:11px}.settings-footer{font-size:10px}.login{grid-template-columns:1fr}.login-art{display:none}.login-form-side{min-height:100dvh;padding:95px 25px 38px;justify-content:center}.login-form-side h2{font-size:32px}.login-form-side>p{font-size:15px}.login-access{font-size:11px}.login-prototype-note{font-size:11px}.drawer{width:470px}.drawer-content,.drawer-head,.drawer-footer{padding:22px}.context-panel{width:min(300px,100%)}.background-notice{width:calc(100vw - 106px);right:13px;padding:16px}.background-notice .actions{flex-wrap:wrap}.background-notice .actions .btn{font-size:12px;white-space:normal}.background-notice h3{font-size:14px}}
.collapsed .chat-navigation .sidebar-bottom{margin-top:auto}
.chat-history .history-item span.history-name{max-width:none;width:100%}

/* v01: persistent chat-first navigation */
.primary-navigation{display:flex;flex-direction:column;gap:4px;flex-shrink:0}
.sidebar .primary-navigation .nav-item{min-height:44px;padding:11px 12px;font-size:14px;font-weight:400;border:0;border-radius:9px}
.sidebar .primary-navigation .new-chat{margin:0;background:transparent;color:var(--secondary);justify-content:flex-start}
.sidebar .primary-navigation .nav-item:hover{background:var(--surface-2);color:var(--text)}
.sidebar .primary-navigation .nav-item.active{background:var(--surface-3);color:var(--text)}
.sidebar .primary-navigation .nav-item.active .icon{color:var(--secondary)}
.sidebar .chat-history{display:flex;flex-direction:column;flex:1;min-height:0;margin-top:26px;overflow:hidden}
.chat-history .sidebar-label{display:block;flex-shrink:0;margin:0;padding:0 12px 10px;font-family:Inter,Arial,sans-serif!important;font-size:13px;font-weight:500;line-height:1.6;letter-spacing:0;text-transform:none!important;color:var(--muted)}
.chat-history>nav{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.chat-history .history-item{min-height:42px;padding:10px 12px;align-items:center;border-radius:9px;color:var(--secondary);line-height:1.6}
.chat-history .history-item span.history-name{font-size:14px;font-weight:400;line-height:1.6}
.chat-history .history-item:hover{background:var(--surface-2)}
.chat-history .history-item.current{background:var(--surface-3);color:var(--text)}
.chat-history .history-item.current .history-name{color:var(--text)}
.chat-first-navigation .sidebar-bottom{margin-top:20px}
.theme-toggle{width:38px;height:38px;flex-shrink:0;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--secondary)}
.theme-toggle>.icon{width:18px;height:18px}
.theme-toggle:hover{color:var(--text);background:var(--surface-3)}
.collapsed .primary-navigation{margin-top:25px}
.collapsed .sidebar .primary-navigation .new-chat{margin:0;justify-content:center;padding:12px}
.collapsed .sidebar .primary-navigation .nav-item{justify-content:center;padding:12px}
.collapsed .sidebar .chat-history{display:none}
.collapsed .chat-first-navigation .sidebar-bottom{margin-top:auto}
@media(max-width:700px){.theme-toggle{width:36px;height:36px}.sidebar .chat-history{margin-top:24px}}

/* The 3D Investigator: one canvas moved between the large spots; the picture underneath is the fallback until the model is ready */
.investigator-spot{position:relative;display:block}
.welcome-spot{width:230px;height:290px;align-self:center;flex-shrink:0}
.hero-spot{width:300px;height:380px;margin:0 auto}
.login-spot{width:min(420px,80vw);height:min(520px,60vh);margin:0 auto}
.investigator-spot>img,.investigator-spot>.onyx-figure{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transition:opacity .7s ease}
.investigator-spot.is-live>img,.investigator-spot.is-live>.onyx-figure{opacity:0;pointer-events:none;animation:none}
.investigator-3d{position:absolute;inset:0;opacity:0;transition:opacity .9s ease}
.investigator-3d.is-ready{opacity:1}
.investigator-3d canvas{display:block;width:100%;height:100%}
@media(max-width:700px){.welcome-spot{width:170px;height:210px}.hero-spot{width:220px;height:280px}}

.sidebar-head{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.sidebar-head .icon-btn{color:var(--muted);flex-shrink:0}
.collapsed .sidebar-head{flex-direction:column;gap:10px}
.collapsed .sidebar-head .icon-btn{width:52px}
/* Collapsed rail: one stack of equal icon buttons, no stray picture or bar, no duplicate toggle in the top bar. */
.collapsed .sidebar-head{gap:14px}
.collapsed .sidebar-head .icon-btn{width:100%;height:47px;border-radius:10px;color:var(--secondary)}
.collapsed .sidebar-head .icon-btn:hover{background:var(--surface-2);color:var(--text)}
.collapsed .primary-navigation{margin-top:4px}
.collapsed .token-meter{display:none}
.collapsed .profile{padding-top:16px}
.field input[readonly]{background:var(--surface-2);color:var(--muted);cursor:not-allowed}
.field input[readonly]:focus{border-color:var(--line)}
.confirm-backdrop{position:fixed;inset:0;background:#06060880;backdrop-filter:blur(2px);z-index:95}
.confirm-dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:96;width:min(440px,calc(100vw - 32px));padding:26px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.confirm-dialog h2{font-size:17px;margin-bottom:10px}
.confirm-dialog p{font-size:14px;line-height:1.8;color:var(--muted)}
.confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
@media(max-width:700px){.confirm-actions{flex-direction:column-reverse}.confirm-actions .btn{width:100%}}
.profile-menu-identity{display:flex;align-items:center;gap:10px;padding:8px 10px 12px;margin-bottom:6px;border-bottom:1px solid var(--line-soft)}
.profile-menu-who{min-width:0}
.profile-menu-who strong{display:block;font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-menu-who p{font-size:12px;color:var(--muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer .suggestion-grid{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.composer .suggestion{display:inline-flex;align-items:center;gap:7px;width:auto;padding:7px 13px;border:1px solid var(--line);border-radius:999px;background:transparent;transition:background .15s,border-color .15s}
.composer .suggestion:hover{background:var(--surface-2);border-color:var(--muted)}
.composer .suggestion>.icon{margin:0;width:14px;height:14px;flex-shrink:0;color:var(--muted)}
.composer .suggestion strong{font-size:12.5px;font-weight:400;line-height:1.3;white-space:nowrap;color:var(--secondary)}
.appearance-control{margin-top:16px;display:inline-flex}
.tool-logo.vendor-logo{background:var(--surface-2);padding:6px}
.tool-logo.vendor-logo img{width:100%;height:100%;object-fit:contain;display:block}
.chat-column{position:relative}
.chat-head{position:absolute;top:12px;right:20px;z-index:6;padding:0;border-bottom:0;background:transparent;gap:0;justify-content:flex-end}
.chat-head .icon-btn{background:var(--bg)}
.chat-head .icon-btn:hover{background:var(--surface-2)}
@media(max-width:700px){.chat-head{top:8px;right:10px}}
.topbar{position:relative;z-index:1}
@media(max-width:950px){.hero{display:flex;flex-direction:column-reverse}.hero-art{min-height:250px;max-height:none}.hero-spot{width:240px;height:300px}.hero-art .agent-render{width:170px;height:225px}.hero-art:before{width:215px;height:215px}.hero-art:after{width:245px;height:245px}.hero-art .art-caption{display:none}.hero-copy{padding:30px}}
.notification-item.unread{border-color:#fe640966;background:var(--orange-soft)}
.notification-item h3{font-family:Inter;text-transform:none;letter-spacing:0}
.onyx-working.message{display:inline-flex;align-items:center;gap:10px;width:auto;padding:9px 15px;margin:14px 0 0;border:1px solid var(--line-soft);border-radius:999px;background:var(--surface)}
.typing-label{font-size:13px;color:var(--muted);line-height:1.3}
.composer-listening{display:inline-flex;align-items:center;gap:8px;margin:0 0 7px;padding:6px 13px;border:1px solid var(--line-soft);border-radius:999px;background:var(--surface);font-size:12.5px;color:var(--muted);line-height:1.3}
.hero-foot{flex-wrap:wrap;gap:10px 16px}
