/* Main Circle header: preserve controls and give every row room to breathe. */
.circle-workspace-header-layout .agent-workspace-header{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:start;gap:12px 16px;min-width:0;overflow:visible}
.circle-workspace-header-layout .agent-workspace-back{box-sizing:border-box;width:44px!important;height:44px!important;min-width:44px;display:grid;place-items:center}
.circle-workspace-header-layout .agent-workspace-title{display:flex!important;flex-direction:column;align-items:stretch;gap:6px;min-width:0!important;width:auto!important;max-width:none!important}
.circle-workspace-header-layout .agent-workspace-title-row{display:flex;align-items:center;gap:6px;min-width:0;width:100%;max-width:none}
.circle-workspace-header-layout [data-workspace-title]{flex:1 1 auto;min-width:0!important;width:auto!important;max-width:none!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;overflow:hidden;text-overflow:ellipsis;line-height:1.25}
.circle-workspace-header-layout .agent-workspace-title-row>button{flex:0 0 44px;width:44px!important;height:44px!important;min-width:44px}
.circle-workspace-header-layout .agent-workspace-entity-links{display:flex!important;grid-column:auto!important;grid-row:auto!important;width:100%!important;max-width:480px!important;min-width:0!important;margin:0!important;flex:0 1 auto!important}
.circle-workspace-header-layout .agent-workspace-entity-links:empty{display:none!important}
.circle-workspace-header-layout .agent-workspace-entity-link{display:flex!important;align-items:stretch;flex:1 1 auto!important;width:100%;min-width:0!important;max-width:100%!important;padding:0!important;overflow:hidden;border-radius:10px}
.circle-workspace-header-layout .agent-workspace-entity-link-main{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;flex:1 1 auto!important;min-width:0!important;width:auto!important;min-height:44px;height:auto!important;gap:6px;padding:6px!important;overflow:hidden;text-decoration:none}
.circle-workspace-header-layout .agent-workspace-entity-link-icon{display:grid;place-items:center;box-sizing:border-box;width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important;flex:none;margin:0!important}
.circle-workspace-header-layout .agent-workspace-entity-link-icon>img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.circle-workspace-header-layout .agent-workspace-entity-link-copy{display:grid!important;min-width:0!important;gap:2px;overflow:hidden;text-align:left}
.circle-workspace-header-layout .agent-workspace-entity-link-copy>strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:normal;overflow-wrap:normal;line-height:1.3}
.circle-workspace-header-layout .agent-workspace-entity-link-copy>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.25}
.circle-workspace-header-layout .agent-workspace-entity-link-copy>span{display:none}
.circle-workspace-header-layout .agent-workspace-entity-link-arrow{display:grid!important;place-items:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;font-size:20px}
.circle-workspace-header-layout .agent-workspace-entity-unlink{display:grid!important;place-items:center;box-sizing:border-box;flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:auto!important;min-height:44px!important;padding:0!important;margin:0}
.circle-workspace-header-layout .agent-workspace-entity-unlink[hidden]{display:none!important}
.circle-workspace-header-layout .agent-workspace-entity-unlink>span{display:none!important}
.circle-workspace-header-layout .agent-workspace-header-actions{position:relative!important;inset:auto!important;display:flex!important;flex-direction:column;align-items:flex-end;justify-content:flex-start;gap:8px;min-width:0!important;max-width:100%;width:auto!important;overflow:visible}
.circle-workspace-header-layout .agent-workspace-status-row{display:flex!important;flex-wrap:wrap!important;align-items:center;justify-content:flex-end;gap:8px!important;min-width:0;max-width:100%;overflow:visible}
.circle-workspace-header-layout .agent-workspace-status-row>.agent-workspace-control{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;gap:5px;width:auto!important;min-width:44px!important;height:auto!important;min-height:44px!important;padding:8px!important;white-space:nowrap}
.circle-workspace-header-layout .agent-workspace-status-row>.agent-workspace-control [data-notification-count]{position:static;flex:none;min-width:20px;height:20px;margin:0;line-height:20px;white-space:nowrap}
.circle-workspace-header-layout .agent-workspace-connection{box-sizing:border-box;display:flex;align-items:center;gap:6px;flex:0 0 auto;min-height:44px;margin:0;white-space:nowrap}
.circle-workspace-session{display:flex;align-items:center;gap:8px;flex:0 0 auto;max-width:100%;min-width:0}
.circle-workspace-account{position:relative;z-index:40;flex:0 0 auto;color:var(--workspace-ink);min-width:0}
.circle-workspace-account .actions{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-height:44px}
.circle-workspace-account .btn-get-tokens,.circle-workspace-account .candao-subscription-status{display:none!important}
.circle-workspace-account .language-switcher{position:static;display:flex;width:44px;min-width:44px;flex:0 0 44px;margin:0}
.circle-workspace-account .language-trigger,.circle-workspace-account .bell-wrapper,.circle-workspace-account .candao-subscription-avatar{box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex:none;width:44px;min-width:44px;height:44px;padding:0;gap:3px;border:1px solid var(--workspace-line);border-radius:10px;background:var(--workspace-panel);color:inherit;cursor:pointer}
.circle-workspace-account .bell-wrapper,.circle-workspace-account .candao-subscription-avatar{position:relative;margin:0}
.circle-workspace-account #icon-avatar{display:block;box-sizing:border-box;width:44px!important;height:44px!important;padding:6px;border-radius:50%;object-fit:cover;cursor:pointer}
.circle-workspace-account #icon-bell{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;margin:0;font-size:23px;color:inherit}
.circle-workspace-account .language-trigger img{display:block;width:20px;height:20px;object-fit:cover;border-radius:50%}
.circle-workspace-account .language-trigger .material-icons{font-size:16px}
.circle-workspace-account #notif-badge{position:absolute;top:0;right:0;box-sizing:border-box;min-width:18px;max-width:32px;height:18px;padding:0 3px;line-height:18px;font-size:10px;white-space:nowrap}
.circle-workspace-account .dropdown-menu,.circle-workspace-account .notifications-dropdown,.circle-workspace-account .language-dropdown{position:absolute!important;top:var(--circle-menu-top,52px)!important;left:var(--circle-menu-left,0px)!important;right:auto!important;z-index:60;box-sizing:border-box;min-width:0!important;max-width:min(calc(100vw - 24px),var(--circle-menu-max-width,100vw))!important;max-height:min(360px,65dvh,var(--circle-menu-max-height,65dvh))!important;overflow:auto;background:var(--workspace-panel)!important;color:var(--workspace-ink)!important;border:1px solid var(--workspace-line);border-radius:12px;box-shadow:0 14px 36px #0005}
.circle-workspace-account .language-dropdown{--language-menu-surface:var(--workspace-panel);--language-menu-text:var(--workspace-ink);--language-menu-hover:var(--workspace-subtle);--language-menu-active:var(--workspace-subtle);--language-menu-focus:var(--workspace-green);display:none;width:220px;min-width:min(180px,var(--circle-menu-max-width,100vw))!important;padding:5px}
.circle-workspace-account .language-dropdown.open{display:block}
.circle-workspace-account .language-option{display:flex;align-items:center;gap:9px;box-sizing:border-box;min-height:44px;width:100%;padding:8px;border:0;border-radius:7px;background:transparent;color:var(--workspace-ink)!important;text-align:left;cursor:pointer}
.circle-workspace-account .language-option img{width:20px;height:20px;object-fit:cover;border-radius:50%}
.circle-workspace-account .language-option small{color:var(--workspace-muted)!important}
.circle-workspace-account .language-option:hover,.circle-workspace-account .language-option.active,.circle-workspace-account .dropdown-menu a:hover{background:var(--workspace-subtle)!important;color:var(--workspace-ink)!important}
.circle-workspace-account .dropdown-menu{min-width:min(190px,var(--circle-menu-max-width,100vw))!important;padding:5px}
.circle-workspace-account .dropdown-menu a{display:flex;align-items:center;box-sizing:border-box;min-height:44px;padding:9px 12px;color:inherit}
.circle-workspace-account .notifications-dropdown{width:340px}
.circle-workspace-account .notifications-dropdown button,.circle-workspace-account .notifications-dropdown a,.circle-workspace-account .notifications-dropdown .notif-text{color:inherit!important}
.circle-workspace-account .notifications-dropdown button{min-height:44px}
.circle-workspace-account :focus-visible{outline:2px solid var(--workspace-green);outline-offset:3px}
.circle-workspace-header-layout .agent-workspace-treasury-row{width:auto!important;min-width:0;max-width:100%;margin:0}
.circle-workspace-header-layout .agent-workspace-treasury-trigger{box-sizing:border-box;min-height:44px!important;height:auto!important;max-width:100%;width:auto!important;padding:6px 10px!important}
.circle-workspace-header-layout .agent-workspace-treasury-trigger-copy{min-width:0}
.circle-workspace-header-layout .agent-workspace-treasury-trigger-copy>span{flex-wrap:nowrap}
.circle-workspace-header-layout .agent-workspace-treasury-trigger-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body:has(main[data-feed-workspace])>.topbar{display:none!important}
body:has(main[data-feed-workspace]) .main{margin-top:0!important;padding-top:0!important;min-height:100dvh}
body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar{display:block!important;transform:none!important;left:0!important;right:auto!important;width:64px!important;min-width:64px!important;max-width:64px!important;overflow-x:hidden;background:var(--workspace-canvas)!important;border-radius:0!important;border-right:1px solid var(--workspace-line)!important;box-shadow:none!important}
body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .main{box-sizing:border-box;margin-left:64px!important;width:calc(100% - 64px)!important;max-width:calc(100% - 64px)!important}
body:has(main[data-feed-workspace]) .sidebar nav{margin-top:0!important}
.circle-workspace-rail-brand{display:grid!important;place-items:center;box-sizing:border-box;flex:0 0 56px;min-height:56px!important;height:56px!important;margin:0 0 4px!important;padding:0!important}
.circle-workspace-rail-brand img{display:block;width:30px;height:30px;object-fit:contain}
body:where(.circle-workspace-shell-phone):has(main[data-feed-workspace]) .main{margin-left:0!important;margin-top:calc(var(--mobile-appbar-height,64px) + env(safe-area-inset-top,0px))!important;min-height:calc(100dvh - var(--mobile-appbar-height,64px))}
@media(max-width:1200px){
 .circle-workspace-header-layout .agent-workspace-header{grid-template-columns:44px minmax(0,1fr);gap:10px 12px}
 .circle-workspace-header-layout .agent-workspace-back{grid-column:1;grid-row:1}
 .circle-workspace-header-layout .agent-workspace-title{grid-column:2;grid-row:1}
 .circle-workspace-header-layout .agent-workspace-header-actions{grid-column:1/-1!important;grid-row:2!important;align-items:stretch;width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr);gap:8px}
 .circle-workspace-header-layout .agent-workspace-status-row{justify-content:flex-start;width:100%}
 .circle-workspace-header-layout .agent-workspace-status-row>.agent-workspace-control>span:not([data-ghost-usage-balance]){display:none}
 .circle-workspace-header-layout .agent-workspace-treasury-row{justify-self:start}
}
@media(max-width:767px){
 .circle-workspace-header-layout .agent-workspace-header{padding:12px 0!important}
 .circle-workspace-header-layout .agent-workspace-title-row h1{font-size:20px!important}
 .circle-workspace-header-layout .agent-workspace-entity-link-main{grid-template-columns:34px minmax(0,1fr) 44px;gap:4px;padding:4px!important}
 .circle-workspace-header-layout .agent-workspace-entity-link-icon{width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important}
 .circle-workspace-header-layout .agent-workspace-entity-link-copy>small{font-size:9px}
 .circle-workspace-header-layout .agent-workspace-status-row{gap:6px!important}
 .circle-workspace-header-layout .agent-workspace-treasury-trigger{min-width:180px!important}
}

