Summary of Significant Accounting Policies | 2. Summary of Significant Accounting Policies Financial Statement Estimates — The preparation of financial statements in conformity with accounting principles generally accepted in the United States of America (GAAP) requires management to make estimates and assumptions that affect the amounts reported in the financial statements and accompanying notes. Actual results could differ from those estimates. Management considers many factors in selecting appropriate financial accounting policies, and in developing the estimates and assumptions that are used in the preparation of the financial statements. Management must apply significant judgment in this process. The more significant estimates reflected in these accompanying consolidated financial statements include revenue recognition and gross-to-net adjustments, assessing long-lived assets for impairment, clinical trial expenses, inventory costing and recoverability, recognized loss on purchase commitment, milestone rights liability, stock-based compensation and the determination of the provision for income taxes and corresponding deferred tax assets and liabilities and the valuation allowance recorded against net deferred tax assets. Revenue Recognition — The Company adopted Accounting Standards Codification (“ASC”) Topic 606 - Revenue from Contracts with Customers (“the new revenue guidance”), on January 1, 2018. Under Topic 606, the Company recognizes revenue when its customers obtain control of promised goods or services, in an amount that reflects the consideration which the Company expects to be entitled in exchange for those goods or services. To determine revenue recognition for arrangements that are within the scope of Topic 606, the Company performs the following five steps: (i) identify the contract(s) with a customer, (ii) identify the performance obligations in the contract, (iii) determine the transaction price, (iv) allocate the transaction price to the performance obligations in the contract, and (v) recognize revenue when (or as) the entity satisfies a performance obligation. The Company only applies the five-step model to arrangements that meet the definition of a contract under Topic 606, including when it is probable that the entity will collect the consideration it is entitled to in exchange for the goods or services it transfers to the customer. At contract inception, once the contract is determined to be within the scope of Topic 606, the Company assesses the goods or services promised within each contract, determines those that are performance obligations, and assesses whether each promised good or service is distinct. The Company has two types of contracts with customers: (i) contracts for commercial product sales with wholesale distributors and specialty pharmacies and (ii) collaboration arrangements. Revenue Recognition – Net Revenue – Commercial Product Sales – The Company sells Afrezza to a limited number of wholesale distributors and specialty pharmacies in the U.S. (collectively, its “Customers”). Wholesale distributors subsequently resell the Company’s products to retail pharmacies and certain medical centers or hospitals. Specialty pharmacies sell directly to patients. In addition to distribution agreements with Customers, the Company enters into arrangements with payors that provide for government mandated and/or privately negotiated rebates, chargebacks, and discounts with respect to the purchase of the Company’s products. The Company recognizes revenue on product sales when the Customer obtains control of the Company's product, which occurs at delivery for wholesale distributors and at shipment for specialty pharmacies. Product revenues are recorded net of applicable reserves for variable consideration, including discounts and allowances. Free Goods Program – From time to time, the Company offers programs to potential new patients that allow them to obtain free goods (prescription fills) from a pharmacy. On a net basis, it is not probable that the Company will receive the consideration from these products. Therefore, the Company excludes such amounts from both gross and net revenue. The cost of product associated with the free goods program is included in cost of goods sold. Reserves for Variable Consideration — Revenues from product sales are recorded at the net sales price (transaction price), which includes estimates of variable consideration for which reserves are established. Components of variable consideration include trade discounts and allowances, product returns, provider chargebacks and discounts, government rebates, payor rebates, and other incentives, such as voluntary patient assistance, and other allowances that are offered within contracts between the Company and its Customers, payors, and other indirect customers relating to the Company’s sale of its products. These reserves, as detailed below, are based on the amounts earned, or to be claimed on the related sales, and result in a reduction of accounts receivable or establishment of a current liability. Where appropriate, these estimates take into consideration a range of possible outcomes which are probability-weighted in accordance with the expected value method in Topic 606 for relevant factors such as current contractual and statutory requirements, specific known market events and trends, industry data, and forecasted customer buying and payment patterns. Overall, these reserves reduce recognized revenue to the Company’s best estimates of the amount of consideration to which it is entitled based on the terms of the respective underlying contracts. The amount of variable consideration which is included in the transaction price may be constrained, and is included in the net sales price only to the extent that it is probable that a significant reversal in the amount of the cumulative revenue recognized under the contract will not occur in a future period. The Company’s analysis also contemplates application of the constraint in accordance with the guidance, under which it determined a material reversal of revenue would not occur in a future period for the estimates detailed below as of December 31, 2019 and, therefore, the transaction price was not reduced further during the year ended December 31, 2019. Actual amounts of consideration ultimately received may differ from the Company’s estimates. If actual results in the future vary from the Company’s estimates, the Company will adjust these estimates, which would affect net revenue – commercial product sales and earnings in the period such variances become known. Trade Discounts and Allowances — The Company generally provides Customers with discounts which include incentives, such as prompt pay discounts, that are explicitly stated in the Company’s contracts and are recorded as a reduction of revenue in the period the related product revenue is recognized. In addition, the Company compensates (through trade discounts and allowances) its Customers for sales order management, data, and distribution services. However, the Company has determined such services received to date are not distinct from the Company’s sale of products to the Customer and, therefore, these payments have been recorded as a reduction of revenue and as a reduction to accounts receivable, net. Product Returns —Consistent with industry practice, the Company generally offers Customers a right of return for unopened product that has been purchased from the Company for a period beginning six months prior to and ending 12 months after its expiration date, which lapses upon shipment to a patient. The Company estimates the amount of its product sales that may be returned by its Customers and records this estimate as a reduction of revenue in the period the related product revenue is recognized, as well as reductions to accounts receivable, net. The Company currently estimates product returns using available industry data and its own sales information, including its visibility into the inventory remaining in the distribution channel. The Company’s current return reserve percentage is estimated to be in the single digits. Provider Chargebacks and Discounts — Chargebacks for fees and discounts to providers represent the estimated obligations resulting from contractual commitments to sell products to qualified healthcare providers at prices lower than the list prices charged to Customers who directly purchase the product from the Company. Customers charge the Company for the difference between what they pay for the product and the ultimate selling price to the qualified healthcare providers. These reserves are established in the same period that the related revenue is recognized, resulting in a reduction of product revenue and the establishment of a current liability which is recorded in accrued expenses and other current liabilities. Chargeback amounts are generally determined at the time of resale to the qualified healthcare provider by Customers, and the Company generally issues credits for such amounts within a few weeks of the Customer’s notification to the Company of the resale. Reserves for chargebacks consist of credits that the Company expects to issue for units that remain in the distribution channel inventories at each reporting period-end that the Company expects will be sold to qualified healthcare providers, and chargebacks that Customers have claimed, but for which the Company has not yet issued a credit. Government Rebates — The Company is subject to discount obligations under Medicare and state Medicaid programs. These reserves are recorded in the same period the related revenue is recognized, resulting in a reduction of product revenue and the establishment of a current liability which is included in accrued expenses and other current liabilities. For Medicare, the Company also estimates the number of patients in the prescription drug coverage gap for whom the Company will owe an additional liability under the Medicare Part D program. The Company’s liability for these rebates consists of invoices received for claims from prior quarters that have not been paid or for which an invoice has not yet been received, estimates of claims for the current quarter, and estimated future claims that will be made for product that has been recognized as revenue, but which remains in the distribution channel inventories at the end of each reporting period. Payor Rebates — The Company contracts with certain private payor organizations, primarily insurance companies and pharmacy benefit managers, for the payment of rebates with respect to utilization of its products. The Company estimates these rebates and records such estimates in the same period the related revenue is recognized, resulting in a reduction of product revenue and the establishment of a current liability which is included in accrued expenses and other current liabilities. Other Incentives — Other incentives which the Company offers include voluntary patient support programs, such as the Company's co-pay assistance program, which are intended to provide financial assistance to qualified commercially-insured patients with prescription drug co-payments required by payors. The calculation of the accrual for co-pay assistance is based on an estimate of claims and the cost per claim that the Company expects to receive associated with the product that has been recognized as revenue, but remains in the distribution channel inventories at the end of each reporting period. The adjustments are recorded in the same period the related revenue is recognized, resulting in a reduction of product revenue and the establishment of a current liability which is included in accrued expenses and other current liabilities. Revenue Recognition — Revenue — Collaborations and Services — The Company enters into licensing or research agreements under which the Company licenses certain rights to its product candidates to third parties or conducting research services to third parties. The terms of these arrangements may include, but are not limited to payment to the Company of one or more of the following: up-front license fees; development, regulatory, and commercial milestone payments; payments for manufacturing commercial and clinical supply services the Company provides; and royalties on net sales of licensed products and sublicenses of the rights. As part of the accounting for these arrangements, the Company must develop assumptions that require judgment such as determining the performance obligation in the contract and determining the stand-alone selling price for each performance obligation identified in the contract. If an arrangement has multiple performance obligations, the allocation of the transaction price is determined from observable market inputs, and the Company uses key assumptions to determine the stand-alone selling price, which may include development timelines, reimbursement rates for personnel costs, discount rates, and probabilities of technical and regulatory success. Revenue is recognized based on the measurement of progress as the performance obligation is satisfied and consideration received that does not meet the requirements to satisfy the revenue recognition criteria is recorded as deferred revenue. Current deferred revenue consists of amounts that are expected to be recognized as revenue in the next 12 months. For further information see Note 8 Collaboration and Licensing Agreements. The Company recognizes upfront license payments as revenue upon delivery of the license only if the license is determined to be a separate unit of accounting from the other undelivered performance obligations. The undelivered performance obligations typically include manufacturing or development services or research and/or steering committee services. If the license is not considered as a distinct performance obligation, then the license and other undelivered performance obligations would be evaluated to determine if such should be accounted for as a single unit of accounting. If concluded to be a single performance obligation, the transaction price for the single performance obligation is recognized as revenue over the estimated period of when the performance obligation is satisfied. Whenever the Company determines that an arrangement should be accounted for over time, the Company determines the period over which the performance obligations will be performed, and revenue will be recognized over the period the Company is expected to complete its performance obligations. Significant management judgment is required in determining the level of effort required under an arrangement and the period over which the Company is expected to complete its performance obligations under an arrangement. The Company’s collaboration agreements typically entitle the Company to additional payments upon the achievement of development, regulatory and sales milestones. If the achievement of a milestone is considered probable at the inception of the collaboration, the related milestone payment is included with other collaboration consideration, such as upfront fees and research funding, in the Company’s revenue calculation. If these milestones are not considered probable at the inception of the collaboration, the milestones will typically be recognized in one of two ways depending on the timing of when the milestone is achieved. If the milestone is improbable at inception and subsequently deemed probable of achievement, such will be added to the transaction price, resulting in a cumulative adjustment to revenue. If the milestone is achieved after the performance period has completed and all performance obligations have been delivered, the Company will recognize the milestone payment as revenue in its entirety in the period the milestone was achieved. The Company’s collaborative agreements, for accounting purposes, represent contracts with customers and therefore are not subject to accounting literature on collaborative agreements. The Company grants licenses to its intellectual property, supplies raw materials or finished goods and provides research and development services, all of which are outputs of the Company’s ongoing activities, in exchange for consideration. The Company does not develop assets jointly with collaboration partners, and does not share in significant risks of their development or commercialization activities. Accordingly, the Company concluded that its collaborative agreements must be accounted for pursuant to Topic 606, Revenue from Contracts with Customers. For collaboration agreements that allow collaboration partners to select additional optioned products or services, the Company evaluates whether such options contain material rights (i.e., have exercise prices that are discounted compared to what the Company would charge for a similar product or service to a new collaboration partner). The exercise price of these options includes a combination of licensing fees, event-based milestone payments and royalties. When these amounts in aggregate are not offered at a discount that exceeds discounts available to other customers, the Company concludes the option does not contain a material right, and therefore is not included in the transaction price at contract inception. Rather, the Company evaluates grants of additional licensing rights upon option exercises to determine whether such should be accounted for as separate contracts. The Company concluded there is no material right in these options. The Company follows detailed accounting guidance in measuring revenue and certain judgments affect the application of its revenue policy. For example, in connection with its existing collaboration agreements, the Company has recorded on its consolidated balance sheets short-term and long-term deferred revenue based on its best estimate of when such revenue will be recognized. Short-term deferred revenue consists of amounts that are expected to be recognized as revenue in the next 12 months. Amounts that the Company expects will not be recognized within the next 12 months are classified as long-term deferred revenue. However, this estimate is based on the Company’s current project development plan and, if the development plan should change in the future, the Company may recognize a different amount of deferred revenue over the next 12-month period. The activity related to deferred revenue and the related revenue recognized for collaborations and services is as follows (in thousands): December 31, 2019 2018 Deferred revenue: Beginning balance $ 47,565 $ 750 Upfront and milestone payments 25,000 55,000 Pass through payments 6,016 2,398 Revenue — collaborations and services (37,734 ) (10,583 ) Ending balance $ 40,847 $ 47,565 Milestone Payments — At the inception of each arrangement that includes development milestone payments, the Company evaluates whether the milestones are considered probable of being reached and estimates the amount to be included in the transaction price using the most likely amount method. If it is probable that a significant revenue reversal would not occur, the associated milestone value is included in the transaction price. Milestone payments that are not within the control of the Company or the customer, such as regulatory approvals, are not considered probable of being achieved until those approvals are received. The transaction price is then allocated to each performance obligation on a relative stand-alone selling price basis, for which the Company recognizes revenue as, or when, the performance obligations under the contract are satisfied. At the end of each subsequent reporting period, the Company will re-evaluate the probability of achievement of such development milestones and any related constraint, and if necessary, adjusts its estimate of the overall transaction price. Any such adjustments are recorded on a cumulative catch-up basis, which would affect license, collaboration, other revenue, and earnings in the period of adjustment. Cost of Goods Sold — Cost of goods sold includes material, labor costs and manufacturing overhead. Cost of goods sold also includes a significant component of current period manufacturing costs in excess of costs capitalized into inventory (excess capacity costs). These costs, in addition to the impact of the annual revaluation of inventory to standard costs and write-offs of inventory are recorded as expenses in the period in which they are incurred, rather than as a portion of inventory costs. All insulin inventory on hand and the full purchase commitment contract to purchase future insulin was written off as of the end of 2015. Therefore, cost of goods sold excludes the cost of insulin purchased under our Insulin Supply Agreement, except for the contract amendment fees of approximately $2.8 million and $2.0 million for the years ended December 31, 2019 and 2018, respectively (see Note 13 – Commitments and Contingencies). Cash and Cash Equivalents – The Company considers all highly liquid investments with original or remaining maturities of 90 days or less at the time of purchase, that are readily convertible into cash to be cash equivalents. As of December 31, 2019 and 2018, cash equivalents were comprised of money market accounts with maturities less than 90 days from the date of purchase. The Company records restricted cash when cash and cash equivalents are restricted as to withdrawal or usage. The Company presents amounts of restricted cash that will be available for use within 12 months of the reporting date as restricted cash in current assets. Restricted cash amounts that will not be available for use in the Company’s operations within 12 months of the reporting date are presented as restricted cash in long term assets. The following table provides a reconciliation of cash, cash equivalents, and restricted cash reported on the consolidated balance sheets that sum to amounts reported on the consolidated statement of cash flows (in thousands): December 31, 2019 2018 Cash and cash equivalents $ 29,906 $ 71,157 Restricted cash 316 527 Total cash, cash equivalents, and restricted cash $ 30,222 $ 71,684 Short-term Investments The Company’s short-term investments consist of U.S. Treasury securities stated at amortized cost which the Company intends to hold until maturity. Those with maturities less than 12 months are included in short-term investments and any investments with maturities in excess of twelve months are included in long-term investments in our consolidated balance sheets. The Company did not record any material gains or losses on these securities during the years ended December 31, 2019 and 2018. Concentration of Credit Risk — Financial instruments that potentially subject the Company to concentration of credit risk consist of cash and cash equivalents and short-term investments. Cash and cash equivalents are held in high credit quality institutions. Cash equivalents consist of interest-bearing money market accounts and U.S. Treasury securities, which are regularly monitored by management. Short-term investments consist of U.S. Treasury securities with a maximum maturity of twelve months. Accounts Receivable and Allowance for Doubtful Accounts — Accounts receivable are recorded at the invoiced amount and are not interest bearing. Accounts receivable are presented net of an allowance for doubtful accounts if there are estimated losses resulting from the inability of its customers to make required payments. The Company makes ongoing assumptions relating to the collectability of its accounts receivable in its calculation of the allowance for doubtful accounts. Accounts receivable are also presented net of an allowance for product returns and trade discounts and allowances because the Company’s customers have the right of setoff for these amounts against the related accounts receivable. Accounts receivable, net consists of the following (in thousands): December 31, 2019 2018 Accounts Receivable, gross $ 6,925 $ 5,198 Wholesaler distribution fees and prompt pay discounts (1,767 ) (868 ) Reserve for returns (1,645 ) (313 ) Accounts receivable, net $ 3,513 $ 4,017 As of December 31, 2019 and December 31, 2018, the allowance for doubtful accounts was de minimis. As of December 31, 2019 and December 31, 2018, the Company had three wholesale distributors representing approximately 96% and 89% of sales, respectively. Pre-Launch Inventory — An improvement to the manufacturing process for the Company’s primary excipient FDKP was demonstrated to be viable and management expects to realize an economic benefit in the future as a result of such process improvement. Accordingly, the Company is required to assess whether to capitalize inventory costs related to such excipient prior to regulatory approval of the new supplier and the improved manufacturing process. In doing so, management must consider a number of factors in order to determine the amount of inventory to be capitalized, including the historical experience of achieving regulatory approvals for the Company’s manufacturing process, feedback from regulatory agencies on the changes being effected and the amount of inventory that is likely to be used in commercial production. The shelf life of the excipient will be determined as part of the regulatory approval process; in the interim, the Company must assess the available stability data to determine whether there is likely to be adequate shelf life to support anticipated future sales occurring beyond the expected approval date of the new raw material. If management is aware of any specific material risks or contingencies other than the normal regulatory review and approval process, or if the criteria for capitalizing inventory produced prior to regulatory approval are otherwise not met, the Company would not capitalize such inventory costs, choosing instead to recognize such costs as a research and development expense in the period incurred. Inventories — Inventories are stated at the lower of cost or net realizable value. The Company determines the cost of inventory using the first-in, first-out, or FIFO, method. The Company capitalizes inventory costs associated with the Company’s products based on management’s judgment that future economic benefits are expected to be realized; otherwise, such costs are expensed as incurred as cost of goods sold. The Company periodically analyzes its inventory levels to identify inventory that may expire or has a cost basis in excess of its estimated realizable value and writes down such inventories, as appropriate. In addition, the Company’s products are subject to strict quality control and monitoring which the Company performs throughout the manufacturing process. If certain batches or units of product no longer meet quality specifications or may become obsolete or are forecasted to become obsolete due to expiration, the Company will record a charge to write down such unmarketable inventory to its estimated net realizable value. The Company analyzes its inventory levels to identify inventory that may expire or has a cost basis in excess of its estimated realizable value. The Company performs an assessment of projected sales and evaluates the lower of cost or net realizable value and the potential excess inventory on hand at the end of each reporting period. Impairment of Long-Lived Assets — The Company evaluates long-lived assets for impairment whenever events or changes in circumstances indicate that the carrying value of an asset may not be recoverable. Assets are considered to be impaired if the carrying value may not be recoverable. If the Company believes an asset to be impaired, the impairment recognized is the amount by which the carrying value of the asset exceeds the fair value of the asset. Fair value is determined using the market, income or cost approaches as appropriate for the asset. Any write-downs are treated as permanent reductions in the carrying amount of the asset and recognized as an operating loss. The Company recorded zero asset impairments for the years ended December 31, 2019 and 2018 (see Note 4 — Property and Equipment). Recognized Loss on Purchase Commitments — The Company assesses whether losses on long term purchase commitments should be accrued. Losses that are expected to arise from firm, non-cancellable, commitments for the future purchases are recognized unless recoverable. When making the assessment, the Company also considers whether it is able to renegotiate with its vendors. The recognized loss on purchase commitments is reduced as inventory items are received. If, subsequent to an accrual, a purchase commitment is successfully renegotiated, the gain is recognized in the Company’s consolidated statement of operations. The liability balance of the recognized loss on insulin purchase commitments as of December 31, 2019 and 2018 was $92.0 million and $98.3 million, respectively. Milestone Rights Liability — On July 1, 2013, in conjunction with the execution of the Facility Agreement, the Company issued Milestone Rights to the Milestone Purchasers. The Milestone Rights provide the Milestone Purchasers certain rights to receive payments of up to $90.0 million, of which $70.0 million remain payable as of December 31, 2019, upon the occurrence of specified strategic and sales milestones, including the achievement of specified net sales figures. The Company analyzed the Milestone Rights and determined that the Milestone Agreement does not meet the definition of a freestanding derivative. Since the Company has not elected to apply the fair value option to the Milestone Agreement, the Company recorded the Milestone Rights at their estimated initial fair value and accounted for the Milestone Rights as a liability. The initial fair value estimate of the Milestone Rights was calculated using the income approach in which the cash flows associated with the specified contractual payments were adjusted for both the expected timing and the probability of achieving the milestones and discounted to present value using a selected market discount rate. The expected timing and probability of achieving the milestones was developed with consideration given to both internal data, such as progress made to date and assessment of criteria required for achievement, and external data, such as market research studies. The discount rate was selected based on an estimation of required rate of returns for similar investment opportunities using available market data. The Milestone Rights liability will be remeasured as the specified milestone events are achieved. Specifically, as each milestone event is achieved, the portion of the initially recorded Milestone Rights liability that pertains to the milestone event being achieved, will be remeasured to the amount of the specified related milestone payment. The resulting change in the balance of the Milestone Rights liability due to remeasurement will be recorded in the Company’s consolidated statements of operations as interest expense. Furthermore, the Milestone Rights liability will be reduced upon the settlement of each milestone payment. As a result, each milestone payment would be effectively allocated between a reduction of the recorded Milestone Rights liability and an expense representing a return on a portion of the Milestone Rights liability paid to the investor for the achievement of the related milestone event (see Note 7 — Borrowings). As of December 31, 2019 and 2018, the remaining liability balance was $7.3 million and $8.9 million, respectively. Fair Value of Financial Instruments —The Company applies various valuation approaches in determining the fair value of its financial assets and liabilities within a hierarchy that maximizes the use of observable inputs and minimizes the use of unobservable inputs by requiring that observable inputs be used when available. Observable inputs are inputs that market participants would use in pricing the asset or liability based on market data obtained from sources independent of the Company. Unobservable inputs are inputs that reflect the Company’s assumptions about the inputs that market participants would use in pricing the asset or liability and are developed based on the best information available in the circumstances. The fair value hierarchy is broken down into three levels based on the source of inputs as follows: Level 1 — Quoted prices for identical instruments in active markets. Level 2 — Quoted prices for similar instruments in active markets; quoted prices for identical or similar instruments in markets that are not active; and model-derived valuations whose inputs are observable or whose significant value drivers are observ |