When child custody cases come before family courts, judges endeavor to base their rulings on the best interests of the child. Overall, the court is less interested in which parent might have the most right to the children than in how best to help the children thrive. The Supreme Court might now be walking a very similar line. It is on the verge of deciding a landmark case that could have a profound impact on the more than 400,000 vulnerable children who find themselves in the U.S. foster care system. Its ruling could also have major implications for LGBTQ rights, religious liberty and nondiscrimination laws across America.