root = Card([header, goalSection, caloriesSection, weekTrend, workoutLog], "card", "column", "l")
header = CardHeader("Daily Summary", "Tuesday, June 4")
goalSection = Card([goalTitle, goalProgress, goalText], "sunk", "column", "m")
goalTitle = Heading("Steps Today", "h3")
goalProgress = Progress(72, "8,640 / 12,000 steps")
goalText = TextContent("You're **72%** of the way to your daily goal. A short walk after lunch would close the gap.")
caloriesSection = Card([caloriesTitle, caloriesValue, caloriesNote], "sunk", "column", "m")
caloriesTitle = Heading("Calories Burned", "h3")
caloriesValue = TextContent("**486 kcal**", "large")
caloriesNote = TextContent("Active burn today, including your morning run and commute.")
weekTrend = Card([weekTitle, weekChart], "sunk", "column", "m")
weekTitle = Heading("Workouts This Week", "h3")
weekChart = BarChart(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], [workoutSeries], "grouped", "Day", "Minutes")
workoutSeries = Series("Duration (min)", [25, 42, 30, 0, 55, 60, 20])
workoutLog = Card([logTitle, logForm], "sunk", "column", "m")
logTitle = Heading("Log a Workout", "h3")
logForm = Form("log-workout", logButtons, [typeField, durationField, intensityField])
typeField = FormControl("Workout type", typeSelect)
typeSelect = Select("workout_type", [typeRun, typeCycle, typeStrength, typeYoga], "Choose a type")
typeRun = SelectItem("run", "Run")
typeCycle = SelectItem("cycle", "Cycle")
typeStrength = SelectItem("strength", "Strength training")
typeYoga = SelectItem("yoga", "Yoga")
durationField = FormControl("Duration (minutes)", durationInput)
durationInput = Input("duration", "e.g. 30", "number", ["min:1"])
intensityField = FormControl("Intensity", intensityRadio)
intensityRadio = RadioGroup("intensity", [intLow, intMod, intHigh], "moderate")
intLow = RadioItem("Low", "Easy effort", "low")
intMod = RadioItem("Moderate", "Steady effort", "moderate")
intHigh = RadioItem("High", "Max effort", "high")
logButtons = Buttons([saveBtn])
saveBtn = Button("Save Workout", null, "primary")