pub fn is_debug() -> bool {
    std::env::var("DOQIUM_DEBUG")
        .map(|v| v == "true" || v == "1")
        .unwrap_or(false)
}

pub fn debug_file_content(path: &str, content: &str) {
    if is_debug() {
        eprintln!("\n🔍 DEBUG: File content from '{}':", path);
        eprintln!("{}", content);
        eprintln!();
    }
}
