/* Language menu: a quiet globe-and-code control beside the social links, opening a
   compact list. The current language carries the navigation's lit spore. */
.language-switch {margin-left:auto;position:relative;flex-shrink:0;}
.masthead__socials+.language-switch {margin-left:0;}
.language-switch>summary {display:inline-flex;align-items:center;gap:.4rem;min-height:44px;padding:0 .5rem;border-radius:var(--r-2,4px);color:var(--cream-3,#a39d8a);font:500 .72rem/1 var(--mono,monospace);letter-spacing:.08em;cursor:pointer;list-style:none;user-select:none;transition:color 120ms ease,background-color 120ms ease;}
.language-switch>summary::-webkit-details-marker {display:none;}
.language-switch>summary::before {display:none;}
.language-switch>summary::after {content:"";width:4px;height:4px;margin-left:.05rem;border-right:1.25px solid currentColor;border-bottom:1.25px solid currentColor;opacity:.75;transform:translateY(-1.5px) rotate(45deg);transition:transform 180ms ease;}
.language-switch[open]>summary::after {transform:translateY(1px) rotate(-135deg);}
.language-switch>summary:hover,.language-switch[open]>summary {color:var(--cream,#efe7d2);background:var(--night-3,#161d14);}
.language-switch__globe {width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.2;}
.language-switch nav {position:absolute;top:calc(100% + 4px);right:0;z-index:100;display:grid;min-width:min(12.5rem,calc(100vw - 2rem));width:max-content;max-width:calc(100vw - 2rem);padding:.3rem;border:1px solid var(--rule-2,rgba(239,231,210,.22));border-radius:6px;background:var(--night-2,#10150e);box-shadow:0 14px 36px rgba(0,0,0,.5);animation:language-menu-in 140ms ease-out;}
@keyframes language-menu-in {from{opacity:0;}}
.language-switch a {position:relative;display:flex;align-items:center;justify-content:space-between;gap:1.25rem;min-height:36px;padding:.3rem .6rem .3rem 1.2rem;border-radius:4px;color:var(--cream-2,#cdc6b0);font:400 .875rem/1.3 var(--sans,sans-serif);text-decoration:none;overflow-wrap:anywhere;}
@media (pointer:coarse) {.language-switch a {min-height:44px;}}
.language-switch a:hover {color:var(--cream,#efe7d2);background:var(--night-3,#161d14);}
.language-switch a[aria-current] {color:var(--cream,#efe7d2);}
.language-switch a[aria-current]::before {content:"";position:absolute;left:.5rem;top:50%;width:5px;height:5px;margin-top:-2.5px;border-radius:50%;background:var(--glow,#c7e541);box-shadow:0 0 8px rgba(199,229,65,.8);}
.language-switch__tag {flex:none;font:500 .66rem/1 var(--mono,monospace);letter-spacing:.08em;color:var(--cream-3,#a39d8a);}
.language-switch :is(a,summary):focus-visible {outline:2px solid var(--glow,#c7e541);outline-offset:1px;}
.language-switch :is(a,summary):focus:not(:focus-visible) {outline:none;}
/* With the collapsed navigation, the language control sits just before the menu button. */
@media (max-width:1023px) {.masthead__inner>.brand{order:-2;}.masthead__inner>.language-switch{order:-1;margin-left:auto;}.masthead__inner>.menu-toggle{margin-left:0;}}
@container masthead (max-width:62.5rem) {.masthead__inner>.brand{order:-2;}.masthead__inner>.language-switch{order:-1;margin-left:auto;}.masthead__inner>.menu-toggle{margin-left:0;}}
.masthead--compact .masthead__inner>.brand{order:-2;}.masthead--compact .masthead__inner>.language-switch{order:-1;margin-left:auto;}.masthead--compact .masthead__inner>.menu-toggle{margin-left:0;}
/* Smallest phones: brand, language code and menu button share one row. */
@media (max-width:370px) {.masthead__inner>.brand{flex:1 1 9rem;}.language-switch__globe{display:none;}.language-switch>summary{padding:0 .4rem;}}
html:lang(zh-Hans) {font-family:'Hanken Grotesk','PingFang SC','Microsoft YaHei','Noto Sans CJK SC','WenQuanYi Micro Hei',sans-serif;line-height:1.65;}
html:lang(zh-Hans) body,html:lang(zh-Hans) button,html:lang(zh-Hans) input,html:lang(zh-Hans) select {font-family:'Hanken Grotesk','PingFang SC','Microsoft YaHei','Noto Sans CJK SC',sans-serif;}
html:lang(zh-Hans) :is(h1,h2,h3,h4,.hero__title,.page__title) {font-family:var(--serif);line-height:1.35;}
html:lang(zh-Hans) * {letter-spacing:normal;text-transform:none;}
html:lang(zh-Hans) :is(p,summary,.page__lede) {line-height:1.75;}
html:lang(zh-Hans) :is(code,pre,.mono) {font-family:'JetBrains Mono',monospace;}
html:lang(zh-Hans) .nav a {white-space:nowrap;}
@media(max-width:700px){.masthead__socials{display:none;}}
@media(prefers-reduced-motion:reduce){.language-switch *,.language-switch>summary::after{transition:none;animation:none;}}
/* The same header must fit when the reader doubles the text size. */
.masthead__inner {flex-wrap:wrap;}
header:has(>.language-switch) {flex-wrap:wrap;}
@media(max-width:700px){.masthead__inner{column-gap:.4rem;row-gap:0;}header:has(>.language-switch){gap:.5rem 1rem;}}
html:lang(zh-Hans) :is(em,.eyebrow) {font-style:normal;}
html:lang(zh-Hans) * {font-style:normal;}
.brand__text .brand__name {white-space:normal;overflow-wrap:anywhere;line-height:1.25;}
/* Chinese inside the design's own font stacks, so every component that uses
   var(--sans), var(--serif) or var(--mono) gets a CJK face rather than the
   browser default. Windows has no good CJK serif (SimSun is thin at display
   sizes), so serif text falls back to Microsoft YaHei there. */
html:lang(zh-Hans) {
  --sans:"Hanken Grotesk","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC","Noto Sans SC","WenQuanYi Micro Hei",ui-sans-serif,system-ui,sans-serif;
  --serif:"Fraunces","Songti SC","STSong","Source Han Serif SC","Noto Serif CJK SC","Noto Serif SC","Microsoft YaHei","WenQuanYi Micro Hei",serif;
  --mono:"JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,Consolas,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC","WenQuanYi Micro Hei",monospace;
  /* No slanted CJK: Latin keeps its real italic face, Chinese stays upright. */
  font-synthesis-style:none;
}
/* Tracking and capitals from the English design do not apply to Chinese; the
   element-level resets above lose to component selectors. */
html:lang(zh-Hans) * {letter-spacing:normal !important;text-transform:none !important;}
/* Chinese below 12px is hard to read; the English design relies on caps and
   tracking at these sizes. */
html:lang(zh-Hans) :is(.pill,.tag,thead th,th .sort,.metric__label,.metric__unit,.stat__label,.stat__unit,.outcome-note,.outcome-note__fact,.outcome-definition,.dir__fee,.dir__tick,.dir__meta,.reward-rate-card__scale,.eyebrow,.learn-node__scope,.holdings-axis-title,.addr__copy,.burn-receipts__kind,.treasury-stat__label,.treasury-kpi__caption,.chip__label,.drawer__stat-label,.chart-hover__note,.network-total-scope,.network-total-basis>summary,.inspector-peek__figures span,.position-inventory__balance small,.prong__approx,.flow__num,.network-headline span) {font-size:.75rem;}
.language-switch a[lang="zh-Hans"] .language-switch__name {font-size:max(.875rem,1em);}
/* Headings break at punctuation and spaces rather than inside words. */
html:lang(zh-Hans) :is(h1,h2,.hero__title,.story__title) {word-break:keep-all;overflow-wrap:anywhere;}
html:lang(zh-Hans) .disclaimer__close {white-space:nowrap;flex-shrink:0;}
/* Use installed Hangul faces; no extra font download or synthetic italics. */
html:lang(ko) {
  --sans:"Hanken Grotesk","Apple SD Gothic Neo","Malgun Gothic","Noto Sans CJK KR","Noto Sans KR",system-ui,sans-serif;
  --serif:"Fraunces","Apple SD Gothic Neo","Malgun Gothic","Noto Serif CJK KR",serif;
  --mono:"JetBrains Mono","Apple SD Gothic Neo","Malgun Gothic",monospace;
  font-synthesis-style:none;
}
html:lang(ko) * {letter-spacing:normal !important;text-transform:none !important;font-style:normal;}
html:lang(ko) :is(p,summary,.page__lede) {line-height:1.75;word-break:keep-all;overflow-wrap:anywhere;}
html:lang(ko) :is(h1,h2,h3,h4,.hero__title) {word-break:keep-all;overflow-wrap:anywhere;line-height:1.35;}
html:lang(vi) :is(p,summary,.page__lede) {line-height:1.7;}
.language-switch a:is([lang="zh-Hans"],[lang="ko"]) .language-switch__name {font-size:max(.875rem,1em);}