/* Match the approved Brain icon rail while retaining native links and labels. */
body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar nav{padding:4px 0!important}
body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar nav>a{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center!important;width:48px!important;min-width:48px!important;min-height:44px;margin:0 auto!important;padding:0!important;gap:0!important;overflow:hidden;font-size:0!important;color:var(--workspace-muted)!important}
body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar nav>a .nav-icon{flex:0 0 24px;width:24px;margin:0!important;font-size:22px!important}
body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar nav>a .badge,body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar nav>a .airdrop-pill{display:none!important}
body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar nav>a:hover,body:where(.circle-workspace-shell-desktop):has(main[data-feed-workspace]) .sidebar nav>a.active{color:var(--workspace-ink)!important;background:var(--workspace-subtle)!important}

/* Header readability hardening: native controls and linked-page semantics stay. */
.circle-workspace-header-layout .agent-workspace-header{grid-template-columns:44px minmax(0,1fr) minmax(0,max-content)}
.circle-workspace-header-layout .agent-workspace-header-actions{max-width:min(540px,100%)}
.circle-workspace-header-layout .agent-workspace-title-row{flex-wrap:wrap;align-items:center}
.circle-workspace-header-layout [data-workspace-title]{display:block!important;flex:1 1 180px;-webkit-line-clamp:unset;line-clamp:unset;-webkit-box-orient:initial}
.circle-workspace-header-layout .agent-workspace-entity-links{display:grid!important;grid-template-columns:minmax(0,1fr);align-items:start}
.circle-workspace-header-layout .agent-workspace-entity-link{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:stretch;container-type:inline-size;box-sizing:border-box}
.circle-workspace-header-layout .agent-workspace-entity-link-main{box-sizing:border-box;grid-column:1;grid-row:1;grid-template-columns:38px minmax(0,1fr) 20px;grid-template-areas:"mark copy arrow";place-items:stretch;align-items:center;justify-content:normal;gap:8px;padding:8px!important;width:100%!important}
.circle-workspace-header-layout .agent-workspace-entity-link-icon{grid-area:mark;align-self:start;justify-self:start}
.circle-workspace-header-layout .agent-workspace-entity-link-copy{grid-area:copy;align-self:center;justify-self:stretch;width:100%;max-width:100%;gap:3px}
.circle-workspace-header-layout .agent-workspace-entity-link-copy>strong,
.circle-workspace-header-layout .agent-workspace-entity-link-copy>small,
.circle-workspace-header-layout .agent-workspace-entity-link-copy>span{position:static;display:block;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.3}
.circle-workspace-header-layout .agent-workspace-entity-link-copy>span{font-size:10px;color:var(--workspace-muted)}
.circle-workspace-header-layout .agent-workspace-entity-link-arrow{grid-area:arrow;align-self:start;justify-self:center;width:20px;min-width:20px;height:38px}
.circle-workspace-header-layout .agent-workspace-entity-unlink{grid-column:2;grid-row:1;align-self:stretch;justify-self:stretch}
@container(max-width:260px){
 .circle-workspace-header-layout .agent-workspace-entity-link-main{grid-template-columns:32px minmax(0,1fr);grid-template-areas:"mark copy";gap:6px}
 .circle-workspace-header-layout .agent-workspace-entity-link-icon{width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important}
 .circle-workspace-header-layout .agent-workspace-entity-link-arrow{display:none!important}
}
@container(max-width:190px){
 .circle-workspace-header-layout .agent-workspace-entity-link-main{grid-column:1/-1}
 .circle-workspace-header-layout .agent-workspace-entity-unlink{grid-column:1/-1;grid-row:2;width:100%!important;border-left:0;border-top:1px solid var(--workspace-line);display:flex!important;gap:5px;padding:0 8px!important}
 .circle-workspace-header-layout .agent-workspace-entity-unlink>span{display:inline!important}
}
.circle-workspace-topbar{display:grid;grid-template-columns:auto minmax(180px,1fr) auto;align-items:center;gap:12px;box-sizing:border-box;min-width:0;max-width:100%;padding:12px 0;border-bottom:1px solid var(--workspace-line);background:var(--workspace-canvas);color:var(--workspace-ink)}
.circle-workspace-topbar__identity{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;color:inherit;text-decoration:none}
.circle-workspace-topbar__identity>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.circle-workspace-topbar__search{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;box-sizing:border-box;min-width:0;margin:0;padding:6px 8px;border:1px solid var(--workspace-line);border-radius:12px;background:var(--workspace-panel)}
.circle-workspace-topbar__search>input{box-sizing:border-box;min-width:0;width:100%;height:44px;border:0;outline-offset:-2px;background:transparent;color:inherit;font:inherit}
.circle-workspace-topbar__ask{display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-width:44px;min-height:44px;padding:5px 10px;border:1px solid var(--workspace-line);border-radius:9px;background:var(--workspace-subtle);color:inherit;cursor:pointer}
.circle-workspace-topbar__ask>span{display:grid;gap:2px;text-align:left}
.circle-workspace-topbar__ask small{font-size:9px;white-space:nowrap}
.circle-workspace-topbar__ask:disabled{opacity:.6;cursor:default}
.circle-workspace-topbar__account{min-width:0;max-width:100%}
.circle-workspace-topbar__account:empty{display:none}
.circle-workspace-topbar__status{grid-column:1/-1;margin:0;font-size:12px;color:var(--workspace-muted)}
.circle-workspace-topbar__status:empty{display:none}
.circle-workspace-topbar :focus-visible{outline:2px solid var(--workspace-green);outline-offset:2px}
.circle-header-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1200px){
 .circle-workspace-header-layout .agent-workspace-header{grid-template-columns:44px minmax(0,1fr)}
 .circle-workspace-header-layout .agent-workspace-header-actions{max-width:100%}
}
@media(max-width:1000px){
 .circle-workspace-topbar{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
 .circle-workspace-topbar__search{grid-column:1/-1;grid-row:2}
 .circle-workspace-topbar__account{grid-column:2;grid-row:1}
}

/* Preserve the native wide dashboard canvas; its JS owns dimensions and saved positions. */
.circle-workspace-header-layout{min-width:0;max-width:100%}
.circle-workspace-header-layout .agent-workspace-layout.is-dashboard{max-width:none;overflow:visible}
@media(min-width:721px) and (max-width:1120px){
 .circle-workspace-header-layout .agent-workspace-layout:not(.is-dashboard){grid-template-columns:minmax(0,.75fr) minmax(0,1.4fr)}
}

.circle-workspace-topbar__account{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px}
.circle-workspace-topbar__auth{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.circle-workspace-topbar__auth>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:6px 10px;border:1px solid var(--workspace-line);border-radius:9px;color:inherit;text-decoration:none;font-size:12px;white-space:nowrap}
.circle-workspace-topbar__auth>a[aria-disabled="true"]{opacity:.6}
body:where(.circle-workspace-shell-anonymous):has(main[data-feed-workspace]) .circle-workspace-account .bell-wrapper,
body:where(.circle-workspace-shell-anonymous):has(main[data-feed-workspace]) .circle-workspace-account .candao-subscription-avatar{display:none!important}

.circle-workspace-topbar__auth[hidden]{display:none!important}

.circle-workspace-topbar__identity{min-width:44px}

/* Use a geometric chevron so font baselines cannot displace the Brain-link arrow. */
.circle-workspace-header-layout .workspace-brain-title .workspace-brain-entry{align-items:center;gap:8px}
.circle-workspace-header-layout .workspace-brain-title .workspace-brain-entry>h2{margin:0;line-height:1.25}
.circle-workspace-header-layout .workspace-brain-title .workspace-brain-entry::after{content:"";display:block;align-self:center;flex:0 0 7px;inline-size:7px;block-size:7px;margin-inline:6px;border-inline-end:2px solid currentColor;border-block-end:2px solid currentColor;transform:rotate(-45deg);font-size:0;line-height:0}
.circle-workspace-header-layout .workspace-brain-title .workspace-brain-entry:dir(rtl)::after{transform:rotate(135deg)}

/* Keep workspace navigation in the workspace; match its mobile panel breakpoint. */
body:has(main[data-feed-workspace]):has(.agent-workspace.has-mobile-panels) .sidebar,
body:has(main[data-feed-workspace]):has(.agent-workspace.has-mobile-panels) .mobile-app-topbar,
body:has(main[data-feed-workspace]):has(.agent-workspace.has-mobile-panels) .mobile-app-bottomnav,
body:has(main[data-feed-workspace]):has(.agent-workspace.has-mobile-panels) .mobile-app-bottom-nav,
body:has(main[data-feed-workspace]):has(.agent-workspace.has-mobile-panels) .bottom-nav{display:none!important}
body:has(main[data-feed-workspace]):has(.agent-workspace.has-mobile-panels) .main{margin:0!important;padding:0!important;width:100%!important;max-width:none!important;min-height:100dvh}
.circle-workspace-header-layout.has-mobile-panels{width:100%;max-width:none!important;margin:0!important;padding:0 12px!important;box-sizing:border-box}
.circle-workspace-header-layout .circle-workspace-account #notifications-dropdown{background:var(--workspace-panel)!important;color:var(--workspace-ink)!important;border:1px solid var(--workspace-line)!important}
.circle-workspace-header-layout .circle-workspace-account #notifications-dropdown :is(.notification,.notification-item,.notification-entry,.notif-item,li){background:var(--workspace-panel)!important;color:var(--workspace-copy)!important;border-color:var(--workspace-line)!important}
.circle-workspace-header-layout .circle-workspace-account #notifications-dropdown :is(.notification,.notification-item,.notification-entry,.notif-item,li):hover{background:var(--workspace-subtle)!important}

/* Circle and Brain share the same compact, full-width workspace chrome. */
body:has(main[data-feed-workspace]) .main{padding:0!important}
.circle-workspace-header-layout{width:100%;max-width:none!important;margin:0!important;padding:0!important;box-sizing:border-box}
.circle-workspace-topbar{grid-template-columns:40px minmax(120px,220px) minmax(180px,1fr) auto;min-height:82px;padding:14px 22px;gap:12px;background:linear-gradient(110deg,#111e17,#0c1711)}
.circle-workspace-topbar__heading{display:flex;align-items:center;min-width:0;gap:4px}
.circle-workspace-topbar__identity{gap:10px;min-width:0;flex:1 1 auto}
.circle-workspace-topbar__identity>svg{flex:0 0 24px;color:var(--workspace-green-dark)}
.circle-workspace-topbar__identity-copy{display:flex;flex-direction:column;min-width:0}
.circle-workspace-topbar__identity-copy>span{color:var(--workspace-green-dark);font-size:10px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}
.circle-workspace-topbar__identity-copy>[data-workspace-title]{margin:5px 0 0!important;font-size:17px!important;font-weight:750;line-height:1.2!important;color:var(--workspace-ink)}
.circle-workspace-topbar__heading>button{display:grid;place-items:center;flex:0 0 32px;width:32px!important;min-width:32px!important;height:40px;border:0;background:transparent;color:var(--workspace-muted)}
.circle-workspace-topbar>.agent-workspace-back{border-color:transparent!important;background:transparent!important;border-radius:10px!important;width:40px!important;min-width:40px;height:40px!important}
.circle-workspace-topbar__search{width:100%;max-width:680px;justify-self:center;min-height:56px;padding:5px 7px 5px 15px;gap:10px;background:#14241b;border-color:#365647;border-radius:14px;color:var(--workspace-ink)}
.circle-workspace-topbar__search>.material-icons{color:var(--workspace-green-dark);font-size:22px}
.circle-workspace-topbar__search>input{height:36px;font-size:14px}
.circle-workspace-topbar__search>input::placeholder{color:#7d9588}
.circle-workspace-topbar__ask{min-height:42px;background:#244f38;border-color:#3c7457;color:#a7f3cd;font-size:11px;font-weight:750}
.circle-workspace-topbar__ask small{font-size:9px}
.circle-workspace-header-layout.is-brain-header .agent-workspace-header{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 22px!important}
.circle-workspace-header-layout.is-brain-header .agent-workspace-title{flex:1 1 240px}
.circle-workspace-header-layout.is-brain-header .agent-workspace-title>.agent-workspace-kicker,
.circle-workspace-header-layout.is-brain-header .agent-workspace-title>.agent-workspace-title-row{display:none!important}
@media(max-width:1120px){
 body:has(main[data-feed-workspace]){padding:0!important;--mobile-bottom-nav-height:0px!important}
 body:has(main[data-feed-workspace])>:is(.topbar,.sidebar,.mobile-app-topbar),
 body:has(main[data-feed-workspace]) :is(#mobile-offer-topbar,.mobile-shell-topbar,#candao-primary-nav,nav.bottom-nav,.mobile-shell-bottom-nav,.mobile-app-bottomnav,.mobile-app-bottom-nav){display:none!important}
 body:has(main[data-feed-workspace]) .main{margin:0!important;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)!important;width:100%!important;max-width:none!important;min-height:100dvh}
 .circle-workspace-topbar{grid-template-columns:40px minmax(0,1fr) auto;padding:10px 12px;gap:8px}
 .circle-workspace-topbar__heading{grid-column:2;grid-row:1}
 .circle-workspace-topbar__account{grid-column:3;grid-row:1}
 .circle-workspace-topbar__search{grid-column:1/-1;grid-row:2;max-width:none}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-header{padding:10px 12px!important}
 .circle-workspace-header-layout .agent-workspace-entity-links{max-width:none!important}
}
@media(max-width:380px){
 .circle-workspace-topbar__heading{gap:0}
 .circle-workspace-topbar__identity{gap:6px}
 .circle-workspace-topbar__identity>svg{width:20px;height:20px;flex-basis:20px}
 .circle-workspace-topbar__identity-copy>[data-workspace-title]{font-size:15px!important}
 .circle-workspace-topbar__heading>button{flex-basis:28px;width:28px!important;min-width:28px!important}
}

.circle-workspace-header-layout .circle-workspace-account #notifications-dropdown .notification.unread{background:var(--workspace-green-soft)!important;color:var(--workspace-ink)!important;border-inline-start:3px solid var(--workspace-green)}
.circle-workspace-header-layout .circle-workspace-account #notifications-dropdown .notif-text{color:inherit!important}
.circle-workspace-header-layout .circle-workspace-account #notifications-dropdown :is(#dd-tab-all,#dd-tab-cdo){background:transparent!important;color:var(--workspace-muted)!important;border-color:var(--workspace-line)!important}
.circle-workspace-header-layout .circle-workspace-account #notifications-dropdown :is(#dd-tab-all,#dd-tab-cdo)[aria-selected="true"]{color:var(--workspace-green-dark)!important;border-bottom-color:var(--workspace-green)!important}

@media(max-width:1120px){.circle-workspace-header-layout.has-mobile-panels{padding:0!important}}

.circle-workspace-topbar__identity-copy>[data-workspace-title]{height:auto!important;min-height:0!important;flex:0 0 auto!important}
.circle-workspace-topbar{background:linear-gradient(110deg,var(--workspace-panel),var(--workspace-canvas))}
.circle-workspace-topbar__search{background:var(--workspace-subtle);border-color:var(--workspace-line);color:var(--workspace-ink)}
.circle-workspace-topbar__ask{background:var(--workspace-green-soft);border-color:var(--workspace-subtle-border);color:var(--workspace-green-dark)}

/* The connection action has its own row instead of competing with panel controls. */
.circle-workspace-header-layout .circle-connect-ai-entry{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:12px 14px;border-bottom:1px solid var(--workspace-line)}
.circle-workspace-header-layout .circle-connect-ai-entry:has(>[hidden]){display:none}
.circle-workspace-header-layout .circle-connect-ai-entry>.circle-connect-ai-button{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;width:100%!important;min-width:0!important;min-height:44px!important;height:auto!important;padding:10px 14px!important;border:1px solid var(--workspace-green)!important;border-radius:10px!important;background:var(--workspace-green-soft)!important;color:var(--workspace-green-dark)!important;font-family:inherit!important;font-size:14px!important;font-weight:700!important;line-height:1.3!important;white-space:normal;cursor:pointer}
.circle-workspace-header-layout .circle-connect-ai-entry>.circle-connect-ai-button>span{display:inline!important;font-size:14px!important}
.circle-workspace-header-layout .circle-connect-ai-entry>small{color:var(--workspace-muted);font-size:11px;line-height:1.4;text-align:center}
.agent-workspace-dialog[data-agent-dialog]{box-sizing:border-box;width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto}
.agent-workspace-dialog[data-agent-dialog]::backdrop{background:#0009}
.agent-workspace-dialog [data-agent-grant-form]>label{min-width:0}
.agent-workspace-dialog [data-agent-grant-form] select{box-sizing:border-box;width:100%;min-width:0;min-height:44px}
.circle-connect-advanced{margin:12px 0;padding:12px;border:1px solid var(--workspace-line);border-radius:10px}
.circle-connect-advanced>summary{cursor:pointer;color:var(--workspace-muted);font-size:13px}
.circle-connect-advanced>label{margin-top:12px}
.circle-connect-advanced .circle-connect-extra{display:flex;flex-direction:row;align-items:start;gap:8px}
.circle-connect-advanced .circle-connect-extra>input{flex:0 0 auto;width:18px;min-width:18px;height:18px;margin:2px 0}

.agent-workspace-dialog[data-agent-dialog] [hidden]{display:none!important}

/* Keep Circle navigation free of the global marketing footer. */
body:has(main[data-feed-workspace]) .sidebar .sidebar-bottom{display:none!important}

/* Connect AI sits beside the Team title; panel sizing stays unrestricted. */
.circle-workspace-header-layout [data-workspace-panel="team"]>.agent-workspace-panel-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 8px}
.circle-workspace-header-layout [data-workspace-panel="team"]>.agent-workspace-panel-heading>div:first-child{min-width:0}
.circle-workspace-header-layout [data-workspace-panel="team"]>.agent-workspace-panel-heading h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.circle-workspace-header-layout [data-workspace-panel="team"]>.agent-workspace-panel-heading>.agent-workspace-heading-actions{grid-column:1/-1;grid-row:2;margin:0;justify-content:flex-start}
.circle-workspace-header-layout .agent-workspace-panel-heading>.circle-connect-ai-entry{grid-column:2;grid-row:1;display:inline-flex;flex-direction:row;min-width:0;max-width:100%;padding:0;border:0}
.circle-workspace-header-layout .agent-workspace-panel-heading>.circle-connect-ai-entry>small{display:none}
.circle-workspace-header-layout .agent-workspace-panel-heading>.circle-connect-ai-entry>.circle-connect-ai-button{width:auto!important;min-height:44px!important;padding:8px 10px!important;white-space:nowrap;font-size:12px!important}
.circle-workspace-header-layout .circle-mobile-controls-button[hidden],
.circle-workspace-header-layout .agent-workspace-header-actions [hidden]{display:none!important}
.circle-mobile-controls-panel{position:fixed;inset:auto 8px max(8px,env(safe-area-inset-bottom,0px)) auto;box-sizing:border-box;width:min(420px,calc(100vw - 16px));max-height:calc(100dvh - 32px);margin:0;padding:16px;border:1px solid var(--workspace-line);border-radius:20px;background:var(--workspace-panel);color:var(--workspace-ink);box-shadow:0 18px 64px #0006;overflow:auto;overscroll-behavior:contain}
.circle-mobile-controls-panel::backdrop{background:#0003}
.circle-mobile-controls-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.circle-mobile-controls-panel h2{margin:0;font-size:16px;line-height:1.3}
.circle-mobile-controls-panel .circle-mobile-controls-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:var(--workspace-subtle);color:inherit;cursor:pointer}
.circle-mobile-controls-panel>.agent-workspace-status-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;justify-content:stretch;gap:8px!important}
.circle-mobile-controls-panel>.agent-workspace-status-row>.agent-workspace-control{width:100%!important;justify-content:flex-start;min-height:48px!important;padding:10px!important}
@media(max-width:1120px){
 .circle-workspace-header-layout [data-workspace-connection],
 .circle-workspace-header-layout .circle-workspace-session:has(>[data-workspace-connection]:only-child){display:none!important}
 .circle-workspace-header-layout [data-workspace-panel="artifacts"] :is([data-panel-focus],[data-panel-fullscreen]){display:none!important}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-title>[data-workspace-description]{display:none!important}
 .circle-workspace-header-layout.is-brain-header[data-circle-compact-controls-ready="true"] .agent-workspace-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
 .circle-workspace-header-layout.is-brain-header[data-circle-compact-controls-ready="true"] .agent-workspace-header>.agent-workspace-title{grid-column:1!important;grid-row:1!important;min-width:0!important}
 .circle-workspace-header-layout.is-brain-header[data-circle-compact-controls-ready="true"] .agent-workspace-header-actions{grid-column:2!important;grid-row:1!important;display:flex!important;flex-direction:row;align-items:center;gap:6px}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-status-row{flex-wrap:nowrap!important;gap:4px!important}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-treasury-row{flex:0 0 auto;min-width:0}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-link-main{grid-column:1;grid-row:1;grid-template-columns:28px minmax(0,1fr) 16px;grid-template-areas:"mark copy arrow";gap:4px;min-height:44px;padding:4px!important}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-link-icon{width:28px!important;height:28px!important;min-width:28px!important;max-width:28px!important}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-link-copy>small,
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-link-copy>span{display:none}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-link-copy>strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-link-arrow{display:grid!important;place-items:center;align-self:center;width:16px;height:32px;min-width:16px;font-size:16px}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-unlink{grid-column:2;grid-row:1;display:grid!important;flex-basis:44px!important;width:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-unlink>span{display:none!important}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-entity-unlink[hidden]{display:none!important}
 .circle-workspace-header-layout.is-brain-header[data-circle-compact-controls-ready="true"] .agent-workspace-header>.agent-workspace-title:has(.agent-workspace-entity-links:empty){display:none!important}
 .circle-workspace-header-layout.is-brain-header[data-circle-compact-controls-ready="true"] .agent-workspace-header:not(:has(.agent-workspace-entity-links:not(:empty))){grid-template-columns:1fr}
 .circle-workspace-header-layout.is-brain-header[data-circle-compact-controls-ready="true"] .agent-workspace-header:not(:has(.agent-workspace-entity-links:not(:empty)))>.agent-workspace-header-actions{grid-column:1!important;justify-content:flex-end}
}
@media(max-width:599px){
 .circle-workspace-header-layout[data-circle-compact-controls-ready="true"] .agent-workspace-header-actions{gap:4px}
 .circle-workspace-header-layout .circle-mobile-controls-button{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 44px;width:44px!important;min-width:44px!important;height:44px!important;padding:0!important}
 .circle-workspace-header-layout .agent-workspace-treasury-trigger{box-sizing:border-box;width:112px!important;min-width:112px!important;max-width:112px;min-height:44px!important;gap:4px;padding:5px!important}
 .circle-workspace-header-layout .agent-workspace-treasury-trigger>.material-icons{flex:0 0 16px;font-size:16px;width:16px}
 .circle-workspace-header-layout .agent-workspace-treasury-trigger>.agent-workspace-treasury-chevron{flex-basis:12px;width:12px;font-size:14px}
 .circle-workspace-header-layout .agent-workspace-treasury-trigger-copy{flex:1;min-width:0}
 .circle-workspace-header-layout .agent-workspace-treasury-trigger-copy>small{font-size:10px}
 .circle-workspace-header-layout [data-treasury-trigger-total]{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
 .circle-workspace-header-layout [data-treasury-trigger-count]{display:none}
 .agent-workspace-dialog[data-agent-dialog]{position:fixed;inset:auto 0 0;box-sizing:border-box;width:100%!important;max-width:100%!important;max-height:calc(100dvh - env(safe-area-inset-top,0px) - 12px);margin:auto 0 0;border-radius:24px 24px 0 0;padding:16px 16px max(16px,env(safe-area-inset-bottom,0px));overscroll-behavior:contain;scroll-padding-bottom:24px}
 .agent-workspace-dialog[data-agent-dialog] :is(input,select,textarea){font-size:16px}
 .agent-workspace-dialog[data-agent-dialog] :is(button,input,select){min-height:44px}
}

/* Native permission-hidden connection actions must remain hidden after inline placement. */
.circle-workspace-header-layout .circle-connect-ai-entry:has(>[data-add-agent][hidden]),
.circle-workspace-header-layout .circle-connect-ai-entry>[data-add-agent][hidden]{display:none!important}

/* The status row must reserve only its controls, leaving room for Treasury. */
@media(min-width:600px) and (max-width:1120px){
 .circle-workspace-header-layout.is-brain-header .agent-workspace-status-row{width:auto!important;min-width:0;flex:0 0 auto}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-treasury-trigger{box-sizing:border-box;width:112px!important;min-width:112px!important;max-width:112px;gap:4px;padding:5px!important}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-treasury-trigger>.material-icons{flex:0 0 16px;font-size:16px;width:16px}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-treasury-trigger>.agent-workspace-treasury-chevron{flex-basis:12px;width:12px;font-size:14px}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-treasury-trigger-copy{flex:1;min-width:0}
 .circle-workspace-header-layout.is-brain-header .agent-workspace-treasury-trigger-copy>small{font-size:10px}
 .circle-workspace-header-layout.is-brain-header [data-treasury-trigger-total]{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
 .circle-workspace-header-layout.is-brain-header [data-treasury-trigger-count]{display:none}
}

/* Visible only in this native positive-phone popup, never desktop/header rows. */
.circle-native-controls-caption { display:none!important; }
@media(max-width:1120px) {
 #circle-mobile-controls-panel.circle-native-controls-readable>.agent-workspace-status-row {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch;
  gap:8px!important;
 }
 #circle-mobile-controls-panel.circle-native-controls-readable>.agent-workspace-status-row>.agent-workspace-control:not([hidden]) {
  box-sizing:border-box; display:flex!important; align-items:center; justify-content:flex-start;
  gap:8px; width:100%!important; min-width:0!important; height:auto!important;
  min-height:48px!important; padding:10px!important; border-radius:12px!important;
  font-size:14px!important; white-space:normal;
 }
 #circle-mobile-controls-panel.circle-native-controls-readable>.agent-workspace-status-row>.agent-workspace-control>span:not(.circle-native-controls-caption) { display:none!important; }
 #circle-mobile-controls-panel.circle-native-controls-readable>.agent-workspace-status-row>.agent-workspace-control>span.circle-native-controls-caption {
  display:inline!important; min-width:0; font-size:14px!important; font-weight:650;
  line-height:1.3; white-space:normal; overflow-wrap:anywhere;
 }
 #circle-mobile-controls-panel.circle-native-controls-readable>.agent-workspace-status-row>.agent-workspace-control>.material-icons { flex:0 0 22px; width:22px; min-width:22px; max-width:22px; line-height:22px; overflow:hidden; font-size:22px!important; }
}
