I think a 16" or shorter (is that legal?) barrel
Legal? Yes and maybe no.....
It is legal on the federal level, with some expenses and forms for registration. I don't know enough to tell you more.
But on the state level, in some states it is legal and in some it is illegal to have a carbine with a barrel less than 16 inches. Hence the way that we all own "M4geries" with longer barrels than our troops use. The real M4 carbine has a 14.5-inch barrel.
So investigate for your state to find out if you can have what is called a Short Barreled Rifle (SBR). Here in Washington State, we cannot have one. Or full auto. But we can own sound suppressors, but not legally shoot them. Guess which law is not enforced
Who wants to point out that you can even change calibers by changing the upper.