/* SITE-49: the language switcher, on every page that is in more than one language (generated by
   archive/site44-build/build_pages.py). One pill naming the language you're reading, which opens a
   short list of all of them. No script needed to open it; a few lines on the page close it on an
   outside tap or Escape. On the doc pages it sits right of the eyebrow; on the home page, in the footer. */
.lang-switch { position: relative; flex: none; margin-top: -3px; }
.lang-switch > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); transition: color .2s, border-color .2s; -webkit-user-select: none; user-select: none; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 2px; border: solid currentColor;
  border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
.lang-switch[open] > summary::after { transform: translateY(3px) rotate(-135deg); }
.lang-switch > summary:hover, .lang-switch > summary:focus-visible, .lang-switch[open] > summary { color: var(--ink); border-color: var(--ink-3); }
.lang-globe { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 196px; margin: 0; padding: 6px;
  list-style: none; background: rgba(28,28,32,.96); border: 1px solid var(--glass-edge); border-radius: 16px;
  backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.75); }
/* .doc ul and .footer ul (0,1,1) out-rank .lang-menu: restore its own box at a higher specificity. */
.lang-switch .lang-menu { display: block; margin: 0; padding: 6px; list-style: none; }
.lang-menu li { margin: 0; font-size: 15px; line-height: 1.3; }
.lang-menu a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px;
  border-radius: 10px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: rgba(255,255,255,.08); color: var(--ink); }
.lang-menu a[aria-current="page"] { color: var(--ink); }
.lang-menu a[aria-current="page"]::after { content: ""; width: 9px; height: 5px; margin-top: -3px; border: solid currentColor;
  border-width: 0 0 1.8px 1.8px; transform: rotate(-45deg); }
/* The translated policies end on two meta lines: which version applies, then the effective date. */
.doc .meta + .meta { margin-top: 8px; }
.r-doc-head { position: relative; z-index: 5; }
.lang-switch .lang-menu li::before { content: none; }
/* In the footer it opens upward: it is the last thing on the page. */
.footer .lang-switch { margin-top: 0; }
.footer .lang-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
.footer ul.lang-menu li { margin: 0; }
.footer .lang-menu a { font-size: 14px; }

/* 1 Nov 2026: the switcher in the nav is just the globe (Philip: a pill with a code took more room
   than it deserved). 2 Nov 2026: it sits inside .nav-links after Get the app (build_pages.py), so on
   desktop it follows the button with the links' spacing, and on phones it is a row of the menu that
   opens its list inline, naming the current language. */
.nav .lang-switch { margin: 0 0 0 2px; }
.nav .lang-switch > summary { width: 32px; height: 32px; padding: 0; justify-content: center; gap: 0;
  border-color: transparent; border-radius: 999px; color: var(--ink-2); }
.nav .lang-switch > summary:hover, .nav .lang-switch[open] > summary { background: rgba(255, 255, 255, 0.06); border-color: transparent; color: var(--ink); }
.nav .lang-switch > summary::after, .nav .lang-switch > summary span { display: none; }
.nav .lang-switch .lang-globe { width: 17px; height: 17px; }
.nav .lang-menu { top: calc(100% + 10px); right: 0; left: auto; }
@media (max-width: 760px) {
  .nav .lang-switch { margin: 2px 0 0; }
  .nav .lang-switch > summary { display: flex; width: auto; height: auto; padding: 12px 14px; justify-content: flex-start; gap: 10px;
    border-radius: 14px; font-size: 16px; font-weight: 500; }
  .nav .lang-switch > summary .lang-name { display: inline; flex: 1; }
  .nav .lang-switch > summary::after { display: block; width: 7px; height: 7px; margin: -4px 0 0; }
  .nav .lang-switch .lang-menu { position: static; min-width: 0; margin: 2px 0 0; padding: 0 0 0 26px;
    background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav .lang-menu a { padding: 10px 14px; }
}
