/* Shared desktop/mobile controls, using the site's existing theme colors. */
.header-controls, .mobile-nav-controls { gap: 12px; }
.header-controls { flex-shrink: 0; }
.masthead__inner > .brand { flex-shrink: 0; min-width: 0; max-width: calc(100% - 210px); }
.masthead__inner > .brand > span { min-width: 0; overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.theme-toggle, .language-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  height: 40px;
  border: 1px solid var(--ref-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
}
.theme-toggle { width: 44px; padding: 8px; }
.language-menu > summary { gap: 8px; padding: 8px 12px; font-size: 14px; font-weight: 500; line-height: 1; }
.language-menu > summary::after { content: none; }
.theme-icon, .language-icon { display: block; width: 16px; height: 16px; flex-shrink: 0; }
.language-chevron { width: 12px; height: 12px; flex-shrink: 0; }
.theme-icon--sun { display: none; }
html[data-theme='dark'] .theme-icon--sun { display: block; }
html[data-theme='dark'] .theme-icon--moon { display: none; }
.theme-toggle:hover, .language-menu > summary:hover { background: var(--ref-muted); }
.theme-toggle:focus-visible, .language-menu > summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
@media (max-width: 767px) {
  .masthead__inner > .brand { flex: 1 1 auto; max-width: none; }
  .header-controls, .mobile-nav-controls { gap: 8px; }
  .language-code { display: none; }
  .language-menu > summary { padding-inline: 12px; }
}
