We describe new arithmetic invariants for pairs of torus orbits on groups isogenous to an inner form of $\mathbf{PGL}_n$ over a number field. These invariants are constructed by studying the double quotient of a linear algebraic group by a maximal torus. Using the new invariants we significantly strengthen results towards the equidistribution of packets of periodic torus orbits on higher rank $S$-arithmetic quotients. Packets of periodic torus orbits are natural collections of torus orbits coming from a single adelic torus and are closely related to class groups of number fields. The distribution of these orbits is akin to the distribution of integral points on homogeneous algebraic varieties with a torus stabilizer. The proof combines geometric invariant theory, Galois actions, local arithmetic estimates and homogeneous dynamics.