.stats-archive { margin-bottom: 2rem; }

.stats-archive .archive-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin: 12px 0;
}
.stats-archive .archive-filters form {
    flex: 1 1 200px;
    min-width: 0;
    margin: 0;
}
.stats-archive .archive-filters label {
    display: block;
    margin: 0 0 4px;
    text-align: center;
    line-height: 1.3;
}
.stats-archive .archive-select {
    display: block;
    position: relative;
}
.stats-archive .archive-select select {
    display: block;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 28px;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #aabac7;
    border-radius: 5px;
    box-shadow: none;
    background: #fff;
    color: #183c5b;
    font: inherit;
    line-height: normal;
    text-align: center;
    text-align-last: center;
    text-overflow: ellipsis;
    cursor: pointer;
}
.stats-archive .archive-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    border: solid #375670;
    border-width: 0 2px 2px 0;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.stats-archive .archive-select select:focus {
    outline: 2px solid #226494;
    outline-offset: 2px;
}
.stats-archive .archive-tabs { margin: 12px 0; }

.stats-archive .table > thead > tr > th,
.stats-archive .table > tbody > tr > td {
    padding: 7px 8px;
    vertical-align: middle;
    line-height: 1.35;
}
.stats-archive .table > thead > tr > th {
    background: #edf2f6;
    color: #234760;
    border-bottom: 1px solid #cdd8e0;
}
.stats-archive .table { font-variant-numeric: tabular-nums; }
.stats-archive .table th,
.stats-archive .table td { text-align: center; }
.stats-archive .archive-standings tr > :nth-child(2),
.stats-archive .table:not(.archive-standings):not(.archive-games) tr > :first-child { text-align: left; }
.stats-archive .archive-standings tbody tr { position: relative; }
.stats-archive .archive-club-link::after {
    content: "";
    position: absolute;
    inset: 0;
}
.stats-archive .archive-club-link:hover::after { background: rgba(34, 100, 148, .06); }
.stats-archive .archive-club-link:focus-visible::after {
    outline: 2px solid #226494;
    outline-offset: -2px;
}

.stats-archive .archive-games { table-layout: fixed; }
.stats-archive .archive-games th:first-child,
.stats-archive .archive-games th:last-child { width: 16%; }
.stats-archive .archive-games th:nth-child(3) { width: 15%; }
.stats-archive .archive-games tr > :nth-child(2) { text-align: right; }
.stats-archive .archive-games tr > :nth-child(4) { text-align: left; }
.stats-archive .archive-games td { overflow-wrap: anywhere; }
.stats-archive .archive-date,
.stats-archive .archive-round { color: #526576; font-size: .9em; }
.stats-archive .archive-result a {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background: #e6eff6;
    color: #184b72;
    font-weight: 700;
    white-space: nowrap;
}
.stats-archive .archive-result a:hover,
.stats-archive .archive-result a:focus {
    color: #fff;
    background: #24587e;
}
.stats-archive .archive-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

@media (max-width: 575px) {
    .stats-archive .archive-filters form { flex-basis: 100%; }
    .stats-archive .archive-games { font-size: 13px; }
    .stats-archive .archive-games tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
        align-items: center;
    }
    .stats-archive .archive-games tbody tr {
        padding: 6px 4px;
        border-top: 1px solid #ddd;
    }
    .stats-archive .archive-games tr > :nth-child(2) { grid-area: 1 / 1; }
    .stats-archive .archive-games tr > :nth-child(3) { grid-area: 1 / 2; }
    .stats-archive .archive-games tr > :nth-child(4) { grid-area: 1 / 3; }
    .stats-archive .archive-games thead th { width: auto; }
    .stats-archive .archive-games thead th:first-child,
    .stats-archive .archive-games thead th:last-child { display: none; }
    .stats-archive .archive-games > tbody > tr > td { padding: 2px 4px; border: 0; }
    .stats-archive .archive-games .archive-date { grid-area: 2 / 1; text-align: right; }
    .stats-archive .archive-games .archive-round { grid-area: 2 / 3; text-align: left; }
}
