/* v9: prominent one-click language switcher (v8 palette) */

.lang-switch{
  display:flex;
  align-items:stretch;
  gap:2px;
  margin:0;
  padding:3px;
  border:1px solid var(--sand);
  border-radius:999px;
  background:var(--white);
}
.lang-switch a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  font:500 13.5px/1.2 var(--text);
  letter-spacing:0;
  color:var(--ink-2);
  text-decoration:none;
  white-space:nowrap;
  -webkit-tap-highlight-color:transparent;
}
.lang-switch a:hover{
  color:var(--ink);
  background:var(--stone);
}
.lang-switch a[aria-current]{
  color:#fff;
  background:var(--accent);
  font-weight:600;
  pointer-events:none;
}
.lang-switch a:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  z-index:1;
}

/* Desktop: full native names in the header tools (right side) */
.lang-switch--full{margin-right:8px}
@media (max-width:1280px) and (min-width:721px){
  .lang-switch--full a{padding:0 8px;font-size:12.5px;min-height:32px}
}

/* Mobile / narrow: hide the full-name control; show a compact bar in the sticky header */
.site-head .wrap.lang-bar{
  display:none;
  height:auto;
  align-items:center;
  padding-top:0;
  padding-bottom:10px;
  padding-left:var(--gut);
  padding-right:var(--gut);
}
.lang-switch--compact{display:none}

@media (max-width:720px){
  .lang-switch--full{display:none!important}
  .site-head .wrap.lang-bar{
    display:flex;
    width:100%;
  }
  .lang-switch--compact{
    display:flex;
    flex:1 1 100%;
    width:100%;
    border-radius:12px;
    gap:3px;
  }
  .lang-switch--compact a{
    flex:1 1 0;
    min-height:40px;
    padding:0 2px;
    font-size:13px;
    border-radius:9px;
  }
  .mnav.open{top:136px}
  .hero.v7-hero .wrap{padding-top:140px}
  .v7-hubhero{padding-top:140px}
}

/* Transparent hero header */
.site-head.over:not(.scrolled) .lang-switch{
  border-color:rgba(255,255,255,.35);
  background:rgba(11,18,32,.32);
}
.site-head.over:not(.scrolled) .lang-switch a{color:rgba(255,255,255,.92)}
.site-head.over:not(.scrolled) .lang-switch a:hover{
  color:#fff;
  background:rgba(255,255,255,.16);
}
.site-head.over:not(.scrolled) .lang-switch a[aria-current]{
  color:#0B1220;
  background:#fff;
}
.site-head.over:not(.scrolled) .lang-switch a:focus-visible{
  outline-color:#fff;
}
.site-head.over:not(.scrolled) .wrap.lang-bar{
  border:0;
}

/* Menu: full native names, large tap targets */
.mnav .lang-switch--menu{
  flex-direction:column;
  gap:8px;
  margin:22px 0 8px;
  padding:16px 0 0;
  border:0;
  border-top:1px solid var(--sand);
  border-radius:0;
  background:transparent;
}
.mnav .lang-switch--menu a{
  justify-content:flex-start;
  min-height:48px;
  padding:0 16px;
  font-size:17px;
  border:1px solid var(--sand);
  border-radius:12px;
  background:var(--white);
  color:var(--ink);
  pointer-events:auto;
}
.mnav .lang-switch--menu a[aria-current]{
  color:#fff;
  background:var(--accent);
  border-color:var(--accent);
}
.mnav .lang-switch--menu a:hover{
  border-color:var(--ink);
  background:var(--stone);
  color:var(--ink);
}
.mnav .lang-switch--menu a[aria-current]:hover{
  color:#fff;
  background:var(--accent);
  border-color:var(--accent);
}

