@charset "UTF-8";

/* Brand assets are served with the application; no third-party font requests. */
@font-face{font-family:TDProxima;src:url("./assets/proxima-regular.woff") format("woff");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:TDProxima;src:url("./assets/proxima-semibold.woff") format("woff");font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:TDProxima;src:url("./assets/proxima-bold.woff") format("woff");font-style:normal;font-weight:700;font-display:swap}

:root{
  color-scheme:light;
  --brand:#1c5eaa;--blue:#1c5eaa;--orange:#fe9900;--orange-hover:#ffad2c;--orange-text:#14191b;
  --bg:#fff;--surface:#fff;--sidebar:#fff;--text:#182a3f;--muted:#5d7084;--line:#dce5ef;
  --soft:#f1f6fa;--tint:#e8f2fd;--user:#dcedff;--answer:#f0f3f7;--input:#cbd8e5;
  --accent:var(--brand);--accent-text:#fff;--notice:var(--soft);--radius:7px;
  --hero:linear-gradient(105deg,#0758b0,#0869c9);--overlay:#10213d70;--shadow:0 12px 36px #10213d18;
  --danger:#a92e28;--danger-soft:#fff0ef;
  --drawer-duration:360ms;--drawer-ease:cubic-bezier(.22,1,.36,1);
  font-family:TDProxima,Arial,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;line-height:1.5;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#101b2a;--surface:#16263a;--sidebar:#132237;--text:#edf3fc;--muted:#a7b8cc;--line:#2c425c;
  --soft:#1d334e;--tint:#1b3555;--user:#203d5e;--answer:#1a2b40;--input:#405874;--blue:#8fc1fa;
  --notice:var(--soft);--hero:linear-gradient(105deg,#164a84,#145b9c);--overlay:#050e1ac4;--shadow:0 12px 36px #0005;
  --danger:#ffb2ab;--danger-soft:#422a33;
}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden}
body{background:var(--bg);color:var(--text);overscroll-behavior:none}
button,input,textarea,select{font:inherit}
button,a,textarea{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{color:inherit;cursor:pointer}
button:disabled{cursor:not-allowed}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:3px}
button{border:0}
svg{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
h1,h2,h3,h4,p{margin:0}
h1{font-size:30px;font-weight:700;line-height:1.2;letter-spacing:-.5px}
h2{font-size:18px;font-weight:600;line-height:1.35}
h3{font-size:17px;font-weight:600;line-height:1.4}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;top:-90px;left:16px;z-index:200;background:var(--surface);color:var(--blue);padding:12px 16px;border:1px solid var(--blue)}
.skip-link:focus{top:12px}

/* A single bounded viewport. Content and project lists own native scrolling. */
.app-shell{
  position:fixed;top:var(--app-top,0px);left:0;width:100%;height:var(--app-height,100dvh);
  display:grid;grid-template-columns:245px minmax(0,1fr);overflow:hidden;
  padding-top:max(var(--tg-safe-top,0px),env(safe-area-inset-top,0px));
  padding-bottom:max(var(--tg-safe-bottom,0px),env(safe-area-inset-bottom,0px));background:var(--surface);
}
.workspace{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--bg)}
#main{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;overflow:hidden}
.view{min-width:0;min-height:0;flex:1}
.content-view{width:100%;max-width:1120px;align-self:center;padding:34px 32px 38px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.chat-view{display:flex;flex-direction:column;overflow:hidden}
.conversation-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;scroll-behavior:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.workspace-footer,.header-nav,.drawer-edge,.drawer-close-edge{display:none}

/* Desktop navigation; the project list scrolls without moving the profile. */
.sidebar{display:flex;flex-direction:column;min-width:0;min-height:0;padding:24px 18px 18px;border-right:1px solid var(--line);background:var(--sidebar);overflow:hidden;overscroll-behavior:contain;z-index:55}
.sidebar-shell{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;overflow:hidden;transition:transform var(--drawer-duration) var(--drawer-ease),opacity 240ms ease}
.sidebar.show-settings .sidebar-shell{display:none}
.brand{display:block;flex-shrink:0;width:100%;padding:0;background:transparent;text-align:left}
.brand-logo{display:block;width:166px;max-width:100%;height:auto;background:#fff}
.sidebar .brand-logo{width:184px}
.brand-description{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;flex-shrink:0;margin:19px 0}
.product-name{font-size:24px;line-height:1.2;letter-spacing:-.4px;color:var(--blue)}
.product-caption{width:100%;font-size:13px;color:var(--muted)}
.beta-tag{display:inline-flex;align-items:center;padding:3px 6px;border-radius:4px;background:var(--orange);color:var(--orange-text);font-size:11px;font-weight:600;line-height:1.3;letter-spacing:.2px}
.new-chat,.create-submit,.home-new-chat,.onboarding-next{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border-radius:var(--radius);background:var(--orange);color:var(--orange-text);font-size:16px;font-weight:600;line-height:1.4}
.new-chat{width:100%;flex-shrink:0}
.new-chat>span:first-child{font-size:23px;line-height:1}
.new-chat:hover:not(:disabled),.create-submit:hover:not(:disabled),.home-new-chat:hover:not(:disabled),.onboarding-next:hover{background:var(--orange-hover)}
.new-chat:disabled,.create-submit:disabled,.home-new-chat:disabled{background:var(--soft);color:var(--muted)}
.navigation{display:grid;gap:4px;flex-shrink:0;margin-top:22px}
.nav-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 12px;border-radius:var(--radius);background:transparent;text-align:left;color:var(--muted);font-size:16px;line-height:1.4}
.nav-item svg{width:20px;height:20px}
.nav-item:hover{background:var(--soft);text-decoration:none}
.nav-item.active{background:var(--tint);color:var(--blue);font-weight:600;box-shadow:inset 3px 0 var(--orange)}
.nav-count{margin-left:auto;font-size:13px;line-height:1.2;color:var(--muted)}
.project-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;margin:24px 8px 6px;color:var(--muted);font-size:14px;font-weight:600}
#project-count{font-weight:400;margin-left:4px}
.new-project-button{display:grid;place-items:center;width:34px;height:34px;padding:0;border-radius:6px;background:transparent;color:var(--blue);font-size:25px;line-height:1}
.new-project-button:hover:not(:disabled){background:var(--soft)}
.new-project-button:disabled{color:var(--muted);opacity:.6}
.project-list{flex:1 1 0;min-height:0;padding:2px 0 10px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scroll-padding-block:8px}
.project-button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:9px 12px;border-radius:6px;background:transparent;text-align:left;font-size:15px}
.project-button:hover,.project-button.selected{background:var(--soft);color:var(--blue)}
.project-button>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-icon{flex-shrink:0;font-size:21px;color:var(--blue)}
.sidebar-empty{padding:10px 12px;color:var(--muted);font-size:14px;line-height:1.55}
.sidebar-bottom{display:flex;flex-direction:column;flex-shrink:0;gap:6px;min-width:0;margin-top:8px;padding-top:10px;border-top:1px solid var(--line)}
.sidebar-account-row{display:flex;align-items:center;gap:8px;min-width:0}
.privacy-note{display:none}
.help-tour{display:block;width:100%;min-height:42px;padding:8px;background:transparent;text-align:left;color:var(--blue);font-size:14px}
.help-tour:hover{text-decoration:underline;text-underline-offset:3px}
.profile{display:flex;flex:1;align-items:center;gap:10px;min-width:0;min-height:44px;margin:0;padding:4px 0;border:0}
.avatar{display:grid;place-items:center;flex:0 0 36px;width:36px;min-width:36px;max-width:36px;height:36px;min-height:36px;max-height:36px;aspect-ratio:1;border-radius:50%;overflow:hidden;background:var(--brand);color:#fff;font-size:16px;font-weight:600;line-height:1}
.profile>div,.profile-copy{display:block;min-width:0}
.profile-button{width:100%;background:transparent;text-align:left;border-radius:6px}
.profile-button:hover{background:var(--soft)}
.sidebar-logout{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:10px;border-radius:6px;background:transparent;color:var(--muted)}
.sidebar-logout:hover{background:var(--soft);color:var(--blue)}
.sidebar-logout svg{width:20px;height:20px}
.profile strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600}
.profile div>span,.profile-copy>span{display:block;margin-top:2px;color:var(--muted);font-size:13px}
.sidebar-backdrop{position:absolute;inset:0;z-index:50;padding:0;background:var(--overlay);opacity:0;pointer-events:none;transition:opacity var(--drawer-duration) var(--drawer-ease)}
.sidebar-backdrop.visible{opacity:1;pointer-events:auto}

