German federal prosecutors won a court order to detain 12 men arrested on suspicion of involvement in a far-right plot to overthrow the political order by means of targeted attacks.