/* Suggestion bar: v8 palette, AA, sits just below the (fixed/sticky) header so it stays clickable */
.lang-banner{
  background:var(--accent-tint);
  color:var(--ink);
  border-bottom:1px solid var(--sand);
  font-size:14.5px;
  position:relative;
  z-index:45;
}
.lang-banner:not([hidden]){
  position:fixed;
  left:0;
  right:0;
  top:79px;
  z-index:49;
}
@media (max-width:720px){
  .lang-banner:not([hidden]){top:136px}
}
.lang-banner .wrap{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px 16px;
  padding:10px var(--gut);
}
.lang-banner a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 16px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font:600 14.5px var(--text);
  text-decoration:none;
}
.lang-banner a:hover{background:var(--accent-d, #094AAB);color:#fff}
.lang-banner a:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.lang-banner button{
  background:none;
  border:0;
  color:var(--ink-2);
  cursor:pointer;
  font:500 14.5px var(--text);
  min-height:40px;
  padding:0 8px;
  text-decoration:underline;
  text-underline-offset:3px;
}
.lang-banner button:hover{color:var(--ink)}
.lang-banner button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.lang-banner[hidden]{display:none!important}

/* Dark mode */
html[data-theme="dark"] .lang-switch,
html.v7-dark .lang-switch{
  border-color:var(--sand);
  background:var(--stone);
}
html[data-theme="dark"] .lang-switch a,
html.v7-dark .lang-switch a{color:var(--ink-2)}
html[data-theme="dark"] .lang-switch a:hover{
  color:var(--ink);
  background:rgba(255,255,255,.08);
}
html[data-theme="dark"] .lang-switch a[aria-current],
html.v7-dark .lang-switch a[aria-current]{
  color:#0B1220;
  background:var(--accent); /* #5BA3FF in dark: ink on accent is AA */
}
html[data-theme="dark"] .mnav .lang-switch--menu a,
html.v7-dark .mnav .lang-switch--menu a{
  background:var(--stone);
  border-color:var(--sand);
  color:var(--ink);
}
html[data-theme="dark"] .mnav .lang-switch--menu a[aria-current],
html.v7-dark .mnav .lang-switch--menu a[aria-current]{
  color:#0B1220;
  background:var(--accent);
  border-color:var(--accent);
}
html[data-theme="dark"] .lang-banner,
html.v7-dark .lang-banner{
  background:var(--stone);
  color:var(--ink);
  border-bottom-color:var(--sand);
}
html[data-theme="dark"] .lang-banner a,
html.v7-dark .lang-banner a{
  background:var(--accent);
  color:#0B1220;
}
html[data-theme="dark"] .lang-banner a:hover,
html.v7-dark .lang-banner a:hover{
  background:#7BB4FF;
  color:#0B1220;
}
html[data-theme="dark"] .lang-banner button,
html.v7-dark .lang-banner button{color:var(--ink-2)}

@media (prefers-color-scheme:dark){
  html:not([data-theme="light"]) .lang-switch{
    border-color:var(--sand);
    background:var(--stone);
  }
  html:not([data-theme="light"]) .lang-switch a[aria-current]{
    color:#0B1220;
    background:var(--accent);
  }
  html:not([data-theme="light"]) .mnav .lang-switch--menu a{
    background:var(--stone);
    border-color:var(--sand);
    color:var(--ink);
  }
  html:not([data-theme="light"]) .mnav .lang-switch--menu a[aria-current]{
    color:#0B1220;
    background:var(--accent);
    border-color:var(--accent);
  }
  html:not([data-theme="light"]) .lang-banner{
    background:var(--stone);
    color:var(--ink);
    border-bottom-color:var(--sand);
  }
  html:not([data-theme="light"]) .lang-banner a{
    background:var(--accent);
    color:#0B1220;
  }
}

/* Current language remains keyboard-focusable for screen readers via aria-current;
   pointer-events:none only on the header pills (already on this page). Menu current stays clickable. */
@media (max-width:720px){
  /* 375px: four short codes must fit without wrapping the header */
  .lang-switch--compact a{font-size:12.5px}
}
