fn ratios(sizes: &[f64]) -> Vec<f64>
Flex sizes → ratios summing to exactly 1, rounded to 4 places for a readable file (the last sibling absorbs the rounding). Non-positive sizes share equally.