/* Height-based feed packing. DOM order remains newest first, across the first row. */
@media(min-width:1000px){
 .packed-feed,#cards{gap:16px}
 .packed-feed>.post,#cards>.card{margin:0;min-width:0}
 .packing{position:relative!important;display:block!important}
 .packing>*{position:absolute!important;box-sizing:border-box;min-width:0;margin:0!important}
}
@media(min-width:1500px){
 .shell .page #fromFreedom{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
 #fromFreedom>.card{margin:0}
 .social-layout{grid-template-columns:minmax(0,1fr) 290px!important}
 #social{max-width:none!important}
}
/* Announcements are equal-width companions, including at the existing desktop breakpoint. */
@media(min-width:1500px){
 #fromFreedom{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
 #fromFreedom>.sec-h{grid-column:1/-1}
 #fromFreedom>.card{height:100%;box-sizing:border-box}
}
.community-bulletins{margin-block:20px}
.community-bulletins h3{margin-bottom:10px}
.community-bulletins p{margin-bottom:12px}

@media(min-width:1500px){
 .shell .page :is(.ce-grid,.browse-grid,.business-grid){gap:20px;align-items:stretch}
}
@media(min-width:2400px){
 #homeStreams .hs-card{width:auto;max-width:none;flex-basis:auto}
 #homeStreams .hs-track{overflow:visible;display:grid!important;grid-template-columns:minmax(0,1.25fr) repeat(2,minmax(0,1fr)) minmax(0,.8fr) minmax(0,1fr)!important}
}
@media(min-width:1000px) and (max-width:1499px){
 #ceEventResults{gap:20px;align-items:stretch}
}
@media(min-width:1500px){
 .shell .page #newsBlock>.community-bulletins{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .shell .page #newsBlock>.community-bulletins>p{grid-column:auto;margin:0}
 .shell .page #newsBlock>.community-bulletins>:is(h3,a){grid-column:1/-1}
}
@media(min-width:1500px){
 .packed-feed .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .packed-feed .actions button{min-width:0;justify-content:center}
}
/* rc2: complete cards at every desktop width; each wrapped row fills its track. */
@media(min-width:1024px){
 #homeStreams .hs-track{display:flex!important;flex-wrap:wrap;overflow:visible;scroll-snap-type:none}
 #homeStreams .hs-card{flex:1 1 240px;width:auto;max-width:none;box-sizing:border-box}
 #homeStreams .hs-wallet{flex:1.25 1 300px}
 #homeStreams .hs-chat{flex:0.8 1 190px}
 #homeStreams .hs-paging{display:none}
}
/* The newsletter owns its row; five short notices fill two complete rows below it. */
@media(min-width:1500px){
 .shell .page #fromFreedom{grid-template-columns:repeat(6,minmax(0,1fr))}
 #fromFreedom>.newsletter{grid-column:1/-1}
 #fromFreedom>.card:not(.newsletter){grid-column:span 2}
 #fromFreedom>.card:nth-child(3),#fromFreedom>.card:nth-child(4){grid-column:span 3}
}
/* Keep both desktop rails under the shell header. Native wheel scrolling chains to
   the document at either end; no wheel interception or overscroll containment. */
@media(min-width:1200px){
 body:has(#homeStreams) aside.side,.social-layout>aside{
  position:sticky;top:80px;align-self:start;max-height:calc(100vh - 160px);
  overflow:auto;overscroll-behavior:auto;scrollbar-width:thin;
 }
 .social-layout>aside{max-height:calc(100vh - 248px)}
}
@media(max-width:1199px){
 .social-layout>aside{position:static;max-height:none;overflow:visible}
}
/* rc4: full-width three-plus-two rows; retain the five-card wide layout. */
@media(min-width:1024px) and (max-width:2047px){
 #homeStreams .hs-track{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important}
 #homeStreams .hs-card{grid-column:span 2}
 #homeStreams .hs-chat{grid-column:span 3}
 #homeStreams .hs-meets{grid-column:span 3}
}
/* Preserve word boundaries throughout Your day. Stack the badge in narrow cards. */
#homeStreams .hs-card,#homeStreams .hs-card *{overflow-wrap:normal;word-break:normal}
#homeStreams .hs-meets{container-type:inline-size}
@container(max-width:322px){
 #homeStreams .lpill{flex-direction:column;align-items:flex-start}
}

/* rc5: readable prose measure at every viewport; grid and table geometry is unchanged. */
p, .help-body li, .article-body li, .description, .svc-note, .w3p-sub {max-inline-size:65ch!important}

.hp-art :is(p,li), .hp-row .k-grow>span, .article-body, .prose {max-inline-size:65ch!important}

/* rc5: prose notices and activity descriptions can also use span/small markup. */
.k-note>span, #lane .row small {max-inline-size:65ch!important}
.w3p-note>span, .w3p-card li {max-inline-size:65ch!important}
.ce-panel .ce-list {max-inline-size:65ch!important}

.rule>span {max-inline-size:65ch!important}

/* rc6: an unused status rail must not reserve a wide, empty column. */
@media(min-width:1500px){
 .shell .page:has(>main+aside.side:empty):not(:has(>.w3-page)){grid-template-columns:minmax(0,1fr)!important}
 .shell .page>aside.side:empty{display:none}
 body.k-reg .shell .page{max-width:none!important}
}
/* Sticky positioning and scroll clipping live on separate boxes. This avoids
   the sticky scrolling layer dropping descendant text during compositor paint. */
@media(min-width:1200px){
 body:has(#homeStreams) aside.side,.social-layout>aside{
  overflow:visible;max-height:none;contain:none;will-change:auto;
 }
 .rail-scroll{
  display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:12px;
  max-height:calc(100vh - 160px);overflow:auto;
  overscroll-behavior:auto;scrollbar-width:thin;isolation:isolate;
 }
 .rail-scroll>*{min-width:0}
 .social-layout>aside>.rail-scroll{max-height:calc(100vh - 248px);display:block}
}
@media(max-width:1199px){.rail-scroll{display:contents}}
/* Apply the same prose measure to notices, including inline span markup. */
p,.help-body li,.article-body li,.description,.svc-note,.w3p-sub,
.hp-art :is(p,li),.hp-row .k-grow>span,.article-body,.prose,
.k-note>span,#lane .row small,.w3p-note>span,.w3p-card li,
.ce-panel .ce-list,.rule>span,.dv-intro,.dv-rules>p,.ce-wallet p,
#about-bills li,.se-feat .k-grow>span{
 max-inline-size:60ch!important;
}
.k-note>span,.rule>span{display:block;min-inline-size:0}
