Qualified 529 expenses

I know you can claim at least as much as the "estimated cost" from the school is. The "estimated cost" assumes a double (I think in one of the freshman dorms), and since freshmen are required to have an Unlimited meal plan, probably the least expensive "Unlimited Basic" (no guest meals, no "dining dollars") plan.  Can you claim actual cost up to "equivalent costs" (for example, the apartment-style dorm DD was in last year which was 4BR/1BA is now $4623 and she's renting a 3BR/3BA furnished apartment and it should be less for the semester even counting utilities)? Do you only get to claim rent for September if classes start September 2nd, even if the lease starts August 1 and move-in for the dorms is before Labor Day (September 1), and 5 months' rent is less than 1 semester in the dorm (at least the equivalent junior/senior housing, not the "estimated cost" freshman double)? Do you get to claim rent for all of May if graduation is May 5 2026 (and dorms would let you stay until that day or a day later) or do you have to prorate? We're looking at 10 months' rent being less than 2 semesters in the (senior) dorm. If she can't sublet to someone for June and July we'll just have to pay those months out of pocket.  But I'm wondering if we can just submit $814x5 = $4070 for each fall and spring for rent, and up to the $3430 cost of the Unlimited Basic meal plan for groceries, or if fall is going to be limited to $814x4 = $3256 for rent and just slightly more (4 months plus 5 days in May?) for spring rent?