Buddhism, Daoism and foreign faiths flourish in Tang China, shaping art and society while also becoming entangled in debates over wealth, authority and state control.