/* v114: one public header for index and Premium */
.site-header{
  position:relative;
  z-index:100;
  width:100%;
  height:70px !important;
  min-height:70px !important;
  padding:0 !important;
  background:#071a36 !important;
  color:#fff;
  border:0 !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
  box-shadow:0 8px 22px rgba(4,19,39,.12) !important;
}
.site-header .header-inner{
  width:min(1120px,90%) !important;
  max-width:1120px !important;
  height:70px !important;
  min-height:70px !important;
  margin:0 auto !important;
  padding:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:20px !important;
}
.site-header .brand{
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  min-width:0;
  color:#fff !important;
  text-decoration:none !important;
}
.site-header .brand img{
  width:44px !important;
  height:44px !important;
  flex:0 0 44px !important;
  border-radius:13px !important;
  border:1px solid rgba(255,255,255,.22) !important;
  object-fit:cover !important;
  box-shadow:none !important;
}
.site-header .brand-copy{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  min-width:0;
  line-height:1 !important;
}
.site-header .brand-copy strong{
  display:block !important;
  margin:0 !important;
  color:#fff !important;
  font-size:22px !important;
  line-height:1 !important;
  font-weight:900 !important;
  white-space:nowrap;
}
.site-header .brand-copy strong span{color:#44c5ff !important}
.site-header .brand-copy small{
  display:block !important;
  margin-top:5px !important;
  color:#dbe8f8 !important;
  font-size:11px !important;
  line-height:1.1 !important;
  font-weight:800 !important;
  white-space:nowrap;
}

/* Main-page text navigation stays beside the brand, while actions remain on the right. */
.site-header .public-nav{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:22px;
  margin-left:24px;
  white-space:nowrap;
}
.site-header .public-nav a{
  color:#e6f1ff !important;
  font-size:14px;
  line-height:1;
  font-weight:800;
  text-decoration:none !important;
  transition:color .2s,transform .2s;
}
.site-header .public-nav a:hover{
  color:#44c5ff !important;
  transform:translateY(-1px);
}
.site-header .public-nav + .header-actions{
  margin-left:auto !important;
}
.site-header .header-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:9px !important;
  margin:0 !important;
}
.site-header .header-actions .icon-button,
.site-header .header-actions .theme-toggle{
  width:40px !important;
  min-width:40px !important;
  height:40px !important;
  min-height:40px !important;
  padding:0 !important;
  flex:0 0 40px !important;
  display:grid !important;
  place-items:center !important;
  border:1px solid #28476f !important;
  border-radius:12px !important;
  background:#142f54 !important;
  color:#fff !important;
  box-shadow:none !important;
  line-height:1 !important;
  cursor:pointer;
  transition:background .2s,border-color .2s,transform .2s;
}
.site-header .header-actions .icon-button:hover,
.site-header .header-actions .theme-toggle:hover{
  transform:translateY(-1px);
  background:#1a3d69 !important;
  border-color:#4aa8ff !important;
}
.site-header .header-actions .icon-button svg{
  width:20px !important;
  height:20px !important;
  fill:currentColor;
}
.site-header .header-actions .theme-toggle{font-size:18px !important}

/* The public header remains dark in both page themes; buttons therefore stay dark too. */
html[data-theme="light"] .site-header,
html[data-theme="dark"] .site-header,
body.dark-theme .site-header{background:#071a36 !important}
html[data-theme="light"] .site-header .icon-button,
html[data-theme="light"] .site-header .theme-toggle,
html[data-theme="dark"] .site-header .icon-button,
html[data-theme="dark"] .site-header .theme-toggle,
body.dark-theme .site-header .icon-button,
body.dark-theme .site-header .theme-toggle{
  background:#142f54 !important;
  color:#fff !important;
  border-color:#28476f !important;
}

/* Premium content begins directly below the shared header. */
.premium-page{
  padding-top:16px !important;
}
.premium-page .premium-hero{
  padding-top:4px !important;
  padding-bottom:18px !important;
}

/* Index uses the same non-fixed header, so its hero must not reserve old navbar space. */
.home-page .hero{
  padding-top:56px !important;
}

@media(max-width:960px){
  .site-header .public-nav{display:none !important}
}

@media(max-width:640px){
  .site-header,
  .site-header .header-inner{
    height:62px !important;
    min-height:62px !important;
  }
  .site-header .header-inner{width:calc(100% - 24px) !important;gap:8px !important}
  .site-header .brand{gap:8px !important}
  .site-header .brand img{width:38px !important;height:38px !important;flex-basis:38px !important;border-radius:11px !important}
  .site-header .brand-copy strong{font-size:18px !important}
  .site-header .brand-copy small{display:none !important}
  .site-header .header-actions{gap:6px !important}
  .site-header .header-actions .icon-button,
  .site-header .header-actions .theme-toggle{
    width:36px !important;min-width:36px !important;height:36px !important;min-height:36px !important;flex-basis:36px !important;border-radius:10px !important
  }
  .site-header .header-actions .icon-button svg{width:18px !important;height:18px !important}
  .site-header .header-actions .theme-toggle{font-size:17px !important}
  .premium-page{padding-top:10px !important}
  .premium-page .premium-hero{padding-top:0 !important}
  .home-page .hero{padding-top:38px !important}
}


/* v118: sticky shared public header and legal page alignment */
.site-header{
  position:sticky !important;
  top:0 !important;
  left:auto !important;
  right:auto !important;
  z-index:1000 !important;
}
.site-header .icon-button svg path[fill="none"]{fill:none !important}
.legal-page .legal-hero{
  padding-top:58px !important;
  padding-bottom:72px !important;
}
@media(max-width:640px){
  .legal-page .legal-hero{
    padding-top:38px !important;
    padding-bottom:54px !important;
  }
}
