/* Team-specific layout; common History presentation is in history.css. */
.history-team__back { display: inline-block; margin-bottom: .65rem; padding-block: .25rem; color: var(--color-white); font-size: .9rem; font-weight: 700; text-underline-offset: .2em; }
.history-team__back:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 3px; }
.history-team__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; align-items: start; }
@media (min-width: 64rem) {
  .history-team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Season identities and standings; reflow rather than scroll on small screens. */
.team-league { grid-column: 1 / -1; min-width: 0; }
.history-team__table.team-league__table { min-width: 0; }
.team-league__table small { display: block; margin-top: .15rem; color: var(--color-muted); font-size: .7rem; font-weight: 400; }
.team-league__table .team-league__name { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.team-league__table .team-league__season { white-space: nowrap; }
@media (max-width: 48rem) {
  .team-league__table thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .team-league__table tbody { display: block; }
  .team-league__table tbody tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 1rem; gap: .3rem .15rem; padding: .45rem; border-bottom: 1px solid var(--history-border); border-left: .25rem solid var(--color-border-strong); }
  .team-league__table tbody tr > :is(th, td) { width: auto; border: 0; padding: 0; min-width: 0; }
  .history-team__table.team-league__table .team-league__season { border-left: 0; grid-column: 1 / 3; grid-row: 1; }
  .team-league__table .team-league__name { grid-column: 3 / 6; grid-row: 1; font-weight: 700; }
  .team-league__table .team-league__stat { grid-row: 2; }
  .team-league__table td[colspan] { grid-column: 1 / -1; text-align: left; }
  .team-league__stat::before { content: attr(data-label); display: block; font-size: .65rem; font-weight: 700; }
  .team-league__table .team-league__action { grid-column: 6; grid-row: 1 / 3; align-self: center; }
}
