/* Fluid site frame; content density follows available space, not monitor ratio. */
html.wooddesk-theme{--wd-frame-max:2720px;--wd-frame-gutter:clamp(24px,3vw,72px);--wd-frame-gap:clamp(20px,1.5vw,32px)}
html.wooddesk-theme body.wooddesk-reference .shell,
html.wooddesk-theme body.wooddesk-reference #content{max-width:var(--wd-frame-max)}
html.wooddesk-theme body.wooddesk-reference #primary{container-type:inline-size;container-name:wd-main}
@media(min-width:1250px){
 html.wooddesk-theme body.wooddesk-reference .shell{width:100%;padding-inline:var(--wd-frame-gutter)}
 html.wooddesk-theme body.wooddesk-reference #content{padding-inline:var(--wd-frame-gutter);gap:var(--wd-frame-gap);grid-template-columns:clamp(230px,13vw,290px) minmax(0,1fr) clamp(240px,14vw,310px)}
 html.wooddesk-theme body.wooddesk-reference.wd-gallery #content{grid-template-columns:clamp(215px,12vw,280px) minmax(0,1fr)}
 html.wooddesk-theme body.wooddesk-reference .wd-articles-grid{gap:clamp(20px,1.4vw,30px)}
 html.wooddesk-theme body.single-post #primary{max-width:1280px;justify-self:center;margin-inline:auto!important}
 html.wooddesk-theme body.single-post .post.card .post-content{max-width:980px;width:100%;margin-inline:auto}
 html.wooddesk-theme body.page .post.card .post-content{max-width:1100px;width:100%;margin-inline:auto}
}
@media(min-width:1600px){
 html.wooddesk-theme body.wooddesk-reference .hero .wdg-hero-grid{grid-template-columns:clamp(350px,24vw,520px) minmax(0,1fr) clamp(180px,12vw,240px);gap:var(--wd-frame-gap)}
 html.wooddesk-theme body.wooddesk-reference .hero .wdg-hero-brand h1{font-size:clamp(48px,3vw,68px)}
}
/* Cards use the main column width, including when the sidebars are visible. */
@container wd-main (min-width:1280px){
 .wd-articles-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@container wd-main (min-width:1850px){
 .wd-articles-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:580px){
 html.wooddesk-theme body.wooddesk-reference #primary{container-type:normal}
}
/* Preserve the original media-card sizes; extra space adds columns. */
#films .film-grid > .film-card:nth-child(n+4),
#wd-home-photos .photo-grid > .photo-item:nth-child(n+4){display:none}
@media(min-width:721px){
 html.wooddesk-theme body.wooddesk-reference .film-grid,
 html.wooddesk-theme body.wooddesk-reference .photo-grid{grid-template-columns:repeat(auto-fill,266px);gap:11px;justify-content:start;align-items:start}
 html.wooddesk-theme body.wooddesk-reference.wd-gallery .gallery-day-grid{grid-template-columns:repeat(auto-fill,272px);gap:10px;justify-content:start;align-items:start}
 #films .film-grid > .film-card:nth-child(n+2),
 #wd-home-photos .photo-grid > .photo-item:nth-child(n+2){display:none}
 @container wd-main (min-width:543px){
  #films .film-grid > .film-card:nth-child(-n+2),
  #wd-home-photos .photo-grid > .photo-item:nth-child(-n+2){display:block}
 }
 @container wd-main (min-width:820px){
  #films .film-grid > .film-card:nth-child(-n+3),
  #wd-home-photos .photo-grid > .photo-item:nth-child(-n+3){display:block}
 }
 @container wd-main (min-width:1097px){
  #films .film-grid > .film-card:nth-child(-n+4),
  #wd-home-photos .photo-grid > .photo-item:nth-child(-n+4){display:block}
 }
 @container wd-main (min-width:1374px){
  #films .film-grid > .film-card:nth-child(-n+5),
  #wd-home-photos .photo-grid > .photo-item:nth-child(-n+5){display:block}
 }
 @container wd-main (min-width:1651px){
  #films .film-grid > .film-card:nth-child(-n+6),
  #wd-home-photos .photo-grid > .photo-item:nth-child(-n+6){display:block}
 }
 @container wd-main (min-width:1928px){
  #films .film-grid > .film-card:nth-child(-n+7),
  #wd-home-photos .photo-grid > .photo-item:nth-child(-n+7){display:block}
 }
 @container wd-main (min-width:2205px){
  #films .film-grid > .film-card:nth-child(-n+8),
  #wd-home-photos .photo-grid > .photo-item:nth-child(-n+8){display:block}
 }
}
