/* like a map app: the map holds still, and the cells beside it scroll as one list. */
.profile {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 1rem;
    height: 100%;
}

/* cells are spaced by the grid's gaps, not their own margins. */
.profile [data-cell] {
    margin: 0;
}

/* rows always fit their content, so a long list scrolls instead of squeezing cells into each other. */
.profile-cells {
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 1rem;
    min-height: 0;
    overflow-y: auto;
    overflow-wrap: anywhere;
    scrollbar-gutter: stable;
}

/* a cell dims while its next account loads, so a click shows at once. */
.profile-cells > [data-cell].htmx-request {
    opacity: 0.5;
}

/* on a phone everything stacks, map first, and the page scrolls instead of the list. */
@media (max-width: 48rem) {
    .profile {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 50vh auto;
        height: auto;
    }

    .profile-cells {
        overflow-y: visible;
    }
}
