/* Football Kit Encyclopedia v3.7.9.7
 * Final relation-card density + brand detail width alignment.
 */

/* Player detail: direct/context relations use the same compact navigation rhythm
   as Kit detail relationship cards. Two records stay two quarter-width cards;
   they never stretch into two giant half-page panels. */
body.single-player .fke-player-profile__relations .fke-player-profile__network-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:start!important;
}
body.single-player .fke-player-profile__relations .fke-player-profile__network-grid>.fke-entity-card{
  height:132px!important;
  min-height:132px!important;
  max-height:132px!important;
  align-self:start!important;
  overflow:hidden!important;
  border-radius:12px!important;
}
body.single-player .fke-player-profile__relations .fke-entity-card.is-compact .fke-entity-card__link{
  display:grid!important;
  grid-template-columns:68px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:center!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  padding:12px!important;
  box-sizing:border-box!important;
  text-align:left!important;
}
body.single-player .fke-player-profile__relations .fke-entity-card.is-compact .fke-entity-card__body{
  display:flex!important;
  min-width:0!important;
  height:100%!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  gap:3px!important;
  padding:0!important;
  text-align:left!important;
}
body.single-player .fke-player-profile__relations .fke-entity-card.is-compact .fke-entity-card__type{
  margin:0!important;
  font-size:9px!important;
  line-height:1.15!important;
  letter-spacing:.1em!important;
}
body.single-player .fke-player-profile__relations .fke-entity-card.is-compact h3{
  display:-webkit-box!important;
  margin:0!important;
  overflow:hidden!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  font-size:19px!important;
  line-height:1.06!important;
  white-space:normal!important;
  text-overflow:clip!important;
}
body.single-player .fke-player-profile__relations .fke-entity-card.is-compact :is(.fke-relation-card__secondary,.fke-player-card__meta-line){
  display:-webkit-box!important;
  margin:1px 0 0!important;
  overflow:hidden!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:1!important;
  color:#667589!important;
  font-size:10.5px!important;
  line-height:1.25!important;
}
body.single-player .fke-player-profile__relations .fke-entity-card.is-compact strong{
  margin-top:auto!important;
  color:#00518c!important;
  font-size:10.5px!important;
  line-height:1.2!important;
}
body.single-player .fke-player-profile__relations .fke-player-card.is-compact .fke-player-card__media,
body.single-player .fke-player-profile__relations .fke-team-card.is-compact .fke-team-card__mark,
body.single-player .fke-player-profile__relations .fke-brand-card.is-compact .fke-brand-card__mark,
body.single-player .fke-player-profile__relations .fke-sponsor-card.is-compact .fke-sponsor-card__mark,
body.single-player .fke-player-profile__relations .fke-country-card.is-compact>a>.fke-entity-card__image,
body.single-player .fke-player-profile__relations .fke-competition-card.is-compact>a>.fke-entity-card__image{
  width:68px!important;
  height:68px!important;
  min-width:68px!important;
  min-height:68px!important;
  max-width:68px!important;
  max-height:68px!important;
  flex:0 0 68px!important;
  margin:0!important;
  border-radius:11px!important;
  object-fit:contain!important;
}
body.single-player .fke-player-profile__relations .fke-player-card.is-compact .fke-player-card__media img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}

/* Brand detail: align with the 960px detail-page content track. */
body.single-brand .fke-main.fke-brand-archive-page{
  width:min(960px,calc(100% - 48px))!important;
  max-width:960px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:28px 0 52px!important;
  box-sizing:border-box!important;
}
body.single-brand .fke-brand-archive{
  width:100%!important;
  max-width:960px!important;
  margin:0!important;
  gap:16px!important;
}
body.single-brand .fke-brand-archive__hero{
  grid-template-columns:minmax(0,1fr) 250px!important;
  gap:18px!important;
  padding:20px!important;
}
body.single-brand .fke-brand-archive__logo{
  width:82px!important;
  height:82px!important;
  flex-basis:82px!important;
}
body.single-brand .fke-brand-archive h1{
  font-size:clamp(36px,4vw,50px)!important;
}
body.single-brand .fke-brand-archive__summary div{
  padding:13px 14px!important;
}
body.single-brand .fke-brand-archive__featured-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
body.single-brand .fke-brand-archive__lower-grid{
  grid-template-columns:minmax(0,1fr)!important;
  gap:14px!important;
}
body.single-brand .fke-brand-archive__team-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
body.single-brand .fke-brand-archive__aside{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
}
body.single-brand .fke-brand-archive__aside>:only-child{grid-column:1/-1}

@media(max-width:980px){
  body.single-player .fke-player-profile__relations .fke-player-profile__network-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.single-brand .fke-main.fke-brand-archive-page{width:min(100% - 36px,960px)!important}
}
@media(max-width:760px){
  body.single-player .fke-player-profile__relations .fke-player-profile__network-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.single-brand .fke-main.fke-brand-archive-page{width:min(100% - 28px,960px)!important}
  body.single-brand .fke-brand-archive__hero{grid-template-columns:1fr!important}
  body.single-brand .fke-brand-archive__featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.single-brand .fke-brand-archive__team-grid{grid-template-columns:1fr!important}
  body.single-brand .fke-brand-archive__aside{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  body.single-player .fke-player-profile__relations .fke-player-profile__network-grid{grid-template-columns:1fr!important}
  body.single-player .fke-player-profile__relations .fke-player-profile__network-grid>.fke-entity-card{height:112px!important;min-height:112px!important;max-height:112px!important}
  body.single-player .fke-player-profile__relations .fke-entity-card.is-compact .fke-entity-card__link{grid-template-columns:62px minmax(0,1fr)!important;padding:10px!important}
  body.single-player .fke-player-profile__relations .fke-player-card.is-compact .fke-player-card__media,
  body.single-player .fke-player-profile__relations .fke-team-card.is-compact .fke-team-card__mark,
  body.single-player .fke-player-profile__relations .fke-brand-card.is-compact .fke-brand-card__mark,
  body.single-player .fke-player-profile__relations .fke-sponsor-card.is-compact .fke-sponsor-card__mark,
  body.single-player .fke-player-profile__relations .fke-country-card.is-compact>a>.fke-entity-card__image,
  body.single-player .fke-player-profile__relations .fke-competition-card.is-compact>a>.fke-entity-card__image{width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;max-width:62px!important;max-height:62px!important;flex-basis:62px!important}
  body.single-brand .fke-main.fke-brand-archive-page{width:100%!important;padding:14px 12px 74px!important}
  body.single-brand .fke-brand-archive__featured-grid{display:flex!important;overflow-x:auto!important;gap:10px!important}
  body.single-brand .fke-brand-archive__featured-grid>.fke-kit-card{flex:0 0 220px!important}
}
