/* Site languages: type for each script, and the language menu in the nav (js/i18n.js) */
/* Poppins/Inter/JetBrains Mono carry no Thai, CJK or Arabic glyphs. Latin keeps the site faces;
   each script gets a matching face behind them. i18n-fh/fb/fm mark what the site set originally. */
html[lang="ja"] .i18n-fh{font-family:'Poppins','Noto Sans JP',sans-serif!important}
html[lang="ja"] :is(.i18n-fb,.i18n-fm){font-family:'Inter','Noto Sans JP',sans-serif!important}
html[lang="zh-Hans"] .i18n-fh{font-family:'Poppins','Noto Sans SC',sans-serif!important}
html[lang="zh-Hans"] :is(.i18n-fb,.i18n-fm){font-family:'Inter','Noto Sans SC',sans-serif!important}
html[lang="zh-Hant"] .i18n-fh{font-family:'Poppins','Noto Sans TC',sans-serif!important}
html[lang="zh-Hant"] :is(.i18n-fb,.i18n-fm){font-family:'Inter','Noto Sans TC',sans-serif!important}
html[lang="ko"] .i18n-fh{font-family:'Poppins','Noto Sans KR',sans-serif!important}
html[lang="ko"] :is(.i18n-fb,.i18n-fm){font-family:'Inter','Noto Sans KR',sans-serif!important}
html[lang="th"] .i18n-fh{font-family:'Poppins','Prompt',sans-serif!important}
html[lang="th"] :is(.i18n-fb,.i18n-fm){font-family:'Inter','Noto Sans Thai',sans-serif!important}
html[lang="ar"] .i18n-fh{font-family:'Poppins','IBM Plex Sans Arabic',sans-serif!important}
html[lang="ar"] :is(.i18n-fb,.i18n-fm){font-family:'Inter','IBM Plex Sans Arabic',sans-serif!important}

/* Tracking: Arabic letters must join, Thai marks must stack; CJK reads better untracked */
html:is([lang="ja"],[lang="zh-Hans"],[lang="zh-Hant"],[lang="ko"],[lang="th"],[lang="ar"]) body *{letter-spacing:0!important}
html:is([lang="ja"],[lang="zh-Hans"],[lang="zh-Hant"],[lang="ko"],[lang="th"],[lang="ar"]) .i18n-fm{text-transform:none!important}
html:is([lang="ja"],[lang="zh-Hans"],[lang="zh-Hant"],[lang="ko"]) :is(h1,h2,h3,h4,h5){line-height:1.32!important}
html:is([lang="ja"],[lang="zh-Hans"],[lang="zh-Hant"],[lang="ko"]) :is(p,li){line-height:1.8}
html[lang="th"] :is(h1,h2,h3,h4,h5){line-height:1.42!important}
html[lang="th"] :is(p,li){line-height:1.85}
html[lang="ar"] :is(h1,h2,h3,h4,h5){line-height:1.5!important;font-weight:700!important}
html[lang="ar"] :is(p,li){line-height:1.9}
html[lang="ko"] body{word-break:keep-all}
html[lang="ja"] body{word-break:auto-phrase}

/* English lines were held on one line by hand; other languages run longer, so let them wrap */
html:not([lang="en"]) :is(#how .sec-title,.intg-tagline,#features .sec-sub,#personas .sec-sub,.nowrap-lg){white-space:normal!important}
html:not([lang="en"]) .btn{white-space:normal;text-align:center;line-height:1.25}

/* Text runs the switcher groups keep their original flex layout (gaps, separators) */
.i18n-run{display:contents}
/* Nav labels stay on one line */
.menu>li>a,.menu>li>button{white-space:nowrap}
/* Kanji, hangul and Thai read large at the Latin size; step the hero headline down */
html:is([lang="ja"],[lang="zh-Hans"],[lang="zh-Hant"],[lang="ko"]) .hero h1{font-size:clamp(30px,4.2vw,48px)}
html[lang="th"] .hero h1{font-size:clamp(32px,4.6vw,52px)}
/* Longer labels: a little less side padding per nav item keeps the bar on one row */
html:not([lang="en"]) .menu>li>a,html:not([lang="en"]) .menu>li>button{padding-left:10px;padding-right:10px}
/* Trust row reads as one sentence with dots between the items, wrapping like text */
.hero-trust .i18n-run{display:inline;line-height:1.7}
.hero-trust .i18n-run .sep{display:inline-block;vertical-align:middle;margin:0 10px}

/* English headings are held on one line by hand; translated ones wrap freely */
html:not([lang="en"]) :is(h1,h2,h3,h4,p,.sec-title,.sec-sub){white-space:normal!important}
/* Long compounds (German especially) break with hyphens instead of running off narrow screens */
html:not([lang="en"]) :is(h1,h2,h3){hyphens:auto;-webkit-hyphens:auto;overflow-wrap:break-word}

html.i18n-pending body{visibility:hidden}

/* Language menu */
.lang-sw{position:relative;flex-shrink:0;margin-left:12px;margin-inline-start:12px}
.lang-btn{display:inline-flex;align-items:center;gap:6px;height:42px;padding:0 8px;background:none;border:0;border-radius:var(--r-sm);color:var(--n700);font-family:'Inter',system-ui,sans-serif;font-size:14px;font-weight:600;letter-spacing:0;cursor:pointer;transition:background var(--d-base) var(--ease)}
.lang-btn:hover,.lang-btn[aria-expanded="true"]{background:var(--n100);color:var(--ink)}
.lang-btn .ico{width:19px;height:19px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.lang-btn .lang-chev{width:14px;height:14px;stroke-width:2.2;transition:transform var(--d-base) var(--ease)}
.lang-btn[aria-expanded="true"] .lang-chev{transform:rotate(180deg)}
.lang-menu{position:absolute;top:calc(100% + 8px);inset-inline-end:0;z-index:130;min-width:176px;margin:0;padding:6px;list-style:none;background:#fff;border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--e3)}
.lang-menu button{display:block;width:100%;padding:9px 12px;background:none;border:0;border-radius:6px;color:var(--ink);font:500 14.5px/1.3 'Inter','Noto Sans JP','Noto Sans SC','Noto Sans KR','Noto Sans Thai','IBM Plex Sans Arabic',system-ui,sans-serif;letter-spacing:0;text-align:start;cursor:pointer}
.lang-menu button:hover{background:var(--n100)}
.lang-menu button[aria-current="true"]{background:var(--sky-50);color:var(--sky-600);font-weight:600}
.lang-btn:focus-visible,.lang-menu button:focus-visible{outline:3px solid var(--sky);outline-offset:1px}
@media(max-width:1130px){
  .lang-sw{margin-left:auto;margin-inline-start:auto}
  .burger{margin-left:4px;margin-inline-start:4px}
}
