/* Locale control: uses the approved graphite/violet design without hiding navigation. */
.locale-site .site-header .header-inner { flex-wrap: wrap; }
.locale-site .site-header nav { order: 2; flex-wrap: wrap; min-width: 0; }
/* Adjacent equal targets: no decorative separator or unclickable centre gap. */
.locale-site .site-header .language-switch {
  order: 3;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 100px;
  width: 100px;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff03;
  box-shadow: inset 0 1px 0 #ffffff04;
}
.locale-site .language-switch > button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: 600 11px/1 var(--mono);
  letter-spacing: .04em;
  transform: none;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
  -webkit-tap-highlight-color: transparent;
}
.locale-site .language-switch > button:first-of-type { border-radius: 5px 0 0 5px; }
.locale-site .language-switch > button:last-of-type { border-radius: 0 5px 5px 0; }
.locale-site .language-switch > button[aria-pressed="true"] {
  background: #baa3ff22;
  color: var(--bright);
  box-shadow: inset 0 0 0 1px #baa3ff2e;
}
.locale-site .language-switch > button:hover:not(:disabled) { background: #baa3ff19; color: var(--ink); }
.locale-site .language-switch > button[aria-pressed="true"]:hover:not(:disabled) { background: #baa3ff2c; }
.locale-site .language-switch > button:active:not(:disabled) { background: #baa3ff38; transform: none; }
.locale-site .language-switch > button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}
/* Keep successful POST controls enabled, including their name/value. */
.locale-site .language-switch[aria-busy="true"] { cursor: progress; }
.locale-site .language-switch[aria-busy="true"] > button { pointer-events: none; }
.locale-site .language-switch[aria-busy="true"] > button[aria-pressed="true"] {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
.locale-site .language-switch[aria-busy="true"] > button[data-language-selected="true"] {
  background: #baa3ff38;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px #baa3ff65;
}
.locale-site .language-switch > button:disabled { cursor: not-allowed; opacity: .55; }
@media (prefers-reduced-motion: reduce) {
  .locale-site .language-switch > button { transition: none; }
}
.locale-site .site-header .language-notice {
  order: 4;
  flex: 1 0 100%;
  margin: -4px 0 0;
  padding: 11px 14px;
  border: 1px solid #e7c88330;
  border-left: 2px solid var(--gold);
  border-radius: 4px;
  background: #e7c88308;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.locale-site .language-notice a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.locale-site .site-header [hidden] { display: none !important; }
@media (max-width: 1000px) {
  .locale-site .site-header .header-inner { gap: 14px; }
  .locale-site .site-header .brand { margin-right: auto; }
  .locale-site .site-header .language-switch { order: 2; margin-left: auto; }
  .locale-site .site-header nav { order: 3; width: 100%; justify-content: space-between; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
  .locale-site .site-header .language-notice { margin-top: 0; }
}
@media (max-width: 480px) {
  .locale-site .site-header .header-inner { column-gap: 9px; }
  .locale-site .site-header .brand { gap: 9px; }
  .locale-site .site-header .brand-api { padding-left: 9px; font-size: 8px; }
  .locale-site .site-header nav > a, .locale-site .site-header .nav-button { white-space: normal; }
}
