{{ day.strftime('%a %d') if scope != 'daily' else day.strftime('%A') }}
{% for hour in range(24) %}
{% endfor %}
{% for block in blocks %}
{% if block.start.date() == day.date() %}
{% set start_hour = block.start.hour + block.start.minute / 60.0 %}
{% set duration_hours = block.duration / 3600.0 %}
{% set top_px = start_hour * 60 %}
{% set height_px = duration_hours * 60 %}
{% if height_px < 2 %}{% set height_px = 2 %}{% endif %}
{% set task_hash = block.task_path|hash if block.task_path else 0 %}
{% set base_color_hue = task_hash % 360 %}
{# Create gradient: active color on left (0% to active_ratio%), idle color on right #}
{% set active_pct = (block.active_ratio * 100)|int %}
{% set active_color = 'hsl(%d, 70%%, 50%%)'|format(base_color_hue) %}
{% set idle_color = 'hsl(%d, 30%%, 70%%)'|format(base_color_hue) %}