.before_week_scoreboard {
    margin-bottom: 0;
}
.week_scoreboard {
    --scoreboard-undecided: #e9ecef;
    --scoreboard-muted: #6c757d;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5em;
    font-variant-numeric: tabular-nums;
}
.week_scoreboard {
    /* test */
    background: #f5f6f740;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: 0;
    border: 0;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}
.week_scoreboard_header {
    padding: 1.5rem 16px 0;
    text-align: center;
}
.week_scoreboard_title {
    margin: 0;
    font-size: 1.75em;
    font-weight: 600;
}
.weekly_matches_header time {
    background: none;
    padding: 0;
    margin: 0 !important;
    display: inline;
}
.week_scoreboard_matches {
    display: grid;
    grid-auto-columns: minmax(0, 544px);
    justify-content: center;
    gap: 0 2.5rem;
    padding: 4px 16px 1.5rem;
}
.week_scoreboard_many_matches {
    --scoreboard-match-width: 410px;
    grid-auto-columns: minmax(0, var(--scoreboard-match-width));
    column-gap: clamp(2.5rem, (100% - 3 * var(--scoreboard-match-width)) / 2, 5rem);
}
@media (min-width: 1200px) {
    .week_scoreboard_matches {
        grid-auto-flow: column;
        grid-template-rows: repeat(4, auto);
    }
}
.week_scoreboard_match {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    padding: 12px 0;
}

.week_scoreboard_teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    align-self: end;
    gap: 8px;
    font-size: 1.1em;
    line-height: 1.3;
}
.week_scoreboard_team {
    display: flex;
    gap: 6px;
}
.week_scoreboard_team_name {
    min-width: 0;
    overflow-wrap: break-word;
    hyphens: auto;
}
@media (max-width: 575.98px) {
    .week_scoreboard_teams {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "left right" "score score";
        gap: 4px 8px;
        font-size: 1em;
    }
    .week_scoreboard_team_left {
        grid-area: left;
    }
    .week_scoreboard_team_right {
        grid-area: right;
    }
    .week_scoreboard_score {
        grid-area: score;
        justify-self: center;
    }
}
.week_scoreboard_team .bw-color-icon {
    width: 14px;
    height: 14px;
    margin: 0.2em 0 0;
    border-radius: 3px;
}
.week_scoreboard_team_right {
    justify-content: flex-end;
    text-align: right;
}
.week_scoreboard_winner {
    font-weight: 600;
}
.week_scoreboard_score {
    padding: 1px 8px;
    border-radius: 0.3em;
    background-color: #f1f3f5;
    font-weight: 600;
}

.week_scoreboard_boxes {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: auto auto;
    grid-auto-columns: minmax(0, 24px);
    justify-content: center;
    gap: 2px;
    margin: 12px 0 8px;
}
.week_scoreboard_boxes::after {
    content: "";
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: calc(50% - 1px);
    width: 2px;
    border-radius: 1px;
    background-color: #343a40;
}
.week_scoreboard_box {
    position: relative;
    z-index: 1;
    display: grid;
    aspect-ratio: 1;
    border-radius: 3px;
    background-color: var(--scoreboard-undecided);
}
.week_scoreboard_box_middle {
    grid-row: span 2;
    align-self: center;
}
@media (max-width: 767.98px) {
    .week_scoreboard_boxes {
        grid-template-rows: auto auto auto;
    }
    .week_scoreboard_box_middle {
        grid-row: auto;
        align-self: auto;
    }
}
.week_scoreboard_box .race-icon {
    width: auto;
    height: auto;
    margin: 0;
    border-radius: inherit;
    background-color: var(--player-color);
}
.week_scoreboard_box .race-icon img {
    width: 76%;
    height: auto;
}
.week_scoreboard_status {
    margin: 0 0 8px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--scoreboard-muted);
}
.week_scoreboard_status strong {
    color: #212529;
}

.week_scoreboard_tiers {
    display: flex;
    line-height: 1.25rem;
    text-align: center;
}
.week_scoreboard_tiers::after {
    content: "";
}
.week_scoreboard_tier_labels,
.week_scoreboard_tiers::after {
    flex: 1 0 0;
}
.week_scoreboard_tier_labels {
    padding: 4px 0;
    text-align: right;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--scoreboard-muted);
}
.week_scoreboard_tier_labels div {
    padding-right: 10px;
}
.week_scoreboard_tier + .week_scoreboard_tier {
    margin-left: 2px;
}
.week_scoreboard_tier {
    flex: 0 1 64px;
    min-width: 0;
    padding: 4px 0;
    border-radius: 4px;
    background-color: color-mix(in srgb, var(--player-color, #adb5bd) 25%, white);
    color: #212529;
}
.week_scoreboard_decided {
    background-color: color-mix(in srgb, var(--player-color, #9aa7b3) 100%, black);
    color: white;
}
.week_scoreboard_tier_number {
    font-size: 0.75rem;
    font-weight: 600;
}
.week_scoreboard_tier_to_play {
    font-size: 0.875rem;
}
.week_match_table .match_segment {
    color: #6c757d;
    padding-left: 0 !important;
    font-weight: normal;
}
.week_match_table .tier_start th {
    border-top-color: #aab3be;
}
.week_match_table .tier_segment_start th {
}
.week_match_table tbody tr[data-tier="0"] {
    --tier-color: var(--tier-0);
}
.week_match_table tbody tr[data-tier="1"] {
    --tier-color: var(--tier-1);
}
.week_match_table tbody tr[data-tier="2"] {
    --tier-color: var(--tier-2);
}
.week_match_table tbody tr[data-tier="3"] {
    --tier-color: var(--tier-3);
}
.week_match_table tbody tr[data-tier="4"] {
    --tier-color: var(--tier-4);
}
.week_match_table tbody tr[data-tier] > th:first-child {
    position: relative;
    padding-left: 11px !important;
}
.week_match_table tbody tr[data-tier] > th:first-child::after {
    content: '';
    pointer-events: none;
    position: absolute;
    top: -1px;
    bottom: 0;
    left: 0;
    background: var(--tier-color);
    width: 5px;
    z-index: 4;
    mix-blend-mode: multiply;
}
/* note: hidden for now. */
.week_match_table tbody tr[data-tier] > th:first-child {
    padding-left: 6px !important;
}
.week_match_table tbody tr[data-tier] > th:first-child::after {
    display: none;
}
