Photo-dynamical characterisation of the TOI-178 resonant chain