I've booked a trip which involves a ½-day layover / plane change in China. I don't intend to leave the airport.
Do I need a visa or any other travel document just to arrive and depart again?
You would not need a visa in advance of travel, according to TIMATIC, the database used by airlines, as you would be eligible for Transit Without Visa (TWOV). As you don't mention your itinerary, here are the full details for a US citizen en route via China.
When in transit, passports and other documents accepted for entry must be valid for a minimum of 3 months from the arrival date.
TWOV (Transit Without Visa):
Passengers with a confirmed onward ticket for a flight to a third country within 24 hours. They must stay in the international transit area of the airport and have documents required for the next destination.
This TWOV facility does not apply at Fuzhou (FOC), Huangshan (TXN), Mudanjiang (MDG), Shenzhen (SZX), Urumqi (URC) and Yanji (YNJ).
Passengers with a confirmed onward air, cruise or train ticket to a third country within 24 hours can obtain a transit visa on arrival. They must have documents required for the next destination.
When passengers have obtained a transit visa, they can have multiple transit stops within China (People's Rep.).
This does not apply at Fuzhou (FOC), Huangshan (TXN), Mudanjiang (MDG), Shenzhen (SZX), Urumqi (URC) and Yanji (YNJ).
All transiting passengers are subject to a check by immigration. Passengers in transit must hold passports or other documents accepted to enter China (People's Rep.).