I sometimes see the first Friedmann equation expressed with different terms for the density of "matter" and the density of "radiation". It is said that with an increase in scale factor of $a$, the density of "matter" drops by a factor of $a^3$, since the volume of space has expanded by $a^3$; but the density of "radiation" drops by a factor of $a^4$, because in addition to the expansion of space, it also gets redshifted.
But as we know, matter and energy are equivalent. So I am trying to understand what exactly distinguishes "matter" from "radiation" here.
Although a photon traveling through expanding space gets redshifted, a massive particle traveling through expanding space also has its de Broglie wavelength redshifted, which causes it to lose kinetic energy. So is part of the energy of moving particles also considered "radiation"? Is the difference between "matter" and "radiation" that "radiation" means kinetic energy and "matter" means rest energy?
But the rest energy of ordinary matter is mostly the rest energy of protons and neutrons. A large part of the rest energy of protons and neutrons is the kinetic energy of the quarks and gluons inside. Does that kinetic energy also decrease as space expands? Or does it not decrease because it is confined in a fixed volume of space? So does "radiation" only cover the kinetic energy that is used to travel from one part of space to another, and "matter" cover energy that is confined?