function main() {
  const thresholdMPS=80/3.6;
  const r=$data.current;
  const available=r.speedMPS!==null;
  const over=available&&r.speedMPS>thresholdMPS;
  const threshold=thresholdMPS*(r.speedUnit==='mph'?2.2369362921:3.6);
  return <CardContent title="自定速度阈值" trailing={Math.round(threshold)+' '+r.speedUnit}>
    <VStack spacing={10}>
      <Text fontSize={56} color={over?'#D94C36':$env.foreground}
        animations={[{property:'color',duration:0.2}]}>
        {r.speed===null?'—':Math.round(r.speed)}
      </Text>
      <Text fontSize={12} color={over?'#D94C36':$env.accent}>
        {!available?'暂无速度':over?'高于自定阈值':'低于或等于自定阈值'}
      </Text>
    </VStack>
  </CardContent>;
}
