/* v3.7.9.8 — structural detail alignment, not a cosmetic max-width patch. */

/* Brand detail owns a real inner content track.  This survives any global .fke-main
   rules and prevents summary/grid children from stretching the page. */
.fke-main.fke-brand-archive-page{
  width:100%!important;max-width:none!important;margin:0!important;padding:28px 0 52px!important;
  box-sizing:border-box!important;overflow-x:clip!important;
}
.fke-main.fke-brand-archive-page>.fke-brand-detail-track{
  width:min(960px,calc(100vw - 64px))!important;max-width:960px!important;min-width:0!important;
  margin:0 auto!important;padding:0!important;box-sizing:border-box!important;
}
.fke-brand-detail-track>.fke-brand-archive{
  width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;display:grid!important;gap:16px!important;
}
.fke-brand-detail-track .fke-brand-archive>*{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
.fke-brand-detail-track .fke-brand-archive__hero{
  width:100%!important;grid-template-columns:minmax(0,1fr) 240px!important;gap:18px!important;padding:20px!important;
}
.fke-brand-detail-track .fke-brand-archive__hero.no-facts{grid-template-columns:1fr!important}
.fke-brand-detail-track .fke-brand-archive__summary{
  width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;min-width:0!important;
}
.fke-brand-detail-track .fke-brand-archive__summary>div{min-width:0!important;padding:13px 14px!important}
.fke-brand-detail-track .fke-brand-archive__featured-grid{
  width:100%!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;min-width:0!important;
}
.fke-brand-detail-track .fke-brand-archive__featured-grid>*{min-width:0!important;max-width:100%!important}
.fke-brand-detail-track .fke-brand-archive__timeline ol{max-width:100%!important;min-width:0!important;overflow-x:auto!important;overscroll-behavior-inline:contain!important}
.fke-brand-detail-track .fke-brand-archive__lower-grid{
  display:grid!important;grid-template-columns:1fr!important;gap:14px!important;min-width:0!important;
}
.fke-brand-detail-track .fke-brand-archive__team-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.fke-brand-detail-track .fke-brand-archive__aside{
  display:grid!important;grid-template-columns:1fr!important;gap:14px!important;min-width:0!important;
}
.fke-brand-detail-track .fke-brand-archive__aside>*{min-width:0!important;max-width:100%!important}

/* Story lists on Team / Brand / Competition are now the same editorial module as
   Player and Kit. Keep them inside their parent track instead of inheriting old
   wide-grid rules. */
:is(.fke-team-profile,.fke-brand-archive,.fke-competition-profile)>.fke-story-list.fke-article-module,
.fke-brand-archive__aside>.fke-story-list.fke-article-module,
.fke-competition-profile__aside>.fke-story-list.fke-article-module{
  width:100%!important;max-width:100%!important;min-width:0!important;
}

@media(max-width:980px){
  .fke-main.fke-brand-archive-page>.fke-brand-detail-track{width:min(960px,calc(100vw - 40px))!important}
}
@media(max-width:760px){
  .fke-main.fke-brand-archive-page>.fke-brand-detail-track{width:calc(100vw - 28px)!important}
  .fke-brand-detail-track .fke-brand-archive__hero{grid-template-columns:1fr!important}
  .fke-brand-detail-track .fke-brand-archive__summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .fke-brand-detail-track .fke-brand-archive__summary>div:nth-child(2){border-right:0!important}
  .fke-brand-detail-track .fke-brand-archive__featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .fke-brand-detail-track .fke-brand-archive__team-grid{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  .fke-main.fke-brand-archive-page{padding:14px 0 74px!important}
  .fke-main.fke-brand-archive-page>.fke-brand-detail-track{width:calc(100vw - 20px)!important}
  .fke-brand-detail-track .fke-brand-archive__summary{grid-template-columns:1fr 1fr!important}
  .fke-brand-detail-track .fke-brand-archive__featured-grid{display:grid!important;grid-template-columns:1fr!important;overflow:visible!important}
}
