/* i18n + header layout (generated by build_i18n.py). Loaded after style.css. */
/* Header language dropdown: short code on the button, full names in the panel */
.lang-menu{position:relative;flex:0 0 auto}
.lang-menu>summary{list-style:none;display:inline-flex;align-items:center;gap:5px;min-height:42px;padding:0 10px;border:1px solid rgba(255,255,255,.5);border-radius:9px;background:#0b1f36;color:#f4f9ff;font-family:var(--display),system-ui,sans-serif;font-size:12px;font-weight:800;line-height:1;white-space:nowrap;cursor:pointer}
.lang-menu>summary::-webkit-details-marker{display:none}
.lang-menu>summary:hover,.lang-menu[open]>summary{border-color:#fff}
.lang-menu>summary:focus-visible{outline:3px solid #20b9ff7a;outline-offset:3px}
.lang-caret{font-size:10px;opacity:.8}
.lang-panel{position:absolute;top:calc(100% + 8px);right:0;z-index:90;display:grid;grid-template-columns:1fr 1fr;gap:2px;width:min(300px,calc(100vw - 24px));max-height:min(62vh,440px);overflow:auto;padding:6px;background:#fff;border:1px solid #d8e5f1;border-radius:12px;box-shadow:0 20px 50px #00172a38}
.lang-panel a{padding:9px 10px;border-radius:8px;color:#0e2945;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lang-panel a:hover{background:#f1f8ff}
.lang-panel a[aria-current="true"]{background:#e6f5ff;color:#0770b4}

/* Mobile menu language list (shown inside the hamburger menu only) */
.mobile-lang{display:none;flex-wrap:wrap;gap:6px;padding:12px 0 4px}
.mobile-lang a{display:inline-flex;align-items:center;padding:7px 10px;border:1px solid #ffffff2b;border-radius:8px;color:#e4eef7;font-size:12px;font-weight:700}
.mobile-lang a[aria-current="true"]{background:#159cff;border-color:#159cff;color:#fff}

/* Header: one row. Every item may shrink or truncate, nothing is allowed to push past the viewport. */
.site-header .header-inner{width:min(1320px,calc(100% - 40px));min-height:70px;display:flex;align-items:center;gap:12px;min-width:0}
.brand{flex:0 1 auto;min-width:0;max-width:40%}
.brand-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.desktop-nav{flex:1 1 auto;min-width:0;overflow:hidden;gap:clamp(10px,1.4vw,22px)}
.header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-width:0;margin-left:auto}
.header-actions .button{min-width:0;max-width:min(40vw,210px);overflow:hidden;text-overflow:ellipsis}
.start-menu{min-width:0}
.start-menu-toggle{min-height:42px;min-width:0;max-width:min(52vw,250px)}
.start-menu-label{display:inline-block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.start-menu-label-long{display:none}
.start-menu-label-short{display:inline}
.mobile-menu-button{display:none;flex:0 0 auto}

@media(min-width:1361px){
  .start-menu-toggle{max-width:none}
  .start-menu-label-long{display:inline}
  .start-menu-label-short{display:none}
}
@media(max-width:1180px){
  .desktop-nav{display:none}
  .mobile-menu-button{display:grid}
  .mobile-lang{display:flex}
}
@media(max-width:1020px){
  .header-web{display:none}
}
@media(max-width:760px){
  .site-header .header-inner{width:calc(100% - 24px);gap:8px}
  .brand{max-width:none}
  .brand-text{font-size:13px}
  .header-actions{gap:6px}
  .start-menu-toggle{max-width:min(50vw,220px)}
  /* Language panel spans the header width on phones so it can never clip at a screen edge */
  .lang-menu{position:static}
  .lang-panel{left:12px;right:12px;width:auto;max-width:none}
}
@media(max-width:420px){
  .brand-text{display:none}
  .site-header .header-inner{width:calc(100% - 18px);gap:6px}
  .start-menu-toggle{padding-inline:11px}
  .start-menu-label{max-width:120px}
}
@media(max-width:340px){
  .start-menu-label{max-width:88px}
  .lang-menu>summary{padding:0 7px}
}

/* RTL */
html[dir="rtl"] .start-panel{right:auto;left:0}
html[dir="rtl"] .lang-panel{right:auto;left:0}
html[dir="rtl"] .desktop-nav a:after{left:auto;right:0}
html[dir="rtl"] .mobile-nav a,html[dir="rtl"] .faq-answer,html[dir="rtl"] .start-option{text-align:right}

/* Script-specific fonts */
html:lang(zh-CN), html:lang(zh-CN) * { font-family: "Noto Sans SC", system-ui, sans-serif !important; }
html:lang(zh-TW), html:lang(zh-TW) * { font-family: "Noto Sans TC", system-ui, sans-serif !important; }
html:lang(hi), html:lang(hi) * { font-family: "Noto Sans Devanagari", system-ui, sans-serif !important; }
html:lang(ur), html:lang(ur) * { font-family: "Noto Sans Arabic", system-ui, sans-serif !important; }
html:lang(bn), html:lang(bn) * { font-family: "Noto Sans Bengali", system-ui, sans-serif !important; }
html:lang(pa), html:lang(pa) * { font-family: "Noto Sans Gurmukhi", system-ui, sans-serif !important; }
html:lang(ta), html:lang(ta) * { font-family: "Noto Sans Tamil", system-ui, sans-serif !important; }
html:lang(te), html:lang(te) * { font-family: "Noto Sans Telugu", system-ui, sans-serif !important; }
html:lang(mr), html:lang(mr) * { font-family: "Noto Sans Devanagari", system-ui, sans-serif !important; }
html:lang(ja), html:lang(ja) * { font-family: "Noto Sans JP", system-ui, sans-serif !important; }
html:lang(ko), html:lang(ko) * { font-family: "Noto Sans KR", system-ui, sans-serif !important; }
html:lang(ar), html:lang(ar) * { font-family: "Noto Sans Arabic", system-ui, sans-serif !important; }
html:lang(th), html:lang(th) * { font-family: "Noto Sans Thai", system-ui, sans-serif !important; }
html:lang(fa), html:lang(fa) * { font-family: "Noto Sans Arabic", system-ui, sans-serif !important; }
