/* MAS-UI-P08 - Final Home visual acceptance, scoped to Home only.
   Loaded after P01-P07; intentionally fixes only observed layout/readability issues.
   Admin color/column tokens remain authoritative. No external assets. */
body.mas-home-ui { overflow-wrap:break-word; }
body.mas-home-ui .section-heading h2,
body.mas-home-ui .mas-p07-faq h2 { text-wrap:balance; }
body.mas-home-ui .section-heading p{line-height:1.65}

/* Desktop: Process and Footer preserve the stored, editable column setting.
   P08 preset writes 4 to the same setting; never overwrite a deliberate later change. */
@media(min-width:951px){
  body.mas-home-ui .mas-p07-process .process-grid{
    display:grid;grid-template-columns:repeat(var(--p07-process-pc,4),minmax(0,1fr));
    align-items:start;gap:clamp(14px,1.8vw,25px);min-width:0;
  }
  body.mas-home-ui .mas-p07-process .process-item{min-width:0;gap:9px}
  body.mas-home-ui .mas-p07-process .process-item h3{font-size:clamp(13.5px,1.08vw,16px);line-height:1.45}
  body.mas-home-ui .mas-p07-process .process-item p{font-size:clamp(12px,.9vw,13.5px);line-height:1.65}
  body.mas-home-ui .mas-p07-footer .footer-grid{
    grid-template-columns:repeat(var(--p07-footer-cols,4),minmax(0,1fr));
    gap:clamp(15px,2.5vw,38px);align-items:start;
  }
  body.mas-home-ui .mas-p07-footer .footer-grid>div{min-width:0;grid-column:auto}
  body.mas-home-ui .mas-p07-footer .footer-grid h3{font-size:clamp(14px,1.15vw,16px)}
  body.mas-home-ui .mas-p07-footer .footer-grid p,
  body.mas-home-ui .mas-p07-footer .footer-grid a:not(.brand){font-size:clamp(12px,.96vw,13.5px);line-height:1.6}
  body.mas-home-ui .mas-p06-areas .mas-p06-area-card .mas-p06-area-name b{font-size:clamp(11.5px,.94vw,13px)}
  body.mas-home-ui .mas-p06-areas .mas-p06-area-card small{font-size:11px}
}
/* Full-width carousel with deliberate in-component scroll only. */
body.mas-home-ui .mas-p06-areas .container,
body.mas-home-ui .mas-p06-areas .mas-p06-carousel,
body.mas-home-ui .mas-p06-areas .mas-p06-area-viewport{
  min-width:0;max-width:100%;
}
body.mas-home-ui .mas-p06-areas .mas-p06-area-viewport{overscroll-behavior-x:contain;scroll-padding-inline:2px}
body.mas-home-ui .mas-p07-faq .faq-list details{min-width:0}
body.mas-home-ui .mas-p07-faq .faq-list summary{overflow-wrap:break-word;white-space:normal}
body.mas-home-ui .mas-p07-footer .footer-grid>div{overflow-wrap:anywhere}

