/* RAM CMS v1.18 — one content rail for every public page family.
   Keeps source image pixels, HTML width/height, srcset and 2:1 covers intact. */
:root { --rc-rail-width:1200px; --rc-rail-gutter:clamp(10px,1.8vw,24px); }
html { max-width:100%; }
body { max-width:100%; overflow-x:clip; }
body, body * { box-sizing:border-box; }
/* Service pages; parent containers, banner and footer all share the same edges. */
body :is(.container,.hero-banner-top,.section-visual,.rc-ai-strip-inner,.rc-site-footer__wrap,.rc-site-footer__bottom-inner,.rc-geo-container) {
  box-sizing:border-box;
  max-width:100%;
  width:min(var(--rc-rail-width),calc(100% - 2 * var(--rc-rail-gutter))) !important;
  margin-inline:auto !important;
}
body .container .section-visual { width:100% !important; }
body .rc-site-footer__wrap, body .rc-site-footer__bottom-inner { padding-inline:0 !important; }
body :is(main,section,article,nav,figure,header,footer,.container,.article-shell,.article-card,.rc-ai-card-grid,.rc-geo-cols,.link-directory,.faq-list,.rc-ai-toc) { min-width:0; }
body main :is(img,picture,video,iframe,svg,canvas) { max-width:100%; }
body :is(.hero-banner-top,.section-visual) > :is(img,picture) { display:block; max-width:100%; }
body :is(.hero-banner-top,.section-visual) img { max-width:100%; height:auto; }
body :is(.table-scroll,.compare-wrap,.rc-ai-toc-items,.rc-ai-auto-table-wrap) { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; }
body main :is(p,h1,h2,h3,h4,li,td,th,summary,a) { overflow-wrap:anywhere; }
/* AI archive and AI article pages: previous template limited reading width to 1100px. */
body.rc-ai-public :is(.rc-ai-reading,.rc-ai-listing) {
  box-sizing:border-box;
  width:min(var(--rc-rail-width),calc(100% - 2 * var(--rc-rail-gutter))) !important;
  max-width:100% !important;
  margin-inline:auto !important;
  padding-inline:0 !important;
}
body.rc-ai-public .rc-ai-article-hero {
  display:block;
  width:100%;
  max-width:100%;
  aspect-ratio:2/1;
  height:auto;
  overflow:hidden;
}
body.rc-ai-public .rc-ai-article-hero img {
  width:100%; height:100%; object-fit:cover; object-position:center;
}
body.rc-ai-public .rc-ai-listing .rc-ai-card-grid,
body.rc-ai-public .rc-ai-reading :is(.rc-ai-prose,.rc-ai-related,.rc-ai-toc,.rc-ai-share) { width:100%; max-width:100%; min-width:0; }
body.rc-ai-public .rc-ai-topbar {
  box-sizing:border-box;
  padding-inline:max(var(--rc-rail-gutter),calc((100% - var(--rc-rail-width))/2));
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
body.rc-ai-public .rc-ai-topbar a { min-width:0; overflow-wrap:anywhere; }
body.rc-ai-public .rc-ai-prose :is(table,pre) { display:block; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
/* Province landing pages and service widgets are aligned to the same rail. */
body.rc-geo .rc-geo-entry { width:min(var(--rc-rail-width),calc(100% - 2 * var(--rc-rail-gutter))) !important; max-width:100%; }
body.rc-geo .rc-geo-cols > * { min-width:0; }
@media(max-width:767px) {
  :root { --rc-rail-gutter:12px; }
  body.rc-ai-public .rc-ai-topbar { padding:10px var(--rc-rail-gutter); }
  body.rc-ai-public .rc-ai-reading { padding-top:13px; padding-bottom:25px; }
  body.rc-ai-public .rc-ai-reading-head h1 { font-size:clamp(23px,5.6vw,33px); }
  body.rc-ai-public .rc-ai-card-grid { gap:9px; }
  body.rc-ai-public .rc-ai-toc { overflow:hidden; }
  body .article-shell { grid-template-columns:minmax(0,1fr) !important; }
}
@media(max-width:360px) {
  :root { --rc-rail-gutter:10px; }
  body.rc-ai-public .rc-ai-topbar { gap:8px; font-size:11px; }
  body.rc-ai-public .rc-ai-share-buttons { max-width:100%; }
  body.rc-ai-public .rc-ai-share-buttons>* { min-width:0; }
}
@supports not (overflow:clip) { body {overflow-x:hidden;} }
