/* The Chief's bubble (chief-dock.js; the Founder, 24 and 26 October 2026, from his drawing): a bubble of its own under the
   top bar, set apart from it, pointing up at the crown (`--point`, set under the crown's middle), in the page's flow so the
   page slides down under it. About a quarter of the screen: the head, the last exchange to scroll, the chat's composer
   (chat-muse.css draws it, `.chief-dock-inner>form.composer`). */
.chief-dock{position:relative;z-index:2;padding:12px 12px 4px}
.chief-dock.moving{overflow:hidden;will-change:height,opacity}
.chief-dock-inner{position:relative;display:flex;flex-direction:column;gap:6px;max-width:560px;margin:0 0 0 auto;padding:8px 12px 10px;background:var(--surface,#fff);border:1px solid var(--line,#e7e5ee);border-radius:20px;box-shadow:0 12px 28px -18px #24212d66,0 2px 6px -4px #24212d26}
.chief-dock-inner::before{content:"";position:absolute;top:-7px;left:calc(var(--point,calc(100% - 30px)) - 7px);width:12px;height:12px;background:inherit;border-top:1px solid var(--line,#e7e5ee);border-left:1px solid var(--line,#e7e5ee);border-top-left-radius:3px;transform:rotate(45deg)}
.chief-dock-head{display:flex;align-items:center;gap:8px;min-height:40px}
.chief-dock-who{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;color:inherit;text-decoration:none;border-radius:12px}
.chief-dock-who:focus-visible{outline:3px solid #b987ef;outline-offset:2px}
.chief-dock-face{position:relative;display:inline-flex;flex:none}
.chief-dock-face .chat-face-agent{position:relative;display:inline-flex}
.chief-dock-face .portrait-box.tiny.chat-head-face{width:32px;height:32px;min-width:32px;border-radius:50%;overflow:hidden}
.chief-dock-face .portrait-box [data-portrait]{width:100%;height:100%}
.chief-dock-face .chat-face-agent>.primary-star.primary-solid{position:absolute;top:-5px;inset-inline-start:-5px;inset-inline-end:auto;width:15px;height:15px;padding:2px;border-radius:50%;background:var(--surface,#fff);color:var(--purple,#6d28b5);box-shadow:0 1px 3px #24212d33;display:inline-flex}
.chief-dock-face .chat-face-agent>.primary-star .primary-crown{width:11px;height:11px}
.chief-dock-name{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.chief-dock-name>strong{font-size:.95rem;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chief-dock-line{font-size:.75rem;color:var(--muted,#686577);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chief-dock-line .agent-needs{color:var(--purple,#6d28b5);font-weight:600}
.chief-dock-tools{display:flex;align-items:center;gap:2px;flex:none}
.chief-dock-tools .icon-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;border-radius:50%;color:var(--purple,#6d28b5)}
.chief-dock-tools .icon-button .icon{width:19px;height:19px}
.chief-dock-tools .icon-button:hover{background:var(--soft,#f2ecfa)}
/* The last exchange: what the person sent, from its top, and the answer under it; the rest by scrolling. */
.chief-dock-log{display:flex;flex-direction:column;gap:0;max-height:clamp(96px,16dvh,180px);overflow-y:auto;overscroll-behavior:contain;padding:2px 2px 4px;scrollbar-width:thin}
.chief-dock-log>.team-message[data-chat-message],.chief-dock-log>.team-message.chat-typing{margin-top:8px}
.chief-dock-log>.team-message.grouped{margin-top:2px}
.chief-dock-log>.team-message:first-child{margin-top:0}
.chief-dock-log:empty{display:none}
/* Small: whose message is which is said by its side; names, faces and times are the full chat's. */
.chief-dock-log .chat-who,.chief-dock-log .chat-meta{display:none}
.chief-dock-log>.team-message[data-chat-message]{margin-top:6px}
.chief-dock-log:focus{outline:none}
.chief-dock-inner>form.composer{margin:2px 0 0}
[data-theme=dark] .chief-dock-inner{background:var(--surface,#1d1a24);border-color:#3a3446;box-shadow:0 12px 28px -18px #000}
[data-theme=dark] .chief-dock-inner::before{border-color:#3a3446}
[data-theme=dark] .chief-dock-tools .icon-button{color:#d6baf8}
[data-theme=dark] .chief-dock-tools .icon-button:hover{background:#35244d}
@media (max-width:700px){.chief-dock{padding:12px 16px 4px}.chief-dock-inner{max-width:none}}

/* The tab under the crown: opens and closes the bubble; its arrow turns. The crown keeps its look either way. */
.topbar .chief-tab{position:absolute;top:100%;left:0;transform:translateX(-50%);display:inline-flex;align-items:center;justify-content:center;width:30px;height:13px;padding:0;border:1px solid var(--line,#e7e5ee);border-top:0;border-radius:0 0 9px 9px;background:var(--surface,#fff);color:var(--purple,#6d28b5);z-index:3}
.topbar .chief-tab .icon{width:13px;height:13px;stroke-width:2.4;transition:transform .24s cubic-bezier(.22,.8,.32,1)}
.topbar .chief-tab[aria-expanded=true] .icon{transform:rotate(180deg)}
.topbar .chief-tab:focus-visible{outline:3px solid #b987ef;outline-offset:1px}
.topbar .chief-tab::after{content:"";position:absolute;inset:-10px -8px -12px}
[data-theme=dark] .topbar .chief-tab{background:var(--surface,#1d1a24);border-color:#3a3446;color:#d6baf8}
:is(body.reduced-motion,[data-a11y-motion=reduce]) .topbar .chief-tab .icon{transition:none}
@media (prefers-reduced-motion:reduce){.topbar .chief-tab .icon{transition:none}}
