/* Shared by the gateway-injected research entry and server-rendered account pages. */
.site-global-tools:has(>.account-menu){display:flex;align-items:center;gap:8px;overflow:visible}
.account-menu{position:relative;flex:none;text-align:left;font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);z-index:60}
.account-menu>.account-trigger{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:30px;padding:0;list-style:none;border:0;border-radius:10px;corner-shape:squircle;background:var(--tool-face);color:var(--muted);cursor:pointer;transition:background-color 120ms ease,color 120ms ease}
.account-trigger::-webkit-details-marker{display:none}.account-trigger::marker{content:""}
.account-trigger svg{display:block;width:18px;height:18px;pointer-events:none}
.account-trigger:hover,.account-menu[open]>.account-trigger{background:var(--tool-hover);color:var(--text)}
.account-trigger:focus-visible,.account-popover a:focus-visible,.account-popover button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.account-menu>.account-popover{position:absolute;right:0;top:calc(100% + 10px);box-sizing:border-box;width:248px;max-width:calc(100vw - 32px);padding:6px;border:1px solid var(--line);border-radius:14px;corner-shape:squircle;background:var(--account-float,#232c35);box-shadow:0 0 24px #00000020;backdrop-filter:blur(10px);color:var(--text);animation:account-appear 120ms ease-out}
:root[data-theme="light"] .account-menu>.account-popover{background:var(--account-float,#f7f7f7);box-shadow:0 0 24px #00000010}
.account-identity{display:flex;flex-direction:column;gap:3px;padding:9px 12px 13px;overflow-wrap:anywhere}
.account-identity>span{font-size:12px;color:var(--muted)}.account-identity>strong{font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}
.account-popover>.account-actions{display:flex;flex-direction:column;align-items:stretch;gap:2px;width:100%;margin:0;padding:5px 0;border-top:1px solid var(--line);font-size:14px}
.account-popover .account-actions>a,.account-popover .account-signout>button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:40px;width:100%;margin:0;padding:8px 12px;border:0;border-radius:8px;corner-shape:squircle;background:transparent;color:var(--text);font:inherit;text-align:left;text-decoration:none;cursor:pointer;box-shadow:none}
.account-popover .account-actions>a:hover,.account-popover .account-signout>button:hover{background:var(--tool-hover);color:var(--text)}
.account-email-state{font-size:12px;color:var(--muted)}.account-popover>.account-signout{margin:0;padding:5px 0 0;border-top:1px solid var(--line)}
.account-menu-note{margin:0;padding:12px;color:var(--muted);font-size:13px}.account-menu-note>a{color:var(--text)}
@keyframes account-appear{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.account-menu>.account-popover{animation:none}.account-menu>.account-trigger{transition:none}}
