/* CMS v3.7 — shared fluid sizing, readable Thai text, consistent image/content widths. */
:root { --site-content-max:1180px; --site-gutter:14px; }
*, *::before, *::after { box-sizing:border-box; }
html { max-width:100%; }
body { margin:0; min-width:0; max-width:100%; }
img, picture, video, canvas, svg { max-width:100%; }
img { height:auto; }
/* Align content with homepage & shared footer without accidentally stretching on very wide displays. */
body .container,
body .wrapper,
body .site-footer .container {
  width:min(var(--site-content-max), calc(100% - (var(--site-gutter) * 2)));
  max-width:var(--site-content-max);
  margin-inline:auto;
}
body .wrapper { padding-inline:0; }
/* The cards and their images must use the exact same usable content width. */
.contentlayout, .contentlayout > *, .contentlayout .panel,
.rich-article, .service-intro, .service-article-text,
.rich-article .figure, .rich-article figure { min-width:0; max-width:100%; }
.contentlayout { grid-template-columns:minmax(0, 1fr) minmax(0, 300px); }
.contentlayout > article { width:100%; }
.rich-article :is(.figure, .service-intro, .service-article-text, .service-context-sentence) { width:100%; }
.rich-article :is(.figure img, .service-article-text img, .service-article-text figure img) {
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  object-fit:contain;
}
.rich-article .service-article-text :is(table, pre) {
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
}
.rich-article .service-article-text table { display:block; }
.rich-article .service-article-text pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.rich-article :is(h1,h2,h3,h4,p,li,a,figcaption) { overflow-wrap:anywhere; }
/* Never allow editors' original image dimensions or long tokens to grow the grid. */
.rich-article .service-article-text :is(img, figure, table, blockquote, pre) { max-width:100%; }
.rich-article .service-article-text figure { margin-inline:0; }
.site-footer, .site-footer .footer-container,
.site-footer .footer-main, .site-footer .footer-main > *,
.site-footer .footer-bottom-last, .site-footer .footer-credits { min-width:0; max-width:100%; }
@media (max-width:900px) {
  .contentlayout { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:680px) {
  :root { --site-gutter:12px; }
  .site-footer .footer-promo-actions { min-width:0; }
  .site-footer .footer-credits { justify-content:flex-start; }
}
@media (max-width:380px) {
  :root { --site-gutter:10px; }
  .rich-article.panel { padding:clamp(12px,4vw,18px); }
  .site-footer .footer-promo { padding:18px 15px; }
  .site-footer .footer-cta { white-space:normal; overflow-wrap:anywhere; }
}
