root = Card([header, kpiSection, stageSection, activitySection, contactsSection, followupsSection, noteSection, renewalSection, logCallSection])
header = CardHeader("Acme Corp Account", "Owner: Sarah Chen")
kpiSection = Card([kpiHeading, kpis], "sunk")
kpiHeading = Heading("Total Deal Value", "h3")
kpis = Table([kpiName, kpiValue])
kpiName = Col("Metric", ["Deal Value", "Stage", "Renewal"])
kpiValue = Col("Value", ["$245,000", "Negotiation", "2026-03-14"])
stageSection = Card([stageHeading, stageProgress], "sunk")
stageHeading = Heading("Current Deal Stage", "h3")
stageProgress = Progress(75, "Negotiation - 75% to close")
activitySection = Card([activityHeading, activities], "sunk")
activityHeading = Heading("Recent Activity", "h3")
activities = ListBlock([act1, act2, act3], "number")
act1 = ListItem("2026-02-10 - Demo completed", "Met with VP of Sales, discussed pricing tiers")
act2 = ListItem("2026-02-08 - Email sent", "Sent revised proposal with custom terms")
act3 = ListItem("2026-02-05 - Call logged", "30-min discovery call with procurement")
contactsSection = Card([contactsHeading, contactsTable], "sunk")
contactsHeading = Heading("Contacts", "h3")
contactsTable = Table([contactName, contactRole])
contactName = Col("Name", ["Jane Doe", "John Smith", "Emily Brown"])
contactRole = Col("Role", ["VP Sales", "Procurement Lead", "IT Director"])
followupsSection = Card([followupsHeading, followupList], "sunk")
followupsHeading = Heading("Open Follow-ups", "h3")
followupList = ListBlock([fu1, fu2])
fu1 = ListItem("Send final quote", "Due 2026-02-15")
fu2 = ListItem("Schedule legal review", "Due 2026-02-20")
noteSection = Card([noteHeading, noteForm], "sunk")
noteHeading = Heading("Jot a Note", "h3")
noteForm = Form("note-form", noteButtons, [noteField])
noteField = FormControl("Note", noteInput)
noteInput = TextArea("note", "Type your note here...", 3)
noteButtons = Buttons([saveNoteBtn])
saveNoteBtn = Button("Save Note", null, "primary")
renewalSection = Card([renewalHeading, renewalCallout], "sunk")
renewalHeading = Heading("Renewal", "h3")
renewalCallout = Callout("warning", "Renewal approaching", "Contract renews on 2026-03-14 - only 32 days away. Prepare renewal discussion.")
logCallSection = Card([logCallHeading, logCallForm], "sunk")
logCallHeading = Heading("Log a Call", "h3")
logCallForm = Form("call-form", callButtons, [callDateField, callNotesField])
callDateField = FormControl("Call date", callDateInput)
callDateInput = DatePicker("call_date", "single")
callNotesField = FormControl("Call notes", callNotesInput)
callNotesInput = TextArea("call_notes", "Summary of the call...", 4)
callButtons = Buttons([logCallBtn])
logCallBtn = Button("Log Call", null, "primary")