root = Card([header, kpiRow, trendSection, productsSection, conversionSection, downloadSection], "card", "column", "l")
header = CardHeader("Monthly Sales Check", "Founder's dashboard — last updated today")
kpiRow = Card([revenueCard, conversionCard], "clear", "row", "l", "stretch", "between")
revenueCard = Card([revenueLabel, revenueValue], "sunk", "column", "m")
revenueLabel = TextContent("Revenue this month", "small-heavy")
revenueValue = TextContent("$128,400", "large-heavy")
conversionCard = Card([conversionLabel, conversionProgress], "sunk", "column", "m")
conversionLabel = TextContent("Conversion rate", "small-heavy")
conversionProgress = Progress(32, "32% — up 4pp vs last month")
trendSection = Card([trendHeading, revenueChart], "sunk", "column", "m")
trendHeading = Heading("Revenue trend (last 6 months)", "h3")
revenueChart = LineChart(trendLabels, [revSeries], "natural", "Month", "USD")
trendLabels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
revSeries = Series("Revenue", [98200, 105600, 112300, 118900, 124100, 128400])
productsSection = Card([productsHeading, productsTable], "sunk", "column", "m")
productsHeading = Heading("Top 3 products by units sold", "h3")
productsTable = Table([prodNameCol, unitsCol])
prodNameCol = Col("Product", ["Growth Plan", "Pro Add-on", "Starter Kit"])
unitsCol = Col("Units sold", [1420, 980, 650])
conversionSection = Card([convDetailHeading, convBreakdown], "clear", "column", "m")
convDetailHeading = Heading("Conversion funnel snapshot", "h3")
convBreakdown = Card([funnelRow1, funnelRow2, funnelRow3], "sunk", "column", "s")
funnelRow1 = Card([funnelLabel1, funnelValue1], "clear", "row", "s", "center", "between")
funnelLabel1 = TextContent("Visitors → Trials", "default")
funnelValue1 = TextContent("18.2%", "default")
funnelRow2 = Card([funnelLabel2, funnelValue2], "clear", "row", "s", "center", "between")
funnelLabel2 = TextContent("Trials → Paid", "default")
funnelValue2 = TextContent("32.0%", "default")
funnelRow3 = Card([funnelLabel3, funnelValue3], "clear", "row", "s", "center", "between")
funnelLabel3 = TextContent("Overall", "small-heavy")
funnelValue3 = TextContent("5.8%", "large-heavy")
downloadSection = Buttons([downloadBtn], "row")
downloadBtn = Button("Download CSV", null, "primary")