/* Shared navigation, isolated from legacy .nav-* component styles. */
:root { --site-header-height:68px; }
.site-header {
  --sh-bg:var(--ui-surface); --sh-fg:var(--ui-text); --sh-muted:var(--ui-muted); --sh-line:var(--ui-line); --sh-hover:var(--ui-hover); --sh-accent:var(--ui-accent); --sh-active:var(--ui-selected);
  position:sticky; top:0; z-index:1000; width:100%; height:var(--site-header-height); flex-shrink:0;
  background:var(--sh-bg); color:var(--sh-fg); border-bottom:1px solid var(--sh-line);
  font:500 14px/1.4 var(--font); isolation:isolate;
}
.site-header *, .site-header *::before, .site-header *::after { box-sizing:border-box; }
.site-header [hidden], .site-context-close[hidden] { display:none; }
.site-header a { color:inherit; text-decoration:none; }
.site-header button { font:inherit; color:inherit; cursor:pointer; box-shadow:none; text-transform:none; letter-spacing:normal; }
.site-header a:focus-visible, .site-header button:focus-visible, .site-context-close:focus-visible { outline:3px solid var(--ui-focus); outline-offset:3px; }
.site-header .sh-inner { max-width:1440px; height:100%; padding:0 24px; margin:0 auto; display:flex; align-items:center; gap:24px; }
.site-header .sh-brand { display:inline-flex; align-items:center; gap:9px; flex-shrink:0; font-size:19px; font-weight:800; letter-spacing:-.5px; }
.sh-mark { display:grid; place-items:center; width:34px; height:38px; background:var(--ui-brand); color:var(--ui-on-brand); border-radius:11px; }
.sh-brand-accent { color:var(--sh-accent); }
.sh-brand small { font:500 10px/1 var(--font); margin-left:5px; color:var(--sh-accent); }
.site-header .sh-nav { position:static; inset:auto; width:auto; height:auto; min-height:0; padding:0; margin:0; border:0; box-shadow:none; background:transparent; display:flex; align-items:center; gap:12px; flex:1; justify-content:space-between; }
.sh-primary { display:flex; align-items:center; gap:2px; }
.site-header .sh-link { display:inline-flex; align-items:center; justify-content:space-between; gap:5px; padding:10px 8px; border:0; border-radius:9px; background:transparent; white-space:nowrap; font-size:14px; font-weight:600; min-height:40px; }
.sh-link:hover, .sh-link[aria-expanded="true"], .sh-link[aria-current] { background:var(--sh-active); color:var(--sh-accent); }
.sh-disclosure { position:relative; }
.sh-dropdown { position:absolute; top:calc(100% + 8px); left:0; width:254px; padding:8px; border:1px solid var(--sh-line); border-radius:16px; background:var(--sh-bg); box-shadow:0 16px 42px #0002; }
.sh-dropdown a { display:block; padding:12px; border-radius:9px; line-height:1.5; }
.sh-dropdown a:hover { background:var(--sh-hover); }
.sh-dropdown .sh-overview { border-top:1px solid var(--sh-line); border-radius:0 0 9px 9px; margin-top:5px; color:var(--sh-accent); }
.site-header .sh-actions { display:flex; align-items:center; gap:8px; margin:0; flex-shrink:0; }
.sh-theme, .sh-sign-in, .sh-account, .sh-context-toggle, .sh-menu-toggle { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:8px 11px; border:1px solid var(--sh-line); border-radius:11px; background:var(--sh-bg); white-space:nowrap; }
.sh-theme { width:40px; padding:8px; }
.sh-theme:hover, .sh-sign-in:hover, .sh-account:hover, .sh-context-toggle:hover, .sh-menu-toggle:hover { background:var(--sh-hover); }
.sh-languages { display:flex; gap:1px; padding:3px; border:1px solid var(--sh-line); border-radius:20px; }
.sh-languages a { padding:6px 7px; border-radius:16px; font-size:11px; font-weight:700; }
.sh-languages a[aria-current] { color:var(--sh-accent); background:var(--sh-active); }
.sh-avatar { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font-size:12px; background:var(--sh-hover); }
.sh-avatar img { width:24px; height:24px; border-radius:50%; }
.sh-account { font-size:12px; padding:6px 9px; }
.sh-logout { font-size:12px; color:var(--sh-muted); padding:8px 0; }
.site-header .sh-cta { background:var(--ui-brand); color:var(--ui-on-brand); border-radius:11px; padding:12px 14px; font-size:12px; font-weight:750; white-space:nowrap; }
.site-header .sh-mobile-controls, .site-context-close { display:none; }
.site-drawer-scrim { position:fixed; inset:var(--site-header-height) 0 0; z-index:990; background:#0008; }
.site-drawer-scrim[hidden] { display:none; }
.analyst-site-header + .app-shell { min-height:calc(100vh - var(--site-header-height)); }
.analyst-site-header + .app-shell > .sidebar { top:var(--site-header-height); height:calc(100vh - var(--site-header-height)); }
@media (max-width:1199px) {
  .site-header .sh-inner { padding:0 16px; justify-content:space-between; gap:12px; }
  .site-header .sh-mobile-controls { display:flex; align-items:center; gap:8px; }
  .site-header .sh-menu-toggle { width:44px; min-height:44px; padding:8px; }
  .site-header .sh-context-toggle { min-height:44px; }
  .site-header .sh-nav { display:none; position:fixed; top:var(--site-header-height); right:0; bottom:0; width:min(420px,100%); padding:20px; background:var(--sh-bg); overflow:auto; overscroll-behavior:contain; border-left:1px solid var(--sh-line); flex-direction:column; align-items:stretch; justify-content:flex-start; gap:24px; }
  .site-header[data-menu-open] .sh-nav { display:flex; }
  .sh-primary { flex-direction:column; align-items:stretch; gap:4px; }
  .site-header .sh-link { width:100%; min-height:48px; padding:12px; font-size:16px; }
  .sh-dropdown { position:static; width:100%; box-shadow:none; border:0; border-left:2px solid var(--sh-line); border-radius:0; margin:4px 0 8px 12px; padding:0 8px; max-width:calc(100% - 12px); }
  .site-header .sh-actions { flex-wrap:wrap; gap:12px; border-top:1px solid var(--sh-line); padding-top:20px; }
  .sh-languages a { min-width:40px; text-align:center; padding:10px; }
  .sh-account, .sh-sign-in, .sh-cta { min-height:44px; }
  .site-header .sh-cta { width:100%; text-align:center; font-size:14px; }
  .site-header .sh-account { font-size:14px; }
  .site-header .sh-logout { padding:12px; }
  body .site-context-panel { display:none; position:fixed; z-index:1001; inset:var(--site-header-height) auto 0 0; width:min(320px,calc(100vw - 32px)); max-width:none; height:calc(100dvh - var(--site-header-height)); margin:0; padding:16px; overflow:auto; overscroll-behavior:contain; transform:none; visibility:visible; box-sizing:border-box; box-shadow:10px 0 40px #0003; }
  body .site-context-panel[data-context-open] { display:flex; flex-direction:column; align-items:stretch; background:var(--ui-surface); color:var(--ui-text); }
  [data-theme="dark"] body .site-context-panel[data-context-open],
  body .sidebar.site-context-panel[data-context-open] { background:var(--ui-surface); color:var(--ui-text); }
  .site-context-panel .site-context-close { display:flex; align-items:center; justify-content:space-between; width:100%; flex-shrink:0; padding:12px; margin:0 0 16px; min-height:44px; border:1px solid currentColor; border-radius:10px; color:inherit; font:600 14px/1.4 var(--font); background:transparent; cursor:pointer; }
  .site-context-panel .workspace-nav, .site-context-panel .project-nav { display:block; }
  .site-context-panel .nav-link, .site-context-panel .project-switch { font-size:14px; min-height:44px; }
  .site-context-panel .nav-link { justify-content:flex-start; gap:12px; }
  .site-context-panel .workspace-nav a, .site-context-panel .project-nav > a { justify-content:flex-start; }
  .site-context-panel .nav-link [data-i18n], .site-context-panel .project-info, .site-context-panel .sidebar-section, .site-context-panel .sidebar-logo, .site-context-panel .sidebar-user-info, .site-context-panel .project-caret { display:revert; }
  .site-context-panel .nav-badge { display:inline-flex; }
  .site-context-panel .workspace-nav p, .site-context-panel .project-nav > p,
  .site-context-panel .workspace-nav a b, .site-context-panel .project-nav > a b,
  .site-context-panel .project-switch > span:nth-child(2), .site-context-panel .project-switch i,
  .site-context-panel .sidebar-user div, .site-context-panel .workspace-nav em { display:revert; }
  .site-context-panel .sidebar-user { display:grid; }
  .site-context-panel.pp-sidebar > .pp-project, .site-context-panel.pp-sidebar > .pp-protected,
  .site-context-panel.pp-sidebar > .pp-nav-label { display:block; }
  .analyst-site-header + .app-shell { display:block; grid-template-columns:1fr; }
  .analyst-site-header + .app-shell > .main { margin-left:0; width:100%; }
  body .pp-shell { display:block; }
  body .pp-shell > .pp-body { min-width:0; margin-left:0; }
  body .pp-sidebar.site-context-panel .pp-nav-link { display:flex; white-space:normal; }
  body .pp-sidebar.site-context-panel .pp-nav-link,
  body .pp-sidebar.site-context-panel .pp-start-module { width:100%; min-height:44px; font-size:15px; text-align:left; }
}
@media (max-width:380px) {
  .site-header .sh-inner { padding:0 12px; gap:8px; }
  .sh-brand small { display:none; }
  .site-header .sh-brand { font-size:17px; gap:7px; }
  .sh-context-toggle { padding:8px; }
}
