/* One navigation layout at every width; brand and actions have distinct anchors. */
.topbar .header-menu {position:relative;order:0;flex:none}
.topbar .header-menu > summary {display:flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 18px;border:1px solid var(--ink);border-radius:999px;background:var(--ink);color:var(--paper);font-size:12px;line-height:1.4;list-style:none;cursor:pointer;touch-action:manipulation}
.topbar :is(.header-menu,.brand-menu) > summary::-webkit-details-marker {display:none}
.topbar .header-menu > summary .symbol-svg {width:16px;height:16px;transition:transform .2s ease;transform:rotate(0)}
.topbar .header-menu[data-expanded=true] > summary .symbol-svg {transform:rotate(45deg)}
.topbar .header-menu > .header-menu-content,.topbar .brand-menu > .brand-menu-content {position:absolute;inset:auto 0 auto auto;top:calc(100% + 12px);z-index:80;display:flex;flex-direction:column;align-items:stretch;gap:0;width:280px;max-width:calc(100vw - 32px);padding:10px 18px;border:1px solid var(--line);border-radius:18px;background:var(--paper);box-shadow:0 18px 48px #20201e1a;transform-origin:top right;max-height:calc(100dvh - 150px);overflow:auto;overscroll-behavior:contain}
.topbar :is(.header-menu,.brand-menu):not([open]) > :not(summary) {display:none}
.topbar .menu-identity {padding:12px 10px 16px;display:grid;gap:5px;overflow-wrap:anywhere}
.topbar .menu-caption {font-size:10px;color:var(--muted)}
.topbar .menu-identity #identity {display:block;padding:0;border:0;order:0;font-size:14px;font-weight:600;color:var(--ink);line-height:1.6;max-width:none}
.topbar .menu-group {display:flex;flex-direction:column;align-items:stretch;gap:0;order:0;margin:0;padding:6px 0;border:0;border-top:1px solid var(--line)}
.topbar .header-menu .nav-link {width:100%;display:flex;align-items:center;min-height:44px;padding:11px 10px;border:0;border-radius:8px;text-align:left;text-decoration:none;white-space:normal;font-size:13px;line-height:1.6;color:var(--ink);background:transparent}
.topbar .header-menu .nav-link.active:after {display:none}
.topbar .header-menu .nav-link:hover,.topbar .brand-menu-content button:hover {background:var(--soft)}
.topbar .header-menu .nav-link:disabled {color:var(--muted);cursor:wait}
.topbar :is(button,a,summary):focus-visible {outline:2px solid var(--green);outline-offset:4px}
.topbar .brand-menu {position:relative;margin-right:auto;min-width:0}
.topbar .brand-menu > summary {display:flex;align-items:center;justify-content:center;min-height:44px;max-width:220px;padding:9px 18px;border:1px solid var(--line);border-radius:999px;background:var(--paper);color:var(--ink);font-size:12px;font-weight:500;line-height:1.6;text-align:center;list-style:none;cursor:pointer;touch-action:manipulation}
.topbar .brand-menu > summary[aria-disabled=true] {opacity:.5;cursor:wait}
.topbar #brandMenuLabel {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar .brand-menu > .brand-menu-content {left:0;right:auto;transform-origin:top left;width:250px}
.topbar .brand-menu-content button {display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px;width:100%;padding:12px 10px;border:0;border-radius:8px;background:transparent;color:var(--ink);text-align:left;font-size:13px;line-height:1.6}
.topbar .brand-menu-content button + button {border-top:1px solid var(--line);border-radius:0}
.topbar .brand-menu-content button[aria-current=true] {font-weight:700}
.topbar .brand-menu-content button[aria-current=true]:after {content:'✓';color:var(--green)}
#brandField {display:none}
.topbar .header-actions {margin-left:auto;gap:18px}
.topbar .wordmark {flex:none}
.topbar {gap:22px}
@media(min-width:821px) {#workspaceHeading {grid-template-columns:1fr}#workspaceHeading .intro-main {max-width:800px}}
@media(max-width:820px) {
 body > .topbar {display:flex;flex-wrap:nowrap;padding:10px 12px;gap:8px;min-height:64px}
 .topbar .wordmark {min-width:0;gap:7px;margin-right:4px}
 .topbar .wordmark .key-scene.brand-mark {display:none}
 .topbar .wordmark .slow-lock-wordmark {width:clamp(88px,calc(100vw - 246px),150px)}
 .topbar .brand-menu {margin:0 auto 0 0;max-width:calc(100vw - 192px)}
 .topbar .brand-menu > summary {min-height:44px;padding:9px 8px;max-width:100%;font-size:10px}
 .topbar .brand-menu > .brand-menu-content {right:0;left:auto;transform-origin:top right}
 .topbar .header-actions {flex:none;gap:4px;margin:0}
 .topbar .motion-toggle {display:inline-flex;align-items:center;justify-content:center;gap:3px;min-width:42px;min-height:44px;padding:8px 0;font-size:10px}
 .topbar .motion-toggle .symbol-svg {width:12px;height:12px}
 .topbar .header-menu > summary {font-size:10px;padding:10px 9px;min-width:44px}
 .topbar .header-menu > summary .symbol-svg {display:none}
 .provider-workspace > .mode-notice,.provider-workspace > #aguard-notice[data-quiet=true]:not(.error) {display:none}
 .provider-workspace .inventory-heading {margin-top:20px}
 .provider-workspace .inventory-heading .fine {max-width:none}
}
@media(prefers-reduced-motion:reduce) {.topbar .header-menu > summary .symbol-svg {transition:none}}
body:not(.signed-in) .topbar .workspace-nav{display:none}

.topbar .header-actions .motion-toggle{order:0}
.topbar .header-actions .header-menu{order:1}
@media(max-width:820px){
 .topbar :is(.brand-menu,.header-menu) > summary{position:relative;isolation:isolate;background:transparent;border-color:transparent}
 .topbar :is(.brand-menu,.header-menu) > summary:before{content:'';position:absolute;inset:6px 0;z-index:-1;border:1px solid var(--line);border-radius:999px;background:var(--paper);pointer-events:none}
 .topbar .header-menu > summary:before{background:var(--ink);border-color:var(--ink)}
}
