:root{font-family:system-ui,"Microsoft YaHei",sans-serif;color:#173d40;background:#f3f6f4}*{box-sizing:border-box}body{margin:0;padding:32px 18px}main{max-width:980px;margin:auto}h1{font-size:32px;margin:12px 0}.eyebrow{font-size:13px;color:#3e7468}section{background:white;border:1px solid #cbdad4;border-radius:12px;padding:24px;margin:26px 0}h2{font-size:20px;margin:0 0 18px}label,input,form button{display:block;width:100%}label{margin:12px 0 8px}input{padding:12px;border:1px solid #aabcb4;border-radius:6px;font:inherit}button{font:inherit;cursor:pointer;background:#176e5d;color:white;border:0;border-radius:6px;padding:12px 18px;margin-top:14px}button:disabled{opacity:.55;cursor:wait}.heading{display:flex;align-items:center;justify-content:space-between}.heading button{margin:0 0 18px;background:#eaf0ed;color:#173d40}pre{padding:20px;background:#e9f0ed;white-space:pre-wrap;overflow-wrap:anywhere;max-height:460px;overflow:auto;font-size:13px}.note{font-size:13px;color:#62776e}#status{min-height:24px}[hidden]{display:none!important}

.actions{display:flex;gap:10px;flex-wrap:wrap}.actions button{flex:1;min-width:120px}#files article{border-top:1px solid #dbe5e0;padding:16px 0;margin-top:16px}#files strong,.file-meta{display:block;overflow-wrap:anywhere}.file-meta{font-size:13px;color:#62776e;margin-top:6px}.preview{padding:16px;margin-top:18px;background:#fff6db;border-left:4px solid #e8ad31;overflow-wrap:anywhere}.preview p{font-size:13px}input[type=file]{font-size:14px}h3{margin-top:28px}@media(max-width:480px){body{padding:22px 14px}section{padding:18px}.heading{gap:10px}.heading button{white-space:nowrap}h1{font-size:30px}}
.install-help{margin:24px 0;padding:16px;border:1px solid #cbdad4;border-radius:10px;font-size:14px;line-height:1.65}.install-help summary{cursor:pointer;font-weight:600}body{padding-bottom:max(32px,env(safe-area-inset-bottom))}@media(display-mode:standalone){body{padding-top:max(22px,env(safe-area-inset-top))}}
.secondary-action{background:#2b7d6d}.tool-panel{margin-top:22px;padding:20px;border:1px solid #d5e1dc;border-radius:10px;background:#f8fbf9}.tool-panel h3{margin:0;font-size:19px}.tool-panel p{margin:4px 0 0;color:#62776e;font-size:14px}.tool-heading{display:flex;align-items:flex-start;gap:12px}.tool-number{display:inline-grid;place-items:center;flex:0 0 30px;height:30px;border-radius:50%;background:#176e5d;color:white;font-weight:700}.tool-actions button{min-width:180px}.search-results{margin-top:18px}.search-summary{font-weight:600;color:#173d40!important}.search-result{padding:16px 0;border-top:1px solid #dbe5e0}.search-result-heading{display:flex;gap:12px;align-items:center;justify-content:space-between}.search-result-heading strong{font-size:18px;overflow-wrap:anywhere}.select-domain{margin:0;white-space:nowrap;padding:9px 13px}.search-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}.result-card{min-height:190px;padding:18px;border:1px solid #d5e1dc;border-radius:10px;background:#fff}.result-card h3{margin:0 0 14px;font-size:18px}.result-card.valuation{border-top:4px solid #e8ad31}.result-card.listed{border-top:4px solid #176e5d}.result-card.not-listed{border-top:4px solid #93a8a0}.empty,.empty-state{color:#62776e}.metric-row{display:flex;gap:8px;justify-content:space-between;align-items:flex-start;padding:7px 0;border-bottom:1px solid #edf2ef}.metric-row:last-child{border-bottom:0}.metric-label{color:#62776e;font-size:13px}.metric-value{font-weight:600;text-align:right;overflow-wrap:anywhere}.metric-value.headline{color:#8a5a00;font-size:16px}.file-results{margin-top:18px}.tool-note{margin-bottom:14px!important}
@media(max-width:760px){.result-grid,.search-meta{grid-template-columns:1fr}.search-result-heading{align-items:flex-start}.tool-actions button{min-width:calc(50% - 8px)}}
@media(max-width:480px){.tool-panel{padding:16px}.tool-actions button{min-width:100%}.search-result-heading{display:block}.select-domain{width:100%;margin-top:10px}}

/* Task views: only the selected category is shown; mobile navigation stays in reach. */
main{max-width:1040px}.intro{color:#62776e}#account-panel{position:relative;padding:24px}.category-nav{display:flex;gap:8px;border-bottom:1px solid #dbe5e0;padding-bottom:12px;position:sticky;top:0;background:white;z-index:5}.category-nav button{flex:1;background:#eff5f2;color:#28594d;margin:0;font-weight:650}.category-nav button[aria-current=page]{background:#176e5d;color:white}.selection-summary{font-size:14px;color:#62776e;margin:18px 0}.tool-panel{margin-top:14px;background:white}.result-card{min-height:0}.result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#domain-intelligence{grid-template-columns:1fr}#status{position:sticky;bottom:8px;background:#e6f2ec;border-radius:8px;padding:12px;z-index:6;font-size:14px}#status:empty{display:none}.service-tools{margin-top:24px;color:#62776e;font-size:14px}.tool-actions button{min-width:140px}#workflow-result{display:grid;gap:10px;margin-top:18px}
@media(max-width:600px){body{padding:16px 12px 96px}h1{font-size:27px}#account-panel{padding:16px;margin-top:18px}.category-nav{position:fixed;top:auto;bottom:0;left:0;right:0;border-top:1px solid #dbe5e0;padding:10px 12px max(12px,env(safe-area-inset-bottom));box-shadow:0 -2px 10px #173d4010}.category-nav button{padding:12px 8px}.result-grid,.search-meta{grid-template-columns:1fr}.result-card{padding:14px}.tool-panel{padding:14px}.tool-actions button{min-width:calc(50% - 8px)}.heading h2{font-size:19px}#status{bottom:78px}.install-help{margin-bottom:20px}input{font-size:16px}.actions button{min-width:130px}.tool-heading p{line-height:1.5}}

.command-panel{padding:14px 0 18px;border-bottom:1px solid #d5e1dc}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.command-composer{padding:14px 14px 9px;background:#fff;border:1px solid #e1e8e4;border-radius:24px;box-shadow:0 3px 16px #173d4012;transition:border-color .15s,box-shadow .15s}.command-composer:focus-within{border-color:#8db5a8;box-shadow:0 3px 18px #176e5d1c}.command-composer textarea{display:block;width:100%;min-height:62px;max-height:240px;margin:0;padding:0;border:0;outline:0;resize:none;overflow-y:auto;background:transparent;color:#1b2927;font:inherit;font-size:16px;line-height:1.5}.command-composer textarea::placeholder{color:#82928c}.command-toolbar{display:flex;align-items:center;gap:8px;min-height:40px}.command-toolbar button{display:grid;place-items:center;flex:0 0 38px;width:38px;min-width:38px;height:38px;min-height:38px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:#202927;font-size:24px;line-height:1}.command-toolbar .add-button{font-weight:300}.command-toolbar .command-mode{margin-left:auto;overflow:hidden;color:#697971;font-size:13px;white-space:nowrap;text-overflow:ellipsis}.command-toolbar .mic-button{color:#25312d}.command-toolbar .mic-button.recording{background:#ad2935;color:white}.command-toolbar .mic-button .stop-glyph{display:none;font-size:17px}.command-toolbar .mic-button.recording .mic-glyph{display:none}.command-toolbar .mic-button.recording .stop-glyph{display:block}.command-toolbar .send-button{background:#202426;color:white}.command-toolbar svg{display:block;width:21px;height:21px}.command-panel details{font-size:13px;color:#62776e}.command-panel summary{cursor:pointer}#command-feedback{font-size:14px;overflow-wrap:anywhere;white-space:pre-wrap}.command-toolbar button:focus-visible{outline:3px solid #3b9b86;outline-offset:2px}.command-toolbar button:hover:not(:disabled){background:#eaf0ed}.command-toolbar .send-button:hover:not(:disabled){background:#3b4743}@media(max-width:600px){.command-composer{padding:13px 12px 8px;border-radius:21px}.command-composer textarea{min-height:60px;font-size:16px}.command-toolbar{gap:5px}.command-toolbar button{flex-basis:38px}.command-toolbar .command-mode{font-size:12px}}
.upload-section-title{margin-top:24px!important;padding-top:20px;border-top:1px solid #dbe5e0}

/* Private conversation: readable replies and observable execution status. */
.command-toolbar .assistant-mode{margin:0 0 0 auto;width:auto;max-width:190px;min-width:0;border:0;background:transparent;color:#42564e;font:inherit;font-size:13px;padding:6px 2px;cursor:pointer}.assistant-mode:focus-visible{outline:2px solid #176e5d;border-radius:5px}.mode-note{margin:4px 0 8px}.conversation{display:grid;gap:12px;margin-top:16px;overflow-wrap:anywhere}.conversation:empty{display:none}.conversation .chat-card{max-width:100%;padding:16px 18px;border:1px solid #d7e3dd;border-radius:18px;background:#f7faf8;box-shadow:0 2px 12px #173d400c}.conversation .chat-user{justify-self:end;max-width:min(85%,700px);background:#e7f3ee;border-color:#c4dfd2}.conversation .chat-assistant{width:100%;background:#fff;border-left:4px solid #176e5d}.conversation .chat-error{border-left-color:#ad2935}.conversation h3{margin:0 0 10px;font-size:16px}.conversation p{margin:7px 0;line-height:1.65;font-size:15px;white-space:pre-wrap}.conversation .chat-stage{font-size:13px;color:#55695f}.conversation .chat-stage[aria-busy=true]::before{content:'● ';color:#176e5d;animation:stage-pulse 1.3s ease-in-out infinite}.conversation .chat-list{margin:10px 0 0;padding-left:24px;line-height:1.7;font-size:15px}.conversation .chat-list li{overflow-wrap:anywhere}.conversation .chat-muted{color:#62776e;font-size:13px}.command-toolbar .mic-button.recording,.command-toolbar .mic-button.recording:hover:not(:disabled){background:#151b1a;color:#fff;box-shadow:0 0 0 4px #e6bcb7;animation:record-pulse 1.3s ease-in-out infinite}.command-toolbar .mic-button.recording .stop-glyph{font-size:19px}#voice-state.recording{display:block;margin:7px 0;padding:8px 12px;border-radius:9px;background:#202726;color:#fff;font-size:14px;font-weight:650}@keyframes record-pulse{50%{box-shadow:0 0 0 8px #e6bcb766}}@keyframes stage-pulse{50%{opacity:.25}}@media(prefers-reduced-motion:reduce){.command-toolbar .mic-button.recording,.conversation .chat-stage[aria-busy=true]::before{animation:none}}@media(max-width:600px){.command-toolbar .assistant-mode{max-width:145px;font-size:11px}.conversation .chat-card{padding:14px}.conversation .chat-user{max-width:92%}}

/* One active chat on mobile; the owner's four business tools remain behind the menu. */
.chat-heading{gap:10px}.chat-heading h2{flex:1;margin:0}.chat-heading .chat-header-button{display:grid;place-items:center;flex:0 0 42px;width:42px;min-width:42px;height:42px;margin:0;padding:0;border-radius:50%;background:#f1f5f3;color:#173d40;font-size:23px}.chat-heading #logout{margin:0;padding:10px 12px;white-space:nowrap}.chat-welcome{display:grid;gap:10px;justify-items:center;padding:32px 12px;text-align:center;color:#243d38}.chat-welcome .welcome-symbol{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#e9f4ef;color:#176e5d;font-size:31px}.chat-welcome strong{font-size:21px}.chat-welcome span:last-child{font-size:14px;color:#62776e}#account-panel.chat-focus [data-panel],#account-panel.chat-focus #domain-selector,#account-panel.chat-focus #selection-summary{display:none!important}#account-panel.chat-focus .command-panel{border-bottom:0}.chat-heading .chat-header-button:focus-visible{outline:3px solid #3b9b86;outline-offset:2px}
body.chat-focus-mode #status,body.chat-focus-mode .install-help,body.chat-focus-mode main>.note,#account-panel.chat-focus .service-tools{display:none}
@media(max-width:600px){body.session-open{padding:0 0 max(10px,env(safe-area-inset-bottom))}body.session-open main{max-width:none}body.session-open main>.eyebrow,body.session-open main>h1,body.session-open main>.intro{display:none}#account-panel.chat-focus{min-height:100dvh;margin:0;border:0;border-radius:0;padding:16px 14px max(12px,env(safe-area-inset-bottom));display:flex;flex-direction:column}#account-panel.chat-focus .chat-heading{min-height:48px}#account-panel.chat-focus .chat-heading h2{font-size:17px;text-align:center}#account-panel.chat-focus .chat-heading #logout{font-size:12px;padding:9px 6px}#account-panel.chat-focus .command-panel{display:flex;flex:1;flex-direction:column;min-height:0;padding:0}#account-panel.chat-focus .chat-welcome{margin:auto 0;padding:28px 12px}#account-panel.chat-focus .conversation:not(:empty){margin:14px 0 auto}#account-panel.chat-focus .command-composer{position:sticky;bottom:max(8px,env(safe-area-inset-bottom));z-index:7;margin-top:auto}#account-panel.chat-focus .command-panel>p.note:not(#voice-disclosure),#account-panel.chat-focus .command-panel>details{display:none}#account-panel.chat-focus #voice-disclosure{font-size:11px;line-height:1.4;margin:6px 4px 0}#account-panel.chat-focus #status{bottom:9px;position:static;margin:6px 0 0}#account-panel:not(.chat-focus) .chat-welcome{display:none}}

/* The menu is a left drawer over the current view, not a layout switch. */
.category-nav[hidden],.drawer-backdrop[hidden]{display:none!important}
.drawer-backdrop{position:fixed;inset:0;z-index:30;background:#14252175}
.category-nav{position:fixed;inset:0 auto 0 0;z-index:31;box-sizing:border-box;display:flex;flex-direction:column;gap:6px;width:min(320px,86vw);height:100dvh;padding:20px 16px max(24px,env(safe-area-inset-bottom));border:0;border-right:1px solid #dbe5e0;box-shadow:8px 0 30px #10251d29;background:#fff;overflow-y:auto}
.category-nav .drawer-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 14px;padding:4px 2px 12px;border-bottom:1px solid #dbe5e0;font-size:18px;color:#183f36}
.category-nav .drawer-heading button{flex:0 0 36px;width:36px;min-width:36px;height:36px;margin:0;padding:0;border-radius:50%;background:#eff5f2;color:#173d40;font-size:24px;line-height:1}
.category-nav>button[data-view]{flex:0 0 auto;width:100%;min-height:46px;margin:0;padding:10px 16px;border-radius:10px;text-align:left;font-size:16px}
body.drawer-open{overflow:hidden}
@media(max-width:600px){.category-nav{top:0;right:auto;bottom:0;left:0;width:min(320px,86vw);padding:20px 16px max(24px,env(safe-area-inset-bottom));border-top:0;border-right:1px solid #dbe5e0;box-shadow:8px 0 30px #10251d29}.category-nav>button[data-view]{padding:10px 16px}#account-panel:not(.chat-focus){margin:0;border-radius:0;min-height:100dvh}}
.command-toolbar .image-attach{font-size:23px;color:#28594d}.image-chip[hidden]{display:none!important}.image-chip{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;margin:8px 3px 2px;padding:5px 9px;border-radius:10px;background:#e7f3ee;color:#245448;font-size:13px}.image-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-chip button{min-width:28px;width:28px;height:28px;margin:0;padding:0;border-radius:50%;background:#d2e7dc;color:#173d40;font-size:20px;line-height:1}.image-disclosure{font-size:12px}@media(max-width:600px){#account-panel.chat-focus .image-disclosure{font-size:11px;line-height:1.4;margin:4px 4px 0}.command-toolbar .assistant-mode{max-width:118px}}
#memory-panel { margin: 1rem 0; padding: 1rem; border: 1px solid #d9e3e0; border-radius: 10px; }
#memory-panel textarea { display: block; box-sizing: border-box; width: 100%; min-height: 5rem; margin: .5rem 0; padding: .6rem; font: inherit; }
#memory-panel label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: .5rem; margin: .75rem 0; }
#memory-panel input[type="checkbox"] { width: auto; margin: 0; flex: none; }

.chat-history-panel{border:1px solid #d9e5de;border-radius:14px;padding:12px;margin-bottom:12px;background:#fff}.chat-session-list{max-height:30vh;overflow:auto;padding:0;list-style:none}.chat-session-list li{display:flex;gap:8px;align-items:center;border-bottom:1px solid #e5ece7;padding:6px 0}.chat-session-list button{text-align:left;white-space:normal;overflow-wrap:anywhere;flex:1}.chat-session-list small{font-size:11px;color:#63726a}.history-tools{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.history-tools input{min-width:0;flex:1}.chat-history-panel [id=current-chat]{overflow-wrap:anywhere}.chat-card p{white-space:pre-wrap;overflow-wrap:anywhere}.chat-history-panel summary{cursor:pointer;padding:8px;font-weight:600}@media(max-width:600px){.chat-history-panel{padding:8px}.chat-session-list small{max-width:90px}.history-tools button{font-size:12px}.history-tools label{font-size:12px}}

/* One original entry: history at left, chronological transcript at right, composer below. */
.chat-workspace{min-width:0}.chat-main{min-width:0}.history-heading{display:flex;align-items:center;justify-content:space-between}.history-heading h2{margin:0;font-size:18px}.history-heading button{margin:0;padding:8px 12px}.chat-input-dock{flex-shrink:0}.current-chat{overflow-wrap:anywhere}.history-backdrop{position:fixed;inset:0;z-index:25;background:#14252175}
body.chat-focus-mode{height:100dvh;overflow:hidden;padding:0}body.chat-focus-mode main{height:100%;max-width:none;margin:0}body.chat-focus-mode main>.eyebrow,body.chat-focus-mode main>h1,body.chat-focus-mode main>.intro{display:none}
#account-panel.chat-focus{display:grid;grid-template-rows:auto minmax(0,1fr);height:100dvh;min-height:0;margin:0;padding:0;border:0;border-radius:0;overflow:hidden}
#account-panel.chat-focus>.chat-heading{min-height:64px;margin:0;padding:10px 20px;border-bottom:1px solid #e3e9e5}#account-panel.chat-focus>.chat-heading button{margin:0}
#account-panel.chat-focus .chat-workspace{display:grid;grid-template-columns:minmax(0,1fr);min-height:0;overflow:hidden}#account-panel.chat-focus .chat-workspace.history-ready{grid-template-columns:280px minmax(0,1fr)}
#account-panel.chat-focus .chat-history-panel{min-height:0;margin:0;padding:18px 14px;background:#f5f7f5;border:0;border-right:1px solid #dfe6e1;border-radius:0;overflow-y:auto}
#account-panel.chat-focus .chat-session-list{max-height:none}.chat-history-panel .history-tools input{flex:1 1 130px;width:auto;min-width:0}.chat-history-panel .history-tools button{flex:0 0 auto;width:auto;white-space:nowrap}.chat-history-panel .history-tools label{width:auto}.chat-history-panel .chat-session-settings{margin-top:18px}.chat-history-panel .chat-session-list button{width:100%;margin:0;background:transparent;color:#173d40}.chat-history-panel .chat-session-list button[aria-current=true]{background:#deebe4}
#account-panel.chat-focus .chat-main{display:flex;flex-direction:column;min-height:0;margin:0;padding:0 24px;border:0;border-radius:0;overflow:hidden}
#account-panel.chat-focus .current-chat{flex:none;margin:12px auto 4px;width:min(100%,880px);font-size:12px}
#account-panel.chat-focus .command-panel{display:flex;flex:1;flex-direction:column;min-height:0;margin:0;padding:0;overflow:hidden}
#account-panel.chat-focus .conversation{display:flex;flex:1;flex-direction:column;gap:14px;min-height:0;margin:0;padding:20px max(0px,calc((100% - 880px)/2));overflow-y:auto;overflow-anchor:none;overscroll-behavior:contain;white-space:normal}
#account-panel.chat-focus .chat-card{flex:none;margin:0;padding:14px 18px;border-radius:16px;max-width:92%;font-size:15px;line-height:1.65}#account-panel.chat-focus .chat-card h3{margin:0 0 8px;font-size:14px}#account-panel.chat-focus .chat-card p{margin:4px 0}#account-panel.chat-focus .chat-user{align-self:flex-end;background:#eaf0ed}#account-panel.chat-focus .chat-assistant{align-self:flex-start;background:white}
#account-panel.chat-focus .chat-welcome{margin:auto 0;padding:24px 12px}#account-panel.chat-focus .conversation:empty{flex:0}#account-panel.chat-focus .chat-input-dock{width:min(100%,880px);align-self:center;margin-top:auto;padding:8px 0 max(12px,env(safe-area-inset-bottom));background:white}
#account-panel.chat-focus .command-composer{position:static;margin:0}#account-panel.chat-focus .chat-input-dock>.note:not(.image-disclosure):not(#chat-model-state),#account-panel.chat-focus .chat-input-dock>details{display:none}#account-panel.chat-focus #chat-model-state,#account-panel.chat-focus #chat-save-state{margin:2px 0 6px;font-size:12px;max-height:3.5em;overflow:auto}#account-panel.chat-focus .image-disclosure{font-size:11px;margin:5px 0 0}
#history-close{display:none}#account-panel:not(.chat-focus) #chat-history-panel,#account-panel:not(.chat-focus) .current-chat{display:none}
@media(min-width:761px){#history-toggle{display:none}.history-backdrop{display:none}}
@media(max-width:760px){#account-panel.chat-focus .chat-workspace.history-ready{grid-template-columns:minmax(0,1fr)}#account-panel.chat-focus>.chat-heading{padding:8px 10px;gap:6px}#account-panel.chat-focus>.chat-heading h2{font-size:16px}#history-toggle{padding:9px;font-size:13px;white-space:nowrap}#history-close{display:block}#account-panel.chat-focus .chat-main{padding:0 12px}#account-panel.chat-focus .current-chat{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#account-panel.chat-focus .chat-history-panel{display:none;position:fixed;inset:0 auto 0 0;width:min(310px,88vw);z-index:26;padding:20px 14px max(24px,env(safe-area-inset-bottom));box-shadow:8px 0 30px #10251d29}body.history-drawer-open #account-panel.chat-focus .chat-history-panel:not([hidden]){display:block}#account-panel.chat-focus .chat-card{max-width:96%;padding:12px 14px}#account-panel.chat-focus .conversation{padding:12px 0}#account-panel.chat-focus .chat-input-dock{padding-top:6px}}
#account-panel.chat-focus .chat-session-list li{display:flex;flex-direction:column;align-items:stretch;gap:3px;padding:8px 0}#account-panel.chat-focus .chat-session-list li button{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5;padding:9px 10px}#account-panel.chat-focus .chat-session-list li small{align-self:flex-start;margin:0 10px;font-size:10px}
/* Roles remain accessible; only owner messages have a bubble. */
#account-panel.chat-focus .chat-user{border:0;box-shadow:0 1px 3px #173d4010}
#account-panel.chat-focus .chat-assistant{background:transparent;border:0;box-shadow:none;border-radius:0;padding-left:0;padding-right:0}