@media(max-width:950px){
  body.mas-home-ui .mas-p07-footer .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.mas-home-ui .mas-p07-process .process-item h3{overflow-wrap:anywhere}
}
@media(max-width:640px){
  html{scroll-padding-top:74px}
  body.mas-home-ui{min-width:0;max-width:100%;}
  body.mas-home-ui.mas-p08-has-mobilebar{padding-bottom:calc(var(--p08-bar-height,48px) + 20px + env(safe-area-inset-bottom,0px))}
  body.mas-home-ui.mas-p08-no-mobilebar{padding-bottom:0}
  body.mas-home-ui main,body.mas-home-ui .section,body.mas-home-ui .site-footer{min-width:0;max-width:100%}
  body.mas-home-ui .section-heading h2{font-size:clamp(24px,6.35vw,29px);line-height:1.25;letter-spacing:-.2px;max-width:100%;overflow-wrap:normal}
  body.mas-home-ui .section-heading p{font-size:clamp(12px,3.25vw,13.5px);line-height:1.65;max-width:100%}
  body.mas-home-ui .preview-ribbon{
    box-sizing:border-box;width:100%;max-width:100%;min-height:0;
    padding:7px 14px;font-size:11px;line-height:1.5;letter-spacing:0;
    white-space:normal;text-align:center;overflow-wrap:break-word;
  }
  body.mas-home-ui .mas-p07-process .process-grid{
    grid-template-columns:repeat(var(--p07-process-mobile,2),minmax(0,1fr));
    gap:16px 12px;min-width:0;
  }
  body.mas-home-ui .mas-p07-process .process-item{align-items:flex-start;gap:8px;min-width:0}
  body.mas-home-ui .mas-p07-process .process-item h3{font-size:clamp(12.5px,3.42vw,14px);line-height:1.5;margin:0 0 4px}
  body.mas-home-ui .mas-p07-process .process-item p{font-size:clamp(11.5px,3vw,12.75px);line-height:1.6}
  body.mas-home-ui .mas-p07-faq .faq-grid{gap:15px}
  body.mas-home-ui .mas-p07-faq .faq-visual{grid-template-columns:minmax(95px,34%) minmax(0,1fr);gap:12px;align-items:center}
  body.mas-home-ui .mas-p07-faq .faq-visual img{height:clamp(106px,29vw,145px);max-width:100%;object-fit:cover}
  body.mas-home-ui .mas-p07-faq .faq-visual h2{font-size:clamp(21px,5.7vw,27px);line-height:1.25;overflow-wrap:anywhere}
  body.mas-home-ui .mas-p07-faq .faq-visual p{font-size:12px;line-height:1.6}
  body.mas-home-ui .mas-p07-faq .faq-list summary{font-size:13px;line-height:1.5;min-height:46px;padding:12px}
  body.mas-home-ui .mas-p07-faq .faq-list details p{font-size:12.5px;line-height:1.7}
  body.mas-home-ui .mas-p07-footer .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 13px;padding-block:27px 24px}
  body.mas-home-ui .mas-p07-footer .footer-brand{grid-column:1/-1}
  body.mas-home-ui .mas-p07-footer .footer-grid h3{font-size:14px;margin-bottom:10px}
  body.mas-home-ui .mas-p07-footer .footer-grid p,
  body.mas-home-ui .mas-p07-footer .footer-grid a:not(.brand){font-size:12.5px;line-height:1.65}
  body.mas-home-ui .mas-p07-footer .copyright{font-size:11px;line-height:1.65}
  body.mas-home-ui .mas-p06-areas .mas-p06-area-card{box-sizing:border-box;min-width:0}
  body.mas-home-ui .mas-p06-areas .mas-p06-area-viewport{max-width:100%;margin:0;}
  body.mas-home-ui .mas-p06-areas .mas-p06-area-card .mas-p06-area-name b{font-size:12px;line-height:1.35}
  body.mas-home-ui .mas-p06-areas .mas-p06-area-card small{font-size:11px;line-height:1.5}
  /* Accessible, safe-area aware sticky actions. No inert hotline placeholder. */
  body.mas-home-ui .mobile-sticky.mas-p08-sticky{
    box-sizing:border-box;position:fixed;z-index:41;bottom:0;left:0;right:0;
    width:100%;max-width:100vw;display:flex;align-items:center;justify-content:center;
    padding:8px max(12px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));
    gap:10px;background:var(--p08-bar-bg,#073b2c);
  }
  body.mas-home-ui .mas-p08-sticky .mobile-call,
  body.mas-home-ui .mas-p08-sticky .mobile-book{
    box-sizing:border-box;min-width:0;min-height:var(--p08-bar-height,48px);height:auto;
    flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;
    border-radius:9px;text-align:center;text-decoration:none;padding:8px 7px;
    font-size:clamp(12px,3.25vw,14px);line-height:1.35;font-weight:700;
    white-space:normal;overflow-wrap:anywhere;
  }
  body.mas-home-ui .mas-p08-sticky .mobile-call{background:var(--p08-call-bg,#fff);color:var(--p08-call-text,#0c4a37)}
  body.mas-home-ui .mas-p08-sticky .mobile-call b{font-size:clamp(12.5px,3.4vw,14px)}
  body.mas-home-ui .mas-p08-sticky .mobile-call small{font-size:11px;color:inherit;opacity:.83}
  body.mas-home-ui .mas-p08-sticky .mobile-book{background:var(--p08-action-bg,#bb9046);color:var(--p08-action-text,#fff)}
  body.mas-home-ui .mas-p08-sticky a:focus-visible{outline:3px solid #f5df9b;outline-offset:-3px}
  body.mas-home-ui .to-top{bottom:calc(var(--p08-bar-height,48px) + 34px + env(safe-area-inset-bottom,0px))}
  body.mas-home-ui.mas-p08-no-mobilebar .to-top{bottom:17px}
}
@media(max-width:355px){
  body.mas-home-ui .mas-p07-faq .faq-visual{grid-template-columns:96px minmax(0,1fr);gap:10px}
  body.mas-home-ui .mas-p07-faq .faq-visual h2{font-size:20px}
  body.mas-home-ui .mas-p07-footer .footer-grid{gap:18px 11px}
}
@media(prefers-reduced-motion:reduce){body.mas-home-ui .mas-p08-sticky a{transition:none}}
