:root{color-scheme:dark;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;background:#080c09;color:#eef4ef;--line:#304535;--green:#b3ed87;--muted:#aebbb1;--app-height:100dvh;--app-top:0px}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden}
button,a,textarea{font:inherit}
button{color:inherit;cursor:pointer;background:transparent;border:0;min-height:44px;border-radius:10px;padding:10px 12px}
button:hover:not(:disabled){background:#243127}
button:disabled{cursor:default;color:#97a69b}
button:focus-visible,a:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--green);outline-offset:3px}
a{color:inherit;text-underline-offset:3px}
svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.iconButton{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:9px;flex-shrink:0}
.appShell{position:fixed;top:var(--app-top);left:0;right:0;height:var(--app-height);display:grid;grid-template-columns:280px minmax(0,1fr);overflow:hidden}
.appShell.navCollapsed{grid-template-columns:minmax(0,1fr)}
.sidebar{min-height:0;display:flex;flex-direction:column;padding:18px 14px max(14px,env(safe-area-inset-bottom));background:#101711;border-right:1px solid #17251b;gap:14px}
.navBrand{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px}
.navBrand a{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:.94rem;font-weight:700;letter-spacing:.06em;min-width:0}
.navBrand img{height:41px;width:41px}
.newConversation{display:flex;align-items:center;gap:9px;background:var(--green);color:#13230f;font-weight:600;text-align:left;min-height:46px}
.newConversation:hover:not(:disabled){background:#c4f4a1}
.newConversation:disabled{background:#253627;color:#adc39f}
.newConversation span{font-size:1.4rem;line-height:1}
.navScroll{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.customerSections{display:grid;gap:5px}
.customerSections button{display:flex;align-items:center;justify-content:space-between;gap:7px;text-align:left;font-size:.9rem;line-height:1.4;width:100%;min-width:0}
.customerSections button:disabled{display:block;color:#c3ccc6}
.customerSections small{display:block;color:#94a699;font-size:.75rem;margin-top:1px}
.customerSections #historyToggle{justify-content:flex-start;padding-top:4px;padding-bottom:8px}
.customerSections #historyToggle svg{width:19px}
.historyPanel{margin-top:18px}
.historyPanel h2{font-weight:500;font-size:.8rem;margin:0 11px 8px;color:#b6c1b9}
.historyNote{font-size:.75rem;color:#94a699;line-height:1.4;margin:0 11px 10px}
#conversationList{display:grid;gap:3px}
#conversationList button{width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;min-height:42px;padding:10px 11px}
#conversationList button[aria-current=true]{background:#223126}
#historyEmpty{font-size:.875rem;color:var(--muted);margin:12px;line-height:1.5}
#moreHistory{font-size:.85rem}
.navFooter{border-top:1px solid #2a3e2f;padding:14px 10px 0;font-size:.875rem}
.navFooter>div{display:flex;align-items:center;gap:9px}
.navFooter #logout{margin-left:auto}
.avatar{display:grid;place-items:center;background:#253329;color:#c6d8c8;width:32px;height:32px;border-radius:50%;font-size:.75rem}
.privacyLink{display:block;margin-top:12px;font-size:.75rem;color:#aebbb1}
#conversationWorkspace{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.conversationHeader{display:flex;align-items:center;gap:12px;min-height:68px;padding:12px 22px;flex-shrink:0}
.headerIdentity{display:flex;align-items:center;gap:9px;min-width:0}
h1{font-size:1.05rem;font-weight:550;line-height:1.5;margin:0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mobileBrand{display:none}
#navOpen{display:none}
.navCollapsed #navOpen{display:flex}
.headerActions{position:relative;display:flex;gap:0;margin-left:auto;flex-shrink:0;background:#141c16;border-radius:26px;padding:0 3px}
.headerActions svg{stroke-width:2.1}
.headerActions #conversationOptions svg{fill:currentColor;stroke-width:1}
.conversationActions{position:absolute;right:0;top:50px;z-index:5;background:#18221a;border:1px solid var(--line);border-radius:13px;padding:7px;min-width:225px;box-shadow:0 12px 40px #0008}
.conversationActions button{display:block;width:100%;text-align:left;font-size:.9rem}
.transcriptScroll{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding-block:25px}
.messages{max-width:880px;margin:auto;padding:25px 32px;min-height:100%;display:flex;flex-direction:column;gap:22px}
.empty{margin:auto;text-align:center;max-width:570px;padding:30px 0 50px}
.empty>img{width:49px;height:49px;margin-bottom:20px}
.empty h2{font-size:clamp(1.65rem,3vw,2.15rem);font-weight:600;letter-spacing:-.025em;line-height:1.3;margin:0 0 17px}
.empty p{font-size:1.05rem;line-height:1.65;color:var(--muted);max-width:490px;margin:auto}
.message{align-self:flex-end;max-width:82%;margin:0;overflow-wrap:anywhere;white-space:pre-wrap;background:#19271d;padding:16px 21px;border-radius:22px 22px 5px 22px;line-height:1.65;font-size:1rem}
.message small{display:block;line-height:1.4;font-size:.75rem;color:#aebbb1;margin-top:9px}
.composerDock{flex-shrink:0;width:100%;max-width:900px;margin:0 auto;padding:10px 32px max(16px,env(safe-area-inset-bottom))}
#serverComposer{background:#19251c;border:1px solid #344a39;border-radius:28px;padding:13px 9px 8px}
textarea{display:block;width:100%;min-height:42px;max-height:min(180px,24dvh);resize:none;overflow-y:auto;background:transparent;border:0;color:inherit;line-height:1.5;outline-offset:4px;padding:2px 10px 8px}
textarea::placeholder{color:#b2bdb5}
textarea:disabled{opacity:.8}
.composerActions,.inputActions,.sendActions{display:flex;align-items:center;gap:10px}
.composerActions svg{width:26px;height:26px;stroke-width:2.1}
.composerActions #transcribeVoice svg{width:28px;height:28px}
.sendActions{gap:10px}
.sendActions .iconButton{border-radius:50%}
.composerActions{justify-content:space-between}
.inputActions{min-width:0}
.futureAction{color:#b6c1b9!important;opacity:.65}
.pilotLabel{font-size:.875rem;color:#aebbb1;margin-left:0}
.sendButton{display:grid;place-items:center;border-radius:50%;width:40px;min-width:40px;height:40px;min-height:40px;padding:7px;background:var(--green);color:#10220e}
.sendButton svg{stroke-width:2.7}
.sendButton:hover:not(:disabled){background:#d0f6b3}
.sendButton:disabled{background:#405238;color:#b6c9ad}
.sendButton[data-state=pending]{background:#ebd49d;color:#2f270e}
.sendButton[data-state=sending] svg{opacity:.45}
.messageFeedback{font-size:.8rem;color:#c1cfc4;line-height:1.5;max-height:96px;overflow-y:auto;text-align:center}
.messageFeedback p{margin:7px 5px 0}
.messageFeedback p:empty{display:none}
.aiNotice{font-size:.75rem;color:#aebbb1;text-align:center;line-height:1.4;margin:9px 0 0}
.connectionBanner,.updateNotice{font-size:.85rem;line-height:1.5;background:#263021;border:1px solid #526248;border-radius:12px;padding:9px 12px;margin-bottom:10px}
.connectionBanner{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 9px 4px 12px;font-size:.8rem;border:0;background:#162219}
.connectionBanner p{flex:1;min-width:0}
.connectionBanner button,.connectionBanner a{flex-shrink:0;font-size:.8rem;min-height:44px;display:inline-flex;align-items:center;padding:6px 8px}
.connectionBanner[data-state=connecting] #retryConnection{display:none}
.connectionBanner p,.updateNotice p{margin:0}
.connectionBanner button,.updateNotice button{font-size:.85rem;text-decoration:underline;text-underline-offset:3px;min-height:36px;padding:5px 8px 0}
.updateNotice{margin:9px 0 0}
.srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skipLink{position:fixed;top:0;transform:translateY(-200%);left:15px;z-index:40;background:var(--green);color:#10220e;padding:12px}
.skipLink:focus{top:10px;transform:none}
[hidden]{display:none!important}
.drawerBackdrop{display:none}
@media(max-width:760px){.appShell,.appShell.navCollapsed{display:block}
#conversationWorkspace{height:100%}
.sidebar{position:absolute;top:0;bottom:0;left:0;width:min(320px,86vw);z-index:30;padding-top:max(16px,env(safe-area-inset-top));box-shadow:15px 0 50px #0005}
.drawerBackdrop:not([hidden]){display:block;position:absolute;inset:0;background:#0009;z-index:20;touch-action:none}
.conversationHeader{position:relative;display:flex;gap:9px;padding:max(10px,env(safe-area-inset-top)) 12px 8px;min-height:62px}
#navOpen{display:flex;border-radius:50%;background:#141c16}
#navOpen svg{stroke-width:2.2}
.mobileBrand{display:block;width:23px;height:23px;flex-shrink:0}
.headerActions{gap:0}
.headerActions #newConversationQuick{color:#eef4ef}
h1{padding:0;font-size:1rem;line-height:1.4}
.conversationActions{top:50px;right:0}
.messages{padding:18px 19px;gap:18px}
.message{max-width:88%;padding:13px 17px;font-size:1rem}
.empty{padding:20px 0 30px}
.empty h2{font-size:1.7rem}
.empty p{font-size:1rem;max-width:290px}
.empty>img{width:41px;height:41px}
.composerDock{padding:8px 12px max(12px,env(safe-area-inset-bottom));max-height:65%;overflow-y:auto}
#serverComposer{padding:13px 9px 8px;border-radius:28px}
textarea{min-height:42px;padding-left:10px;font-size:16px}
.pilotLabel{margin-left:0;font-size:.875rem}
.messageFeedback{max-height:67px;font-size:.75rem}
.aiNotice{font-size:.75rem;margin-top:7px}
.navBrand{padding:0 4px}
.customerSections button{font-size:.95rem}
.customerSections small{font-size:.75rem}
}
@media(max-width:360px){.headerIdentity{gap:6px}
.mobileBrand{width:20px;height:20px}
.conversationHeader{gap:6px;padding-left:9px;padding-right:9px}
h1{font-size:.9rem}
.composerDock{padding-left:9px;padding-right:9px}
.messages{padding-left:14px;padding-right:14px}
}
@media(prefers-reduced-motion:no-preference){button{transition:background .12s}
}
@media(max-height:420px){.aiNotice{display:none}
.conversationHeader{min-height:54px;padding-top:5px;padding-bottom:5px}
.composerDock{padding-bottom:5px}
.messageFeedback{max-height:35px}
textarea{min-height:35px;height:40px}
.empty{padding:10px}
.empty img{display:none}
}


/* Pages preflight only. Leave enough room for the status banner on mobile.
   Keep transcript scrolling for small viewports, landscape and enlarged text. */
@media(max-width:760px){
 .messages{padding-top:12px;padding-bottom:12px}
 .empty{padding:8px 0}
 .empty>img{width:32px;height:32px;margin-bottom:10px}
 .empty h2{margin-bottom:10px}
 .empty p{line-height:1.45}
}
