In the common-law tradition, word-usage in legal documents matters because of the principle of stare decisis, the doctrine that requires judges to read and interpret previous rulings relevant to the case at hand. Yet we understand very little of how legal authorities actually write legal texts. We analyze 22,773 cases from the United States Courts of Appeals, and we show how judicial identity affects the text of the written case rulings. We demonstrate that the random assignment of a female judge or of a non-white judge to U.S. Appellate Court panels causes systematic changes in the frequencies with which specific, legally-important words appear in the final ruling, along with the rates at which constitutional amendments and landmark Supreme Court cases are cited. Panels present different arguments—and thus leave a different legacy for future jurists to interpret—depending on the identity of the judges chosen by lot to preside over the case at hand.