root = Card([header, monthNav, kpis, expenseSection, largeTxSection, downloadSection, followups])
header = CardHeader("Month-End Finance", "Startup cash position and spend overview")
monthNav = Tabs([monthJan, monthFeb, monthMar])
monthJan = TabItem("jan", "January", [janSummary])
monthFeb = TabItem("feb", "February", [febSummary])
monthMar = TabItem("mar", "March", [marSummary])
janSummary = TextContent("Showing **January** — cash position and expenses for the month.", "small")
febSummary = TextContent("Showing **February** — cash position and expenses for the month.", "small")
marSummary = TextContent("Showing **March** — cash position and expenses for the month.", "small")
kpis = Card([cashKpi, burnKpi, runwayKpi], "sunk", "row", "m")
cashKpi = Card([cashLabel, cashValue], "clear", "column", "xs")
cashLabel = TextContent("Cash on hand", "small-heavy")
cashValue = TextContent("$482,300", "large-heavy")
burnKpi = Card([burnLabel, burnValue], "clear", "column", "xs")
burnLabel = TextContent("Monthly burn", "small-heavy")
burnValue = TextContent("$86,400", "large-heavy")
runwayKpi = Card([runwayLabel, runwayValue], "clear", "column", "xs")
runwayLabel = TextContent("Months of runway", "small-heavy")
runwayValue = TextContent("5.6 months", "large-heavy")
expenseSection = Card([expenseHeading, expenseChart, expenseTable], "card", "column", "m")
expenseHeading = Heading("Expenses by category", "h3")
expenseChart = PieChart(["Salaries", "Infrastructure", "Marketing", "Office", "Legal"], [41200, 12800, 15600, 9800, 7000], "donut")
expenseTable = Table([expCat, expAmount, expPct])
expCat = Col("Category", ["Salaries", "Infrastructure", "Marketing", "Office", "Legal"])
expAmount = Col("Amount", ["$41,200", "$12,800", "$15,600", "$9,800", "$7,000"])
expPct = Col("% of burn", ["48%", "15%", "18%", "11%", "8%"])
largeTxSection = Card([largeTxHeading, largeTxTable], "card", "column", "m")
largeTxHeading = Heading("Transactions over $10,000", "h3")
largeTxTable = Table([txDate, txDesc, txAmount])
txDate = Col("Date", ["Mar 28", "Mar 22", "Mar 18", "Mar 12", "Mar 05"])
txDesc = Col("Description", ["AWS annual commitment", "Payroll — engineering", "Google Ads campaign", "Office lease renewal", "Legal retainer"])
txAmount = Col("Amount", ["$24,000", "$18,500", "$15,600", "$12,000", "$10,500"])
downloadSection = Card([downloadNote, downloadButtons], "sunk", "column", "m")
downloadNote = TextContent("Download the full month-end statement in your preferred format.", "small")
downloadButtons = Buttons([downloadCsv, downloadPdf])
downloadCsv = Button("Download CSV", null, "secondary")
downloadPdf = Button("Download PDF", null, "primary")
followups = FollowUpBlock([fu1, fu2, fu3])
fu1 = FollowUpItem("Show the last 6 months of runway")
fu2 = FollowUpItem("Explain the largest expense categories")
fu3 = FollowUpItem("Project cash position into next quarter")