/* Shared single-row header. shell.js measures real labels after fonts and
   permissions load, choosing the least condensed presentation that fits. */
.global-bar{position:relative;z-index:20;background:var(--surface);border-bottom:1px solid var(--rule);font-family:var(--f-ui);container-type:inline-size}
.global-inner{display:flex;align-items:center;flex-wrap:nowrap;gap:20px;margin:0 auto;padding:8px var(--page-gutter,24px);min-height:72px;box-sizing:border-box}
.global-brand{display:flex;align-items:center;gap:16px;color:var(--ink);text-decoration:none;min-height:44px;flex:none;border-radius:var(--r-md)}
.global-brand .church-logo{width:140px;height:auto;aspect-ratio:385/135;margin:0}
.global-brand-mini{display:none;align-items:center;justify-content:center;width:44px;height:44px;flex:none}
.global-brand-mini img{display:block;width:auto;height:42px}
:root[data-theme=dark] .global-brand-mini img{filter:brightness(0) invert(1)}
.global-brand-title{border-left:1px solid var(--rule);padding-left:16px;white-space:nowrap}
.global-brand-title strong{font:600 1.5rem/1.15 var(--f-display);color:var(--ink)}
.global-nav{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:4px;flex:1 0 auto;min-width:max-content}
.global-nav a{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;flex:none;min-width:44px;min-height:44px;box-sizing:border-box;margin:0;padding:10px 12px;border:0;border-radius:var(--r-md);color:var(--muted);text-decoration:none;font-size:.875rem;font-weight:600;line-height:1.4;white-space:nowrap}
.global-nav a[hidden]{display:none}
.global-nav a:hover{color:var(--ink);background:var(--surface-2)}
.global-nav a[aria-current=page]{color:var(--brand);background:var(--sel-soft)}
.global-nav .label-short{display:none}
.global-nav .portal-icon{color:currentColor;width:20px;height:20px}
.global-account{position:relative;flex:none;margin-left:auto;color:var(--ink);font-size:.875rem}
.global-account-toggle{display:flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:8px;box-sizing:border-box;border-radius:var(--r-md);list-style:none;cursor:pointer;white-space:nowrap}
.global-account-toggle::-webkit-details-marker{display:none}
.global-account-toggle:hover,.global-account[open] .global-account-toggle{background:var(--sel-soft);color:var(--brand)}
.global-account-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:2;width:240px;max-width:calc(100vw - 16px);box-sizing:border-box;padding:8px;background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-md);box-shadow:0 8px 24px #0002}
.global-account .global-role{display:block;padding:8px 12px;color:var(--muted);font-size:.75rem;white-space:normal;overflow-wrap:anywhere}
.global-account-menu .global-profile,.global-account-menu .global-signout,.global-account-menu .theme-toggle{display:flex;align-items:center;justify-content:flex-start;gap:8px;box-sizing:border-box;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:var(--r-md);background:transparent;color:var(--ink);font:600 .875rem/1.4 var(--f-ui);text-decoration:none;text-align:left;white-space:normal;cursor:pointer}
.global-account-menu .global-signout[hidden]{display:none}
.global-account-menu :is(a,button):hover{background:var(--sel-soft);color:var(--brand)}
.global-signout:disabled{cursor:progress;opacity:.6}
.global-bar :focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.global-nav a:focus-visible{outline-offset:-3px}
/* Full names remain available on hover and keyboard focus when labels condense. */
.global-nav a::after{content:attr(aria-label);position:absolute;top:100%;left:50%;transform:translateX(-50%);z-index:2;padding:6px 9px;border:1px solid var(--rule);border-radius:var(--r-md);background:var(--surface);color:var(--ink);font-size:12px;font-weight:500;white-space:nowrap;display:none}
.global-bar:not([data-tooltip-dismissed]) .global-nav a:is(:hover,:focus-visible)::after{display:block}
.global-bar[data-header-density=full] .global-nav a::after{display:none}
/* Hide secondary branding before shortening the navigation. */
.global-bar[data-header-density]:not([data-header-density=full]) .global-brand-title,
.global-bar[data-header-density]:not([data-header-density=full]) .global-account-label{display:none}
.global-bar:is([data-header-density=compact],[data-header-density=active],[data-header-density=icons]) .label-long{display:none}
.global-bar:is([data-header-density=compact],[data-header-density=active],[data-header-density=icons]) .label-short{display:inline}
.global-bar:is([data-header-density=compact],[data-header-density=active]) .global-inner{gap:12px;padding-inline:12px}
.global-bar:is([data-header-density=compact],[data-header-density=active]) .global-brand .church-logo{width:112px}
.global-bar:is([data-header-density=compact],[data-header-density=active]) .global-nav a{padding-inline:8px;gap:6px}
.global-bar[data-header-density=active] .global-nav a:not([aria-current=page]) .global-nav-label{display:none}
/* Phones retain the real wordmark; the narrowest screens use its S-column. */
.global-bar[data-header-density=icons] .global-nav-label{display:none}
.global-bar[data-header-density=icons] .global-brand .church-logo{width:88px}
.global-bar[data-header-density=icons] .global-inner{min-height:60px;gap:3px;padding:8px 6px}
.global-bar[data-header-density=icons] .global-nav{gap:0}
.global-bar[data-header-density=icons] .global-nav a{width:44px;padding:10px}
/* First-paint / no-script fallback; measurement takes over when the shell loads. */
@container(max-width:1250px){.global-bar:not([data-header-density]) .global-brand-title,.global-bar:not([data-header-density]) .global-account-label{display:none}}
@container(max-width:900px){.global-bar:not([data-header-density]) .label-long{display:none}.global-bar:not([data-header-density]) .label-short{display:inline}.global-bar:not([data-header-density]) .global-inner{gap:8px;padding-inline:12px}.global-bar:not([data-header-density]) .global-brand .church-logo{width:112px}}
@container(max-width:740px){.global-bar:not([data-header-density]) .global-nav a:not([aria-current=page]) .global-nav-label{display:none}}
@container(max-width:540px){.global-bar:not([data-header-density]) .global-nav-label{display:none}.global-bar:not([data-header-density]) .global-brand .church-logo{width:88px}.global-bar:not([data-header-density]) .global-inner{min-height:60px;gap:3px;padding:8px 6px}.global-bar:not([data-header-density]) .global-nav{gap:0}.global-bar:not([data-header-density]) .global-nav a{width:44px;padding:10px}}
@container(max-width:369px){
 .global-bar[data-header-density=icons] .global-brand .church-logo,.global-bar:not([data-header-density]) .global-brand .church-logo{display:none}
 .global-bar[data-header-density=icons] .global-brand-mini,.global-bar:not([data-header-density]) .global-brand-mini{display:flex}
 .global-bar[data-header-density=icons] .global-inner,.global-bar:not([data-header-density]) .global-inner{gap:0}
}
@media(forced-colors:active){.global-nav a[aria-current=page]{outline:2px solid Highlight;outline-offset:-2px}}
@media print{.global-bar{display:none}}
