/* Language switcher, the app-is-in-English note and the language suggestion (#201).
   tools/i18n/build.py adds the markup and this file to a page together. Like shell.css it
   relies on the colour and type tokens each page declares in its own :root. */

/* The switcher sits after the nav; the nav keeps its place at the right of the brand row. */
.mast .mast__nav{margin-left:auto}
.lang-switch{position:relative;flex:none;margin-left:22px}
.lang-switch summary{list-style:none;display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:0 4px;cursor:pointer;font-family:var(--mono);font-size:12px;letter-spacing:.06em;color:var(--muted);transition:color .16s ease;-webkit-tap-highlight-color:transparent}
.lang-switch summary::-webkit-details-marker{display:none}
.lang-switch summary:hover,.lang-switch[open] summary{color:var(--ink)}
.lang-switch__globe{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5}
.lang-switch__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.lang-switch__menu{position:absolute;right:0;top:100%;z-index:30;min-width:160px;margin:4px 0 0;padding:6px 0;list-style:none;background:var(--bg-2,var(--bg));border:1px solid var(--rule-2,var(--rule));border-radius:8px;box-shadow:0 14px 34px rgba(0,0,0,.45)}
.lang-switch__menu a{display:flex;align-items:center;min-height:40px;padding:0 16px;font-size:14px;letter-spacing:normal;text-transform:none;color:var(--ink-2,var(--ink));transition:color .16s ease}
.lang-switch__menu a:hover,.lang-switch__menu a[aria-current]{color:var(--lens)}
/* An open menu lifts the header over the page's layers, and the header row over what the
   setup guide docks into the header on phones (Speck's rail and its tip). */
.mast:has(.lang-switch[open]){z-index:70}
.mast .mast__row:has(.lang-switch[open]){position:relative;z-index:10}
@media (max-width:820px){.lang-switch{margin-left:auto}}
@media (max-width:340px){.lang-switch__now{display:none}}

/* One line under the header: the note on translated pages, the suggestion on English pages. */
.lang-bar{border-bottom:1px solid var(--rule);background:color-mix(in oklab,var(--bg) 90%,var(--lens) 10%)}
.lang-bar[hidden],.lang-bar__in[hidden]{display:none}
.lang-bar__in{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;max-width:var(--shell,1000px);margin:0 auto;padding:8px var(--shell-pad,28px);font-family:var(--mono);font-size:12px;line-height:1.5;letter-spacing:.04em;color:var(--ink-2,var(--ink))}
.lang-suggest a{color:var(--lens);border-bottom:1px dotted currentColor}
.lang-suggest__x{width:32px;height:32px;margin:-6px -8px -6px auto;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:6px;background:none;color:var(--muted);font-size:18px;line-height:1;cursor:pointer}
.lang-suggest__x:hover{color:var(--ink)}
