/* iBank 中英双语：语言按钮 + 伪元素文案覆盖。由 tools/ship_to_source.py 生成，勿手改。 */
/* v147 左右拖动 switch：左「中」/ 右「EN」，滑块高亮当前语言。
   保留 #ibk-lang-btn id 与 click 切换——大量验收脚本依赖它 programmatic click。
   视觉与 #login-top-btn 同一层级：细边胶囊、不抢眼；当前语言靠滑块位置表达，
   不再用"按钮文案显示目标语言"的旧做法。 */
#ibk-lang-btn.lang-switch{position:relative;display:inline-flex;align-items:center;
  width:64px;height:32px;padding:3px;box-sizing:border-box;flex:0 0 auto;
  border:1px solid var(--panel-border,rgba(148,163,184,.5));border-radius:999px;
  background:var(--panel,#fff);color:var(--muted);cursor:pointer;user-select:none;
  touch-action:none;transition:border-color .16s ease}
#ibk-lang-btn.lang-switch:hover{border-color:var(--accent,#6366f1)}
.ls-track{position:relative;display:flex;width:100%;height:100%;align-items:center;
  border-radius:999px;overflow:hidden}
.ls-knob{position:absolute;top:0;left:0;width:50%;height:100%;border-radius:999px;
  background:var(--accent-solid,var(--accent,#6366f1));z-index:0;
  transition:transform .2s cubic-bezier(.2,.8,.2,1)}
#ibk-lang-btn.ibk-en .ls-knob{transform:translateX(100%)}
.ls-opt{position:relative;z-index:1;flex:1;text-align:center;
  font:600 11.5px/1 inherit;letter-spacing:.2px;transition:color .2s ease;pointer-events:none}
#ibk-lang-btn:not(.ibk-en) .ls-opt-zh{color:#fff}
#ibk-lang-btn.ibk-en .ls-opt-en{color:#fff}
.ls-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* 独立页面兜底：没有导航栏时放左上角，避免沉到长文档底部 */
body > #ibk-lang-btn.ibk-floating{position:fixed;top:12px;left:12px;z-index:2147483000;
  border-radius:999px;background:var(--panel,#fff);box-shadow:0 2px 10px rgba(15,23,42,.18)}
@media (max-width:640px){
  #ibk-lang-btn.lang-switch{width:58px;height:29px;padding:2px}
}
/* 伪元素里的文案（content:'模拟数据' 这类）改不了 DOM 文本，只能靠更高优先级的规则覆盖。
   挂在 html[lang="en"] 下，切回中文时自动失效。 */
html[lang="en"] #sim-chart-title::after{content:'Simulated data'}
html[lang="en"] .fold-panel > summary::after{content:'▾ Expand'}
html[lang="en"] .fold-panel[open] > summary::after{content:'▴ Collapse'}
