/* Consistent bilingual navigation on the YDML public information website. */
.ydml-lang-switch{display:inline-flex;align-items:center;gap:3px;flex:0 0 auto;background:#f2f6f7;border:1px solid #d6e3e7;border-radius:999px;padding:3px;color:#155e75;white-space:nowrap;}
.ydml-lang-switch[hidden]{display:none!important;}
.ydml-lang-switch svg{margin:0 3px 0 5px;flex-shrink:0;}
.ydml-lang-switch button{appearance:none;display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:44px;padding:0 8px;border:0;border-radius:999px;background:transparent;color:#355a68;font:500 .78rem/1 system-ui,sans-serif;cursor:pointer;transition:background-color .15s,color .15s;}
.ydml-lang-switch button[aria-pressed="true"]{background:#155e75;color:#fff;}
.ydml-lang-switch button:focus-visible{outline:2px solid #155e75;outline-offset:3px;}
.ydml-lang-switch button:hover:not([aria-pressed="true"]){background:#e0ecef;}
.ydml-en-note{font-size:.83rem!important;color:#4b5b6b;line-height:1.5!important;margin:8px 0;}
.ydml-en-note[hidden]{display:none!important;}
html[lang="en"] :is(.ydml-home,.ydml-page,.sustainability-page) :is(h1,h2,h3,h4,h5,h6,.button,.site-nav,.sus-nav){font-family:"Noto Sans Thai",system-ui,sans-serif;}
html[lang="en"] .site-header .brand-title{font-size:.95rem!important;}
html[lang="en"] .site-header .brand-copy small{display:none!important;}
.site-header .header-inner,.sus-header .sus-header-inner{gap:10px!important;}
@media(min-width:1341px){
 .site-header .header-inner,.sus-header .sus-header-inner{width:min(1500px,calc(100% - 48px))!important;max-width:1500px!important;}
 .site-header .site-nav,.sus-header .sus-nav{flex:0 1 auto!important;justify-content:center!important;gap:6px!important;margin-left:auto!important;margin-right:auto!important;min-width:0!important;flex-wrap:nowrap!important;}
 .site-header .site-nav>a:not(.nav-cta),.sus-header .sus-nav>a{font-size:.84rem!important;padding:0 8px!important;flex:0 0 auto!important;white-space:nowrap!important;}
 .site-header .header-inner,.sus-header .sus-header-inner{gap:18px!important;justify-content:space-between!important;}
 .site-header .brand,.sus-header .sus-brand{flex:0 0 auto!important;}
 .ydml-lang-switch{margin-left:0!important;}
}
@media(max-width:1340px){
 .site-header .header-inner,.sus-header .sus-header-inner{width:calc(100% - 28px)!important;max-width:none!important;min-height:70px!important;position:relative!important;display:flex!important;align-items:center!important;}
 .site-header .brand,.sus-header .sus-brand{margin-right:auto!important;min-width:0;flex:0 1 auto!important;}
 .site-header .nav-toggle,.sus-header .sus-nav-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;min-width:44px!important;padding:0 12px!important;background:#155e75!important;color:#fff!important;border:0!important;border-radius:10px!important;font-weight:500!important;flex:0 0 auto!important;}
 .site-header .site-nav,.sus-header .sus-nav{display:none!important;position:absolute!important;top:calc(100% + 1px)!important;left:0!important;right:0!important;width:auto!important;height:auto!important;max-height:70vh!important;overflow-y:auto!important;background:#fff!important;border:1px solid #dce5e9!important;border-radius:12px!important;box-shadow:0 12px 28px rgba(11,46,82,.10)!important;padding:10px!important;flex-direction:column!important;align-items:stretch!important;gap:2px!important;z-index:1250!important;margin:0!important;transform:none!important;}
 .site-header .site-nav.open,.site-header .site-nav.is-open,.sus-header .sus-nav.open{display:flex!important;}
 .site-header .site-nav>a:not(.nav-cta),.sus-header .sus-nav>a{display:flex!important;min-height:44px!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;padding:0 12px!important;color:#28465a!important;font-size:.94rem!important;}
 .site-header .site-nav>a[aria-current="page"],.sus-header .sus-nav>a[aria-current="page"]{background:#eaf5f7!important;color:#155e75!important;}
}
@media(max-width:560px){
 .ydml-lang-switch svg{display:none;}
 .ydml-lang-switch button{min-width:35px;padding:0 6px;}
 .site-header .brand-copy small,.sus-header .sus-brand small{display:none!important;}
 .site-header .brand-title,.sus-header .sus-brand strong{font-size:.86rem!important;}
 .site-header .header-inner,.sus-header .sus-header-inner{gap:7px!important;}
 .site-header .nav-toggle,.sus-header .sus-nav-toggle{font-size:.79rem!important;padding:0 8px!important;}
}
@media(prefers-reduced-motion:reduce){.ydml-lang-switch button{transition:none;}}

/* Preserve the language switch clearance on narrower desktop headers. */
@media(min-width:1341px) and (max-width:1450px){
 .site-header .site-nav,.sus-header .sus-nav{gap:3px!important;}
 .site-header .site-nav>a:not(.nav-cta),.sus-header .sus-nav>a{padding-inline:5px!important;font-size:.79rem!important;}
 .site-header .header-inner,.sus-header .sus-header-inner{gap:12px!important;}
}

/* Editorial Thai line wrapping: native language-aware word boundaries.
   Emergency wrapping remains available for unusually narrow containers. */
html[lang="th"] :is(.ydml-home,.ydml-page,.sustainability-page) main :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,figcaption,summary,th,td,label,.button,.text-link,.service-card-grid span,.retekess-lead span) {
  word-break:normal!important;
  line-break:auto!important;
  overflow-wrap:break-word!important;
}
html[lang="th"] :is(.ydml-home,.ydml-page,.sustainability-page) main :is(h1,h2,h3,h4) {
  text-wrap:balance;
}
html[lang="th"] :is(.ydml-home,.ydml-page,.sustainability-page) main :is(p,li,figcaption) {
  text-wrap:pretty;
}
html[lang="th"] .ydml-home .ydml-home-intro-copy p {
  max-width:100%;
  line-height:1.8;
}
