/*
 MyArrival v3.5.3
 Language-aware customer typography.
 Loaded after site-v2.css and site-v3.css.
*/

/* ---------- Shared multilingual rhythm ---------- */
html{
  font-kerning:normal;
  text-rendering:optimizeLegibility;
}

body,
input,
select,
textarea,
button{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

:where(
  .hero-copy,.documents-lead,.trust-text,
  .plain-card p,.policy-content p,.policy-content li,
  .flow-heading p,.flow-doc-hero p,.flow-complete p,
  .flow-summary p,.flow-help,.flow-alert,
  .document-info small,.document-consent,.documents-reassurance p,
  .status-callout p,.status-history p,.status-security,
  .correction-scope-note,.completion-record-note p,
  .footer-brand p,.footer-disclaimer p
){
  text-wrap:pretty;
}

:where(
  .hero-v2 h1,.section-v2 h2,.documents-intro h1,.policy-heading h1,
  .check-hero h1,.adaptive-hero h1,
  .flow-heading h1,.flow-doc-hero h1,.flow-complete h1,
  .completion-record-top h1,.plain-card h3,.document-info strong
){
  text-wrap:balance;
  overflow-wrap:normal;
}

.btn-v2,
.flow-actions button,
.flow-actions a,
.documents-actions button,
.documents-actions a,
.flow-voucher button,
.language-switcher button{
  line-height:1.35;
  white-space:normal;
  text-align:center;
}

.flow-field label,
.flow-label-row,
.flow-error,
.flow-help,
.status-track-step,
.status-summary,
.completion-record-grid{
  line-height:1.45;
}

/* ---------- CJK shared ---------- */
html:lang(zh-Hans) body,
html:lang(zh-Hans) input,
html:lang(zh-Hans) select,
html:lang(zh-Hans) textarea,
html:lang(zh-Hans) button{
  font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Source Han Sans SC",system-ui,sans-serif;
}
html:lang(zh-Hant) body,
html:lang(zh-Hant) input,
html:lang(zh-Hant) select,
html:lang(zh-Hant) textarea,
html:lang(zh-Hant) button{
  font-family:"PingFang TC","Microsoft JhengHei","Noto Sans CJK TC","Source Han Sans TC",system-ui,sans-serif;
}
html:lang(ja) body,
html:lang(ja) input,
html:lang(ja) select,
html:lang(ja) textarea,
html:lang(ja) button{
  font-family:"Hiragino Sans","Yu Gothic UI","Yu Gothic","Meiryo","Noto Sans JP",system-ui,sans-serif;
}
html:lang(ko) body,
html:lang(ko) input,
html:lang(ko) select,
html:lang(ko) textarea,
html:lang(ko) button{
  font-family:"Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR",system-ui,sans-serif;
}

html:lang(zh-Hans) body,
html:lang(zh-Hant) body,
html:lang(ja) body{
  line-height:1.68;
  line-break:strict;
  word-break:normal;
}
html:lang(ko) body{
  line-height:1.68;
  word-break:keep-all;
  overflow-wrap:break-word;
}

html:lang(zh-Hans) :where(p,li,dd,small,label,span),
html:lang(zh-Hant) :where(p,li,dd,small,label,span),
html:lang(ja) :where(p,li,dd,small,label,span),
html:lang(ko) :where(p,li,dd,small,label,span){
  letter-spacing:0;
}

/* English-style negative tracking looks cramped in CJK. */
html:lang(zh-Hans) :where(
  .hero-v2 h1,.section-v2 h2,.documents-intro h1,.policy-heading h1,
  .check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,
  .flow-complete h1,.completion-record-top h1,.plain-card h3,
  .document-info strong,.manifesto strong,.flow-summary section>strong
),
html:lang(zh-Hant) :where(
  .hero-v2 h1,.section-v2 h2,.documents-intro h1,.policy-heading h1,
  .check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,
  .flow-complete h1,.completion-record-top h1,.plain-card h3,
  .document-info strong,.manifesto strong,.flow-summary section>strong
),
html:lang(ja) :where(
  .hero-v2 h1,.section-v2 h2,.documents-intro h1,.policy-heading h1,
  .check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,
  .flow-complete h1,.completion-record-top h1,.plain-card h3,
  .document-info strong,.manifesto strong,.flow-summary section>strong
),
html:lang(ko) :where(
  .hero-v2 h1,.section-v2 h2,.documents-intro h1,.policy-heading h1,
  .check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,
  .flow-complete h1,.completion-record-top h1,.plain-card h3,
  .document-info strong,.manifesto strong,.flow-summary section>strong
){
  letter-spacing:-.015em!important;
  line-height:1.12!important;
}

/* Slightly smaller display sizes give translated headings room to breathe. */
html:lang(zh-Hans) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
html:lang(zh-Hant) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
html:lang(ja) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
html:lang(ko) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1){
  font-size:clamp(46px,6.5vw,88px)!important;
}

