//! AuditMySite - Resource-efficient WCAG 2.1 Accessibility Checker
//!
//! A fast, accurate accessibility auditing tool written in Rust.
//! Uses Chrome DevTools Protocol (CDP) to extract the Accessibility Tree
//! and analyze it for WCAG 2.1 violations.
//!
//! ## Features
//!
//! - **Fast**: Rust performance with async processing
//! - **Accurate**: Uses browser's native Accessibility Tree
//! - **Comprehensive**: Checks WCAG 2.1 Level A, AA, and AAA
//! - **Flexible**: CLI, library, and API interfaces
//!
//! ## Quick Start
//!
//! ```no_run
//! use auditmysite::browser::BrowserManager;
//! use auditmysite::audit::{run_single_audit, PipelineConfig};
//! use auditmysite::cli::WcagLevel;
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//!     // Create browser manager (auto-detects Chrome)
//!     let browser = BrowserManager::new().await?;
//!
//!     // Configure the audit
//!     let config = PipelineConfig {
//!         wcag_level: WcagLevel::AA,
//!         timeout_secs: 30,
//!         verbose: false,
//!         check_performance: false,
//!         check_seo: false,
//!         check_security: false,
//!         check_mobile: false,
//!         check_dark_mode: false,
//!         check_stack: false,
//!         persist_artifacts: true,
//!         capture_screenshots: false,
//!         dismiss_consent: false,
//!         interactive: auditmysite::cli::InteractiveMode::Off,
//!         journey_budget_ms: auditmysite::a11y_journey::DEFAULT_BUDGET_MS,
//!         semantic_eval: auditmysite::semantic_eval::SemanticEvalConfig::default(),
//!         lang: "de".to_string(),
//!     };
//!
//!     // Run audit
//!     let report = run_single_audit("https://example.com", &browser, &config).await?;
//!
//!     // Print results
//!     println!("Score: {}", report.score);
//!     println!("Violations: {}", report.violation_count());
//!
//!     // Close browser
//!     browser.close().await?;
//!
//!     Ok(())
//! }
//! ```
//!
//! ## Modules
//!
//! - [`browser`]: Chrome/Chromium detection and management
//! - [`accessibility`]: Accessibility Tree extraction and structures
//! - [`wcag`]: WCAG rule checking engine
//! - [`audit`]: Audit pipeline and reporting
//! - [`output`]: Report formatters (JSON, CLI, HTML)
//! - [`cli`]: Command-line interface
//! - [`error`]: Error types
//!
//! ## WCAG Rules Implemented
//!
//! | Code | Name | Level |
//! |------|------|-------|
//! | 1.1.1 | Non-text Content | A |
//! | 1.4.3 | Contrast (Minimum) | AA |
//! | 2.1.1 | Keyboard | A |
//! | 2.4.1 | Bypass Blocks | A |
//! | 2.4.4 | Link Purpose (In Context) | A |
//! | 2.4.6 | Headings and Labels | AA |
//! | 3.3.2 | Labels or Instructions | A |
//! | 4.1.2 | Name, Role, Value | A |

pub mod a11y_journey;
pub mod accessibility;
pub mod ai_visibility;
pub mod assessment;
pub mod audit;
pub mod best_practices;
pub mod browser;
pub mod cli;
pub mod content_visibility;
pub mod dark_mode;
pub mod error;
pub mod i18n;
pub mod interaction;
pub mod journey;
pub mod mobile;
pub mod output;
pub mod patterns;
pub mod performance;
pub mod screen_reader;
pub mod security;
pub mod semantic_eval;
pub mod seo;
pub mod source_quality;
pub mod studio;
pub mod taxonomy;
pub mod tech_stack;
pub mod util;
pub mod ux;
pub mod wcag;

// Re-export commonly used types
pub use accessibility::{AXNode, AXTree};
pub use ai_visibility::{analyze_ai_visibility, AiVisibilityAnalysis};
pub use assessment::{
    signal_from_check, AssessmentLevel, ContentArea, ContentEvidence, ContentSignal,
    EvidenceConfidence, EvidenceSource,
};
pub use audit::{
    analyze_crawl_links, audit_page, crawl_site, parse_sitemap, read_url_file,
    run_concurrent_batch, AuditReport, BatchConfig, BatchReport, BrokenLink, BrokenLinkSeverity,
    CrawlDiagnostics, CrawlNode, CrawlResult, PerformanceResults, PipelineConfig, RedirectChain,
};
pub use browser::{
    detect_all_browsers, resolve_browser, BrowserInstaller, BrowserKind, BrowserManager,
    BrowserMode, BrowserOptions, BrowserPool, BrowserResolveOptions, BrowserSource,
    DetectedBrowser, InstallTarget, PoolConfig, ResolvedBrowser,
};
pub use cli::{Args, BrowserAction, Command, OutputFormat, WcagLevel};
pub use content_visibility::{analyze_content_visibility, ContentVisibilityAnalysis};
pub use dark_mode::{analyze_dark_mode, DarkModeAnalysis, DarkModeIssue, DarkModeIssueKind};
pub use error::{AuditError, Result};
pub use journey::{analyze_journey, analyze_journey_with_dom_check, JourneyAnalysis, PageIntent};
pub use mobile::{analyze_mobile_friendliness, MobileFriendliness};
pub use output::{format_json_normalized, print_report};
pub use performance::{
    calculate_performance_score, extract_web_vitals, PerformanceScore, WebVitals,
};
pub use screen_reader::{
    announce, announce_localized, linearize, linearize_with_ignored, navigation_views,
    IgnoredReadingNode, NavigationViews, ReadingItem,
};
pub use security::{analyze_security, SecurityAnalysis};
pub use seo::{analyze_seo, SeoAnalysis};
pub use source_quality::{analyze_source_quality, SourceQualityAnalysis};
pub use ux::{analyze_ux, UxAnalysis};
pub use wcag::{Severity, Violation, WcagResults};
