import SwiftUI

/// Width tuning for the universal layout. In a wide iPad detail column, content designed for a
/// phone runs edge-to-edge and loses the Mac's comfortable reading measure; `readableColumn`
/// caps its width and centers it. It's a no-op on the phone and on iPad compact multitasking,
/// where the available width is already below the cap — so the iPhone layout is unchanged.
extension View {
    func readableColumn(_ maxWidth: CGFloat = 820) -> some View {
        frame(maxWidth: maxWidth, alignment: .leading)
            .frame(maxWidth: .infinity, alignment: .center)
    }
}
