/* Rules page — team list */
.rules-area-head {
    margin-top: var(--space-7);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
}

.team-list {
    --team-label-min-width: 5.5rem;
    --team-label-gap: 0.65rem;
}

.team-list__sections {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.team-list__row {
    display: table-row;
}

.team-list__rank,
.team-list__members {
    display: table-cell;
    vertical-align: middle;
    padding: 0.38rem 0;
    border-bottom: 1px solid var(--color-border);
}

.team-list__row:first-child .team-list__rank,
.team-list__row:first-child .team-list__members {
    padding-top: 0;
}

.team-list__row:last-child .team-list__rank,
.team-list__row:last-child .team-list__members {
    padding-bottom: 0;
    border-bottom: none;
}

.team-list__rank {
    width: 1%;
    min-width: var(--team-label-min-width);
    padding-right: var(--team-label-gap);
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--team-rank-color);
    white-space: nowrap;
}

.team-list__members {
    width: auto;
    line-height: 0;
}

.team-list__empty {
    display: inline-block;
    margin: 0.175rem 0.35rem 0.175rem 0;
    padding: 0.18rem 0.5rem 0.18rem 0.18rem;
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.5rem;
    vertical-align: middle;
    color: var(--color-text-muted);
}

.rules-page {
    margin-bottom: 0;
}

.rules-page__meta {
    margin: 0 0 0.35rem;
}

.rules-page .card__title {
    margin-top: 0;
}

.rules-highlight-box {
    margin-top: 0.85rem;
    padding: 0.95rem 1rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--color-accent) 10%, transparent) 0%, transparent 100%),
        color-mix(in srgb, var(--color-bg-slot) 92%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rules-highlight-box > :first-child {
    margin-top: 0;
}

.rules-highlight-box > :last-child {
    margin-bottom: 0;
}

.rules-command,
.prose .rules-command {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #55ffff;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid color-mix(in srgb, #55ffff 35%, transparent);
    border-radius: 0.3rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 12px rgba(85, 255, 255, 0.12);
}

@media (max-width: 520px) {
    .team-list__sections {
        display: block;
    }

    .team-list__row {
        display: block;
        padding: 0.45rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .team-list__row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .team-list__row:first-child {
        padding-top: 0;
    }

    .team-list__rank,
    .team-list__members {
        display: block;
        width: auto;
        padding: 0;
        border-bottom: none;
    }

    .team-list__rank {
        margin-bottom: 0.35rem;
    }

    .team-list__members {
        line-height: normal;
    }

    .team-list__empty {
        margin-left: 0;
    }
}
