/* One header system for the app, homepage, and static content pages. */
.site-header {
  align-items: center;
  background: rgba(9, 10, 11, .92);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  box-sizing: border-box;
  color: #f5f4ed;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  height: 78px;
  justify-content: space-between;
  margin: 0;
  max-width: 100%;
  min-height: 78px;
  overflow: hidden;
  padding: 0 clamp(22px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 15;
  backdrop-filter: blur(20px);
}

.site-header .topbar-brand {
  align-items: center;
  display: flex;
  gap: 18px;
  min-width: 0;
}

.site-header .brand-button,
.site-header .public-brand-link {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  min-width: 0;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.site-header .brand {
  align-items: center;
  color: #f5f4ed;
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 21px;
  font-weight: 850;
  gap: 10px;
  letter-spacing: -.04em;
  min-width: 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .brand-name { display: inline-flex; min-width: 0; }
.site-header .brand-up { color: #f5d74d; }
.site-header .brand > small { color: #a3a6a2; font-size: 10px; font-weight: 700; letter-spacing: .12em; margin-left: 3px; }
.site-header .brand-mark-image { background: transparent; border-radius: 0; box-shadow: none; flex: 0 0 30px; height: 30px; transform: none; width: 30px; }
.site-header .brand-mark-image img { border-radius: 9px 14px 9px 14px; display: block; height: 100%; object-fit: cover; width: 100%; }

.site-header .topbar-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
  width: auto;
}

.site-header .pwa-install-header-button {
  align-items: center;
  background: rgba(245, 215, 77, .06);
  border: 1px solid rgba(245, 215, 77, .42);
  border-radius: 16px;
  color: #f5d74d;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 58px;
  flex-direction: column;
  font-size: 9px;
  font-weight: 800;
  gap: 1px;
  justify-content: center;
  line-height: 1.1;
  min-height: 52px;
  min-width: 58px;
  overflow: hidden;
  padding: 4px 8px 3px;
  white-space: nowrap;
}

.site-header .pwa-install-header-button:hover,
.site-header .pwa-install-header-button:focus-visible { background: rgba(245, 215, 77, .12); border-color: #f5d74d; }
.site-header .pwa-install-header-button[hidden] { display: none; }
.site-header .pwa-install-header-icon { display: block; flex: none; height: 18px; width: 18px; }
.site-header .pwa-install-header-label { display: block; font-size: 9px; line-height: 1.1; }

.site-header .language-button {
  align-items: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  color: #a3a6a2;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 52px;
  font-size: 14px;
  gap: 3px;
  justify-content: center;
  min-height: 40px;
  min-width: 52px;
  padding: 0 3px;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .language-button .active { color: #f5d74d; font-weight: 850; }
.site-header .language-button:hover,
.site-header .language-button:focus-visible { border-color: rgba(255, 255, 255, .18); color: #f5f4ed; }

.site-header .account-button {
  align-items: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  color: #a3a6a2;
  display: inline-flex;
  text-decoration: none;
}

.site-header .site-account-button {
  flex: 0 0 112px;
  justify-content: center;
  max-width: 112px;
  min-height: 40px;
  min-width: 112px;
  padding: 9px 7px;
  text-align: center;
}

.site-header .site-account-button.authenticated { justify-content: center; text-align: center; }
.site-header .site-account-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header .account-button span:last-child { display: inline; }

@media (display-mode: standalone) {
  .site-header .pwa-install-header-button { display: none !important; }
}

@media (max-width: 720px) {
  .site-header { height: 66px; min-height: 66px; padding: 0 14px; }
  .site-header .topbar-brand { gap: 0; }
  .site-header .brand { font-size: 17px; gap: 7px; }
  .site-header .brand > small { display: none; }
  .site-header .brand-mark-image { flex-basis: 28px; height: 28px; width: 28px; }
  .site-header .topbar-actions { gap: 3px; }
  .site-header .language-button { flex-basis: 52px; font-size: 13px; min-height: 36px; min-width: 52px; }
  .site-header .site-account-button { flex-basis: 112px; min-height: 36px; min-width: 112px; padding: 7px 6px; }
  .site-header .site-account-label { font-size: 12px; }
}

/* Narrow screens: the label no longer fits legibly, so show the icon alone.
   The button keeps its aria-label for assistive technology. */
@media (max-width: 720px) {
  .site-header .pwa-install-header-button { border-radius: 999px; flex-basis: 36px; min-height: 36px; min-width: 36px; padding: 0; width: 36px; }
  .site-header .pwa-install-header-label { display: none; }
}

@media (max-width: 360px) {
  .site-header { padding-inline: 10px; }
  .site-header .brand { font-size: 15px; gap: 5px; }
  .site-header .brand-mark-image { flex-basis: 24px; height: 24px; width: 24px; }
  .site-header .brand-name { overflow: hidden; text-overflow: ellipsis; }
  .site-header .language-button { flex-basis: 46px; font-size: 12px; min-width: 46px; }
  .site-header .site-account-button { flex-basis: 64px; max-width: 64px; min-width: 64px; }
}
