/* One in-flow theme control, directly left of the language selector. */
.site-header .balance-header-preferences {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  direction: ltr;
  min-width: 0;
}
.site-header .balance-header-preferences > .balance-night-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: static;
  inset: auto;
  transform: none;
  z-index: auto;
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 36px;
  height: 44px;
  min-width: 36px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  filter: none;
  backdrop-filter: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.site-header .balance-night-toggle svg {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  pointer-events: none;
}
.site-header .balance-night-toggle svg[hidden] { display: none !important; }
.site-header .balance-night-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}
.site-header .balance-night-toggle:hover svg { stroke-width: 2; }
.site-header .balance-header-preferences > .language {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.site-header .balance-header-preferences > .language > summary {
  background: transparent !important;
  box-shadow: none !important;
}
/* Keep the tablet inquiry button and centered logo clear of the new control. */
@media (min-width: 701px) and (max-width: 800px) {
  .site-header:has(.balance-header-preferences) > .logo img {
    width: min(250px, calc(100vw - 500px));
    height: auto;
  }
}
@media (max-width: 600px) {
  .site-header .balance-header-preferences { gap: 2px; }
  .site-header .balance-night-toggle svg { width: 17px; height: 17px; }
  /* Reserve space for both control groups without shifting the centered logo. */
  .site-header:has(.balance-header-preferences) > .logo img {
    width: min(200px, calc(100vw - 204px));
    height: auto;
  }
}
@media print { .site-header .balance-night-toggle { display: none; } }
