There isn’t a clear line, that’s what makes it tricky. Think of it like troubleshooting a very advanced robot that’s misbehaving or underperforming. The first question that gets asked is “hardware problem, software problem…?” And the answer is ‘neither, and both, it’s complicated’. Usually the problem is a feedback loop between mechanical, hydraulic, electrical, software, environment… If your robot is overheating, is it design (undersized radiator), mechanical (insufficient coolant flow/airflow), software (wrong current limits, temperature setpoints, no thermal throttling), configuration (inefficient design of routines), usage (duty cycle too high), or environment (too hot)?