Really useful calculator to help create the quantity queries for selectors.
Put in the element being queried, set quantity (exactly, at least, at most, between), the children elements, and wahlah. The example:
.container:has(> :nth-last-child(3):nth-child(-n + 8)) {
/* */
/* your CSS here */
/* */
}
Also, two useful quantity selectors…