/* Languages: switcher, AI-translation note, and the left-to-right pages (English, Chinese). See inc/i18n.php. */

/* ---------- header switcher (desktop) ---------- */
.lsw { position: relative; margin-block: auto; }
.lsw > summary { list-style: none; }
.lsw > summary::-webkit-details-marker { display: none; }
.lsw__btn {
	display: inline-flex; align-items: center; gap: 6px; height: 40px; padding-inline: 10px; border-radius: 999px; cursor: pointer;
	color: rgba(255, 255, 255, .86); font: 600 .86rem var(--font-body); white-space: nowrap; transition: background-color .2s, color .2s;
}
.lsw__btn:hover, .lsw[open] .lsw__btn { background: rgba(255, 255, 255, .08); color: #fff; }
.lsw__btn:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; }
.lsw__menu {
	position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 120; width: 240px; padding: 8px; border-radius: 14px;
	background: #fff; box-shadow: 0 24px 60px -20px rgba(5, 13, 32, .55), 0 0 0 1px rgba(11, 27, 51, .08); color: var(--ink);
}
.lsw__menu ul { list-style: none; margin: 0; padding: 0; }
.lsw__menu a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--navy-800); font-weight: 600; text-decoration: none; }
.lsw__menu a:hover { background: var(--blue-50); }
.lsw__menu a[aria-current] { color: var(--blue-600); background: var(--blue-50); }
.lsw__note { margin: 8px 4px 2px; padding-top: 8px; border-top: 1px solid var(--line); color: #66748C; font-size: .76rem; line-height: 1.45; }
@media (max-width: 1100px) { .lsw { display: none; } }

/* ---------- row switcher (mobile menu, footer) ---------- */
.lsw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lsw-row .ic { opacity: .7; margin-inline-end: 2px; }
.lsw-row a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: inherit; font-weight: 600; font-size: .88rem; text-decoration: none; }
.lsw-row a[aria-current] { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.lsw-row--mnav { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--navy-800); }
.lsw-row--foot { color: rgba(255, 255, 255, .8); }
.lsw-row--foot a { border-color: rgba(255, 255, 255, .2); }
.lsw-row--foot a[aria-current] { color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); }

/* ---------- AI translation note ---------- */
.i18n-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: .8rem; line-height: 1.5; opacity: .8; }
.i18n-note .ic { flex: none; margin-top: 2px; }
.i18n-note--doc { margin-bottom: 24px; padding: 12px 16px; border-radius: 12px; background: var(--blue-50); color: var(--navy-800); opacity: 1; }

/* ---------- left-to-right pages ---------- */
/* Chinese: Assistant for Latin letters and digits, the system CJK face for the characters. */
html[lang="en"] { --font-display: 'Assistant', system-ui, sans-serif; }
html[lang="zh-Hans"] {
	--font-display: 'Assistant', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
	--font-body: 'Assistant', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
}
html[lang="en"] :is(h1, h2, .h1, .h2, .shead__h, .ghead__h, .bhead__h, .chero__h, .art__title, .hx__h) { font-weight: 800; letter-spacing: -.02em; }
html[lang="zh-Hans"] :is(h1, h2, .h1, .h2, .shead__h, .ghead__h, .bhead__h, .chero__h, .art__title, .hx__h) { font-weight: 700; letter-spacing: 0; line-height: 1.2; }
html[lang="zh-Hans"] body { line-height: 1.75; }

/* Motion written for right-to-left, mirrored. */
html[dir="ltr"] .btn:hover .btn__ic { transform: translateX(3px); }
html[dir="ltr"] .pfam:hover .pfam__go { transform: translateX(6px) rotate(8deg); }
html[dir="ltr"] .relc:hover .relc__go { transform: translateX(6px); }
html[dir="ltr"] .proj__more:hover .dot,
html[dir="ltr"] .bcard:hover .bcard__more .dot,
html[dir="ltr"] .bfeat:hover .bcard__more .dot { transform: translateX(5px); }
html[dir="ltr"] .cc__opt input:checked + .cc__sw::after,
html[dir="ltr"] .ptoggle.is-on .ptoggle__sw span { transform: translateX(18px); }
html[dir="ltr"] .tl2__dot { transform: translateX(-50%); }
html[dir="ltr"] .tl2__item.is-on .tl2__dot { transform: translateX(-50%) scale(1.15); }
html[dir="ltr"] .ticker__track { animation-name: ticker-ltr; }
@keyframes ticker-ltr { to { transform: translateX(-50%); } }
.site-foot__geo { font-size: .72rem; opacity: .5; color: inherit; }
.site-foot__geo:hover { opacity: .8; }
/* The hero's typewriter line must stay on one line: English and Chinese phrases run longer. */
@media (max-width: 820px) {
	html[dir="ltr"] .hx__h { font-size: clamp(1.9rem, 8.2vw, 3.2rem); }
}
@media (max-width: 820px) {
	html[lang="zh-Hans"] .hx__h { font-size: clamp(1.75rem, 7.4vw, 3rem); }
}
.ss__try-l { white-space: nowrap; }
