Why Did I Switch From Offset to Keyset Pagination (and Watch p99 Latency Drop)

OFFSET 500000 scans and discards half a million rows on every deep page. Here is the switch to keyset pagination on a 40M-row table: the composite cursor, the row-constructor query and the FastAPI code, with EXPLAIN ANALYZE before and after.