.sidebar-collapse{position:absolute;top:32px;right:-14px;width:28px;height:28px;padding:5px;display:grid;place-items:center;border:1px solid var(--brand-line,var(--border));border-radius:50%;background:var(--brand-panel,var(--panel));color:var(--ink);z-index:30;box-shadow:0 2px 7px #0002}
.sidebar-collapse svg{width:16px;height:16px}
.sidebar-collapse:hover{background:var(--panel-raised,var(--bg));color:var(--green)}
.sidebar-collapsed .sidebar-collapse svg{transform:rotate(180deg)}
@media(min-width:801px){
  :root.sidebar-collapsed{--sidebar:64px}
  :root.sidebar-collapsed .sidebar{padding-left:9px;padding-right:9px}
  :root.sidebar-collapsed .sidebar .brand{padding:0;justify-content:center;gap:0}
  :root.sidebar-collapsed .sidebar .ganza-symbol{width:44px;height:44px;flex-shrink:0}
  :root.sidebar-collapsed .sidebar :is(.brand-wordmark,.workspace:not(.module-toggle),.nav-caption,.nav-count,.help-card,.sidebar-footer>div){display:none}
  :root.sidebar-collapsed .sidebar .nav-item{font-size:0;justify-content:center;padding:0;height:43px;gap:0}
  :root.sidebar-collapsed .sidebar .nav-item svg{width:19px;height:19px}
  :root.sidebar-collapsed .sidebar-footer{justify-content:center;padding:16px 0}
}
@media(max-width:800px){.sidebar-collapse{display:none}}
@media print{.sidebar-collapse{display:none!important}}

/* Persistent navigation surfaces move; text and real destinations keep their semantics. */
@media(min-width:801px){
  :root .sidebar[data-sidebar-motion] > :not(.sidebar-motion-ink):not(.sidebar-collapse){z-index:1}
  :root .sidebar[data-sidebar-motion] .sidebar-motion-ink{position:absolute;z-index:0;pointer-events:none;border-radius:6px;transform-origin:0 0;background:var(--fluent-tint,color-mix(in srgb,var(--ganza-app-accent,#ffab63) 12%,var(--ganza-app-nav,#1c2530)));box-shadow:inset 3px 0 var(--ganza-app-accent,#ffab63)}
  :root .sidebar[data-sidebar-motion] .sidebar-motion-ink--module{border:1px solid color-mix(in srgb,var(--ganza-app-accent,#ffab63) 34%,var(--border));box-shadow:inset 3px 0 var(--ganza-app-accent,#ffab63)}
  :root[data-layout-effective] .sidebar[data-sidebar-motion] .nav-item.active,
  :root[data-layout-effective] .sidebar[data-sidebar-motion] .module-toggle.active,
  :root[data-layout-effective] .sidebar[data-sidebar-motion] .module-toggle[aria-expanded="true"]{background:transparent;border-color:transparent;box-shadow:none}
  :root .sidebar[data-sidebar-motion] :is(.nav-item,.module-toggle,.module-toggle strong){transition:color calc(160ms / var(--ui-motion-speed,.5)) cubic-bezier(.22,1,.36,1)}
  :root .sidebar[data-sidebar-motion] .module-toggle.active strong{color:var(--ganza-app-accent,#ffab63)}
  :root[data-layout-effective] .sidebar.ganza-navigation[data-sidebar-layout-moving]{background:transparent;border-right-color:transparent}
  .sidebar-motion-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
.sidebar-motion-surface{z-index:19;pointer-events:none;overflow:hidden}
.sidebar-motion-exit{z-index:22;pointer-events:none;user-select:none}
@media(max-width:800px){.sidebar-motion-ink,.sidebar-motion-surface,.sidebar-motion-exit{display:none!important}}
@media(prefers-reduced-motion:reduce){:root .sidebar[data-sidebar-motion] :is(.nav-item,.module-toggle,.module-toggle strong){transition:none}}
@media print{.sidebar-motion-ink,.sidebar-motion-surface,.sidebar-motion-exit{display:none!important}}

/* The highlight is clipped to the pressed button while its outer glow stays visible. */
.sidebar-module-sweep{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:-1}
.sidebar-module-sweep>span{position:absolute;inset:-80% auto -80% -65%;width:58%;opacity:0;background:linear-gradient(90deg,transparent,#ffb47548 64%,#ffd6a98c 74%,transparent)}
@media(min-width:801px){
  :root .sidebar[data-sidebar-motion] .module-toggle{position:relative;isolation:isolate}
  :root .sidebar[data-sidebar-motion] .module-toggle::before{
    content:"";position:absolute;pointer-events:none;z-index:-1;inset:0;border-radius:inherit;opacity:0;
    background:linear-gradient(90deg,#ff983f21,transparent 64%);
    box-shadow:inset 2px 0 2px #ffb77e, -4px 0 11px -3px #ff8c447a;
    transition:opacity calc(180ms / var(--ui-motion-speed,.5)) cubic-bezier(.22,1,.36,1);
  }
  :root .sidebar[data-sidebar-motion] .module-toggle:focus-visible::before{opacity:1}
  @media(hover:hover){:root .sidebar[data-sidebar-motion] .module-toggle:hover::before{opacity:1}}
  :root .sidebar[data-sidebar-motion] .module-toggle:active::before{opacity:1}
}
@media(prefers-reduced-motion:reduce){
  :root .sidebar[data-sidebar-motion] .module-toggle::before{transition:none}
  .sidebar-module-sweep{display:none}
}
@media print,(forced-colors:active){.sidebar-module-sweep{display:none}}

[data-chat-nav-typing]:not([hidden]) {display:inline-flex;align-items:center;gap:2px;flex-shrink:0;margin-inline-start:3px;color:var(--ganza-app-accent,#e68732)}
[data-chat-nav-typing] i {width:4px;height:4px;border-radius:50%;background:currentColor;animation:chat-nav-typing 1.25s ease-in-out infinite}
[data-chat-nav-typing] i:nth-child(2) {animation-delay:.14s}
[data-chat-nav-typing] i:nth-child(3) {animation-delay:.28s}
@keyframes chat-nav-typing {0%,65%,100%{opacity:.5;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}
@media(min-width:801px){.sidebar-collapsed .sidebar .nav-item:has([data-chat-nav-typing]) {position:relative}
.sidebar-collapsed .sidebar [data-chat-nav-typing]:not([hidden]) {display:inline-flex;position:absolute;bottom:5px;left:50%;transform:translateX(-50%);margin:0}}
@media(prefers-reduced-motion:reduce){[data-chat-nav-typing] i{animation:none}}
[data-chat-nav-typing] small {font-weight:500;font-family:inherit;font-size:10px;line-height:1.2;margin-inline-start:3px}
@media(min-width:801px){.sidebar-collapsed .sidebar [data-chat-nav-typing] small {display:none}}
