"use client"; import { cn } from "@/lib/utils"; type TimelineRailProps = { /** Distance from track top to rail start */ offsetTop: number; /** Rail length (desktop: first→last node; stacked: first card top→last card bottom) */ trackHeight: number; /** Progress fill within the rail (0 → trackHeight) */ progressHeight: number; className?: string; }; export function TimelineRail({ offsetTop, trackHeight, progressHeight, className, }: TimelineRailProps) { const clampedTrack = Math.max(0, trackHeight); const clampedProgress = Math.min(Math.max(0, progressHeight), clampedTrack); return (
{/* Dim track — ends at the last node, not past the final card */}
{/* Soft progress accent */}
0 ? "0 0 10px color-mix(in srgb, var(--brand-primary) 40%, transparent), 0 0 22px color-mix(in srgb, var(--brand-highlight) 18%, transparent)" : "none", }} />
); }