/* Shared site navigation is scoped; editor and host controls retain their own theme. */
body[data-site-navigation] { --site-header-height: 84px; padding-top: var(--site-header-height); box-sizing: border-box; }
body[data-site-navigation] > .site-header.site-global-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  transform: none; animation: none;
  width: 100%; max-width: none; min-height: 0;
  height: var(--site-header-height, 84px); margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px clamp(16px, 2.5vw, 42px); box-sizing: border-box;
  background: #193b56; border: 0; border-bottom: 1px solid #56718b;
  color: #e8f4ff; font: 650 16px/1.3 "Segoe UI", Arial, sans-serif;
  box-shadow: 0 3px 14px #091c3025;
}
.site-page-actions { display: flex; justify-content: flex-end; padding: 12px clamp(16px, 2.5vw, 42px); }
.site-page-actions .brand, .site-page-actions [data-site-home-button], .site-page-actions a[href="/portal"], .site-page-actions #logout { display: none !important; }
.site-page-actions:has(#refresh.hidden) { display: none; }
.site-global-header .brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: #fff; font-size: 23px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.site-global-header .brand img { width: 54px; height: 54px; object-fit: contain; }
.site-global-header #site-nav { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 24px); margin: 0; }
.site-global-header #site-nav > a { color: #c6d8ea; text-decoration: none; font-weight: 700; white-space: nowrap; }
.site-global-header .auth-nav, .site-global-header .desktop-auth { display: flex; align-items: center; gap: 14px; }
.site-global-header .nav-login { color: #c6d8ea; font-size: 16px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.site-global-header .nav-editor { color: #fff; }
.site-global-header .nav-user { min-height: 42px; font-size: 13px; }
.site-global-header .nav-logout, .site-global-header .mobile-auth summary {
  min-height: 44px; padding: 10px 14px; border: 1px solid #365d88; border-radius: 10px;
  background: #102b49; color: #e8f4ff; box-shadow: none;
  font: 750 16px/1.2 "Segoe UI", Arial, sans-serif; cursor: pointer;
}
.site-global-header .nav-logout { background: #102b49 !important; color: #e8f4ff !important; border: 1px solid #365d88 !important; box-shadow: none !important; }
.site-global-header #site-nav a:hover { color: #fff; }
.site-global-header .mobile-auth-menu a { color: #e8f4ff; font-size: 15px; font-weight: 700; }
.site-global-header .mobile-auth-menu .nav-logout { width: 100%; text-align: left; background: transparent !important; border: 0 !important; }
.site-global-header .mobile-auth-menu { z-index: 810; }
.site-global-header .nav-account-controls { display:inline-flex;align-items:center;gap:8px;min-width:0;flex:none; }
.site-global-header .nav-account-controls .nav-user { display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;height:34px;min-height:34px;max-width:150px;padding:0 12px 0 5px;border:0;border-radius:20px;background:#284961;color:#f1f6ff;font-size:15px;line-height:1.2; }
.site-global-header .nav-account-controls .nav-user strong { min-width:0;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700; }
.site-global-header .nav-user-avatar { display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:#31536b;color:#ffd45a;font-size:13px;font-weight:700; }
.site-global-header .header-locale-switch { display:inline-flex;align-items:center;flex:none;gap:2px;box-sizing:border-box;height:34px;padding:3px;border:1px solid #31536b;border-radius:20px;background:#102d45;color:#f1f6ff; }
.site-global-header .mobile-auth-menu .nav-account-controls { display:flex;width:100%;gap:8px;padding:4px 0; }
.site-global-header .mobile-auth-menu .nav-user { flex:1 1 0;max-width:none;min-width:0;margin:0; }
.site-global-header .mobile-auth-menu .nav-user strong { max-width:none; }
.site-global-header .mobile-auth-menu .header-locale-switch { justify-self:end;margin-top:12px; }
@layer button-layout-details {
  .site-global-header .nav-account-controls .nav-logout,
  .site-global-header .header-locale-switch>button {
    display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
    width:auto!important;min-width:0!important;max-width:none!important;height:34px!important;min-height:34px!important;max-height:34px!important;
    flex:none!important;margin:0!important;padding:0 11px!important;border:1px solid #36566d!important;border-radius:20px!important;
    background:#23445c!important;color:#f1f6ff!important;box-shadow:none!important;font-family:inherit!important;font-size:15px!important;font-weight:700!important;line-height:1.2!important;white-space:nowrap!important;
  }
  .site-global-header .nav-account-controls .nav-logout svg { width:16px!important;height:16px!important;flex:0 0 16px!important; }
  .site-global-header .nav-account-controls .nav-logout:hover { background:#31536b!important; }
  .site-global-header .header-locale-switch>button { min-width:31px!important;height:26px!important;min-height:26px!important;max-height:26px!important;padding:0 6px!important;border:0!important;border-radius:16px!important;background:transparent!important;color:#adc4d7!important; }
  .site-global-header .header-locale-switch>button[aria-pressed=true] { background:#35556d!important;color:#ffd45a!important; }
  .site-global-header .header-locale-switch>button:hover { background:#2b4c64!important; }
  @media(min-width:1251px) and (max-width:1400px) {
    .site-global-header .desktop-auth .nav-login { width:auto!important;min-width:0!important;max-width:none!important;flex:none!important;padding-inline:10px!important;font-size:14px!important;white-space:nowrap!important; }
    .site-global-header .desktop-auth .nav-login :is(.button-label,i18n-text) { white-space:nowrap!important; }
  }
  @media(pointer:coarse) {
    .site-global-header .nav-account-controls .nav-logout { height:44px!important;min-height:44px!important;max-height:44px!important; }
    .site-global-header .header-locale-switch>button { min-width:40px!important;height:36px!important;min-height:36px!important;max-height:36px!important; }
  }
}
@media(min-width:1251px) and (max-width:1400px) {
  body[data-site-navigation] > .site-header.site-global-header { gap:12px; }
  .site-global-header #site-nav { gap:10px; }
  .site-global-header .desktop-auth { gap:8px; }
}
@media(pointer:coarse) {
  .site-global-header .nav-account-controls .nav-user { height:44px;min-height:44px; }
  .site-global-header .header-locale-switch { height:44px; }
}
body[data-site-navigation].question-studio .wrap { height: calc(100dvh - var(--site-header-height)); min-height: 0; }
body[data-site-navigation].editor-workspace .ux-sidebar { top: var(--site-header-height); }
html.site-navigation-embedded .site-global-header { display: none; }
html.site-navigation-embedded body[data-site-navigation] { --site-header-height: 0px; padding-top: 0; }
@media(max-width:1250px) {
  body[data-site-navigation] { --site-header-height: 72px; }
  .site-global-header #site-nav > a, .site-global-header .desktop-auth { display: none; }
  .site-global-header .mobile-auth { display: block; }
  .site-global-header .brand { font-size: 20px; }
  .site-global-header .brand img { width: 46px; height: 46px; }
}
@media(max-width:420px) {
  .site-header.site-global-header { padding-inline: 12px; gap: 10px; }
  .site-global-header .brand { font-size: 18px; gap: 7px; }
  .site-global-header .brand img { width: 40px; height: 40px; }
}
