/* Language picker in the subpage header (added by site-i18n.mjs at build time). Same control as the landing
   header: a globe pill on desktop, a short code chip next to the Menu button on phones. */
.sub-header .language-switch{position:relative;flex-shrink:0;order:3;margin-left:14px;font-family:Inter,Arial,sans-serif;line-height:1.3;color:#a0d4f5}
.sub-header .language-trigger{box-sizing:border-box;display:flex;align-items:center;gap:7px;min-height:44px;padding:0 12px;border:1px solid #97d4f930;border-radius:999px;background:transparent;cursor:pointer;list-style:none;font-size:12px;letter-spacing:.015em;white-space:nowrap;color:#c9e6fa;transition:border-color 220ms,color 220ms}
.sub-header .language-trigger::-webkit-details-marker{display:none}
.sub-header .language-trigger::marker{content:''}
.sub-header .language-trigger:hover,.sub-header .language-picker[open] .language-trigger{border-color:#329fff80;color:#e1edff}
.sub-header .language-globe{width:17px;height:17px;flex-shrink:0;color:#5fc8ff}
.sub-header .language-code{display:none}
.sub-header .language-chevron{width:12px;height:12px;color:#5fc8ff;transition:transform 220ms}
.sub-header .language-picker[open] .language-chevron{transform:rotate(90deg)}
.sub-header .language-options{box-sizing:border-box;position:absolute;z-index:20;right:0;top:calc(100% + 12px);display:flex;flex-direction:column;gap:4px;width:180px;padding:6px;border:1px solid #8acef533;border-radius:16px;background:radial-gradient(ellipse at 0 0,#0066ff25,transparent 75%),#050e20f7;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);box-shadow:0 24px 60px #0008}
.sub-header .language-options a{display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:0 10px;border:1px solid transparent;border-radius:10px;color:#a5c3dd;font-size:13px;text-decoration:none;transition:background 180ms,color 180ms}
.sub-header .language-options a:hover{background:#168cff12;color:#e1edff}
.sub-header .language-options a[aria-current=page]{background:linear-gradient(110deg,#0066ff30,#168cff0c);border-color:#329fff38;color:#eaf4ff}
.sub-header .language-options a[aria-current=page]::after{content:"✓";font-size:12px;color:#9ed8ff}
.sub-header .language-trigger:focus-visible,.sub-header .language-options a:focus-visible{outline:2px solid #b2e0ff;outline-offset:3px}
@media(prefers-reduced-motion:no-preference){.sub-header .language-picker[open] .language-options{animation:site-language-in 180ms cubic-bezier(.22,1,.36,1) both}}
@keyframes site-language-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
@media(min-width:851px) and (max-width:1180px){.sub-header .language-current{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.sub-header .language-chevron{display:none}}
@media(max-width:850px){
 .sub-header .language-switch{order:1;margin-left:auto;margin-right:8px}
 .sub-header .nav-toggle{order:2;margin-left:0}
 .sub-header .grouped-nav{order:3}
 /* Make room for the language chip: the logo shrinks first, as on the landing header. */
 .sub-header .sub-brand{flex:0 1 auto;min-width:0;max-width:calc(100% - 184px)}
 .sub-header .sub-brand>svg{width:100%;height:auto}
 .sub-header .language-trigger{height:40px;min-height:40px;padding:0 13px 0 11px;background:#07111dcc;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);color:#e1edff;font:500 12px/1 Inter,Arial,sans-serif;letter-spacing:.06em}
 .sub-header .language-current{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .sub-header .language-code{display:inline}
 .sub-header .language-chevron{display:none}
 .sub-header .language-globe{width:16px;height:16px}
 .sub-header .language-options{position:fixed;top:86px;left:16px;right:16px;width:auto}
 .sub-header .language-options a{min-height:52px;padding:0 14px;font-size:16px}
}
/* Translated labels can be shorter or longer than English: keep the menu button on one line. */
.sub-header .nav-toggle,.landing-header .nav-toggle{white-space:nowrap;flex-shrink:0}
/* Chinese pages: looser line height and a CJK face after the Latin fonts. */
:root:lang(zh-Hans) body{font-family:Inter,'PingFang SC','Microsoft YaHei','Noto Sans SC',sans-serif}
:root:lang(zh-Hant) body{font-family:Inter,'PingFang TC','Microsoft JhengHei','Noto Sans TC',sans-serif}
:root:lang(zh) :is(p,li,dd){line-height:1.85}
:root:lang(zh) :is(h1,h2,h3){letter-spacing:.01em;line-height:1.3}
