| Summary of marketable securities |
Marketable securities at December 31, 2022 consisted of the following (in thousands): | | | | | | | | | | | | | | | | | | | | | | | | | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Fair Value | | Marketable securities, current: | | | | | | | | | Corporate debt securities | $ | 183,270 | | | $ | 2 | | | $ | (2,068) | | | $ | 181,204 | | | U.S. government debt securities | 40,986 | | | — | | | (1,184) | | | 39,802 | | | U.S. Treasury securities | 25,650 | | | — | | | (257) | | | 25,393 | | | Marketable securities, non-current | | | | | | | | | Corporate debt securities | 53,592 | | | 2 | | | (471) | | | 53,123 | | | U.S. government debt securities | 8,000 | | | — | | | (161) | | | 7,839 | | | | | | | | | | | Total marketable securities, current and non-current | $ | 311,498 | | | $ | 4 | | | $ | (4,141) | | | $ | 307,361 | |
Marketable securities at December 31, 2021 consisted of the following (in thousands): | | | | | | | | | | | | | | | | | | | | | | | | | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Fair Value | | Marketable securities, current: | | | | | | | | | Corporate debt securities | $ | 219,414 | | | $ | 1 | | | $ | (250) | | | $ | 219,165 | | | U.S. government debt securities | 8,987 | | | — | | | (3) | | | 8,984 | | | U.S. Treasury securities | 5,006 | | | — | | | — | | | 5,006 | | | Marketable securities, non-current | | | | | | | | | Corporate debt securities | 89,538 | | | — | | | (403) | | | 89,135 | | | U.S. government debt securities | 32,982 | | | — | | | (105) | | | 32,877 | | | U.S. Treasury securities | 20,203 | | | — | | | (15) | | | 20,188 | | | Total marketable securities, current and non-current | $ | 376,130 | | | $ | 1 | | | $ | (776) | | | $ | 375,355 | |
|
| Summary of marketable securities in unrealized loss position |
Marketable securities in unrealized loss positions as of December 31, 2022 consisted of the following (in thousands, except number of securities): | | | | | | | | | | | | | | | | | | | Number of Securities | | Fair Value | | Gross Unrealized Losses | | Marketable securities in continuous unrealized loss position for less than 12 months: | | | | | | | Corporate debt securities | 63 | | $ | 134,027 | | | $ | (1,262) | | | U.S. government debt securities | 6 | | 15,748 | | | (245) | | | U.S. Treasury securities | 4 | | 5,575 | | | (11) | | | Marketable securities in continuous unrealized loss position for greater than 12 months: | | | | | | | Corporate debt securities | 36 | | 82,375 | | | (1,277) | | | U.S. government debt securities | 7 | | 31,892 | | | (1,100) | | | U.S. Treasury securities | 4 | | 19,817 | | | (246) | | | Total marketable securities in unrealized loss position | 120 | | $ | 289,434 | | | $ | (4,141) | |
Marketable securities in unrealized loss positions as of December 31, 2021 consisted of the following (in thousands, except number of securities): | | | | | | | | | | | | | | | | | | | Number of Securities | | Fair Value | | Gross Unrealized Losses | | Marketable securities in continuous unrealized loss position for less than 12 months: | | | | | | | Corporate debt securities | 110 | | $ | 303,450 | | | $ | (653) | | | U.S. government debt securities | 8 | | 37,883 | | | (108) | | | U.S. Treasury securities | 5 | | 24,172 | | | (15) | | | Total marketable securities in unrealized loss position | 123 | | $ | 365,505 | | | $ | (776) | |
|