We generalise the framework of Dyson-Schwinger and Bethe-Salpeter equations for four-quark states to accommodate the case of unequal quark masses. As a first application, we consider the quantum numbers I(JPC)=0(1++) of the X(3872) and study the four-quark states with quark contents cqqˉcˉ and cssˉcˉ. Their Bethe-Salpeter amplitudes are represented by a basis of heavy-light meson-meson, hadro-charmonium and diquark-antidiquark operators, which allows for a dynamical distinction between different internal configurations. In both cases we find the heavy-light meson-meson component to be dominant. For the putative X(3872) we obtain a mass of 3916(74) MeV; the corresponding cssˉcˉ state is predicted at 4068(61) MeV.