Ordinary shares (Details) ¥ in Thousands, $ in Thousands |
1 Months Ended | 12 Months Ended | |||||||
|---|---|---|---|---|---|---|---|---|---|
|
Aug. 31, 2023
USD ($)
|
Dec. 31, 2024
CNY (¥)
shares
|
Dec. 31, 2024
USD ($)
shares
|
Dec. 31, 2023
CNY (¥)
shares
|
Dec. 31, 2023
USD ($)
shares
|
Dec. 31, 2022
CNY (¥)
shares
|
||||
| Changes In Equity And Comprehensive Income [Line Items] | |||||||||
| Repurchase of shares | $ | $ 100,000 | ||||||||
| Repurchase period | 12 months | ||||||||
| Total aggregated consideration | ¥ | ¥ 206,345 | ||||||||
| Payment for repurchased shares | ¥ 247,890 | $ 33,961 | ¥ 202,422 | ¥ 0 | [1] | ||||
| Class A ordinary shares | |||||||||
| Changes In Equity And Comprehensive Income [Line Items] | |||||||||
| Stock issued during period shares stock options exercised with restricted stock award issuance | 2,043,276 | 2,043,276 | 2,454,365 | 2,454,365 | 1,717,720 | ||||
| Common shares, shares issued | 74,845,398 | 74,845,398 | 82,696,852 | 82,696,852 | 89,401,484 | ||||
| Common shares, shares outstanding | 74,845,398 | 74,845,398 | 82,696,852 | 82,696,852 | 89,401,484 | ||||
| Class B ordinary shares | |||||||||
| Changes In Equity And Comprehensive Income [Line Items] | |||||||||
| Number of shares conversion of during period | 0 | 0 | 0 | 0 | 690,000 | ||||
| Common shares, shares issued | 150,386,517 | 150,386,517 | 150,386,517 | 150,386,517 | 150,386,517 | ||||
| Common shares, shares outstanding | 150,386,517 | 150,386,517 | 150,386,517 | 150,386,517 | 150,386,517 | ||||
| American Depository Shares | |||||||||
| Changes In Equity And Comprehensive Income [Line Items] | |||||||||
| Number of shares repurchased | 9,894,730 | 9,894,730 | 9,158,997 | 9,158,997 | |||||
| Total aggregated consideration | ¥ 248,332 | $ 35,000 | ¥ 206,345 | $ 29,000 | |||||
| Amount paid for share repurchase program | ¥ | ¥ 247,890 | ¥ 202,422 | |||||||
| |||||||||