Subgrid
A nested grid can adopt its parent’s rows or columns instead of declaring its own: the track sizes come from the parent, and the subgrid’s items feed their sizes back up.
Delete: the script that measures card sections and equalises their heights, or the fixed row heights doing the same job with magic numbers.
/* every card hard-codes the shared row plan */
.card { display: grid; grid-template-rows: 3rem 6rem 2rem; }
/* cards borrow their rows from the grid they sit in */
.cards { display: grid; grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, auto); }
.card { display: grid; grid-row: span 3;
grid-template-rows: subgrid; }Track sizing, gaps and line names pass in all four current stable runs. The one seam is baseline alignment: Firefox still fails most of the suite’s baseline tests inside subgrids, so if your grid code contains align-items: baseline or align-self: baseline, check Firefox before deleting. That is the search. In a browser without subgrid the declaration drops and rows fall back to auto: misaligned cards, not broken ones.