Stock-based Compensation (Tables)
   | 
6 Months Ended | 
12 Months Ended | 
Jun. 30, 2021  | 
Dec. 31, 2020  | 
| Summary of assumptions in the Black-Scholes option-pricing models used to determine the fair value of stock options | 
 
 | 
The assumptions in the Black-Scholes option-pricing models used to determine the fair value of stock options granted during the years ended December 31, 2020 and 2019 were as follows:    
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 |   
|   | 
   | 
 | 
  |   
|   | 
   | 
 | 
  | 
   | 
 | 
  |   
|    | 
   | 
  | 
49.9% - 73.5%  | 
  | 
   | 
  | 
44.9% - 52.0%  | 
  |   
|    | 
   | 
  | 
0% | 
  | 
   | 
  | 
0% | 
  |   
|    | 
   | 
  | 
5.0 - 6.6 | 
  | 
   | 
  | 
5.1 - 6.6 | 
  |   
|    | 
   | 
  | 
1.3% - 1.4%  | 
  | 
   | 
  | 
1.6% - 2.7%  | 
  |      
 | 
| Summary of stock-based compensation expense | 
The following sets forth the total stock-based compensation expense for the Company’s stock options included in the Company’s condensed consolidated statements of operations (in thousands):    
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 |   
|   | 
   | 
Six months ended  June 30,  | 
  |   
|   | 
   | 
 | 
  | 
   | 
 | 
  |   
 Research and development expenses    | 
   | 
$ | 
7,939 | 
  | 
   | 
$ | 
2,350 | 
  |   
 Selling, general and administrative expenses    | 
   | 
  | 
3,861 | 
  | 
   | 
  | 
315 | 
  |   
|   | 
   | 
   | 
   | 
  | 
   | 
   | 
   | 
  |   
 Total stock-based compensation expense    | 
   | 
$ | 
11,800 | 
  | 
   | 
$ | 
2,665 | 
  |   
|   | 
   | 
   | 
   | 
  | 
   | 
   | 
   | 
  |      
 | 
The following sets forth the total stock-based compensation expense for the Company’s stock options included in the Company’s consolidated statements of operations (in thousands):    
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 |   
|   | 
   | 
 | 
  |   
|   | 
   | 
 | 
  | 
   | 
 | 
  |   
 Research and development expenses    | 
   | 
$ | 
6,130 | 
  | 
   | 
$ | 
3,301 | 
  |   
 Selling, general and administrative expenses    | 
   | 
  | 
1,055 | 
  | 
   | 
  | 
605 | 
  |   
|   | 
   | 
   | 
   | 
  | 
   | 
   | 
   | 
  |   
 Total stock-based compensation expense    | 
   | 
$ | 
7,185 | 
  | 
   | 
$ | 
3,906 | 
  |   
|   | 
   | 
   | 
   | 
  | 
   | 
   | 
   | 
  |      
 | 
| 2016 Stock Option and Grant Plan | 
 
 | 
 
 | 
| Schedule of Stock Option Activity | 
 
 | 
Stock option activity under the Plan is as follows, net of  re-issuance  activity noted above:    
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 |   
|   | 
   | 
 | 
  |   
|    | 
   | 
Options  Available for  Grant  | 
  | 
  | 
 | 
  | 
  | 
Weighted-  Average  Exercise  Price Per  Share  | 
  | 
   | 
Weighted-  Average  Remaining  Contractual  Term (in  years)  | 
  | 
   | 
Aggregate  Intrinsic  Value (in  thousands)  | 
  |   
|    | 
   | 
  | 
3,498,354 | 
  | 
  | 
  | 
1,786,829 | 
  | 
  | 
$ | 
0.66 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Additional shares authorized    | 
   | 
  | 
1,400,000 | 
  | 
  | 
  | 
—   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Options canceled and forfeited    | 
   | 
  | 
545,289 | 
  | 
  | 
  | 
(545,289 | 
)  | 
  | 
$ | 
0.69 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|    | 
   | 
  | 
161,307 | 
  | 
  | 
  | 
—   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|    | 
   | 
  | 
(4,798,400 | 
)  | 
  | 
  | 
4,798,400 | 
  | 
  | 
$ | 
0.69 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|    | 
   | 
  | 
—   | 
  | 
  | 
  | 
(2,092,409 | 
)  | 
  | 
$ | 
0.66 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|    | 
   | 
  | 
9,766 | 
  | 
  | 
  | 
