/* RS2-M6.1.1 · Three languages (owner 2026-12-01): the language switch, top right on every page (owner pages' master header
   and the article header), three plain choices EN · 中文 · BM; the current one in the action colour. New file: the other
   stylesheets stay as they are. Loaded on every page by master/Assets.astro (and inlined on the homes by defer-images). */
.lang-switch{ display:flex; flex:none; align-items:center; gap:2px; white-space:nowrap; font-size:var(--button-compact-text-size, .8125rem); line-height:1; }
.lang-switch a, .lang-switch .lang-current{ display:inline-flex; align-items:center; min-height:44px; padding:0 4px; color:inherit; text-decoration:none; }
.lang-switch a:hover{ color:var(--action, currentColor); text-decoration:underline; text-underline-offset:.2em; }
.lang-switch .lang-current{ font-weight:700; color:var(--action, currentColor); }
.lang-switch .lang-sep{ opacity:.45; }
.lang-switch a:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

/* Master header: the same Contact divider in every language (master.css finds it by its English href). */
@media (min-width:761px){
  .site-header nav a[data-nav="/contact"]{ padding-inline:14px; border-inline:1px solid var(--line); }
}
/* Phone: the switch sits between the logo and the menu button, pushed right; the menu button keeps its place. */
@media (max-width:760px){
  .site-header .lang-switch{ margin-left:auto; }
  .site-header .lang-switch + .menu-toggle{ margin-left:0; }
}
@media (max-width:360px){ .site-header .lang-switch a, .site-header .lang-switch .lang-current{ padding:0 2px; } }

/* Article header (Starlight): after the menu links, before the floating button. */
header.header .lang-switch{ color:var(--sl-color-gray-2); font-size:var(--sl-text-sm, .875rem); }
header.header .lang-switch .lang-current{ color:var(--sl-color-white); }
@media (max-width:49.99em){ header.header .lang-switch{ font-size:.8125rem; } }

/* Chinese pages: the system Chinese faces after the brand faces (no font file added), strict line breaking. */
html:lang(zh-CN) body{ line-break:strict; }
