/* Shared ranking cards on the home and season pages. */
.ranking-widgets,
.all-time-section .stats-grid.ranking-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 1rem;
    align-items: start;
}
.ranking-widgets > :is(.season-card, .stats-card) {
    min-width: 0;
    padding: .9rem;
    height: auto;
    border: 1px solid #e3e9f2;
    border-top: 3px solid #dc143c;
    border-radius: 12px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 4px 16px rgba(16, 34, 87, .04);
    transform: none;
}
.ranking-widgets > :is(.season-card, .stats-card):hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(16, 34, 87, .07);
}
.ranking-widgets > :is(.season-card, .stats-card) > :is(h2, h3) {
    margin: 0 0 .25rem;
    padding: .1rem 0 .65rem;
    border-bottom: 1px solid #e9eef5;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 750;
    color: #172b4d;
    min-height: 0;
    box-sizing: border-box;
}
.ranking-widgets .season-list { gap: 0; flex: 0 0 auto; }
.ranking-widgets .season-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) max-content;
    align-items: center;
    gap: .5rem;
    min-height: 62px;
    padding: .5rem 0;
    border: 0;
    border-bottom: 1px solid #edf1f6;
    border-radius: 0;
    background: #fff;
    box-sizing: border-box;
}
.ranking-widgets .season-item:last-child { border-bottom: 0; }
.ranking-widgets .season-item:hover { background: #f8faff; }
.ranking-widgets .ranking-identity {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    text-align: left;
}
.ranking-widgets .ranking-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    background: #f1f4f8;
    border: 1px solid #e7ecf4;
}
.ranking-widgets .ranking-copy { min-width: 0; }
.ranking-widgets .ranking-name {
    display: block;
    margin: 0;
    color: #142c52;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
}
.ranking-widgets .ranking-name:hover { color: #003893; text-decoration: underline; }
.ranking-widgets .ranking-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .15rem;
    color: #66758b;
    font-size: .74rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.ranking-widgets .ranking-identity .ranking-meta .flag-icon {
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    height: 12px;
    margin: 0;
    border-radius: 1px;
    box-shadow: none;
}
.ranking-widgets .season-item .rank-badge,
.ranking-widgets .stats-card tbody tr .rank-badge {
    width: 24px;
    min-width: 24px;
    height: 24px;
    margin: 0;
    background: #f0f3f8;
    color: #68768a;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 7px;
}
.ranking-widgets .season-item:first-child .rank-badge,
.ranking-widgets .stats-card tbody tr:first-child .rank-badge {
    background: #fff2c7;
    color: #8a5900;
}
.ranking-widgets .stat-highlight,
.ranking-widgets .stats-card .stats-value {
    display: inline-block;
    margin: 0;
    padding: .25rem .4rem;
    background: #f0f5fc;
    border-radius: 6px;
    color: #003893;
    font-size: .95rem;
    line-height: 1.35;
    font-weight: 750;
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.ranking-widgets .stat-highlight small { display: block; font-size: .65rem; font-weight: 500; color: #66758b; }
.ranking-widgets .score-badge { min-width: 3.2rem; text-align: center; }
.ranking-widgets .score-badge small { margin-top: .1rem; }
.ranking-widgets .player-info { gap: .65rem; }
.ranking-widgets .player-name-season { white-space: normal; overflow: visible; line-height: 1.4; }
.ranking-widgets .player-team-season, .ranking-widgets .player-stat { margin-top: .25rem; font-size: .74rem; color: #66758b; line-height: 1.45; }
.ranking-widgets .card-footer { margin-top: .4rem; padding: .5rem 0 0; border-top: 1px solid #e9eef5; }
.ranking-widgets .card-footer a { padding: .3rem 0; font-size: .8rem; }
.ranking-widgets .season-list + .card-footer { margin-top: .4rem; }
.ranking-widgets .season-card-detail { margin: .15rem 0 .35rem; line-height: 1.4; }
.ranking-widgets .home-standings .standings-table :is(th, td) { padding: .5rem .35rem; }
.ranking-widgets .stats-card table { flex: 0 0 auto; table-layout: auto; border: 0; box-shadow: none; border-radius: 0; }
.ranking-widgets .stats-card table tbody tr { background: #fff; }
.ranking-widgets .stats-card table tbody td {
    padding: .5rem .3rem;
    height: 62px;
    border-bottom: 1px solid #edf1f6;
    box-sizing: border-box;
    background: #fff;
    vertical-align: middle;
}
.ranking-widgets .stats-card table tbody td:first-child { padding-left: 0; }
.ranking-widgets .stats-card:not(.team-records-card) table tbody td:first-child { width: 30px; }
.ranking-widgets .team-records-card table tbody td:first-child { width: auto; }
.ranking-widgets .stats-card table tbody td:last-child { padding-right: 0; width: 1%; white-space: nowrap; text-align: right; }
.ranking-widgets .stats-card table tbody tr:last-child td { border-bottom: 0; }
.ranking-widgets .team-ranking-card .player-name a { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.ranking-widgets .team-ranking-card .player-name > span { min-width: 0; }
.ranking-widgets .team-ranking-card .home-team-logo { width: 30px; height: 30px; flex: 0 0 30px; }
.ranking-widgets .ranking-team {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    text-decoration: none;
    text-align: left;
}
.ranking-widgets .ranking-team .team-list-logo {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    object-fit: contain;
    margin: 0;
}
.ranking-widgets .ranking-team-copy { min-width: 0; }
.ranking-widgets .ranking-team-name {
    display: block;
    color: #142c52;
    font-size: .86rem;
    font-weight: 650;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}
.ranking-widgets .ranking-team:hover .ranking-team-name { color: #003893; text-decoration: underline; }
.ranking-widgets .ranking-team-opponent {
    display: block;
    margin-top: .15rem;
    color: #66758b;
    font-size: .72rem;
    font-weight: 400;
    line-height: 1.35;
}
.ranking-widgets .team-ranking-card .season-item { min-height: 54px; padding: .4rem 0; }
.ranking-widgets .team-ranking-card table tbody td { height: 48px; padding: .4rem .3rem; }
.ranking-widgets .team-ranking-card table thead th { padding: .45rem .3rem; font-size: .7rem; }
.ranking-widgets .team-ranking-card table :is(th, td):first-child { padding-left: 0; }
.ranking-widgets .team-ranking-card table :is(th, td):last-child { padding-right: 0; }
.ranking-widgets .team-ranking-card table thead th:first-child { padding-left: .65rem; }
.ranking-widgets .team-ranking-card table thead th:last-child { padding-right: .65rem; }
.ranking-widgets .team-records-card table :is(th, td):first-child { width: auto; }
.ranking-widgets .team-records-card table :is(th, td):not(:first-child) { width: 1%; white-space: nowrap; text-align: right; }
.ranking-widgets .team-records-card .stats-value { padding: .2rem .35rem; font-size: .85rem; }
.ranking-widgets .team-records-card .secondary-stat { font-size: .8rem; font-variant-numeric: tabular-nums; }
.ranking-widgets .home-standings .standings-table { border: 0; border-radius: 0; box-shadow: none; }
.ranking-widgets .home-standings .standings-table table { table-layout: auto; }
.ranking-widgets .home-standings table th:first-child { width: auto; }
.ranking-widgets .home-standings table :is(th, td):not(:first-child) { width: 1%; white-space: nowrap; text-align: right; }
.ranking-widgets a:focus-visible { outline: 2px solid #003893; outline-offset: 3px; border-radius: 3px; }
@media (max-width: 420px) {
    .ranking-widgets > :is(.season-card, .stats-card) { padding: .8rem; }
    .ranking-widgets .season-item { gap: .5rem; }
    .ranking-widgets .ranking-identity { gap: .5rem; }
    .ranking-widgets .ranking-avatar { width: 32px; height: 32px; flex-basis: 32px; }
}
