root = Card([header, kpiSection, trendSection, productsSection, exportSection])
header = CardHeader("Monthly Sales Check", "Founder overview — June 2025")
kpiSection = Card([kpiHeader, revenueStat, conversionStat], "sunk")
kpiHeader = CardHeader("This month", "June 2025")
revenueStat = Card([revenueLabel, revenueValue, revenueDelta], "clear")
revenueLabel = TextContent("Revenue this month", "small")
revenueValue = TextContent("$48,320", "large-heavy")
revenueDelta = Tag("+6.4% vs last month", null, null, "success")
conversionStat = Card([conversionLabel, conversionValue, conversionContext], "clear")
conversionLabel = TextContent("Conversion rate", "small")
conversionValue = TextContent("3.2%", "large-heavy")
conversionContext = TextContent("Visitors → paying customers", "small")
trendSection = Card([trendHeading, trendChart], "sunk")
trendHeading = Heading("Revenue — last 6 months", "h3")
trendChart = LineChart(months, [revenueSeries], "natural", "Month", "USD")
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
revenueSeries = Series("Revenue", [31200, 28800, 33500, 36100, 39800, 48320])
productsSection = Card([productsHeading, productsTable], "sunk")
productsHeading = Heading("Best-selling products", "h3")
productsTable = Table([productCol, unitsCol])
productCol = Col("Product", ["Echo Headphones", "Pulse Smartwatch", "Shift Mechanical Keyboard"])
unitsCol = Col("Units sold", [1284, 967, 742])
exportSection = Card([exportHeading, exportText, exportButtons], "sunk")
exportHeading = Heading("Export the numbers", "h3")
exportText = TextContent("Download a CSV of this month's revenue, conversion rate, and product sales.")
exportButtons = Buttons([downloadBtn])
downloadBtn = Button("Download CSV", null, "secondary")