#atlas-assistant-shell,.aa-running-pill{--aa-bg:rgba(250,250,250,.9);--aa-fg:#17191c;--aa-muted:#72777d;--aa-line:rgba(20,24,30,.1);--aa-subtle:rgba(20,24,30,.045);--aa-solid:#181b1f;--aa-on-solid:#fff;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.55;color:var(--aa-fg);box-sizing:border-box;color-scheme:light}
[data-theme=dark] #atlas-assistant-shell,[data-theme=dark] .aa-running-pill{--aa-bg:rgba(29,31,35,.91);--aa-fg:#f1f2f3;--aa-muted:#a3a7ad;--aa-line:rgba(255,255,255,.12);--aa-subtle:rgba(255,255,255,.05);--aa-solid:#f0f1f3;--aa-on-solid:#17191d;color-scheme:dark}
#atlas-assistant-shell *,.aa-running-pill *{box-sizing:border-box}#atlas-assistant-shell[hidden],#atlas-assistant-shell [hidden],.aa-running-pill[hidden]{display:none!important}
#atlas-assistant-shell{position:fixed;z-index:2147483001;display:flex;flex-direction:column;gap:9px;width:440px;max-width:calc(100vw - 24px);pointer-events:auto;isolation:isolate}
#atlas-assistant-shell button,#atlas-assistant-shell textarea,#atlas-assistant-shell input,.aa-running-pill button{font:inherit;color:inherit}#atlas-assistant-shell button,.aa-running-pill button{cursor:pointer;border:0;background:none;-webkit-tap-highlight-color:transparent}#atlas-assistant-shell button:disabled{opacity:.4;cursor:default}#atlas-assistant-shell button:focus-visible,#atlas-assistant-shell textarea:focus-visible,.aa-running-pill button:focus-visible{outline:2px solid var(--aa-fg);outline-offset:3px}#atlas-assistant-shell a{color:inherit;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}#atlas-assistant-shell svg,.aa-running-pill svg{display:block;width:17px;height:17px;flex-shrink:0}
.aa-composer,.aa-card,.aa-menu,.aa-notice,.aa-running-pill{background:var(--aa-bg);border:1px solid var(--aa-line);box-shadow:0 12px 38px rgba(0,0,0,.1),0 2px 8px rgba(0,0,0,.035);backdrop-filter:blur(26px) saturate(110%);-webkit-backdrop-filter:blur(26px) saturate(110%)}
.aa-composer{padding:12px 12px 8px;border-radius:22px;flex:none}.aa-input-line{display:flex;align-items:flex-end;gap:8px}.aa-input{display:block;resize:none;min-height:29px;width:100%;max-height:104px;overflow-y:auto;background:transparent;border:0;border-radius:3px;outline:none!important;padding:3px 3px 5px;color:var(--aa-fg);font-size:14px;line-height:1.6;box-shadow:none!important}.aa-input::placeholder{color:var(--aa-muted);opacity:.9}.aa-send{width:31px!important;height:31px!important;background:var(--aa-solid)!important;color:var(--aa-on-solid)!important;border-radius:50%!important;flex:none;margin-bottom:2px}.aa-send svg{width:17px;height:17px}.aa-send.is-stop svg{width:15px;height:15px;fill:currentColor;stroke-width:0}
.aa-controls{display:flex;align-items:center;gap:2px;padding-top:6px}.aa-controls-left{display:flex;align-items:center;gap:2px;flex:1;min-width:0}.aa-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9px;color:var(--aa-muted)!important;flex:none;transition:background .15s,color .15s}.aa-icon:hover{background:var(--aa-subtle);color:var(--aa-fg)!important}.aa-mode{display:inline-flex;align-items:center;gap:4px;font-size:11px!important;font-weight:550;padding:4px 5px!important;white-space:nowrap}.aa-mode svg{width:12px;height:12px;color:var(--aa-muted)}.aa-context{color:var(--aa-muted)!important;font-size:10px!important;border:1px solid var(--aa-line)!important;border-radius:99px;padding:1px 6px!important;margin-left:3px;white-space:nowrap}.aa-context.is-off{opacity:.5;text-decoration:line-through}
.aa-card{border-radius:20px;overflow:hidden;max-height:360px;min-height:88px;display:flex;flex-direction:column}.aa-head{display:flex;align-items:center;gap:8px;min-height:42px;padding:9px 11px 6px 16px;flex:none}.aa-brand{font-size:10px;letter-spacing:.16em;font-weight:650}.aa-status{font-size:10px;color:var(--aa-muted);flex:1}.aa-head>.aa-icon{width:24px;height:24px}.aa-head svg{width:14px;height:14px}.aa-body{padding:5px 17px 17px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;flex:1;min-height:0}.aa-prose{white-space:pre-wrap;font-size:13px;line-height:1.75;overflow-wrap:anywhere}.aa-empty{color:var(--aa-muted);font-size:12px;margin:4px 0}.aa-tool{display:flex;align-items:center;gap:9px;flex:none;margin:0 12px 12px;padding:9px 11px;border:1px solid var(--aa-line);border-radius:11px;font-size:11px;color:var(--aa-muted);background:var(--aa-subtle)}.aa-tool-indicator{display:block;width:6px;height:6px;background:var(--aa-fg);border-radius:50%;animation:aa-pulse 1.4s ease-in-out infinite}.aa-card-actions{padding:0 14px 12px;flex:none}.aa-text-button{font-size:11px!important;padding:4px 6px!important;text-align:left;border-radius:6px}.aa-text-button:hover{background:var(--aa-subtle)}
.aa-notice{border-radius:12px;padding:8px 12px;font-size:11px;color:var(--aa-muted);display:flex;gap:7px;align-items:center;justify-content:space-between;flex:none}.aa-notice .aa-login{font-size:11px;white-space:nowrap}.aa-menu{align-self:flex-end;width:156px;padding:5px;border-radius:13px;display:flex;flex-direction:column;flex:none}.aa-menu button{display:block;text-align:left;font-size:12px!important;padding:8px 10px!important;border-radius:8px}.aa-menu button:hover{background:var(--aa-subtle)}
.aa-images{display:flex;gap:8px;overflow-x:auto;margin:0 0 9px;padding:2px}.aa-image{position:relative;width:57px;height:57px;flex:none;border-radius:10px;border:1px solid var(--aa-line)}.aa-image img{display:block;width:100%;height:100%;object-fit:cover;border-radius:9px}.aa-image .aa-icon{position:absolute;width:18px;height:18px;right:-4px;top:-4px;background:var(--aa-solid)!important;color:var(--aa-on-solid)!important;border-radius:50%}.aa-image .aa-icon svg{width:11px;height:11px}
.aa-record-label{font-size:11px;letter-spacing:.08em;color:var(--aa-fg)}.aa-icon.is-recording{background:var(--aa-solid);color:var(--aa-on-solid)!important;animation:aa-pulse 1.4s ease-in-out infinite}.aa-running-pill{position:fixed;z-index:2147483001;display:flex;align-items:center;gap:3px;max-width:220px;padding:4px 5px 4px 11px;border-radius:99px}.aa-pill-open{font-size:11px!important;padding:3px 5px 3px 0!important}.aa-running-pill .aa-icon{width:24px;height:24px;border-radius:50%}.aa-running-pill .aa-icon svg{width:12px;height:12px;fill:currentColor;stroke:0}
.aa-history-turn{padding:10px 0;border-bottom:1px solid var(--aa-line)}.aa-history-turn:last-child{border-bottom:0}.aa-turn-label{display:block;font-size:9px;letter-spacing:.1em;color:var(--aa-muted);margin-bottom:4px}.aa-history-turn.is-user .aa-prose{font-size:12px;color:var(--aa-muted)}.aa-preference{padding:10px 0;border-bottom:1px solid var(--aa-line)}.aa-preference p{margin:0}.aa-preference-actions{display:flex;gap:4px;margin-top:4px;color:var(--aa-muted)}.aa-preference-input{width:100%;resize:vertical;border:1px solid var(--aa-line);padding:9px;background:var(--aa-subtle);border-radius:8px;margin:5px 0;font-size:13px}.aa-paused *{animation-play-state:paused!important}
.aa-server-history{padding-bottom:9px;margin-bottom:8px;border-bottom:1px solid var(--aa-line)}.aa-history-entry{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:7px 0!important;text-align:left;font-size:12px!important}.aa-history-status{flex:none;color:var(--aa-muted);font-size:10px}.aa-history-entry:hover{opacity:.65}
@keyframes aa-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@media(max-width:520px){.aa-input{font-size:16px}.aa-composer{padding:11px 10px 7px;border-radius:19px}.aa-card{max-height:min(360px,48dvh);border-radius:18px}.aa-context{font-size:9px!important}.aa-icon{width:30px;height:30px}.aa-controls{padding-top:4px}.aa-body{padding:4px 14px 14px}.aa-head{padding-left:14px}.aa-mode{font-size:11px!important}}
@media(prefers-reduced-motion:reduce){#atlas-assistant-shell *,.aa-running-pill *{animation:none!important;transition:none!important}}

/* Keep embedded site-wide heading, paragraph and form styles outside the assistant. */
#atlas-assistant-shell .aa-head{background:transparent!important;border:0!important;box-shadow:none!important;position:static!important;color:var(--aa-fg)!important}
#atlas-assistant-shell .aa-empty{padding:0!important;margin:4px 0!important;text-align:left!important;line-height:1.55!important;color:var(--aa-muted)!important;min-height:0!important;background:transparent!important;border:0!important}
#atlas-assistant-shell textarea.aa-input{background:transparent!important;color:var(--aa-fg)!important;border:0!important;outline:none!important;box-shadow:none!important;font-size:14px!important;line-height:1.6!important;margin:0!important}
#atlas-assistant-shell .aa-composer:focus-within{border-color:rgba(90,96,104,.32)}
#atlas-assistant-shell .aa-preference p{padding:0!important;margin:0!important;text-align:left!important;color:var(--aa-fg)!important}
#atlas-assistant-shell button.aa-send,#atlas-assistant-shell button.aa-send svg{color:var(--aa-on-solid)!important}
@media(max-width:520px){#atlas-assistant-shell textarea.aa-input{font-size:16px!important}}

/* Standalone registered feature pages keep an assistant entry after navigation. */
.atlas-assistant-page-launcher{position:fixed;right:22px;bottom:24px;z-index:950;width:44px;height:44px;border:1px solid #64748b;border-radius:50%;background:#111827;color:#fff;font:600 14px/1 system-ui,sans-serif;box-shadow:0 4px 18px #0f172a30;cursor:pointer}
.atlas-assistant-page-launcher:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}

/* Head-anchored assistant bubble. Form controls stay siblings of the pet. */
#atlas-assistant-shell::after{content:"";position:absolute;width:12px;height:12px;background:var(--aa-bg);border-right:1px solid var(--aa-line);border-bottom:1px solid var(--aa-line);transform:rotate(45deg);pointer-events:none}
#atlas-assistant-shell[data-pet-tail="bottom"]::after{left:calc(var(--aa-tail-offset) - 6px);bottom:-6px}
#atlas-assistant-shell[data-pet-tail="top"]::after{left:calc(var(--aa-tail-offset) - 6px);top:-6px;transform:rotate(225deg)}
#atlas-assistant-shell[data-pet-tail="left"]::after{left:-6px;top:calc(var(--aa-tail-offset) - 6px);transform:rotate(135deg)}
#atlas-assistant-shell[data-pet-tail="right"]::after{right:-6px;top:calc(var(--aa-tail-offset) - 6px);transform:rotate(-45deg)}
#atlas-assistant-shell>.aa-card{flex:1 1 auto;min-height:0;max-height:min(360px,max(0px,calc(var(--aa-max-height,600px) - 130px)))}
#atlas-assistant-shell>.aa-menu{flex:0 1 auto;min-height:0;overflow:auto}

.aa-native-data{max-width:100%;min-width:0}.aa-data-table{overflow:auto;max-height:26rem}.aa-data-table table{border-collapse:collapse;font-size:.8rem;min-width:100%}.aa-data-table th,.aa-data-table td{padding:.4rem .6rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--aa-line,#ddd);max-width:30rem;overflow-wrap:anywhere}.aa-native-data dl{font-size:.8rem}.aa-native-data dd{margin:.2rem 0 .7rem;overflow-wrap:anywhere}

/* RERUN-020: the Quant assistant owns a toolbar slot, clear of data controls. */
.atlas-assistant-page-launcher.atlas-quant-launcher{position:static!important;inset:auto!important;transform:none!important;flex:0 0 44px!important;min-width:44px!important;width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;border:1px solid var(--sq-line,#46534b)!important;border-radius:8px!important;background:var(--sq-panel,#101315)!important;color:var(--sq-text,#e7ebec)!important;box-shadow:none!important;z-index:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}

/* RERUN-035: the market briefing assistant belongs to the header controls. */
.market-briefing-page .mb-page-controls button.atlas-assistant-page-launcher.atlas-briefing-launcher{position:static!important;inset:auto!important;transform:none!important;flex:0 0 44px!important;min-width:44px!important;width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:1px solid var(--mb-line)!important;border-radius:4px!important;background:var(--mb-panel)!important;color:var(--mb-text)!important;box-shadow:none!important;z-index:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:14px!important}
@media(max-width:360px){
.market-briefing-page:has(.atlas-briefing-launcher) .mb-site-header{padding-inline:12px;column-gap:8px}
.market-briefing-page:has(.atlas-briefing-launcher) .mb-page-controls{gap:6px}
.market-briefing-page:has(.atlas-briefing-launcher) .mb-page-controls select{width:84px;max-width:84px;font-size:13px}
.market-briefing-page:has(.atlas-briefing-launcher) .mb-account-slot{width:44px;min-width:44px;padding:0}
.market-briefing-page:has(.atlas-briefing-launcher) .mb-account-slot .yc-ava-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:0}
}

/* RERUN-035: the compact account slot includes its own spacing. */
@media(max-width:360px){.market-briefing-page:has(.atlas-briefing-launcher) .mb-account-slot .yc-ava-wrap{margin-left:0!important}}

/* RERUN-038: tool pages keep the assistant in the existing header toolbar. */
body[data-tool] .at-top button.atlas-assistant-page-launcher.atlas-tool-launcher{position:static!important;inset:auto!important;transform:none!important;flex:0 0 44px!important;min-width:44px!important;width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:1px solid var(--at-line)!important;border-radius:50%!important;background:var(--at-bg)!important;color:var(--at-ink)!important;box-shadow:none!important;z-index:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:14px!important}
body[data-tool] .at-top:has(.atlas-tool-launcher){flex-wrap:wrap}
body[data-tool] .at-top-right:has(.atlas-tool-launcher){min-width:0;flex-wrap:wrap}
@media(max-width:640px){body[data-tool] .at-top-right:has(.atlas-tool-launcher){flex:1 0 100%;justify-content:flex-end;gap:6px}}
@media(max-width:360px){
body[data-tool] .at-top:has(.atlas-tool-launcher){padding-inline:12px}
body[data-tool] .at-top-right:has(.atlas-tool-launcher) select{width:84px;max-width:84px;font-size:13px;padding-inline:5px}
}

/* RERUN-039: account access belongs to the header, clear of news content. */
body[data-tool] .at-top>#atlas-account-slot{position:relative!important;inset:auto!important;flex:0 0 44px!important;width:44px!important;height:44px!important;margin:0!important;order:2;z-index:1290}
body[data-tool] .at-top>#atlas-account-slot .yc-ava-wrap{margin:0!important;width:44px!important;height:44px!important}
body[data-tool] .at-top>#atlas-account-slot .yc-ava-button{box-shadow:none!important;border-color:var(--at-line)!important;background:var(--at-bg)!important;color:var(--at-ink)!important}
body[data-tool] .at-top>#atlas-account-slot .yc-account-menu{left:auto!important;right:0!important;top:calc(100% + 8px)!important;bottom:auto!important;width:min(350px,calc(100vw - 24px));max-height:calc(100dvh - 90px)}
body[data-tool] .at-top-right:has(.atlas-tool-launcher){margin-left:auto}
@media(max-width:640px){body[data-tool] .at-top-right:has(.atlas-tool-launcher){order:3;margin-left:0}}

/* RERUN-175: readable composer controls with a compact two-row phone layout. */
#atlas-assistant-shell :is(.aa-input-line,.aa-controls) button{min-width:44px;min-height:44px;box-sizing:border-box}
#atlas-assistant-shell .aa-input-line>.aa-icon,#atlas-assistant-shell .aa-controls .aa-icon{width:44px;height:44px}
#atlas-assistant-shell .aa-input-line>.aa-icon svg,#atlas-assistant-shell .aa-controls .aa-icon svg{width:18px;height:18px}
#atlas-assistant-shell textarea.aa-input{min-height:44px}
#atlas-assistant-shell .aa-controls{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px minmax(0,1fr) 44px 44px;gap:4px;align-items:center}
#atlas-assistant-shell .aa-controls-left{display:contents}
#atlas-assistant-shell .aa-mode,#atlas-assistant-shell .aa-context{font-size:14px!important;line-height:1.4!important;padding:8px!important;margin-left:0;white-space:normal;overflow-wrap:anywhere}
@media(max-width:430px){#atlas-assistant-shell .aa-controls{grid-template-columns:repeat(4,minmax(0,1fr))}#atlas-assistant-shell .aa-mode,#atlas-assistant-shell .aa-context{grid-column:span 2}#atlas-assistant-shell .aa-controls .aa-icon{justify-self:center}}

/* RERUN-175: show both placeholder lines on folded phone widths. */
@media(max-width:300px){#atlas-assistant-shell textarea.aa-input{min-height:64px}}

/* RERUN-179: the floating assistant is not an editorial page section. */
body.yc-public #atlas-assistant-shell{padding:0;margin:0;border:0;background:transparent}
