/*! ARTICLE END MODULES (Figma 6556:19299 most-read-in-article · 6556:19799 feeder-in-article) — the two modules that close an article. Each one reads its SLOT's width, not the window's: the design names its states min 481 / max 480. */

.article-end{display:flex;flex-direction:column;gap:var(--grid-row-gap-x-loose);box-sizing:border-box;width:100%;max-width:var(--maxw-salamandra);padding:var(--sp-x-spacious) var(--sp-normal);}
.article-end__slot{container-type:inline-size;container-name:article-end;min-width:0;}
/* a state of a module that has none of its own: the feeder is already a sliding row of cards (.feeder--row-md) and this only
   turns it into a boxed list when the slot is narrow. "Most read" is the other way round — the home-page column is its
   narrow state, so the sliding row is what is added when the slot is wide. */

/* "most read", narrow: the numbered list (.feed-column) — the sixth story is the wide row's alone */
@container article-end (max-width:480.98px){
  .most-read--article ip-most-read-item:nth-child(n+6){display:none;}
}
@container article-end (min-width:481px){
  .most-read--article .feed-column{flex-direction:row;gap:var(--sp-x-loose);overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin;}
  .most-read--article ip-most-read-item{position:relative;flex:1 0 var(--feeder-item-min);min-width:var(--feeder-item-min);border-block-start:0;padding-block-start:0;scroll-snap-align:start;--feeder-item-min:186px;}
  .most-read--article ip-most-read-item + ip-most-read-item::before{content:"";position:absolute;inset-block:0;inset-inline-start:calc(var(--sp-x-loose) / -2);border-inline-start:var(--bw-thin) dotted var(--border-hairline);}
  .most-read--article ip-most-read-item article{height:100%;}
  .most-read--article .most-read-item__link{flex-direction:column;align-items:stretch;gap:0;height:100%;background:var(--bg-surface-1);border-radius:var(--radius-card);overflow:hidden;}
  .most-read--article .most-read-item{display:contents;}
  .most-read--article .most-read-item__media{order:1;width:100%;height:auto;margin-block-end:var(--sp-snug);aspect-ratio:1/1;border-radius:var(--radius-none);}
  .most-read--article .most-read-item__rank{order:2;align-self:flex-start;margin-inline:var(--sp-tight);margin-block-end:var(--sp-tight);text-align:start;}
  .most-read--article .most-read-item__content{order:3;flex:none;padding:0 var(--sp-tight) var(--sp-tight);}
  .most-read--article .most-read-item__headline{font:var(--ts-headline-sm);}
}

/* "feeder", narrow: a boxed list, the photo beside the text */
@container article-end (max-width:480.98px){
  .feeder--article{padding:var(--sp-normal);background:var(--bg-surface-1);border:var(--bw-thin) solid var(--border-hairline);border-radius:var(--radius-card);}
  .feeder--article .feed-row{flex-direction:column;gap:var(--grid-row-gap-snug);overflow-x:visible;}
  .feeder--article .feed-row > ip-feeder-item{flex:none;min-width:0;border-block-start:var(--bw-thin) dotted var(--border-hairline);padding-block-start:var(--grid-row-gap-snug);}
  .feeder--article .feed-row > ip-feeder-item:nth-child(n+5){display:none;}
  .feeder--article .feed-row > ip-feeder-item + ip-feeder-item::before{display:none;}
  .feeder--article.feeder--row-md .feeder-item__link{flex-direction:row;height:auto;background:none;border-radius:var(--radius-none);overflow:visible;}
  .feeder--article.feeder--row-md .feeder-item__link .feeder-item__media{width:75px;height:75px;aspect-ratio:auto;border-radius:var(--radius-card-media);}
  .feeder--article.feeder--row-md .feeder-item__content{padding:0;}
}
