The amount of applicable lines involving the scratched runner will be refunded, while the remainder of the trifecta bet will still stand.
For example, in the bet below, if runner #4 was scratched, as it is involved in one possible winning line, $1.00 will be refunded and the remaining bet will stand.
In the bet below, if runner #1 or #2 was scratched, the whole bet would be voided, as the runner would be required to place 1st or 2nd for the bet to win (in other words, the scratched runner would be involved in every possible winning line/combo).