root = Card([header, kpiRow, trendSection, productsSection, conversionSection, downloadSection], "card", "column", "l")
header = CardHeader("Monthly Sales Check", "Founder dashboard — last updated today")
kpiRow = Card([revenueCard, conversionCard], "clear", "row", "l", "stretch", "between")
revenueCard = Card([revenueLabel, revenueValue], "sunk", "column", "m", "start")
revenueLabel = TextContent("Revenue this month", "small")
revenueValue = TextContent("$127,450", "large-heavy")
conversionCard = Card([conversionLabel, conversionValue], "sunk", "column", "m", "start")
conversionLabel = TextContent("Conversion rate", "small")
conversionValue = TextContent("3.8%", "large-heavy")
trendSection = Card([trendHeading, revenueTrend], "sunk", "column", "m")
trendHeading = Heading("Revenue trend (last 6 months)", "h3")
revenueTrend = LineChart(trendLabels, [revSeries], "natural", "Month", "USD")
trendLabels = ["Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
revSeries = Series("Revenue", [98200, 104500, 112300, 118900, 121600, 127450])
productsSection = Card([productsHeading, topProductsTable], "sunk", "column", "m")
productsHeading = Heading("Top 3 products by units sold", "h3")
topProductsTable = Table([productCol, unitsCol])
productCol = Col("Product", ["Pro Plan", "Team Plan", "Enterprise"])
unitsCol = Col("Units sold", [142, 87, 23])
conversionSection = Card([conversionDetail], "clear", "column", "m")
conversionDetail = TextContent("Conversion held steady at 3.8% this month. Funnel: 12,400 visitors → 471 signups → 18 paying customers. Month-over-month change: +0.2 pp.")
downloadSection = Card([downloadButtons], "clear", "row", "m", "center")
downloadButtons = Buttons([csvBtn, pdfBtn], "row")
csvBtn = Button("Download CSV", null, "primary")
pdfBtn = Button("Download PDF", null, "secondary")