/* Shared refinements for phones, tablets, split-screen windows and touch. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img{max-width:100%}
.product-hero>div,.detail-grid>*,.office-grid>*,.form-row>*{min-width:0}
.information-form select{max-width:100%}
.footer-brand{width:fit-content}
.footer-brand .footer-wordmark{min-width:0;object-fit:contain}
.legal-copy{overflow-wrap:anywhere}
.legal-copy table{display:block;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}

/* Portrait screens get a complete room view above a readable copy area. */
@media(max-width:980px){
 #overview.hero{--hero-scene-height:clamp(400px,68vw,640px);min-height:100svh;padding:calc(var(--hero-scene-height) - 40px) 24px 64px;align-items:flex-end;background-size:auto var(--hero-scene-height);background-position:78% 66px}
 #overview .hero-residential-scene{top:66px;bottom:auto;height:var(--hero-scene-height);background-size:cover;background-position:78% top}
 #overview .bedside-lamp-scene,#overview .residential-tv-zoom-stage{top:66px;bottom:auto;height:var(--hero-scene-height)}
 #overview.hero::before{background:linear-gradient(to bottom,transparent calc(var(--hero-scene-height) - 120px),#080b0f calc(var(--hero-scene-height) + 25px))}
 #overview .hero-copy{width:100%;max-width:680px;margin-inline:auto}
 #overview .hero-experience-switch{width:min(360px,100%);margin-bottom:26px}
 #overview .hero-experience-copy .hero-heading{font-size:min(clamp(38px,6.5vw,60px),11.3cqw);line-height:1.1}
 #overview .lede{max-width:36ch;font-size:18px;line-height:1.6}
 #overview .hero-note{max-width:55ch;line-height:1.6;margin-bottom:0}
 #overview .hero-actions{margin-top:26px}
 #overview .residential-tv-zoom-stage::after{background:linear-gradient(0deg,#080b0f,transparent 35%)}
 #overview .scroll-cue{display:none}
}
@media(min-width:681px) and (max-width:980px) and (max-height:600px){
 #overview.hero{--hero-scene-height:clamp(320px,48vw,440px)}
}
@media(min-width:981px){
 /* Let the artwork fill the gutter, without extending past the browser edge. */
 .home-product .product-hero-visual.mediafirst-visual{width:calc(100% + min(24%,calc(var(--product-gutter) * 2 - 4px)));margin-left:calc(-1 * min(12%,calc(var(--product-gutter) - 2px)))}
}

/* Let the menu examples use the full tablet width. */
@media(min-width:981px) and (max-width:1180px){
 .home-product .mr-group-code-layout{grid-template-columns:minmax(0,1fr);gap:32px}
 .mr-group-code-sidebar{width:100%;max-width:760px;margin-inline:auto}
 .mr-group-code-switch{max-width:440px}
 .mr-group-code-copy{margin-top:28px}
 .home-product>.product-hero,.home-product>.product-section{min-height:0}
}

@media(max-width:980px){
 .nav .nav-contact,.nav .mobile-toggle{min-height:44px}
 .nav .mobile-toggle{min-width:44px;padding:0}
 .button,.hero-experience-switch button,.mr-group-code-switch button{min-height:44px;touch-action:manipulation}
 .footer-directory a{min-height:44px;display:flex;align-items:center;margin-bottom:0}
 .footer-legal{align-items:center}
 .footer-legal a,.footer-legal button{min-height:44px;display:inline-flex;align-items:center}
 .mr-group-code-switch button{white-space:normal;line-height:1.35}
}
@media(max-width:680px){
 .nav .nav-links.open{top:calc(100% + 10px);max-height:calc(100dvh - 90px);padding:16px 20px}
 .nav .solutions-toggle,.nav .nav-links>a,.nav .solutions-group a,.nav .solutions-overview{min-height:44px}
 .mr-group-code-copy{margin-top:24px}
 .product-hero h1,.home-product .home-product-title{overflow-wrap:normal;font-size:clamp(36px,10vw,58px)}
 .cookie-launcher{max-width:calc(100vw - 32px);bottom:max(16px,env(safe-area-inset-bottom))}
 .cookie-close{min-width:44px;min-height:44px;margin-top:-8px;margin-right:-10px}
 footer{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
}
@media(max-width:480px){
 #overview .hero-actions .button{flex:1 1 100%;min-height:48px}
 .product-hero .hero-actions .button{min-height:46px}
 .mr-scale-stats{flex-wrap:wrap}
}
@media(any-pointer:coarse){
 .nav .nav-contact,.nav .mobile-toggle,.nav .solutions-toggle,.nav .nav-links>a,.nav .solutions-group a,.mr-group-code-switch button,.hero-experience-switch button{min-height:44px;touch-action:manipulation}
}

/* Keep controls usable when a phone is rotated or browser chrome reduces the view. */
.nav .solutions-panel,.cookie-banner,.cookie-dialog{overscroll-behavior-y:contain}
/* Preserve white navigation text and glass blur with enough contrast over pale sections. */
#nav[data-surface="light"]{--nav-surface:rgba(9,12,17,.62)}
.cookie-launcher,.cookie-button,.cookie-close{min-height:44px;touch-action:manipulation}
.cookie-close{min-width:44px;flex:none}
.cookie-category{align-items:center}
label.cookie-category{cursor:pointer}
.information-form :is(input,select,textarea){scroll-margin-block:100px 32px}
@media(max-width:980px){
 section[id],.home-product,.chapter,.product-section{scroll-margin-top:90px}
}
@media(max-width:680px){
 /* The bar keeps its original light text; the open panel stays readable over white sections too. */
 #nav .nav-links.open{--nav-text:#f4f5f7;--nav-hover:#fff;--nav-accent:#ffb15d;--nav-highlight:#ffffff12;--nav-border:#ffffff26;background:rgba(9,12,17,.9);border-color:var(--nav-border);overscroll-behavior-y:contain;max-height:calc(100svh - 90px);max-height:calc(100dvh - 90px);scroll-padding-block:16px}
 #nav .nav-links>a,#nav .solutions-toggle{flex-shrink:0}
 #nav .solutions-nav{flex-shrink:0}
 .cookie-dialog{max-height:calc(100svh - 24px);max-height:calc(100dvh - 24px)}
 .cookie-dialog-header{gap:12px}
}
@media(max-height:500px) and (max-width:980px){
 #overview.hero{--hero-scene-height:clamp(270px,46.1vw,452px);padding-bottom:40px}
 .cookie-banner{bottom:64px;max-height:calc(100svh - 80px)}
}

/* Keep all five navigation links clear of the logo and contact button before the phone menu begins. */
@media(min-width:681px) and (max-width:760px){
 #nav{grid-template-columns:max-content auto max-content;justify-content:space-between;gap:6px;padding-inline:12px}
 #nav>.nav-links{gap:6px;white-space:nowrap}
}
