Summary of Significant Accounting Policies | Basis of Presentation and Summary of Significant Accounting Policies Basis of Presentation and Principles of Consolidation The 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”) and include the accounts of Codexis, Inc. and its wholly-owned subsidiaries. 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 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, assets held for sale, 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 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 for purposes of 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. 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 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 consolidated statements of operations. Revenue Recognition We recognize revenue from the sale of our biocatalyst products, biocatalyst research and development agreements and revenue sharing arrangements. 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 multiple element arrangements, such as license and platform technology transfer agreements 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. Where a portion of non-refundable up-front fees or other payments received are allocated to continuing performance obligations under the terms of a collaborative arrangement, they are recorded as deferred revenue and recognized as revenue ratably over the term of our estimated performance period under the agreement. We determine the estimated performance periods, and they 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. Biocatalyst Product Sales Biocatalyst product sales consist of sales of biocatalyst intermediates, active pharmaceutical ingredients (“API”) 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, contingent payments upon achievement of contractual criteria, and royalty fees based on the licensee’s 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 revenue 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 revenue from nonrefundable, 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 recognized over the estimated period of continuing performance obligation. 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 revenue from other payments received which are contingent solely upon the passage of time or the result of a customer’s performance when earned in accordance with the contract terms and when such payments can be reasonably estimated and collectability of such payments is reasonably assured. We recognize revenue 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 revenue, estimates are made using notification of the sale of licensed products from the licensees. Revenue Sharing Arrangement We recognize revenue from a revenue sharing arrangement based upon sales of licensed products by our revenue share partner Exela PharmSci, Inc. (“Exela”) (see Note 14 - Related Party Transactions ). We recognize revenue 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 revenue is 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 Research and development expenses related to FTE services under the research and development agreements approximate the research funding over the term of the respective agreements and are included in research and development expense. 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. 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 consolidated statements of operations. Advertising costs were $0.3 million in 2015 , $0.3 million in 2014 and $0.5 million in 2013 . 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 have, due to insufficient historical data, used the “simplified method,” as described in 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 income tax benefit 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 our net operating loss carryforwards. Restructuring Costs We apply applicable accounting guidance on accounting for costs associated with restructuring, including exit or disposal activities, which requires that a liability for costs associated with an exit or disposal activity be recognized and measured initially at fair value when the liability is incurred. Our restructuring activities have primarily been related to severance, benefits and related personnel costs and facility closing costs. 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. 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 $23.3 million and was comprised of cash of $12.2 million and money market funds of $11.1 million at December 31, 2015 . Cash and cash equivalents totaled $26.5 million and was comprised of cash of $11.9 million and money market funds of $14.6 million at December 31, 2014 . Restricted Cash Restricted cash consisted of amounts invested in savings accounts primarily for purposes of securing a standby letter of credit as collateral for our Redwood City, California facility lease agreement. 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 loss 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, 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 for identical assets or liabilities at the measurement date. • 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. See Note 6 - Fair Value Measurements to our consolidated financial statements. 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. As of December 31, 2015, accounts receivable included $3.1 million settlement relating to past-due payments and settlement of future payments associated with our royalty business with a non-core customer. We collected the full amount in February 2016. 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. 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. 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, reserves are recorded for the difference between the cost and the estimated market value. These reserves 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. Property and Equipment Property, equipment and leasehold improvements are stated at cost less accumulated depreciation and amortization and depreciated using the straight-line method over their estimated useful lives as follows: Asset classification Estimated useful life Laboratory equipment 5 years Computer equipment and software 3 to 5 years Office equipment and furniture 5 years Leasehold improvements Lesser of useful life or lease term Property and equipment classified as construction in process includes equipment that has been received but not yet placed in service. Normal repairs and maintenance costs are expensed as incurred. Intangible Assets Our intangible assets are finite-lived and consist of customer relationships, 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 with a net carrying value on our consolidated balance sheets as of December 31, 2015 . There has been no significant 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. As a result of our decision to terminate the detergent alcohol program during 2014, we performed an analysis to estimate cash flows from equipment used in potential strategic transactions with respect to our CodeXyme ® cellulase enzymes and CodeXol ® detergent alcohol programs. Based on this analysis we determined there were no future cash flows and recognized a $1.8 million impairment charge, which is reflected in research and development expense. As of December 31, 2015 , there were no events or changes in circumstances which indicated that the carrying amount of our Asset Group might not be recoverable. We concluded that the fair value of the reporting unit exceeded the carrying value and no impairment existed. No impairment charges for long-lived assets were recorded during the year ended December 31, 2015 . Goodwill We determined that we operate in one operating segment and reporting unit under the criteria in ASC 280, “Segment Reporting.” Accordingly, our review of goodwill impairment indicators is performed at the consolidated level. We review goodwill impairment annually at each fiscal year end 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 its 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 since 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. In addition, 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 represents the excess of cost over the fair value of net assets acquired in a business combination. Goodwill is not amortized. We tested goodwill for impairment at December 31, 2015 and concluded that the fair value of the reporting unit exceeded the carrying value and therefore no impairment existed. During 2015 , 2014 and 2013 , we did not record impairment charges related to goodwill. 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 December 31, 2015, 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. Effective December |