/* NAFBY public responsive refinements — 2026-11-12.
   Loaded after the original page styles. No changes to image paths or SEO. */
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%}
img,svg,video,canvas,iframe{max-width:100%}
img,video{height:auto}
h1,h2,h3,h4,p,li,a,span,strong,small,td,th{overflow-wrap:anywhere}
pre,code{max-width:100%;overflow-wrap:anywhere}
pre{white-space:pre-wrap;overflow-x:auto}
/* Technical comparisons scroll within their table instead of widening the document.
   This also covers standalone /บทความ.html, which has no article-shell wrapper. */
.article-shell table, body > table{
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
}
.partner-credit-footer{max-width:100%;flex-wrap:wrap}
.partner-credit-footer span{white-space:normal;overflow-wrap:anywhere}

@media(max-width:900px){
  .site-header .navlinks{max-height:calc(100vh - 78px);max-height:calc(100dvh - 78px);overflow-y:auto;overscroll-behavior:contain}
  .site-header .navlinks a{min-width:0;overflow-wrap:anywhere}
}
@media(max-width:620px){
  /* Original standalone article pages have no typography framework. */
  body > h1{font-size:clamp(1.5rem,6vw,2rem);line-height:1.35}
  body > h2{font-size:clamp(1.2rem,4.7vw,1.6rem);line-height:1.45}
  .site-header .nav{min-width:0;gap:8px}
  .site-header .brand{min-width:0;max-width:calc(100% - 54px);flex:1 1 auto;gap:8px}
  .site-header .brand img{width:42px;height:42px;flex:0 0 42px;object-fit:contain}
  .site-header .brand > span{display:block;min-width:0}
  .site-header .brand b{display:block;overflow-wrap:anywhere;font-size:1rem;line-height:1.2}
  .site-header .menu-btn{flex:0 0 auto;margin-left:auto}
  .site-header .navlinks{top:66px;max-height:calc(100vh - 80px);max-height:calc(100dvh - 80px)}
  .hero-sub,.contact-band,.care-layout,.intent-grid,.case-grid,.technical-grid,
  .knowledge-grid,.faq-list,.facts-grid,.reviews-grid,.process-grid,
  .services-grid,.dense-checklist{grid-template-columns:minmax(0,1fr)}
  .services-grid > .service-card,
  .services-grid > .service-card:nth-last-child(-n+2){grid-column:1/-1;min-width:0}
  .service-card h3,.service-card p,.service-card a{max-width:100%;overflow-wrap:anywhere}
  .link-hub-shell,.footer-shell,.article-shell,.footer-top,.footer-columns,
  .footer-col,.footer-contact-grid,.footer-brand-block{min-width:0;max-width:100%}
  .mobile-bar{min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
  .mobile-bar a{min-width:0;padding-inline:5px;text-align:center;font-size:clamp(.73rem,3.2vw,.95rem);line-height:1.25;overflow-wrap:anywhere}
}
@media(max-width:380px){
  .footer-contact-grid{grid-template-columns:minmax(0,1fr)}
  .footer-brand-block{grid-template-columns:48px minmax(0,1fr)}
  .footer-brand-block img{width:48px;height:48px}
  .hub-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hub-stat{min-width:0;padding-inline:3px}
  .hub-stat strong,.hub-stat span{overflow-wrap:anywhere}
  .cta-row .btn{min-width:0;max-width:100%}
}