/* Header branding stays quiet; the chat title replaces it on small screens. */
.topbar{display:flex;align-items:center;gap:18px;min-height:76px;flex-shrink:0;padding:12px 28px;border-bottom:3px solid var(--brand);background:var(--surface)}
.header-brand{display:flex;align-items:center;gap:14px;flex-shrink:0;min-width:0;padding:0;background:transparent;color:var(--blue)}
.header-brand .brand-logo{width:138px}
.header-product{display:flex;align-items:center;gap:8px;padding-left:14px;border-left:1px solid var(--blue)}
.header-product strong{font-size:22px;line-height:1.2;font-weight:700;letter-spacing:-.3px}
.topbar-right{display:flex;align-items:center;gap:10px;margin-left:auto;flex-shrink:0}
.icon-button{display:grid;place-items:center;flex-shrink:0;min-width:38px;min-height:38px;padding:7px;border-radius:7px;background:transparent;color:var(--blue)}
.icon-button:hover{background:var(--soft)}
.header-avatar{flex:0 0 44px;width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;max-height:44px;aspect-ratio:1;padding:0;border-radius:50%;overflow:hidden;background:var(--brand);color:#fff;font-size:18px;font-weight:600;line-height:1}
.header-avatar>span{display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;border-radius:inherit}
.avatar .avatar-art,.header-avatar .avatar-art,.avatar-preview .avatar-art,.avatar-option .avatar-art{display:block;flex:none;width:100%;max-width:none;height:100%;aspect-ratio:1;stroke:none}
.avatar img,.header-avatar img,.avatar-preview img,.avatar-option img{display:block;flex:none;width:100%;max-width:none;height:100%;aspect-ratio:1;object-fit:cover;border-radius:inherit}
.header-avatar:hover{background:#164f91}
.header-chat{display:none;align-items:center;gap:8px;min-width:0;flex:1}
html[data-view="chat"] .header-chat{display:flex}
.breadcrumb{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
#view-title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:600;line-height:1.3}
.chat-project{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:13px;line-height:1.3}
.connection-badge,.telegram-link{display:none}
.notice{display:flex;align-items:flex-start;gap:10px;flex-shrink:0;padding:10px 28px;border-bottom:1px solid var(--line);background:var(--notice);font-size:14px;line-height:1.5}
.notice.is-connected{display:none}
.notice-icon{display:grid;place-items:center;flex-shrink:0;width:20px;height:20px;margin-top:1px;border:1px solid var(--blue);border-radius:50%;color:var(--blue);font-size:13px}
.notice p{flex:1;min-width:0}
.notice a{flex-shrink:0;text-decoration:underline;text-underline-offset:3px}

/* Home: brand hero, project context, four tasks and actual recent dialogs. */
.home-view{max-width:none;padding:12px 0 28px}
.home-hero{padding:23px 30px 25px;background:var(--hero);color:#fff}
.home-greeting{font-size:16px;line-height:1.5;margin-bottom:8px}
.home-hero h1{font-size:31px;line-height:1.2;letter-spacing:-.4px;color:#fff}
.home-new-chat{width:100%;min-height:48px;margin-top:20px;font-size:18px}
.home-new-chat>span:first-child{font-size:25px;line-height:1}
.home-content{width:100%;max-width:1100px;margin:0 auto;padding:20px 30px 0}
.home-project-bar{display:flex;align-items:center;gap:10px;min-height:46px;padding:8px 13px;border-radius:6px;background:var(--user)}
.home-project-bar>svg{width:23px;height:23px;color:var(--blue)}
.home-project-bar>label{flex-shrink:0;font-size:15px}
.home-project-bar>select{flex:1;min-width:0;min-height:30px;padding:4px 30px 4px 0;border:0;background-color:transparent;font-weight:600}
.suggestions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:24px}
.suggestion{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;padding:18px;border:1px solid var(--line);border-radius:6px;background:var(--surface);text-align:left}
.suggestion:hover{background:var(--tint)}
.suggestion-icon{display:grid;place-items:center;color:var(--blue)}
.suggestion-icon svg{width:27px;height:27px}
.suggestion strong{font-size:16px;line-height:1.35;font-weight:600}
.suggestion>span:last-child:not(.suggestion-icon){color:var(--muted);font-size:14px;line-height:1.5}
.home-task-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.home-task-tile{flex-direction:row;align-items:center;gap:14px;min-height:76px;padding:16px}
.home-task-tile .suggestion-icon svg{width:31px;height:31px}
.home-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 4px}
.home-section-heading h2{font-size:18px}
.home-all-dialogs{flex-shrink:0;min-height:44px;padding:8px 0 8px 10px;background:transparent;color:var(--blue);font-size:14px}
.home-all-dialogs:hover{text-decoration:underline;text-underline-offset:3px}
.home-empty{margin-top:10px;color:var(--muted);font-size:15px;line-height:1.55}
.home-recent-list{border-top:1px solid var(--line)}
.home-recent-list .recent-dialog{display:flex;align-items:center;gap:13px;min-height:72px;width:100%;padding:14px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;text-align:left}
.home-recent-list .recent-dialog:last-child{border-bottom:0}
.recent-dialog-icon,.dialog-card-icon{display:grid;place-items:center;flex-shrink:0;width:34px;height:34px;color:var(--blue)}
.recent-dialog-icon svg,.dialog-card-icon svg{width:24px;height:24px}
.recent-dialog-copy,.dialog-card-copy{display:block;min-width:0;flex:1}
.dialog-card-title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:600;line-height:1.4}
.dialog-card-project{display:block;min-width:0;margin-top:3px;color:var(--muted);font-size:13px;line-height:1.4}
.recent-dialog .dialog-card-project{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* The same plain row language serves dialogs, projects, files and settings. */
.section-heading{margin-bottom:22px}
.section-kicker{display:block;margin-bottom:8px;color:var(--blue);font-size:12px;font-weight:600;line-height:1.4;letter-spacing:.7px}
.section-heading>p,.section-heading>div>p{margin-top:10px;color:var(--muted);font-size:16px;line-height:1.6;max-width:620px}
.page-heading{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:20px}
.page-heading>.create-submit{flex-shrink:0}
.dialog-search{display:flex;align-items:center;gap:10px;min-height:44px;margin:18px 0 12px;padding:8px 12px;border:1px solid var(--line);border-radius:6px;background:var(--soft);color:var(--muted)}
.dialog-search svg{width:20px;height:20px}
.dialog-search input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--text);font-size:16px;line-height:1.5}
.dialog-filter{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.dialog-filter select{width:auto;min-width:150px;max-width:100%;color:var(--blue);border-color:var(--blue)}
.dialog-list{display:grid;gap:0}
.conversation-row{display:flex;align-items:stretch;min-width:0;border-bottom:1px solid var(--line)}
.conversation-row>.conversation-button{flex:1;min-width:0;width:0!important;border-bottom:0!important}
.home-recent-list>.conversation-row:last-child{border-bottom:0}
.delete-dialog-action{display:grid;place-items:center;align-self:center;flex-shrink:0;width:44px;min-height:44px;padding:10px;border-radius:6px;background:transparent;color:var(--muted)}
.delete-dialog-action svg{width:19px;height:19px}
.delete-dialog-action:hover:not(:disabled){background:var(--danger-soft);color:var(--danger)}
.delete-action:disabled{opacity:.45;cursor:not-allowed}
.files-feedback{color:var(--muted);font-size:14px;line-height:1.5}
.delete-dialog{width:min(440px,calc(100vw - 32px))}
.delete-dialog h2{margin-bottom:14px}
#delete-description{font-size:16px;line-height:1.6;overflow-wrap:anywhere}
#delete-feedback{margin-top:14px;color:var(--danger);font-size:14px;line-height:1.5}
.danger-button{min-height:44px;padding:10px 16px;border-radius:7px;background:#ad3029;color:#fff;font-size:16px;font-weight:600}
.danger-button:hover:not(:disabled){background:#902720}
.danger-button:disabled{opacity:.55;cursor:wait}
.conversation-button.dialog-card:not(.recent-dialog){display:flex;align-items:flex-start;gap:12px;width:100%;min-height:75px;padding:14px 10px;border:0;border-bottom:1px solid var(--line);border-radius:7px;background:transparent;text-align:left}
.conversation-button:hover,.project-card:hover{background:var(--soft)}
.conversation-button.selected{background:var(--user)}
.dialog-card-icon{margin-top:2px}
.project-grid{display:block;padding:0 16px;border-radius:7px;background:var(--surface)}
.project-card{display:flex;align-items:center;gap:13px;width:100%;min-width:0;min-height:78px;padding:17px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}
.project-card:last-child{border-bottom:0}
.project-card-icon{display:grid;place-items:center;flex-shrink:0;width:34px;height:34px;border-radius:6px;background:var(--soft);color:var(--blue);font-size:26px}
.project-card-copy{display:block;min-width:0;flex:1}
.project-card-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;line-height:1.35;font-weight:600}
.project-card-copy small{display:block;margin-top:5px;color:var(--muted);font-size:14px;line-height:1.5}
.empty-state{text-align:center;max-width:450px;margin:52px auto;padding:12px}
.empty-icon{display:grid;place-items:center;margin:0 auto 17px;width:48px;height:48px;color:var(--blue);font-size:34px}
.empty-state h2{font-size:20px}
.empty-state p{margin-top:10px;color:var(--muted);font-size:16px;line-height:1.6}
.empty-state .quiet-button{margin-top:20px}
.quiet-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 15px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--blue);font-size:15px;line-height:1.4}
.quiet-button:hover:not(:disabled){border-color:var(--blue);text-decoration:none}
.quiet-button:disabled{color:var(--muted);opacity:.7}
select{max-width:100%;min-height:44px;padding:10px 36px 10px 12px;border:1px solid var(--input);border-radius:6px;background-color:var(--surface);color:var(--text);font-size:16px;line-height:1.4;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--blue) 50%),linear-gradient(135deg,var(--blue) 50%,transparent 50%);background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;background-size:5px 5px;background-repeat:no-repeat}
select:disabled{color:var(--muted)}
.settings-form{padding:0 16px;background:var(--surface);border-radius:7px}
.settings-field{display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,260px);align-items:center;gap:24px;padding:21px 0;border-bottom:1px solid var(--line)}
.settings-field label{font-size:16px;font-weight:600}
.settings-field select{width:100%;min-width:0}
.settings-help,.settings-footnote{margin-top:20px;color:var(--muted);font-size:14px;line-height:1.6}
.settings-help a{text-decoration:underline;text-underline-offset:3px}
.settings-submit-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:22px 0 12px}
#settings-feedback{width:100%;color:var(--muted);font-size:14px;line-height:1.5}
.settings-card{margin-top:26px;padding:0 16px}
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:19px 0;border-bottom:1px solid var(--line)}
.settings-row h2{font-size:16px}
.settings-row p{margin-top:6px;color:var(--muted);font-size:14px;line-height:1.6}
.setting-pill{flex-shrink:0;color:var(--blue);font-size:14px;white-space:nowrap}

