Basis of Presentation and Summary of Significant Accounting Policies | Basis of Presentation and Summary of Significant Accounting Policies Basis of Presentation and Principles of Consolidation The accompanying condensed consolidated financial statements have been prepared in accordance with accounting principles generally accepted in the United States of America ("GAAP") and the applicable rules and regulations of the Securities and Exchange Commission ("SEC") for interim financial information. Accordingly, they do not include all of the information and notes required by GAAP for complete financial statements. These interim condensed consolidated financial statements should be read in conjunction with the consolidated financial statements and notes thereto contained in our Annual Report on Form 10-K for the year ended December 31, 2015 . The condensed consolidated balance sheet at December 31, 2015 has been derived from the audited consolidated financial statements at that date, but does not include all disclosures, including notes, required by GAAP for complete financial statements. The unaudited interim condensed consolidated financial statements have been prepared on the same basis as the audited consolidated financial statements and, in the opinion of management, reflect all adjustments of a normal recurring nature considered necessary to present fairly our financial position as of June 30, 2016 and results of our operations and comprehensive income (loss) for the three and six months ended June 30, 2016 and 2015 , and cash flows for the six months ended June 30, 2016 and 2015 . The interim results are not necessarily indicative of the results for any future interim period or for the entire year. Certain prior period amounts have been reclassified to conform to current period presentation. The unaudited interim condensed consolidated financial statements include Codexis, Inc. and its wholly owned subsidiaries in the United States, India, Mauritius and the Netherlands. All significant intercompany balances and transactions have been eliminated in consolidation. Use of Estimates The preparation of financial statements in conformity with GAAP requires management to make estimates and assumptions that affect the reported amounts of assets and liabilities, disclosures of contingent liabilities at the date of the condensed consolidated financial statements, and the reported amounts of revenue and expenses during the reporting period. We regularly assess these estimates which primarily affect revenue recognition, accounts receivable, inventories, the valuation of investment securities and marketable securities, intangible assets, goodwill arising out of business acquisitions, accrued liabilities, stock awards and the valuation allowances associated with deferred tax assets. Actual results could differ from those estimates and such differences may be material to the condensed consolidated financial statements. Segment Reporting Operating segments are defined as components of an enterprise about which separate financial information is available that is evaluated regularly by the chief operating decision maker, or decision making group, in deciding how to allocate resources and in assessing performance. Our chief operating decision maker is our Chief Executive Officer. The Chief Executive Officer reviews financial information presented on a consolidated basis, accompanied by information about revenues by geographic region, for purposes of allocating resources and evaluating financial performance. We have one business activity and there are no segment managers who are held accountable for operations, operating results beyond revenue goals or plans for levels or components below the consolidated unit level. Accordingly, we have a single reporting segment. Revenue Recognition We recognize revenues from the sale of our biocatalyst products, biocatalyst research and development agreements and a revenue sharing arrangement. Revenue is recognized when the related costs are incurred and the four basic criteria of revenue recognition are met: (1) persuasive evidence of an arrangement exists; (2) delivery has occurred or services have been rendered; (3) the fee is fixed or determinable; and (4) collectability is reasonably assured. Where the revenue recognition criteria are not met, we defer the recognition of revenue by recording deferred revenue until such time that all criteria of revenue recognition are met. We account for revenues from multiple element arrangements, such as license and platform technology transfer agreements and collaborative arrangements in which a licensee may purchase several deliverables, in accordance with Financial Accounting Standards Board ("FASB") Accounting Standards Codification ("ASC") Subtopic 605-25, "Multiple Element Arrangements." For new or materially amended multiple element arrangements, we identify the deliverables at the inception of the arrangement and each deliverable within a multiple deliverable revenue arrangement is accounted for as a separate unit of accounting if both of the following criteria are met: (1) the delivered item or items have value to the customer on a standalone basis and (2) for an arrangement that includes a general right of return relative to the delivered item(s), delivery or performance of the undelivered item(s) is considered probable and substantially in our control. Revenue allocated to each element is then recognized based on when the basic four revenue recognition criteria are met for each element. Biocatalyst Product Sales Biocatalyst product sales consist of sales of biocatalyst enzymes, chemical intermediates and Codex ® Biocatalyst Panels and Kits. Biocatalyst product sales are recognized once passage of title and risk of loss has occurred and contractually specified acceptance criteria, if any, have been met, provided all other revenue recognition criteria have also been met. Shipping and handling costs charged to customers are recorded as revenue. Biocatalyst Research and Development Biocatalyst research and development agreements typically provide us with multiple revenue streams, including research services fees for full time employee ("FTE") research services, up-front licensing fees, technology access fees, contingent payments upon achievement of contractual criteria, and royalty fees based on the licensees' product sales or cost savings achieved by our customers. We perform biocatalyst research and development activities as specified in each respective customer agreement. Payments for services received are not refundable. Certain research agreements are based on a contractual reimbursement rate per FTE working on the project. We recognize revenues from research services as those services are performed over the contractual performance periods. When up-front payments are combined with FTE services in a single unit of accounting, we recognize the up-front payments using the proportionate performance method of revenue recognition based upon the actual amount of research labor hours incurred relative to the amount of the total expected labor hours to be incurred by us, up to the amount of cash received. In cases where the planned levels of research services fluctuate substantially over the research term, we are required to make estimates of the total hours required to perform our obligations. We recognize revenues from non-refundable, up-front license fees or technology access payments that are not dependent on any future performance by us when such amounts are earned. If we have continuing obligations to perform under the arrangement, such fees are recorded as deferred revenues and recognized over the estimated period of performance. Estimated performance periods are periodically reviewed based on the progress of the related program. The effect of any change made to an estimated performance period, and therefore to revenue recognized, would occur on a prospective basis in the period that the change was made. A payment that is contingent upon the achievement of a substantive milestone is recognized in its entirety in the period in which the milestone is achieved. A milestone is an event (i) that can only be achieved based in whole or in part on either our performance or on the occurrence of a specific outcome resulting from our performance, (ii) for which there is, as of the date the arrangement is entered into, substantive uncertainty that the event will be achieved and (iii) results in additional payments being due to us. Milestones are considered substantive when the consideration earned from the achievement of the milestone (i) is commensurate with either our performance to achieve the milestone or the enhancement of the value of the item delivered as a result of a specific outcome resulting from its performance, (ii) relates solely to past performance and (iii) is reasonable relative to all deliverable and payment terms in the arrangement. We recognize revenues from other contingent payments based on the passage of time or when earned as the result of a customer's performance in accordance with contractual terms and when such payments can be reasonably estimated and collectability of such payments is reasonably assured. We recognize revenues from royalties based on licensees' sales of our biocatalyst products or products using our technologies. Royalties are recognized as earned in accordance with the contract terms when royalties from licensees can be reasonably estimated and collectability is reasonably assured. For the majority of our royalty revenues, estimates are made using notification of the sale of licensed products from the licensees. Revenue Sharing Arrangement We recognize revenues from a revenue sharing arrangement based upon sales of licensed products by our revenue share partner Exela PharmSci, Inc. ("Exela") (see Note 11, "Related Party Transactions"). We recognize revenues net of product and selling costs upon notification from our revenue share partner of our portion of net profit based on the contractual percentage from the sale of licensed product. Sales Allowances Sales allowances primarily relate to product returns and prompt pay sales discounts and are recorded in the same period that the related revenues are recognized, resulting in a reduction in biocatalyst product sales revenue. Cost of Biocatalyst Product Sales Cost of biocatalyst product sales comprises both internal and third party fixed and variable costs including materials and supplies, labor, facilities and other overhead costs associated with our biocatalyst product sales. Shipping costs are included in our cost of biocatalyst product sales. Such charges were not significant in any of the periods presented. Cost of Research and Development Services Cost of research and development services related to services under research and development agreements approximates the research funding over the term of the respective agreements and is included in research and development expense. Costs of services provided under license and platform technology transfer agreements are included in research and development expenses and are expensed in the periods in which such costs are incurred. Research and Development Expenses Research and development expenses consist of costs incurred for internal projects, partner-funded collaborative research and development activities, as well as license and platform technology transfer agreements, as mentioned above. These costs include our direct and research-related overhead expenses, which include salaries and other personnel-related expenses (including stock-based compensation), occupancy-related costs, supplies, depreciation of facilities and laboratory equipment and amortization of acquired technologies, as well as external costs, and are expensed as incurred. Costs to acquire technologies that are utilized in research and development and that have no alternative future use are expensed when incurred. Stock-Based Compensation We use the Black-Scholes-Merton option pricing model to estimate the fair value of options granted under our equity incentive plans. The Black-Scholes-Merton option pricing model requires the use of assumptions, including the expected term of the award and the expected stock price volatility. We had, due to insufficient historical data, used the “simplified method,” as described in SEC Staff Accounting Bulletin No. 107, “Share-Based Payment,” to determine the expected term of all stock options granted from the inception of our equity plans through the first half of 2015. Beginning in the third quarter of 2015, we believe we have sufficient historical data to calculate expected terms for stock options granted. Thus, the expected term was based on historical exercise behavior on similar awards, giving consideration to the contractual terms, vesting schedules and expectations of future employee behavior. We used historical volatility to estimate expected stock price volatility. The risk-free rate assumption was based on United States Treasury instruments whose terms were consistent with the expected term of the stock options. The expected dividend assumption was based on our history and expectation of dividend payouts. Restricted Stock Units ("RSUs"), Restricted Stock Awards ("RSAs") and performance-contingent restricted stock units ("PSUs") were measured based on the fair market values of the underlying stock on the dates of grant. PSUs awarded may be conditional upon the attainment of one or more performance objectives over a specified period. At the end of the performance period, if the goals are attained, the awards are granted. Stock-based compensation expense was calculated based on awards ultimately expected to vest and was reduced for estimated forfeitures at the time of grant and revised, if necessary, in subsequent periods if actual forfeitures differed from those estimates. The estimated annual forfeiture rates for stock options, RSUs, PSUs, and RSAs are based on historical forfeiture experience. The estimated fair value of stock options, RSUs and RSAs is expensed on a straight-line basis over the vesting term of the grant and the estimated fair value of PSUs is expensed using an accelerated method over the term of the award once management has determined that it is probable that the performance objective will be achieved. Compensation expense is recorded over the requisite service period based on management's best estimate as to whether it is probable that the shares awarded are expected to vest. Management assesses the probability of the performance milestones being met on a continuous basis. We have not recognized, and do not expect to recognize in the near future, any excess income tax benefits related to employee stock-based compensation expense as a result of the full valuation allowance on our deferred tax assets including deferred tax assets related to net operating loss carryforwards. Foreign Currency Translation The United States dollar is the functional currency for our operations outside the United States. Accordingly, nonmonetary assets and liabilities originally acquired or assumed in other currencies are recorded in United States dollars at the exchange rates in effect at the date they were acquired or assumed. Monetary assets and liabilities denominated in other currencies are translated into United States dollars at the exchange rates in effect at the balance sheet date. Translation adjustments are recorded in other expense in the accompanying condensed consolidated statements of operations. Gains and losses realized from non-U.S. dollar transactions, including intercompany balances not considered as permanent investments, denominated in currencies other than an entity's functional currency, are included in other expense in the accompanying condensed consolidated statements of operations. Cash and Cash Equivalents We consider all highly liquid investments with maturity dates of three months or less at the date of purchase to be cash equivalents. Our cash and cash equivalents consist of cash on deposit with banks and money market funds. The majority of cash and cash equivalents is maintained with major financial institutions in North America. Deposits with these financial institutions may exceed the amount of insurance provided on such deposits. Cash and cash equivalents totaled $ 22.4 million at June 30, 2016 and were comprised of cash of $11.3 million and money market funds of $ 11.1 million . Inventories Inventories are stated at the lower of cost or market value. Cost is determined using a weighted-average approach, assuming full absorption of direct and indirect manufacturing costs, based on our product capacity utilization assumptions. If inventory costs exceed expected market value due to obsolescence or lack of demand, valuation adjustments are recorded for the difference between the cost and the estimated market value. These valuation adjustments are determined based on significant estimates. Marketable Securities We invest in equity securities and we classify those investments as available-for-sale. These securities are carried at estimated fair value (see Note 5, "Cash Equivalents and Marketable Securities") with unrealized gains and losses included in accumulated other comprehensive income in stockholders' equity. Available-for-sale equity securities with remaining maturities of greater than one year or which we currently do not intend to sell are classified as long-term. We review several factors to determine whether a loss is other-than-temporary. These factors include, but are not limited to, the intent and ability to retain the investment in the issuer for a period of time sufficient to allow for any anticipated recovery in market value, the length of time and the extent to which the market value of the investment has been less than cost and the financial condition and near-term prospects of the issuer. Unrealized losses are charged against "Other expense" when a decline in fair value is determined to be other-than-temporary. Amortization of purchase premiums and accretion of purchase discounts and realized gains and losses of debt securities are included in interest income. The cost of securities sold is based on the specific identification method. Fair Value Measurements Fair value is defined as the price that would be received to sell an asset or paid to transfer a liability in an orderly transaction between market participants at the measurement date. In determining fair value, we utilize valuation techniques that maximize the use of observable inputs and minimize the use of unobservable inputs to the extent possible and we consider counterparty credit risk in our assessment of fair value. Carrying amounts of financial instruments, including cash equivalents, short-term investments, marketable investments, accounts receivable, accounts payable and accrued liabilities, approximate their fair values as of the balance sheet dates because of their generally short maturities. The fair value hierarchy distinguishes between (1) market participant assumptions developed based on market data obtained from independent sources (observable inputs) and (2) an entity's own assumptions about market participant assumptions developed based on the best information available in the circumstances (unobservable inputs). The fair value hierarchy consists of three broad levels, giving the highest priority to unadjusted quoted prices in active markets for identical assets or liabilities (Level 1) and the lowest priority to unobservable inputs (Level 3). The three levels of the fair value hierarchy are described below: • Level 1: Inputs that are unadjusted, quoted prices in active markets that are accessible at the measurement date for assets or liabilities. • Level 2: Inputs (other than quoted prices included in Level 1) that are either directly or indirectly observable for the asset or liability through correlation with market data at the measurement date and for the duration of the instrument’s anticipated life. • Level 3: Unobservable inputs that are supported by little or no market activity and that are significant to the fair value of the assets or liabilities and which reflect management’s best estimate of what market participants would use in pricing the asset or liability at the measurement date. Concentrations of Credit Risk Our financial instruments that are potentially subject to concentration of credit risk primarily consist of cash equivalents, short term investments, accounts receivable, marketable securities and restricted cash. We invest cash that is not required for immediate operating needs principally in money market funds. Intangible Assets Our intangible assets are finite-lived and consist of developed core technology and the intellectual property ("IP") rights associated with the acquisition of Maxygen Inc.'s ("Maxygen") directed evolution technology in 2010. Intangible assets were recorded at their fair values at the date we acquired the assets and, for those assets having finite useful lives, are amortized using the straight-line method over their estimated useful lives. Impairment of Long-Lived Assets Our long-lived assets include property and equipment and intangible assets. We determined that we have a single entity wide asset group ("Asset Group"). The directed evolution technology patent portfolio acquired from Maxygen ("Core IP") is the most significant component of the Asset Group since it is the base technology for all aspects of our research and development activities, and represents the basis for all of our identifiable cash flow generating capacity. Consequently, we do not believe that identification of independent cash flows associated with long-lived assets is currently possible at any lower level than the Asset Group. The Core IP is the only finite-lived intangible asset on our condensed consolidated balance sheet as of June 30, 2016 . There has been no material change in the utilization or estimated life of the Core IP since we acquired the technology patent portfolio from Maxygen. The carrying value of our long-lived assets in the Asset Group may not be recoverable based upon the existence of one or more indicators of impairment which could include: a significant decrease in the market price of our common stock; current period cash flow losses or operating losses combined with a history of losses or a forecast of continuing losses associated with the use of the assets; slower growth rates in our industry; significant adverse changes in the business climate or legal factors; accumulation of costs significantly in excess of the amount originally expected for the acquisition or construction of the assets; loss of significant customers or partners; or the current expectation that the assets will more likely than not be sold or disposed of significantly before the end of their estimated useful life. We evaluate recoverability of intangible assets based on the sum of the undiscounted cash flows expected to result from the use and the eventual disposal of the Asset Group. We make estimates and judgments about the future undiscounted cash flows over the remaining useful life of the Asset Group. Our anticipated future cash flows include our estimates of existing or in process product sales, production and operating costs, future capital expenditures, working capital needs, and assumptions regarding the ultimate sale of the Asset Group at the end of the life of the primary asset. The useful life of the Asset Group was based on the estimated useful life of the Core IP, the primary asset at the time of acquisition. There has been no change in the estimated useful life of the Asset Group. Although our cash flow forecasts are based on assumptions that are consistent with our plans, there is significant judgment involved in determining the cash flows attributable to the Asset Group over its estimated remaining useful life. In the fourth quarter of 2015 , we determined that there were no events or changes in circumstances that indicated that the carrying value of the Asset Group might not be recoverable. We concluded that the fair value of the reporting unit exceeded its carrying value and no impairment existed. During the six months ended June 30, 2016 , we did not identify any indicators of potential impairment of intangible assets or new information that would have a material impact on the forecast or the impairment analysis prepared as of December 31, 2015 . Goodwill We determined that we operate in one segment and reporting unit under the criteria in ASC 280, "Segment Reporting." Accordingly, our review of goodwill impairment indicators is performed at the parent level. We review goodwill impairment annually in the fourth quarter of each fiscal year and whenever events or changes in circumstances indicate the carrying value of goodwill may not be recoverable. The goodwill impairment test consists of a two-step process. The first step of the goodwill impairment test used to identify potential impairment compares the fair value of the reporting unit to carrying value. If the fair value of the reporting unit exceeds its carrying amount, goodwill of the reporting unit is considered not impaired, and the second step of the impairment test is not required. We use our market capitalization as an indicator of fair value. We believe that because our reporting unit is publicly traded, the ability of a controlling stockholder to benefit from synergies and other intangible assets that arise from control might cause the fair value of our reporting unit as a whole to exceed its market capitalization. Therefore, we believe that the fair value measurement need not be based solely on the quoted market price of an individual share of our common stock, but also can consider the impact of a control premium in measuring the fair value of its reporting unit. If we were to use an income approach, it would establish a fair value by estimating the present value of our projected future cash flows expected to be generated from our business. The discount rate applied to the projected future cash flows to arrive at the present value would be intended to reflect all risks of ownership and the associated risks of realizing the stream of projected future cash flows. Our discounted cash flow methodology would consider projections of financial performance for a period of several years combined with an estimated residual value. The most significant assumptions we would use in a discounted cash flow methodology are the discount rate, the residual value and expected future revenue, gross margins and operating costs, along with considering any implied control premium. Should our market capitalization be less than total stockholders' equity as of our annual test date or as of any interim impairment testing date, we would also consider market comparables, recent trends in our stock price over a reasonable period and, if appropriate, use an income approach to determine whether the fair value of our reporting unit is greater than the carrying amount. The second step, if required, compares the implied fair value of the reporting unit goodwill with the carrying amount of that goodwill. If the carrying amount of the reporting unit's goodwill exceeds its implied fair value, an impairment charge is recognized in an amount equal to that excess. Implied fair value is the excess of the fair value of the reporting unit over the fair value of all identified assets and liabilities. We base our fair value estimates on assumptions we believe to be reasonable. Actual future results may differ from those estimates. Goodwill was tested for impairment in the fourth quarter of 2015 . We determined that the fair value of the reporting unit exceeded the carrying value and no impairment existed. Based on the results obtained, we concluded there was no impairment of our goodwill as of December 31, 2015 . During the six months ended June 30, 2016 , we did no t identify any indicators of potential impairment of goodwill or new information that would have a material impact on the forecast or the impairment analysis prepared as of December 31, 2015 . Income Taxes We use the liability method of accounting for income taxes, whereby deferred tax assets or liability account balances are calculated at the balance sheet date using current tax laws and rates in effect for the year in which the differences are expected to affect taxable income. Valuation allowances are provided when necessary to reduce deferred tax assets to the amount that will more likely than not be realized. We make certain estimates and judgments in determining income tax expense for financial statement purposes. These estimates and judgments occur in the calculation of tax credits, benefits and deductions and in the calculation of certain tax assets and liabilities, which arise from differences in the timing of recognition of revenue and expenses for tax and financial statement purposes. Significant changes to these estimates may result in an increase or decrease to our tax provision in a subsequent period. In assessing the realizability of deferred tax assets, we consider whether it is more likely than not that some portion or all of the deferred tax assets will be realized on a jurisdiction by jurisdiction basis. The ultimate realization of deferred tax assets is dependent upon the generation of taxable income in the future. We have recorded a deferred tax asset in jurisdictions where ultimate realization of deferred tax assets is more likely than not to occur. We make estimates and judgments about future taxable income that are based on assumptions that are consistent with our plans and estimates. Should the actual amounts differ from our estimates, the amount of our valuation allowance could be materially impacted. Any adjustment to the deferred tax asset valuation allowance would be recorded in the income statement for the periods in which the adjustment is determined to be required. We account for uncertainty in income taxes as required by the provisions of ASC Topic 740, "Income Taxes," which clarifies the accounting for uncertainty in income taxes recognized in an enterprise's financial statements. The first step is to evaluate the tax position for recognition by determining if the weight of available evidence indicates that it is more likely than not that the position will be sustained on audit, including resolution of related appeals or litigation processes, if any. The second step is to estimate and measure the tax benefit as the largest amount that is more than 50% likely of being realized upon ultimate settlement. It is inherently difficult and subjective to estimate such amounts, as this requires us to determine the probability of various possible outcomes. We consider many factors when evaluating and estimating our tax positions and tax benefits, which may require periodic adjustments and may not accurately anticipate actual outcomes. We recognize interest and penalties as a component of our income tax expense. The Tax Reform Act of 1986 and similar state provisions limit the use of net operating loss carryforwards in certain situations where equity transactions result in a change of ownership as defined by Internal Revenue Code Section 382. In the event we should experience such a change of ownership, utilization of our federal and state net operating loss carryforwards could be limited. We maintain a full valuation allowance against net deferred tax assets as we believe that it is more likely than not that the majority of deferred tax assets will not be realized. Benefit from income taxes was $26 thousand and $15 thousand for the three and six months ended June 30, 2016 , respectively. Benefit from income taxes was $0.4 million for each of the corresponding periods in 2015 . Recently Issued and Adopted Accounting Guidance From time to time, new accounting pronouncements are issued by the FASB or other standards setting bodies that are adopted by us as of the specified effective date. Unless otherwise discussed, we believe that the impact of recently issued standards that are not yet effective will not have a material impact on our consolidated financial statements upon adoption. In August 2014, the FASB issued Accounting Standards Update ("ASU") 2014-15, "Presentation of Financial Statements - Going Concern (Subtopic 205-40): Disclosure of Uncertainties about an Entity's Ability to Continue as a Going Concern." ASU 2014-15 defines management's responsibility to evaluate whether there is substantial doubt about an organization's ability to continue as a going concern and provide related disclosures. ASU 2014-15 is effective for annual re |