/* ZNJ | Shared editorial chapters — all public inner pages.
   No scroll hijack, no gate transform, no fixed content heights.
   Homepage retains its independently tuned sheet system. */
@media (min-width:901px){
  body:not(.znj-home) #main > .zm,
  body:not(.znj-home) #main > .znj-editorial-chapters{
    position:relative;isolation:isolate;overflow:visible;
  }
  body:not(.znj-home) #main > .zm > section,
  body:not(.znj-home) #main > .znj-editorial-chapters > section,
  body:not(.znj-home) #main > section{
    position:relative;box-sizing:border-box;
    min-height:min(100svh,900px);height:auto;max-height:none;
    overflow:visible;isolation:isolate;
    padding-block:clamp(55px,7svh,110px);
    margin:0;background-color:#141714;
    color:#f8f0e4;
    border-top:1px solid rgba(218,184,126,.16);
  }
  body:not(.znj-home) #main > .zm > section.zm-hero{
    min-height:100svh;padding:0;
    overflow:hidden;
    display:flex;align-items:center;
  }
  body:not(.znj-home) #main > .zm > section.zm-hero .zm-wrap{
    position:relative;z-index:2;
    padding-block:clamp(118px,15svh,185px) clamp(70px,10svh,115px);
  }
  body:not(.znj-home) #main > .zm > section:nth-of-type(3n+2){background-color:#1a1c19}
  body:not(.znj-home) #main > .zm > section:nth-of-type(3n){background-color:#171b18}
  body:not(.znj-home) #main > .zm > section + section{
    border-top:1px solid rgba(226,190,132,.25);
    box-shadow:0 -8px 32px rgba(0,0,0,.12);
  }
  body:not(.znj-home) #main :is(.zm-wrap,.znj-editorial-split){
    max-width:min(1440px,92vw);
  }
}
/* On mobile, the sheet IS the viewport between the masthead and dock.
   Tall content stays in natural flow instead of hiding buttons/CTAs. */
@media(max-width:900px){
  body:not(.znj-home){
    --znj-chapter-head:var(--znj-header-live-height,80px);
    --znj-chapter-dock:82px;
  }
  body:not(.znj-home) #main > .zm > section,
  body:not(.znj-home) #main > .znj-editorial-chapters > section,
  body:not(.znj-home) #main > section{
    position:relative;box-sizing:border-box;
    min-height:max(350px,calc(100svh - var(--znj-chapter-head) - var(--znj-chapter-dock)));
    height:auto!important;max-height:none!important;
    margin:0!important;overflow:visible!important;
    padding:clamp(21px,4svh,35px) 0 clamp(28px,5svh,48px)!important;
    border-radius:0!important;
    scroll-margin-top:var(--znj-chapter-head);
    isolation:isolate;
  }
  body:not(.znj-home) #main > .zm > section.zm-hero{
    min-height:max(420px,calc(100svh - var(--znj-chapter-head) - var(--znj-chapter-dock)));
    display:flex;flex-direction:column;justify-content:center;
    padding:clamp(20px,3svh,30px) 0!important;
    overflow:hidden!important;
  }
  body:not(.znj-home) #main > .zm > section.zm-hero > img{
    position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;
  }
  body:not(.znj-home) #main > .zm > section.zm-hero > .zm-wrap{
    position:relative;z-index:2;
    width:100%;max-width:100%;
    padding:clamp(16px,3svh,32px) clamp(18px,5vw,32px)!important;
  }
  body:not(.znj-home) #main > .zm > section.zm-hero h1{
    font-size:clamp(38px,10vw,61px)!important;
    line-height:1.05!important;overflow-wrap:break-word;
  }
  body:not(.znj-home) #main > .zm > section.zm-hero .zm-hero-sign{
    display:none!important;
  }
  body:not(.znj-home) #main :is(.zm-actions,.znj-market-discovery-actions,.znj-directory-filters){
    flex-wrap:wrap;max-width:100%;
  }
  body:not(.znj-home) #main :is(.zm-actions a,.znj-editorial-link,.portal-primary){
    max-width:100%;white-space:normal;
  }
  body:not(.znj-home) #main > .zm > section:nth-of-type(even){
    background-color:#191c18;
  }
  body:not(.znj-home) #main > .zm > section + section{
    border-top:1px solid rgba(221,182,122,.23);
  }
}
@media(prefers-reduced-motion:reduce){
 body:not(.znj-home) #main > .zm > section{scroll-behavior:auto!important}
}
