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 unaudited condensed consolidated financial statements have been prepared in accordance with generally accepted accounting principles 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 unaudited 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, 2017 . The condensed consolidated balance sheet at December 31, 2017 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 March 31, 2018 and results of our operations and comprehensive loss for the three months ended March 31, 2018 and 2017 , and cash flows for the three months ended March 31, 2018 and 2017 . 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. In connection with the adoption of Accounting Standard Update ("ASU") 2016-01, "Financial Instruments-Overall: Recognition and Measurement of Financial Assets and Financial Liabilities", unrealized losses on equity investments in marketable securities, net of taxes, previously included in accumulated other comprehensive loss have been reclassified to beginning accumulated deficit. See "Recently Adopted Accounting Pronouncements" for details regarding the adoption of ASU 2016-01. Comprehensive loss is equivalent to net loss during the three months ended March 31, 2018 because after adopting ASC 2016-01, we do not have any transactions recorded under comprehensive loss. Prior to our adoption of ASU 2016-01, and during the three months ended March 31, 2017 , comprehensive loss included unrealized losses from our equity investments in marketable securities. The unaudited interim condensed consolidated financial statements include the accounts of Codexis, Inc. and its wholly owned subsidiaries in the United States, India 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 marketable securities, 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 We report two business segments, Performance Enzymes and Novel Biotherapeutics, which are based on our operating segments. 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 ("CODM"), or decision making group, in deciding how to allocate resources and in assessing performance. Our CODM is our Chief Executive Officer. Our business segments are primarily based on our organizational structure and our operating results as used by our CODM in assessing performance and allocating resources for our company. We do not allocate or evaluate assets by segment. Previously, we had managed our business under one business segment. As our biotherapeutics business has emerged as a significant opportunity for us, effective in 2018, we formed Novel Biotherapeutics as a new business segment. The Novel Biotherapeutics segment focuses on new opportunities in the pharmaceutical industry to discover or improve novel biotherapeutic drug candidates that will target human diseases that are in need of improved therapeutic interventions. The Performance Enzymes segment consists of the existing protein catalyst products and services with focus on pharmaceutical, food, molecular diagnostics and other industrial markets. 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 unaudited 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 unaudited condensed consolidated statements of operations. Revenue Recognition On January 1, 2018, we adopted the provisions of ASU 2014-09, "Revenue from Contracts with Customers (Topic 606) ("ASC 606"). The guidance provides a unified model to determine how revenue is recognized. Our revenues are derived primarily from product revenue and collaborative research and development agreements. The majority of our contracts with customers typically contain multiple products and services. We account for individual products and services separately if they are distinct-that is, if a product or service is separately identifiable from other items in the contract and if a customer can benefit from it on its own or with other resources that are readily available to the customer. In determining the appropriate amount of revenue to be recognized as we fulfill our obligations under our product revenue and collaborative research and development agreements, we perform the following steps: (i) identification of the promised goods or services in the contract; (ii) determination of whether the promised goods or services are performance obligations including whether they are distinct in the context of the contract; (iii) measurement of the transaction price, including the constraint on variable consideration; (iv) allocation of the transaction price to the performance obligations based on estimated selling prices; and (v) recognition of revenue when (or as) we satisfy each performance obligation. The majority of our collaborative contracts contain multiple revenue streams such as up-front and/or annual license fees, fees for full time employee ("FTE") research and development services, contingent milestone payments upon achievement of contractual criteria, royalty fees based on the licensees' product revenue or usage, among others. We determine the stand-alone selling price ("SSP") and allocate consideration to distinct performance obligations. Typically, we base our SSPs on our historical sales. If an SSP is not directly observable, then we estimate the SSP taking into consideration market conditions, forecasted sales, entity-specific factors and available information about the customer. We account for a contract with a customer when there is approval and commitment from both parties, the rights of the parties are identified, payment terms are identified, the contract has commercial substance and collectability of consideration is probable. Non-cancellable purchase orders received from customers to deliver a specific quantity of product, when combined with our order confirmation, in exchange for future consideration, create enforceable rights and obligations on both parties and constitute a contract with a customer. We measure revenue based on the consideration specified in the contract with each customer, net of any sales incentives and taxes collected on behalf of government authorities. We recognize revenue in a manner that best depicts the transfer of promised goods or services to the customer, when control of the product or service is transferred to a customer. We make significant judgments when determining the appropriate timing of revenue recognition. The following is a description of principal activities from which we generate revenue: Product Revenue Product revenue consist of sales of protein catalysts, pharmaceutical intermediates and Codex ® Biocatalyst Panels and Kits. A majority of our product revenue are made pursuant to purchase orders or supply agreements and are recognized at a point in time when the control of the product has been transferred to the customer typically upon shipment. For some of the products that we develop, we recognize revenue over time as we have a right to payment from the customer under a binding, non-cancellable purchase order, and there is no alternate use of the product for us as it is specifically made for the customer’s use. Certain of our agreements provide options to customers which they can exercise at a future date, such as the option to purchase our product during the contract duration at discounted prices and an option to extend their contract, among others. In accounting for customer options, we determine whether an option is a material right and this requires us to exercise significant judgment. If a contract provides the customer an option to acquire additional goods or services at a discount that exceeds the range of discounts that we typically give for that product or service, or if the option provides the customer certain additional goods or services for free, the option may be considered a material right. If the contract gives the customer the option to acquire additional goods or services at their normal SSPs, we would likely determine that the option is not a material right and, therefore, account for it as a separate performance obligation when the customer exercises the option. We have elected to account for options which provide material rights using the alternative approach available under ASC 606, as we concluded we meet the criteria for using the alternative approach. Therefore, the transaction price is calculated as the expected consideration to be received for all the goods and services we expect to provide. We update the transaction price for expected consideration, subject to constraint, each reporting period if our estimate of future goods to be ordered by customers change. Research and Development Revenue We perform research and development activities as specified in each respective customer agreement. We identify each performance obligation in our research and development agreements at contract inception. We allocate the consideration to each distinct performance obligation based on the estimated SSP of each performance obligation. Performance obligations included in our research and services agreements typically include research and development services for a specified term, periodic reports and small samples of enzyme produced. The majority of our research and development agreements are based on a contractual rate per FTE working on the project. The underlying product that we develop for customers does not create an asset with an alternative use to us and the customer receives benefits as we perform the work towards completion. Thus, our performance obligations are generally satisfied over time as the service is performed. We utilize an appropriate method of measuring progress towards the completion of our performance obligations to determine the timing of revenue recognition. For each performance obligation that is satisfied over time, we recognize revenue using a single measure of progress, typically based on FTE hours incurred. Our contracts frequently provide customers with rights to use or access our products or technology, along with other promises or performance obligations. Under ASC 606, we must first determine whether the license is distinct from other promises, such as our promise to manufacture a product. If we determine that the customer cannot benefit from the license without our manufacturing capability, the license will be accounted for as combined with other performance obligations. If we determine that a license is distinct, we would recognize revenues from non-refundable, up-front license fees when the license is transferred to the customer, and the customer can use and benefit from it. We estimate the SSP for license rights by using an income approach model which includes the following key assumptions: the development timelines, revenue forecasts, commercialization expenses, discount rate and the probability of technical and regulatory success. For licenses that have been previously sold to other customers, we use historical information to determine SSP. At the inception of each arrangement that includes variable consideration such as development milestone payments, we evaluate whether the milestones are considered probable of being reached and estimate 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 our control or the licensee, 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 we recognize revenue as or when the performance obligations under the contract are satisfied. At the end of each subsequent reporting period, we re-evaluate the probability of achievement of such development milestones and any related constraint, and if necessary, adjust our estimate of the overall transaction price. Any such adjustments are recorded on a cumulative catch-up basis, which would affect license, collaboration and other revenues and earnings in the period of adjustment. Our CodeEvolver ® platform technology transfer collaboration agreements typically include license fees, upfront fees and variable consideration in the form of milestone payments and sales or usage-based royalties. We recognize revenues from our platform technology transfer agreements over time as our customer learns to use our technology. For agreements that include sales or usage-based royalty payments to us, we do not recognize revenue until the underlying sales of the product or usage has occurred. At the end of each reporting period, we estimate the royalty amount. We recognize revenue at the later of (i) when the related sale of the product occurs, or (ii) when the performance obligation to which some or all of the royalty has been allocated has been satisfied, or partially satisfied. Contract Assets Contract assets include amounts related to our contractual right to consideration for completed performance obligations not yet invoiced. The contract assets are transferred to the receivables when the rights become unconditional. Contract Liabilities Contract liabilities are recorded as deferred revenues and include payments received in advance of performance under the contract. Contract liabilities are realized when the development services are provided to the customer or control of the products has been transferred to the customer. A portion of our contract liabilities relate to supply arrangements that contain material rights that are recognized using the alternative method, under which the aggregate amount invoiced to the customer for shipped products, including annual fees, is higher than the amount of revenue recognized based on the transaction price allocated to the shipped products. Contract Costs ASC 606 requires the recognition of an asset for the incremental costs of obtaining a contract with a customer if the entity expects to recover such costs. Incremental costs are costs that would not have been incurred if the contract had not been obtained. Examples of contract costs are commissions paid to sales personnel. We do not typically incur significant incremental costs because the compensation of our salespeople are not based on contracts closed but on a mixture of company goals, individual goals, and sales goals. If a commission paid is directly related to obtaining a specific contract, our policy is to capitalize and amortize such costs over the estimated life of the contract. Fulfillment costs, such as shipping and handling, are recognized at a point in time and are included in cost of product sales. Contract costs are reported in other non-current assets. Cost of Product Revenue Cost of product revenue comprises both internal and third party fixed and variable costs including materials and supplies, labor, facilities and other overhead costs associated with our product sales. Shipping costs are included in our cost of product revenue. 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 FTE services under research and development agreements approximate the research funding over the term of the respective agreements and are 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 as well as 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. Advertising Advertising costs are expensed as incurred and included in selling, general and administrative expenses in the unaudited condensed consolidated statements of operations. Advertising costs were $0.1 million for each of the three months ended March 31, 2018 and 2017 . 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. The expected term is based on historical exercise behavior on similar awards, giving consideration to the contractual terms, vesting schedules and expectations of future employee behavior. We use historical volatility to estimate expected stock price volatility. The risk-free rate assumption is based on United States Treasury instruments whose terms are consistent with the expected term of the stock options. The expected dividend assumption is based on our history and expectation of dividend payouts. Restricted Stock Units ("RSUs"), Restricted Stock Awards ("RSAs"), performance based options ("PBOs"), and performance-contingent restricted stock units ("PSUs") are measured based on the fair market values of the underlying stock on the dates of grant. The vesting of PBOs and PSUs awarded is conditioned upon the attainment of one or more performance objectives over a specified period and upon continued employment through the applicable vesting date. At the end of the performance period, shares of stock subject to the PBOs and PSUs vest based upon both the level of achievement of performance objectives within the performance period and continued employment through the applicable vesting date. Stock-based compensation expense is calculated based on awards ultimately expected to vest and is reduced for estimated forfeitures at the time of grant and revised, if necessary, in subsequent periods if actual forfeitures differ from those estimates. The estimated annual forfeiture rates for stock options, RSUs, PSUs, PBOs, and RSAs are based on historical forfeiture experience. The estimated fair value of stock options, RSUs and RSAs are expensed on a straight-line basis over the vesting term of the grant and the estimated fair value of PSUs and PBOs are 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. 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 $ 24.3 million at March 31, 2018 and were comprised of cash of $17.5 million and money market funds of $6.8 million . At December 31, 2017 , cash and cash equivalents totaled $31.2 million and were comprised of cash of $24.4 million and money market funds of $6.8 million . Restricted Cash In 2016, we began the process of liquidating our Indian subsidiary. The local legal requirements for liquidation required us to maintain our subsidiary's cash balance in an account managed by a legal trustee to satisfy our financial obligations. This balance is recorded as non-current restricted cash on the consolidated balance sheets and totaled $0.8 million at March 31, 2018 and December 31, 2017 . In addition, pursuant to the terms of the lease agreement for our Redwood City, CA facilities, our letters of credit are collateralized by deposit balances of $0.7 million as of March 31, 2018 and December 31, 2017 , which is recorded as non-current restricted cash on the unaudited condensed consolidated balance sheets (see Note 11, "Commitments and Contingencies" for details). Marketable Securities We invest in equity securities that are carried at estimated fair value (see Note 6, "Cash Equivalents and Marketable Securities"), with changes in fair value recognized within earnings. Equity securities with remaining maturities of greater than one year or which we currently do not intend to sell are classified as long-term. Unrealized holding gains and losses (the adjustment to fair value) and realized gains and losses are included in other income (expense) in the unaudited condensed consolidated statement of operations. 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, marketable investments, accounts receivable, accounts payable and accrued liabilities, approximate their fair values as of the balance sheet dates because of their 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 for identical assets or liabilities at the measurement date. • Level 2: Inputs 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. See Note 7, "Fair Value Measurements" to our unaudited condensed consolidated financial statements. Concentrations of Credit Risk Financial instruments that potentially subject us to significant concentrations of credit risk consist primarily of cash and cash equivalents, accounts receivable, marketable securities and restricted cash. Cash that is not required for immediate operating needs is invested principally in money market funds. Cash and cash equivalents are invested through banks and other financial institutions in the United States, India and Netherlands. Such deposits in those countries may be in excess of insured limits. Accounts Receivable and Allowance for Doubtful Accounts We currently sell primarily to pharmaceutical companies throughout the world by the extension of trade credit terms based on an assessment of each customer's financial condition. Trade credit terms are generally offered without collateral and may include a discount for prompt payment for specific customers. To manage our credit exposure, we perform ongoing evaluations of our customers' financial conditions. In addition, accounts receivable includes amounts owed to us under our collaborative research and development agreements. We recognize accounts receivable at invoiced amounts and we maintain a valuation allowance for doubtful accounts. We estimate an allowance for doubtful accounts through specific identification of potentially uncollectible accounts receivable based on an analysis of our accounts receivable aging. Uncollectible accounts receivable are written off against the allowance for doubtful accounts when all efforts to collect them have been exhausted. Recoveries are recognized when they are received. Actual collection losses may differ from our estimates and could be material to our consolidated financial position, results of operations, and cash flows. Inventories Inventories are stated at the lower of cost or net realizable value. Cost is determined using a weighted-average approach, assuming full absorption of direct and indirect manufacturing costs, or based on cost of purchasing from our vendors. If inventory costs exceed expected net realizable value due to obsolescence or lack of demand, valuation adjustments are recorded for the difference between the cost and the expected net realizable value. These valuation adjustments are determined based on significant estimates. Concentrations of Supply Risk We rely on a limited number of suppliers for our products. We believe that other vendors would be able to provide similar products; however, the qualification of such vendors may require substantial start-up time. In order to mitigate any adverse impacts from a disruption of supply, we attempt to maintain an adequate supply of critical single-sourced materials. For certain materials, our vendors maintain a supply for us. We outsource the large scale manufacturing of our products to contract manufacturers with facilities in Austria and Italy. Impairment of Long-Lived Assets Our long-lived assets consist of property and equipment. We evaluate the carrying value of long-lived assets, including property and equipment, whenever events, changes in business circumstances or our planned use of long-lived assets indicate that their carrying amounts may not be fully recoverable or that their useful lives are no longer appropriate. If these facts and circumstances exist, we assess for recovery by comparing the carrying values of long-lived assets with their future net undiscounted cash flows. If the comparison indicates that impairment exists, long-lived assets are written down to their respective fair values based on discounted cash flows. Significant management judgment is required in the forecast of future operating results that are used in the preparation of unexpected undiscounted cash flows. As of March 31, 2018 and December 31, 2017 , there were no events or changes in circumstances which indicated that the carrying amount of our long-lived assets might not be recoverable. No impairment charges for long-lived assets were recorded during the three months ended March 31, 2018 and 2017 . Goodwill As of March 31, 2018 and December 31, 2017 , the carrying amount of our goodwill was $3.2 million . All of our goodwill relates to the Performance Enzymes segment. There were no indicators of impairment identified related to our Performance Enzymes segment during the three months ended March 31, 2018 and 2017 . Income Taxes We use the liability method of accounting for income taxes, whereby deferred tax asset 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 valuation allowance against these deferred tax assets in jurisdictions where ultimate realization of deferred tax assets is more likely than not to occur. As of March 31, 2018 and December 31, 2017 , we maintain a full valuation allowance in all jurisdictions against the 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. We make estimates and judgments about our 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 may 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 require |