Federal judge blocks President's executive order: how?

Much of the confused legal analysis arises from the fact that there are (at least) six different legal theories being applied to five different provisions of the Order which affect (at least) ten different classes of people. The different possible combinations have to be analyzed differently.

It would be helpful when discussing the strength of any legal claim if you clarify what legal claim, what part of the order, and what class of people. Here’s some options:

Claims
[ol]
[li]Establishment Clause[/li][li]Equal Protection Clause[/li][li]Due Process Clause[/li][li]INA prohibition on discrimination[/li][li]Administrative Procedures Act[/li][li]Religious Freedom Restoration Act[/li][/ol]

Order
[ol]
[li]120-day refugee ban[/li][li]Exception for religious minorities[/li][li]90-day visa ban for 7 countries[/li][li]Indefinite ban on Syrian visas[/li][li]Prior interpretation of order that affected LPRs[/li][/ol]

People
[ol]
[li]LPRs who were outside the US when the order was executed[/li][li]LPRs who were inside the US when the order was executed[/li][li]Visa-holders who were outside the US when the order was executed[/li][li]Visa-holders who were inside the US when the order was executed[/li][li]People with valid visas who are denied entry at a U.S. port of entry on U.S. soil[/li][li]People outside the US seeking to apply for visas[/li][li]People inside the US seeking to apply for visas[/li][li]People who had been granted refugee status[/li][li]People seeking refugee status[/li][li]U.S.-based family members of affected people[/li][li]U.S.-based employers of affected people[/li][li]U.S.-based educational institutions of affected students[/li][/ol]