/* CyberCompany toolbar, approved CEO behavior, rollout 27 October 2026.
   Keep existing display/visibility rules and profile layouts. */
.topbar {
  --cc-toolbar-size: 40px;
  --cc-toolbar-radius: 12px;
  --cc-toolbar-accent: var(--primary-2, var(--primary, var(--accent, var(--teal, #7850ad))));
  --cc-toolbar-panel: var(--panel, var(--surface, #fff));
}
html .topbar :is(.topbar-actions, .top-actions) :is(#cc-editor-launch, #cc-help-launch, #cc-rail-toggle, button.icon-button, button.top-icon-button, button.top-icon, button.cc-feedback-entry, button.language-toggle, button.language-control, button.language, button.language-trigger, button.cc-language-toggle, button.cc-language-trigger, button.voice-mode-toggle, button.voice-control, button.real-voice-toggle, button.theme-toggle, #voiceModeTop, #voiceToggle) {
  box-sizing: border-box;
  height: var(--cc-toolbar-size) !important;
  min-height: var(--cc-toolbar-size) !important;
  width: var(--cc-toolbar-size) !important;
  min-width: var(--cc-toolbar-size) !important;
  flex: 0 0 var(--cc-toolbar-size);
  margin: 0;
  padding: 0;
  border: 1px solid var(--line, var(--border, #dce2eb)) !important;
  border-radius: var(--cc-toolbar-radius) !important;
  background: var(--cc-toolbar-panel) !important;
  box-shadow: none;
  opacity: 1;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
html .topbar :is(.topbar-actions, .top-actions) :is(#languageToggle, button.language-toggle, button.language-control, button.language, button.language-trigger, button.cc-language-toggle, button.cc-language-trigger) {
  width: 70px !important;
  min-width: 70px !important;
  flex-basis: 70px;
  padding-inline: 8px;
}
html .topbar :is(.topbar-actions, .top-actions) :is(#cc-editor-launch, #cc-help-launch) { color: var(--cc-toolbar-accent); }
html .topbar :is(.topbar-actions, .top-actions) :is(#cc-editor-launch, #cc-help-launch) svg { width: 19px; height: 19px; stroke-width: 1.75; }
html .topbar :is(.topbar-actions, .top-actions) :is(.profile, .profile-button, .top-profile, .user-mini, .user-button, .role-switcher-button, .role-trigger) { transition: transform 160ms ease, background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html .topbar :is(.topbar-actions, .top-actions) :is(#cc-editor-launch, #cc-help-launch, #cc-rail-toggle, button.icon-button, button.top-icon-button, button.top-icon, button.cc-feedback-entry, button.language-toggle, button.language-control, button.language, button.language-trigger, button.cc-language-toggle, button.cc-language-trigger, button.voice-mode-toggle, button.voice-control, button.real-voice-toggle, button.theme-toggle, #voiceModeTop, #voiceToggle):not(:disabled):not([aria-disabled="true"]):hover {
    transform: translateY(-2px) !important;
    border-color: var(--cc-toolbar-accent) !important;
    background: var(--primary-soft, color-mix(in srgb, var(--cc-toolbar-accent) 10%, var(--cc-toolbar-panel))) !important;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--cc-toolbar-accent) 12%, transparent);
  }
  html .topbar :is(.topbar-actions, .top-actions) :is(.profile, .profile-button, .top-profile, .user-mini, .user-button, .role-switcher-button, .role-trigger):not(:disabled):not([aria-disabled="true"]):hover { transform: translateY(-2px); }
}
html .topbar :is(.topbar-actions, .top-actions) :is(#cc-editor-launch, #cc-help-launch, #cc-rail-toggle, button.icon-button, button.top-icon-button, button.top-icon, button.cc-feedback-entry, button.language-toggle, button.language-control, button.language, button.language-trigger, button.cc-language-toggle, button.cc-language-trigger, button.voice-mode-toggle, button.voice-control, button.real-voice-toggle, button.theme-toggle, #voiceModeTop, #voiceToggle):focus-visible { outline: 2px solid var(--cc-toolbar-accent); outline-offset: 3px; }
html .topbar :is(.topbar-actions, .top-actions) :is(#cc-editor-launch, #cc-help-launch, #cc-rail-toggle, button.icon-button, button.top-icon-button, button.top-icon, button.cc-feedback-entry, button.language-toggle, button.language-control, button.language, button.language-trigger, button.cc-language-toggle, button.cc-language-trigger, button.voice-mode-toggle, button.voice-control, button.real-voice-toggle, button.theme-toggle, #voiceModeTop, #voiceToggle):is(:disabled, [aria-disabled="true"]) { transform: none !important; box-shadow: none; }
@media (max-width: 650px) {
  .topbar { --cc-toolbar-size: 32px; --cc-toolbar-radius: 10px; }
  html .topbar :is(.topbar-actions, .top-actions) :is(#languageToggle, button.language-toggle, button.language-control, button.language, button.language-trigger, button.cc-language-toggle, button.cc-language-trigger) { width: 50px !important; min-width: 50px !important; flex-basis: 50px; padding-inline: 5px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html .topbar :is(.topbar-actions, .top-actions) :is(#cc-editor-launch, #cc-help-launch, #cc-rail-toggle, button.icon-button, button.top-icon-button, button.top-icon, button.cc-feedback-entry, button.language-toggle, button.language-control, button.language, button.language-trigger, button.cc-language-toggle, button.cc-language-trigger, button.voice-mode-toggle, button.voice-control, button.real-voice-toggle, button.theme-toggle, #voiceModeTop, #voiceToggle), html .topbar :is(.topbar-actions, .top-actions) :is(.profile, .profile-button, .top-profile, .user-mini, .user-button, .role-switcher-button, .role-trigger) { transition: none !important; transform: none !important; animation: none !important; }
}

html .topbar :is(.topbar-actions, .top-actions) :is(.profile, .profile-button, .top-profile, .user-mini, .user-button, .role-switcher-button, .role-trigger):focus-visible {outline:2px solid var(--cc-toolbar-accent);outline-offset:3px}

/* Match the language wrapper to its trigger, without reviving hidden controls. */
html .topbar :is(.topbar-actions, .top-actions) .cc-language-standard {width:70px!important;min-width:70px!important;max-width:70px!important;height:40px!important;flex:0 0 70px}
@media(max-width:650px){
  html .topbar :is(.topbar-actions, .top-actions) .cc-language-standard {width:50px!important;min-width:50px!important;max-width:50px!important;height:32px!important;flex-basis:50px}
  /* Legacy shell rules hid every span, including the profile avatar. */
  html .topbar :is(.topbar-actions, .top-actions) .profile:has(> :is(.avatar,.person-photo)) {width:40px;min-width:40px;flex:0 0 40px;padding:2px!important;border-left:0;justify-content:center}
  html .topbar :is(.topbar-actions, .top-actions) .profile > :is(.avatar,.person-photo) {display:grid!important;width:32px!important;height:32px!important;min-width:32px;flex:0 0 32px}
}
