/* Member pages: full-width text, sidebars that stay in view, home page. Presentation only.
   Loaded after nm-member.css (see membersiteheader.jspf), so these rules win.
   The "is-pinned" class is added by the small script in membersiteheader.jspf, which also sets each sidebar's "top". */

/* ---- Events and Marketplace posts: the text fills the column, like the photos above it ---- */
body.nm-member .nmm-evd-desc,body.nm-member .nmm-mkd-desc,
body.nm-member .nmm-evd-main .nmm-prose,body.nm-member .nmm-mkd-main .nmm-prose{max-width:none}
body.nm-member .nmm-evd-desc .article,body.nm-member .nmm-mkd-desc .article{overflow-wrap:break-word}
body.nm-member .nmm-evd-desc .article pre,body.nm-member .nmm-mkd-desc .article pre{max-width:100%;overflow-x:auto}
/* the sidebars are a little narrower so the text gets the room (they were 380px) */
@media (min-width:981px){
  body.nm-member .nmm-evdgrid,body.nm-member .nmm-mkdgrid{grid-template-columns:minmax(0,1fr) clamp(290px,23vw,340px);column-gap:clamp(28px,3vw,44px)}
}
@media (min-width:981px) and (max-width:1100px){
  body.nm-member .nmm-evdgrid,body.nm-member .nmm-mkdgrid{grid-template-columns:minmax(0,1fr) 290px;column-gap:28px}
}

/* ---- sidebars that stay in view (wide screens only; nothing is sticky below 981px) ---- */
@media (min-width:981px){
  html body.nm-member .is-pinned.is-pinned{position:sticky}
  body.nm-member .nmm-ed .nmm-events.is-pinned{align-self:start}
}

/* ---- Home page: the story is shown in full, no "Read our story" button ---- */
body.nm-member .nmm-about .nmm-readmore,
body.nm-member .nmm-about .nmm-about-sum{display:none!important}
body.nm-member .nmm-about .nmm-clamp,
body.nm-member .nmm-about .nmm-clamp.is-folded:not(.is-open),
body.nm-member .nmm-about .nmm-clamp.is-clamped{max-height:none!important;overflow:visible!important;visibility:visible!important;margin:20px 0 0!important}
body.nm-member .nmm-about .nmm-clamp .article{max-width:640px;font:400 17px/1.6 var(--nmm-font);color:var(--nmm-text)}
body.nm-member .nmm-about .nmm-clamp .article p{margin:0 0 1em}
body.nm-member .nmm-about .nmm-clamp .article>:last-child{margin-bottom:0}

/* ---- Home page: three columns. Story | topic icons across the last two columns, with the featured items + Latest notems and the
   Share/Upcoming events columns beneath them. The whole right-hand block stays in view while the story scrolls.
   Missing parts collapse; a member with only a story gets one full-width column. The script in membersiteheader.jspf adds the
   classes lay-a (story) lay-s (right block) lay-m (middle) lay-e (events) and the .nmm-ed-side wrapper. ---- */
body.nm-member .nmm-ed > .nmm-ed-side{grid-area:s;min-width:0;margin:0 0 30px;align-self:start}
body.nm-member .nmm-ed-side > .nmm-chips{grid-area:c;margin:0 0 24px}
body.nm-member .nmm-ed-side > .nmm-ed-mid{align-self:start;grid-area:m;min-width:0;display:grid;gap:22px}
body.nm-member .nmm-ed-side > .nmm-ed-mid .nmm-stack,body.nm-member .nmm-ed-side > .nmm-ed-mid .nmm-notems{grid-area:auto;margin:0}
body.nm-member .nmm-ed-side > .nmm-ed-right,body.nm-member .nmm-ed-side > .nmm-events{align-self:start;grid-area:e;min-width:0;margin:0}
body.nm-member .nmm-ed-right .nmm-events{margin:0;max-width:none}
html body.nm-member .nmm-ed-mid .nmm-nlist{grid-template-columns:minmax(0,1fr)}
html body.nm-member .nmm-ed-mid .nmm-nlist--1 .nmm-ncard{max-width:none}
body.nm-member .nmm-chips{margin-bottom:24px}
/* phones and small screens: icons, story, featured items and notems, events (the side wrapper dissolves) */
html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.nmm-lay{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"c" "a" "m" "e"}
html body.nm-member .nmm-ed.nmm-lay.nmm-lay > .nmm-ed-side{display:contents}
html body.nm-member .nmm-ed.nmm-lay.nmm-lay > .nmm-ed-side > .nmm-ed-mid,
html body.nm-member .nmm-ed.nmm-lay.nmm-lay > .nmm-ed-side > .nmm-ed-right{margin-bottom:30px}
@media (min-width:981px){
  /* the story uses whatever width its column has */
  html body.nm-member .nmm-ed.nmm-lay.lay-a .nmm-about .nmm-clamp,html body.nm-member .nmm-ed.nmm-lay.lay-a .nmm-about .nmm-about-sum,html body.nm-member .nmm-ed.nmm-lay.lay-a .nmm-about .nmm-clamp .article{max-width:none}
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.nmm-lay{grid-template-areas:"a s"}
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay > .nmm-ed-side{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"c" "m"}
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay > .nmm-ed-side > .nmm-ed-mid,
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay > .nmm-ed-side > .nmm-ed-right{margin-bottom:0}
  /* story + right block */
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-a.lay-s{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-a.lay-s.lay-m.lay-e{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-a.lay-s.lay-e:not(.lay-m){grid-template-columns:minmax(0,1fr) 300px}
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-a.lay-s.lay-m:not(.lay-e){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  /* right block without a story */
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-s:not(.lay-a){grid-template-columns:minmax(0,1fr);grid-template-areas:"s"}
  /* inside the right block */
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-m.lay-e > .nmm-ed-side{grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"c c" "m e";column-gap:28px}
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-e:not(.lay-m) > .nmm-ed-side{grid-template-areas:"c" "e"}
  /* only the story: one full-width column */
  html body.nm-member .nmm-ed.nmm-lay.nmm-lay.nmm-lay.lay-a:not(.lay-s){grid-template-columns:minmax(0,1fr);grid-template-areas:"c" "a"}
  html body.nm-member .nmm-ed.nmm-lay.lay-a:not(.lay-s) .nmm-about,
  html body.nm-member .nmm-ed.nmm-lay.lay-a:not(.lay-s) .nmm-about .nmm-clamp,
  html body.nm-member .nmm-ed.nmm-lay.lay-a:not(.lay-s) .nmm-about .nmm-about-sum{max-width:none;width:auto}
  html body.nm-member .nmm-ed.nmm-lay.lay-a:not(.lay-s) .nmm-about .nmm-clamp .article{max-width:none;columns:auto;column-count:1;column-width:auto}
  html body.nm-member .nmm-ed.nmm-lay.lay-a:not(.lay-s) .nmm-about .nmm-clamp .article img,
  html body.nm-member .nmm-ed.nmm-lay.lay-a:not(.lay-s) .nmm-about .nmm-clamp .article iframe{break-inside:avoid;max-width:100%}
  html body.nm-member .nmm-ed.nmm-lay.lay-a:not(.lay-s) .nmm-about .nmm-clamp .article p{break-inside:auto}
}

