A 28-year-old woman presents for her first prenatal visit, uncertain about her last menstrual period (LMP) due to irregular cycles. She has a positive home pregnancy test and requests a pelvic ultrasound to determine gestational age. On examination, her uterus is consistent with early pregnancy, but fetal heart sounds are not audible with a Doppler device. The patient denies abdominal pain or bleeding. In which trimester is pelvic ultrasound the most accurate for determining gestational age?