html:lang(zh-Hans) .section-v2 h2,
html:lang(zh-Hant) .section-v2 h2,
html:lang(ja) .section-v2 h2,
html:lang(ko) .section-v2 h2{
  font-size:clamp(42px,5.4vw,72px)!important;
}

/* Uppercase/large tracking is Latin-specific. */
html:lang(zh-Hans) :where(
  .flow-form-section h2,.flow-summary-head span,.status-summary small,
  .completion-record-grid dt,.footer-disclaimer strong,.compact-review-grid h3,
  .adaptive-section h2,.quick-field-title>span
),
html:lang(zh-Hant) :where(
  .flow-form-section h2,.flow-summary-head span,.status-summary small,
  .completion-record-grid dt,.footer-disclaimer strong,.compact-review-grid h3,
  .adaptive-section h2,.quick-field-title>span
),
html:lang(ja) :where(
  .flow-form-section h2,.flow-summary-head span,.status-summary small,
  .completion-record-grid dt,.footer-disclaimer strong,.compact-review-grid h3,
  .adaptive-section h2,.quick-field-title>span
),
html:lang(ko) :where(
  .flow-form-section h2,.flow-summary-head span,.status-summary small,
  .completion-record-grid dt,.footer-disclaimer strong,.compact-review-grid h3,
  .adaptive-section h2,.quick-field-title>span
){
  text-transform:none!important;
  letter-spacing:.025em!important;
  line-height:1.5;
}

/* CJK serif numerals/headings should not fall back to missing glyphs. */
html:lang(zh-Hans) :where(.manifesto .big,.manifesto .step-no,.plain-card .num,.upload-index,.journey-step span,.document-number,.ready-count span,.flow-upload-number),
html:lang(zh-Hant) :where(.manifesto .big,.manifesto .step-no,.plain-card .num,.upload-index,.journey-step span,.document-number,.ready-count span,.flow-upload-number),
html:lang(ja) :where(.manifesto .big,.manifesto .step-no,.plain-card .num,.upload-index,.journey-step span,.document-number,.ready-count span,.flow-upload-number),
html:lang(ko) :where(.manifesto .big,.manifesto .step-no,.plain-card .num,.upload-index,.journey-step span,.document-number,.ready-count span,.flow-upload-number){
  font-family:inherit!important;
}

/* ---------- Thai ---------- */
html:lang(th) body,
html:lang(th) input,
html:lang(th) select,
html:lang(th) textarea,
html:lang(th) button{
  font-family:"Leelawadee UI","Th Sarabun New",Tahoma,"Noto Sans Thai",system-ui,sans-serif;
}
html:lang(th) body{
  line-height:1.78;
  word-break:normal;
  overflow-wrap:break-word;
}
html:lang(th) :where(p,li,dd,small,label,span,h1,h2,h3,strong){
  letter-spacing:0!important;
}
html:lang(th) :where(
  .hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,
  .flow-heading h1,.flow-doc-hero h1,.flow-complete h1,.policy-heading h1
){
  font-size:clamp(44px,6.1vw,82px)!important;
  line-height:1.16!important;
  letter-spacing:0!important;
}
html:lang(th) .section-v2 h2{
  font-size:clamp(40px,5.2vw,68px)!important;
  line-height:1.18!important;
  letter-spacing:0!important;
}
html:lang(th) :where(
  .hero-copy,.documents-lead,.trust-text,.plain-card p,.policy-content p,.policy-content li,
  .flow-heading p,.flow-doc-hero p,.flow-complete p,.document-info small,
  .document-consent,.footer-disclaimer p
){
  line-height:1.78!important;
}
html:lang(th) :where(
  .flow-form-section h2,.flow-summary-head span,.status-summary small,
  .completion-record-grid dt,.footer-disclaimer strong,.compact-review-grid h3,
  .adaptive-section h2,.quick-field-title>span
){
  text-transform:none!important;
  letter-spacing:0!important;
  line-height:1.65;
}

