How States Got Their Shape