UN top court says states must act on climate or face legal consequences under international environmental and human rights law.