.grid {
    display: grid;
    grid-gap: var(--grid-spacing, 1rem);
    grid-template-columns: repeat(auto-fit, minmax(var(--grid-col-width, 250px), 1fr));
}

.grid[data-cols="3"] {
    --grid-col-width: clamp(12rem, 30%, 15rem);
}