(9,766 | 
)  | 
  | 
$ | 
0.70 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|   | 
   | 
   | 
   | 
  | 
  | 
   | 
   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Balances—December 31, 2019    | 
   | 
  | 
816,316 | 
  | 
  | 
  | 
3,937,765 | 
  | 
  | 
$ | 
0.70 | 
  | 
   | 
  | 
9.37 | 
  | 
   | 
$ | 
28,762 | 
  |   
 Additional shares authorized    | 
   | 
  | 
2,682,255 | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Options canceled and forfeited    | 
   | 
  | 
761,430 | 
  | 
  | 
  | 
(761,430 | 
)  | 
  | 
$ | 
0.91 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|    | 
   | 
  | 
21,877 | 
  | 
  | 
  | 
—   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|    | 
   | 
  | 
(4,137,503 | 
)  | 
  | 
  | 
4,137,503 | 
  | 
  | 
$ | 
3.53 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|    | 
   | 
  | 
—   | 
  | 
  | 
  | 
(204,939 | 
)  | 
  | 
$ | 
1.87 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|   | 
   | 
   | 
   | 
  | 
  | 
   | 
   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Balances—December 31, 2020    | 
   | 
  | 
144,375 | 
  | 
  | 
  | 
7,108,899 | 
  | 
  | 
$ | 
2.29 | 
  | 
   | 
  | 
9.06 | 
  | 
   | 
$ | 
187,460 | 
  |   
|   | 
   | 
   | 
   | 
  | 
  | 
   | 
   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Vested and expected to vest    | 
   | 
  | 
  | 
  | 
  | 
  | 
7,108,899 | 
  | 
  | 
$ | 
2.29 | 
  | 
   | 
  | 
9.06 | 
  | 
   | 
$ | 
187,460 | 
  |   
 Shares exercisable (vested and unvested)    | 
   | 
  | 
  | 
  | 
  | 
  | 
1,513,553 | 
  | 
  | 
$ | 
1.96 | 
  | 
   | 
  | 
8.75 | 
  | 
   | 
$ | 
40,418 | 
  |      
 | 
| Former Parent Plan [Member] | 
 
 | 
 
 | 
| Schedule of Stock Option Activity | 
 
 | 
Stock option activity under the Former Parent Plan is as follows:    
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 |   
|   | 
   | 
 | 
  |   
|    | 
   | 
Options  Available  for Grant  | 
  | 
   | 
 | 
  | 
  | 
Weighted-  Average  Exercise  Price Per  Share  | 
  | 
   | 
Weighted-  Average  Remaining  Contractual  Term (in  years)  | 
  | 
   | 
Aggregate  Intrinsic  Value (in  thousands)  | 
  |   
|    | 
   | 
  | 
—   | 
  | 
   | 
  | 
1,021,250 | 
  | 
  | 
$ | 
0.02 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|   | 
   | 
   | 
   | 
  | 
   | 
   | 
   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Balances—December 31, 2019    | 
   | 
  | 
—   | 
  | 
   | 
  | 
1,021,250 | 
  | 
  | 
$ | 
0.02 | 
  | 
   | 
  | 
5.37 | 
  | 
   | 
$ | 
8,150 | 
  |   
|    | 
   | 
  | 
—   | 
  | 
   | 
  | 
(16,703 | 
)  | 
  | 
$ | 
0.02 | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
|   | 
   | 
   | 
   | 
  | 
   | 
   | 
   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Balances—December 31, 2020    | 
   | 
  | 
—   | 
  | 
   | 
  | 
1,004,547 | 
  | 
  | 
$ | 
0.02 | 
  | 
   | 
  | 
4.37 | 
  | 
   | 
$ | 
28,770 | 
  |   
|   | 
   | 
   | 
   | 
  | 
   | 
   | 
   | 
  | 
  | 
  | 
  | 
  | 
   | 
  | 
  | 
  | 
   | 
  | 
  | 
  |   
 Vested and expected to vest    | 
   | 
  | 
  | 
  | 
   | 
  | 
1,004,547 | 
  | 
  | 
$ | 
0.02 | 
  | 
   | 
  | 
4.37 | 
  | 
   | 
$ | 
28,770 | 
  |   
|    | 
   | 
  | 
  | 
  | 
   | 
  | 
1,004,547 | 
  | 
  | 
$ | 
0.02 | 
  | 
   | 
  | 
4.37 | 
  | 
   | 
$ | 
28,770 | 
  |      
 |