.nv-lang-wrap { position: relative; display: inline-flex; }
.nv-lang[aria-expanded="true"] { color: var(--nv-ink); background: var(--nv-hover); }
.nv-lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 45;
  display: grid; gap: 1px; min-width: 212px; padding: 6px;
  background: var(--nv-surface); border: 1px solid var(--nv-border); border-radius: 12px; box-shadow: var(--nv-shadow);
  animation: nv-lang-in .16s var(--nv-ease, ease) both;
}
.nv-lang-menu[hidden] { display: none; }
@keyframes nv-lang-in { from { opacity: 0; transform: translateY(-4px); } }
.nv-lang-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nv-lang-opt {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: center; column-gap: 10px;
  min-height: 40px; padding: 0 12px 0 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--nv-ink-2); font: inherit; font-size: 14px; line-height: 1.2; text-align: left; cursor: pointer;
  transition: background-color .15s var(--nv-ease, ease), color .15s var(--nv-ease, ease);
}
.nv-lang-opt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: transparent; justify-self: center; }
.nv-lang-opt:hover, .nv-lang-opt:focus-visible { background: var(--nv-hover); color: var(--nv-ink); }
.nv-lang-opt:focus-visible { outline-offset: -2px; }
.nv-lang-opt[aria-checked="true"] { color: var(--nv-ink); font-weight: 500; }
.nv-lang-opt[aria-checked="true"]::before { background: var(--nv-accent); }
.nv-lang-c { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; color: var(--nv-ink-3); }
.nv-lang-n[lang="ja"] { font-family: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif; }
.nv-lang-n[lang="zh-CN"] { font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif; }

html[data-hero-theme="light"] .px-on .nv-head[data-nav-theme="light"] .nv-lang-menu {
  --nv-ink: #0F1210;
  --nv-ink-2: #3E423D;
  --nv-ink-3: #5E625B;
  --nv-hover: rgba(15, 18, 16, .045);
  --nv-border: rgba(15, 18, 16, .09);
}

@media (max-width: 1023px) {
  .nv-utils .nv-lang-wrap { display: none; }
  .nv-sheet-utils .nv-lang-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; min-width: 236px; }
  .nv-sheet-utils .nv-lang-menu::before { top: auto; bottom: -10px; }
  .nv-sheet-utils .nv-lang-opt { min-height: 46px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .nv-lang-menu { animation: none; } }

html[lang="ja"] {
  --sans: "Inter", "Inter Display", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", monospace;
  --font-sans: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", monospace;
  line-break: strict;
}
html[lang="zh-CN"] {
  --sans: "Inter", "Inter Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", monospace;
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", monospace;
  line-break: strict;
}
html[lang="ja"] body, html[lang="zh-CN"] body { font-family: var(--sans); }
html:is([lang="ja"], [lang="zh-CN"]) :is(h1, h2, h3, h4, p, li, dd, dt, div, span, a, button, figcaption, em, b, i, time, address) { letter-spacing: 0 !important; }
html[lang="ja"] :is(h1, h2, h3, .hero-title, .lede) { word-break: auto-phrase; }
html:is([lang="ja"], [lang="zh-CN"]) :is(p, li, dd) { text-align: start; }

@media (max-width: 767px) {
  html:is([lang="de"], [lang="fr"], [lang="es"]) :is(p, li, dd, figcaption) { hyphens: auto; -webkit-hyphens: auto; }
  html[lang="de"] :is(h1, h2, h3) { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
}

html:is([lang="fr"], [lang="de"], [lang="es"]) .hx-app .evd-list :is(dt, dd) { hyphens: auto; -webkit-hyphens: auto; }
html:not([lang="en-GB"]) .hx-app .evd-flag { white-space: normal; }
html[lang="es"] .hx-app .evd-list .ses-verifiable { letter-spacing: .03em; }
html[lang="de"] .hx-app .ev2-sub .ag-flow-text { letter-spacing: -0.012em; }

html.hx-i18n-wait :is(.site-head, main, .ft) { visibility: hidden; animation: hx-i18n-failsafe 0s linear 1.5s forwards; }
@keyframes hx-i18n-failsafe { to { visibility: visible; } }
