.team-stack,
.team-card-body,
.team-home-grid {
    display: grid;
    gap: 1rem;
}

.team-home-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.team-card-body {
    justify-items: start;
}

.team-attendance-header,
.team-attendance-row,
.team-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.team-attendance-header {
    flex-wrap: wrap;
}

.team-attendance-row,
.team-history-row {
    padding-block: 0.85rem;
}

.team-attendance-row + .team-attendance-row,
.team-history-row + .team-history-row {
    border-top: 1px solid var(--gray-200);
}

.team-attendance-row:first-child,
.team-history-row:first-child {
    padding-top: 0;
}

.team-attendance-row:last-child,
.team-history-row:last-child {
    padding-bottom: 0;
}

.team-row-title {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.team-meta {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.team-row-title .team-meta {
    margin-inline-start: 0.35rem;
    font-weight: 400;
}

.team-attendance-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

.team-attendance-buttons button {
    min-height: 2.75rem;
    white-space: nowrap;
}

.team-history-row > :last-child {
    flex-shrink: 0;
}

.team-error {
    color: #b91c1c;
}

.dark .team-attendance-row + .team-attendance-row,
.dark .team-history-row + .team-history-row {
    border-color: var(--gray-700);
}

.dark .team-meta {
    color: var(--gray-400);
}

.dark .team-error {
    color: #fca5a5;
}

@media (max-width: 38rem) {
    .team-attendance-row {
        flex-direction: column;
        align-items: stretch;
    }
}
