/* ===== V40.5.88 PUBLIC MOBILE + TABLET RESPONSIVE LAYOUT CLOSURE ===== */
html{overflow-x:hidden}
body{max-width:100%;overflow-x:hidden}
main,.route,section,.wrap{min-width:0}
img,video,iframe{max-width:100%}

@media screen and (max-width:1024px){
  html{scroll-padding-bottom:104px}
  body{padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))}
  body[data-appearance-mode="standard"] .wrap,
  .wrap{width:min(calc(100% - 40px),820px)!important;margin-inline:auto!important}

  /* Header rhythm */
  .site-header .nav,.nav{height:68px!important;min-height:68px!important}
  .brand-logo-image{max-height:38px!important;max-width:150px!important}
  .mobilePanelInner{width:min(calc(100% - 40px),820px)!important}

  /* Shared hero layout: never let desktop columns survive on tablet/mobile. */
  body[data-appearance-mode="standard"] .seo-editorial-hero,
  body[data-appearance-mode="standard"] .v38-hero,
  body[data-appearance-mode="standard"] .seo-solution-hero{overflow:visible!important}
  body[data-appearance-mode="standard"] .seo-editorial-hero-grid,
  body[data-appearance-mode="standard"] .seo-editorial-hero-grid.simple,
  body[data-appearance-mode="standard"] .v38-hero-grid,
  body[data-appearance-mode="standard"] .seo-solution-hero-grid{
    min-height:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:30px!important;
    padding-block:52px!important;
    align-items:start!important;
  }
  body[data-appearance-mode="standard"] .seo-editorial-hero-grid>* ,
  body[data-appearance-mode="standard"] .v38-hero-grid>* ,
  body[data-appearance-mode="standard"] .seo-solution-hero-grid>*{min-width:0!important}
  body[data-appearance-mode="standard"] .seo-editorial-hero h1,
  body[data-appearance-mode="standard"] .v38-hero h1,
  body[data-appearance-mode="standard"] .seo-solution-hero h1{
    max-width:760px!important;
    font-size:clamp(40px,6.6vw,54px)!important;
    line-height:1.03!important;
    letter-spacing:-.045em!important;
    margin:0 0 18px!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
  }
  body[data-appearance-mode="standard"] .seo-hero-lead,
  body[data-appearance-mode="standard"] .v38-lead{max-width:680px!important;margin-bottom:0!important}
  body[data-appearance-mode="standard"] .seo-kicker,
  body[data-appearance-mode="standard"] .v38-kicker{margin-bottom:13px!important;line-height:1.35!important}

  /* Editorial search/filter must remain in normal document flow. */
  body[data-appearance-mode="standard"] .seo-editorial-search{
    position:static!important;
    inset:auto!important;
    transform:none!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:18px!important;
    border-radius:16px!important;
    box-shadow:0 10px 28px rgba(46,29,103,.06)!important;
    box-sizing:border-box!important;
  }
  body[data-appearance-mode="standard"] .seo-editorial-search>div{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:9px!important;
    width:100%!important;
  }
  body[data-appearance-mode="standard"] .seo-editorial-search input{width:100%!important;min-width:0!important;box-sizing:border-box!important}
  body[data-appearance-mode="standard"] .seo-editorial-search button{min-width:84px!important;min-height:46px!important;padding-inline:16px!important}
  body[data-appearance-mode="standard"] .seo-filter-row{
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
    padding:2px 1px 8px!important;
    margin-bottom:22px!important;
  }
  body[data-appearance-mode="standard"] .seo-filter-row::-webkit-scrollbar{display:none}
  body[data-appearance-mode="standard"] .seo-filter-row button{flex:0 0 auto!important;white-space:nowrap!important}

  /* Consistent section/card spacing. */
  body[data-appearance-mode="standard"] .seo-section,
  body[data-appearance-mode="standard"] .v38-section,
  .hpsec,.sec,.sol-section,.about-section{padding-block:64px!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid a{min-width:0!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid figure{height:auto!important;aspect-ratio:16/10!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid a>div{padding:18px!important}
  .portfolio-pagination{margin-top:26px!important}

  /* Contact: generous but compact enough for a real phone/tablet viewport. */
  body[data-appearance-mode="standard"] .contact-hero-v40579 .contact-hero-shell{
    min-height:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:34px!important;
    padding-block:52px!important;
  }
  body[data-appearance-mode="standard"] .contact-hero-v40579 h1{font-size:clamp(44px,7vw,58px)!important;line-height:1!important}
  body[data-appearance-mode="standard"] .contact-hub{max-width:none!important;width:100%!important;box-sizing:border-box!important}
  body[data-appearance-mode="standard"] .contact-formsec{padding:64px 0 92px!important}
  body[data-appearance-mode="standard"] .contact-formgrid{grid-template-columns:minmax(0,1fr)!important;gap:40px!important}
  body[data-appearance-mode="standard"] .contact-formcopy{position:static!important;min-width:0!important}
  body[data-appearance-mode="standard"] .contact-formcopy h2{font-size:clamp(36px,5.7vw,46px)!important;line-height:1.05!important;margin:8px 0 18px!important}
  body[data-appearance-mode="standard"] .contact-formcopy>p{max-width:680px!important;line-height:1.72!important}
  body[data-appearance-mode="standard"] .contact-office{margin-top:28px!important;padding-top:24px!important}
  body[data-appearance-mode="standard"] .contact-office-row{grid-template-columns:40px minmax(0,1fr)!important;gap:12px!important;margin-bottom:16px!important}
  body[data-appearance-mode="standard"] .contact-office-row p{min-width:0!important}
  body[data-appearance-mode="standard"] .contact-cardform{width:100%!important;box-sizing:border-box!important}

  /* Bottom navigation remains unchanged visually; only guarantee content can clear it. */
  .premium-footer{padding-bottom:calc(116px + env(safe-area-inset-bottom,0px))!important}
  .analytics-consent{bottom:calc(92px + env(safe-area-inset-bottom,0px))!important}
}

@media screen and (max-width:640px){
  body[data-appearance-mode="standard"] .wrap,
  .wrap{width:calc(100% - 32px)!important}
  .site-header .nav,.nav{height:62px!important;min-height:62px!important}
  .mobilePanelInner{width:calc(100% - 32px)!important;padding:18px 0 28px!important}

  body[data-appearance-mode="standard"] .seo-editorial-hero-grid,
  body[data-appearance-mode="standard"] .seo-editorial-hero-grid.simple,
  body[data-appearance-mode="standard"] .v38-hero-grid,
  body[data-appearance-mode="standard"] .seo-solution-hero-grid{
    padding-block:36px!important;
    gap:24px!important;
  }
  body[data-appearance-mode="standard"] .seo-editorial-hero,
  body[data-appearance-mode="standard"] .v38-hero,
  body[data-appearance-mode="standard"] .seo-solution-hero{background:linear-gradient(180deg,#fff 0 72%,#f8f6fd 72% 100%)!important}
  body[data-appearance-mode="standard"] .seo-editorial-hero h1,
  body[data-appearance-mode="standard"] .v38-hero h1,
  body[data-appearance-mode="standard"] .seo-solution-hero h1,
  body[data-appearance-mode="standard"] .service-hero h1,
  body[data-appearance-mode="standard"] .about-hero h1{
    font-size:clamp(34px,10.4vw,42px)!important;
    line-height:1.045!important;
    letter-spacing:-.04em!important;
    max-width:none!important;
    margin-bottom:16px!important;
  }
  body[data-appearance-mode="standard"] .seo-kicker,
  body[data-appearance-mode="standard"] .v38-kicker{font-size:10px!important;letter-spacing:.1em!important;gap:6px!important;margin-bottom:11px!important}
  body[data-appearance-mode="standard"] .seo-kicker svg,
  body[data-appearance-mode="standard"] .v38-kicker svg{width:14px!important;height:14px!important;flex:0 0 auto!important}
  body[data-appearance-mode="standard"] .seo-hero-lead,
  body[data-appearance-mode="standard"] .v38-lead{font-size:15px!important;line-height:1.65!important}

  body[data-appearance-mode="standard"] .seo-editorial-search{padding:14px!important;border-radius:14px!important;box-shadow:none!important}
  body[data-appearance-mode="standard"] .seo-editorial-search label{font-size:13px!important;margin-bottom:8px!important}
  body[data-appearance-mode="standard"] .seo-editorial-search>div{grid-template-columns:minmax(0,1fr) 72px!important;gap:7px!important}
  body[data-appearance-mode="standard"] .seo-editorial-search input{min-height:44px!important;padding:11px 12px!important;font-size:14px!important}
  body[data-appearance-mode="standard"] .seo-editorial-search button{min-width:72px!important;min-height:44px!important;padding:0 10px!important;font-size:12px!important}

  body[data-appearance-mode="standard"] .seo-section,
  body[data-appearance-mode="standard"] .v38-section,
  .hpsec,.sec,.sol-section,.about-section{padding-block:48px!important}
  body[data-appearance-mode="standard"] .seo-filter-row{margin-inline:0!important;gap:7px!important;margin-bottom:18px!important}
  body[data-appearance-mode="standard"] .seo-filter-row button{padding:8px 11px!important;font-size:12px!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid{grid-template-columns:minmax(0,1fr)!important;gap:18px!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid a{border-radius:14px!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid a>div{padding:16px!important}
  body[data-appearance-mode="standard"] .seo-portfolio-grid h3{font-size:20px!important;line-height:1.2!important}
  .portfolio-pagination{gap:14px!important;align-items:stretch!important}
  .portfolio-pages{max-width:100%;overflow-x:auto;padding-bottom:4px}
  .portfolio-perpage{width:100%;justify-content:space-between}

  body[data-appearance-mode="standard"] .contact-hero-v40579 .contact-hero-shell{padding-block:38px!important;gap:26px!important}
  body[data-appearance-mode="standard"] .contact-hero-v40579 h1{font-size:40px!important;line-height:1!important;margin-bottom:18px!important}
  body[data-appearance-mode="standard"] .contact-hero-v40579 .lead{font-size:15px!important;line-height:1.65!important}
  body[data-appearance-mode="standard"] .contact-hub{padding:17px!important;border-radius:16px!important}
  body[data-appearance-mode="standard"] .contact-hub-head{padding-bottom:17px!important}
  body[data-appearance-mode="standard"] .contact-hub-head h2{font-size:23px!important;line-height:1.12!important}
  body[data-appearance-mode="standard"] .contact-hub-row{grid-template-columns:40px minmax(0,1fr) 18px!important;gap:10px!important;padding:14px 0!important}
  body[data-appearance-mode="standard"] .contact-hub-row .contact-channel-icon{width:40px!important;height:40px!important}
  body[data-appearance-mode="standard"] .contact-formsec{padding:48px 0 98px!important}
  body[data-appearance-mode="standard"] .contact-formgrid{gap:30px!important}
  body[data-appearance-mode="standard"] .contact-formcopy h2{font-size:34px!important;line-height:1.06!important;margin:8px 0 16px!important}
  body[data-appearance-mode="standard"] .contact-formcopy>p{font-size:14px!important;line-height:1.7!important}
  body[data-appearance-mode="standard"] .contact-office{margin-top:25px!important;padding-top:21px!important}
  body[data-appearance-mode="standard"] .contact-office h3{font-size:16px!important;margin-bottom:15px!important}
  body[data-appearance-mode="standard"] .contact-office-row{grid-template-columns:36px minmax(0,1fr)!important;gap:11px!important;margin-bottom:15px!important}
  body[data-appearance-mode="standard"] .contact-office-icon-wrap{width:36px!important;height:36px!important}
  body[data-appearance-mode="standard"] .contact-office-row p{font-size:12.5px!important;line-height:1.55!important}
  body[data-appearance-mode="standard"] .contact-cardform{padding:18px!important;border-radius:16px!important}
  .contact-fields{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
  .contact-field.full{grid-column:auto!important}
  .contact-field input,.contact-field select,.contact-field textarea{font-size:16px!important;min-height:46px!important;box-sizing:border-box!important}
  .contact-field textarea{min-height:120px!important}

  /* Avoid decorative shapes intruding into narrow layouts. */
  .v19 .service-hero:after,.v19 .about-hero:after,.v19 .portfolio-head:after,.v19 .contact-hero:after,
  .v19 .service-hero:before,.v19 .about-hero:before,.v19 .portfolio-head:before,.v19 .contact-hero:before{display:none!important}
}

@media screen and (max-width:380px){
  body[data-appearance-mode="standard"] .wrap,.wrap{width:calc(100% - 24px)!important}
  body[data-appearance-mode="standard"] .seo-editorial-hero h1,
  body[data-appearance-mode="standard"] .v38-hero h1,
  body[data-appearance-mode="standard"] .seo-solution-hero h1{font-size:32px!important}
  body[data-appearance-mode="standard"] .seo-editorial-search{padding:12px!important}
  body[data-appearance-mode="standard"] .seo-editorial-search>div{grid-template-columns:minmax(0,1fr) 68px!important}
  .mobile-conversion-dock.mobile-bottom-nav .mobile-bottom-nav__item,
  .mobile-conversion-dock.mobile-bottom-nav .mobile-bottom-nav__item:first-child,
  .mobile-conversion-dock.mobile-bottom-nav .mobile-bottom-nav__item:last-child{padding-inline:2px!important;font-size:8.5px!important}
}
