/* One consistent language picker, with native links and a compact mobile placement. */
.language-control { position: relative; align-self: center; flex-shrink: 0; }
.language-control > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  min-width: 82px;
  padding: 9px 10px;
  border: 1px solid #bdc8bb;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.language-control > summary::-webkit-details-marker { display: none; }
.language-control > summary:hover, .language-control[open] > summary { background: #eeedf4; border-color: #9775a8; }
.language-globe { width: 17px; height: 17px; flex-shrink: 0; }
.language-chevron { width: 12px; height: 12px; flex-shrink: 0; transition: transform .15s ease; }
.language-control[open] .language-chevron { transform: rotate(180deg); }
.language-code { letter-spacing: .035em; }
.language-options {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 125;
  display: grid;
  min-width: 200px;
  max-width: calc(100vw - 24px);
  padding: 7px;
  border: 1px solid #c8cfbf;
  border-radius: 11px;
  background: var(--white);
  box-shadow: 0 12px 32px #172b2420;
  color: var(--ink);
}
.language-options-label { padding: 5px 10px 8px; color: var(--muted); font-size: 10px; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; }
.language-options .language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}
.language-option-name { flex: 1 1 auto; }
.language-option-note { display: block; max-width: 180px; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.5; }
.language-option-code { font-size: 10px; letter-spacing: .04em; color: var(--muted); }
.language-check { width: 15px; height: 15px; flex-shrink: 0; color: #79418e; }
.language-option:hover { background: #eeedf4; }
.language-option[aria-current] { background: #eee8f2; font-weight: 600; }
.language-option:focus-visible { outline-offset: -3px; }
.site-header .header-inner {
  grid-template-columns: max-content minmax(0, 1fr) max-content max-content max-content;
  grid-template-areas: "brand search contribute language appearance" "navigation navigation navigation navigation navigation";
}
.site-header .header-inner > .language-control { grid-area: language; margin: 0; }
.site-footer .language-control { margin-left: auto; }
.site-footer .language-control > summary { min-width: 122px; color: #ecf2e4; border-color: #688071; font-size: 11px; }
.site-footer .language-control > summary:hover, .site-footer .language-control[open] > summary { background: #ffffff0d; border-color: #d3a8e9; }
.site-footer .language-options { top: auto; bottom: calc(100% + 9px); }
.site-footer .language-options .language-option { color: var(--ink); }
.footer-bottom { align-items: center; }
html[data-theme="dark"] .language-control > summary { background: #202c38; border-color: #66778b; color: #edf1f7; }
html[data-theme="dark"] .language-control > summary:hover, html[data-theme="dark"] .language-control[open] > summary { background: #30384b; border-color: #bc8cd6; }
html[data-theme="dark"] .language-options { border-color: #66778b; box-shadow: 0 12px 32px #00000055; }
html[data-theme="dark"] .language-option:hover { background: #334050; }
html[data-theme="dark"] .language-option[aria-current] { background: #40314c; }
html[data-theme="dark"] .language-check { color: #d0ade2; }
@media (max-width: 1100px) {
  .site-header .header-inner { column-gap: 12px; }
}
@media (max-width: 900px) {
  .site-header .header-inner {
    grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
    grid-template-areas: "brand search language appearance" "navigation navigation navigation navigation";
  }
}
@media (max-width: 600px) {
  .site-header .header-inner {
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    grid-template-areas: "brand search appearance menu" "quick quick quick quick";
    column-gap: 4px;
  }
  .site-header .header-inner.menu-open { grid-template-areas: "brand search appearance menu" "quick quick quick quick" "navigation navigation navigation navigation"; }
  .site-header .header-inner > .language-control { grid-area: auto; grid-column: 3 / 5; grid-row: 2; justify-self: end; z-index: 21; }
  .site-header .language-control > summary { min-width: 76px; min-height: 44px; padding: 8px 6px; gap: 5px; border-color: transparent; }
  .site-header .language-control .language-globe { width: 16px; height: 16px; }
  .site-header .header-inner > .mobile-word-nav { padding-right: 84px; gap: 6px; }
  .site-header .mobile-word-nav > a:last-child { display: none; }
  .site-header .mobile-word-nav > a { padding-inline: 3px; }
  .site-footer .footer-bottom > span:first-child { flex-basis: 100%; }
  .site-footer .language-control { margin-left: 0; order: 1; }
  .site-footer .language-control > summary { min-width: 115px; }
  .site-footer .language-options { left: 0; right: auto; }
  .site-footer .footer-bottom > a { margin-left: auto; order: 1; }
}
@media (prefers-reduced-motion: reduce) { .language-chevron { transition: none; } }
