Both sides have shown remarkable dexterity in their understanding of the law, abruptly switching positions on issues like whether states have standing to sue, whether individual federal judges may issue nationwide injunctions and whether a federal threat to withhold funds can amount to a constitutional violation.