Comparisons of the alignment of exoplanets with a common host star and each other can be used to distinguish among concurrent evolution scenarios for the star and the planets. However, multi-planet systems usually host mini-Neptunes and super-Earths, whose sizes make orbital architecture measurements challenging. We introduce the Rossiter-McLaughlin effect Revolutions (RMR) technique, which can access the spin-orbit angle of small exoplanets by exploiting the full extent of information contained in spectral transit time series. We validated the technique through its application to published HARPS-N data of the mini-Neptune HD 3167c (P = 29.8 days), refining its high sky-projected spin-orbit angle (−108.9−5.5+5.4°), and we applied it to new ESPRESSO observations of the super-Earth HD 3167 b (P = 0.96 days), revealing an aligned orbit (−6.6−7.9+6.6°). Surprisingly different variations in the contrast of the stellar lines occulted by the two planets can be reconciled by assuming a latitudinal dependence of the stellar line shape. In this scenario, a joint fit to both datasets constrains the inclination of the star (111.6−3.3+3.1°) and the 3D spin-orbit angles of HD 3167b (29.5−9.4+7.2°) and HD 3167c (107.7−4.9+5.1°). The projected spin-orbit angles do not depend on the model for the line contrast variations, and so, with a mutual inclination of 102.3−8.0+7.4°, we can conclude that the two planets are on perpendicular orbits. This could be explained by HD 3167b being strongly coupled to the star and retaining its primordial alignment, whereas HD 3167c would have been brought to a nearly polar orbit via secular gravitational interactions with an outer companion. Follow-up observations of the system and simulations of its dynamical evolution are required to search for this companion and explore the likelihood of this scenario. HD 3167 b (R = 1.7 REarth) is the smallest exoplanet with a confirmed spectroscopic Rossiter-McLaughlin signal. The RMR technique opens the way to determining the orbital architectures of the super-Earth and Earth-sized planet populations.