/* Single source of truth: header/nav actions position + icon sizing */
html body .lg-header{ position:relative !important; padding-right:96px !important; }
html body .lg-head-actions{
  position:absolute !important;
  top:12px !important;
  right:14px !important;
  bottom:auto !important;
  left:auto !important;
  margin:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  z-index:20 !important;
}
html body .lg-head-actions .icon-btn,
html body #theme_toggle,
html body #nav_toggle{
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  min-height:38px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:static !important;
  border-radius:10px !important;
}
@media (max-width:700px){
  html body .lg-header{ padding-right:88px !important; }
  html body .lg-head-actions{ top:10px !important; right:10px !important; }
}

/* icon glyph lock (override per-page JS/text inconsistencies) */
#theme_toggle{ font-size:0 !important; line-height:1 !important; }
#theme_toggle::before{ display:inline-block; font-size:18px; line-height:1; }
html[data-theme='dark'] #theme_toggle::before{ content:'☀'; }
html[data-theme='light'] #theme_toggle::before{ content:'☾'; }

/* NAV TOGGLE POLICY: desktop off, mobile on */
#nav_toggle{ display:none !important; }
@media (max-width: 980px){
  #nav_toggle{ display:inline-flex !important; }
}
/* Ensure desktop nav stays visible */
@media (min-width: 981px){
  .lg-nav{ display:flex !important; }
}


/* === FINAL CANONICAL HEADER/NAV LOCK === */
html body .lg-header{ position:relative !important; padding-right:96px !important; }
html body .lg-head-actions{ position:absolute !important; top:12px !important; right:14px !important; bottom:auto !important; left:auto !important; display:inline-flex !important; gap:8px !important; align-items:center !important; z-index:20 !important; }
html body #theme_toggle, html body #nav_toggle{ width:38px !important; height:38px !important; min-width:38px !important; min-height:38px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; }
#theme_toggle{ font-size:0 !important; line-height:1 !important; }
#theme_toggle::before{ display:inline-block; font-size:18px; line-height:1; }
html[data-theme='dark'] #theme_toggle::before{ content:'☀'; }
html[data-theme='light'] #theme_toggle::before{ content:'☾'; }
#nav_toggle{ display:none !important; }
@media (max-width:980px){
  html body .lg-header{ padding-right:88px !important; }
  html body .lg-head-actions{ top:10px !important; right:10px !important; }
  #nav_toggle{ display:inline-flex !important; }
}
@media (min-width:981px){ .lg-nav{ display:flex !important; } }
