/* Language picker in the header (2026-11-05). A native <details>: it opens and closes with
   no script; new-script.js only closes it on a click outside or Escape. Same outline-pill
   language as the checkout button beside it (calm/foundation.css), every colour a token. */
.lang-pick { position: relative; }
.lang-pick > summary {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink);
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: 0.04em;
  list-style: none; cursor: pointer; user-select: none;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.lang-pick > summary::-webkit-details-marker { display: none; }
.lang-pick > summary svg { width: 18px; height: 18px; flex: none; }
.lang-pick > summary:hover, .lang-pick[open] > summary { background: var(--ink); color: var(--paper); }
.site-header.on-ink .lang-pick > summary { color: var(--paper); border-color: var(--line-on-ink); }
.site-header.on-ink .lang-pick > summary:hover, .site-header.on-ink .lang-pick[open] > summary { background: var(--paper); color: var(--ink); }

.lang-pick ul {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 168px; margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-control);
  box-shadow: var(--shadow-md);
}
.lang-pick a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: calc(var(--r-control) - 2px);
  color: var(--ink); font-size: var(--fs-small); font-weight: 500; text-decoration: none;
}
.lang-pick a:hover { background: color-mix(in srgb, var(--ink) 6%, var(--paper)); }
.lang-pick a[aria-current] { color: var(--coral-deep); font-weight: 700; }
.lang-pick a:focus-visible, .lang-pick > summary:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .lang-pick > summary { transition: none; } }

/* Translated pages only: French and isiXhosa run longer than the English these no-wrap
   labels were sized for, and pushed a phone page sideways (measured 399 and 471 at 375).
   On a phone they may wrap; the English pages are untouched. */
@media (max-width: 900px) {
  html:not([lang="en"]) .tab-list--row .tab,
  html:not([lang="en"]) .tab small { white-space: normal; }
  html:not([lang="en"]) .foot-legal .nw { white-space: normal; }
}
/* One isiXhosa word fills a 375 phone's h1 line ("lwewebhusayithi"): on a narrower phone it
   breaks inside the word rather than pushing the page sideways. */
html:not([lang="en"]) :is(h1, h2, h3) { overflow-wrap: break-word; }
