system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What happens to your stuff when you die if you don't have a will?

To cover all the bases:

1. If you have a spouse? If you have no spouse? (What is the order? If your parents are alive, do they trump your siblings? What if you only have one distant cousin, etc. is an effort made to find them? By whom?)

2. If you have a mortgage? If you have other debts?

3. If you have wholly-owned property? Partially-owned (i.e. there are other co-owners) property?

4. What happens to your bank accounts?

5. Who is in charge of doling everything out if you haven't declared anyone? The government?

6. Are there taxes involved?
gpt
>If you have a spouse? If you have no spouse? (What is the order? If your parents are alive, do they trump your siblings? What if you only have one distant cousin, etc. is an effort made to find them? By whom?)

It depends on jurisdiction.  Since 16 states have adopted the Uniform Probate Code, let's look at that.

Under the UPC:

1.  If no parent or descendant (child or grandchild) of the dead guy survives, the spouse gets the whole thing.
2.  If the only surviving relatives are children of the dead guy and the spouse, the spouse gets the whole thing *if the spouse has no kids who aren't from the dead guy*
3.  If a parent of the dead guy is alive (and no kids), the spouse gets the first $200,000, and 75% of whatever's left over.
4.  If the dead guy has no parents or kids alive, but the spouse *does* have kids alive not from the dead guy, the spouse gets the first $150,000 an 50% of the remainder
5.  If the dead guy has surviving kids who are not from the spouse, the spouse gets $100,000 and 50% of the remainder.

For the part the spouse doesn't get (or the entire thing if there is no spouse), it goes:

1.  To the kids of the dead guy.
2.  If there are no kids, equally to his parents (if they're both alive), or all to the surviving one
3.  If no surviving parents or kids, then to brothers or sisters (including half-brothers and sisters) in equal share
4.  If no parents, kids, or brothers or sisters: half to the paternal grandparents, half to the maternal grandparents.  If no grandparents on one side, it goes fully to the other.  If no grandparents either, then to the grandparent's descendants.

>If you have a mortgage? If you have other debts?

Debts are always paid out of the estate before it goes to the heirs, even if you have a will.

>If you have wholly-owned property? Partially-owned (i.e. there are other co-owners) property?

That depends on how the property is owned (joint tenancy versus tenancy in common versus tenancy by the entirety).  Here's the short version:

1.  Tenancy in common: if you die, your share becomes part of your estate.
2.  Joint Tenancy: If you die, your share goes to the other owners (note that joint tenancy doesn't happen often).  This is called the right of survivorship
3.  Tenancy by the entirety.  It's only for marriages.  There's a right of survivorship, it goes to the spouse.

>What happens to your bank accounts?

They become part of the estate.

>Who is in charge of doling everything out if you haven't declared anyone? The government?

The state will appoint an administrator (called in some jurisdictions, including Colorado, a Personal Representative) whose job it is to sort this stuff out.  It's a gigantic mess, and plenty of probate lawyers make their entire living working on these kinds of cases.

>Are there taxes involved?

It depends on the size of the estate.  But, AFAIK there are no more taxes than if you had a will.

And if you have literally no one who can inherit it, it may go to the state.