/* Preferences stay inside the drawer; only their contents scroll. */
.sidebar-settings{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;overflow:hidden;transition:transform var(--drawer-duration) var(--drawer-ease),opacity 240ms ease}
.sidebar-settings-heading{display:grid;grid-template-columns:auto minmax(0,1fr) 44px;align-items:center;gap:8px;flex-shrink:0;min-height:48px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.sidebar-settings-heading h2{min-width:0;font-size:21px;font-weight:600;line-height:1.3;text-align:center}
.sidebar-settings-back{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:8px 2px;background:transparent;color:var(--blue);font-size:14px;line-height:1.3}
.sidebar-settings-back:hover{color:var(--text)}
.sidebar-settings-back svg{width:18px;height:18px}
.sidebar-settings-heading .icon-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:8px}
.sidebar-settings-scroll{flex:1;min-width:0;min-height:0;padding:0 2px 10px 0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scroll-padding-block:12px}
.prefs-section{min-width:0;padding:19px 0;border-bottom:1px solid var(--line)}
.prefs-section:last-child{border-bottom:0}
.prefs-section h3{margin:0 0 12px;font-size:16px;font-weight:600;line-height:1.4}
.prefs-section>p,.avatar-copy p{color:var(--muted);font-size:13px;line-height:1.5}
.theme-segmented{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}
.theme-segmented button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:44px;padding:8px 4px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--muted);font-size:14px;line-height:1.25;text-align:center}
.theme-segmented button svg{width:17px;height:17px}
.theme-segmented button:hover{color:var(--text)}
.theme-segmented button[aria-pressed="true"]{border-color:var(--line);background:var(--surface);color:var(--blue);font-weight:600;box-shadow:0 1px 3px #10213d0c}
.avatar-profile-row{display:flex;align-items:center;gap:13px;min-width:0}
.avatar-preview{display:grid;place-items:center;flex:0 0 64px;width:64px;min-width:64px;max-width:64px;height:64px;min-height:64px;max-height:64px;aspect-ratio:1;overflow:hidden;border-radius:50%;background:var(--brand);color:#fff;font-size:25px;font-weight:600;line-height:1}
.avatar-copy{flex:1;min-width:0}
.avatar-copy strong{display:block;margin-bottom:4px;overflow-wrap:anywhere;font-size:15px;font-weight:600;line-height:1.4}
.avatar-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.avatar-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:1 1 auto;min-width:0;min-height:44px;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--blue);font-size:14px;line-height:1.3;text-align:center}
.avatar-actions button:hover:not(:disabled){border-color:var(--blue);background:var(--soft)}
.avatar-actions button:disabled{color:var(--muted);opacity:.65}
.avatar-grid10{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 8px;align-items:center;margin-top:17px;padding:3px 2px}
.avatar-option{display:grid;place-items:center;justify-self:center;flex:none;width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;max-height:44px;aspect-ratio:1;padding:0;overflow:hidden;border:2px solid transparent;border-radius:50%;background:var(--soft);color:var(--blue);transition:border-color 150ms ease,box-shadow 150ms ease}
.avatar-option:hover{border-color:var(--input)}
.avatar-option[aria-pressed="true"]{border-color:var(--orange);box-shadow:0 0 0 2px var(--surface),0 0 0 3px var(--orange)}
.sidebar-settings .settings-form{margin:0;padding:0;border:0;border-radius:0;background:transparent}
.sidebar-settings .settings-field{grid-template-columns:minmax(0,1fr);gap:7px;padding:0 0 14px;border:0}
.sidebar-settings .settings-field label{font-size:14px;font-weight:600}
.sidebar-settings .settings-field select{width:100%;min-width:0;min-height:44px;font-size:16px}
.sidebar-settings .settings-help,.sidebar-settings .settings-footnote{margin-top:0;color:var(--muted);font-size:13px;line-height:1.5}
.sidebar-settings .settings-submit-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px;margin-top:14px;padding:0}
.sidebar-settings .settings-submit-row>button{width:100%;min-width:0;min-height:44px;padding:9px 7px;font-size:14px;line-height:1.3}
.sidebar-settings #settings-feedback{grid-column:1/-1;min-width:0;font-size:13px;overflow-wrap:anywhere}
.sidebar-settings #settings-summary{margin:0 0 16px;color:var(--muted);font-size:13px;line-height:1.5}
.sidebar-settings .settings-help{margin-top:14px}
.sidebar-settings .settings-card{margin:0;padding:0}
.sidebar-settings .settings-row{align-items:flex-start;gap:10px;padding:12px 0;border:0}
.sidebar-settings .settings-row h2,.sidebar-settings .settings-row h3{margin:0;font-size:14px}
.sidebar-settings .settings-row p{margin-top:4px;font-size:13px;line-height:1.5}
.sidebar-settings .setting-pill{font-size:12px}
.prefs-feedback{margin-top:10px;min-width:0;color:var(--muted);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.prefs-local-note{margin-top:10px;color:var(--muted);font-size:12px;line-height:1.5}
.prefs-access{display:grid;gap:5px;padding:16px 0 2px;color:var(--muted);font-size:12px;line-height:1.5}
.prefs-access strong{color:var(--text);font-size:13px;font-weight:600}
@media(min-width:761px){
  .sidebar.show-settings{position:relative;width:360px;max-width:calc(100vw - 24px);box-shadow:15px 0 35px #10213d1c}
}

/* Real conversation content and artifacts; no demo rows or file labels. */
.welcome{width:100%;max-width:940px;margin:0 auto;padding:40px 28px 28px}
.welcome-eyebrow{margin-bottom:12px;color:var(--blue);font-size:12px;font-weight:600;letter-spacing:.7px}
.welcome h1{font-size:30px}
.welcome-copy{max-width:620px;margin-top:14px;color:var(--muted);font-size:16px;line-height:1.65}
.preview-caption{margin-top:18px;color:var(--muted);font-size:14px;line-height:1.6}
.messages{display:flex;flex-direction:column;gap:18px;width:100%;max-width:900px;margin:0 auto;padding:28px 30px 24px}
.message{min-width:0;font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.message.user{align-self:flex-end;max-width:86%}
.message.assistant{display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;width:100%}
.message-avatar{display:grid;place-items:center;align-self:start;flex:none;width:34px;min-width:34px;max-width:34px;height:34px;min-height:34px;max-height:34px;aspect-ratio:1;margin-top:3px;border-radius:50%;overflow:hidden;background:var(--brand);color:#fff;font-size:15px;font-weight:600;line-height:1}
.message-avatar img{display:block;width:100%;height:100%;max-width:none;object-fit:cover;border-radius:inherit}
.message-body{min-width:0;padding:13px 15px;border-radius:15px;background:var(--answer)}
.message.user .message-body{background:var(--user)}
.message-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.message-body p+p{margin-top:8px}
.message-body h2,.message-body h3,.message-body h4{margin:15px 0 8px;font-size:18px;line-height:1.4}
.message-body ul,.message-body ol{margin:12px 0;padding-left:22px}
.message-body li+li{margin-top:5px}
.message-body a{text-decoration:underline;text-underline-offset:3px}
.message-body pre{max-width:100%;margin:12px 0;padding:13px;border-radius:6px;background:var(--surface);overflow:auto;white-space:pre;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.6}
.files-grid{display:grid;gap:0;margin-top:20px}
.file-card{display:flex;align-items:center;gap:12px;min-width:0;padding:17px 0;border-bottom:1px solid var(--line);background:transparent}
.file-symbol{display:grid;place-items:center;flex-shrink:0;width:36px;min-height:42px;border-radius:5px;background:var(--soft);color:var(--blue);font-size:27px}
.file-info{flex:1;min-width:0}
.file-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600}
.file-info small{display:block;margin-top:3px;color:var(--muted);font-size:13px;line-height:1.4}
.file-actions{display:flex;align-items:center;flex-wrap:wrap;flex-shrink:0;gap:7px}
.file-actions button{min-height:40px;padding:8px 9px;border-radius:5px;background:transparent;color:var(--blue);font-size:14px;line-height:1.3}
.file-actions button:hover:not(:disabled){background:var(--tint)}
.file-actions button:disabled{opacity:.6}
.file-actions .delete-file-action{color:var(--danger)}
.file-actions .delete-file-action:hover:not(:disabled){background:var(--danger-soft)}
.message .file-card{gap:10px;margin-top:14px;padding:10px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}
.message .file-symbol{width:30px;min-height:36px}

/* Composer: attachment, text field and the approved orange arrow action. */
.composer-area{width:100%;max-width:960px;flex-shrink:0;margin:0 auto;padding:6px 30px 12px;background:var(--surface)}
.composer{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:end;gap:8px;margin:0;padding:12px 0 0;border-top:1px solid var(--line);background:var(--surface)}
.composer textarea{grid-column:2;grid-row:1;display:block;width:100%;height:44px;min-height:44px;max-height:128px;margin:0;padding:10px 12px;border:1px solid var(--input);border-radius:6px;resize:none;overflow-y:auto;background:var(--surface);color:var(--text);font-size:16px;line-height:1.4}
.composer textarea::placeholder{color:var(--muted);opacity:1}
.composer-toolbar,.composer-toolbar>div{display:contents}
.attach-button{grid-column:1;grid-row:1;position:relative;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:6px;background:var(--user);color:var(--blue)}
.attach-button svg{width:24px;height:24px}
.attach-button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.attach-button:hover:not(:disabled){background:var(--tint)}
.attach-button:disabled{color:var(--muted);background:var(--soft)}
.composer:has(.draft-file){grid-template-columns:64px minmax(0,1fr) 44px}
.composer:has(.draft-file) .attach-button{display:flex;flex-direction:column;justify-content:center;gap:1px;width:64px}
.composer:has(.draft-file) .attach-button svg{width:18px;height:18px}
.composer:has(.draft-file) .attach-button>span{position:static;width:auto;height:auto;overflow:visible;clip:auto;font-size:12px;line-height:1.1;white-space:nowrap}
.send-button{grid-column:3;grid-row:1;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:6px;background:var(--orange);color:var(--orange-text)}
.send-button svg{width:23px;height:23px}
.send-button:hover:not(:disabled){background:var(--orange-hover)}
.send-button:disabled{background:var(--soft);color:var(--muted)}
.draft-label{display:none}
.draft-attachments{grid-column:1/-1;grid-row:2;display:flex;flex-wrap:wrap;gap:8px;max-height:144px;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.draft-file{display:flex;align-items:center;gap:8px;flex:1 1 calc(50% - 4px);min-width:0;max-width:100%;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--soft)}
.draft-file-info{flex:1;min-width:0}
.draft-file-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600}
.draft-file-info>span{display:block;margin-top:3px;color:var(--muted);font-size:12px;line-height:1.4}
.draft-file-icon{flex-shrink:0;font-size:24px;color:var(--blue)}
.draft-file-remove{display:grid;place-items:center;flex-shrink:0;width:32px;min-height:32px;padding:3px;border-radius:5px;background:transparent;color:var(--muted);font-size:18px}
.draft-file-remove:hover{background:var(--tint)}
.draft-file-retry{flex-shrink:0;min-height:32px;padding:5px 7px;border-radius:5px;background:var(--surface);color:var(--blue);font-size:13px}
.draft-file.failed{border-color:var(--orange)}
.draft-file-remove:disabled,.draft-file-retry:disabled{opacity:.6}
.composer-hint{margin-top:9px;text-align:center;color:var(--muted);font-size:13px;line-height:1.5}
.job-progress{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:7px 1px 9px;color:var(--muted);font-size:13px;line-height:1.4}
.job-progress .progress-pulse,.job-progress .progress-explanation{display:none}
.job-progress[data-state="failed"] .progress-explanation,.job-progress[data-state="unknown"] .progress-explanation,.job-progress[data-state="awaiting_approval"] .progress-explanation{display:block}
.process-track{width:100%;height:3px;overflow:hidden;border-radius:3px;background:var(--tint)}
.process-track::before{content:"";display:block;width:32%;height:100%;border-radius:3px;background:var(--blue);animation:process-scan 1.8s ease-in-out infinite alternate}
.job-progress[data-state="failed"] .process-track::before,.job-progress[data-state="unknown"] .process-track::before{width:100%;background:var(--orange);animation:none}
@keyframes process-scan{from{transform:translateX(-50%)}to{transform:translateX(270%)}}

/* Authentication, native dialogs and the existing help tour. */
.auth-recovery{display:flex;align-items:flex-start;gap:14px;margin:18px 28px;padding:18px;border:1px solid var(--line);border-left:3px solid var(--orange);border-radius:7px;background:var(--soft)}
.auth-recovery-symbol{flex-shrink:0;color:var(--blue);font-size:30px;line-height:1}
.auth-recovery h2{font-size:20px}
.auth-recovery p{margin-top:7px;color:var(--muted);font-size:16px;line-height:1.55}
.auth-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:14px}
.file-dialog,.create-dialog{max-width:calc(100vw - 32px);max-height:calc(var(--app-height,100dvh) - 32px);padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);box-shadow:var(--shadow)}
.file-dialog::backdrop,.create-dialog::backdrop{background:var(--overlay);backdrop-filter:blur(3px)}
.file-dialog{width:min(960px,calc(100vw - 32px))}
.file-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid var(--line)}
.file-dialog-header h2{min-width:0;font-size:17px;overflow-wrap:anywhere}
#file-preview{max-height:calc(var(--app-height,100dvh) - 115px);overflow:auto}
.file-dialog img{display:block;max-width:100%;max-height:calc(var(--app-height,100dvh) - 140px);margin:0 auto;object-fit:contain}
.file-dialog iframe{display:block;width:100%;height:70vh;max-height:calc(var(--app-height,100dvh) - 140px);border:0}
.create-dialog{width:440px;padding:26px}
.create-dialog h2{margin:13px 0 23px;font-size:25px;line-height:1.25}
.create-dialog label{display:block;margin-bottom:9px;font-size:16px;font-weight:600}
.create-dialog input{display:block;width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid var(--input);border-radius:6px;background:var(--surface);color:var(--text);font-size:16px}
.create-dialog p{margin-top:10px;color:var(--muted);font-size:14px;line-height:1.6}
.create-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:23px}
.toast{flex-shrink:0;padding:9px 18px;border-bottom:1px solid var(--line);background:var(--soft);color:var(--blue);font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.onboarding-layer{position:fixed;inset:0;z-index:110;pointer-events:none}
.onboarding-highlight{position:fixed;z-index:111;border:2px solid var(--orange);border-radius:9px;box-shadow:0 0 0 9999px var(--overlay);pointer-events:none}
.onboarding-arrow{position:fixed;z-index:111;color:var(--orange);overflow:visible;fill:none;stroke:var(--orange);stroke-width:3;pointer-events:none}
.onboarding-card{position:fixed;z-index:112;width:340px;max-width:calc(100vw - 28px);padding:21px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);box-shadow:var(--shadow);pointer-events:auto}
.onboarding-count{margin-bottom:7px;color:var(--blue);font-size:13px;font-weight:600}
.onboarding-title{margin-bottom:8px;font-size:19px;font-weight:600;line-height:1.35}
.onboarding-copy{color:var(--muted);font-size:15px;line-height:1.55}
.onboarding-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:17px}
.onboarding-skip,.onboarding-next{min-height:42px;padding:9px 13px;border-radius:7px;font-size:14px}
.onboarding-skip{background:transparent;color:var(--muted)}

