root = Card([header, statsSection, categoryFilter, chartSection, topArticleSection, scheduleSection, commentsSection, newDraftSection])
header = CardHeader("Content Studio", "Manage drafts, publishing, and readership")
statsSection = Card([statsHeading, publishedChart], "sunk")
statsHeading = Heading("Published this week", "h3")
publishedChart = BarChart(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], [publishedSeries], "grouped", "Day", "Pieces")
publishedSeries = Series("Published", [3, 5, 2, 4, 6, 1, 2])
categoryFilter = Card([filterHeading, filterTags], "clear")
filterHeading = Heading("Narrow by category", "h4")
filterTags = TagBlock(["News", "Opinion", "Tech", "Culture", "Sports", "Politics"])
chartSection = Card([chartHeading, readershipChart], "sunk")
chartHeading = Heading("Readership over the past 30 days", "h3")
readershipChart = AreaChart(["Day 1", "Day 5", "Day 10", "Day 15", "Day 20", "Day 25", "Day 30"], [readershipSeries], "natural", "Day", "Readers")
readershipSeries = Series("Readers", [1200, 1450, 1380, 1620, 1890, 2100, 2340])
topArticleSection = Card([topArticleHeading, topArticleList])
topArticleHeading = Heading("Most-read article this month", "h3")
topArticleList = ListBlock([topArticleItem], "number")
topArticleItem = ListItem("How AI is reshaping local newsrooms", "42,300 reads · Tech · 2 days ago")
scheduleSection = Card([scheduleHeading, scheduleForm])
scheduleHeading = Heading("Schedule a piece", "h3")
scheduleForm = Form("schedule-form", scheduleButtons, [scheduleTitleField, scheduleDateField])
scheduleTitleField = FormControl("Title", scheduleTitleInput)
scheduleTitleInput = Input("title", "Enter article title")
scheduleDateField = FormControl("Publish date", scheduleDatePicker)
scheduleDatePicker = DatePicker("publish_date", "single")
scheduleButtons = Buttons([scheduleSubmit])
scheduleSubmit = Button("Schedule piece", null, "primary")
commentsSection = Card([commentsHeading, commentsList])
commentsHeading = Heading("Comments awaiting reply", "h3")
commentsList = ListBlock([comment1, comment2, comment3], "number")
comment1 = ListItem("Sarah M.", "\"Great piece — but what about the data privacy angle?\"")
comment2 = ListItem("James T.", "\"Would love a follow-up on the economic impact.\"")
comment3 = ListItem("Priya K.", "\"Interesting take. Disagree on one point though...\"")
newDraftSection = Card([newDraftHeading, newDraftButtons], "clear")
newDraftHeading = Heading("Start a new draft", "h4")
newDraftButtons = Buttons([newDraftBtn])
newDraftBtn = Button("New draft", null, "primary")