root = Card([header, runwaySection, expenseSection, txSection, monthNav, actions])
header = CardHeader("Month-End Finance", "Startup cash and runway summary")
runwaySection = Card([runwayHeading, runwayKpis, runwayChart], "sunk")
runwayHeading = Heading("Cash & Runway", "h3")
runwayKpis = Table([kpiName, kpiValue])
kpiName = Col("Metric", ["Cash on hand", "Monthly burn", "Months of runway"])
kpiValue = Col("Value", ["$412,600", "$68,400", "6.0"])
runwayChart = AreaChart(["Nov", "Dec", "Jan", "Feb", "Mar", "Apr"], [cashSeries], "natural", "Month", "USD")
cashSeries = Series("Cash on hand", [712000, 644000, 576000, 508000, 440000, 412600])
expenseSection = Card([expenseHeading, expensePie], "sunk")
expenseHeading = Heading("Expenses by Category", "h3")
expensePie = PieChart(["Engineering", "Sales & Marketing", "G&A", "Infrastructure", "Other"], [28400, 16200, 9800, 8200, 5800], "donut")
txSection = Card([txHeading, txTable], "sunk")
txHeading = Heading("Transactions over $10,000", "h3")
txTable = Table([txDate, txVendor, txAmount])
txDate = Col("Date", ["Apr 28", "Apr 24", "Apr 18", "Apr 11", "Apr 05"])
txVendor = Col("Vendor", ["CloudHost Inc.", "Legal Counsel LLP", "Recruiting Agency", "Office Lease Co.", "Hardware Supply"])
txAmount = Col("Amount", ["$12,400", "$14,800", "$11,200", "$22,000", "$10,800"])
monthNav = Card([monthLabel, monthSelect], "clear", "row", "m", "end")
monthLabel = Label("View month")
monthSelect = Select("report_month", [monthApr, monthMar, monthFeb], "April 2025", null, "April 2025")
monthApr = SelectItem("2025-04", "April 2025")
monthMar = SelectItem("2025-03", "March 2025")
monthFeb = SelectItem("2025-02", "February 2025")
actions = Buttons([downloadBtn])
downloadBtn = Button("Download statement")