root = Card([header, revenueThisMonth, revenueTrend, topProducts, conversionSection, downloadSection], "card", "column", "l")
header = CardHeader("Monthly Sales Check", "Founder dashboard — live data")
revenueThisMonth = Card([revenueLabel, revenueValue], "sunk", "row", "m", "center", "between")
revenueLabel = TextContent("Revenue this month", "large-heavy")
revenueValue = TextContent("$128,400", "large-heavy")
revenueTrend = Card([trendHeader, revenueChart], "card", "column", "m")
trendHeader = Heading("Revenue trend (last 6 months)", "h3")
revenueChart = LineChart(months, [revSeries], "natural", "Month", "USD")
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
revSeries = Series("Revenue", [98200, 105600, 112300, 118900, 124100, 128400])
topProducts = Card([productsHeader, productsTable], "card", "column", "m")
productsHeader = Heading("Top 3 best-selling products", "h3")
productsTable = Table([productCol, unitsCol])
productCol = Col("Product", ["Pro Plan", "Team Plan", "Enterprise"])
unitsCol = Col("Units sold", [342, 187, 56])
conversionSection = Card([conversionHeader, conversionValue, conversionBar], "sunk", "column", "m")
conversionHeader = Heading("Conversion rate", "h3")
conversionValue = TextContent("3.8% of visitors converted this month", "default")
conversionBar = Progress(3.8, "3.8%")
downloadSection = Card([downloadLabel, downloadButtons], "clear", "column", "m")
downloadLabel = TextContent("Export data", "small-heavy")
downloadButtons = Buttons([csvBtn, pdfBtn], "row")
csvBtn = Button("Download CSV", null, "primary")
pdfBtn = Button("Download PDF", null, "secondary")