/* Shared section scale; keep the accepted breakpoint values (H-01).
   H-04 commercial hero floor is role-specific, never a blanket H1 style.
   Low landscape uses the same role floor and natural content height (rev2). */
:root{--section-heading-size:3vw;--hero-heading-floor:0px}
@media(min-width:1921px){:root{--section-heading-size:57.6px}}
@media(min-width:960px) and (max-width:1199px){:root{--section-heading-size:3.75vw}}
@media(min-width:480px) and (max-width:959px){:root{--section-heading-size:5vw}}
@media(max-width:479px){:root{--section-heading-size:7.5vw}}
@media(min-width:480px) and (max-width:1199px){:root{--hero-heading-floor:calc(var(--section-heading-size) + 2px)}}
@media(max-height:550px) and (orientation:landscape){:root{--hero-heading-floor:calc(var(--section-heading-size) + 2px)}}

/* Mobile type scale: approved Sellers page. Content and desktop styles stay intact. */
@media(max-width:639px){
 body{--mobile-title:var(--section-heading-size);--mobile-hero:max(clamp(28px,4.7vw,44px),var(--hero-heading-floor,0px))}
 .home-preview #main #block-1{height:auto;min-height:100svh;container-type:normal;overflow:clip}
 .home-preview #main #block-1-el-1,
 .inner-styled #main .sp-hero-title,
 .inner-styled #main .buyout-hero h1{font-size:var(--mobile-hero);line-height:1.18}
 .home-preview #main #block-1-el-0,
 .inner-styled #main .sp-hero-description,
 .inner-styled #main .buyout-hero-description{font-size:15px;line-height:1.45}
 .home-preview #main .home-hero-benefits{font-size:15px;line-height:1.5}
 .home-preview #main .home-hero-eyebrow,
 .inner-styled #main .sp-eyebrow{font-size:12px;line-height:1.4}
 .home-preview #main h2,.home-preview #main h2.layer,
 .inner-styled #main .sp-title,
 #main .shared-founder h2{font-size:var(--mobile-title);line-height:1.1}
 .home-preview #main .hp-founder h2{font-size:var(--mobile-title)!important}
 .home-preview #main .home-service-card>.layer-text:nth-child(2),
 .home-preview #main .home-case-copy>.layer-text:first-child,
 .home-preview #main .agent-card h3,
 .inner-styled #main .sp-card-title,
 .inner-styled #main .agent-card h3{font-size:20px;line-height:1.25}
 .home-preview #main .hp-section-heading>.layer:not(h2),
 .home-preview #main #block-3-el-6,
 .home-preview #main .hp-consultation-copy>.layer-text:not(h2),
 .home-preview #main .hp-estimate-subtitle,
 .inner-styled #main .sp-intro{font-size:16px;line-height:1.4}
 .home-preview #main .home-service-card>.layer-text:nth-child(3),
 .home-preview #main .home-case-copy>.layer-text:nth-child(2),
 .home-preview #main .home-team-layout .home-approach-fact>.layer-text,
 .home-preview #main .hp-founder--partner #block-9-el-2,
 #main .shared-founder-copy p,
 .inner-styled #main .sp-body,
 .inner-styled #main .ip-topics .ip-card>div:last-child{font-size:15px;line-height:1.5}
 .home-preview #main .home-hero-actions a,
 .home-preview #main .form-submit,
 .inner-styled #main .sp-button,
 .inner-styled #main .form-submit,
 .inner-styled #main .buyout-hero-cta{font-size:14px;line-height:1.4;min-height:54px}
 .inner-styled #main .sp-small,
 .inner-styled #main .buyout-hero-hint,
 .inner-styled #main .buyout-hero-note{font-size:13px;line-height:1.45}
 .inner-styled #main .buyout-hero-benefits strong,
 .inner-styled #main .buyout-hero-benefits span{font-size:14px;line-height:1.45;white-space:normal}
 .inner-styled #main .ip-case-tab{font-size:14px}
}
@media(max-width:479px){body{--mobile-title:var(--section-heading-size);--mobile-hero:max(clamp(28px,8vw,36px),var(--hero-heading-floor,0px))}}
@media(max-width:639px) and (max-height:550px) and (orientation:landscape){body{--mobile-hero:max(clamp(23px,3vw,34px),var(--hero-heading-floor,0px))}}
@media(max-width:359px){.buyers-styled .sp-stat{padding-inline:12px}}

/* H04 rev2: only low landscape changes flow; no image or copy overrides. */
@media(max-height:550px) and (orientation:landscape){
 .home-preview #main #block-1,
 :is(.inner-styled,.sellers-styled,.buyers-styled) #main .sp-hero,
 .inner-styled #main .buyout-hero,
 .ap-page #main .ap-hero{height:auto;min-height:100svh;max-height:none;align-items:flex-start;container-type:normal}
 .home-preview #main #block-1,
 :is(.inner-styled,.sellers-styled,.buyers-styled) #main .sp-hero{padding-top:max(76px,var(--hero-menu-clearance,0px));overflow:clip}
 .inner-styled #main .buyout-hero{overflow:clip}
 .inner-styled #main .buyout-hero-scroll{height:auto;min-height:100svh;overflow:visible;align-items:flex-start;padding-top:max(76px,var(--hero-menu-clearance,0px))}
 .home-preview #main .home-hero-content,
 :is(.inner-styled,.sellers-styled,.buyers-styled) #main .seller-hero-content,
 .inner-styled #main .buyout-hero-content{margin-block:0;align-items:start;min-width:0;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
 .home-preview #main .home-hero-content>*,
 :is(.inner-styled,.sellers-styled,.buyers-styled) #main .seller-hero-content>*,
 .inner-styled #main .buyout-hero-content>*{min-width:0}
}
@media(max-width:959px) and (max-height:550px) and (orientation:landscape){
 .home-preview #main .home-hero-content,
 :is(.inner-styled,.sellers-styled,.buyers-styled) #main .seller-hero-content,
 .inner-styled #main .buyout-hero-content{display:grid;width:100%;grid-template-columns:minmax(0,1fr);gap:20px}
 :is(.sellers-styled,.buyers-styled) #main .sp-hero-title span{white-space:normal}
}
@media(min-width:640px) and (max-width:959px) and (max-height:550px) and (orientation:landscape){
 .inner-styled #main .buyout-hero h1{line-height:1.15}
}

/* H04 rev3: address M1/A1 only in low landscape; preserve hero type scale. */
@media (max-height:550px) and (orientation:landscape), (min-width:768px) and (max-width:1199px){
 .ap-page #main .ap-hero--careers{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;align-items:start}
 .ap-page #main .ap-hero--careers:after{display:none}
 .ap-page #main .ap-hero--careers>.ap-container{display:contents}
 .ap-page #main .ap-hero--careers .ap-hero-copy{grid-row:1;width:calc(100% - var(--sp-gutter)*2);max-width:1760px;margin-inline:auto;min-width:0}
 .ap-page #main .ap-hero--careers>.ap-hero-photo{grid-row:2;position:static;inset:auto;z-index:auto;display:block;width:100%;height:auto;max-height:none;object-fit:contain;margin-top:28px}
 .ap-page #main .ap-hero--careers .ap-hero-stats{grid-row:3;width:calc(100% - var(--sp-gutter)*2);margin-inline:auto;min-width:0}
}
@media(min-width:960px) and (max-height:550px) and (orientation:landscape){
 .inner-styled[data-page=agentam] #main .seller-hero-action{margin-top:max(0px,calc(270px - max(76px,var(--hero-menu-clearance,0px))));align-self:start}
}
