CSS-Tricks recria o :nth-child() com if() e sibling-index(), trocando seletor fixo por variável ajustável. Veja o que muda ...