/* The regular browser launch guide shares the same company identity. */
html.public-mode,html.public-mode body{height:auto;min-height:100%;overflow:auto}
html.public-mode body{position:static;overscroll-behavior:auto}
.public-landing{min-height:100svh;background:var(--bg)}
.launch-header{display:flex;align-items:center;gap:22px;max-width:1120px;margin:0 auto;padding:24px;border-bottom:3px solid var(--brand)}
.launch-brand{flex-shrink:0}
.launch-brand .brand-logo{width:166px}
.launch-product{display:flex;align-items:center;gap:8px;color:var(--blue);font-size:23px;font-weight:700}
.launch-header-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-left:auto;padding:10px 15px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--blue);font-size:15px}
.launch-main{max-width:1120px;margin:0 auto;padding:40px 24px 30px}
.launch-intro{display:grid;grid-template-columns:1.1fr 1fr;gap:28px;align-items:stretch}
.launch-hero{padding:32px;border-radius:7px;background:var(--hero);color:#fff}
.launch-hero .section-kicker{color:#fff;opacity:.9}
.launch-hero h1{margin:14px 0 19px;font-size:38px;line-height:1.15;letter-spacing:-.7px;color:#fff}
.launch-hero>p{font-size:18px;line-height:1.6;color:#fff}
.launch-primary{display:inline-flex;align-items:center;justify-content:center;min-height:48px;margin-top:25px;padding:13px 20px;border-radius:7px;background:var(--orange);color:var(--orange-text);font-size:17px;font-weight:600;line-height:1.4}
.launch-primary:hover{background:var(--orange-hover);text-decoration:none}
.launch-hero>.launch-note{max-width:390px;margin-top:13px;font-size:14px;line-height:1.55;color:#fff}
.launch-guide{padding:28px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}
.launch-guide h2{margin-bottom:21px;font-size:23px}
.launch-steps{display:grid;gap:19px;margin:0;padding-left:22px}
.launch-steps li{padding-left:5px;color:var(--blue)}
.launch-steps strong{color:var(--text);font-size:17px;font-weight:600}
.launch-steps p{margin-top:5px;color:var(--muted);font-size:16px;line-height:1.55}
.launch-access{margin-top:23px;padding-top:17px;border-top:1px solid var(--line);color:var(--muted);font-size:14px;line-height:1.6}
.launch-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:30px}
.launch-features article{padding:23px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}
.launch-feature-icon{display:block;margin-bottom:12px;color:var(--blue);font-size:26px}
.launch-features h2{margin-bottom:9px;font-size:19px}
.launch-features p{color:var(--muted);font-size:16px;line-height:1.6}
.launch-tip{margin-top:25px;padding:23px 25px;border-left:3px solid var(--orange);border-radius:7px;background:var(--soft)}
.launch-tip h2{margin-bottom:10px;font-size:19px}
.launch-tip p{color:var(--muted);font-size:16px;line-height:1.6}
.launch-tip p+p{margin-top:9px}
.launch-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;max-width:1120px;margin:0 auto;padding:20px 24px 30px;color:var(--muted);font-size:14px}

/* Tablet and mobile preserve native viewport, safe-area and drawer contracts. */
.mobile-nav{display:none}
@media(min-width:1500px){
  .content-view{max-width:1220px;padding-inline:48px}
  .home-view{max-width:none;padding-inline:0}
  .home-hero{padding-inline:max(36px,calc((100% - 1080px)/2))}
  .messages{max-width:1000px}
  .composer-area{max-width:1060px}
}
@media(max-width:1100px){
  .app-shell{grid-template-columns:228px minmax(0,1fr)}
  .sidebar{padding-inline:15px}
  .topbar{padding-inline:21px;gap:13px}
  .header-brand .brand-logo{width:126px}
  .header-product{gap:6px;padding-left:11px}
  .header-product strong{font-size:20px}
  .content-view{padding-inline:25px}
  .home-view{padding-inline:0}
  .home-hero,.home-content{padding-left:25px;padding-right:25px}
  .composer-area{padding-inline:24px}
  .messages{padding-inline:24px}
}
@media(max-width:760px){
  .app-shell{display:flex;flex-direction:column}
  .workspace{flex:1}
  .sidebar{position:absolute;left:0;top:0;bottom:0;width:min(92%,360px);padding:calc(16px + max(var(--tg-safe-top,0px),env(safe-area-inset-top,0px))) 17px max(12px,var(--tg-safe-bottom,0px),env(safe-area-inset-bottom,0px));transform:translateX(-102%);transition:transform var(--drawer-duration) var(--drawer-ease);will-change:transform}
  .sidebar.open{transform:translateX(0)}
  .sidebar:not(.open) .sidebar-shell,.sidebar:not(.open) .sidebar-settings{transform:translateX(-8px);opacity:.55}
  .sidebar.open .sidebar-shell,.sidebar.open .sidebar-settings{transform:translateX(0);opacity:1}
  .sidebar .brand-logo{width:176px}
  .sidebar .brand-description{margin:14px 0}
  .sidebar .product-name{font-size:22px}
  .sidebar .product-caption{display:none}
  .sidebar .navigation{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-top:14px}
  .sidebar .nav-item{min-height:44px;padding:9px 8px;gap:7px;font-size:15px}
  .sidebar .nav-item svg{width:19px;height:19px}
  .sidebar .project-heading{margin:16px 8px 5px}
  .sidebar-bottom{gap:4px;padding-top:8px}
  .sidebar .profile{padding:4px 0;margin:0;border:0}
  .sidebar .profile div>span,.sidebar .profile-copy>span{font-size:12px}
  .drawer-edge{display:block;position:absolute;left:0;top:0;bottom:0;width:24px;z-index:35;touch-action:pan-y}
  .drawer-handle{position:absolute;left:8px;top:42%;display:grid;place-items:center;width:44px;height:64px;padding:0;transform:translateY(-50%);border-radius:0 10px 10px 0;background:transparent;touch-action:pan-y;-webkit-user-select:none;user-select:none}
  .drawer-handle::before{content:"";position:absolute;top:4px;bottom:4px;left:-8px;width:18px;border:1px solid #ffffff40;border-left:0;border-radius:0 10px 10px 0;background:var(--brand);box-shadow:2px 1px 7px #10213d20}
  .drawer-handle>span{position:absolute;left:-1px;top:23px;width:3px;height:3px;border-radius:50%;background:#fff;box-shadow:0 7px #fff,0 14px #fff;pointer-events:none}
  .drawer-handle:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
  .drawer-handle:hover::before{background:#164f91}
  html.drawer-open .drawer-edge,html.keyboard-open .drawer-edge,html:has(dialog[open]) .drawer-edge{display:none}
  .drawer-close-edge{display:block;position:absolute;left:0;top:0;bottom:0;width:min(92%,360px);z-index:56;pointer-events:none;opacity:0;visibility:hidden;transform:translateX(-102%);transition:transform var(--drawer-duration) var(--drawer-ease),opacity 160ms ease,visibility 0s var(--drawer-duration);will-change:transform}
  html.drawer-open .drawer-close-edge{opacity:1;visibility:visible;transform:translateX(0);transition-delay:0s}
  .drawer-close-handle{position:absolute;left:min(calc(100% - 12px),calc(100vw - 44px));top:42%;display:grid;place-items:center;width:44px;height:64px;padding:0;transform:translateY(-50%);border:1px solid #ffffff40;border-left:0;border-radius:0 12px 12px 0;background:var(--brand);color:#fff;box-shadow:3px 2px 9px #10213d30;pointer-events:none;-webkit-user-select:none;user-select:none}
  html.drawer-open .drawer-close-handle{pointer-events:auto}
  .drawer-close-handle svg{width:22px;height:22px;stroke-width:2}
  .drawer-close-handle:hover{background:#164f91}
  .drawer-close-handle:active{background:#10427d}
  .drawer-close-handle:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
  .topbar{min-height:75px;padding:10px 13px;gap:10px}
  .header-brand{gap:12px}
  .header-brand .brand-logo{width:130px}
  .header-product{gap:7px;padding-left:12px}
  .header-product strong{font-size:19px}
  .header-product .beta-tag{font-size:10px;padding:3px 5px}
  html[data-view="chat"] .header-brand{display:none}
  .header-chat{gap:5px}
  #chat-back{min-width:44px;min-height:44px;margin-left:-5px}
  #view-title{font-size:17px}
  .chat-project{font-size:13px}
  .notice{flex-wrap:wrap;padding:9px 16px;gap:7px;font-size:14px}
  .notice p{flex-basis:calc(100% - 28px)}
  .notice a{margin-left:27px;font-size:14px}
  .content-view{padding:25px 18px 28px}
  .home-view{padding:12px 0 25px}
  h1{font-size:28px}
  .home-hero{padding:20px 20px 23px}
  .home-hero h1{font-size:27px}
  .home-greeting{font-size:15px}
  .home-new-chat{margin-top:19px;font-size:18px}
  .home-content{padding:15px 17px 0}
  .home-project-bar{gap:9px}
  .home-task-grid{gap:9px;margin-top:15px}
  .home-task-tile{gap:11px;min-height:73px;padding:13px 11px}
  .home-task-tile .suggestion-icon svg{width:29px;height:29px}
  .home-task-tile strong{font-size:15px}
  .home-section-heading{margin-top:20px}
  .home-section-heading h2{font-size:17px}
  .home-recent-list .recent-dialog{padding-block:13px;gap:11px}
  .page-heading{gap:16px}
  .section-heading>p,.section-heading>div>p{font-size:15px}
  .conversation-button.dialog-card{padding-inline:7px}
  .project-grid{padding-inline:0}
  .project-card{padding-inline:2px}
  .empty-state{margin:38px auto}
  .settings-form,.settings-card{padding-inline:0}
  .settings-field{grid-template-columns:minmax(90px,1fr) minmax(0,190px);gap:16px;padding:20px 0}
  .settings-row{gap:16px;align-items:flex-start}
  .welcome{padding:28px 18px 22px}
  .welcome h1{font-size:27px}
  .suggestions:not(.home-task-grid){grid-template-columns:minmax(0,1fr)}
  .suggestions:not(.home-task-grid) .suggestion{display:grid;grid-template-columns:28px 1fr;gap:3px 12px;padding:13px 14px}
  .suggestions:not(.home-task-grid) .suggestion-icon{grid-column:1;grid-row:1/3}
  .suggestions:not(.home-task-grid) .suggestion>span:last-child:not(.suggestion-icon){grid-column:2}
  .messages{gap:18px;padding:22px 14px 18px}
  .message.user{max-width:91%}
  .message.assistant{grid-template-columns:31px minmax(0,1fr);gap:8px}
  .message-avatar{width:31px;min-width:31px;max-width:31px;height:31px;min-height:31px;max-height:31px;font-size:13px}
  .message-body{padding:12px 11px}
  .message .file-card{gap:7px;padding:8px}
  .message .file-info strong{font-size:14px}
  .message .file-actions{flex-direction:column;gap:2px}
  .message .file-actions button{min-height:36px;padding:6px;font-size:13px}
  .file-card{gap:10px}
  .file-actions{gap:3px}
  .files-grid>.file-card{display:grid;grid-template-columns:36px minmax(0,1fr);gap:7px 10px}
  .files-grid>.file-card>.file-actions{grid-column:2;justify-content:flex-start}
  .file-actions button{padding-inline:7px}
  .composer-area{padding:5px 14px 12px}
  .composer-hint{font-size:12px}
  html[data-view="chat"] .composer-hint{display:none}
  .draft-file{flex-basis:100%}
  .draft-file-remove{min-width:36px;min-height:36px}
  .auth-recovery{gap:10px;margin:14px 17px;padding:15px}
  .auth-recovery h2{font-size:19px}
  .auth-actions .create-submit,.auth-actions .quiet-button{flex:1;min-width:125px}
  .mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));flex-shrink:0;gap:3px;padding:6px 8px;border-top:1px solid var(--line);background:var(--surface)}
  .mobile-nav .nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:49px;padding:6px 2px;border-radius:5px;text-align:center;color:var(--muted);font-size:13px;line-height:1.2;box-shadow:none}
  .mobile-nav .nav-item svg{width:20px;height:20px}
  .mobile-nav .nav-item.active{background:var(--tint);color:var(--blue);font-weight:600;box-shadow:inset 0 2px var(--orange)}
  .mobile-nav .ai-nav-item{background:var(--brand);color:#fff;box-shadow:none;border-radius:8px}
  .mobile-nav .ai-nav-item:hover:not(:disabled){background:#164f91}
  .mobile-nav .ai-nav-item.active{background:var(--brand);color:#fff;box-shadow:inset 0 -3px var(--orange)}
  .ai-nav-symbol{font-size:23px;font-weight:700;line-height:1;letter-spacing:-.5px}
  .mobile-nav .ai-nav-item:disabled{opacity:.65}
  html[data-view="chat"] .mobile-nav,html.keyboard-open .mobile-nav{padding-block:2px}
  html[data-view="chat"] .mobile-nav .nav-item,html.keyboard-open .mobile-nav .nav-item{min-height:44px;padding:6px 2px;gap:0}
  html[data-view="chat"] .mobile-nav .nav-label,html.keyboard-open .mobile-nav .nav-label{display:none}
  html[data-view="chat"] .mobile-nav .ai-nav-symbol,html.keyboard-open .mobile-nav .ai-nav-symbol{font-size:20px}
  .create-dialog{position:fixed;top:calc(var(--app-top,0px) + max(var(--tg-safe-top,0px),env(safe-area-inset-top,0px)) + 16px);left:0;right:0;bottom:auto;margin:0 auto;padding:22px;width:calc(100vw - 32px)}
  .create-dialog h2{font-size:23px;margin-bottom:20px}
  .onboarding-card{padding:18px}
  .launch-header{gap:12px;padding:18px}
  .launch-brand .brand-logo{width:143px}
  .launch-product{display:none}
  .launch-header-link{min-height:44px;padding:9px 11px;font-size:14px}
  .launch-main{padding:24px 18px}
  .launch-intro{grid-template-columns:1fr;gap:22px}
  .launch-hero{padding:25px 23px}
  .launch-hero h1{font-size:33px;line-height:1.18}
  .launch-hero>p{font-size:17px}
  .launch-primary{width:100%;margin-top:22px;font-size:16px}
  .launch-guide{padding:23px}
  .launch-features{grid-template-columns:1fr;gap:10px;margin-top:23px}
  .launch-features article{display:grid;grid-template-columns:30px minmax(0,1fr);gap:5px 12px;padding:18px}
  .launch-feature-icon{grid-row:1/3;margin:0}
  .launch-features h2{margin:0;font-size:18px}
  .launch-features p{font-size:16px}
  .launch-tip{padding:21px}
  .launch-footer{padding:18px;font-size:14px}
}
@media(max-width:350px){
  .header-brand{gap:9px}
  .header-brand .brand-logo{width:118px}
  .header-product{gap:5px;padding-left:9px}
  .header-product strong{font-size:18px}
  .topbar{gap:8px;padding-inline:11px}
  .home-hero h1{font-size:25px}
  .home-task-tile{gap:8px;padding-inline:10px}
  .home-task-tile strong{font-size:14px}
  .home-task-tile .suggestion-icon svg{width:25px;height:25px}
  .settings-field{grid-template-columns:minmax(0,1fr);gap:9px}
  .settings-field select{width:100%}
  .launch-brand .brand-logo{width:125px}
}
@media(max-width:760px) and (max-height:650px){
  .sidebar{padding-top:calc(12px + max(var(--tg-safe-top,0px),env(safe-area-inset-top,0px)))}
  .sidebar .brand-logo{width:148px}
  .sidebar .brand-description{margin:10px 0}
  .sidebar .navigation{margin-top:10px;gap:3px}
  .sidebar .nav-item{min-height:40px;padding-block:7px}
  .sidebar .project-heading{margin-top:11px}
  .sidebar .profile #profile-caption{display:none}
}
html.keyboard-open .app-shell{padding-bottom:0}
html.keyboard-open .composer-hint,html.keyboard-open .notice{display:none}
html.keyboard-open .composer-area{padding:4px 12px 7px}
html.keyboard-open .composer{padding-top:8px}
html.keyboard-open .composer textarea{min-height:44px;max-height:80px}
html.keyboard-open .draft-attachments{max-height:64px}
html.keyboard-open .topbar{min-height:49px;padding-top:2px;padding-bottom:2px;border-bottom-width:1px}
html.keyboard-open .job-progress{padding-top:3px;padding-bottom:6px;gap:4px}
@media(pointer:coarse){
  .new-project-button,.draft-file-remove,.draft-file-retry,.file-actions button,.icon-button,.help-tour{min-height:44px}
  .draft-file-remove{min-width:44px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
  .process-track::before{transform:translateX(105%)}
}

/* Browser identity, installation and participant controls share the app's roles. */
.remember-choice{display:flex;align-items:center;gap:9px;margin-top:15px;font-size:14px;line-height:1.45}
.remember-choice input{width:18px;height:18px;margin:0;accent-color:var(--orange);flex-shrink:0}
.launch-secondary{display:inline-block;margin-top:18px;color:inherit;font-size:15px;text-underline-offset:4px}
.browser-login-panel{margin-top:22px;padding:20px;border:1px solid #ffffff55;border-radius:10px;background:#ffffff12;max-width:480px}
.browser-login-panel h2{margin:0 0 8px;font-size:22px;color:inherit}
.browser-login-panel p{font-size:15px;line-height:1.5;margin:8px 0;color:inherit}
.browser-login-panel .launch-primary{margin-top:12px;min-height:44px}
.login-code{display:block;margin:10px 0 12px;font-size:34px;letter-spacing:.15em;line-height:1.3;font-variant-numeric:tabular-nums;color:#fff;overflow-wrap:anywhere}
.login-cancel{display:inline-block;min-height:44px;margin-left:12px;padding:9px 12px;border-radius:7px;background:transparent;color:inherit;font-size:15px}
.launch-primary:disabled,.launch-header-link:disabled{opacity:.65;cursor:wait}
.launch-login-error{margin:18px 0 0!important;padding:12px;border-radius:8px;background:#fff0eb;color:#8e2424!important;font-size:15px!important;line-height:1.5!important}
.launch-apps{max-width:1120px;margin:0 auto;padding:4px 32px 34px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.launch-apps h2{margin:0;font-size:24px;line-height:1.3}
.launch-apps p{margin:7px 0 0;color:var(--muted);max-width:580px}
.launch-app-actions{display:flex;flex-wrap:wrap;gap:10px}
.windows-download{text-decoration:none;text-align:center}
.sidebar-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;min-width:0}
.sidebar-quick-actions .help-tour{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:6px;border-radius:6px;color:var(--muted);font-size:13px;line-height:1.3;text-align:center;white-space:nowrap}
.sidebar-quick-actions .help-tour:hover{background:var(--soft);color:var(--blue);text-decoration:none}
.account-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.account-shortcuts>button{min-width:0;padding-inline:8px;font-size:14px}
.account-view{max-width:920px}
.account-view .page-heading{gap:16px}
.account-view .page-heading p{margin:8px 0 0;color:var(--muted)}
.account-feedback{min-height:24px;margin:0 0 16px;color:var(--muted);font-size:15px;overflow-wrap:anywhere}
.account-list{display:flex;flex-direction:column;gap:0}
.account-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 0;border-bottom:1px solid var(--line);min-width:0}
.account-row-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.account-row-copy strong{font-size:17px;font-weight:600;overflow-wrap:anywhere}
.account-row-copy>span{font-size:14px;color:var(--muted);overflow-wrap:anywhere}
.account-row>button{flex-shrink:0;min-height:44px;font-size:14px}
.account-row-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0}
.account-row-actions>button{min-height:44px;font-size:14px;padding:9px 12px}
.account-revoke{min-height:44px;padding:9px 10px;background:transparent;color:var(--danger);border-radius:6px;font-size:14px}
.account-revoke:hover{background:var(--danger-soft)}
.account-empty{color:var(--muted);margin:12px 0;font-size:15px}
.members-section{margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}
.members-section:first-of-type{margin-top:4px;padding-top:0;border-top:0}
.members-section h2{margin:0 0 14px;font-size:22px;line-height:1.3}
.members-heading{display:flex;align-items:center;gap:10px;justify-content:space-between}
.members-heading>span{color:var(--blue);font-size:14px}
.invite-form{max-width:620px;display:flex;flex-direction:column;gap:15px}
.invite-form label,.invite-result label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:14px;font-weight:600}
.invite-form input,.invite-form select,.invite-result input{min-width:0;width:100%;min-height:46px;border:1px solid var(--input);border-radius:7px;background:var(--surface);color:var(--text);padding:10px 12px;font-size:16px;font-weight:400}
.invite-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.invite-explanation{margin:0;font-size:14px;color:var(--muted)}
.invite-form .create-submit{align-self:flex-start}
.invite-result{max-width:620px;margin-top:20px;padding:16px;background:var(--soft);border-radius:9px}
.invite-result>div{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}
.invite-result span{font-size:13px;color:var(--muted)}
.install-dialog{width:min(540px,calc(100vw - 30px));max-height:calc(var(--app-height,100dvh) - 32px);padding:25px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text);overflow:auto;overscroll-behavior:contain;box-shadow:var(--shadow)}
.install-dialog::backdrop{background:var(--overlay)}
.install-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.install-heading h2{margin:0;font-size:24px;line-height:1.3}
.install-intro{margin:8px 0 20px;color:var(--muted);font-size:15px}
.install-option{padding:16px 0;border-top:1px solid var(--line)}
.install-option h3{margin:0 0 8px;font-size:18px}
.install-option ol{padding-left:22px;margin:0;font-size:15px;color:var(--muted)}
.install-option li+li{margin-top:7px}
.install-option p{font-size:15px;color:var(--muted);margin:0 0 12px}
.install-option.is-recommended{border-left:3px solid var(--orange);padding-left:13px}
.install-option .create-submit{font-size:15px}
.install-note{font-size:13px;color:var(--muted);margin:15px 0 0}
@media(max-width:760px){
 .launch-apps{padding:0 18px 25px}
 .launch-apps h2{font-size:23px}
 .launch-app-actions{width:100%}
 .launch-app-actions>*{flex:1;min-width:135px}
 .account-row{gap:12px;flex-wrap:wrap}
 .account-row-copy{flex:1;min-width:155px}
 .account-row-actions{width:100%;justify-content:flex-start}
 .account-row-actions>button{flex:1}
 .invite-options{grid-template-columns:1fr;gap:12px}
 .invite-result{padding:13px}
 .invite-result .quiet-button{width:100%}
 .install-dialog{padding:20px}
 .install-heading h2{font-size:22px}
 .sidebar-shell{overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
 .sidebar-shell>.project-list{flex:0 0 auto;min-height:44px;overflow:visible}
 .navigation{margin-top:12px;gap:2px}
 .project-heading{margin-top:13px}
}
/* A Windows host supplies the native pin/collapse controls; this view stays small. */
html.desktop-widget .workspace-footer{display:none}
html.desktop-widget .topbar{min-height:45px;padding:5px 11px;border-bottom:1px solid var(--line);gap:8px}
html.desktop-widget .header-brand,html.desktop-widget .header-nav,html.desktop-widget .connection-badge,html.desktop-widget .telegram-link{display:none}
html.desktop-widget .header-chat{display:flex;flex:1;min-width:0}
html.desktop-widget .header-avatar{width:33px;height:33px;min-width:33px;min-height:33px}
html.desktop-widget .header-avatar>span{width:31px;height:31px;min-width:31px;max-width:31px;min-height:31px;max-height:31px;flex-basis:31px}
html.desktop-widget .breadcrumb{font-size:15px}
html.desktop-widget .chat-project{font-size:11px}
html.desktop-widget .messages{padding:16px 12px;gap:12px}
html.desktop-widget .message-body{padding:10px}
html.desktop-widget .composer-area{padding:4px 10px 8px}
html.desktop-widget .composer-hint{display:none}
html.desktop-widget .mobile-nav{padding-block:2px}
html.desktop-widget .mobile-nav .nav-item{min-height:38px;padding:5px 2px;gap:0}
html.desktop-widget .mobile-nav .nav-label{display:none}
html.desktop-widget .mobile-nav .ai-nav-symbol{font-size:20px}
html.desktop-widget .notice{padding:8px 12px;font-size:13px}
html.desktop-widget.public-mode .launch-header{padding:13px 17px}
html.desktop-widget.public-mode .launch-brand .brand-logo{width:125px}
html.desktop-widget.public-mode .launch-main{padding:0 12px 20px}
html.desktop-widget.public-mode .launch-intro{display:block}
html.desktop-widget.public-mode .launch-hero{padding:22px 19px}
html.desktop-widget.public-mode .launch-hero h1{font-size:27px;line-height:1.15}
html.desktop-widget.public-mode .launch-hero>p{font-size:15px;line-height:1.5}
html.desktop-widget.public-mode .launch-primary{margin-top:17px;font-size:16px}
html.desktop-widget.public-mode .launch-guide,html.desktop-widget.public-mode .launch-features,html.desktop-widget.public-mode .launch-tip,html.desktop-widget.public-mode .launch-apps,html.desktop-widget.public-mode .launch-footer{display:none}
@media(pointer:coarse){html.desktop-widget .mobile-nav .nav-item{min-height:44px}}
/* One clear sign-in path, with Telegram available as an alternative. */
.public-auth-form{display:flex;flex-direction:column;gap:13px;max-width:420px;margin-top:22px}
.public-auth-form>label:not(.remember-choice){display:flex;flex-direction:column;gap:7px;font-size:15px;font-weight:600}
.public-auth-form input:not([type=checkbox]){width:100%;min-width:0;min-height:46px;background:#fff;border:1px solid #ffffff88;border-radius:7px;padding:11px 12px;color:#172b42;font-size:16px;font-weight:400}
.public-auth-form input:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
.public-auth-form .remember-choice{margin-top:0;font-weight:400}
.public-auth-form .launch-primary{width:100%;margin-top:2px}
.login-telegram-alternative{font-size:15px;padding:10px 0;text-align:left;background:none;color:#fff;font-weight:600}
.launch-hero .login-access-note{font-size:13px;line-height:1.5;max-width:420px;margin:13px 0 3px;color:#fff;opacity:.88}
.activation-panel h2{font-size:26px;margin:20px 0 10px;color:inherit}
.activation-panel>p{font-size:15px;line-height:1.5}
.password-help{margin:-5px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.public-auth-form .password-help{color:inherit;opacity:.9;margin:-4px 0 0;font-weight:400}
.activation-feedback{font-size:15px;line-height:1.6;overflow-wrap:anywhere}
#credentials-feedback{max-width:620px;line-height:1.6}
#credentials-form .password-help{margin-top:-8px}
#credentials-reauth{margin-top:12px}
.invite-options:has(#invite-hours-label[hidden]){grid-template-columns:1fr}
html.desktop-widget.public-mode .launch-hero{padding:18px}
html.desktop-widget.public-mode .launch-hero h1{font-size:24px;margin:10px 0 12px}
html.desktop-widget.public-mode .launch-description{display:none}
html.desktop-widget.public-mode .public-auth-form{gap:10px;margin-top:16px}
html.desktop-widget.public-mode .public-auth-form .launch-primary{margin-top:1px}
html.desktop-widget.public-mode .launch-hero .login-access-note{font-size:12px;margin-top:10px}
html.desktop-widget.public-mode .login-telegram-alternative{padding:7px 0}
html.desktop-widget.public-mode .browser-login-panel{margin-top:10px}
html.desktop-widget.public-mode .browser-login-panel h2{font-size:21px}
html.desktop-widget.public-mode .activation-panel h2{font-size:23px}
@media(max-width:400px){.public-auth-form{gap:11px}.launch-hero .login-access-note{font-size:12px}.account-shortcuts{grid-template-columns:1fr}.activation-panel h2{font-size:24px}}
html.activation-mode .launch-hero>h1,html.activation-mode .launch-description,html.activation-mode .launch-guide,html.activation-mode .launch-features,html.activation-mode .launch-tip,html.activation-mode .launch-apps{display:none}
html.activation-mode .launch-intro{display:block;max-width:620px;margin-inline:auto}
html.activation-mode .launch-hero{padding:24px}
html.activation-mode .activation-panel h2{margin-top:17px}
