root = Card([header, kpiBlock, weeklyHeader, weeklyChart, logHeader, logForm, followUps])
header = CardHeader("Daily Summary", "Monday, January 20, 2026 · Fitness Tracker")
kpiBlock = SnippetCardBlock([stepsCard, caloriesCard, activeMinCard], "grid", true)
stepsCard = SnippetCardItem("steps", stepsLhs, stepsRhs)
stepsLhs = IconText(stepsIcon, "info", "m", "Steps Today", "Goal: 10,000", false, "vertical")
stepsIcon = Icon("footprints", "activity")
stepsRhs = BoldText("number", "7,842", "+1,200 vs yesterday", "metric")
caloriesCard = SnippetCardItem("calories", caloriesLhs, caloriesRhs)
caloriesLhs = IconText(caloriesIcon, "success", "m", "Calories Burned", "Active + Resting", false, "vertical")
caloriesIcon = Icon("flame", "activity")
caloriesRhs = BoldText("number", "2,480 kcal", "Target: 2,600", "metric")
activeMinCard = SnippetCardItem("active-min", activeMinLhs, activeMinRhs)
activeMinLhs = IconText(activeMinIcon, "warning", "m", "Active Minutes", "Weekly goal: 150 min", false, "vertical")
activeMinIcon = Icon("timer", "time")
activeMinRhs = BoldText("number", "38 min", "22 min this week", "metric")
weeklyHeader = InlineHeader("Workouts This Week", "7-day activity overview")
weeklyChart = BarChart(weekDays, [workoutSeries, targetSeries], "grouped", "Day", "Minutes")
weekDays = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
workoutSeries = Series("Workout Minutes", [45, 0, 60, 30, 50, 0, 40])
targetSeries = Series("Daily Target (30 min)", [30, 30, 30, 30, 30, 30, 30])
logHeader = InlineHeader("Log a New Workout", "Record your activity to keep your streak alive")
logForm = Form("log-workout", formButtons, [fcType, fcDuration, fcIntensity, fcNotes])
formButtons = Buttons([btnSave, btnCancel], "row")
btnSave = Button("Save Workout", { type: "continue_conversation", context: "Save this workout to my fitness log" }, "primary")
btnCancel = Button("Cancel", { type: "continue_conversation", context: "Cancel workout logging" }, "secondary")
fcType = FormControl("Workout Type", typeSelect, "Choose the type of activity")
typeSelect = Select("workout-type", [optRun, optWalk, optCycle, optSwim, optStrength, optYoga, optOther], "Select workout type", { required: true })
optRun = SelectItem("run", "Running")
optWalk = SelectItem("walk", "Walking")
optCycle = SelectItem("cycle", "Cycling")
optSwim = SelectItem("swim", "Swimming")
optStrength = SelectItem("strength", "Strength Training")
optYoga = SelectItem("yoga", "Yoga / Stretching")
optOther = SelectItem("other", "Other")
fcDuration = FormControl("Duration (minutes)", durationInput, "How long did you exercise?")
durationInput = Input("duration", "e.g. 45", "number", { required: true, min: 1, max: 480 })
fcIntensity = FormControl("Intensity", intensityChips, "How hard did you push?")
intensityChips = Chips("intensity", "single", [chipLow, chipMod, chipHigh], { required: true }, "moderate")
chipLow = ChipItem("low", "Low", chipLowIcon)
chipLowIcon = Icon("heart", "medical")
chipMod = ChipItem("moderate", "Moderate", chipModIcon)
chipModIcon = Icon("heart-pulse", "medical")
chipHigh = ChipItem("high", "High", chipHighIcon)
chipHighIcon = Icon("zap", "weather")
fcNotes = FormControl("Notes (optional)", notesArea, "How did it feel? Any details to remember?")
notesArea = TextArea("notes", "Felt strong on the hills...", 3)
followUps = FollowUpBlock([fu1, fu2, fu3])
fu1 = FollowUpItem("Show me my monthly progress report")
fu2 = FollowUpItem("Set a new step goal for this week")
fu3 = FollowUpItem("Suggest a workout plan for my goals")