Hereditary monarchy
In the 1970s, Sweden changed from agnatic succession to "fully-cognatic" succession. That means the line of succession is based on age, not sex. Therefore, Princess Victoria of Sweden was born, she could never become queen, and when her younger brother was born, he became crown prince (heir to the throne), but the law changed, and Victoria became crown princess.