/* ---------- Vietnamese & Indonesian ---------- */
html:lang(vi) body,
html:lang(vi) input,
html:lang(vi) select,
html:lang(vi) textarea,
html:lang(vi) button{
  font-family:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
html:lang(id) body,
html:lang(id) input,
html:lang(id) select,
html:lang(id) textarea,
html:lang(id) button{
  font-family:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
html:lang(vi) body,
html:lang(id) body{
  line-height:1.64;
}
html:lang(vi) :where(p,li,dd),
html:lang(id) :where(p,li,dd){
  hyphens:auto;
  overflow-wrap:break-word;
}
html:lang(vi) :where(
  .hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,
  .flow-heading h1,.flow-doc-hero h1,.flow-complete h1,.policy-heading h1
),
html:lang(id) :where(
  .hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,
  .flow-heading h1,.flow-doc-hero h1,.flow-complete h1,.policy-heading h1
){
  font-size:clamp(46px,6.5vw,88px)!important;
  line-height:1.04!important;
  letter-spacing:-.035em!important;
}

/* ---------- Layout resilience for translated strings ---------- */
:where(.site-nav,.actions-v2,.flow-actions,.documents-actions,.check-action-right){
  row-gap:10px;
}

:where(.btn-v2,.flow-choice span,.documents-submit,.check-submit){
  min-width:0;
  max-width:100%;
}

.flow-progress span,
.journey-step,
.status-track-step span{
  line-height:1.35;
}

html:not(:lang(en)) .flow-progress span{
  white-space:normal;
  text-align:center;
}

html:not(:lang(en)) .document-action,
html:not(:lang(en)) .flow-upload-status{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.4;
}

html:not(:lang(en)) .footer-grid{
  gap:clamp(32px,5vw,64px);
}

html:not(:lang(en)) .policy-content{
  max-width:880px;
}

html:not(:lang(en)) .flow-summary-head{
  gap:12px;
}

html:not(:lang(en)) .flow-summary-head span,
html:not(:lang(en)) .status-summary small{
  white-space:normal;
}

@media(max-width:860px){
  .site-header{
    gap:14px;
  }
  .site-nav{
    gap:10px!important;
  }
  .site-nav > a{
    white-space:nowrap;
  }
  .language-switcher select{
    max-width:132px;
  }
}

@media(max-width:620px){
  html:not(:lang(en)) .flow-progress{
    gap:8px;
  }
  html:not(:lang(en)) .flow-progress span{
    font-size:10px;
    max-width:74px;
  }
  html:not(:lang(en)) .flow-progress i{
    min-width:10px;
  }

  html:lang(zh-Hans) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
  html:lang(zh-Hant) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
  html:lang(ja) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
  html:lang(ko) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
  html:lang(th) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
  html:lang(vi) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1),
  html:lang(id) :where(.hero-v2 h1,.documents-intro h1,.check-hero h1,.adaptive-hero h1,.flow-heading h1,.flow-doc-hero h1,.flow-complete h1){
    font-size:clamp(40px,12vw,60px)!important;
  }

  html:not(:lang(en)) .status-track{
    grid-template-columns:repeat(5,minmax(88px,1fr));
  }

  html:not(:lang(en)) .status-track-step{
    min-width:88px;
  }
}


/* v3.5.4 — Header language selector alignment */

/*
 The language name is already available from the select itself.
 Keep the accessible text for screen readers, but remove it from
 visual layout so it cannot push the select out of alignment.
*/
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* Keep all header controls on the same visual center line. */
.site-header{
  align-items:center!important;
}

.site-nav{
  display:flex;
  align-items:center!important;
}

.language-switcher{
  display:inline-flex!important;
  align-items:center!important;
  align-self:center!important;
  margin:0!important;
  vertical-align:middle;
}

.language-switcher label{
  display:inline-flex!important;
  align-items:center!important;
  margin:0!important;
  padding:0!important;
}

.language-switcher select{
  display:block;
  height:54px;
  min-height:54px;
  margin:0!important;
  line-height:1.2;
}

/* Start has a 54px visual control height; match it for a cleaner header rhythm. */
.site-nav > a{
  display:inline-flex;
  align-items:center;
}

@media(max-width:720px){
  .language-switcher select{
    height:44px;
    min-height:44px;
  }
}

/* v3.7.13.1 — keep the complete customer header inside narrow screens. */
@media(max-width:480px){
  body{margin:0}
  .site-header{
    padding-left:12px!important;
    padding-right:12px!important;
    gap:8px!important;
  }
  .header-country-flag{display:none!important}
  .wordmark{font-size:22px!important}
  .site-nav{
    min-width:0;
    gap:6px!important;
  }
  .site-nav > a:first-child{
    padding:8px 10px!important;
    font-size:12px!important;
  }
  .language-switcher{min-width:0}
  .language-switcher select{
    width:100px;
    min-width:0;
    max-width:100px;
    height:42px;
    min-height:42px;
    padding:6px 24px 6px 8px;
    font-size:11px;
  }
}

/* v3.7.13.4 — flexible FAQ typography for every supported script. */
html:not(:lang(en)) .home-faq{
  hyphens:none;
}
html:not(:lang(en)) .home-faq-heading .section-kicker{
  text-transform:none;
  letter-spacing:.04em;
  line-height:1.5;
}
html:not(:lang(en)) .home-faq-heading h2{
  font-family:inherit!important;
  font-size:clamp(40px,4.2vw,56px)!important;
  line-height:1.14!important;
  letter-spacing:-.02em!important;
  font-weight:650!important;
  max-width:18ch;
  text-wrap:balance;
}
html:not(:lang(en)) .home-faq-heading>p{
  max-width:38ch;
  line-height:1.7;
  text-wrap:pretty;
}
html:not(:lang(en)) .home-faq-question{
  font-weight:620;
  line-height:1.5;
  text-wrap:pretty;
}
html:not(:lang(en)) .home-faq-answer{
  line-height:1.78;
  text-wrap:pretty;
}

@media(min-width:861px){
  html:not(:lang(en)) .home-faq-heading{
    grid-template-columns:minmax(0,1.08fr) minmax(280px,.92fr);
    gap:clamp(42px,7vw,92px);
  }
}

html:is(:lang(zh-Hans),:lang(zh-Hant),:lang(ja),:lang(ko)) .home-faq-heading h2{
  font-size:clamp(40px,4vw,54px)!important;
  line-height:1.2!important;
  letter-spacing:-.015em!important;
  font-weight:620!important;
}
html:is(:lang(zh-Hans),:lang(zh-Hant),:lang(ja),:lang(ko)) .home-faq-heading .section-kicker{
  letter-spacing:.06em;
}
html:is(:lang(zh-Hans),:lang(zh-Hant),:lang(ja),:lang(ko)) .home-faq-question{
  font-weight:600;
  line-height:1.6;
}
html:is(:lang(zh-Hans),:lang(zh-Hant),:lang(ja),:lang(ko)) .home-faq-answer{
  line-height:1.85;
}

html:lang(ko) .home-faq :where(h2,.home-faq-question,.home-faq-answer p){
  word-break:keep-all;
  overflow-wrap:break-word;
}

html:lang(th) .home-faq-heading .section-kicker{
  letter-spacing:0;
}
html:lang(th) .home-faq-heading h2{
  font-size:clamp(42px,4.3vw,58px)!important;
  line-height:1.28!important;
  letter-spacing:0!important;
  font-weight:600!important;
  text-wrap:wrap;
}
html:lang(th) .home-faq-question{
  font-weight:600;
  line-height:1.65;
}
html:lang(th) .home-faq-answer{
  line-height:1.9;
}

html:is(:lang(vi),:lang(id)) .home-faq-heading h2{
  font-size:clamp(40px,4.2vw,56px)!important;
  line-height:1.12!important;
  letter-spacing:-.025em!important;
  font-weight:650!important;
}
html:is(:lang(vi),:lang(id)) .home-faq-question{
  line-height:1.5;
}

@media(max-width:480px){
  html:not(:lang(en)) .home-faq-heading h2{
    font-size:34px!important;
    line-height:1.18!important;
    max-width:100%;
  }
  html:is(:lang(zh-Hans),:lang(zh-Hant),:lang(ja),:lang(ko)) .home-faq-heading h2{
    font-size:35px!important;
    line-height:1.25!important;
  }
  html:lang(th) .home-faq-heading h2{
    font-size:36px!important;
    line-height:1.32!important;
  }
  html:not(:lang(en)) .home-faq-heading>p{
    max-width:100%;
    line-height:1.65;
  }
  html:not(:lang(en)) .home-faq-question{
    line-height:1.55;
  }
  html:is(:lang(zh-Hans),:lang(zh-Hant),:lang(ja),:lang(ko),:lang(th)) .home-faq-question{
    line-height:1.65;
  }
  html:not(:lang(en)) .home-faq-answer{
    line-height:1.72;
  }
  html:is(:lang(zh-Hans),:lang(zh-Hant),:lang(ja),:lang(ko),:lang(th)) .home-faq-answer{
    line-height:1.85;
  }
}
